1&&w.reverse(),f&&lu))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var d=-1,f=!0,m=n&v?new Er:i;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(He,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Qt(z,(function(n){var r="_."+n[0];t&n[1]&&!Jt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(De);return t?t[1].split(Fe):[]}(r),n)))}function sa(e){var t=0,n=0;return function(){var r=Qn(),o=T-(r-n);if(n=r,o>0){if(++t>=k)return arguments[0]}else t=0;return e.apply(i,arguments)}}function ua(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,Ma(e,n)}));function Fa(e){var t=mr(e);return t.__chain__=!0,t}function za(e,t){return t(e)}var Ra=Ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return qr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof gr&&Vi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:za,args:[o],thisArg:i}),new vr(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var Ua=ii((function(e,t,n){lt.call(e,n)?++e[n]:Mr(e,n,1)}));var Ba=fi(va),Wa=fi(ga);function Ya(e,t){return(gs(e)?Qt:Fr)(e,Ni(t,3))}function Va(e,t){return(gs(e)?Xt:zr)(e,Ni(t,3))}var Qa=ii((function(e,t,n){lt.call(e,n)?e[n].push(t):Mr(e,n,[t])}));var Xa=xo((function(e,t,n){var o=-1,i="function"==typeof t,a=ys(e)?r(e.length):[];return Fr(e,(function(e){a[++o]=i?Yt(t,e,n):ro(e,t,n)})),a})),$a=ii((function(e,t,n){Mr(e,n,t)}));function Ga(e,t){return(gs(e)?Kt:mo)(e,Ni(t,3))}var Ja=ii((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Za=xo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Qi(e,t[0],t[1])?t=[]:n>2&&Qi(t[0],t[1],t[2])&&(t=[t[0]]),bo(e,Wr(t,1),[])})),Ka=Nn||function(){return qt.Date.now()};function es(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Si(e,x,i,i,i,i,t)}function ts(e,t){var n;if("function"!=typeof t)throw new ot(u);return e=Rs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var ns=xo((function(e,t,n){var r=g;if(n.length){var o=jn(n,Ii(ns));r|=L}return Si(e,r,t,n,o)})),rs=xo((function(e,t,n){var r=g|b;if(n.length){var o=jn(n,Ii(rs));r|=L}return Si(t,r,e,n,o)}));function os(e,t,n){var r,o,a,s,c,l,d=0,f=!1,m=!1,p=!0;if("function"!=typeof e)throw new ot(u);function h(t){var n=r,a=o;return r=o=i,d=t,s=e.apply(a,n)}function v(e){var n=e-l;return l===i||n>=t||n<0||m&&e-d>=a}function g(){var e=Ka();if(v(e))return b(e);c=oa(g,function(e){var n=t-(e-l);return m?Vn(n,a-(e-d)):n}(e))}function b(e){return c=i,p&&r?h(e):(r=o=i,s)}function y(){var e=Ka(),n=v(e);if(r=arguments,o=this,l=e,n){if(c===i)return function(e){return d=e,c=oa(g,t),f?h(e):s}(l);if(m)return Go(c),c=oa(g,t),h(l)}return c===i&&(c=oa(g,t)),s}return t=Bs(t)||0,Os(n)&&(f=!!n.leading,a=(m="maxWait"in n)?Yn(Bs(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){c!==i&&Go(c),d=0,r=l=o=c=i},y.flush=function(){return c===i?s:b(Ka())},y}var is=xo((function(e,t){return Hr(e,1,t)})),as=xo((function(e,t,n){return Hr(e,Bs(t)||0,n)}));function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(u);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ss.Cache||wr),n}function us(e){if("function"!=typeof e)throw new ot(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=wr;var cs=Xo((function(e,t){var n=(t=1==t.length&&gs(t[0])?Kt(t[0],gn(Ni())):Kt(Wr(t,1),gn(Ni()))).length;return xo((function(r){for(var o=-1,i=Vn(r.length,n);++o=t})),vs=oo(function(){return arguments}())?oo:function(e){return js(e)&<.call(e,"callee")&&!Pt.call(e,"callee")},gs=r.isArray,bs=Ft?gn(Ft):function(e){return js(e)&&Zr(e)==ue};function ys(e){return null!=e&&As(e.length)&&!xs(e)}function ws(e){return js(e)&&ys(e)}var Es=Rn||Bu,Ls=zt?gn(zt):function(e){return js(e)&&Zr(e)==Y};function _s(e){if(!js(e))return!1;var t=Zr(e);return t==Q||t==V||"string"==typeof e.message&&"string"==typeof e.name&&!Cs(e)}function xs(e){if(!Os(e))return!1;var t=Zr(e);return t==X||t==$||t==B||t==ee}function Ss(e){return"number"==typeof e&&e==Rs(e)}function As(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=P}function Os(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function js(e){return null!=e&&"object"==typeof e}var ks=Rt?gn(Rt):function(e){return js(e)&&Ui(e)==G};function Ts(e){return"number"==typeof e||js(e)&&Zr(e)==J}function Cs(e){if(!js(e)||Zr(e)!=K)return!1;var t=Ct(e);if(null===t)return!0;var n=lt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==pt}var Ms=Ut?gn(Ut):function(e){return js(e)&&Zr(e)==te};var qs=Bt?gn(Bt):function(e){return js(e)&&Ui(e)==ne};function Ps(e){return"string"==typeof e||!gs(e)&&js(e)&&Zr(e)==re}function Is(e){return"symbol"==typeof e||js(e)&&Zr(e)==oe}var Ns=Wt?gn(Wt):function(e){return js(e)&&As(e.length)&&!!At[Zr(e)]};var Hs=wi(fo),Ds=wi((function(e,t){return e<=t}));function Fs(e){if(!e)return[];if(ys(e))return Ps(e)?Mn(e):ri(e);if(Dt&&e[Dt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Dt]());var t=Ui(e);return(t==G?An:t==ne?kn:mu)(e)}function zs(e){return e?(e=Bs(e))===q||e===-q?(e<0?-1:1)*I:e==e?e:0:0===e?e:0}function Rs(e){var t=zs(e),n=t%1;return t==t?n?t-n:t:0}function Us(e){return e?Pr(Rs(e),0,H):0}function Bs(e){if("number"==typeof e)return e;if(Is(e))return N;if(Os(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Os(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Pe,"");var n=Ye.test(e);return n||Qe.test(e)?Tt(e.slice(2),n?2:8):We.test(e)?N:+e}function Ws(e){return oi(e,iu(e))}function Ys(e){return null==e?"":Ho(e)}var Vs=ai((function(e,t){if(Ji(t)||ys(t))oi(t,ou(t),e);else for(var n in t)lt.call(t,n)&&jr(e,n,t[n])})),Qs=ai((function(e,t){oi(t,iu(t),e)})),Xs=ai((function(e,t,n,r){oi(t,iu(t),e,r)})),$s=ai((function(e,t,n,r){oi(t,ou(t),e,r)})),Gs=Ti(qr);var Js=xo((function(e,t){e=tt(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&Qi(t[0],t[1],o)&&(r=1);++n1),t})),oi(e,Mi(e),n),r&&(n=Ir(n,f|m|p,ji));for(var o=t.length;o--;)Fo(n,t[o]);return n}));var cu=Ti((function(e,t){return null==e?{}:function(e,t){return yo(e,t,(function(t,n){return eu(e,n)}))}(e,t)}));function lu(e,t){if(null==e)return{};var n=Kt(Mi(e),(function(e){return[e]}));return t=Ni(t),yo(e,n,(function(e,n){return t(e,n[0])}))}var du=xi(ou),fu=xi(iu);function mu(e){return null==e?[]:bn(e,ou(e))}var pu=li((function(e,t,n){return t=t.toLowerCase(),e+(n?hu(t):t)}));function hu(e){return _u(Ys(e).toLowerCase())}function vu(e){return(e=Ys(e))&&e.replace($e,Ln).replace(yt,"")}var gu=li((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),bu=li((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),yu=ci("toLowerCase");var wu=li((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Eu=li((function(e,t,n){return e+(n?" ":"")+_u(t)}));var Lu=li((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),_u=ci("toUpperCase");function xu(e,t,n){return e=Ys(e),(t=n?i:t)===i?function(e){return _t.test(e)}(e)?function(e){return e.match(Et)||[]}(e):function(e){return e.match(ze)||[]}(e):e.match(t)||[]}var Su=xo((function(e,t){try{return Yt(e,i,t)}catch(e){return _s(e)?e:new Ze(e)}})),Au=Ti((function(e,t){return Qt(t,(function(t){t=la(t),Mr(e,t,ns(e[t],e))})),e}));function Ou(e){return function(){return e}}var ju=mi(),ku=mi(!0);function Tu(e){return e}function Cu(e){return uo("function"==typeof e?e:Ir(e,f))}var Mu=xo((function(e,t){return function(n){return ro(n,e,t)}})),qu=xo((function(e,t){return function(n){return ro(e,n,t)}}));function Pu(e,t,n){var r=ou(t),o=$r(t,r);null!=n||Os(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=$r(t,ou(t)));var i=!(Os(n)&&"chain"in n&&!n.chain),a=xs(e);return Qt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=ri(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,en([this.value()],arguments))})})),e}function Iu(){}var Nu=gi(Kt),Hu=gi($t),Du=gi(rn);function Fu(e){return Xi(e)?fn(la(e)):function(e){return function(t){return Gr(t,e)}}(e)}var zu=yi(),Ru=yi(!0);function Uu(){return[]}function Bu(){return!1}var Wu=vi((function(e,t){return e+t}),0),Yu=Li("ceil"),Vu=vi((function(e,t){return e/t}),1),Qu=Li("floor");var Xu,$u=vi((function(e,t){return e*t}),1),Gu=Li("round"),Ju=vi((function(e,t){return e-t}),0);return mr.after=function(e,t){if("function"!=typeof t)throw new ot(u);return e=Rs(e),function(){if(--e<1)return t.apply(this,arguments)}},mr.ary=es,mr.assign=Vs,mr.assignIn=Qs,mr.assignInWith=Xs,mr.assignWith=$s,mr.at=Gs,mr.before=ts,mr.bind=ns,mr.bindAll=Au,mr.bindKey=rs,mr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return gs(e)?e:[e]},mr.chain=Fa,mr.chunk=function(e,t,n){t=(n?Qi(e,t,n):t===i)?1:Yn(Rs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=r(Dn(o/t));ao?0:o+n),(r=r===i||r>o?o:Rs(r))<0&&(r+=o),r=n>r?0:Us(r);n>>0)?(e=Ys(e))&&("string"==typeof t||null!=t&&!Ms(t))&&!(t=Ho(t))&&Sn(e)?$o(Mn(e),0,n):e.split(t,n):[]},mr.spread=function(e,t){if("function"!=typeof e)throw new ot(u);return t=null==t?0:Yn(Rs(t),0),xo((function(n){var r=n[t],o=$o(n,0,t);return r&&en(o,r),Yt(e,this,o)}))},mr.tail=function(e){var t=null==e?0:e.length;return t?Co(e,1,t):[]},mr.take=function(e,t,n){return e&&e.length?Co(e,0,(t=n||t===i?1:Rs(t))<0?0:t):[]},mr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Co(e,(t=r-(t=n||t===i?1:Rs(t)))<0?0:t,r):[]},mr.takeRightWhile=function(e,t){return e&&e.length?Ro(e,Ni(t,3),!1,!0):[]},mr.takeWhile=function(e,t){return e&&e.length?Ro(e,Ni(t,3)):[]},mr.tap=function(e,t){return t(e),e},mr.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ot(u);return Os(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),os(e,t,{leading:r,maxWait:t,trailing:o})},mr.thru=za,mr.toArray=Fs,mr.toPairs=du,mr.toPairsIn=fu,mr.toPath=function(e){return gs(e)?Kt(e,la):Is(e)?[e]:ri(ca(Ys(e)))},mr.toPlainObject=Ws,mr.transform=function(e,t,n){var r=gs(e),o=r||Es(e)||Ns(e);if(t=Ni(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Os(e)&&xs(i)?pr(Ct(e)):{}}return(o?Qt:Qr)(e,(function(e,r,o){return t(n,e,r,o)})),n},mr.unary=function(e){return es(e,1)},mr.union=ja,mr.unionBy=ka,mr.unionWith=Ta,mr.uniq=function(e){return e&&e.length?Do(e):[]},mr.uniqBy=function(e,t){return e&&e.length?Do(e,Ni(t,2)):[]},mr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?Do(e,i,t):[]},mr.unset=function(e,t){return null==e||Fo(e,t)},mr.unzip=Ca,mr.unzipWith=Ma,mr.update=function(e,t,n){return null==e?e:zo(e,t,Vo(n))},mr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:zo(e,t,Vo(n),r)},mr.values=mu,mr.valuesIn=function(e){return null==e?[]:bn(e,iu(e))},mr.without=qa,mr.words=xu,mr.wrap=function(e,t){return ls(Vo(t),e)},mr.xor=Pa,mr.xorBy=Ia,mr.xorWith=Na,mr.zip=Ha,mr.zipObject=function(e,t){return Wo(e||[],t||[],jr)},mr.zipObjectDeep=function(e,t){return Wo(e||[],t||[],Oo)},mr.zipWith=Da,mr.entries=du,mr.entriesIn=fu,mr.extend=Qs,mr.extendWith=Xs,Pu(mr,mr),mr.add=Wu,mr.attempt=Su,mr.camelCase=pu,mr.capitalize=hu,mr.ceil=Yu,mr.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=Bs(n))==n?n:0),t!==i&&(t=(t=Bs(t))==t?t:0),Pr(Bs(e),t,n)},mr.clone=function(e){return Ir(e,p)},mr.cloneDeep=function(e){return Ir(e,f|p)},mr.cloneDeepWith=function(e,t){return Ir(e,f|p,t="function"==typeof t?t:i)},mr.cloneWith=function(e,t){return Ir(e,p,t="function"==typeof t?t:i)},mr.conformsTo=function(e,t){return null==t||Nr(e,t,ou(t))},mr.deburr=vu,mr.defaultTo=function(e,t){return null==e||e!=e?t:e},mr.divide=Vu,mr.endsWith=function(e,t,n){e=Ys(e),t=Ho(t);var r=e.length,o=n=n===i?r:Pr(Rs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},mr.eq=ms,mr.escape=function(e){return(e=Ys(e))&&Se.test(e)?e.replace(_e,_n):e},mr.escapeRegExp=function(e){return(e=Ys(e))&&qe.test(e)?e.replace(Me,"\\$&"):e},mr.every=function(e,t,n){var r=gs(e)?$t:Rr;return n&&Qi(e,t,n)&&(t=i),r(e,Ni(t,3))},mr.find=Ba,mr.findIndex=va,mr.findKey=function(e,t){return an(e,Ni(t,3),Qr)},mr.findLast=Wa,mr.findLastIndex=ga,mr.findLastKey=function(e,t){return an(e,Ni(t,3),Xr)},mr.floor=Qu,mr.forEach=Ya,mr.forEachRight=Va,mr.forIn=function(e,t){return null==e?e:Yr(e,Ni(t,3),iu)},mr.forInRight=function(e,t){return null==e?e:Vr(e,Ni(t,3),iu)},mr.forOwn=function(e,t){return e&&Qr(e,Ni(t,3))},mr.forOwnRight=function(e,t){return e&&Xr(e,Ni(t,3))},mr.get=Ks,mr.gt=ps,mr.gte=hs,mr.has=function(e,t){return null!=e&&Bi(e,t,eo)},mr.hasIn=eu,mr.head=ya,mr.identity=Tu,mr.includes=function(e,t,n,r){e=ys(e)?e:mu(e),n=n&&!r?Rs(n):0;var o=e.length;return n<0&&(n=Yn(o+n,0)),Ps(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&un(e,t,n)>-1},mr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Rs(n);return o<0&&(o=Yn(r+o,0)),un(e,t,o)},mr.inRange=function(e,t,n){return t=zs(t),n===i?(n=t,t=0):n=zs(n),function(e,t,n){return e>=Vn(t,n)&&e=-P&&e<=P},mr.isSet=qs,mr.isString=Ps,mr.isSymbol=Is,mr.isTypedArray=Ns,mr.isUndefined=function(e){return e===i},mr.isWeakMap=function(e){return js(e)&&Ui(e)==ae},mr.isWeakSet=function(e){return js(e)&&Zr(e)==se},mr.join=function(e,t){return null==e?"":Bn.call(e,t)},mr.kebabCase=gu,mr.last=_a,mr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=Rs(n))<0?Yn(r+o,0):Vn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):sn(e,ln,o,!0)},mr.lowerCase=bu,mr.lowerFirst=yu,mr.lt=Hs,mr.lte=Ds,mr.max=function(e){return e&&e.length?Ur(e,Tu,Kr):i},mr.maxBy=function(e,t){return e&&e.length?Ur(e,Ni(t,2),Kr):i},mr.mean=function(e){return dn(e,Tu)},mr.meanBy=function(e,t){return dn(e,Ni(t,2))},mr.min=function(e){return e&&e.length?Ur(e,Tu,fo):i},mr.minBy=function(e,t){return e&&e.length?Ur(e,Ni(t,2),fo):i},mr.stubArray=Uu,mr.stubFalse=Bu,mr.stubObject=function(){return{}},mr.stubString=function(){return""},mr.stubTrue=function(){return!0},mr.multiply=$u,mr.nth=function(e,t){return e&&e.length?go(e,Rs(t)):i},mr.noConflict=function(){return qt._===this&&(qt._=ht),this},mr.noop=Iu,mr.now=Ka,mr.pad=function(e,t,n){e=Ys(e);var r=(t=Rs(t))?Cn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return bi(Fn(o),n)+e+bi(Dn(o),n)},mr.padEnd=function(e,t,n){e=Ys(e);var r=(t=Rs(t))?Cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=$n();return Vn(e+o*(t-e+kt("1e-"+((o+"").length-1))),t)}return Lo(e,t)},mr.reduce=function(e,t,n){var r=gs(e)?tn:pn,o=arguments.length<3;return r(e,Ni(t,4),n,o,Fr)},mr.reduceRight=function(e,t,n){var r=gs(e)?nn:pn,o=arguments.length<3;return r(e,Ni(t,4),n,o,zr)},mr.repeat=function(e,t,n){return t=(n?Qi(e,t,n):t===i)?1:Rs(t),_o(Ys(e),t)},mr.replace=function(){var e=arguments,t=Ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},mr.result=function(e,t,n){var r=-1,o=(t=Qo(t,e)).length;for(o||(o=1,e=i);++rP)return[];var n=H,r=Vn(e,H);t=Ni(t),e-=H;for(var o=vn(r,t);++n=a)return e;var u=n-Cn(r);if(u<1)return r;var c=s?$o(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),Ms(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=nt(o.source,Ys(Be.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(Ho(o),u)!=u){var m=c.lastIndexOf(o);m>-1&&(c=c.slice(0,m))}return c+r},mr.unescape=function(e){return(e=Ys(e))&&xe.test(e)?e.replace(Le,qn):e},mr.uniqueId=function(e){var t=++dt;return Ys(e)+t},mr.upperCase=Lu,mr.upperFirst=_u,mr.each=Ya,mr.eachRight=Va,mr.first=ya,Pu(mr,(Xu={},Qr(mr,(function(e,t){lt.call(mr.prototype,t)||(Xu[t]=e)})),Xu),{chain:!1}),mr.VERSION="4.17.15",Qt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){mr[e].placeholder=mr})),Qt(["drop","take"],(function(e,t){gr.prototype[e]=function(n){n=n===i?1:Yn(Rs(n),0);var r=this.__filtered__&&!t?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,H),type:e+(r.__dir__<0?"Right":"")}),r},gr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Qt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||3==n;gr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ni(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Qt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");gr.prototype[e]=function(){return this[n](1).value()[0]}})),Qt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");gr.prototype[e]=function(){return this.__filtered__?new gr(this):this[n](1)}})),gr.prototype.compact=function(){return this.filter(Tu)},gr.prototype.find=function(e){return this.filter(e).head()},gr.prototype.findLast=function(e){return this.reverse().find(e)},gr.prototype.invokeMap=xo((function(e,t){return"function"==typeof e?new gr(this):this.map((function(n){return ro(n,e,t)}))})),gr.prototype.reject=function(e){return this.filter(us(Ni(e)))},gr.prototype.slice=function(e,t){e=Rs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new gr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=Rs(t))<0?n.dropRight(-t):n.take(t-e)),n)},gr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},gr.prototype.toArray=function(){return this.take(H)},Qr(gr.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=mr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(mr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof gr,c=s[0],l=u||gs(t),d=function(e){var t=o.apply(mr,en([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,m=!!this.__actions__.length,p=a&&!f,h=u&&!m;if(!a&&l){t=h?t:new gr(this);var v=e.apply(t,s);return v.__actions__.push({func:za,args:[d],thisArg:i}),new vr(v,f)}return p&&h?e.apply(this,s):(v=this.thru(d),p?r?v.value()[0]:v.value():v)})})),Qt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=it[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);mr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(gs(o)?o:[],e)}return this[n]((function(n){return t.apply(gs(n)?n:[],e)}))}})),Qr(gr.prototype,(function(e,t){var n=mr[t];if(n){var r=n.name+"";lt.call(or,r)||(or[r]=[]),or[r].push({name:t,func:n})}})),or[pi(i,b).name]=[{name:"wrapper",func:i}],gr.prototype.clone=function(){var e=new gr(this.__wrapped__);return e.__actions__=ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ri(this.__views__),e},gr.prototype.reverse=function(){if(this.__filtered__){var e=new gr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},gr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=gs(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},mr.prototype.plant=function(e){for(var t,n=this;n instanceof hr;){var r=fa(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},mr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof gr){var t=e;return this.__actions__.length&&(t=new gr(this)),(t=t.reverse()).__actions__.push({func:za,args:[Oa],thisArg:i}),new vr(t,this.__chain__)}return this.thru(Oa)},mr.prototype.toJSON=mr.prototype.valueOf=mr.prototype.value=function(){return Uo(this.__wrapped__,this.__actions__)},mr.prototype.first=mr.prototype.head,Dt&&(mr.prototype[Dt]=function(){return this}),mr}();qt._=Pn,(o=function(){return Pn}.call(t,n,t,r))===i||(r.exports=o)}).call(this)}).call(this,n(8),n(79)(e))},,,,function(e,t,n){e.exports={EPSILON:n(17),create:n(18),clone:n(46),angle:n(47),fromValues:n(19),copy:n(48),set:n(49),equals:n(50),exactEquals:n(51),add:n(52),subtract:n(22),sub:n(53),multiply:n(23),mul:n(54),divide:n(24),div:n(55),min:n(56),max:n(57),floor:n(58),ceil:n(59),round:n(60),scale:n(61),scaleAndAdd:n(62),distance:n(25),dist:n(63),squaredDistance:n(26),sqrDist:n(64),length:n(27),len:n(65),squaredLength:n(28),sqrLen:n(66),negate:n(67),inverse:n(68),normalize:n(20),dot:n(21),cross:n(69),lerp:n(70),random:n(71),transformMat4:n(72),transformMat3:n(73),transformQuat:n(74),rotateX:n(75),rotateY:n(76),rotateZ:n(77),forEach:n(78)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n(36),i=n.n(o);t.a=function(e){if("object"!==(typeof e).toLowerCase())return!1;var t=0,n=e.variants.length,o="A17_fonts_cookie_"+e.name,a=r.b.read(o)||"";function s(){if(++t>=n){r.b.create(o,n,1);var i="s-"+e.name+"-loaded",a=document.documentElement;a.classList.contains(i)||(a.classList.add(i),Object(r.s)(document,"content:populated"))}}if(a&&a===n.toString())t=a,s();else for(var u=0;u0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i);return e}},function(e,t){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},function(e,t){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],o=t[2]-e[2];return Math.sqrt(n*n+r*r+o*o)}},function(e,t){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],o=t[2]-e[2];return n*n+r*r+o*o}},function(e,t){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}},function(e,t){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}},,,,,,,function(e,t,n){var r,o,i;!function(n,a){"use strict";o=[],void 0===(i="function"==typeof(r=function(){var e={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal",window:window},t=["display:block","position:absolute","top:-999px","left:-999px","font-size:48px","width:auto","height:auto","line-height:normal","margin:0","padding:0","font-variant:normal","white-space:nowrap"],n='AxmTYklsjo190QW
',r=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return r.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},r.prototype.load=function(){var e,r=new Date,o=this,i=o.serif,a=o.sansSerif,s=o.parent,u=o.appended,c=o.options,l=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var f=n.replace(/\%s/,d("sans-serif")),m=n.replace(/\%s/,d("serif"));function p(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=o.parent=c.window.document.createElement("div")),s.innerHTML=f+m,a=o.sansSerif=s.firstChild,i=o.serif=a.nextSibling,c.glyphs&&(a.innerHTML+=c.glyphs,i.innerHTML+=c.glyphs),function t(){l||(l=c.window.document.body),!u&&l&&(l.appendChild(s),u=o.appended=!0,e=o.getMeasurements(),a.style.fontFamily=o.fontFamily+", sans-serif",i.style.fontFamily=o.fontFamily+", serif"),u&&e&&(p(e.sansSerif,a,c.tolerance)||p(e.serif,i,c.tolerance))?c.success():(new Date).getTime()-r.getTime()>c.timeout?c.error():!u&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},r.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},r.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},r.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},r.prototype.init=function(t,n){var r;for(var o in e)n.hasOwnProperty(o)||(n[o]=e[o]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(r=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(r)):this.load()},function(e,t){var n=new r;return n.init(e,t),n}})?r.apply(t,o):r)||(e.exports=i)}()},function(e,t,n){var r,o,i;
+!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/scripts/",i(i.s=866)}({157:function(e,t,i){"use strict";var n=i(2),o=i(187),r=i.n(o);t.a=function(e){if("object"!==(typeof e).toLowerCase())return!1;var t=0,i=e.variants.length,o="A17_fonts_cookie_"+e.name,s=n.b.read(o)||"";function a(){if(++t>=i){n.b.create(o,i,1);var r="s-"+e.name+"-loaded",s=document.documentElement;s.classList.contains(r)||(s.classList.add(r),Object(n.r)(document,"content:populated"))}}if(s&&s===i.toString())t=s,a();else for(var l=0;l=i.x&&t.x=i.y},getEvent:function(e){return $.getEvent=e?function(e){return e}:function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if("number"==typeof e.pageX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.pageX,t.y=e.pageY,t};else{if("number"!=typeof e.clientX)throw new Error("Unknown event mouse position, no known technique.");$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}}return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.pageXOffset)$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(t.scrollLeft||t.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!e.scrollLeft&&!e.scrollTop)return new $.Point(0,0);$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return $.getPageScroll()},setPageScroll:function(e){if(void 0!==window.scrollTo)$.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var t=$.getPageScroll();if(t.x===e.x&&t.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var i=$.getPageScroll();if(i.x!==t.x&&i.y!==t.y)return void($.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(i=$.getPageScroll()).x!==t.x&&i.y!==t.y)return void($.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});$.setPageScroll=function(e){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.innerWidth)$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!t.clientWidth&&!t.clientHeight)throw new Error("Unknown window size, no known technique.");$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)}}return $.getWindowSize()},makeCenteredNode:function(e){e=$.getElement(e);var t=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(t[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(t[1].style,{display:"table-row"}),$.extend(t[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),t[0].appendChild(t[1]),t[1].appendChild(t[2]),t[2].appendChild(e),t[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return(new Date).getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(e){var t=$.makeNeutralElement("img");return t.src=e,t},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(e){var t=$.makeNeutralElement("img"),i=null;return(i=$.makeNeutralElement("span")).style.display="inline-block",t.onload=function(){i.style.width=i.style.width||t.width+"px",i.style.height=i.style.height||t.height+"px",t.onload=null,t=null},t.src=e,i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')",i}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,i){var n;e=$.getElement(e),i&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(n="alpha(opacity="+Math.round(100*t)+")",e.style.filter=n):e.style.filter=""},setElementTouchActionNone:function(e){void 0!==(e=$.getElement(e)).style.touchAction?e.style.touchAction="none":void 0!==e.style.msTouchAction&&(e.style.msTouchAction="none")},addClass:function(e,t){(e=$.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(e,t,i){return e.indexOf(t,i)}:this.indexOf=function(e,t,i){var n,o,r=i||0;if(!e)throw new TypeError;if(0===(o=e.length)||r>=o)return-1;for(r<0&&(r=o-Math.abs(r)),n=r;n=200&&a.status<300||0===a.status&&"http:"!==s&&"https:"!==s?t(a):($.console.log("AJAX request returned %d: %s",a.status,e),$.isFunction(i)&&i(a)))};try{if(a.open("GET",e,!0),r&&(a.responseType=r),o)for(var l in o)o.hasOwnProperty(l)&&o[l]&&a.setRequestHeader(l,o[l]);n&&(a.withCredentials=!0),a.send(null)}catch(n){var c=n.message;if($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10&&void 0!==n.number&&-2147024891==n.number&&(c+="\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"),$.console.log("%s while making AJAX request: %s",n.name,c),a.onreadystatechange=function(){},window.XDomainRequest){var u=new XDomainRequest;if(u){u.onload=function(e){$.isFunction(t)&&t({responseText:u.responseText,status:200,statusText:"OK"})},u.onerror=function(e){$.isFunction(i)&&i({responseText:u.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{u.open("GET",e),u.send()}catch(e){$.isFunction(i)&&i(a,n)}}}else $.isFunction(i)&&i(a,n)}return a},jsonp:function(e){var t,i=e.url,n=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=e.callbackName||"openseadragon"+$.now(),r=window[o],s="$1"+o+"$2",a=e.param||"callback",l=e.callback;i=i.replace(/(\=)\?(&|$)|\?\?/i,s),i+=(/\?/.test(i)?"&":"?")+a+"="+o,window[o]=function(e){if(r)window[o]=r;else try{delete window[o]}catch(e){}l&&$.isFunction(l)&&l(e)},t=document.createElement("script"),void 0===e.async&&!1===e.async||(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=i,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,n&&t.parentNode&&n.removeChild(t),t=void 0)},n.insertBefore(t,n.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");$.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}return $.parseXml(e)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(e){return!!FILEFORMATS[(e=e||"").toLowerCase()]}}),$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};!function(){var e=navigator.appVersion,t=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(t.substring(t.indexOf("MSIE")+5,t.indexOf(";",t.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(t.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(t.substring(t.indexOf("Firefox")+8))):t.indexOf("Safari")>=0?($.Browser.vendor=t.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(t.substring(t.substring(0,t.indexOf("Safari")).lastIndexOf("/")+1,t.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e)}var i,n,o,r=window.location.search.substring(1).split("&");for(o=0;o0&&(URLPARAMS[i.substring(0,n)]=decodeURIComponent(i.substring(n+1)));$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)}();var nullfunction=function(e){};function getOffsetParent(e,t){return t&&e!=document.body?document.body:e.offsetParent}$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,i=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&i)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return i.apply(e,arguments)};else{var n,o=[],r=[],s=0;$.requestAnimationFrame=function(e){return o.push([++s,e]),n||(n=setInterval((function(){if(o.length){var e=$.now(),t=r;for(r=o,o=t;r.length;)r.shift()[1](e)}else clearInterval(n),n=void 0}),20)),s},$.cancelAnimationFrame=function(e){var t,i;for(t=0,i=o.length;t0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",n.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",n.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",n.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",n.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",n.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",n.touchendcaptured,!0),n.activePointersLists[i].captureCount=0);for(i=0;i0){for(n=0;n0&&(fe(e,t,r,0),i.captureCount=1,m(e,i.type),pe(e,t,r))}}function V(t,i){var n,o,r,s,l=i.changedTouches.length,c=[],u=t.getActivePointersListByType("touch");for(n=e.now(),u.getLength()>i.touches.length-l&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),U(t,i,u)),o=0;o8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=(s=document.createElement("div"),e.isFunction(s.setCapture)&&e.isFunction(s.releaseCapture)),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],"DOMMouseScroll"==e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||e.Browser.vendor!==e.BROWSERS.IE)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),e.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):(e.MouseTracker.havePointerEvents=!1,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?(e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),e.MouseTracker.haveMouseEnter=!0):(e.MouseTracker.subscribeEvents.push("mouseover","mouseout"),e.MouseTracker.haveMouseEnter=!1),e.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.maxTouchPoints=10),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,i=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};var ye=function(){try{return window.self!==window.top}catch(e){return!0}}();function we(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}}(OpenSeadragon),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,i,n){var o=t.parentNode;"number"==typeof i&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),i={anchor:i}),i.attachToViewer=void 0===i.attachToViewer||i.attachToViewer,this.autoFade=void 0===i.autoFade||i.autoFade,this.element=t,this.anchor=i.anchor,this.container=n,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof i.top?i.top+"px":i.top,this.wrapper.style.left="number"==typeof i.left?i.left+"px":i.left,this.wrapper.style.height="number"==typeof i.height?i.height+"px":i.height,this.wrapper.style.width="number"==typeof i.width?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor==e.ControlAnchor.TOP_RIGHT||this.anchor==e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):o.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!=this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor==e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor==e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(OpenSeadragon),function(e){function t(e,t){var i,n=e.controls;for(i=n.length-1;i>=0;i--)if(n[i].element==t)return i;return-1}e.ControlDock=function(t){var i,n,o=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),n=0;n=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:o=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:o=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:o=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:o=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:o=this.container,i.style.margin="0px",i.style.padding="0px";break;default:case e.ControlAnchor.NONE:o=this.container,i.style.margin="0px",i.style.padding="0px"}this.controls.push(new e.Control(i,n,o)),i.style.display="inline-block"}},removeControl:function(i){var n=t(this,i=e.getElement(i));return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(OpenSeadragon),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(e){var t={},i=1;function n(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function o(t,i){if(i instanceof e.Overlay)return i;var n=null;if(i.element)n=e.getElement(i.element);else{var o=i.id?i.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(n=e.getElement(i.id))||((n=document.createElement("a")).href="#/overlay/"+o),n.id=o,e.addClass(n,i.className?i.className:"openseadragon-overlay")}var r=i.location,s=i.width,a=i.height;if(!r){var l=i.x,c=i.y;if(void 0!==i.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(i.px,i.py,s||0,a||0));l=u.x,c=u.y,s=void 0!==s?u.width:void 0,a=void 0!==a?u.height:void 0}r=new e.Point(l,c)}var d=i.placement;return d&&"string"===e.type(d)&&(d=e.Placement[i.placement.toUpperCase()]),new e.Overlay({element:n,location:r,placement:d,onDraw:i.onDraw,checkResize:i.checkResize,width:s,height:a,rotationMode:i.rotationMode})}function r(e,t){var i;for(i=e.length-1;i>=0;i--)if(e[i].element===t)return i;return-1}function s(t,i){return e.requestAnimationFrame((function(){i(t)}))}function a(t){e.requestAnimationFrame((function(){!function(t){var i,n,o,r;if(t.controlsShouldFade){for(i=e.now(),n=i-t.controlsFadeBeginTime,o=1-n/t.controlsFadeLength,o=Math.min(1,o),o=Math.max(0,o),r=t.controls.length-1;r>=0;r--)t.controls[r].autoFade&&t.controls[r].setOpacity(o);o>0&&a(t)}}(t)}))}function l(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){a(t)}),t.controlsFadeDelay))}function c(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function u(){c(this)}function d(){l(this)}function h(t){if(t.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 38:return t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints(),!1;case 40:return t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints(),!1;case 37:return this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints(),!1;case 39:return this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints(),!1;default:return!0}}function m(t){if(t.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints(),!1;case 115:case 83:return t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints(),!1;case 97:return this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints(),!1;case 100:return this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints(),!1;default:return!0}}function p(e){document.activeElement==this.canvas||this.canvas.focus();var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-click",t),!t.preventDefaultAction&&this.viewport&&e.quick&&this.gestureSettingsByDeviceType(e.pointerType).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,this.viewport.pointFromPixel(e.position,!0)),this.viewport.applyConstraints())}function g(e){!e.preventDefaultAction&&this.viewport&&this.gestureSettingsByDeviceType(e.pointerType).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,this.viewport.pointFromPixel(e.position,!0)),this.viewport.applyConstraints()),this.raiseEvent("canvas-double-click",{tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent})}function f(e){var t,i={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.raiseEvent("canvas-drag",i),!i.preventDefaultAction&&this.viewport){if(t=this.gestureSettingsByDeviceType(e.pointerType),this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.constrainDuringPan){var n=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=n.x,this.viewport.centerSpringY.target.value+=n.y;var o=this.viewport.getBounds(),r=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=n.x,this.viewport.centerSpringY.target.value-=n.y,o.x!=r.x&&(e.delta.x=0),o.y!=r.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function v(t){if(!t.preventDefaultAction&&this.viewport){var i=this.gestureSettingsByDeviceType(t.pointerType);if(i.flickEnabled&&t.speed>=i.flickMinSpeed){var n=0;this.panHorizontal&&(n=i.flickMomentum*t.speed*Math.cos(t.direction));var o=0;this.panVertical&&(o=i.flickMomentum*t.speed*Math.sin(t.direction));var r=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),s=this.viewport.pointFromPixel(new e.Point(r.x-n,r.y-o));this.viewport.panTo(s,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:t.eventSource,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent})}function y(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function w(t){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function b(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function S(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function T(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function x(e){var t,i,n;if(!e.preventDefaultAction&&this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(i=this.viewport.pointFromPixel(e.center,!0),n=this.viewport.pointFromPixel(e.lastCenter,!0).minus(i),this.panHorizontal||(n.x=0),this.panVertical||(n.y=0),this.viewport.zoomBy(e.distance/e.lastDistance,i,!0),this.viewport.panBy(n,!0),this.viewport.applyConstraints()),t.pinchRotate)){var o=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),r=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(o-r)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:e.eventSource,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent}),!1}function L(t){var i,n,o;if((o=e.now())-this._lastScrollTime>this.minScrollDeltaTime){if(this._lastScrollTime=o,!t.preventDefaultAction&&this.viewport&&(i=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(n=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(n,this.viewport.pointFromPixel(t.position,!0)),this.viewport.applyConstraints()),this.raiseEvent("canvas-scroll",{tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent}),i&&i.scrollToZoom)return!1}else if((i=this.gestureSettingsByDeviceType(t.pointerType))&&i.scrollToZoom)return!1}function P(e){t[this.hash].mouseInside=!0,c(this),this.raiseEvent("container-enter",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function O(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||l(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function _(e){!function(e){if(e._opening)return;if(e.autoResize){var i=n(e.container),o=t[e.hash].prevContainerSize;if(!i.equals(o)){var r=e.viewport;if(e.preserveImageSizeOnResize){var s=o.x/i.x,a=r.getZoom()*s,u=r.getCenter();r.resize(i,!1),r.zoomTo(a,null,!0),r.panTo(u,!0)}else{var d=r.getBounds();r.resize(i,!0),r.fitBoundsWithConstraints(d,!0)}t[e.hash].prevContainerSize=i,t[e.hash].forceRedraw=!0}}var h=e.viewport.update(),m=e.world.update()||h;h&&e.raiseEvent("viewport-change");e.referenceStrip&&(m=e.referenceStrip.update(e.viewport)||m);!t[e.hash].animating&&m&&(e.raiseEvent("animation-start"),c(e));(m||t[e.hash].forceRedraw||e.world.needsDraw())&&(!function(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,m&&e.raiseEvent("animation"));t[e.hash].animating&&!m&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||l(e));t[e.hash].animating=m}(e),e.isOpen()?e._updateRequestId=s(e,_):e._updateRequestId=!1}function C(e,t){return e?e+t:t}function A(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,I(this)}function R(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,I(this)}function k(){t[this.hash].zooming=!1}function I(t){e.requestAnimationFrame(e.delegate(t,M))}function M(){var i,n,o;t[this.hash].zooming&&this.viewport&&(n=(i=e.now())-t[this.hash].lastZoomTime,o=Math.pow(t[this.hash].zoomFactor,n/1e3),this.viewport.zoomBy(o),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=i,I(this))}function D(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function H(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function B(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function j(){this.viewport&&this.viewport.goHome()}function F(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function z(){if(this.viewport){var e=this.viewport.getRotation();0===e?e=270:e-=90,this.viewport.setRotation(e)}}function N(){if(this.viewport){var e=this.viewport.getRotation();270===e?e=0:e+=90,this.viewport.setRotation(e)}}function q(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)}function W(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}e.Viewer=function(o){var r,a,c=arguments,u=this;if(e.isPlainObject(o)||(o={id:c[0],xmlPath:c.length>1?c[1]:void 0,prefixUrl:c.length>2?c[2]:void 0,controls:c.length>3?c[3]:void 0,overlays:c.length>4?c[4]:void 0}),o.config&&(e.extend(!0,o,o.config),delete o.config),e.extend(!0,this,{id:o.id,hash:o.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,o),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var i=e.getString("Errors.OpenFailed",t.eventSource,t.message);u._showMessage(i)})),e.ControlDock.call(this,o),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(a=this.canvas.style).width="100%",a.height="100%",a.overflow="hidden",a.position="absolute",a.top="0px",a.left="0px",e.setElementTouchActionNone(this.canvas),""!==o.tabIndex&&(this.canvas.tabIndex=void 0===o.tabIndex?0:o.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:e.delegate(this,h),keyHandler:e.delegate(this,m),clickHandler:e.delegate(this,p),dblClickHandler:e.delegate(this,g),dragHandler:e.delegate(this,f),dragEndHandler:e.delegate(this,v),enterHandler:e.delegate(this,y),exitHandler:e.delegate(this,w),pressHandler:e.delegate(this,b),releaseHandler:e.delegate(this,S),nonPrimaryPressHandler:e.delegate(this,T),nonPrimaryReleaseHandler:e.delegate(this,E),scrollHandler:e.delegate(this,L),pinchHandler:e.delegate(this,x)}),this.outerTracker=new e.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,P),exitHandler:e.delegate(this,O)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){u.source=u.world.getItemAt(0).source,t[u.hash].forceRedraw=!0,u._updateRequestId||(u._updateRequestId=s(u,_))})),this.world.addHandler("remove-item",(function(e){u.world.getItemCount()?u.source=u.world.getItemAt(0).source:u.source=null,t[u.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){u.viewport&&u.viewport._setContentBounds(u.world.getHomeBounds(),u.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){u.source=u.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:o.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(r=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(r,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(r=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(r,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),r=0;r-1&&t.index\s*$/))i=e.parseXml(i);else if(i.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var a=e.parseJSON(i);i=a}catch(e){}function l(e,t){e.ready?o(e):(e.addHandler("ready",(function(){o(e)})),e.addHandler("open-failed",(function(e){r({message:e.message,source:t})})))}setTimeout((function(){if("string"==e.type(i))(i=new e.TileSource({url:i,crossOriginPolicy:void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){o(e.tileSource)}})).addHandler("open-failed",(function(e){r(e)}));else if(e.isPlainObject(i)||i.nodeType)if(void 0!==i.crossOriginPolicy||void 0===n.crossOriginPolicy&&void 0===t.crossOriginPolicy||(i.crossOriginPolicy=void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy),void 0===i.ajaxWithCredentials&&(i.ajaxWithCredentials=t.ajaxWithCredentials),void 0===i.useCanvas&&(i.useCanvas=t.useCanvas),e.isFunction(i.getTileUrl)){var a=new e.TileSource(i);a.getTileUrl=i.getTileUrl,o(a)}else{var c=e.TileSource.determineType(s,i);if(!c)return void r({message:"Unable to load TileSource",source:i});var u=c.prototype.configure.apply(s,[i]);l(new c(u),i)}else l(i,i)}))}(this,t.tileSource,t,(function(e){n.tileSource=e,s()}),(function(e){e.options=t,o(e),s()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var i=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete i.url,this.addTiledImage(i)},addLayer:function(t){var i=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var n=e.extend({},t,{success:function(e){i.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){i.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(n),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,i){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,i)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var t=e.delegate(this,u),i=e.delegate(this,d),n=e.delegate(this,W),o=e.delegate(this,q),r=this.navImages,s=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(s=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:C(this.prefixUrl,r.previous.REST),srcGroup:C(this.prefixUrl,r.previous.GROUP),srcHover:C(this.prefixUrl,r.previous.HOVER),srcDown:C(this.prefixUrl,r.previous.DOWN),onRelease:o,onFocus:t,onBlur:i}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:C(this.prefixUrl,r.next.REST),srcGroup:C(this.prefixUrl,r.next.GROUP),srcHover:C(this.prefixUrl,r.next.HOVER),srcDown:C(this.prefixUrl,r.next.DOWN),onRelease:n,onFocus:t,onBlur:i}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),s&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,A),i=e.delegate(this,k),n=e.delegate(this,D),o=e.delegate(this,R),r=e.delegate(this,H),s=e.delegate(this,j),a=e.delegate(this,F),l=e.delegate(this,z),c=e.delegate(this,N),h=e.delegate(this,u),m=e.delegate(this,d),p=this.navImages,g=[],f=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton)&&(f=!1),this.showZoomControl&&(g.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:C(this.prefixUrl,p.zoomIn.REST),srcGroup:C(this.prefixUrl,p.zoomIn.GROUP),srcHover:C(this.prefixUrl,p.zoomIn.HOVER),srcDown:C(this.prefixUrl,p.zoomIn.DOWN),onPress:t,onRelease:i,onClick:n,onEnter:t,onExit:i,onFocus:h,onBlur:m})),g.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:C(this.prefixUrl,p.zoomOut.REST),srcGroup:C(this.prefixUrl,p.zoomOut.GROUP),srcHover:C(this.prefixUrl,p.zoomOut.HOVER),srcDown:C(this.prefixUrl,p.zoomOut.DOWN),onPress:o,onRelease:i,onClick:r,onEnter:o,onExit:i,onFocus:h,onBlur:m}))),this.showHomeControl&&g.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:C(this.prefixUrl,p.home.REST),srcGroup:C(this.prefixUrl,p.home.GROUP),srcHover:C(this.prefixUrl,p.home.HOVER),srcDown:C(this.prefixUrl,p.home.DOWN),onRelease:s,onFocus:h,onBlur:m})),this.showFullPageControl&&g.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:C(this.prefixUrl,p.fullpage.REST),srcGroup:C(this.prefixUrl,p.fullpage.GROUP),srcHover:C(this.prefixUrl,p.fullpage.HOVER),srcDown:C(this.prefixUrl,p.fullpage.DOWN),onRelease:a,onFocus:h,onBlur:m})),this.showRotationControl&&(g.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:C(this.prefixUrl,p.rotateleft.REST),srcGroup:C(this.prefixUrl,p.rotateleft.GROUP),srcHover:C(this.prefixUrl,p.rotateleft.HOVER),srcDown:C(this.prefixUrl,p.rotateleft.DOWN),onRelease:l,onFocus:h,onBlur:m})),g.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:C(this.prefixUrl,p.rotateright.REST),srcGroup:C(this.prefixUrl,p.rotateright.GROUP),srcHover:C(this.prefixUrl,p.rotateright.HOVER),srcDown:C(this.prefixUrl,p.rotateright.DOWN),onRelease:c,onFocus:h,onBlur:m}))),f&&(this.buttons=new e.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttons.element,this.addHandler("open",e.delegate(this,B)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e=0)return this;var l=o(this,a);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:a.location,placement:a.placement}),this},updateOverlay:function(i,n,o){var s;return i=e.getElement(i),(s=r(this.currentOverlays,i))>=0&&(this.currentOverlays[s].update(n,o),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:i,location:n,placement:o})),this},removeOverlay:function(i){var n;return i=e.getElement(i),(n=r(this.currentOverlays,i))>=0&&(this.currentOverlays[n].destroy(),this.currentOverlays.splice(n,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:i})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var i;return t=e.getElement(t),(i=r(this.currentOverlays,t))>=0?this.currentOverlays[i]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var i=e.makeNeutralElement("div");i.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(i),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}})}(OpenSeadragon),function(e){function t(e){e.quick&&this.viewer.viewport&&(this.viewer.viewport.panTo(this.viewport.pointFromPixel(e.position)),this.viewer.viewport.applyConstraints())}function i(e){this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function n(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function o(e){return this.viewer.raiseEvent("navigator-scroll",{tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent}),!1}function r(e,t){e.style.webkitTransform="rotate("+t+"deg)",e.style.mozTransform="rotate("+t+"deg)",e.style.msTransform="rotate("+t+"deg)",e.style.oTransform="rotate("+t+"deg)",e.style.transform="rotate("+t+"deg)"}e.Navigator=function(s){var a,l,c,u,d=s.viewer,h=this;function m(e){r(h.displayRegionContainer,e),r(h.displayRegion,-e),h.viewport.setRotation(e)}(s.id?(this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&("BOTTOM_RIGHT"==s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"==s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"==s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"==s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"==s.position&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",(s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:s.autoResize,minZoomImageRatio:1})).minPixelRatio=this.minPixelRatio=d.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),s.controlOptions.anchor!=e.ControlAnchor.NONE&&(c=this.element.style,u=this.borderWidth,c.margin="0px",c.border=u+"px solid #555",c.padding="0px",c.background="#000",c.opacity=.8,c.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid #900",e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",d.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!=e.ControlAnchor.NONE,this._resizeWithViewer&&(s.width&&s.height?(this.element.style.height="number"==typeof s.height?s.height+"px":s.height,this.element.style.width="number"==typeof s.width?s.width+"px":s.width):(a=e.getElementSize(d.element),this.element.style.height=Math.round(a.y*s.sizeRatio)+"px",this.element.style.width=Math.round(a.x*s.sizeRatio)+"px",this.oldViewerSize=a),l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),s.navigatorRotate)&&(m(s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0),s.viewer.addHandler("rotate",(function(e){m(e.degrees)})));this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,o)}),this.addHandler("reset-size",(function(){h.viewport&&h.viewport.goHome(!0)})),d.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=h.world.getItemAt(e.previousIndex);h.world.setItemIndex(t,e.newIndex)}),1)})),d.world.addHandler("remove-item",(function(e){var t=e.item,i=h._getMatchingItem(t);i&&h.world.removeItem(i)})),this.update(d.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},update:function(t){var i,n,o,r,s,a;if(i=e.getElementSize(this.viewer.element),this._resizeWithViewer&&i.x&&i.y&&!i.equals(this.oldViewerSize)&&(this.oldViewerSize=i,this.maintainSizeRatio||!this.elementArea?(n=i.x*this.sizeRatio,o=i.y*this.sizeRatio):(n=Math.sqrt(this.elementArea*(i.x/i.y)),o=this.elementArea/n),this.element.style.width=Math.round(n)+"px",this.element.style.height=Math.round(o)+"px",this.elementArea||(this.elementArea=n*o),this.updateSize()),t&&this.viewport){r=t.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(r.getTopLeft(),!1),a=this.viewport.pixelFromPointNoRotate(r.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(s.y)+"px",l.left=Math.round(s.x)+"px";var c=Math.abs(s.x-a.x),u=Math.abs(s.y-a.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var i=this,n=t.originalTiledImage;delete t.original;var o=e.extend({},t,{success:function(e){var t=e.item;function o(){i._matchBounds(t,n)}t._originalForNavigator=n,i._matchBounds(t,n,!0),n.addHandler("bounds-change",o),n.addHandler("clip-change",o),n.addHandler("opacity-change",(function(){i._matchOpacity(t,n)})),n.addHandler("composite-operation-change",(function(){i._matchCompositeOperation(t,n)}))}});return e.Viewer.prototype.addTiledImage.apply(this,[o])},_getMatchingItem:function(e){for(var t,i=this.world.getItemCount(),n=0;n1||t.y>1);e++);return e-1},getTileAtPoint:function(t,i){var n=i.x>=0&&i.x<=1&&i.y>=0&&i.y<=1/this.aspectRatio;e.console.assert(n,"[TileSource.getTileAtPoint] must be called with a valid point.");var o=this.dimensions.x*this.getLevelScale(t),r=i.x*o,s=i.y*o,a=Math.floor(r/this.getTileWidth(t)),l=Math.floor(s/this.getTileHeight(t));i.x>=1&&(a=this.getNumTiles(t).x-1);return i.y>=1/this.aspectRatio-1e-16&&(l=this.getNumTiles(t).y-1),new e.Point(a,l)},getTileBounds:function(t,i,n){var o=this.dimensions.times(this.getLevelScale(t)),r=this.getTileWidth(t),s=this.getTileHeight(t),a=0===i?0:r*i-this.tileOverlap,l=0===n?0:s*n-this.tileOverlap,c=r+(0===i?1:2)*this.tileOverlap,u=s+(0===n?1:2)*this.tileOverlap,d=1/o.x;return c=Math.min(c,o.x-a),u=Math.min(u,o.y-l),new e.Rect(a*d,l*d,c*d,u*d)},getImageInfo:function(t){var i,n,o,r,s,a,l,c=this;t&&(l=(a=(s=t.split("/"))[s.length-1]).lastIndexOf("."))>-1&&(s[s.length-1]=a.slice(0,l)),n=function(i){"string"==typeof i&&(i=e.parseXml(i));var n=e.TileSource.determineType(c,i,t);n?(void 0===(r=n.prototype.configure.apply(c,[i,t])).ajaxWithCredentials&&(r.ajaxWithCredentials=c.ajaxWithCredentials),o=new n(r),c.ready=!0,c.raiseEvent("ready",{tileSource:o})):c.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(i=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:i,callback:n})):e.makeAjaxRequest({url:t,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(t){var i=function(t){var i,n,o=t.responseText,r=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw r=t.status,i=404==r?"Not Found":t.statusText,new Error(e.getString("Errors.Status",r,i));if(o.match(/\s*<.*/))try{n=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(o)}catch(e){n=t.responseText}else if(o.match(/\s*[\{\[].*/))try{n=e.parseJSON(o)}catch(e){n=o}else n=o;return n}(t);n(i)},error:function(e,i){var n;try{n="HTTP "+e.status+" attempting to load TileSource"}catch(e){n=(void 0!==i&&i.toString?i.toString():"Unknown error")+" attempting to load TileSource"}c.raiseEvent("open-failed",{message:n,source:t})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,i){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,i){return{}},tileExists:function(e,t,i){var n=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&i>=0&&t=0;u--)for(h=(d=this.displayRects[u]).minLevel;h<=d.maxLevel;h++)this._levelRects[h]||(this._levelRects[h]=[]),this._levelRects[h].push(d);e.TileSource.apply(this,[m])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var i;return e.Image?i=e.Image.xmlns:e.documentElement&&("Image"!=e.documentElement.localName&&"Image"!=e.documentElement.tagName||(i=e.documentElement.namespaceURI)),-1!==(i=(i||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==i.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(i,n){var o;return o=e.isPlainObject(i)?t(this,i):function(i,n){if(!n||!n.documentElement)throw new Error(e.getString("Errors.Xml"));var o,r,s,a,l,c=n.documentElement,u=c.localName||c.tagName,d=n.documentElement.namespaceURI,h=null,m=[];if("Image"==u)try{if(void 0===(a=c.getElementsByTagName("Size")[0])&&(a=c.getElementsByTagNameNS(d,"Size")[0]),h={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:c.getAttribute("Url"),Format:c.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(c.getAttribute("Overlap"),10),TileSize:parseInt(c.getAttribute("TileSize"),10),Size:{Height:parseInt(a.getAttribute("Height"),10),Width:parseInt(a.getAttribute("Width"),10)}}},!e.imageFormatSupported(h.Image.Format))throw new Error(e.getString("Errors.ImageFormat",h.Image.Format.toUpperCase()));for(void 0===(o=c.getElementsByTagName("DisplayRect"))&&(o=c.getElementsByTagNameNS(d,"DisplayRect")[0]),l=0;l=0;c--)if(!(e<(n=u[c]).minLevel||e>n.maxLevel)&&(o=this.getLevelScale(e),r=n.x*o,s=n.y*o,a=r+n.width*o,l=s+n.height*o,r=Math.floor(r/this._tileWidth),s=Math.floor(s/this._tileWidth),a=Math.ceil(a/this._tileWidth),l=Math.ceil(l/this._tileWidth),r<=t&&t0?t.tileSize=Math.max.apply(null,a):t.tileSize=r}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,t.levels=function(e){for(var t=[],i=0;i0&&t>=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,i){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,i)},getTileUrl:function(e,t,i){if(this.emulateLegacyImagePyramid){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}var o,r,s,a,l,c,u,d,h,m,p,g=Math.pow(.5,this.maxLevel-e),f=Math.ceil(this.width*g),v=Math.ceil(this.height*g);return o=this.getTileWidth(e),r=this.getTileHeight(e),s=Math.ceil(o/g),a=Math.ceil(r/g),p=this["@context"].indexOf("/1.0/context.json")>-1||this["@context"].indexOf("/1.1/context.json")>-1||this["@context"].indexOf("/1/context.json")>-1?"native.jpg":"default.jpg",fc?l/256:c/256,s.maxLevel=Math.ceil(Math.log(a)/Math.log(2))-1,s.tileSize=256,s.width=l,s.height=c,e.TileSource.apply(this,[s])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,i){var n=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(n-i)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(e){e.tileSize=256;var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,i){return{x:Math.ceil(e/i),y:Math.ceil(t/i)}},_calculateAbsoluteTileNumber:function(e,t,i){for(var n=0,o={},r=0;r");return o.sort((function(e,t){return e.height-t.height}))}(i.levels),i.levels.length>0?(n=i.levels[i.levels.length-1].width,o=i.levels[i.levels.length-1].height):(n=0,o=0,e.console.error("No supported image formats found")),e.extend(!0,i,{width:n,height:o,tileSize:Math.max(o,n),tileOverlap:0,minLevel:0,maxLevel:i.levels.length>0?i.levels.length-1:0}),e.TileSource.apply(this,[i]),this.levels=i.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"==e.type||e.documentElement&&"legacy-image-pyramid"==e.documentElement.getAttribute("type")},configure:function(i,n){return e.isPlainObject(i)?t(this,i):function(i,n){if(!n||!n.documentElement)throw new Error(e.getString("Errors.Xml"));var o,r,s=n.documentElement,a=s.tagName,l=null,c=[];if("image"==a)try{for(l={type:s.getAttribute("type"),levels:[]},c=s.getElementsByTagName("level"),r=0;r0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}})}(OpenSeadragon),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var i=this._image=new Image,n=this;this.crossOriginPolicy&&(i.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(i.useCredentials=this.ajaxWithCredentials),e.addEvent(i,"load",(function(){n.width=Object.prototype.hasOwnProperty.call(i,"naturalWidth")?i.naturalWidth:i.width,n.height=Object.prototype.hasOwnProperty.call(i,"naturalHeight")?i.naturalHeight:i.height,n.aspectRatio=n.width/n.height,n.dimensions=new e.Point(n.width,n.height),n._tileWidth=n.width,n._tileHeight=n.height,n.tileOverlap=0,n.minLevel=0,n.levels=n._buildLevels(),n.maxLevel=n.levels.length-1,n.ready=!0,n.raiseEvent("ready",{tileSource:n})})),e.addEvent(i,"error",(function(){n.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),i.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n},getContext2D:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].context2D),n},_buildLevels:function(){var t=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var i=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,n=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,o=document.createElement("canvas"),r=o.getContext("2d");if(o.width=i,o.height=n,r.drawImage(this._image,0,0,i,n),t[0].context2D=r,delete this._image,e.isCanvasTainted(o))return t;for(;i>=2&&n>=2;){i=Math.floor(i/2),n=Math.floor(n/2);var s=document.createElement("canvas"),a=s.getContext("2d");s.width=i,s.height=n,a.drawImage(o,0,0,i,n),t.splice(0,0,{context2D:a,width:i,height:n}),o=s,r=a}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,i,n,o){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){function t(i){e.requestAnimationFrame((function(){!function(i){var n,o,r;i.shouldFade&&(n=e.now(),o=n-i.fadeBeginTime,r=1-o/i.fadeLength,r=Math.min(1,r),r=Math.max(0,r),i.imgGroup&&e.setElementOpacity(i.imgGroup,r,!0),r>0&&t(i))}(i)}))}function i(t,i){t.element.disabled||(i>=e.ButtonState.GROUP&&t.currentState==e.ButtonState.REST&&(!function(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}(t),t.currentState=e.ButtonState.GROUP),i>=e.ButtonState.HOVER&&t.currentState==e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),i>=e.ButtonState.DOWN&&t.currentState==e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function n(i,n){i.element.disabled||(n<=e.ButtonState.HOVER&&i.currentState==e.ButtonState.DOWN&&(i.imgDown&&(i.imgDown.style.visibility="hidden"),i.currentState=e.ButtonState.HOVER),n<=e.ButtonState.GROUP&&i.currentState==e.ButtonState.HOVER&&(i.imgHover&&(i.imgHover.style.visibility="hidden"),i.currentState=e.ButtonState.GROUP),n<=e.ButtonState.REST&&i.currentState==e.ButtonState.GROUP&&(!function(i){i.shouldFade=!0,i.fadeBeginTime=e.now()+i.fadeDelay,window.setTimeout((function(){t(i)}),i.fadeDelay)}(i),i.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var o=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor==e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(i(o,e.ButtonState.DOWN),o.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||i(o,e.ButtonState.HOVER)},focusHandler:function(e){this.enterHandler(e),o.raiseEvent("focus",{originalEvent:e.originalEvent})},exitHandler:function(t){n(o,e.ButtonState.GROUP),t.insideElementPressed&&o.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){this.exitHandler(e),o.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){i(o,e.ButtonState.DOWN),o.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(n(o,e.ButtonState.HOVER),o.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?n(o,e.ButtonState.GROUP):i(o,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&o.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){return 13!==e.keyCode||(o.raiseEvent("click",{originalEvent:e.originalEvent}),o.raiseEvent("release",{originalEvent:e.originalEvent}),!1)}}),n(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){i(this,e.ButtonState.GROUP)},notifyGroupExit:function(){n(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}})}(OpenSeadragon),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var i,n=this.buttons.concat([]),o=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.label=e.makeNeutralElement("label"),this.element.style.display="inline-block",this.element.appendChild(this.label),i=0;i=270?(s=this.getTopRight(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=270):this.degrees>=180?(s=this.getBottomRight(),this.x=s.x,this.y=s.y,this.degrees-=180):this.degrees>=90&&(s=this.getBottomLeft(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=90)},e.Rect.fromSummits=function(t,i,n){var o=t.distanceTo(i),r=t.distanceTo(n),s=i.minus(t),a=Math.atan(s.y/s.x);return s.x<0?a+=Math.PI:s.y<0&&(a+=2*Math.PI),new e.Rect(t.x,t.y,o,r,a/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var i=this.getBoundingBox(),n=t.getBoundingBox(),o=Math.min(i.x,n.x),r=Math.min(i.y,n.y),s=Math.max(i.x+i.width,n.x+n.width),a=Math.max(i.y+i.height,n.y+n.height);return new e.Rect(o,r,s-o,a-r)},intersection:function(t){var i=1e-10,n=[],o=this.getTopLeft();t.containsPoint(o,i)&&n.push(o);var r=this.getTopRight();t.containsPoint(r,i)&&n.push(r);var s=this.getBottomLeft();t.containsPoint(s,i)&&n.push(s);var a=this.getBottomRight();t.containsPoint(a,i)&&n.push(a);var l=t.getTopLeft();this.containsPoint(l,i)&&n.push(l);var c=t.getTopRight();this.containsPoint(c,i)&&n.push(c);var u=t.getBottomLeft();this.containsPoint(u,i)&&n.push(u);var d=t.getBottomRight();this.containsPoint(d,i)&&n.push(d);for(var h=this._getSegments(),m=t._getSegments(),p=0;pS&&(S=L.x),L.yE&&(E=L.y)}return new e.Rect(b,T,S-b,E-T)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight();return[[e,t],[t,n],[n,i],[i,e]]},rotate:function(t,i){if(0===(t=e.positiveModulo(t,360)))return this.clone();i=i||this.getCenter();var n=this.getTopLeft().rotate(t,i),o=this.getTopRight().rotate(t,i).minus(n);o=o.apply((function(e){return Math.abs(e)<1e-15?0:e}));var r=Math.atan(o.y/o.x);return o.x<0?r+=Math.PI:o.y<0&&(r+=2*Math.PI),new e.Rect(n.x,n.y,this.width,this.height,r/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),i=this.getTopRight(),n=this.getBottomLeft(),o=this.getBottomRight(),r=Math.min(t.x,i.x,n.x,o.x),s=Math.max(t.x,i.x,n.x,o.x),a=Math.min(t.y,i.y,n.y,o.y),l=Math.max(t.y,i.y,n.y,o.y);return new e.Rect(r,a,s-r,l-a)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),i=Math.floor(t.x),n=Math.floor(t.y),o=Math.ceil(t.width+t.x-i),r=Math.ceil(t.height+t.y-n);return new e.Rect(i,n,o,r)},containsPoint:function(e,t){t=t||0;var i=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),r=n.minus(i),s=o.minus(i);return(e.x-i.x)*r.x+(e.y-i.y)*r.y>=-t&&(e.x-n.x)*r.x+(e.y-n.y)*r.y<=t&&(e.x-i.x)*s.x+(e.y-i.y)*s.y>=-t&&(e.x-o.x)*s.x+(e.y-o.y)*s.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};function i(t){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);return this.dragging=!0,this.element&&("horizontal"==this.scroll?-t.delta.x>0?i>-(r-a.x)&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.x<0&&i<0&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.y>0?n>-(s-a.y)&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y)):-t.delta.y<0&&n<0&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y))),!1}function n(t){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);return this.element&&("horizontal"==this.scroll?t.scroll>0?i>-(r-a.x)&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0&&i<0&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0?n>a.y-s&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)):t.scroll>0&&n<0&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll))),!1}function o(t,i,n){var o,r,s,a,l,c,u;for(o="horizontal"==t.scroll?t.panelWidth:t.panelHeight,r=Math.ceil(i/o)+5,c=r=(r=(s=Math.ceil((Math.abs(n)+i)/o)+1)-r)<0?0:r;cc+s.x-this.panelWidth?(i=Math.min(i,a-s.x),this.element.style.marginLeft=-i+"px",o(this,s.x,-i)):iu+s.y-this.panelHeight?(i=Math.min(i,l-s.y),this.element.style.marginTop=-i+"px",o(this,s.y,-i)):i1?i[1].springStiffness:5,animationTime:i.length>1?i[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var t,i;this.current.time=e.now(),this._exponential?(t=this.start._logValue,i=this.target._logValue):(t=this.start.value,i=this.target.value);var n,o,r=this.current.time>=this.target.time?i:t+(i-t)*(n=this.springStiffness,o=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(n*-o))/(1-Math.exp(-n))),s=this.current.value;return this._exponential?this.current.value=Math.exp(r):this.current.value=r,s!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(OpenSeadragon),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}t.prototype={errorMsg:null,start:function(){var t=this,i=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout((function(){t.errorMsg="Image load exceeded timeout",t.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(e){var i;try{i=new window.Blob([e.response])}catch(t){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===t.name&&n){var o=new n;o.append(e.response),i=o.getBlob()}}0===i.size&&(t.errorMsg="Empty image response.",t.finish(!1));var r=(window.URL||window.webkitURL).createObjectURL(i);t.image.src=r},error:function(e){t.errorMsg="Image load aborted - XHR error",t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"==typeof i&&i()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var i=this,n=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:function(t){!function(e,t,i){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(e.jobQueue.shift().start(),e.jobsInProgress++);i(t.image,t.errorMsg,t.request)}(i,t,e.callback)},abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgressi&&(i=o)}return i},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!=e.x||this.canvas.height!=e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y}this._clear()}},_clear:function(e,t){if(this.useCanvas){var i=this._getContext(e);if(t)i.clearRect(t.x,t.y,t.width,t.height);else{var n=i.canvas;i.clearRect(0,0,n.width,n.height)}}},viewportToDrawerRectangle:function(t){var i=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),n=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},drawTile:function(t,i,n,o,r){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(i,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var s=this._getContext(n);o=o||1,t.drawCanvas(s,i,o,r)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var i=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var n=this;this.viewer.addHandler("rotate",(function e(){if(0!==n.viewport.getRotation()){n.viewer.removeHandler("rotate",e);var t=n._calculateSketchCanvasSize();n.sketchCanvas.width=t.x,n.sketchCanvas.height=t.y}}))}}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var i=this._getContext(t);i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()}},drawRectangle:function(e,t,i){if(this.useCanvas){var n=this._getContext(i);n.save(),n.fillStyle=t,n.fillRect(e.x,e.y,e.width,e.height),n.restore()}},blendSketch:function(t,i,n,o){var r=t;if(e.isPlainObject(r)||(r={opacity:t,scale:i,translate:n,compositeOperation:o}),this.useCanvas&&this.sketchCanvas){t=r.opacity,o=r.compositeOperation;var s=r.bounds;if(this.context.save(),this.context.globalAlpha=t,o&&(this.context.globalCompositeOperation=o),s)s.x<0&&(s.width+=s.x,s.x=0),s.x+s.width>this.canvas.width&&(s.width=this.canvas.width-s.x),s.y<0&&(s.height+=s.y,s.y=0),s.y+s.height>this.canvas.height&&(s.height=this.canvas.height-s.y),this.context.drawImage(this.sketchCanvas,s.x,s.y,s.width,s.height,s.x,s.y,s.width,s.height);else{i=r.scale||1;var a=(n=r.translate)instanceof e.Point?n:new e.Point(0,0),l=0,c=0;if(n){var u=this.sketchCanvas.width-this.canvas.width,d=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(d/2)}this.context.drawImage(this.sketchCanvas,a.x-l*i,a.y-c*i,(this.canvas.width+2*l)*i,(this.canvas.height+2*c)*i,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,i,n,o){if(this.useCanvas){var r=this.viewer.world.getIndexOfItem(o)%this.debugGridColor.length,s=this.context;s.save(),s.lineWidth=2*e.pixelDensityRatio,s.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",s.strokeStyle=this.debugGridColor[r],s.fillStyle=this.debugGridColor[r],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),o.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:o.getRotation(!0),point:o.viewport.pixelFromPointNoRotate(o._getRotationPoint(!0),!0)}),s.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var a=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;s.translate(a,l),s.rotate(Math.PI/180*-this.viewport.degrees),s.translate(-a,-l),0===t.x&&0===t.y&&(s.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),s.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),s.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),s.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),s.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),s.fillText("Order: "+n+" of "+i,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),s.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),s.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),o.getRotation(!0)%360!=0&&this._restoreRotationChanges(),s.restore()}},debugRect:function(t){if(this.useCanvas){var i=this.context;i.save(),i.lineWidth=2*e.pixelDensityRatio,i.strokeStyle=this.debugGridColor[0],i.fillStyle=this.debugGridColor[0],i.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),i.restore()}},getCanvasSize:function(t){var i=this._getContext(t).canvas;return new e.Point(i.width,i.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.save(),n.translate(i.x,i.y),n.rotate(Math.PI/180*t.degrees),n.translate(-i.x,-i.y)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,i=this.viewport.getContainerSize();return{x:i.x*t,y:i.y*t}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var i=arguments;i.length&&i[0]instanceof e.Point&&(t={containerSize:i[0],contentSize:i[1],config:i[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,i){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,i)},_setContentBounds:function(t,i){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),n=i/this.getAspectRatio();return new e.Rect(t.x-i/2,t.y-n/2,i,n)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var i=this.getCenter(t),n=1/this.getZoom(t),o=n/this.getAspectRatio();return new e.Rect(i.x-n/2,i.y-o/2,n,o)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),i=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/i,t.y-=this._margins.top/i,t.width+=(this._margins.left+this._margins.right)/i,t.height+=(this._margins.top+this._margins.bottom)/i,t},getCenter:function(t){var i,n,o,r,s,a,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),c=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(i=this.pixelFromPoint(this.zoomPoint,!0),r=(o=1/(n=this.getZoom()))/this.getAspectRatio(),s=new e.Rect(l.x-o/2,l.y-r/2,o,r),a=this._pixelFromPoint(this.zoomPoint,s).minus(i).divide(this._containerInnerSize.x*n),c.plus(a)):c},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var i=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var n=this.visibilityRatio*i.width,o=i.x+i.width,r=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,s=this._contentBoundsNoRotate.x-o+n,a=r-i.x-n;n>this._contentBoundsNoRotate.width?i.x+=(s+a)/2:a<0?i.x+=a:s>0&&(i.x+=s)}if(this.wrapVertical);else{var l=this.visibilityRatio*i.height,c=i.y+i.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,d=this._contentBoundsNoRotate.y-c+l,h=u-i.y-l;l>this._contentBoundsNoRotate.height?i.y+=(d+h)/2:h<0?i.y+=h:d>0&&(i.y+=d)}return i},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),i=this._applyZoomConstraints(t);t!==i&&this.zoomTo(i,this.zoomPoint,e);var n=this.getBoundsNoRotate(),o=this._applyBoundaryConstraints(n);return this._raiseConstraintsEvent(e),(n.x!==o.x||n.y!==o.y||e)&&this.fitBounds(o.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,i){var n=(i=i||{}).immediately||!1,o=i.constraints||!1,r=this.getAspectRatio(),s=t.getCenter(),a=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();a.getAspectRatio()>=r?a.height=a.width/r:a.width=a.height*r,a.x=s.x-a.width/2,a.y=s.y-a.height/2;var l=1/a.width;if(o){var c=a.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,a.width=1/l,a.x=s.x-a.width/2,a.height=a.width/c,a.y=s.y-a.height/2),s=(a=this._applyBoundaryConstraints(a)).getCenter(),this._raiseConstraintsEvent(n)}if(n)return this.panTo(s,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var d=this.getBounds(),h=this.getZoom();if(0===h||Math.abs(l/h-1)<1e-8)return this.zoomTo(l,!0),this.panTo(s,n);var m=(a=a.rotate(-this.getRotation())).getTopLeft().times(l).minus(d.getTopLeft().times(h)).divide(l-h);return this.zoomTo(l,m,n)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var i=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,t)},fitHorizontally:function(t){var i=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,i){var n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(n.plus(t),i)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,i){return this.zoomTo(this.zoomSpring.target.value*e,t,i)},zoomTo:function(t,i,n){var o=this;return this.zoomPoint=i instanceof e.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,n?this._adjustCenterSpringsForZoomPoint((function(){o.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:i,immediately:n}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var i,n=this.getBoundsNoRotate(),o=n;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(i=e.x/this.containerSize.x,o.width=n.width*i,o.height=o.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(o,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var i=this.pixelFromPoint(this.zoomPoint,!0).minus(t),n=this.deltaPointsFromPixels(i,!0);this.centerSpringX.shiftBy(n.x),this.centerSpringY.shiftBy(n.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,i){return t.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,i){var n=this.getBoundsNoRotate(i);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/n.width).plus(n.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/n,i*this._contentSizeNoRotate.x/n)},viewportToImageCoordinates:function(t,i){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,i,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*n,i/this._contentSizeNoRotate.x*n)},imageToViewportCoordinates:function(t,i){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,i,!0)}}var o=this._imageToViewportDelta(t,i);return o.x+=this._contentBoundsNoRotate.x,o.y+=this._contentBoundsNoRotate.y,o},imageToViewportRectangle:function(t,i,n,o){var r=t;if(r instanceof e.Rect||(r=new e.Rect(t,i,n,o)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===s){return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,i,n,o,!0)}}var a=this.imageToViewportCoordinates(r.x,r.y),l=this._imageToViewportDelta(r.width,r.height);return new e.Rect(a.x,a.y,l.x,l.y,r.degrees)},viewportToImageRectangle:function(t,i,n,o){var r=t;if(r instanceof e.Rect||(r=new e.Rect(t,i,n,o)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===s){return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,i,n,o,!0)}}var a=this.viewportToImageCoordinates(r.x,r.y),l=this._viewportToImageDelta(r.width,r.height);return new e.Rect(a.x,a.y,l.x,l.y,r.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===i){return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}}var n=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/n*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===i){return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)}}}(OpenSeadragon),function(e){function t(e,t,n,o,r,s,l,c,u){var d=l.getBoundingBox().getTopLeft(),h=l.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:o,opacity:r,visibility:s,drawArea:l,topleft:d,bottomright:h,currenttime:c,best:u}),a(e.coverage,o),a(e.loadingCoverage,o);for(var m=e._getCornerTiles(o,d,h),p=m.topLeft,g=m.bottomRight,f=e.source.getNumTiles(o),v=e.viewport.pixelFromPoint(e.viewport.getCenter()),y=p.x;y<=g.x;y++)for(var w=p.y;w<=g.y;w++){if(!e.wrapHorizontal&&!e.wrapVertical){var b=e.source.getTileBounds(o,y,w);if(null===l.intersection(b))continue}u=i(e,n,t,y,w,o,r,s,v,f,c,u)}return u}function i(t,i,o,a,l,c,u,d,h,m,p,g){var f=function(t,i,n,o,r,s,a,l,c,u){var d,h,m,p,g,f,v,y;s[n]||(s[n]={});s[n][t]||(s[n][t]={});s[n][t][i]||(d=(l.x+t%l.x)%l.x,h=(l.y+i%l.y)%l.y,m=r.getTileBounds(n,d,h),p=r.tileExists(n,d,h),g=r.getTileUrl(n,d,h),o.loadTilesWithAjax?(f=r.getTileAjaxHeaders(n,d,h),e.isPlainObject(o.ajaxHeaders)&&(f=e.extend({},o.ajaxHeaders,f))):f=null,v=r.getContext2D?r.getContext2D(n,d,h):void 0,m.x+=(t-d)/l.x,m.y+=u/c*((i-h)/l.y),y=new e.Tile(n,t,i,m,p,g,v,o.loadTilesWithAjax,f),d===l.x-1&&(y.isRightMost=!0),h===l.y-1&&(y.isBottomMost=!0),s[n][t][i]=y);return(y=s[n][t][i]).lastTouchTime=a,y}(a,l,c,t,t.source,t.tilesMatrix,p,m,t._worldWidthCurrent,t._worldHeightCurrent),v=o;t.viewer&&t.viewer.raiseEvent("update-tile",{tiledImage:t,tile:f}),s(t.coverage,c,a,l,!1);var y=f.loaded||f.loading||r(t.loadingCoverage,c,a,l);if(s(t.loadingCoverage,c,a,l,y),!f.exists)return g;if(i&&!v&&(r(t.coverage,c,a,l)?s(t.coverage,c,a,l,!0):v=!0),!v)return g;if(function(t,i,n,o,r,s){var a=t.bounds.getTopLeft();a.x*=s._scaleSpring.current.value,a.y*=s._scaleSpring.current.value,a.x+=s._xSpring.current.value,a.y+=s._ySpring.current.value;var l=t.bounds.getSize();l.x*=s._scaleSpring.current.value,l.y*=s._scaleSpring.current.value;var c=n.pixelFromPointNoRotate(a,!0),u=n.pixelFromPointNoRotate(a,!1),d=n.deltaPixelsFromPointsNoRotate(l,!0),h=n.deltaPixelsFromPointsNoRotate(l,!1),m=u.plus(h.divide(2)),p=o.squaredDistanceTo(m);i||(d=d.plus(new e.Point(1,1)));t.isRightMost&&s.wrapHorizontal&&(d.x+=.75);t.isBottomMost&&s.wrapVertical&&(d.y+=.75);t.position=c,t.size=d,t.squaredDistance=p,t.visibility=r}(f,t.source.tileOverlap,t.viewport,h,d,t),!f.loaded)if(f.context2D)n(t,f);else{var w=t._tileCache.getImageRecord(f.cacheKey);if(w)n(t,f,w.getImage())}f.loaded?function(e,t,i,n,o,r,a){var l,c,u=1e3*e.blendTime;t.blendStart||(t.blendStart=a);l=a-t.blendStart,c=u?Math.min(1,l/u):1,e.alwaysBlend&&(c*=r);if(t.opacity=c,e.lastDrawn.push(t),1==c)s(e.coverage,o,i,n,!0),e._hasOpaqueTile=!0;else if(le.visibility)return t;if(t.visibility==e.visibility&&t.squaredDistancer?(s=this._clip.x/this._clip.height*t.height,a=this._clip.y/this._clip.height*t.height):(s=this._clip.x/this._clip.width*t.width,a=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>r){var u=t.height/c,d=0;o.isHorizontallyCentered?d=(t.width-t.height*r)/2:o.isRight&&(d=t.width-t.height*r),this.setPosition(new e.Point(t.x-s+d,t.y-a),n),this.setHeight(u,n)}else{var h=t.width/l,m=0;o.isVerticallyCentered?m=(t.height-t.width/r)/2:o.isBottom&&(m=t.height-t.width/r),this.setPosition(new e.Point(t.x-s,t.y-a+m),n),this.setWidth(h,n)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var i=this._scaleSpring.target.value===e;if(t){if(i&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(i)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}i||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,i=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return{lowestLevel:e=Math.min(e,i),highestLevel:i}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var i=this.viewport,r=this._viewportToTiledImageRectangle(i.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var s=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(r=r.intersection(s)))return}for(var a=this._getLevelsInterval(),l=a.lowestLevel,c=a.highestLevel,u=null,d=!1,h=e.now(),m=c;m>=l;m--){var p=!1,g=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(m),!0).x*this._scaleSpring.current.value;if(m===l||!d&&g>=this.minPixelRatio)p=!0,d=!0;else if(!d)continue;var f=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(m),!1).x*this._scaleSpring.current.value,v=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,y=this.immediateRender?1:v;if(u=t(this,d,p,m,Math.min(1,(g-.5)/.5),y/Math.abs(y-f),r,h,u),o(this.coverage,m))break}!function(t,i){if(0===t.opacity||0===i.length&&!t.placeholderFillStyle)return;var n,o,r,s=i[0];s&&(n=t.opacity<1||t.compositeOperation&&"source-over"!==t.compositeOperation||!t._isBottomItem()&&s._hasTransparencyChannel());var a,l=t.viewport.getZoom(!0),c=t.viewportToImageZoom(l);i.length>1&&c>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(n=!0,o=s.getScaleForEdgeSmoothing(),r=s.getTranslationForEdgeSmoothing(o,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0)));n&&(o||(a=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox().times(e.pixelDensityRatio)),t._drawer._clear(!0,a));o||(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:n}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:n}));var u=!1;if(t._clip){t._drawer.saveContext(n);var d=t.imageToViewportRectangle(t._clip,!0);d=d.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var h=t._drawer.viewportToDrawerRectangle(d);o&&(h=h.times(o)),r&&(h=h.translate(r)),t._drawer.setClip(h,n),u=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var m=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));o&&(m=m.times(o)),r&&(m=m.translate(r));var p=null;p="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(m,p,n)}for(var g=i.length-1;g>=0;g--)s=i[g],t._drawer.drawTile(s,t._drawingHandler,n,o,r),s.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:s});u&&t._drawer.restoreContext(n);o||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(n),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(n));n&&(o&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:o,translate:r,compositeOperation:t.compositeOperation,bounds:a}),o&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1)));!function(t,i){if(t.debugMode)for(var n=i.length-1;n>=0;n--){var o=i[n];try{t._drawer.drawDebugInfo(o,i.length,n,t)}catch(t){e.console.error(t)}}}(t,i)}(this,this.lastDrawn),u&&!u.context2D?(!function(t,i,o){i.loading=!0,t._imageLoader.addJob({src:i.url,loadWithAjax:i.loadWithAjax,ajaxHeaders:i.ajaxHeaders,crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,callback:function(r,s,a){!function(t,i,o,r,s,a){if(!r)return e.console.log("Tile %s failed to load: %s - error: %s",i,i.url,s),t.viewer.raiseEvent("tile-load-failed",{tile:i,tiledImage:t,time:o,message:s,tileRequest:a}),i.loading=!1,void(i.exists=!1);if(othis._maxImageCacheCount){for(var a,l,c,u,d,h,m=null,p=-1,g=null,f=this._tilesLoaded.length-1;f>=0;f--)(a=(h=this._tilesLoaded[f]).tile).level<=o||a.beingDrawn||(m?(u=a.lastTouchTime,l=m.lastTouchTime,d=a.level,c=m.level,(uc)&&(m=a,p=f,g=h)):(m=a,p=f,g=h));m&&p>=0&&(this._unloadTile(g),r=p)}this._tilesLoaded[r]=new t({tile:n.tile,tiledImage:n.tiledImage})},clearTilesFor:function(t){var i;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var n=0;n=this._items.length)throw new Error("Index bigger than number of layers.");i!==n&&-1!==n&&(this._items.splice(n,1),this._items.splice(i,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:n,newIndex:i}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var i=e.indexOf(this._items,t);-1!==i&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;tu.height?a:a*(u.width/u.height))*(u.height/u.width),m=new e.Point(p+(a-d)/2,g+(a-h)/2),c.setPosition(m,n),c.setWidth(d,n),"horizontal"===o?p+=l:g+=l;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,n=this._contentFactor||0;if(this._items.length){var o=this._items[0],r=o.getBounds();this._contentFactor=o.getContentSize().x/r.width;for(var s=o.getClippedBounds().getBoundingBox(),a=s.x,l=s.y,c=s.x+s.width,u=s.y+s.height,d=1;dAxmTYklsjo190QW',r=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return r.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},r.prototype.load=function(){var e,r=new Date,o=this,i=o.serif,a=o.sansSerif,s=o.parent,u=o.appended,c=o.options,l=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var f=n.replace(/\%s/,d("sans-serif")),m=n.replace(/\%s/,d("serif"));function p(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=o.parent=c.window.document.createElement("div")),s.innerHTML=f+m,a=o.sansSerif=s.firstChild,i=o.serif=a.nextSibling,c.glyphs&&(a.innerHTML+=c.glyphs,i.innerHTML+=c.glyphs),function t(){l||(l=c.window.document.body),!u&&l&&(l.appendChild(s),u=o.appended=!0,e=o.getMeasurements(),a.style.fontFamily=o.fontFamily+", sans-serif",i.style.fontFamily=o.fontFamily+", serif"),u&&e&&(p(e.sansSerif,a,c.tolerance)||p(e.serif,i,c.tolerance))?c.success():(new Date).getTime()-r.getTime()>c.timeout?c.error():!u&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},r.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},r.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},r.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},r.prototype.init=function(t,n){var r;for(var o in e)n.hasOwnProperty(o)||(n[o]=e[o]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(r=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(r)):this.load()},function(e,t){var n=new r;return n.init(e,t),n}})?r.apply(t,o):r)||(e.exports=i)}()},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/static/builds/web/dist/",n(n.s=1)}([function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=function(e,t,n){this._target=e,this._requestIdCounter=0,this._pendingRequests={},this._eventListeners={},this._ready=!1,this._domain=n,this._instanceId=t,this.listenServer()};i.prototype={getIdentifier:function(){return this._instanceId},getDomain:function(){return this._domain},setIdentifier:function(e){this._instanceId=e},use:function(e,t){this._version=e,this._ready=!0;var n=this._requestIdCounter++;this._pendingRequests[n]=function(e,n,r){e?t.call(this,e):t.call(this,null,new function(e,t){e.forEach((function(e){this[e]=function(){var n,r=t._requestIdCounter++,o=Array.prototype.slice.call(arguments);o.length>0&&"function"==typeof o[o.length-1]&&(n=o.pop()),n&&(t._pendingRequests[r]=n.bind(this)),t._target.postMessage({type:"api.request",instanceId:t.getIdentifier(),requestId:r,member:e,arguments:o},t.getDomain())}}),this),this.addEventListener=function(e,n,r){"viewerready"===e&&t.isViewerReady&&n(),t._eventListeners[e]||(t._eventListeners[e]=[]),t._eventListeners[e].push(n),r&&this.setListenerOptions&&(r.name=e,this.setListenerOptions(r))},this.removeEventListener=function(e,n){if(t._eventListeners[e]){var r=t._eventListeners[e].indexOf(n);-1!==r&&t._eventListeners[e].splice(r,1)}}}(r,this))}.bind(this),this._target.postMessage({type:"api.initialize",requestId:n,name:e,instanceId:this._instanceId},this._domain)},listenServer:function(){var e=["api.initialize.result","api.request.result","api.event"];window.addEventListener("message",function(t){if(t.origin===this._domain&&t.data&&t.data.type&&t.data.instanceId&&t.data.instanceId===this.getIdentifier()){var n=t.data.type;if(-1!==e.indexOf(n))if("api.event"===n){var r=t.data.results,o=r[0];if(this._eventListeners["*"]||this._eventListeners.all)return void["*","all"].forEach((function(e){var t=this._eventListeners[e];t&&t.forEach((function(e){e.apply(e,r)}))}),this);var i=r.slice(1),a=this._eventListeners[o];a?a.forEach((function(e){e.apply(e,i)})):"viewerready"===o&&(this.isViewerReady=!0)}else{var s=t.data.requestId,u=this._pendingRequests[s];if(!u)return;u.apply(null,t.data.results),this._pendingRequests[s]=void 0}}}.bind(this))}};var a=i,s=/[&|;]+/g;function u(e){return"object"===o()(e)?function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=Array.isArray(e[n])?e[n]:[e[n]]})),t}(e):("?"===e[0]&&(e=e.substr(1)),e.split(s).reduce((function(e,t){if(0===t.length)return e;var n=t.indexOf("=");-1===n&&(n=t.length);var r=decodeURIComponent(t.substr(0,n).replace(/\+/g,"%20")),o=decodeURIComponent(t.substr(n+1).replace(/\+/g,"%20"));return void 0===e[r]&&(e[r]=[]),e[r].push(o),e}),{}))}window.SketchfabAPIClient=a;var c=function(e,t){var n=e,r=t;"object"===o()(e)&&(r=e,n=null),this._version=n,this._target=r,window.sketchfabAPIinstances||(window.sketchfabAPIinstances=[]),window.sketchfabAPIinstances.push(this),this._apiId=window.sketchfabAPIinstances.length.toString(),this._target.id&&(this._apiId+="_"+this._target.id),this._target.allow||(this._target.allow="vr; autoplay; fullscreen"),this._client=void 0,this._options=void 0,this._domain="sketchfab.com",this._domain="same-as-current"===this._domain?window.location.hostname:this._domain,this._urlTemplate="https://YYYY/models/XXXX/embed",this._url=this._urlTemplate.replace("YYYY",this._domain),this._transmitOptions={},this._getURLOptions()};c.prototype={_urlOptionsDict:{skfb_api_version:{default:"1.5.2",type:"string"}},_optionsLoaded:function(e){this._urlOptions=e,this._version=this._getURLOption("skfb_api_version",this._version)},_getURLOption:function(e,t){var n=this._urlOptionsDict[e];if(!n)return t;null!=t||(t=n.default);var r=this._urlOptions[e];return r&&r.length?r[0]:t},_getURLOptions:function(){if(!window||!window.location.search)return this._optionsLoaded({});var e=u(window.location.search);for(var t in e)t.startsWith("skfb_")&&(this._transmitOptions[t.substr(5)]=e[t]);return this._optionsLoaded(e)},getEmbedURL:function(e,t){var n=this._url+"?api_version="+this._version+"&api_id="+this._apiId;t&&Object.keys(t).forEach((function(e){null!=t[e]&&"function"!=typeof t[e]&&(n+="&"+e.toString()+"="+t[e].toString())}));var r=this._transmitOptions;return Object.keys(this._transmitOptions).forEach((function(e){n+="&"+e.toString()+"="+r[e].toString()})),n.replace("XXXX",e)},init:function(e,t){this._options=t,this._uid=e,this._realInit()},reload:function(e){var t=document.createElement("script");t.setAttribute("src","https://static."+e+"/api/sketchfab-viewer-"+this._version+".js"),t.addEventListener("load",function(){this._url=this._urlTemplate.replace("YYYY",e),-1!==this._domain.indexOf("sketchfab.com")&&(this._transmitOptions.hook_prod=1,this._transmitOptions.model=this._uid),this._realInit()}.bind(this)),document.body.appendChild(t)},_initializeAPIEmbed:function(e){if(e.data&&e.data.instanceId&&this._apiId===e.data.instanceId&&"api.ready"===e.data.type){var t=e.data.options;if(t&&t.domain)this.reload(t.domain);else{if(void 0!==e.data.error)return this.error(e.data.error),void window.removeEventListener("message",this._initializeAPIEmbedBinded);var n=this._target.src.split("/");n="https://"+n[2],this._client=new window.SketchfabAPIClient(this._target.contentWindow,this._apiId,n),this._client.use(this._version,function(e,t){if(e)throw e;this.success.call(this,t)}.bind(this)),window.removeEventListener("message",this._initializeAPIEmbedBinded)}}},_realInit:function(){this._initializeAPIEmbedBinded=this._initializeAPIEmbed.bind(this),window.addEventListener("message",this._initializeAPIEmbedBinded),this._target.src=this.getEmbedURL(this._uid,this._options)},success:function(e){this._options.success&&"function"==typeof this._options.success&&this._options.success(e)},error:function(e){this._options.error&&"function"==typeof this._options.error&&this._options.error(e)}},t.default=c}]).default},,,,,,,,,function(e,t){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},function(e,t,n){e.exports=function(e,t){var n=r(e[0],e[1],e[2]),a=r(t[0],t[1],t[2]);o(n,n),o(a,a);var s=i(n,a);return s>1?0:Math.acos(s)};var r=n(19),o=n(20),i=n(21)},function(e,t){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},function(e,t){e.exports=function(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}},function(e,t,n){e.exports=function(e,t){var n=e[0],o=e[1],i=e[2],a=t[0],s=t[1],u=t[2];return Math.abs(n-a)<=r*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(o-s)<=r*Math.max(1,Math.abs(o),Math.abs(s))&&Math.abs(i-u)<=r*Math.max(1,Math.abs(i),Math.abs(u))};var r=n(17)},function(e,t){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}},function(e,t,n){e.exports=n(22)},function(e,t,n){e.exports=n(23)},function(e,t,n){e.exports=n(24)},function(e,t){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}},function(e,t){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}},function(e,t){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},function(e,t){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},function(e,t){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}},function(e,t){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}},function(e,t,n){e.exports=n(25)},function(e,t,n){e.exports=n(26)},function(e,t,n){e.exports=n(27)},function(e,t,n){e.exports=n(28)},function(e,t){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}},function(e,t){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},function(e,t){e.exports=function(e,t,n){var r=t[0],o=t[1],i=t[2],a=n[0],s=n[1],u=n[2];return e[0]=o*u-i*s,e[1]=i*a-r*u,e[2]=r*s-o*a,e}},function(e,t){e.exports=function(e,t,n,r){var o=t[0],i=t[1],a=t[2];return e[0]=o+r*(n[0]-o),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e}},function(e,t){e.exports=function(e,t){t=t||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,o=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*o,e[1]=Math.sin(n)*o,e[2]=r*t,e}},function(e,t){e.exports=function(e,t,n){var r=t[0],o=t[1],i=t[2],a=n[3]*r+n[7]*o+n[11]*i+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*o+n[8]*i+n[12])/a,e[1]=(n[1]*r+n[5]*o+n[9]*i+n[13])/a,e[2]=(n[2]*r+n[6]*o+n[10]*i+n[14])/a,e}},function(e,t){e.exports=function(e,t,n){var r=t[0],o=t[1],i=t[2];return e[0]=r*n[0]+o*n[3]+i*n[6],e[1]=r*n[1]+o*n[4]+i*n[7],e[2]=r*n[2]+o*n[5]+i*n[8],e}},function(e,t){e.exports=function(e,t,n){var r=t[0],o=t[1],i=t[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*i-u*o,d=c*o+u*r-a*i,f=c*i+a*o-s*r,m=-a*r-s*o-u*i;return e[0]=l*c+m*-a+d*-u-f*-s,e[1]=d*c+m*-s+f*-a-l*-u,e[2]=f*c+m*-u+l*-s-d*-a,e}},function(e,t){e.exports=function(e,t,n,r){var o=n[1],i=n[2],a=t[1]-o,s=t[2]-i,u=Math.sin(r),c=Math.cos(r);return e[0]=t[0],e[1]=o+a*c-s*u,e[2]=i+a*u+s*c,e}},function(e,t){e.exports=function(e,t,n,r){var o=n[0],i=n[2],a=t[0]-o,s=t[2]-i,u=Math.sin(r),c=Math.cos(r);return e[0]=o+s*u+a*c,e[1]=t[1],e[2]=i+s*c-a*u,e}},function(e,t){e.exports=function(e,t,n,r){var o=n[0],i=n[1],a=t[0]-o,s=t[1]-i,u=Math.sin(r),c=Math.cos(r);return e[0]=o+a*c-s*u,e[1]=i+a*u+s*c,e[2]=t[2],e}},function(e,t,n){e.exports=function(e,t,n,o,i,a){var s,u;t||(t=3);n||(n=0);u=o?Math.min(o*t+n,e.length):e.length;for(s=n;s1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?A(t(document.querySelectorAll(e)),n):A([e],n)[0]}}("undefined"==typeof window?null:window)},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r,o,i;/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */o=[],void 0===(i="function"==typeof(r=function(){"use strict";var e="11.0.3";function t(e){e.preventDefault()}function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function r(e,t,n){n>0&&(s(e,t),setTimeout((function(){u(e,t)}),n))}function o(e){return Math.max(Math.min(e,100),0)}function i(e){return Array.isArray(e)?e:[e]}function a(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function s(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function u(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function c(e){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop}}function l(e,t){return 100/(t-e)}function d(e,t){return 100*t/(e[1]-e[0])}function f(e,t){for(var n=1;e>=t[n];)n+=1;return n}function m(e,t,n){if(n>=e.slice(-1)[0])return 100;var r=f(n,e),o=e[r-1],i=e[r],a=t[r-1],s=t[r];return a+function(e,t){return d(e,e[0]<0?t+Math.abs(e[0]):t-e[0])}([o,i],n)/l(a,s)}function p(e,t,n,r){if(100===r)return r;var o=f(r,e),i=e[o-1],a=e[o];return n?r-i>(a-i)/2?a:i:t[o-1]?e[o-1]+function(e,t){return Math.round(e/t)*t}(r-e[o-1],t[o-1]):r}function h(t,r,o){var i;if("number"==typeof r&&(r=[r]),!Array.isArray(r))throw new Error("noUiSlider ("+e+"): 'range' contains invalid value.");if(!n(i="min"===t?0:"max"===t?100:parseFloat(t))||!n(r[0]))throw new Error("noUiSlider ("+e+"): 'range' value isn't numeric.");o.xPct.push(i),o.xVal.push(r[0]),i?o.xSteps.push(!isNaN(r[1])&&r[1]):isNaN(r[1])||(o.xSteps[0]=r[1]),o.xHighestCompleteStep.push(0)}function v(e,t,n){if(!t)return!0;n.xSteps[e]=d([n.xVal[e],n.xVal[e+1]],t)/l(n.xPct[e],n.xPct[e+1]);var r=(n.xVal[e+1]-n.xVal[e])/n.xNumSteps[e],o=Math.ceil(Number(r.toFixed(3))-1),i=n.xVal[e]+n.xNumSteps[e]*o;n.xHighestCompleteStep[e]=i}function g(e,t,n){var r;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=t;var o=[];for(r in e)e.hasOwnProperty(r)&&o.push([e[r],r]);for(o.length&&"object"==typeof o[0][0]?o.sort((function(e,t){return e[0][0]-t[0][0]})):o.sort((function(e,t){return e[0]-t[0]})),r=0;r=100)return e.slice(-1)[0];var r=f(n,t),o=e[r-1],i=e[r],a=t[r-1];return function(e,t){return t*(e[1]-e[0])/100+e[0]}([o,i],(n-a)*l(a,t[r]))}(this.xVal,this.xPct,e)},g.prototype.getStep=function(e){return e=p(this.xPct,this.xSteps,this.snap,e)},g.prototype.getNearbySteps=function(e){var t=f(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t-0],step:this.xNumSteps[t-0],highestStep:this.xHighestCompleteStep[t-0]}}},g.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(a);return Math.max.apply(null,e)},g.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var b={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number};function y(t){if(function(e){return"object"==typeof e&&"function"==typeof e.to&&"function"==typeof e.from}(t))return!0;throw new Error("noUiSlider ("+e+"): 'format' requires 'to' and 'from' methods.")}function w(t,r){if(!n(r))throw new Error("noUiSlider ("+e+"): 'step' is not numeric.");t.singleStep=r}function E(t,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider ("+e+"): 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider ("+e+"): Missing 'min' or 'max' in 'range'.");if(n.min===n.max)throw new Error("noUiSlider ("+e+"): 'range' 'min' and 'max' cannot be equal.");t.spectrum=new g(n,t.snap,t.singleStep)}function L(t,n){if(n=i(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider ("+e+"): 'start' option is incorrect.");t.handles=n.length,t.start=n}function _(t,n){if(t.snap=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+e+"): 'snap' option must be a boolean.")}function x(t,n){if(t.animate=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+e+"): 'animate' option must be a boolean.")}function S(t,n){if(t.animationDuration=n,"number"!=typeof n)throw new Error("noUiSlider ("+e+"): 'animationDuration' option must be a number.")}function A(t,n){var r,o=[!1];if("lower"===n?n=[!0,!1]:"upper"===n&&(n=[!1,!0]),!0===n||!1===n){for(r=1;r=50||t.padding[1]>=50)throw new Error("noUiSlider ("+e+"): 'padding' option must be less than half the range.")}}function C(t,n){switch(n){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider ("+e+"): 'direction' option was not recognized.")}}function M(t,n){if("string"!=typeof n)throw new Error("noUiSlider ("+e+"): 'behaviour' must be a string containing options.");var r=n.indexOf("tap")>=0,o=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,a=n.indexOf("snap")>=0,s=n.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider ("+e+"): 'fixed' behaviour must be used with 2 handles");j(t,t.start[1]-t.start[0])}t.events={tap:r||a,drag:o,fixed:i,snap:a,hover:s}}function q(t,n){if(!1!==n)if(!0===n){t.tooltips=[];for(var r=0;r= 2) required for mode 'count'.");var o=n-1,i=100/o;for(n=[];o--;)n[o]=o*i;n.push(100),t="positions"}return"positions"===t?n.map((function(e){return S.fromStepping(r?S.getStep(e):e)})):"values"===t?r?n.map((function(e){return S.fromStepping(S.getStep(S.toStepping(e)))})):n:void 0}(n,t.values||!1,t.stepped||!1),a=function(e,t,n){var r,o={},i=S.xVal[0],a=S.xVal[S.xVal.length-1],s=!1,u=!1,c=0;return r=n.slice().sort((function(e,t){return e-t})),(n=r.filter((function(e){return!this[e]&&(this[e]=!0)}),{}))[0]!==i&&(n.unshift(i),s=!0),n[n.length-1]!==a&&(n.push(a),u=!0),n.forEach((function(r,i){var a,l,d,f,m,p,h,v,g,b=r,y=n[i+1];if("steps"===t&&(a=S.xNumSteps[i]),a||(a=y-b),!1!==b&&void 0!==y)for(a=Math.max(a,1e-7),l=b;l<=y;l=(l+a).toFixed(7)/1){for(h=(m=(f=S.toStepping(l))-c)/e,g=m/(v=Math.round(h)),d=1;d<=v;d+=1)o[(c+d*g).toFixed(5)]=["x",0];p=n.indexOf(l)>-1?1:"steps"===t?2:0,!i&&s&&(p=0),l===y&&u||(o[f.toFixed(5)]=[l,p]),c=f}})),o}(r,n,i),s=t.format||{to:Math.round};return h=E.appendChild(N(a,o,s))}
-/*! In this file: Browser events (not slider events like slide, change); */function z(){var e=d.getBoundingClientRect(),t="offset"+["Width","Height"][a.ort];return 0===a.ort?e.width||d[t]:e.height||d[t]}function R(e,t,n,r){var o=function(o){return!!(o=function(e,t,n){var r,o,i=0===e.type.indexOf("touch"),a=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer");if(0===e.type.indexOf("MSPointer")&&(s=!0),i){var u=function(e){return e.target===n||n.contains(e.target)};if("touchstart"===e.type){var l=Array.prototype.filter.call(e.touches,u);if(l.length>1)return!1;r=l[0].pageX,o=l[0].pageY}else{var d=Array.prototype.find.call(e.changedTouches,u);if(!d)return!1;r=d.pageX,o=d.pageY}}return t=t||c(j),(a||s)&&(r=e.clientX+t.x,o=e.clientY+t.y),e.pageOffset=t,e.points=[r,o],e.cursor=a||s,e}(o,r.pageOffset,r.target||t))&&!(E.hasAttribute("disabled")&&!r.doNotReject)&&(i=E,s=a.cssClasses.tap,!((i.classList?i.classList.contains(s):new RegExp("\\b"+s+"\\b").test(i.className))&&!r.doNotReject)&&!(e===y.start&&void 0!==o.buttons&&o.buttons>1)&&(!r.hover||!o.buttons)&&(w||o.preventDefault(),o.calcPoint=o.points[a.ort],void n(o,r)));var i,s},i=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!w&&{passive:!0}),i.push([e,o])})),i}function U(e){var t,n,r,i,s,u,l=100*(e-(t=d,n=a.ort,r=t.getBoundingClientRect(),i=t.ownerDocument,s=i.documentElement,u=c(i),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(u.x=0),n?r.top+u.y-s.clientTop:r.left+u.x-s.clientLeft))/z();return l=o(l),a.dir?100-l:l}function B(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&Y(e,t)}function W(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return Y(e,t);var n=(a.dir?-1:1)*(e.calcPoint-t.startCalcPoint);ee(n>0,100*n/t.baseSize,t.locations,t.handleNumbers)}function Y(e,n){n.handle&&(u(n.handle,a.cssClasses.active),x-=1),n.listeners.forEach((function(e){k.removeEventListener(e[0],e[1])})),0===x&&(u(E,a.cssClasses.drag),ne(),e.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",t))),n.handleNumbers.forEach((function(e){G("change",e),G("set",e),G("end",e)}))}function V(e,n){var r;if(1===n.handleNumbers.length){var o=f[n.handleNumbers[0]];if(o.hasAttribute("disabled"))return!1;r=o.children[0],x+=1,s(r,a.cssClasses.active)}e.stopPropagation();var i=[],u=R(y.move,k,W,{target:e.target,handle:r,listeners:i,startCalcPoint:e.calcPoint,baseSize:z(),pageOffset:e.pageOffset,handleNumbers:n.handleNumbers,buttonsProperty:e.buttons,locations:L.slice()}),c=R(y.end,k,Y,{target:e.target,handle:r,listeners:i,doNotReject:!0,handleNumbers:n.handleNumbers}),l=R("mouseout",k,B,{target:e.target,handle:r,listeners:i,doNotReject:!0,handleNumbers:n.handleNumbers});i.push.apply(i,u.concat(c,l)),e.cursor&&(T.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&s(E,a.cssClasses.drag),T.addEventListener("selectstart",t,!1)),n.handleNumbers.forEach((function(e){G("start",e)}))}function Q(e){e.stopPropagation();var t=U(e.calcPoint),n=function(e){var t=100,n=!1;return f.forEach((function(r,o){if(!r.hasAttribute("disabled")){var i=Math.abs(L[o]-e);(i1&&(r&&t>0&&(n=Math.max(n,e[t-1]+a.margin)),i&&t1&&a.limit&&(r&&t>0&&(n=Math.min(n,e[t-1]+a.limit)),i&&t1?r.forEach((function(e,n){var r=Z(o,e,o[e]+t,i[n],a[n],!1);!1===r?t=0:(t=r-o[e],o[e]=r)})):i=a=[!0];var s=!1;r.forEach((function(e,r){s=re(e,n[e]+t,i[r],a[r])||s})),s&&r.forEach((function(e){G("update",e),G("slide",e)}))}function te(e,t){return a.dir?100-e-t:e}function ne(){_.forEach((function(e){var t=L[e]>50?-1:1,n=3+(f.length+t*e);f[e].style.zIndex=n}))}function re(e,t,n,r){return!1!==(t=Z(L,e,t,n,r,!1))&&(function(e,t){L[e]=t,A[e]=S.fromStepping(t);var n="translate("+K(J(te(t,0)-C),"0")+")";f[e].style[a.transformRule]=n,oe(e),oe(e+1)}(e,t),!0)}function oe(e){if(m[e]){var t=0,n=100;0!==e&&(t=L[e-1]),e!==m.length-1&&(n=L[e]);var r=n-t,o="translate("+K(J(te(t,r)),"0")+")",i="scale("+K(r/100,"1")+")";m[e].style[a.transformRule]=o+" "+i}}
-/*! In this file: All methods eventually exposed in slider.noUiSlider... */function ie(e,t){var n=i(e),o=void 0===L[0];t=void 0===t||!!t,a.animate&&!o&&r(E,a.cssClasses.tap,a.animationDuration),_.forEach((function(e){re(e,function(e,t){return null===e||!1===e||void 0===e?L[t]:("number"==typeof e&&(e=String(e)),e=a.format.from(e),!1===(e=S.toStepping(e))||isNaN(e)?L[t]:e)}(n[e],e),!0,!1)})),_.forEach((function(e){re(e,L[e],!0,!0)})),ne(),_.forEach((function(e){G("update",e),null!==n[e]&&t&&G("set",e)}))}function ae(){var e=A.map(a.format.to);return 1===e.length?e[0]:e}
-/*! In this file: Calls to functions. All other scope_ files define functions only; */
-return s(v=E,a.cssClasses.target),0===a.dir?s(v,a.cssClasses.ltr):s(v,a.cssClasses.rtl),0===a.ort?s(v,a.cssClasses.horizontal):s(v,a.cssClasses.vertical),d=M(v,a.cssClasses.base),function(e,t){var n=M(t,a.cssClasses.connects);f=[],(m=[]).push(P(n,e[0]));for(var r=0;rn.stepAfter.startValue&&(o=n.stepAfter.startValue-r),i=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===e?o=null:0===e&&(i=null);var a=S.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(a))),null!==i&&!1!==i&&(i=Number(i.toFixed(a))),[i,o]}))},on:$,off:function(e){var t=e&&e.split(".")[0],n=t&&e.substring(t.length);Object.keys(O).forEach((function(e){var r=e.split(".")[0],o=e.substring(r.length);t&&t!==r||n&&n!==o||delete O[e]}))},get:ae,set:ie,reset:function(e){ie(a.start,e)},__moveHandles:function(e,t,n){ee(e,t,L,n)},options:l,updateOptions:function(e,t){var n=ae(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach((function(t){void 0!==e[t]&&(l[t]=e[t])}));var o=D(l);r.forEach((function(t){void 0!==e[t]&&(a[t]=o[t])})),S=o.spectrum,a.margin=o.margin,a.limit=o.limit,a.padding=o.padding,a.pips&&F(a.pips),L=[],ie(e.start||n,t)},target:E,removePips:H,pips:F},a.pips&&F(a.pips),a.tooltips&&(b=f.map(I),$("update",(function(e,t,n){if(b[t]){var r=e[t];!0!==a.tooltips[t]&&(r=a.tooltips[t].to(n[t])),b[t].innerHTML=r}}))),$("update",(function(e,t,n,r,o){_.forEach((function(e){var t=f[e],r=Z(L,e,0,!0,!0,!0),i=Z(L,e,100,!0,!0,!0),s=o[e],u=a.ariaFormat.to(n[e]);t.children[0].setAttribute("aria-valuemin",r.toFixed(1)),t.children[0].setAttribute("aria-valuemax",i.toFixed(1)),t.children[0].setAttribute("aria-valuenow",s.toFixed(1)),t.children[0].setAttribute("aria-valuetext",u)}))})),p}return{version:e,create:function(t,n){if(!t||!t.nodeName)throw new Error("noUiSlider ("+e+"): create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider ("+e+"): Slider was already initialized.");var r=F(t,D(n),n);return t.noUiSlider=r,r}}})?r.apply(t,o):r)||(e.exports=i)},,,,,,,,function(e,t){!function(){var e=Math.PI,t=2*e,n=e/180,r=document.createElement("div");document.body.appendChild(r);var o=self.ConicGradient=function(e){o.all.push(this),e=e||{},this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.repeating=!!e.repeating,this.size=e.size||Math.max(innerWidth,innerHeight),this.canvas.width=this.canvas.height=this.size;var t=e.stops;this.stops=(t||"").split(/\s*,(?![^(]*\))\s*/),this.from=e.from||0;for(var n=0;n0){var i=this.stops[0].clone();i.pos=0,this.stops.unshift(i)}if(void 0===this.stops[this.stops.length-1].pos)this.stops[this.stops.length-1].pos=1;else if(!this.repeating&&this.stops[this.stops.length-1].pos<1){var a=this.stops[this.stops.length-1].clone();a.pos=1,this.stops.push(a)}if(this.stops.forEach((function(e,t){if(void 0===e.pos){for(var n=t+1;this[n];n++)if(void 0!==this[n].pos){e.pos=this[t-1].pos+(this[n].pos-this[t-1].pos)/(n-t+1);break}}else t>0&&(e.pos=Math.max(e.pos,this[t-1].pos))}),this.stops),this.repeating){var s=(t=this.stops.slice())[t.length-1].pos-t[0].pos;for(n=0;this.stops[this.stops.length-1].pos<1&&n<1e4;n++)for(var u=0;u '},get png(){return this.canvas.toDataURL()},get r(){return Math.sqrt(2)*this.size/2},paint:function(){var e,t,r,o=this.context,i=this.r,a=this.size/2,s=0,u=this.stops[s];o.translate(this.size/2,this.size/2),o.rotate(-90*n),o.rotate(this.from*n),o.translate(-this.size/2,-this.size/2);for(var c=0;c<360;){if(c/360+1e-5>=u.pos){do{e=u,s++,u=this.stops[s]}while(u&&u!=e&&c/360+1e-5>=u.pos);if(!u)break;var l=e.color+""==u.color+""&&e!=u;t=e.color.map((function(e,t){return u.color[t]-e}))}r=(c/360-e.pos)/(u.pos-e.pos);var d=l?u.color:t.map((function(t,n){var o=t*r+e.color[n];return n<3?255&o:o}));if(o.fillStyle="rgba("+d.join(",")+")",o.beginPath(),o.moveTo(a,a),l)var f=360*(u.pos-e.pos);else f=.5;var m=c*n,p=(m=Math.min(360*n,m))+f*n;p=Math.min(360*n,p+.02),o.arc(a,a,i,m,p),o.closePath(),o.fill(),c+=f}}},o.ColorStop=function(e,n){if(this.gradient=e,n){var r=n.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/);if(this.color=o.ColorStop.colorToRGBA(r[1]),r[2]){var i=r[3];"%"==i||"0"===r[2]&&!i?this.pos=r[2]/100:"turn"==i?this.pos=+r[2]:"deg"==i?this.pos=r[2]/360:"grad"==i?this.pos=r[2]/400:"rad"==i&&(this.pos=r[2]/t)}r[4]&&(this.next=new o.ColorStop(e,r[1]+" "+r[4]+r[5]))}},o.ColorStop.prototype={clone:function(){var e=new o.ColorStop(this.gradient);return e.color=this.color,e.pos=this.pos,e},toString:function(){return"rgba("+this.color.join(", ")+") "+100*this.pos+"%"}},o.ColorStop.colorToRGBA=function(e){if(!Array.isArray(e)&&-1==e.indexOf("from")){r.style.color=e;var t=getComputedStyle(r).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/);return t&&(t.shift(),(t=t.map((function(e){return+e})))[3]=isNaN(t[3])?1:t[3]),t||[0,0,0,0]}return e}}(),self.StyleFix&&function(){function e(e){var t=document.createElement("p");return t.style.backgroundImage=e,t.style.backgroundImage=PrefixFree.prefix+e,!!t.style.backgroundImage}function t(e,t){var n=new RegExp("(?:repeating-)?"+e+"\\(\\s*((?:\\([^()]+\\)|[^;()}])+?)\\)","g");StyleFix.register((function(e,r){return e.indexOf("-gradient")>-1?e.replace(n,t):e}))}e("linear-gradient(white 0% 50%, black 50% 100%)")||t("(?:linear|radial|conic)-gradient",(function(e,t){var n="";return(t||"").split(/\s*,(?![^(]*\))\s*/).forEach((function(e,t){if(e){n+=""!=n?", ":"";var r=e.split(/ /);3===r.length?n+=r[0]+" "+r[1]+", "+r[0]+" "+r[2]:n+=e}})),e.replace(t,n)})),e("conic-gradient(white, black)")||t("conic-gradient",(function(e,t){return new ConicGradient({stops:t,repeating:e.indexOf("repeating-")>-1})}))}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"textCount",(function(){return i})),n.d(r,"dropdown",(function(){return q})),n.d(r,"formSelectFocus",(function(){return P})),n.d(r,"formUnsubscribe",(function(){return I})),n.d(r,"calendar",(function(){return N})),n.d(r,"selectDate",(function(){return H})),n.d(r,"dragScroll",(function(){return D})),n.d(r,"accordion",(function(){return F})),n.d(r,"notification",(function(){return z})),n.d(r,"printPage",(function(){return R})),n.d(r,"sharePage",(function(){return U})),n.d(r,"shareMenu",(function(){return B})),n.d(r,"mask",(function(){return W})),n.d(r,"pinboard",(function(){return Y})),n.d(r,"bannerParallax",(function(){return V})),n.d(r,"imageInfo",(function(){return Q})),n.d(r,"headerGallery",(function(){return X})),n.d(r,"imageZoomArea",(function(){return $})),n.d(r,"filterToggleShowMore",(function(){return G})),n.d(r,"filterWhittleDown",(function(){return J})),n.d(r,"rangeSlider",(function(){return ee})),n.d(r,"collectionSearch",(function(){return te})),n.d(r,"colorPickerFilter",(function(){return ne})),n.d(r,"showCollectionFilters",(function(){return re})),n.d(r,"showCollectionSearch",(function(){return oe})),n.d(r,"hideCollectionFilters",(function(){return ie})),n.d(r,"hideCollectionSearch",(function(){return ae})),n.d(r,"navMobile",(function(){return se})),n.d(r,"openNavMobile",(function(){return ue})),n.d(r,"closeNavMobile",(function(){return ce})),n.d(r,"infoButtonTrigger",(function(){return le})),n.d(r,"linksBar",(function(){return de})),n.d(r,"mobileSearch",(function(){return fe})),n.d(r,"globalSearch",(function(){return me})),n.d(r,"globalSearchOpen",(function(){return pe})),n.d(r,"globalSearchClose",(function(){return he})),n.d(r,"autocomplete",(function(){return ve})),n.d(r,"newsletter",(function(){return ge})),n.d(r,"openImageFullScreen",(function(){return be})),n.d(r,"blurMyBackground",(function(){return ye})),n.d(r,"loadMore",(function(){return we})),n.d(r,"getUrl",(function(){return Ee})),n.d(r,"triggerMediaModal",(function(){return Le})),n.d(r,"triggerMediaInline",(function(){return _e})),n.d(r,"closeRoadblock",(function(){return xe})),n.d(r,"closeModal",(function(){return Se})),n.d(r,"stickyFilters",(function(){return Ae})),n.d(r,"injectContent",(function(){return Oe})),n.d(r,"clearHistory",(function(){return je})),n.d(r,"addHistory",(function(){return ke})),n.d(r,"maskEmail",(function(){return Te})),n.d(r,"ajaxFormSubmit",(function(){return Ce})),n.d(r,"reportSearchToGoogleTagManager",(function(){return Me})),n.d(r,"mediaPlayPauseVideo",(function(){return qe})),n.d(r,"recaptcha",(function(){return Pe})),n.d(r,"limitSearch",(function(){return Ie})),n.d(r,"searchBarBlock",(function(){return Ne})),n.d(r,"restrictDownload",(function(){return He})),n.d(r,"viewer3D",(function(){return We})),n.d(r,"fixedOnScroll",(function(){return Ye})),n.d(r,"stickySidebar",(function(){return Ve})),n.d(r,"viewer360",(function(){return Je})),n.d(r,"fitText",(function(){return et})),n.d(r,"magazineHeader",(function(){return tt}));var o=n(1),i=function(e){var t=e.querySelector("input"),n=e.querySelector("output");function r(){var e=t.value,r=e.length,o=e.match(/(\r\n|\n|\r)/g);null!==o&&(r+=o.length),n.value=r}this.destroy=function(){t.removeEventListener("input",r),Object(o.n)(this)},this.init=function(){t.addEventListener("input",r,!1),r()}},a=function(e){if(e||e.element||e.target){var t=e.element,n=e.target,r=void 0===e.padding?{left:0,top:0}:e.padding,o=void 0===e.position?"bottom left":e.position,i=e.breakpoints||!1;r.left=void 0===e.padding||void 0===e.padding.left?0:r.left,r.top=void 0===e.padding||void 0===e.padding.top?0:r.top,t.style.opacity=0;document.getElementById("a17").getBoundingClientRect();var a=n.getBoundingClientRect(),s=t.getBoundingClientRect(),u=document.documentElement.scrollTop||document.body.scrollTop,c=0,l=0;"auto"!==r.left?(o.indexOf("left")>-1&&f(),o.indexOf("center")>-1&&(f(),c+=a.width/2-s.width/2-r.left),o.indexOf("right")>-1&&m()):f(),o.indexOf("top")>-1?l=a.top+u-r.top-s.height:d(),u>l&&d(),"auto"!==r.left&&(c+s.width>window.innerWidth?m():c-1&&(Object(o.s)(document,"setScrollDirection:machineScroll",{machineScroll:!0}),t=!0,e=window.pageYOffset,document.getElementById("a17").style.top=-1*e+"px",window.requestAnimationFrame((function(){document.documentElement.classList.add("s-body-locked")})))}),!1),document.addEventListener("body:unlock",(function(){t&&(t=!1,document.getElementById("a17").style.top="",document.documentElement.classList.remove("s-body-locked"),window.scrollTo(0,e),setTimeout((function(){window.scrollTo(0,e),e=0,Object(o.s)(document,"setScrollDirection:machineScroll",{machineScroll:!1})}),1))}),!1)},u=function(){var e;function t(){e?document.activeElement===e||e.contains(document.activeElement)||setTimeout((function(){Object(o.r)(e)}),0):document.removeEventListener("focus",n)}function n(n){try{document.removeEventListener("focus",t)}catch(e){}(n||n.data.element)&&(e=n.data.element,document.addEventListener("focus",t,!0))}document.addEventListener("focus:trap",n,!1),document.addEventListener("focus:untrap",(function(){document.removeEventListener("focus",n),e=null}),!1)},c=function(){var e,t="data-focus-method",n="touch",r="mouse",o="key",i=!1;document.addEventListener("keydown",(function(){i=o}),!0),document.addEventListener("mousedown",(function(){i!==n&&(i=r)}),!0),document.addEventListener("touchstart",(function(){i=n}),!0),document.addEventListener("focus",(function(n){i||(i=e),n.target&&"function"==typeof n.target.setAttribute&&(n.target.setAttribute(t,i),e=i,i=!1)}),!0),document.addEventListener("blur",(function(e){e.target&&"function"==typeof e.target.removeAttribute&&e.target.removeAttribute(t)}),!0),window.addEventListener("blur",(function(){i=!1}))},l=function(){window.history.pushState&&(document.addEventListener("history:replacestate",(function(e){"about:srcdoc"!==e.data.url&&history.replaceState(e.data,"",e.data.url)}),!1),document.addEventListener("history:pushstate",(function(e){history.pushState(e.data,"",e.data.url)}),!1),window.addEventListener("popstate",(function(e){e&&e.state&&e.state.type&&Object(o.s)(document,"ajax:pageload:popstate",e.state)}),!1),Object(o.s)(document,"history:replacestate",{url:location.href,type:"page"}))},d=function(){var e,t,n=!1,r=5e3;function i(){window.picturefill&&window.picturefill(),window.requestAnimationFrame((function(){Object(o.s)(document,"page:updated"),Object(o.s)(document,"loader:complete"),Object(o.s)(document,"ajaxPageLoadMask:hide"),Object(o.s)(document,"ajaxPageLoad:complete"),Object(o.s)(document,"setScrollDirection:machineScroll",{machineScroll:!1})})),n=!1}function a(e,n){document.documentElement.classList.add("s-page-nav-swapping"),setTimeout((function(){var t=document.querySelector("#a17");t.innerHTML=n.querySelector("#a17").innerHTML,t.style.minHeight="",function(e){if(e.documentElement.classList.contains("s-contrast-header")?document.documentElement.classList.add("s-contrast-header"):document.documentElement.classList.remove("s-contrast-header"),e.documentElement.classList.contains("s-filled-logo")?document.documentElement.classList.add("s-filled-logo"):document.documentElement.classList.remove("s-filled-logo"),e.documentElement.classList.contains("s-gallery-header")?document.documentElement.classList.add("s-gallery-header"):document.documentElement.classList.remove("s-gallery-header"),e.documentElement.classList.contains("s-roadblock-defined")){var t=e.querySelector(".g-modal--promo");t&&(Array.prototype.forEach.call(t,(function(e){var t=e.cloneNode(!0);document.body.append(t)})),document.documentElement.classList.add("s-roadblock-defined"))}else document.documentElement.classList.remove("s-roadblock-defined");var n=/p-\S*/g,r=document.documentElement.className.match(n),i=e.documentElement.className.match(n);Object(o.f)(r,(function(e,t){document.documentElement.classList.remove(t)})),Object(o.f)(i,(function(e,t){document.documentElement.classList.add(t)}))}(n),window.requestAnimationFrame((function(){var t=0,n=null;e.popstate&&e.popstate.data.scrollY?t=e.popstate.data.scrollY:window.location.hash?n=document.getElementById(window.location.hash.replace("#","")):e.ajaxScrollTarget&&(n=document.getElementById(e.ajaxScrollTarget)),n&&(t=Math.round(Object(o.i)(n).top)),document.documentElement.scrollTop=t,document.body.scrollTop=t,document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),Object(o.s)(document,"page:updated"),n&&setTimeout((function(){Object(o.r)(n)}),0),i()}))}),1),t=n.title,document.title=t,e.popstate||Object(o.s)(document,"history:pushstate",{url:e.href,type:e.type,title:t}),A17.currentPathname=window.location.pathname,Object(o.s)(document,"gtm:push",{event:"Pageview",url:e.href})}function s(s){if(!A17.ajaxLinksActive)return window.location.href=s.href,!1;if(!n){switch(n=!0,Object(o.s)(document,"shareMenu:close"),Object(o.s)(document,"selectDate:close"),Object(o.s)(document,"fullScreenImage:close"),Object(o.s)(document,"collectionSearch:close"),Object(o.s)(document,"infoButtonInfo:close"),Object(o.s)(document,"modal:close"),Object(o.s)(document,"roadblock:close"),Object(o.s)(document,"globalSearch:close"),Object(o.s)(document,"navMobile:close"),Object(o.s)(document,"dropdown:close"),t=null,null,null,Object(o.s)(document,"ajaxPageLoadMask:show"),Object(o.s)(document,"loader:start"),s.type){case"tab":document.documentElement.classList.add("s-page-nav");break;case"modal":break;default:(u=document.querySelector("#a17")).style.minHeight=u.offsetHeight+"px",document.documentElement.classList.add("s-page-nav")}var u,c=document.querySelector('meta[name="csrf-token"]');c=c?c.getAttribute("content"):"",C({url:s.href,type:"GET",requestHeaders:[{header:"X-CSRF-Token",value:c}],onSuccess:function(t,r,u){try{clearTimeout(e)}catch(e){}try{s.href=u,Object(o.s)(document,"setScrollDirection:machineScroll",{machineScroll:!0});var c=O(t,"native");switch(s.type){case"tab":!function(e,t){var n=document.getElementById(e.ajaxTabTarget);n.innerHTML=t.getElementById(e.ajaxTabTarget).innerHTML;var r=Math.round(Object(o.i)(n).top);Object(o.q)({el:document,offset:r,duration:500,easing:"easeInOut",onComplete:function(){setTimeout((function(){Object(o.r)(n)}),0)}}),document.documentElement.classList.remove("s-page-nav"),Object(o.s)(document,"page:updated"),Object(o.s)(document,"gtm:push",{event:"Pageview",url:e.href}),i()}(s,c);break;case"modal":!function(e,t){document.querySelector("[data-modal]").className="g-modal "+(e.modalClass?e.modalClass:""),document.querySelector("[data-modal-content]").innerHTML=t.querySelector("body").innerHTML,Object(o.s)(document,"modal:show",{opener:e.opener}),i()}(s,c);break;default:a(s,c)}}catch(e){Object(o.s)(document,"loader:error"),Object(o.s)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),n=!1,A17.ajaxLinksFailSafe?location.href=s.href:console.log(e)}},onError:function(t){clearTimeout(e),Object(o.s)(document,"loader:error"),Object(o.s)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),n=!1,A17.ajaxLinksFailSafe?location.href=s.href:console.log(t)}}),e=setTimeout((function(){A17.ajaxLinksFailSafe?location.href=s.href:console.log("Ajax response taking a long time to complete")}),r)}}function u(e,t,n){(t&&Object(o.s)(document,"gtm:push",t),n&&e&&"_blank"!==e.getAttribute("target")&&e.href&&e.href.indexOf("#")<0&&e.href.indexOf("interactive-features")<0&&window.location.href.indexOf("interactive-features")<0)&&(n.preventDefault(),window.open(e.href,"_blank").focus())}document.addEventListener("ajax:getPage",(function(e){e.data.url&&(h(e.data.url,e)?(history.state||e.data.type&&(!e.data.type||"modal"===e.data.type)||Object(o.s)(document,"history:replacestate",{url:location.href,type:e.data.type||"page",scrollY:window.scrollY||0}),s({href:e.data.url,type:e.data.type||"page",popstate:!1,modalClass:e.data.modalClass?e.data.modalClass:null,opener:e.data.opener?e.data.opener:null,ajaxScrollTarget:e.data.ajaxScrollTarget?e.data.ajaxScrollTarget:null})):window.location.href=e.data.url)})),document.addEventListener("ajax:pageload:popstate",(function(e){e.preventDefault(),e.data.type&&"page"!==e.data.type||s({href:e.data.url,type:e.data.type,title:e.data.title,popstate:e})})),document.addEventListener("click",(function(e){var t=m(e.target,"A"),r=S(t);if(A17.ajaxLinksActive){var i=p(t,e);if(i){if(e.preventDefault(),!n){t.classList.contains("checkbox")&&(t.classList.contains("s-checked")?t.classList.remove("s-checked"):t.classList.add("s-checked")),r&&Object(o.s)(document,"gtm:push",r);var a=t.getAttribute("data-ajax-tab-target"),c=t.getAttribute("data-ajax-scroll-target"),l=null;null!==a&&null!==c&&(a=null),null!==a&&((l=document.getElementById(a))||(c=a,a=null)),l||Object(o.s)(document,"history:replacestate",{url:location.href,type:"page",scrollY:window.scrollY||0}),s({href:i.href,type:a?"tab":"page",popstate:!1,link:t,ajaxTabTarget:a||null,ajaxScrollTarget:c||null})}}else u(t,r,e)}else u(t,r,e)}))},f=function(){var e=!1;document.addEventListener("ajaxPageLoadMask:show",(function(){e||(e=!0,document.documentElement.classList.add("s-ajaxPageLoadMask-active"))}),!1),document.addEventListener("ajaxPageLoadMask:hide",(function(){e&&(e=!1,document.documentElement.classList.remove("s-ajaxPageLoadMask-active"))}),!1)},m=function(e,t){for(;e&&e.tagName!==t;)e=e.parentElement;return e},p=function(e,t){if(!e||!t)return!1;var n=e,r=n.href;return"A"===e.tagName&&(!!h(r,t)&&(!n.hasAttribute("data-no-ajax")&&!n.hasAttribute("download")&&((!n.target||"_blank"===n.target)&&(!(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&{href:r,el:n}))))},h=function(e,t){if(!e||"#"===e)return!1;var n=document.createElement("a");if(n.href=e,window.location.protocol!==n.protocol||window.location.hostname!==n.hostname)return!1;var r=t.target;if("A"!==r.tagName){if(r===document)return!0;r=r.closest("a")}return null!==r&&((r.host!==window.location.host||r.pathname!==window.location.pathname||!r.hash)&&(!r.pathname.startsWith("/assets/")&&(!r.pathname.includes("/interactive-features/")&&(!window.location.pathname.includes("/interactive-features/")&&(n=null,!0)))))},v=function(){var e,t=null,n=null,r=0;function o(){r+=.2*(90-r),n.style.width=r+"%",e=setTimeout(o,2e3*Math.random())}function i(){document.body.removeChild(t),t=null,n=null,r=0}document.addEventListener("loader:start",(function(){t&&i(),(t=document.createElement("span")).className="progress-bar",(n=document.createElement("span")).style.opacity=0,t.appendChild(n),document.body.appendChild(t),setTimeout((function(){n.style.opacity=1})),e=setTimeout((function(){r+=.4*(90-r),n.style.width=r+"%",o()}),250)})),document.addEventListener("loader:complete",(function(){try{clearTimeout(e)}catch(e){}n.style.width="100%",setTimeout(i,250)})),document.addEventListener("loader:error",(function(){try{clearTimeout(e)}catch(e){}n.style.width="0%",setTimeout(i,250)}))},g=function(){var e=document.documentElement,t=0,n=!1,r=!1,i=!1,a=!1,s=0,u=-1,c={25:{pos:0,hit:!1},50:{pos:0,hit:!1},75:{pos:0,hit:!1},100:{pos:0,hit:!1}};document.addEventListener("setScrollDirection:machineScroll",(function(e){window.requestAnimationFrame((function(){t=-1,a=e.data.machineScroll}))}),!1),document.addEventListener("page:updated",(function(e){u=-1}),!1),function l(){var d=document.documentElement.scrollTop||document.body.scrollTop;if(s=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight,u!=s&&(u=s,function(){for(var e in c){var t=100===e?(e-5)/100:e/100;c[e].pos=parseInt(s*t,10),c[e].hit=!1}}()),d===t||a)t=d;else{if(s>150)for(var f in c)d>=c[f].pos&&!c[f].hit&&(c[f].hit=!0,-1===window.location.href.indexOf("/interactive-features")&&Object(o.s)(document,"gtm:push",{event:(e.classList.contains("p-artworks-show")?"artwork-":"")+f+"%",eventCategory:"scroll-tracking"}));e.classList.contains("s-unsticky-header")||(d>100&&!r?(e.classList.add("s-header-hide"),r=!0):d<=100&&r&&(e.classList.remove("s-header-hide"),r=!1)),d>500&&!i?(e.classList.add("s-allow-top-link"),i=!0):d<=500&&i&&(e.classList.remove("s-allow-top-link"),i=!1),d>t+10&&"down"!==n?(n="down",e.classList.remove("s-scroll-direction-up"),e.classList.add("s-scroll-direction-down")):d-1&&(i=o.o.updateParameter(i,"enablejsapi","1"),i=o.o.updateParameter(i,"origin",window.location.origin)),r.src=i,t.querySelector("[data-modal-content]").innerHTML="",t.querySelector("[data-modal-content]").appendChild(r),i.indexOf("youtube.com")>-1&&A(r)}catch(e){console.log(e),t.querySelector("[data-modal-content]").innerHTML=n}return!0}return!1}(i)}n&&(Object(o.s)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(e),setTimeout((function(){Object(o.r)(t)}),0),Object(o.s)(document,"focus:trap",{element:t}),Object(o.s)(document,"page:updated")})))}}),!1),window.addEventListener("resized",(function(){n&&(console.log("resized"),t.style.display="none",window.requestAnimationFrame((function(){t.style.display=""})))}),!1),window.addEventListener("keyup",(function(t){document.documentElement.classList.contains(e)&&27===t.keyCode&&Object(o.s)(document,"modal:close")}),!1)},E=function(e){return"all"===e||(e===A17.currentMediaQuery||("small+"===e&&A17.currentMediaQuery.indexOf("xsmall")<0||("medium+"===e&&A17.currentMediaQuery.indexOf("small")<0||("large+"===e&&A17.currentMediaQuery.indexOf("small")<0&&A17.currentMediaQuery.indexOf("medium")<0||("small-"===e&&A17.currentMediaQuery.indexOf("small")>=0||("medium-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery)||"large-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery||"large"===A17.currentMediaQuery)))))))},L=function(e){var t=document.documentElement.classList.contains("s-collection-filters-active");document.addEventListener("collectionFilters:open",(function(){t||(t=!0,E("small-")?(Object(o.s)(document,"body:lock",{breakpoints:"all"}),!0,window.requestAnimationFrame((function(){document.documentElement.classList.add("s-collection-filters-active");var e=document.getElementById("collectionFilters");e&&(setTimeout((function(){Object(o.r)(e)}),0),Object(o.s)(document,"focus:trap",{element:e})),Object(o.s)(document,"collectionFilters:visible")}))):(document.documentElement.classList.add("s-collection-filters-active"),Object(o.s)(document,"collectionFilters:visible")))}),!1),document.addEventListener("collectionFilters:close",(function(){t&&(Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),setTimeout((function(){Object(o.r)(document.getElementById("a17"))}),0),!1,document.documentElement.classList.remove("s-collection-filters-active"),Object(o.s)(document,"collectionFilters:hidden"),t=!1)}),!1),document.addEventListener("collectionFilters:toggle",(function(){t?Object(o.s)(document,"collectionFilters:close"):Object(o.s)(document,"collectionFilters:open")}),!1),document.addEventListener("mediaQueryUpdated",(function(){t&&(Object(o.s)(document,"collectionFilters:close"),Object(o.s)(document,"collectionFilters:open"))}),!1)},_=function(e){var t=e&&e.icon?e.icon:null,n=e&&e.text?e.text:null,r=e&&e.type?"m-notification--"+e.type:null;if(n){var i="",a="";a=''.replace(/{{ text }}/gi,n),r&&(a=a.replace(/{{ type }}/gi,r)),t&&(i=' '.replace(/{{ icon }}/gi,e.icon),a=a.replace(/{{ icon }}/gi,i));var s=document.getElementById("content");s.insertAdjacentHTML("afterbegin",a),setTimeout((function(){Object(o.r)(s.firstChild)}),0),Object(o.s)(document,"page:updated")}},x=function(){document.addEventListener("gtm:push",(function(e){e.data&&(window.dataLayer=window.dataLayer||[],"Pageview"===e.data.event?window.dataLayer.push(e.data):(e.data.eventPageTitle=document.title.replace(/ \| The Art Institute of Chicago/gi,""),e.data.eventPagePathName=window.location.pathname,e.data.eventPageUrl=window.location.href,"production"!==A17.env&&console.log("gtm:dataLayerPush",e.data),window.dataLayer.push({event:"dataLayerPush",data:e.data})))}),!1)},S=function(e){if(!e||!e.dataset)return!1;var t=!1,n={};for(var r in e.dataset)if(e.dataset.hasOwnProperty(r)&&r.indexOf("gtm")>-1){var o=r.replace(/^gtm/,""),i=e.dataset[r];o=o.charAt(0).toLowerCase()+o.slice(1),"::document.title::"===i&&(i=document.title.replace(/ \| The Art Institute of Chicago/gi,"")),n[o]=i,t=!0}return!!t&&n},A=function(e){var t,n,r={25:!1,50:!1,75:!1,100:!1};function i(){var e=Math.round(t.getCurrentTime()/t.getDuration()*100);for(var n in r){e>=(100===n?99:n)&&!r[n]&&(r[n]=!0,Object(o.s)(document,"gtm:push",{event:n+"%",eventCategory:"video-engagement"}))}}function a(e){if(1===t.getPlayerState())n=setInterval(i,250),Object(o.s)(document,"gtm:push",{event:"playing",eventCategory:"video-engagement"});else{2===t.getPlayerState()&&Object(o.s)(document,"gtm:push",{event:"paused",eventCategory:"video-engagement"});try{clearInterval(n)}catch(e){}}}if(!document.getElementById("youtubeapijs")){var s=document.createElement("script");s.src="https://www.youtube.com/iframe_api",s.id="youtubeapijs";var u=document.getElementsByTagName("script")[0];u.parentNode.insertBefore(s,u)}e.id||(e.id="youtube_"+Math.random().toString(36).substr(2,9)),function n(){A17.onYouTubeIframeAPIReady?t=new YT.Player(e.id,{origin:window.location.origin,events:{onStateChange:a}}):setTimeout(n,250)}()},O=function(e,t){if("native"===t)return(new DOMParser).parseFromString(e,"text/html");var n=document.implementation.createHTMLDocument("");return e.toLowerCase().indexOf("-1?n.documentElement.innerHTML=e:n.body.innerHTML=e,n},j=function(){function e(){var e=document.querySelector("a"),t=document.querySelector("h1");if(t){var n=document.querySelector("#content-h1");n&&n.forEach((function(e){t.removeAttr("id")})),t.setAttribute("id","content-h1"),e&&e.setAttribute("href","#content-h1")}else e&&e.setAttribute("href","#content")}e(),document.addEventListener("DOMContentLoaded",e,!1),document.addEventListener("ajaxPageLoad:complete",e,!1)},k=function(){function e(e){var t=e.firstElementChild.offsetHeight;e.style.height=t+"px"}function t(){this.removeAttribute("style"),this.removeEventListener("transitionend",t),Object(o.s)(document,"page:updated")}function n(){for(var e=document.getElementsByClassName("video-js"),t=0,n=e.length;t0&&(t.style["padding-top"]=e.offsetHeight+"px")}document.addEventListener("ajaxPageLoad:complete",e,!1),window.addEventListener("resized",e,!1),e()},C=function(e){var t=e,n=new XMLHttpRequest,r=t.url;if(t.queryString="",void 0!==t.data){if(!o.default.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=o.default.fromObject(t.data)}if("POST"!==t.type&&(r+=r.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),n.open(t.type,r,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var i=0;i=200&&n.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,n.responseText,n.status,n.responseURL):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status,n.responseURL),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status)},n.send("POST"===t.type?t.queryString.replace("?",""):"")},M=function(e){var t="s-modal-active",n="s-roadblock-active",r="s-roadblock-defined",i=document.getElementById("modal"),a=document.getElementById("slider-promo"),s=!1,u=!1,c=null,l=null,d=!1,f="has_seen_lightbox";function m(){if(document.documentElement.classList.contains(r)){var e=document.getElementsByClassName("g-slider--promo--template");if(!(e.length<1)){var t=o.b.read(f)||"",n=Array.prototype.map.call(e,(function(e){return e.dataset.expires})),i=n.every((function(e,t,n){return e===n[0]}));if(!(t&&i&&n[0]>0)){var a=Array.prototype.map.call(e,(function(e){return e.dataset.geotarget}));d=!1,a.includes("all")?p("all"):null!==l?p(l?"local":"not-local"):(d=!0,Object(o.a)({url:"/api/v1/geotarget",type:"GET",onSuccess:function(e){p((l=null===(l=JSON.parse(e).is_local)||l)?"local":"not-local"),d=!1},onError:function(e){p("local"),d=!1}})),setTimeout(h,3e3)}}}}function p(e){var t=document.querySelector('.g-slider--promo--template[data-geotarget="'+e+'"]');if(t)a.dataset.expires=t.dataset.expires,a.innerHTML=t.innerHTML,Object(o.s)(a,"content:updated",{el:a}),document.documentElement.classList.add(r);else switch(e){case"local":p("all");break;case"all":document.documentElement.classList.remove(r)}}function h(e){if(document.documentElement.classList.contains(r)){if(d){if(!e)return void setTimeout((function(){h(!0)}),2e3);p("local")}if(""!==a.innerHTML){d=!1;var t=o.b.read(f)||"",i=parseInt(a.getAttribute("data-expires"))/60/60/24;if(!(t&&i>0)){document.documentElement.classList.add(n),u=null!==a.querySelector(".g-slider--promo__variation--newsletter"),c=null,s=!0,a.querySelector("form").addEventListener("submit",v,!0),i>0?o.b.create(f,!0,i):o.b.delete(f);var l=a.getElementsByTagName("button")[0];setTimeout((function(){l.classList.remove("btn--secondary"),l.classList.add("btn--animating"),setTimeout((function(){l.classList.remove("btn--animating")}),900)}),1200)}}}}function v(e){var t=document.getElementById("edit-submitted-first-name"),n=document.getElementById("edit-submitted-last-name"),r=document.getElementById("edit-submitted-mail"),i=document.getElementById("edit-submitted-tlcsource");if(u)return function(e){var t=a.querySelector("form");e.preventDefault(),e.stopPropagation(),b(),n=a.querySelector("button"),n.classList.add("s-loading"),n.setAttribute("disabled","disabled");var n;var r=Object(o.m)(t);Object(o.a)({url:t.action||"/subscribe",type:"POST",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"},{header:"X-CSRF-Token",value:document.querySelector("meta[name=csrf-token]").getAttribute("content")||""}],data:r,onSuccess:function(e){try{e=JSON.parse(e),t.classList.remove("s-loading"),t.setAttribute("disabled","disabled"),t.querySelector("input[name=email]").value="",y("success",e.message||e.email),Object(o.s)(document,"gtm:push",{event:"sign-up",eventCategory:"subscribe"})}catch(t){console.error("Error submitting newsletter sign up (a)"),console.log(t,e),y("error")}g()},onError:function(e){try{y("error",(e=JSON.parse(e)).message||e.email)}catch(t){console.error("Error submitting newsletter sign up (b)"),console.log(e,t),y("error")}g()}})}(e);var s=encodeURIComponent(JSON.stringify({firstname:t?t.value:null,lastname:n?n.value:null,email:r?r.value:null,tlcsource:i?i.value:null}));s+=";domain=.artic.edu",o.b.create("tlc_lb_signup",s,30);var c=S(e.target);c&&Object(o.s)(document,"gtm:push",c),Object(o.s)(document,"roadblock:close")}function g(){var e=a.querySelector("button");e.classList.remove("s-loading"),e.removeAttribute("disabled")}function b(){a.classList.remove("g-slider--msg-active");var e=a.querySelector(".g-slider--promo__variation--newsletter"),t=a.querySelector("form");c&&(e.removeChild(c),c=null),t.classList.remove("s-success"),t.classList.remove("s-error")}function y(e,t){var n=a.querySelector(".g-slider--promo__variation--newsletter");b();var r=document.createElement("div");r.className="g-slider__msg__content",(c=document.createElement("div")).className="g-slider__msg f-buttons","success"===e?(c.className+=" g-slider__msg--success",r.textContent=t||"Successfully signed up to the newsletter",n.classList.add("s-success")):"error"===e&&(c.className+=" g-slider__msg--error",r.textContent=t||"Error signing up to the newsletter",n.classList.add("s-error")),a.classList.add("g-slider--msg-active"),c.append(r),n.prepend(c)}document.addEventListener("roadblock:close",(function(){document.documentElement.classList.remove(n),s&&(Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),document.documentElement.classList.remove(t),setTimeout((function(){Object(o.r)(document.getElementById("a17"))}),0),setTimeout((function(){i.className="g-slider",i.querySelector("[data-modal-content]").innerHTML=""}),300),s=!1)}),!1),window.addEventListener("keyup",(function(e){document.documentElement.classList.contains(n)&&27===e.keyCode&&Object(o.s)(document,"roadblock:close")}),!1),document.addEventListener("ajaxPageLoad:complete",m,!1),m()},q=function(e){var t=!1,n=!1,r=!0,i=e.getAttribute("data-dropdown-breakpoints")||"all";function a(t){r&&(t&&t.stopPropagation(),(t.target.classList.contains("dropdown__trigger")?t.target:t.target.parentNode).firstElementChild.setAttribute("aria-expanded","true"),Object(o.s)(document,"dropdown:close"),e.classList.add("s-active"),setTimeout((function(){Object(o.r)(e.querySelector("ul"))}),0),n=!0)}function s(t){t&&t.data.el&&t.data.el===e&&r&&!n&&a()}function u(t){if(n){if(t){var r=null;"focus"===t.type&&"INPUT"===document.activeElement.tagName&&(r=document.activeElement).blur(),t.stopPropagation(),r&&window.requestAnimationFrame((function(){r.focus()}))}(t.target.classList.contains("dropdown__trigger")?t.target:t.target.parentNode).firstElementChild.setAttribute("aria-expanded","false"),e.classList.remove("s-active"),n=!1}}function c(e){n&&u()}function l(t){document.activeElement===e||e.contains(document.activeElement)?(t.stopPropagation(),n?document.activeElement!==e&&document.activeElement!==e.firstElementChild||(u(t),setTimeout((function(){Object(o.r)(e.parentNode)}),0)):a(t)):u(t)}function d(t){document.activeElement!==e&&!e.contains(document.activeElement)&&n&&u(t)}function f(){t&&(n=!1,document.removeEventListener("focus",l),document.removeEventListener("click",d),document.removeEventListener("dropdown:open",s),document.removeEventListener("dropdown:close",c),t=!1)}function m(){!t&&E(i)?t||(e.setAttribute("tabindex","0"),n=e.classList.contains("s-active"),document.addEventListener("focus",l,!0),document.addEventListener("click",d,!1),document.addEventListener("dropdown:open",s,!1),document.addEventListener("dropdown:close",c,!1),t=!0):t&&!E(i)&&f()}this.destroy=function(){document.removeEventListener("mediaQueryUpdated",m),f(),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("mediaQueryUpdated",m,!0),m()}},P=function(e){function t(){e.classList.add("s-focus")}function n(){e.classList.remove("s-focus")}this.destroy=function(){e.querySelector("select").removeEventListener("focus",t),e.querySelector("select").removeEventListener("blur",n),A17.Helpers.purgeProperties(this)},this.init=function(){e.querySelector("select").addEventListener("focus",t,!1),e.querySelector("select").addEventListener("blur",n,!1)}},I=function(e){function t(t){!function(t){t.preventDefault(),t.stopPropagation(),Object(o.f)(document.querySelectorAll('input[type=checkbox][name^="subscriptions[]"]:not([id="subscriptions-OptEnews"])'),(function(t,n){"true"===n.getAttribute("disabled")?(n.removeAttribute("disabled"),e.querySelector('input[type=checkbox][name="unsubscribe"]').checked=!1):(n.setAttribute("disabled","true"),n.removeAttribute("checked"),n.checked=!1,e.querySelector('input[type=checkbox][name="unsubscribe"]').checked=!0)}))}(t)}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},N=function(e){e.getAttribute("data-calendar-url");var t,n,r,i,a,s,u,c,l=0,d=[],f=!1,m=[],p=[],h="",v={},g="single",b="start";function y(e){return new Date(parseInt(e.substring(0,4)),parseInt(e.substring(4,6))-1,parseInt(e.substring(6,8)))}function w(){r>11&&(r=0,i++),r<0&&(r=11,i--)}function E(e,r,i){new Date(r,i);var a=1===new Date(r,1,29).getMonth();p[1]=a?29:28;for(var s=new Date(r,i).getDay(),u=p[i]+s;u%7>0;)u++;h="";for(var c=1;c<=u;c++){var l="",d="";if(c<=s||c>p[i]+s)l=" ";else{var f=c-s,g=new Date(r,i,f),b=g.getTime()===t.getTime(),y=g.getTime()=v.end.dateObj.getTime())&&(d+=" s-range"),b||!y){var w=m[i]+" "+f+", "+r,E=i+1;E=E<10?"0"+E:E.toString();var L=f<10?"0"+f:f.toString();l=''+f+" "}else l=f}h=h+''+l+" \n"+(0!==c&&c!==u&&c%7==0?" \n\n":"")}h+=" ",e.querySelector("[data-calendar-title]").textContent=m[i]+" "+r,e.querySelector("tbody").innerHTML=h}function L(e,t){if(d.length!==l)for(var n=0;ne.clientWidth)?e.classList.add("s-scrollable"):(e.classList.remove("s-scrollable"),e.classList.remove("s-dragging"),e.classList.remove("s-mousedown"),e.parentElement.classList.remove("s-scroll-start"),e.parentElement.classList.remove("s-scroll-end"))}function m(t,n){if(u){var o=r-t;e.scrollLeft=o,r=o}}function p(){u&&!i&&(Math.abs(s)>0&&(s=s>0?s-1:s+1),Math.abs(s)>0&&(m(s),window.requestAnimationFrame(p)))}function h(e){u&&!a&&(e.preventDefault(),e.stopPropagation())}function v(t){u&&(t.preventDefault(),e.classList.add("s-mousedown"),s=0,r=e.scrollLeft,o=t.clientX,i=!0)}function g(t){u&&(i=!1,Math.abs(s)>0&&window.requestAnimationFrame(p),e.classList.remove("s-dragging"),e.classList.remove("s-mousedown"),setTimeout((function(){a=!0}),50))}function b(t){u&&i&&(m(s=-o+t.clientX),o=t.clientX,a=!(Math.abs(s)>3),e.classList.add("s-dragging"))}function y(){(r=e.scrollLeft)!==c&&(c=r,r>0?(e.parentElement.classList.add("s-scroll-start"),t&&(t.disabled=!1)):(e.parentElement.classList.remove("s-scroll-start"),t&&(t.disabled=!0)),e.clientWidth+r>=e.scrollWidth?(e.parentElement.classList.add("s-scroll-end"),n&&(n.disabled=!0)):(e.parentElement.classList.remove("s-scroll-end"),n&&(n.disabled=!1)))}function w(t){e.scrollTo({top:0,left:Math.max(e.scrollLeft-e.clientWidth*d,0),behavior:"smooth"})}function E(t){e.scrollTo({top:0,left:Math.min(e.scrollLeft+e.clientWidth*d,e.scrollWidth),behavior:"smooth"})}this.destroy=function(){e.removeEventListener("click",h),e.removeEventListener("mousedown",v),e.removeEventListener("scroll",y),window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",b),window.removeEventListener("resized",f);for(var r=0;r0){var a=i.indexOf(n);if(a>-1)(i[a+1]||i[0]).focus()}}}(document.activeElement)}}function c(){e.addEventListener("click",a,!1),e.addEventListener("keyup",s,!1),window.addEventListener("keyup",u,!1),function(){if(window.location.hash&&"#"!==window.location.hash){var t=document.getElementById(window.location.hash.replace(/#/gi,""));if(e.contains(t)){var n=Math.round(Object(o.i)(t).top);window.scrollTo(0,n),t.click()}}}()}this.destroy=function(){e.removeEventListener("click",a),e.removeEventListener("keyup",s),window.removeEventListener("keyup",u),A17.Helpers.purgeProperties(this)},this.init=function(){c()}},z=function(e){var t=e.querySelectorAll("[data-notification-closer]");function n(){this.parentNode.removeChild(this),e.removeEventListener("transitionend",n)}function r(r){r.preventDefault(),r.stopPropagation(),e.classList.add("s-hide"),e.addEventListener("transitionend",n,!1);var i=Array.prototype.map.call(t,(function(e){return e.dataset.expires}))[0];i>0?Object(o.a)({url:"/api/v1/cookie/notification/"+i,type:"GET"}):Object(o.a)({url:"/api/v1/cookie/notification/-3600",type:"GET"})}this.destroy=function(){Object(o.f)(t,(function(e,t){t.removeEventListener("click",r)})),t=void 0,Object(o.n)(this)},this.init=function(){Object(o.f)(t,(function(e,t){t.addEventListener("click",r,!1)}))}},R=function(e){function t(e){e.preventDefault();window.open(o.o.updateParameter(window.location.href,"print","true"),"AIC_printWindow")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},U=function(e){var t,n,r=document.getElementById("shareMenu"),i=!1;function s(){a({element:r,target:e,position:"top left",padding:{top:12},breakpoints:{xsmall:!1,small:!1,medium:!0,large:!0,xlarge:!0}})}function u(){i&&setTimeout(s,100)}function c(){i&&(d(),f())}function l(e){t&&n&&("default"===e?(t.setAttribute("class",n),t.querySelector("use").setAttribute("xlink:href","#"+n)):(t.setAttribute("class","icon--close"),t.querySelector("use").setAttribute("xlink:href","#icon--close")))}function d(){i&&(document.documentElement.classList.remove("s-shareMenu-active"),Object(o.s)(document,"body:unlock"),r.removeAttribute("style"),Object(o.s)(document,"focus:untrap"),setTimeout((function(){Object(o.r)(e.parentNode)}),0),l("default"),e.classList.remove("s-active"),e.setAttribute("aria-label","Share page"),i=!1)}function f(t){t&&(t.preventDefault(),t.stopPropagation()),e.blur(),i?d():(Object(o.s)(document,"body:lock",{breakpoints:"xsmall small"}),window.requestAnimationFrame((function(){i=!0,e.classList.add("s-active"),l("active"),document.documentElement.classList.add("s-shareMenu-active"),s(),setTimeout((function(){Object(o.r)(r)}),0),Object(o.s)(document,"focus:trap",{element:r}),Object(o.s)(r,"shareMenu:opened",{url:e.getAttribute("data-share-url"),title:e.getAttribute("data-share-title")}),e.setAttribute("aria-label","Close share page menu")})))}function m(e){e.preventDefault(),e.stopPropagation(),function(e){i?d():f(e)}(e)}function p(e){i&&(e.preventDefault(),e.stopPropagation(),d())}function h(e){var t="INPUT"===e.target.tagName;i&&27===e.keyCode&&!t&&d()}this.destroy=function(){e.removeEventListener("click",m),document.removeEventListener("shareMenu:close",d),document.removeEventListener("click",p),window.removeEventListener("resized",u),document.removeEventListener("mediaQueryUpdated",c),window.removeEventListener("keyup",h),A17.Helpers.purgeProperties(this)},this.init=function(){t=e.querySelector("svg[class*=icon--]"),n=t?t.getAttribute("class"):null,e.addEventListener("click",m,!1),document.addEventListener("shareMenu:close",d,!1),document.addEventListener("click",p,!1),window.addEventListener("resized",u,!1),document.addEventListener("mediaQueryUpdated",c,!1),window.addEventListener("keyup",h,!1)}},B=function(e){var t,n,r,i=[],a="%0D%0A";function s(){return Object(o.e)(n)}function u(){return Object(o.e)(r)}function c(e){e.preventDefault(),e.stopPropagation();var r=e.target,a=e.target.getAttribute("data-shareMenu");e.target.blur(),"copy"===a?Object(o.c)(n,"Copied!"):Object(o.f)(i,(function(n,r){r.name===a&&function(e,n){n||(n={});var r=n.width||575,o=n.height||400,i=(window.outerWidth-r)/2,a="status=1,width="+r+",height="+o+",top="+(window.outerHeight-o)/2+",left="+i;t&&!t.closed&&t.close(),setTimeout((function(){(t=window.open(e,"AIC_Share",a)).opener=null}),250)}(e.target.href,r.windowOptions)}));var s=S(r);s&&Object(o.s)(document,"gtm:push",s),Object(o.s)(document,"shareMenu:close")}function l(t){n=window.location.href,r=document.title,t&&t.data&&(n=t.data.url||window.location.href,r=t.data.title||document.title),Object(o.f)(i,(function(t,n){var r=e.querySelector("[data-shareMenu="+n.name+"]");r&&(r.href=n.href(),r.setAttribute("target","_blank"))}))}this.destroy=function(){e.removeEventListener("click",c),e.removeEventListener("shareMenu:opened",l),A17.Helpers.purgeProperties(this)},this.init=function(){i.push({name:"facebook",href:function(){return"https://www.facebook.com/sharer/sharer.php?u="+s()},windowOptions:{}}),i.push({name:"twitter",href:function(){return"https://twitter.com/intent/tweet?url="+s()+"&text="+u()+(e.getAttribute("data-share-twitter-via")?"&via="+e.getAttribute("data-share-twitter-via"):"")},windowOptions:{height:253}}),i.push({name:"google",href:function(){return"https://plus.google.com/share?url="+s()},windowOptions:{width:515,height:505}}),i.push({name:"pinterest",href:function(){var e=document.getElementsByTagName("img")[0];return"http://pinterest.com/pin/create/button/?url="+s()+"&media="+Object(o.e)(e.getAttribute("data-pin-media")||e.getAttribute("src")||"")+"&description="+u()},windowOptions:{width:750,height:675}}),i.push({name:"email",href:function(){return"mailto:?Subject="+u()+"&Body="+Object(o.e)()+a+a+s()+a+a},windowOptions:{}}),e.addEventListener("click",c,!1),e.addEventListener("shareMenu:opened",l,!1),l()}},W=function(e){function t(t){t.preventDefault(),t.stopPropagation(),e.blur(),Object(o.s)(document,"shareMenu:close"),Object(o.s)(document,"selectDate:close"),Object(o.s)(document,"fullScreenImage:close"),Object(o.s)(document,"collectionSearch:close"),Object(o.s)(document,"collectionFilters:close"),Object(o.s)(document,"infoButtonInfo:close"),Object(o.s)(document,"modal:close"),Object(o.s)(document,"roadblock:close"),Object(o.s)(document,"globalSearch:close"),Object(o.s)(document,"navMobile:close"),Object(o.s)(document,"dropdown:close")}this.destroy=function(){e.removeEventListener("touchend",t),e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("touchend",t,!1),e.addEventListener("click",t,!1)}},Y=function(e){var t,n={},r=0,i=0,a=!1,s=!1,u=(e.className,e.getAttribute("data-pinboard-option-layout")),c=/([0-9])-col@(\w*)/gi;function l(e){for(var t;null!==(t=c.exec(e));)n[t[2]]=t[1]}function d(n){var a=e.children;if(0!==a.length){var u=e.firstElementChild,c=u.offsetWidth,l=(e.offsetWidth-c*r)/(r-1);u.classList.add("s-repositioning");var d,f,m=(d=u,f=window.getComputedStyle(d),parseInt(f.getPropertyValue("margin-top")));u.classList.remove("s-repositioning"),m="number"==typeof m?m:60,i=0,Object(o.f)(a,(function(r,a){if(!1===a.classList.contains("s-positioned")||n){var u,d,f;a.style.height="auto",s?(u=t[i],f=(d=i)*(c+l),i=iv?v+"px":g+"px"}var b=a.offsetHeight;a.style.left=Math.round(f)+"px",a.style.top=Math.round(u)+"px",a.style.height=Math.round(b)+"px",setTimeout((function(){a.classList.add("s-positioned")}),250),t[d]=u+b+m,e.style.height=function(e){return Math.max.apply(Math,e)}(t)+"px",Object(o.s)(document,"page:updated")}var y}))}}function f(){if(r=n[A17.currentMediaQuery]){t=[];for(var i=0;i0){var s=Math.round(n-a/(window.innerHeight+i.height)*n);t.style.transform="translate3D(0px, "+s+"px, 0px)"}}window.requestAnimationFrame(o)}this.destroy=function(){r=!1,A17.Helpers.purgeProperties(this)},this.init=function(){r=!0,t=e.querySelector("[data-parallax-img]"),window.requestAnimationFrame(o)}},Q=function(e){var t=e.nextElementSibling,n=!1;function r(){n?(e.setAttribute("aria-expanded","false"),e.setAttribute("aria-selected","false"),t.setAttribute("aria-hidden","true"),n=!1):(e.setAttribute("aria-expanded","true"),e.setAttribute("aria-selected","true"),t.setAttribute("aria-hidden","false"),n=!0)}function o(){e.blur(),r()}function i(){t.blur(),r()}this.destroy=function(){e.removeEventListener("click",o),t.removeEventListener("click",i),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",o,!1),t.addEventListener("click",i,!1)}},X=function(e){var t={},n={},r=0;function i(){var o=t.hero.querySelector("img");o.removeEventListener("load",i),o.setAttribute("srcset",n[r].srcset),e.classList.remove("s-updating")}function a(a){Object(o.f)(t.thumbButtons,(function(e,t){e!==r?(n[e].active=!1,t.removeAttribute("disabled")):(n[e].active=!0,t.setAttribute("disabled","disabled"))})),Object(o.f)(t.share,(function(e,t){t.setAttribute("data-share-url",n[r].shareUrl),t.setAttribute("data-share-title",n[r].shareTitle)})),a||(e.classList.add("s-updating"),setTimeout((function(){var e,o=t.hero.querySelector("img");o.removeAttribute("srcset"),o.removeAttribute("data-srcset"),o.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",o.addEventListener("load",i,!1),o.src=n[r].src,o.width=n[r].width,o.height=n[r].height,o.alt=n[r].alt,e=document.createElement("span"),n[r].credit?(n[r].creditUrl&&((e=document.createElement("a")).href=n[r].creditUrl),e.innerHTML=n[r].credit||n[r].creditUrl):e.innerHTML="",e.className="m-article-header__img-credit f-caption",e.setAttribute("data-gallery-credit",""),t.credit.parentNode.replaceChild(e,t.credit),t.credit=e}),150))}function s(e){"BUTTON"===e.target.tagName&&(e.preventDefault(),r=Object(o.h)(e.target,t.thumbButtons),a(),Object(o.s)(document,"gtm:push",{event:"artwork-alternate-image",eventCategory:"in-page"}))}function u(e){var t=document.createElement("a");document.body.appendChild(t),t.download=n[r].downloadName,t.href=n[r].downloadUrl,t.setAttribute("target","_blank"),t.click(),document.body.removeChild(t),Object(o.s)(document,"gtm:push",{event:"artwork-download",eventCategory:"in-page"})}function c(e){e.preventDefault(),Object(o.s)(document,"fullScreenImage:open",{img:n[r]})}function l(){a(!0)}function d(){t.hero=e.querySelector("[data-gallery-hero]")||!1,t.credit=e.querySelector("[data-gallery-credit]")||!1,t.fullscreen=e.querySelectorAll("[data-gallery-fullscreen]")||!1,t.download=e.querySelectorAll("[data-gallery-download]")||!1,t.share=e.querySelectorAll("[data-gallery-share]")||!1,t.thumbs=e.querySelector("[data-gallery-thumbs]")||!1,t.thumbButtons=t.thumbs.querySelectorAll("button")||!1,Object(o.f)(t.thumbButtons,(function(e,t){var o=t.getAttribute("disabled");o&&(r=e),n[e]={src:t.getAttribute("data-gallery-img-src")||t.nextElementSibling.getAttribute("src")||"",srcset:t.getAttribute("data-gallery-img-srcset")||t.nextElementSibling.getAttribute("srcset")||"",width:t.getAttribute("data-gallery-img-width")||t.nextElementSibling.getAttribute("width")||"",height:t.getAttribute("data-gallery-img-height")||t.nextElementSibling.getAttribute("height")||"",credit:t.getAttribute("data-gallery-img-credit")||"",alt:t.getAttribute("data-gallery-img-alt")||t.nextElementSibling.getAttribute("alt")||"",creditUrl:t.getAttribute("data-gallery-img-credit-url")||"",shareUrl:t.getAttribute("data-gallery-img-share-url")||"",shareTitle:t.getAttribute("data-gallery-img-share-title")||"",downloadUrl:t.getAttribute("data-gallery-img-download-url")||"",downloadName:t.getAttribute("data-gallery-img-download-name")||"",iiifId:t.getAttribute("data-gallery-img-iiifId")||t.nextElementSibling.getAttribute("data-gallery-img-iiifId")||null,active:o},""!==n[e].shareUrl&&"#"!==n[e].shareUrl||(n[e].shareUrl=window.location.href),""===n[e].shareTitle&&(n[e].shareTitle=document.title),""!==n[e].downloadUrl&&"#"!==n[e].downloadUrl||(n[e].downloadUrl=n[e].srcset.split(" ")[0]),""===n[e].downloadName&&(n[e].downloadName="image")})),t.thumbs&&t.thumbs.addEventListener("click",s,!1),t.download&&Object(o.f)(t.download,(function(e,t){t.addEventListener("click",u,!1)})),t.fullscreen&&Object(o.f)(t.fullscreen,(function(e,t){t.addEventListener("click",c,!1)})),document.addEventListener("resized",l,!1),a(!0)}this.destroy=function(){t.thumbs.removeEventListener("click",s),t.download.removeEventListener("click",u),t.fullscreen.removeEventListener("click",c),document.removeEventListener("resized",l),t={},n={},Object(o.n)(this)},this.init=function(){d()}},$=function(e){var t,n,r,i,a,s,u,c=null,l=!1,d=0,f=0;function m(n){l&&(Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),document.documentElement.classList.remove("s-fullscreenImage-active"),setTimeout((function(){Object(o.r)(document.getElementById("a17"))}),0),e.classList.remove("s-zoomable"),a.removeAttribute("width"),a.removeAttribute("height"),a.removeAttribute("srcset"),a.removeAttribute("sizes"),a.removeAttribute("src"),a.classList.remove("restrict"),a.removeEventListener("contextmenu",h),a.removeEventListener("mousedown",h),t&&(t.removeAllHandlers(),t.destroy(),t=null,s.innerHTML=""),c=null,l=!1)}function p(){0!==d&&0!==f||(a.removeEventListener("load",p),d=a.naturalWidth,f=a.naturalHeight),a.setAttribute("width",d),a.setAttribute("height",f),a.setAttribute("src",c.src),a.setAttribute("srcset",c.srcset),a.setAttribute("sizes","(min-width: 1280px) 1280px, (min-height: 1024px) 1280px, 100vw"),c.restrict&&(a.setAttribute("class","restrict"),a.addEventListener("contextmenu",h),a.addEventListener("mousedown",h)),window.picturefill&&window.picturefill(a)}function h(e){e.preventDefault()}function v(i){!l&&i&&i.data&&i.data.img&&(c=i.data.img,Object(o.s)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){var s;document.documentElement.classList.add("s-fullscreenImage-active"),setTimeout((function(){Object(o.r)(e)}),0),Object(o.s)(document,"focus:trap",{element:e}),i.data.img.iiifId&&i.data.img.width&&i.data.img.height?(e.classList.add("s-zoomable"),d=parseInt(i.data.img.width),f=parseInt(i.data.img.height),s=i.data.img.iiifId,(t=OpenSeadragon({id:"openseadragon",prefixUrl:location.protocol+"//openseadragon.github.io/openseadragon/images/",preserveViewport:!0,springStiffness:15,visibilityRatio:1,zoomPerScroll:1.2,zoomPerClick:1.3,immediateRender:!1,constrainDuringPan:!0,animationTime:1.5,minZoomLevel:0,minZoomImageRatio:.8,maxZoomPixelRatio:1,defaultZoomLevel:0,gestureSettingsMouse:{scrollToZoom:!0},zoomInButton:"osd_zoomInButton",zoomOutButton:"osd_zoomOutButton",showZoomControl:!0,showHomeControl:!0,showFullPageControl:!1,showRotationControl:!1,showSequenceControl:!1,tileSources:[{"@context":"http://iiif.io/api/image/2/context.json","@id":s,width:d,height:f,profile:["http://iiif.io/api/image/2/level2.json"],protocol:"http://iiif.io/api/image",tiles:[{scaleFactors:[1,2,4,8,16],width:256}]}]})).addHandler("zoom",(function(e){e.zoom<=t.viewport.getMinZoom()?(n.disabled=!1,r.disabled=!0):e.zoom>=t.viewport.getMaxZoom()?(n.disabled=!0,r.disabled=!1,Object(o.s)(document,"gtm:push",{event:"artwork-terminal-zoom",eventCategory:"in-page"})):(n.disabled=!1,r.disabled=!1,Object(o.s)(document,"gtm:push",{event:"artwork-zoom",eventCategory:"in-page"}))}))):(e.classList.remove("s-zoomable"),"auto"!==i.data.img.width&&"auto"!==i.data.img.height?(d=parseInt(i.data.img.width),f=parseInt(i.data.img.height),p()):(d=0,f=0,a.addEventListener("load",p,!1),a.setAttribute("srcset",c.srcset))),c.infoUrl?(u.setAttribute("href",c.infoUrl),u.setAttribute("style","")):(u.setAttribute("href","javascript:;"),u.setAttribute("style","display: none")),l=!0})))}function g(e){l&&27===e.keyCode&&Object(o.s)(document,"fullScreenImage:close")}this.destroy=function(){i.removeEventListener("click",m),document.removeEventListener("fullScreenImage:open",v),document.removeEventListener("fullScreenImage:close",m),window.removeEventListener("keyup",g),A17.Helpers.purgeProperties(this)},this.init=function(){a=e.querySelector(".o-fullscreen-image__img"),s=e.querySelector(".o-fullscreen-image__osd"),n=e.querySelector("[data-fullscreen-zoom-in]"),r=e.querySelector("[data-fullscreen-zoom-out]"),i=e.querySelector("[data-fullscreen-close]"),u=e.querySelector(".o-fullscreen-image__info"),i.addEventListener("click",m,!1),document.addEventListener("fullScreenImage:open",v,!1),document.addEventListener("fullScreenImage:close",m,!1),window.addEventListener("keyup",g,!1)}},G=function(e){var t=e.previousElementSibling,n="s-capped";function r(r){r.preventDefault(),t.classList.contains(n)?(t.classList.remove(n),e.querySelector("span").textContent="Show Less"):(t.classList.add(n),e.querySelector("span").textContent="Show More"),e.blur()}this.destroy=function(){e.removeEventListener("click",r),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",r,!1)}},J=function(e){var t,n=e.querySelector("input"),r=e.getAttribute("data-filter-whittle-down-url"),i=e.nextElementSibling;function a(){e.classList.remove("s-loading")}function s(){clearTimeout(t),e.classList.add("s-loading"),t=setTimeout((function(){""===n.value?e.classList.remove("s-whittling"):e.classList.add("s-whittling"),Object(o.a)({url:r,data:{categoryQuery:n.value},type:"GET",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(e){try{var t=JSON.parse(e);i.innerHTML=t.html}catch(e){console.error("Error updating filters: "+e)}a()},onError:function(e){console.error("Error: "+e),a()}})}),250)}this.destroy=function(){n.removeEventListener("input",s),e.removeEventListener("submit",s),A17.Helpers.purgeProperties(this)},this.init=function(){n.addEventListener("input",s,!1),e.addEventListener("submit",s,!1)}},Z=n(123),K=n.n(Z),ee=function(e){var t,n=e.querySelector("[data-range-slider]"),r=(e.querySelector("[data-range-thumb-min]"),e.querySelector("[data-range-thumb-max]"),e.querySelector("[data-range-bar]"),e.querySelector("[data-range-min-display]")),i=e.querySelector("[data-range-max-display]"),a=e.querySelector("[data-range-custom-from]"),s=e.querySelector("[data-range-custom-to]"),u=e.querySelector("[data-range-custom-btn]"),c=e.getAttribute("data-param"),l="BCE",d="CE",f=[a,s],m=[r,i],p=0,h=0;function v(e,t){var n=-1;return Object(o.f)(e,(function(e,r){r===t&&(n=e)})),n}function g(e){var r,i,a,s=b();n.noUiSlider.updateOptions({range:{min:0,max:t.length-1}}),n.noUiSlider.set([s.fromIndex,s.toIndex]),r=s.fromIndex,i=s.toIndex,a=o.o.updateParameter(window.location.href,c+"-start",t[r].replace(/\s(CE|BCE)/gi,"$1")),a=o.o.updateParameter(a,c+"-end",t[i].replace(/\s(CE|BCE)/gi,"$1")),Object(o.s)(document,"ajax:getPage",{url:a,ajaxScrollTarget:"collection"}),e.preventDefault()}function b(e){var n=a.value,r=s.value,o=parseInt(n),i=parseInt(r),u=n,c=r,d=v(t,n)>-1,f=v(t,r)>-1;if(n.indexOf(l)>-1)o=-1*o;if(!(o>i))return d||null==n||""==n||(u=y(o)),f||null==r||""==r||(c=y(i)),{fromIndex:v(t,u)>-1?v(t,u):0,toIndex:v(t,c)>-1?v(t,c):t.length-1};alert("Upper date range must be higher than the lower date range")}function y(e){var n=!1,r=!1,o=!1;if(!isNaN(e)){e<0&&(n=!0);var i=Math.abs(e)+(n?" "+l:" "+d);return t.forEach((function(a,s){var u=parseInt(a);n?-1!=a.indexOf(l)&&(e<=-1*u&&0==r&&(-1==t.indexOf(i)&&t.splice(s,0,Math.abs(e)+l),r=!0,s),o=s):-1!=a.indexOf(d)&&(e<=u&&0==r&&(-1==t.indexOf(i)&&t.splice(s,0,i),r=!0,s),o=s)})),!r&&o&&(t.splice(o+1,0,Math.abs(e)+(n?l:d)),o+1),i}alert("Please enter a valid number")}function w(){t=A17[e.getAttribute("data-range-values")]||["0","25","50","75","100"],h=t.length-1,function(){var e=Object(o.j)(c+"-start",window.location.search),t=Object(o.j)(c+"-end",window.location.search);if(e&&(a.value=e),t&&(s.value=t),e||t){var n=b();p=n.fromIndex,h=n.toIndex}}(),K.a.create(n,{start:[p,h],connect:!0,step:1,range:{min:0,max:t.length-1},format:{to:function(e){return Math.round(e)},from:function(e){return Math.round(e)}}}),n.noUiSlider.on("update",(function(e,n){f[n].value=t[e[n]],m[n].innerHTML=t[e[n]]})),u.addEventListener("click",g,!1)}this.destroy=function(){u.removeEventListener("click",g),A17.Helpers.purgeProperties(this)},this.init=function(){w()}},te=function(e){var t=!1;function n(){t||(Object(o.s)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add("s-collection-search-active"),setTimeout((function(){Object(o.r)(e)}),0),Object(o.s)(document,"focus:trap",{element:e}),Object(o.s)(document,"collectionSearch:visible"),t=!0})))}function r(){t&&(document.documentElement.classList.remove("s-collection-search-active"),Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),setTimeout((function(){Object(o.r)(document.getElementById("a17"))}),0),Object(o.s)(document,"collectionSearch:hidden"),t=!1)}function i(){t&&E("medium+")&&(Object(o.s)(document,"collectionSearch:close"),setTimeout((function(){window.scrollTo(0,0)}),5))}this.destroy=function(){document.removeEventListener("collectionSearch:open",n),document.removeEventListener("collectionSearch:close",r),document.removeEventListener("mediaQueryUpdated",i),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("collectionSearch:open",n,!1),document.addEventListener("collectionSearch:close",r,!1),document.addEventListener("mediaQueryUpdated",i,!1)}},ne=(n(131),function(e){var t,n,r,i,a,s,u,c,l=null,d=[16727614,16357674,16510030,15659690,9628976,4638949,4606186,11558884,16727614],f=360/(d.length-1),m=.65,p=(F(7829367,0,m),F(7829367,16777215,m),F(7829367,0,.95)),h=F(7829367,16777215,.95),v=[z(p),z(7829367),z(h),z(7829367),z(p)],g=!1,b=0,y=270,w=(d[0],d[0]),E=w,L=z(E);function _(){u.setAttribute("style","height: 48px"),[i,r,a].forEach((function(e,t){e.classList.add("o-color-picker__handle--initialized")})),g=!0}function x(e){e.preventDefault(),e.stopPropagation();var t=function(e){var t,n,r,o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16),t/=255,n/=255,r/=255;var i,a,s=Math.max(t,n,r),u=Math.min(t,n,r),c=(s+u)/2;if(s==u)i=a=0;else{var l=s-u;switch(a=c>.5?l/(2-s-u):l/(s+u),s){case t:i=(n-r)/l+(n ')})),document.addEventListener("collectionFilters:open",O,!1),document.addEventListener("collectionFilters:close",j,!1),document.addEventListener("ajaxPageLoad:complete",A,!1),c.addEventListener("click",x,!1),(document.querySelector("html").className+" ").replace(/[\n\t]/g," ").indexOf(" s-collection-filters-active ")>-1&&O()}function O(){setTimeout((function(){e.setAttribute("style","display: block")}),432)}function j(){setTimeout((function(){e.setAttribute("style","display: none")}),432)}function k(e){document.addEventListener("mouseup",l,!1),document.addEventListener("touchend",l,!1),document.addEventListener("mouseup",T,!1),document.addEventListener("touchend",T,!1),window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1}),_(),l(e)}function T(){document.removeEventListener("mouseup",l),document.removeEventListener("touchend",l),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l)}function C(e,t){var n=void 0;e.touches&&(n=e.touches[0]);var r=t.getBoundingClientRect(),o=t.offsetWidth/2+r.left+window.scrollX,i=t.offsetHeight/2+r.top+window.scrollY,a=e.pageX||n.pageX,s=i-(e.pageY||n.pageY),u=o-a,c=Math.atan2(s,u)*(180/Math.PI);return(c-=90)<0&&(c=360+c),c=Math.floor(c)}function M(){var e=b/360,t=Math.floor(e*(d.length-1)),n=t+1>d.length-1?0:t+1;w=F(d[t],d[n],b%f/f),r.setAttribute("style","transform:translate(-50%, -50%) rotate("+b+"deg);color:"+z(w)+";"),a.setAttribute("style","transform:translate(-50%, -50%) rotate("+b+"deg);")}function q(){var e=y>270||y<90?0:16777215,t=Math.abs(0===e?y>270?y-360:y:y-180);E=F(w,e,(1-t/90)*m),L=z(E);var n=F(p,h,1-Math.abs(y-180)/180);i.setAttribute("style","transform:translate(-50%, -50%) rotate("+y+"deg);color:"+z(n)+";")}function P(){s.setAttribute("style","background-color:"+(g?z(E):"transparent")+";"),c.innerHTML=' OK'}function I(e){l=H,k(e)}function N(e){l=D,k(e)}function H(e){e.preventDefault(),e.stopPropagation(),b=C(e,t),M(),q(),P()}function D(e){e.preventDefault(),e.stopPropagation(),y=C(e,n),q(),P()}function F(e,t,n){var r=e>>16,o=e>>8&255,i=255&e;return(r+n*((t>>16)-r)<<16)+(o+n*((t>>8&255)-o)<<8)+(0|i+n*((255&t)-i))}function z(e){return"#"+e.toString(16).padStart(6,"0")}this.destroy=function(){c.removeEventListener("click",x),t.removeEventListener("mousedown",I),t.removeEventListener("touchstart",I),n.removeEventListener("mousedown",N),n.removeEventListener("touchstart",N),document.removeEventListener("collectionFilters:open",O),document.removeEventListener("collectionFilters:close",j),document.removeEventListener("ajaxPageLoad:complete",A),A17.Helpers.purgeProperties(this)},this.init=function(){A()}}),re=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"collectionFilters:toggle"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},oe=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"collectionSearch:open"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},ie=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"collectionFilters:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},ae=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"collectionSearch:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},se=function(e){var t=e.querySelectorAll("[data-nav-trigger]"),n=e.querySelectorAll("[data-nav-back]"),r="s-nav-mobile-active",i="js-subnav-open",a=0,s=!1;function u(t){Object(o.s)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(r),setTimeout((function(){Object(o.r)(e)}),0),Object(o.s)(document,"focus:trap",{element:e})})),s=!0}function c(e){Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),document.documentElement.classList.remove(r),setTimeout((function(){Object(o.r)(document.getElementById("a17"))}),0),s=!1}function l(e){this.classList.toggle("nav-is-open"),this.classList.contains("g-footer-nav__expander-trigger")||(a++,f()),e.preventDefault(),e.stopPropagation()}function d(e){this.closest(".g-nav-mobile__subnav").previousElementSibling.classList.remove("nav-is-open"),a--,f(),e.preventDefault(),e.stopPropagation()}function f(){a>0?e.classList.add(i):e.classList.remove(i)}function m(){s&&mediaQuery("small+")&&(Object(o.s)(document,"navMobile:close"),setTimeout((function(){window.scrollTo(0,0)}),5))}this.destroy=function(){document.removeEventListener("navMobile:open",u),document.removeEventListener("navMobile:close",c),document.removeEventListener("mediaQueryUpdated",m),Object(o.f)(t,(function(e,t){t.removeEventListener("click",l)})),Object(o.f)(n,(function(e,t){t.removeEventListener("click",d)})),Object(o.n)(this)},this.init=function(){document.addEventListener("navMobile:open",u,!1),document.addEventListener("navMobile:close",c,!1),document.addEventListener("mediaQueryUpdated",m,!1),Object(o.f)(t,(function(e,t){t.addEventListener("click",l,!1)})),Object(o.f)(n,(function(e,t){t.addEventListener("click",d,!1)}))}},ue=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.s)(document,"navMobile:open")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},ce=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.s)(document,"navMobile:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},le=function(e){var t=e.nextElementSibling||e.nextSibling,n=!1;function r(){a({element:t,target:e,position:"top left",padding:{top:104,left:-76},breakpoints:{xsmall:!0,small:!0,medium:!0,large:!0,xlarge:!0}})}function i(){n&&setTimeout(r,100)}function s(){n&&(e.setAttribute("aria-expanded","false"),document.documentElement.classList.remove("s-infoButtonInfo-active"),t.removeAttribute("style"),Object(o.s)(document,"focus:untrap"),setTimeout((function(){Object(o.r)(e.parentNode)}),0),t.classList.add("s-hidden"),n=!1)}function u(i){n?s():function(i){i.preventDefault(),i.stopPropagation(),e.blur(),n?s():(e.setAttribute("aria-expanded","true"),document.documentElement.classList.add("s-infoButtonInfo-active"),r(),setTimeout((function(){Object(o.r)(t)}),0),Object(o.s)(document,"focus:trap",{element:t}),t.classList.remove("s-hidden"),n=!0)}(i)}function c(t){t.preventDefault(),t.stopPropagation(),u(t),e.blur()}function l(e){n&&(e.preventDefault(),e.stopPropagation(),s())}function d(e){var t="INPUT"===e.target.tagName;n&&27===e.keyCode&&!t&&s()}this.destroy=function(){e.removeEventListener("click",c),document.removeEventListener("infoButtonInfo:close",s),document.removeEventListener("click",l),window.removeEventListener("resized",i),window.removeEventListener("keyup",d),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",c,!1),document.addEventListener("infoButtonInfo:close",s,!1),document.addEventListener("click",l,!1),window.addEventListener("resized",i,!1),window.addEventListener("keyup",d,!1)}},de=function(e){function t(){var t=e.className.indexOf("tabs")>0,n=e.querySelector("[data-links-bar-primary]"),r=e.querySelector("[data-links-bar-primary-overflow]"),i=r.querySelector("[data-dropdown-list]");if(n&&r){var a=0,s=[],u=0,c=!1;e.classList.remove("s-overflowing"),r.classList.add("s-hidden"),n.classList.add("s-measuring"),Object(o.f)(n.children,(function(e,t){t!==r&&t.classList.remove("s-hidden")})),Object(o.f)(i.children,(function(e,t){t.classList.add("s-hidden")})),a=n.offsetWidth-20,Object(o.f)(n.children,(function(e,t){if(t!==r){var n=t.offsetWidth+20;u+=n,s.push(n),u>a&&(c=!0)}})),c&&(r.classList.remove("s-hidden"),t?(Object(o.f)(n.children,(function(e,t){t!==r&&t.classList.add("s-hidden")})),Object(o.f)(i.children,(function(e,t){t.classList.remove("s-hidden")}))):(a-=r.offsetWidth,u=0,Object(o.f)(s,(function(e,t){(u+=t)>a&&(n.children[e].classList.add("s-hidden"),i.children[e].classList.remove("s-hidden"))}))),e.classList.add("s-overflowing")),n.classList.remove("s-measuring")}}this.destroy=function(){document.removeEventListener("touchend",t),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("resized",t,!1),t()}},fe=function(e){var t=e.querySelector('input[type="search"]'),n=e.querySelector("form");function r(e){e.preventDefault();var r,i=(r=t.value,encodeURIComponent(r).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)})));i.length>0&&(Object(o.s)(document,"navMobile:close"),Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(n.action,"q",i)}))}this.destroy=function(){n.removeEventListener("submit",r),A17.Helpers.purgeProperties(this)},this.init=function(){n.addEventListener("submit",r,!1)}},me=function(e){var t,n,r=e.getAttribute("data-autocomplete-url"),i=e.querySelector('input[type="search"]'),a=e.querySelector("form"),s="s-search-active",u="s-search-active--autocomplete",c="s-loading",l=!1,d="",f=0;function m(){e.classList.remove(c)}function p(){t&&(e.querySelector("[data-search-inner]").removeChild(t),t=null)}function h(){document.documentElement.classList.contains(u)&&document.documentElement.classList.remove(u),p()}function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function g(){clearTimeout(n);var s=Date.now();s>f&&(f=s,e.classList.add(c),n=setTimeout((function(){Object(o.a)({url:r,type:"GET",data:{q:i.value},requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(n){p();try{!function(n,r){if(r===f){var i=(new DOMParser).parseFromString(n,"text/html");(t=i.querySelector("[data-autocomplete-list]"))&&(e.querySelector("[data-search-inner]").appendChild(t),requestAnimationFrame((function(){document.documentElement.classList.contains(u)||document.documentElement.classList.add(u)})),Object(o.s)(document,"page:updated"))}}(n,f,i.value)}catch(e){console.error("Error updating autocomplete: "+e),Object(o.s)(document,"globalSearch:close"),Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(a.action,"q",v(i.value))})}m()},onError:function(e){m(),Object(o.s)(document,"globalSearch:close"),Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(a.action,"q",v(i.value))})}})}),250))}function b(){Object(o.s)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(s),setTimeout((function(){Object(o.r)(e)}),0),Object(o.s)(document,"focus:trap",{element:e}),setTimeout((function(){i.focus()}),250)})),l=!0}function y(){l=!1,clearTimeout(n),h(),Object(o.s)(document,"body:unlock"),Object(o.s)(document,"focus:untrap"),document.documentElement.classList.remove(s),setTimeout((function(){Object(o.r)(document.getElementById("global-search-icon"))}),0),i.value=""}function w(e){l&&27===e.keyCode&&Object(o.s)(document,"globalSearch:close")}function E(){l&&"xsmall"!==A17.currentMediaQuery&&Object(o.s)(document,"globalSearch:close")}function L(t){t.preventDefault();var n=v(i.value);if(l&&n.length>0){var r=S(e);r&&(r.event=v(i.value),Object(o.s)(document,"gtm:push",r)),Object(o.s)(document,"globalSearch:close"),Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(a.action,"q",n)})}}function _(){l&&((d=i.value).length>=3?g():0===d.length&&h())}this.destroy=function(){i.removeEventListener("input",_),i.removeEventListener("propertychange",_),a.removeEventListener("submit",L),document.removeEventListener("globalSearch:open",b),document.removeEventListener("globalSearch:close",y),window.removeEventListener("keyup",w),window.removeEventListener("resized",E),A17.Helpers.purgeProperties(this)},this.init=function(){a.addEventListener("submit",L,!1),document.addEventListener("globalSearch:open",b,!1),document.addEventListener("globalSearch:close",y,!1),window.addEventListener("keyup",w,!1),window.addEventListener("resized",E,!1),r&&""!==r&&(i.addEventListener("input",_,!1),i.addEventListener("propertychange",_,!1))}},pe=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"globalSearch:open"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},he=function(e){function t(t){t.preventDefault(),Object(o.s)(document,"globalSearch:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},ve=function(e){var t=e.getAttribute("data-autocomplete-url");if(t&&""!==t){var n,r,i=e.querySelector('input[type="text"]'),a=e.querySelector("[data-autocomplete-clear]"),s="s-loading",u="s-autocomplete-active",c=!1,l="";this.destroy=function(){i.removeEventListener("input",b),i.removeEventListener("propertychange",b),e.removeEventListener("submit",g),a.removeEventListener("click",w),document.removeEventListener("click",E),document.removeEventListener("touchstart",L),window.removeEventListener("keyup",_),A17.Helpers.purgeProperties(this)},this.init=function(){i.addEventListener("input",b,!1),i.addEventListener("propertychange",b,!1),e.addEventListener("submit",g,!1),a.addEventListener("click",w,!1),document.addEventListener("click",E,!1),document.addEventListener("touchstart",L,!1),window.addEventListener("keyup",_,!1),""!==i.value&&e.classList.add(u)}}function d(){e.classList.remove(s)}function f(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function m(e){return f(e.replace(/<(?:.|\n)*?>/gm,"").replace(/"|'/gm,"")).replace(/%20/gm,"-").toLowerCase()}function p(){h(),i.focus()}function h(){e.classList.remove(u),n&&(e.removeChild(n),n=null),c=!1}function v(){clearTimeout(r),e.classList.add(s),r=setTimeout((function(){var r="?"+function(e){var t,n,r=[],o=function(e,t,n){var r,i=[];if(!0===t?t="1":!1===t&&(t="0"),null!==t){if("object"==typeof t){for(r in t)null!==t[r]&&i.push(o(e+"["+r+"]",t[r],n));return i.join(n)}if("function"!=typeof t)return y(e)+"="+y(t);throw new Error("There was an error processing for http_build_query().")}return""};for(n in e){t=e[n];var i=o(n,t,"&");""!==i&&r.push(i)}return r.join("&")}([{fuzzy:!1,q:i.value,resources:["artworks"],contexts:["accession"]},{q:i.value,resources:["artworks"],contexts:["title"]},{q:i.value,resources:["artists","category-terms"],contexts:["title"]}]),o=new XMLHttpRequest;o.open("get",t+r,!0),o.onload=function(){if(o.status>=200&&o.status<400){p();try{!function(t){var r=JSON.parse(t),o=r[0],a=r[1],s=r[2],l="";if(!(o.length<1&&a.length<1&&s.length<1)){(n=document.createElement("ul")).className="m-search-bar__autocomplete f-secondary",n.setAttribute("data-autocomplete-list","");var d=function(e,t){for(var n="",r=0;r'+o+' "'};break;case"artworks":a={path:"/artworks/"+e[r].id,title:'see "'+o+' " ('+e[r].main_reference_number+")"};break;case"category-terms":switch(e[r].subtype){case"classification":a={query:"classification_ids="+i,title:'classified as "'+o+' "'};break;case"material":a={query:"material_ids="+i,title:'made of "'+o+' "'};break;case"technique":a={query:"technique_ids="+e[r].id,title:'made via "'+o+' "'};break;case"style":a={query:"style_ids="+i,title:'in the style of "'+o+' "'};break;case"subject":a={query:"subject_ids="+i,title:'about "'+o+' "'};break;case"department":a={query:"department_ids="+i,title:'in the department "'+o+' "'};break;case"theme":a={query:"theme_ids="+e[r].id,title:'related to "'+o+' "'}}}if(a){var s="/collection?"+a.query;a.path&&(s=a.path),n+=''+a.title+" \n"}}return n};l+=d(o,1),l+=d(a,1),l+=d(s,5),l+='Search for "'+i.value+'" \n',n.innerHTML=l,e.appendChild(n),e.classList.add(u),c=!0}}(o.responseText)}catch(e){console.error("Error updating autocomplete: "+e)}d()}else console.error("Autocomplete error:",o.responseText,o.status),d()},o.onerror=function(){console.error("Autocomplete error:",o.responseText,o.status),d()},o.send()}),250)}function g(t){t.preventDefault();var n=S(e);n&&(n.event=f(i.value),Object(o.s)(document,"gtm:push",n)),Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(e.action,"q",f(i.value))})}function b(){(l=i.value).length>=3?v():0==l.length&&h()}function y(e){return encodeURIComponent(e).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function w(e){e&&(e.preventDefault(),e.stopPropagation()),p(),i.value=""}function E(t){c&&document.activeElement!==e&&!e.contains(document.activeElement)&&(t.preventDefault(),t.stopPropagation(),h())}function L(t){c&&t.target!==e&&!e.contains(t.target)&&(t.preventDefault(),t.stopPropagation(),h())}function _(e){c&&27===e.keyCode&&h()}},ge=function(e){var t=null;function n(){e.classList.remove("s-loading"),e.removeAttribute("disabled")}function r(){t&&(e.removeChild(t),t=null),e.classList.remove("s-success"),e.classList.remove("s-error")}function i(n,o){r(),(t=document.createElement("em")).className="m-aside-newsletter__msg f-buttons","success"===n?(t.className+=" m-aside-newsletter__msg--success",t.textContent=o||"Successfully signed up to the newsletter",e.classList.add("s-success")):"error"===n&&(t.className+=" m-aside-newsletter__msg--error",t.textContent=o||"Error signing up to the newsletter",e.classList.add("s-error")),e.appendChild(t)}function a(t){t.preventDefault(),t.stopPropagation(),r(),e.classList.add("s-loading"),e.setAttribute("disabled","disabled");var a=Object(o.m)(e);Object(o.a)({url:e.action||"/subscribe",type:"POST",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"},{header:"X-CSRF-Token",value:document.querySelector("meta[name=csrf-token]").getAttribute("content")||""}],data:a,onSuccess:function(t){try{t=JSON.parse(t),e.classList.remove("s-loading"),e.setAttribute("disabled","disabled"),e.querySelector("input[name=email]").value="",i("success",t.message||t.email),Object(o.s)(document,"gtm:push",{event:"sign-up",eventCategory:"subscribe"})}catch(e){console.error("Error submitting newsletter sign up (a)"),console.log(e,t),i("error")}n()},onError:function(e){try{i("error",(e=JSON.parse(e)).message||e.email)}catch(t){console.error("Error submitting newsletter sign up (b)"),console.log(e,t),i("error")}n()}})}function s(e){var t=e.firstElementChild.offsetHeight;e.style.height=t+"px"}function u(){this.removeAttribute("style"),this.removeEventListener("transitionend",u),Object(o.s)(document,"page:updated")}function c(t){var n=e.querySelector(".m-aside-newsletter__btn--list"),r=e.querySelector(".m-aside-newsletter__list-wrapper");if("true"===r.getAttribute("aria-hidden"))r.style.height=0,r.style.overflow="hidden",r.setAttribute("aria-hidden","false"),setTimeout((function(){setTimeout((function(){Object(o.r)(r)}),0)}),0),s(r),n.classList.add("m-aside-newsletter__btn--list--opened");else{s(r),r.setAttribute("aria-hidden","true");r.offsetHeight;r.style.height=0,r.style.overflow="hidden",n.classList.remove("m-aside-newsletter__btn--list--opened")}r.addEventListener("transitionend",u,!1)}this.destroy=function(){e.removeEventListener("submit",a),A17.Helpers.purgeProperties(this)},this.init=function(){!function(){e.addEventListener("submit",a,!1);var t=e.querySelector(".m-aside-newsletter__btn--list");t&&t.addEventListener("click",c,!1)}()}},be=function(e){function t(t){t.preventDefault(),t.stopPropagation();var n=e.getAttribute("data-gallery-img-width")||e.parentNode.querySelector("img").getAttribute("width"),r=e.getAttribute("data-gallery-img-height")||e.parentNode.querySelector("img").getAttribute("height");if("number"!=typeof n||n<200){var i=e.parentNode.querySelector("img").naturalWidth;"number"==typeof i&&i>n&&(n=i)}if("number"!=typeof r||r<200){var a=e.parentNode.querySelector("img").naturalHeight;"number"==typeof a&&a>r&&(r=a)}var s={src:e.getAttribute("data-gallery-img-src")||e.parentNode.querySelector("img").src,srcset:e.getAttribute("data-gallery-img-srcset")||e.parentNode.querySelector("img").getAttribute("srcset"),width:n,height:r,credit:e.getAttribute("data-gallery-img-credit")||"",creditUrl:e.getAttribute("data-gallery-img-credit-url")||"",shareUrl:e.getAttribute("data-gallery-img-share-url")||"",shareTitle:e.getAttribute("data-gallery-img-share-title")||"",downloadUrl:e.getAttribute("data-gallery-img-download-url")||"",downloadName:e.getAttribute("data-gallery-img-download-name")||"",iiifId:e.getAttribute("data-gallery-img-iiifId")||e.parentNode.querySelector("img").getAttribute("data-iiifId"),infoUrl:e.parentNode.querySelector("img").getAttribute("data-infourl")||"",restrict:e.getAttribute("data-restrict")||""};Object(o.s)(document,"fullScreenImage:open",{img:s})}function n(e){13==e.keyCode&&t(e)}this.destroy=function(){e.removeEventListener("click",t),e.removeEventListener("keyup",n),Object(o.n)(this)},this.init=function(){e.addEventListener("click",t,!1),e.addEventListener("keyup",n,!1)}},ye=function(e){var t,n,r,o=!1;function i(){var t="clip-path: inset(top right bottom left);",o=e.getBoundingClientRect(),i=r.getBoundingClientRect();0===i.width&&0===i.height?n.setAttribute("style","clip-path: none; -webkit-clip-path: none; display: none;"):(t=(t=(t=(t=t.replace(/left/gi,Math.round(Math.abs(i.left-o.left))+"px")).replace(/top/gi,Math.round(Math.abs(i.top-o.top))+"px")).replace(/right/gi,Math.round(Math.abs(i.right-o.right))+"px")).replace(/bottom/gi,Math.round(Math.abs(i.bottom-o.bottom))+"px"),n.setAttribute("style",t+" -webkit-"+t))}function a(){var a;(function(){var e;(e=document.createElement("div")).style.cssText="-webkit-filter: blur(2px); filter: blur(2px);";var t=0!=e.style.length,n=void 0===document.documentMode||document.documentMode>9,r=t&&n;e=null,(e=document.createElement("div")).style.cssText="-webkit-clip-path: inset(1px 2px 3px 4px); clip-path: inset(1px 2px 3px 4px);";var i=0!=e.style.length;e=null,(e=document.createElement("div")).style.cssText="-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);";var a=0!=e.style.length;(a||!r||i)&&(o=!1),!o&&!a&&r&&i&&(o=!0)}(),o)&&(t=e.querySelector("[data-blur-img]"),(r=e.querySelector("[data-blur-clip-to]"))&&t&&(a=t.outerHTML.replace("data-blur-img","data-blur-img-dupe"),t.insertAdjacentHTML("afterend",a),n=e.querySelector("[data-blur-img-dupe]"),i(),window.addEventListener("resized",i,!1)))}this.destroy=function(){window.removeEventListener("resized",i),A17.Helpers.purgeProperties(this)},this.init=function(){a()}},we=function(e){var t,n=e.getAttribute("data-load-more-url"),r=e.getAttribute("data-load-more-target"),i=e.getAttribute("data-load-more-limit-text"),a=document.querySelector(r),s=1,u="s-loading",c="s-hidden",l=20;function d(){e.classList.remove(u)}function f(){clearTimeout(t),e.classList.add(u),t=setTimeout((function(){Object(o.a)({url:n,data:{page:s},type:"GET",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(t){try{var n=JSON.parse(t);a.innerHTML+=n.html,n.page||e.classList.add(c),a.classList.contains("o-pinboard")?Object(o.s)(a,"pinboard:contentAdded"):Object(o.s)(document,"page:updated")}catch(e){console.error("Error updating autocomplete: "+e)}d(),s>=l&&function(){e.classList.add(c);var t=document.createElement("h2");t.setAttribute("class","title f-list-3"),t.textContent="Sorry, we limit the results for any query after 20 pages.",e.parentNode.appendChild(t);var n=document.createElement("p");n.setAttribute("class","f-caption"),n.textContent="Try using our filters to refine your search."+(i?" "+i:""),e.parentNode.appendChild(n)}()},onError:function(e){console.error("Error: "+e),d()}})}),250)}function m(e){e.preventDefault(),e.stopPropagation(),s++,f()}this.destroy=function(){e.removeEventListener("click",m),Object(o.n)(this)},this.init=function(){e.addEventListener("click",m,!1)}},Ee=function(e){function t(t){t.preventDefault(),t.stopPropagation(),Object(o.s)(document,"ajax:getPage",{url:e.getAttribute("data-href")||e.getAttribute("href")||"#"})}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},Le=function(e){function t(t){var n=e.querySelector("textarea");if(n||(n=e.parentNode.querySelector("textarea")),n){var r=n.value;r&&(t.preventDefault(),t.stopPropagation(),Object(o.s)(document,"modal:open",{type:"media",restricted:"true"==e.parentNode.dataset.restricted,module3d:"module3d"==e.parentNode.dataset.type,module360:"module360"==e.parentNode.dataset.type,embedCode:r,subtype:e.getAttribute("data-subtype")||null}),"module3d"==e.parentNode.dataset.type&&e.dataset.title?Object(o.s)(document,"gtm:push",{event:"3D-open-modal",eventCategory:"in-page",eventAction:e.dataset.title+" - Modal 3D"}):"module360"==e.parentNode.dataset.type&&e.dataset.title?Object(o.s)(document,"gtm:push",{event:"360-open-modal",eventCategory:"in-page",eventAction:e.dataset.title+" - Modal 360"}):Object(o.s)(document,"gtm:push",{event:e.parentNode.dataset.gtmEvent||e.parentNode.dataset.type+"-open-modal",eventCategory:e.parentNode.dataset.gtmEventCategory||"in-page",eventAction:e.parentNode.dataset.gtmEventAction||e.parentNode.dataset.title+" - "+e.parentNode.dataset.type}))}}function n(e){13==e.keyCode&&t(e)}this.destroy=function(){e.removeEventListener("click",t),e.removeEventListener("keyup",n),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1),e.addEventListener("keyup",n,!1)}},_e=function(e){var t,n,r;function i(r){r.preventDefault(),r.stopPropagation(),e.removeEventListener("click",i),e.removeEventListener("keyup",a),n=o.o.updateParameter(n,"autoplay","1"),n=o.o.updateParameter(n,"auto_play","1"),t.src=n,e.classList.add("s-inline-media-activated")}function a(e){13==e.keyCode&&i(e)}this.destroy=function(){e.removeEventListener("click",i),e.removeEventListener("keyup",a),A17.Helpers.purgeProperties(this)},this.init=function(){(t=e.querySelector("iframe"))&&(n=t.getAttribute("data-embed-src"),r="data-embed-src",""!==n&&n||(n=t.getAttribute("data-src"),r="data-src"),""!==n&&n||(n=t.getAttribute("src"),r="src"),""!==n&&n&&(n.indexOf("youtube.com")>-1&&(n=o.o.updateParameter(n,"enablejsapi","1"),n=o.o.updateParameter(n,"origin",window.location.origin),"data-src"===r&&t.setAttribute("data-src",n),"src"===r?(t.src=n,A(t)):t.addEventListener("load",(function(){A(t)}),!1)),"data-src"!==r?(e.addEventListener("click",i,!1),e.addEventListener("keyup",a,!1)):e.classList.add("s-inline-media-activated")))}},xe=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.s)(document,"roadblock:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},Se=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.s)(document,"modal:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},Ae=function(e){var t,n="default",r=0,i=0,a=0,s=document.documentElement,u=e.getAttribute("data-stickyElement-breakpoints")||"all",c=!0;function l(){s.classList.remove("s-sticky-filters--fixed"),s.classList.remove("s-sticky-filters--bottom"),n="default"}function d(){if(E(u)&&!c){var e=document.documentElement.scrollTop||document.body.scrollTop;e>=i&&"bottom"!==n?(s.classList.remove("s-sticky-filters--fixed"),s.classList.add("s-sticky-filters--bottom"),n="bottom"):e>=r&&e0){Object(o.s)(document,"ajax:getPage",{url:o.o.updateParameter(n.action,"q",a),type:"page",ajaxScrollTarget:s});var u=S(e);u&&Object(o.s)(document,"gtm:push",u)}}this.destroy=function(){n.removeEventListener("submit",r),A17.Helpers.purgeProperties(this)},this.init=function(){n.addEventListener("submit",r,!1)}},Me=function(e){this.destroy=function(){A17.Helpers.purgeProperties(this)},this.init=function(){var t;(t=Object(o.m)(e)).search&&""!==t.search&&Object(o.s)(document,"gtm:push",{event:t.search,eventCategory:"site-search"})}},qe=function(e){var t,n=!1;function r(){n=!0,e.classList.add("s-paused"),e.setAttribute("aria-label","Play video")}function o(){n=!1,e.classList.remove("s-paused"),e.setAttribute("aria-label","Pause video")}function i(e){e.preventDefault(),e.stopPropagation(),n?t.play():t.pause()}this.destroy=function(){t&&(e.removeEventListener("click",i),t.removeEventListener("play",o),t.removeEventListener("pause",r)),t=null,A17.Helpers.purgeProperties(this)},this.init=function(){(t=e.parentNode.querySelector("video"))&&(t.paused&&r(),e.addEventListener("click",i,!1),t.addEventListener("play",o,!1),t.addEventListener("pause",r,!1))}},Pe=function(e){function t(){grecaptcha.render("g-recaptcha",{sitekey:e.getAttribute("data-sitekey")})}this.destroy=function(){document.removeEventListener("ajaxPageLoad:complete",t),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("ajaxPageLoad:complete",t,!1)}},Ie=function(e){var t=function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}(e,"m-search-bar"),n="isSearchLimited",r="true"===o.b.read(n);function i(e){r=!r,o.b.create(n,r,1),a()}function a(){var n=e.getAttribute("value"),r=t.getAttribute("action");e.setAttribute("value",r),t.setAttribute("action",n)}function s(){e.addEventListener("click",i,!1),r&&(e.checked=!0,a())}this.destroy=function(){e.removeEventListener("click",i),A17.Helpers.purgeProperties(this)},this.init=function(){s()}},Ne=function(e){function t(t){t.preventDefault();var n=e.getAttribute("data-url").replace("{query}",e.getElementsByTagName("input")[0].value);window.open(n)}this.destroy=function(){e.removeEventListener("submit",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("submit",t,!1)}},He=function(e){this.destroy=function(){Object(o.n)(this)},this.init=function(){e.addEventListener("contextmenu",(function(e){e.preventDefault()})),e.addEventListener("mousedown",(function(e){e.preventDefault()}))}},De=n(37),Fe=n.n(De),ze=n(7),Re=n.n(ze),Ue=function(e,t){var n,r=e,o=t,i=!1,a=0;function s(){i=!1;var e=r,n=Math.max(document.documentElement.clientHeight,window.innerHeight||0),s=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,u=document.body.getBoundingClientRect(),c=e.getBoundingClientRect(),l=s+n/2,d=c.top-u.top,f=c.top-u.top+c.height;a=100*(l-d)/(f-d),o&&t(a)}function u(){i||requestAnimationFrame(n),i=!0}!function(){window.addEventListener("scroll",u,!1),n=s.bind(this),u()}()},Be=function(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))},We=function(e){var t=e,n=t.querySelector("iframe"),r=t.querySelector(".m-viewer-3d__hotspots"),i=t.querySelector(".m-viewer-3d__annotation"),a=t.querySelector(".m-viewer-3d__tools"),s=t.querySelector(".m-viewer-3d__fullscreen"),u=t.querySelector(".m-viewer-3d__zoom-in"),c=t.querySelector(".m-viewer-3d__zoom-out"),l=t.querySelector(".m-viewer-3d__overlay"),d=i.querySelector(".m-viewer-3d__annotation__close"),f=JSON.parse(t.dataset.hideannot),m=JSON.parse(t.dataset.hideannottitle),p=JSON.parse(t.dataset.cc),h=(JSON.parse(t.dataset.guided),t.dataset.uid),v=t.dataset.type,g=t.dataset.title,b=JSON.parse(t.dataset.annotations),y="modal"!=v&&"standalone"!=v,w="modal"==v||"standalone"==v,E=("article"!=v?b:[]).map((function(e){return{position3d:e.position,position2d:null,eye:e.eye,distance:null,title:e.name,description:e.content.raw}})),L=null,_=null,x=null,S=null,A=null,O=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen,j=new Fe.a(n),k=null,T=null;function C(){T&&k&&x&&"modal"!=v&&"standalone"!=v&&T.setCameraLookAt(x,k.target,0),E.forEach(M),requestAnimationFrame(q)}var M=function(e,t){T.getWorldToScreenCoordinates(e.position3d,function(n){if(e.position2d=n.canvasCoord,L){var r="translate("+n.canvasCoord[0]+"px, "+n.canvasCoord[1]+"px)";L[t].style.transform=r}}.bind(this))}.bind(this),q=C.bind(this),P=function(e){for(var t,n=null,r=1/0,o=0,i=E.length;o '})).join(""),r.innerHTML=n,L=Array.from(r.querySelectorAll(".a-hotspot")),document.addEventListener("keyup",R),T.setCameraEasing("easeLinear"),T.getCameraLookAt(function(e,n){k=n,function(){x=Re.a.fromValues(k.position[0],k.position[1],k.position[2]),S=Re.a.fromValues(k.target[0],k.target[1],k.target[2]),A=Re.a.clone(x);var e=[];b.length;if("article"==v)var n=t.parentNode;if(b.forEach((function(t,r){var o,i=document.createElement("div");if("article"==v){var a=document.createElement("div");a.classList.add("m-media--3d-tour__sep"),a.setAttribute("data-hotspot",r),i.innerHTML=m?' '+t.content.raw+"
":''+t.name+" "+t.content.raw+"
",n.appendChild(a),n.appendChild(i)}o=0==r?[A,b[r].eye]:[b[r-1].eye,b[r].eye],e.push(o)})),"article"==v){t.parentNode.querySelectorAll(".m-media--3d-tour__sep").forEach((function(t,n){new Ue(t,(function(t){if(x&&t>0&&t<100){var r=Math.min(100,1.5*t);x[0]=e[n][0][0]+(e[n][1][0]-e[n][0][0])/100*r,x[1]=e[n][0][1]+(e[n][1][1]-e[n][0][1])/100*r,x[2]=e[n][0][2]+(e[n][1][2]-e[n][0][2])/100*r}}))})),Object(o.s)(document,"module3d:loaded")}}()}.bind(this)),a&&a.classList.add("is-visible"),d&&d.addEventListener("click",F.bind(this,2)),s&&p&&O&&(s.addEventListener("click",N.bind(this,2)),document.addEventListener("fullscreenchange",H),document.addEventListener("webkitfullscreenchange",H),document.addEventListener("mozfullscreenchange",H),document.addEventListener("MSFullscreenChange",H));w&&(T.zoom=function(e,t){T.getCameraLookAt((function(n,r){if(!n){var o,i,a=r.position,s=a[0],u=a[1],c=a[2],l=r.target,d=Math.sqrt(s*s+u*u+c*c);if(.1===d||d===1/0)return;(d*=e)<.1&&e<1?d=.1:d>1/0&&e>1&&(d=1/0),o=Math.atan2(u,s),i=Math.atan2(Math.sqrt(s*s+u*u),c),s=d*Math.sin(i)*Math.cos(o),u=d*Math.sin(i)*Math.sin(o),c=d*Math.cos(i),T.setCameraLookAt([s,u,c],l,t)}}))},u.addEventListener("click",(function(){T.zoom(.5,.2)})),c.addEventListener("click",(function(){T.zoom(1.5,.2)})))}.bind(this)),e.addEventListener("click",P)}.bind(this),error:function(){}}),p&&O||!s||s.remove(),w||(u&&u.remove(),c&&c.remove()),f&&t.parentNode.classList.add("no-annotations"),"standalone"==v&&(t.classList.add("has-overlay"),Object(o.s)(document,"gtm:push",{event:"3D-tap-start",eventCategory:"in-page",eventAction:g}),l&&l.addEventListener("click",D.bind(this,2)))}function N(){p&&O&&(document.fullscreenElement?(s.classList.remove("is-active"),document.exitFullscreen()):(s.classList.add("is-active"),O.call(t)))}function H(){!document.fullscreenElement&&s&&s.classList.remove("is-active")}function D(){t.classList.remove("has-overlay"),l&&l.removeEventListener("click",D.bind(this,2))}function F(){_=null,z()}function z(){null!==r.querySelector(".a-hotspot--selected")&&r.querySelector(".a-hotspot--selected").classList.remove("a-hotspot--selected"),null!==_?(i.querySelector(".m-viewer-3d__annotation__content").innerHTML=''+E[_].title+"
"+E[_].description,-1===i.className.indexOf(" is-visible")&&(i.className+=" is-visible"),"modal"!=v&&"standalone"!=v||T.setCameraLookAt(E[_].eye,E[_].position3d,.6),L[_].classList.add("a-hotspot--selected"),i.querySelector(".m-viewer-3d__annotation__close").tabIndex=0,i.querySelector(".m-viewer-3d__annotation__close").focus(),Object(o.s)(document,"gtm:push",{event:"3D-tap-hotspot",eventCategory:"in-page",eventAction:g+" - "+_})):(i.className=i.className.replace(" is-visible",""),i.querySelector(".m-viewer-3d__annotation__close").tabIndex=-1,setTimeout((function(){i.querySelector(".m-viewer-3d__annotation__content").innerHTML=""}),400),"modal"!=v&&"standalone"!=v||T.setCameraLookAt(A,S,.6))}function R(e){!e.target.matches(".a-hotspot__point")||13!=e.keyCode&&32!=e.keyCode||(_=parseInt(e.target.parentNode.dataset.id),z())}this.destroy=function(){apiVar&&apiVar.removeEventListener("click",P),d&&d.removeEventListener("click",F.bind(this,2)),l&&l.removeEventListener("click",D.bind(this,2)),s&&p&&O&&(s.removeEventListener("click",N.bind(this,2)),document.removeEventListener("fullscreenchange",H),document.removeEventListener("webkitfullscreenchange",H),document.removeEventListener("mozfullscreenchange",H),document.removeEventListener("MSFullscreenChange",H)),document.removeEventListener("keyup",R),A17.Helpers.purgeProperties(this)},this.init=function(){I()}},Ye=function(e){var t=function(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t},n=document.documentElement.scrollTop||document.body.scrollTop,r=e.offsetHeight,o=t(e)+document.body.scrollTop,i=window.innerHeight||document.documentElement.clientHeight;function a(){(n=document.documentElement.scrollTop||document.body.scrollTop)>o+r-i?(document.documentElement.classList.contains("is-module3d-fixed")&&document.documentElement.classList.remove("is-module3d-fixed"),document.documentElement.classList.contains("is-module3d-bottom")||document.documentElement.classList.add("is-module3d-bottom")):n>o?(document.documentElement.classList.contains("is-module3d-bottom")&&document.documentElement.classList.remove("is-module3d-bottom"),document.documentElement.classList.contains("is-module3d-fixed")||document.documentElement.classList.add("is-module3d-fixed")):(document.documentElement.classList.contains("is-module3d-bottom")&&document.documentElement.classList.remove("is-module3d-bottom"),document.documentElement.classList.contains("is-module3d-fixed")&&document.documentElement.classList.remove("is-module3d-fixed"))}function s(){i=window.innerHeight||document.documentElement.clientHeight,r=e.offsetHeight,o=t(e)+document.body.scrollTop}this.destroy=function(){window.removeEventListener("resized",s),window.removeEventListener("scroll",a),document.removeEventListener("module3d:loaded",s),A17.Helpers.purgeProperties(this)},this.init=function(){window.addEventListener("scroll",a),window.addEventListener("resized",s),document.addEventListener("module3d:loaded",s),a(),s()}},Ve=function(e){var t,n,r,o,i=function(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t},a=document.querySelector(".o-article"),s=parseInt(e.getAttribute("data-sticky-offset"),10);function u(){t>r-s?function(){document.documentElement.classList.contains("is-sidebar-top")&&document.documentElement.classList.remove("is-sidebar-top");document.documentElement.classList.contains("is-sidebar-fixed")||document.documentElement.classList.add("is-sidebar-fixed");var r=s-Math.max(0,t+n+s-o);e.setAttribute("style","top:"+r+"px")}():c()}function c(){document.documentElement.classList.contains("is-sidebar-top")&&document.documentElement.classList.remove("is-sidebar-top"),document.documentElement.classList.contains("is-sidebar-fixed")&&document.documentElement.classList.remove("is-sidebar-fixed"),e.removeAttribute("style")}function l(){t=document.documentElement.scrollTop||document.body.scrollTop,o=i(a)+document.body.scrollTop+a.offsetHeight,u()}function d(){c(),window.innerHeight||document.documentElement.clientHeight,n=e.offsetHeight,r=i(e)+document.body.scrollTop,l()}this.destroy=function(){window.removeEventListener("resized",d),window.removeEventListener("scroll",l),A17.Helpers.purgeProperties(this)},this.init=function(){window.addEventListener("scroll",l),window.addEventListener("resized",d),d(),l()}},Qe=n(3);var Xe=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=!0);var r=function(e){if(!e)return!1;if(e.indexOf("?")<0)return!1;var t=e.slice(e.indexOf("?")+1).split("&");if(!t)return!1;var n={};return t.map((function(e){var t=e.split("="),r=t[0],o=t[1];n[r]=decodeURIComponent(o)})),n}(e);return r&&n&&(t=Object.assign(r,t)),function(e){return!!e&&e.split(/[?#]/)[0]}(e)+"?"+function(e){return Object.keys(e).map((function(t){return"width"===t&&(t="w"),"height"===t&&(t="h"),t+"="+e[t]})).join("&")}(t)},$e=function(e,t){var n=new XMLHttpRequest;return n.onload=function(){t(n.response)},n.open("GET",e),n.responseType="blob",n.send(),n},Ge=function(){var e={},t=0,n=function(e){return e},r=function(r){if(!e)return n;var o=t++;return e[o]=r,function(t){return function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];var i=e;if(!i)return n.apply(void 0,r);var a=i[t];return delete i[t],a.apply(void 0,r)}}(o)};return r.unmount=function(){return e=null},r},Je=function(e){var t=e,n=0,r=null,o=0,i=window.innerWidth,a=window.innerHeight,s=i>=900,u=t.querySelector(".m-viewer-360-image"),c=t.querySelector(".m-viewer-360-control"),l=t.querySelector(".m-viewer-360-control .input360"),d={},f=Ge(),m=t.dataset.id,p=document.getElementById(m).textContent,h=JSON.parse(p).src;h=h.map((function(e){return{frame:e.frame,src:Xe(e.src,{w:s?i-120:i,h:s?a-80:a,q:75})}}));var v=Object.keys(h).map((function(e){return parseInt(e)}));function g(e){var n=b(v,e),r=d[n];void 0!==r&&(t.classList.remove("loader"),u.style.opacity=1,u.src=r,c.style.opacity=1),l.value=n,l.setAttribute("value",n)}l.setAttribute("max",h.length-1);var b=Object(Qe.memoize)((function(e,t){return e.length?Object(Qe.includes)(e,t)?t:e.reduce((function(e,n){return Math.abs(n-t)Math.abs(e.deltaX)?Math.sign(e.deltaY):Math.sign(e.deltaX);g(n=y(n+t))}.bind(this)),t.addEventListener("mousedown",w.bind(this)),t.addEventListener("mousemove",w.bind(this)),t.addEventListener("mouseup",w.bind(this)),t.addEventListener("touchstart",w.bind(this)),t.addEventListener("touchmove",w.bind(this)),t.addEventListener("touchend",w.bind(this)),t.addEventListener("touchcancel",w.bind(this)),this.init=function(){E()}},Ze=n(99),Ke=n.n(Ze),et=function(e){function t(){Ke.a.fitAll()}this.destroy=function(){document.removeEventListener("fonts:loaded",t),Object(o.f)(e.querySelectorAll("img"),(function(e,n){n.removeEventListener("load",t)})),Object(o.n)(this)},this.init=function(){Ke()(".f-fit-text",{minSize:16,maxSize:36}),document.addEventListener("fonts:loaded",t,!1),Object(o.f)(e.querySelectorAll("img"),(function(e,n){n.addEventListener("load",t,!1)}))}},tt=function(e){var t,n,r,o,i,a,s,u,c=0,l=!0,d=2e3,f=5e3,m="is-slideshow-active";function p(){g(),h(),s=setTimeout((function(){v()}),d)}function h(){s&&clearTimeout(s)}function v(){g(),l&&(u=setTimeout((function(){++c>t.length-1&&(c=0),y(c),v()}),f))}function g(){u&&clearTimeout(u)}function b(e,t){t.forEach((function(e){e.classList.contains(m)&&e.classList.remove(m)})),void 0!==t[e]&&t[e].classList.add(m)}function y(e){c=e,b(e,t),b(e,n),b(e,i)}function w(e){var n=e.target.closest("a");y(Array.prototype.indexOf.call(t,n))}function E(e){var t=e.target.closest(".m-article-header__pip"),n=Array.prototype.indexOf.call(i,t);p(),y(n)}function L(e){e.preventDefault(),e.stopPropagation(),l?(l=!1,a.classList.add("s-paused"),a.setAttribute("aria-label","Play video"),g(),h()):(l=!0,a.classList.remove("s-paused"),a.setAttribute("aria-label","Pause video"),v())}this.destroy=function(){t.forEach((function(e){e.removeEventListener("mouseover",h),e.removeEventListener("mouseover",w),e.removeEventListener("mouseout",p)})),i.forEach((function(e){e.removeEventListener("click",E)})),a.removeEventListener("click",L),A17.Helpers.purgeProperties(this)},this.init=function(){t=e.querySelectorAll("a"),n=e.querySelectorAll(".m-article-header__img img"),r=e.querySelector(".m-article-header__pips"),o=e.querySelector(".m-article-header__pip__template").innerHTML,a=e.querySelector(".m-article-header__play-pause"),t.forEach((function(e){e.addEventListener("mouseover",h,!1),e.addEventListener("mouseover",w,!1),e.addEventListener("mouseout",p,!1),r.insertAdjacentHTML("beforeend",o)})),(i=e.querySelectorAll(".m-article-header__pip")).forEach((function(e){e.addEventListener("click",E,!1)})),a.addEventListener("click",L,!1),y(0),v()}},nt=window.A17||{};if(!nt.browserSpec||"html4"===nt.browserSpec)throw new Error("HTML4");nt.currentMediaQuery=Object(o.g)(),nt.currentPathname=window.location.pathname,nt.dateRangeValues=["8000 BCE","7000 BCE","6000 BCE","5000 BCE","4000 BCE","3000 BCE","2000 BCE","1000 BCE","1 CE","500 CE","1000 CE","1200","1400","1600","1700","1800","1900","1910","1920","1930","1940","1950","1960","1970","1980","1990","2000","2010","Present"],nt.onYouTubeIframeAPIReady=!1;try{nt.env=/s-env-([a-z]*)/gi.exec(document.documentElement.className)[1]}catch(e){nt.env="unknown"}nt.ajaxLinksActive=!0,nt.ajaxLinksFailSafe="production"===nt.env,window.A17=nt,document.addEventListener("DOMContentLoaded",(function(){if(nt.print)return Object(o.f)(document.querySelectorAll("[data-src]"),(function(e,t){try{t.src=t.getAttribute("data-src")}catch(e){}})),void Object(o.f)(document.querySelectorAll("[data-srcset]"),(function(e,t){try{t.srcset=t.getAttribute("data-srcset")}catch(e){}}));k(),j(),x(),Object(o.l)(r),s(),u(),c(),b(),w(),M(),L(),d(),f(),l(),v(),Object(o.p)(),g(),T(),Object(y.a)({name:"serif",variants:[{name:"Sabon",weight:"400",style:"normal"},{name:"Sabon",weight:"400",style:"italic"},{name:"Sabon",weight:"500",style:"normal"}]}),Object(y.a)({name:"sans-serif",variants:[{name:"Ideal Sans A"},{name:"Ideal Sans B",weight:"400",style:"italic"}]}),Object(o.k)({rootMargin:"200px 0px",threshold:.01,maxFrameCount:20})})),window.onYouTubeIframeAPIReady=function(){nt.onYouTubeIframeAPIReady=!0},"undefined"==typeof console&&(window.console={log:function(){}}),document.addEventListener("ajaxPageLoad:complete",(function e(){"scrollRestoration"in history&&(history.scrollRestoration="manual",document.removeEventListener("ajaxPageLoad:complete",e))}),!1),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),r=this;do{for(t=n.length;--t>=0&&n.item(t)!==r;);}while(t<0&&(r=r.parentElement));return r})}]);
+ * MIT License */!function(i,s){"use strict";o=[],void 0===(r="function"==typeof(n=function(){var e={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal",window:window},t=["display:block","position:absolute","top:-999px","left:-999px","font-size:48px","width:auto","height:auto","line-height:normal","margin:0","padding:0","font-variant:normal","white-space:nowrap"],i='AxmTYklsjo190QW
',n=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return n.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},n.prototype.load=function(){var e,n=new Date,o=this,r=o.serif,s=o.sansSerif,a=o.parent,l=o.appended,c=o.options,u=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var h=i.replace(/\%s/,d("sans-serif")),m=i.replace(/\%s/,d("serif"));function p(e,t,i){return Math.abs(e.width-t.offsetWidth)>i||Math.abs(e.height-t.offsetHeight)>i}a||(a=o.parent=c.window.document.createElement("div")),a.innerHTML=h+m,s=o.sansSerif=a.firstChild,r=o.serif=s.nextSibling,c.glyphs&&(s.innerHTML+=c.glyphs,r.innerHTML+=c.glyphs),function t(){u||(u=c.window.document.body),!l&&u&&(u.appendChild(a),l=o.appended=!0,e=o.getMeasurements(),s.style.fontFamily=o.fontFamily+", sans-serif",r.style.fontFamily=o.fontFamily+", serif"),l&&e&&(p(e.sansSerif,s,c.tolerance)||p(e.serif,r,c.tolerance))?c.success():(new Date).getTime()-n.getTime()>c.timeout?c.error():!l&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},n.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},n.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},n.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(i){t.cleanFamilyName(i.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(i.weight)===t.cleanWeight(t.options.weight)&&i.style===t.options.style&&i.load().then((function(){t.options.success(i),t.options.window.clearTimeout(e)}))}))},n.prototype.init=function(t,i){var n;for(var o in e)i.hasOwnProperty(o)||(i[o]=e[o]);this.options=i,this.fontFamily=t,!i.glyphs&&"fonts"in i.window.document?(i.timeout&&(n=i.window.setTimeout((function(){i.error()}),i.timeout)),this.checkFontFaces(n)):this.load()},function(e,t){var i=new n;return i.init(e,t),i}})?n.apply(t,o):n)||(e.exports=r)}()},2:function(e,t,i){"use strict";var n={toObject:function(e){if("string"!=typeof e)return{};var t={};return(e&&e.indexOf("?")>-1?e.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(e,i,n,o){t[i]=o})),t},fromObject:function(e){var t="",i=0;if(Object.getOwnPropertyNames(e).length>0)for(var n in t="?",e)e.hasOwnProperty(n)&&(t+=(i>0?"&":"")+n+"="+encodeURIComponent(e[n]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),i++);return t},updateParameter:function(e,t,i){var n=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");if(e.match(n))return e.replace(n,"$1"+t+"="+i+"$2");var o="";-1!==e.indexOf("#")&&(o=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));var r=-1!==e.indexOf("?")?"&":"?";return e+r+t+"="+i+o}},o=function(e){var t=e,i=new XMLHttpRequest,o=t.url;if(t.queryString="",void 0!==t.data){if(!n.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=n.fromObject(t.data)}if("POST"!==t.type&&(o+=o.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),i.open(t.type,o,!0),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var r=0;r=200&&i.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,i.responseText,i.status):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,i.responseText,i.status),console.log("We reached our target server, but it returned an error: "+i.statusText))},i.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,i.responseText,i.status)},i.send("POST"===t.type?t.queryString.replace("?",""):"")},r={create:function(e,t,i){var n="";if(i){var o=new Date;o.setTime(o.getTime()+24*i*60*60*1e3),n="; expires="+o.toGMTString()}document.cookie=e+"="+t+n+"; path=/"},delete:function(e){e&&this.create(e,"",-1)},read:function(e){if(e){for(var t=e+"=",i=document.cookie.split(";"),n=0;n]*>?/g,""));return t.appendChild(i),encodeURIComponent(t.textContent)}return""},l=function(e,t,i){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),n.data=i||{},n.eventName=t,e.dispatchEvent(n)},c=(i(64),function(e,t,i){for(var n=0;n0&&(n--,o.unobserve(i.target),i.target.addEventListener("load",c,!1),u(i.target))}}function h(){var e,m,p;if("really-old"===r){for(n=a.length,e=0;e0&&p.right>0&&p.left<(window.innerWidth||document.documentElement.clientWidth)&&p.top<(window.innerHeight||document.documentElement.clientHeight))){var g=a[e];a[e]=void 0,g.lazyloaded=!0,g.addEventListener("load",c,!1),u(g)}for(e=0;e0&&(i++,t=window.requestAnimationFrame(h))}else if("new"===r)for(o=new IntersectionObserver(d,{rootMargin:s.rootMargin,threshold:s.threshold}),n=a.length,e=0;e=0;r--)t.options[r].selected&&(i[t.name]=t.options[r].value);else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(i[t.name]=t.value);return i},v=function(){var e,t=u();window.addEventListener("resize",(function(){clearTimeout(e),e=setTimeout((function(){var e=u();l(document,"resized"),e!==t&&(t=e,window.A17&&(window.A17.currentMediaQuery=e),l(document,"mediaQueryUpdated"))}),250)}))},y=function(e){var t,i={el:document,offset:0,duration:250,easing:"linear"},n=Date.now(),o=0,r=!1,s={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},a=window.requestAnimationFrame;for(var l in e)void 0!==e[l]&&(i[l]=e[l]);function c(){if(r&&0===o)document.documentElement.scrollTop=1,document.body.scrollTop=1,o=1,i.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(c);else{var e=Date.now(),l=(h=1,m=(e-n)/i.duration,h-1&&h(),o.indexOf("center")>-1&&(h(),c+=s.width/2-a.width/2-n.left),o.indexOf("right")>-1&&m()):h(),o.indexOf("top")>-1?u=s.top+l-n.top-a.height:d(),l>u&&d(),"auto"!==n.left&&(c+a.width>window.innerWidth?m():c-1&&(Object(o.r)(document,"setScrollDirection:machineScroll",{machineScroll:!0}),t=!0,e=window.pageYOffset,document.getElementById("a17").style.top=-1*e+"px",window.requestAnimationFrame((function(){document.documentElement.classList.add("s-body-locked")})))}),!1),document.addEventListener("body:unlock",(function(){t&&(t=!1,document.getElementById("a17").style.top="",document.documentElement.classList.remove("s-body-locked"),window.scrollTo(0,e),setTimeout((function(){window.scrollTo(0,e),e=0,Object(o.r)(document,"setScrollDirection:machineScroll",{machineScroll:!1})}),1))}),!1)},s=function(){var e;function t(){e?document.activeElement===e||e.contains(document.activeElement)||setTimeout((function(){Object(o.q)(e)}),0):document.removeEventListener("focus",i)}function i(i){try{document.removeEventListener("focus",t)}catch(e){}(i||i.data.element)&&(e=i.data.element,document.addEventListener("focus",t,!0))}document.addEventListener("focus:trap",i,!1),document.addEventListener("focus:untrap",(function(){document.removeEventListener("focus",i),e=null}),!1)},a=function(){var e,t="data-focus-method",i="touch",n="mouse",o="key",r=!1;document.addEventListener("keydown",(function(){r=o}),!0),document.addEventListener("mousedown",(function(){r!==i&&(r=n)}),!0),document.addEventListener("touchstart",(function(){r=i}),!0),document.addEventListener("focus",(function(i){r||(r=e),i.target&&"function"==typeof i.target.setAttribute&&(i.target.setAttribute(t,r),e=r,r=!1)}),!0),document.addEventListener("blur",(function(e){e.target&&"function"==typeof e.target.removeAttribute&&e.target.removeAttribute(t)}),!0),window.addEventListener("blur",(function(){r=!1}))},l=function(){window.history.pushState&&(document.addEventListener("history:replacestate",(function(e){"about:srcdoc"!==e.data.url&&history.replaceState(e.data,"",e.data.url)}),!1),document.addEventListener("history:pushstate",(function(e){history.pushState(e.data,"",e.data.url)}),!1),window.addEventListener("popstate",(function(e){e&&e.state&&e.state.type&&Object(o.r)(document,"ajax:pageload:popstate",e.state)}),!1),Object(o.r)(document,"history:replacestate",{url:location.href,type:"page"}))},c=function(){var e,t,i=!1,n=5e3;function r(){window.picturefill&&window.picturefill(),window.requestAnimationFrame((function(){Object(o.r)(document,"page:updated"),Object(o.r)(document,"loader:complete"),Object(o.r)(document,"ajaxPageLoadMask:hide"),Object(o.r)(document,"ajaxPageLoad:complete"),Object(o.r)(document,"setScrollDirection:machineScroll",{machineScroll:!1})})),i=!1}function s(e,i){document.documentElement.classList.add("s-page-nav-swapping"),setTimeout((function(){var t=document.querySelector("#a17");t.innerHTML=i.querySelector("#a17").innerHTML,t.style.minHeight="",function(e){if(e.documentElement.classList.contains("s-unsticky-header")?document.documentElement.classList.add("s-unsticky-header"):document.documentElement.classList.remove("s-unsticky-header"),e.documentElement.classList.contains("s-contrast-header")?document.documentElement.classList.add("s-contrast-header"):document.documentElement.classList.remove("s-contrast-header"),e.documentElement.classList.contains("s-filled-logo")?document.documentElement.classList.add("s-filled-logo"):document.documentElement.classList.remove("s-filled-logo"),e.documentElement.classList.contains("s-gallery-header")?document.documentElement.classList.add("s-gallery-header"):document.documentElement.classList.remove("s-gallery-header"),e.documentElement.classList.contains("s-roadblock-defined")){var t=e.querySelector(".g-modal--promo");t&&(Array.prototype.forEach.call(t,(function(e){var t=e.cloneNode(!0);document.body.append(t)})),document.documentElement.classList.add("s-roadblock-defined"))}else document.documentElement.classList.remove("s-roadblock-defined");var i=/p-\S*/g,n=document.documentElement.className.match(i),r=e.documentElement.className.match(i);Object(o.f)(n,(function(e,t){document.documentElement.classList.remove(t)})),Object(o.f)(r,(function(e,t){document.documentElement.classList.add(t)}))}(i),window.requestAnimationFrame((function(){var t=0,i=null;e.popstate&&e.popstate.data.scrollY?t=e.popstate.data.scrollY:window.location.hash?i=document.getElementById(window.location.hash.replace("#","")):e.ajaxScrollTarget&&(i=document.getElementById(e.ajaxScrollTarget)),i&&(t=Math.round(Object(o.i)(i).top)),document.documentElement.scrollTop=t,document.body.scrollTop=t,document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),Object(o.r)(document,"page:updated"),i&&setTimeout((function(){Object(o.q)(i)}),0),r()}))}),1),t=i.title,document.title=t,e.popstate||Object(o.r)(document,"history:pushstate",{url:e.href,type:e.type,title:t}),A17.currentPathname=window.location.pathname,Object(o.r)(document,"gtm:push",{event:"Pageview",url:e.href})}function a(a){if(!A17.ajaxLinksActive)return window.location.href=a.href,!1;if(!i){switch(i=!0,Object(o.r)(document,"shareMenu:close"),Object(o.r)(document,"selectDate:close"),Object(o.r)(document,"fullScreenImage:close"),Object(o.r)(document,"collectionSearch:close"),Object(o.r)(document,"infoButtonInfo:close"),Object(o.r)(document,"stickySidebar:clean"),Object(o.r)(document,"modal:close"),Object(o.r)(document,"roadblock:close"),Object(o.r)(document,"globalSearch:close"),Object(o.r)(document,"navMobile:close"),Object(o.r)(document,"dropdown:close"),t=null,null,null,Object(o.r)(document,"ajaxPageLoadMask:show"),Object(o.r)(document,"loader:start"),a.type){case"tab":document.documentElement.classList.add("s-page-nav");break;case"modal":break;default:(l=document.querySelector("#a17")).style.minHeight=l.offsetHeight+"px",document.documentElement.classList.add("s-page-nav")}var l,c=document.querySelector('meta[name="csrf-token"]');c=c?c.getAttribute("content"):"",_({url:a.href,type:"GET",requestHeaders:[{header:"X-CSRF-Token",value:c}],onSuccess:function(t,n,l){try{clearTimeout(e)}catch(e){}try{a.href=l,Object(o.r)(document,"setScrollDirection:machineScroll",{machineScroll:!0});var c=L(t,"native");switch(a.type){case"tab":!function(e,t){var i=document.getElementById(e.ajaxTabTarget);i.innerHTML=t.getElementById(e.ajaxTabTarget).innerHTML;var n=Math.round(Object(o.i)(i).top);Object(o.p)({el:document,offset:n,duration:500,easing:"easeInOut",onComplete:function(){setTimeout((function(){Object(o.q)(i)}),0)}}),document.documentElement.classList.remove("s-page-nav"),Object(o.r)(document,"page:updated"),Object(o.r)(document,"gtm:push",{event:"Pageview",url:e.href}),r()}(a,c);break;case"modal":!function(e,t){document.querySelector("[data-modal]").className="g-modal "+(e.modalClass?e.modalClass:""),document.querySelector("[data-modal-content]").innerHTML=t.querySelector("body").innerHTML,Object(o.r)(document,"modal:show",{opener:e.opener}),r()}(a,c);break;default:s(a,c)}}catch(e){Object(o.r)(document,"loader:error"),Object(o.r)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),i=!1,A17.ajaxLinksFailSafe?location.href=a.href:console.log(e)}},onError:function(t){clearTimeout(e),Object(o.r)(document,"loader:error"),Object(o.r)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),i=!1,A17.ajaxLinksFailSafe?location.href=a.href:console.log(t)}}),e=setTimeout((function(){A17.ajaxLinksFailSafe?location.href=a.href:console.log("Ajax response taking a long time to complete")}),n)}}function l(e,t,i){(t&&Object(o.r)(document,"gtm:push",t),i&&e&&"_blank"!==e.getAttribute("target")&&e.href&&e.href.indexOf("#")<0&&e.href.indexOf("interactive-features")<0&&window.location.href.indexOf("interactive-features")<0&&e.href.indexOf("articles")<0&&e.href.indexOf("artworks")<0&&e.href.indexOf("digital-publications")<0&&e.href.indexOf("exhibitions")<0&&e.href.indexOf("highlights")<0&&e.href.indexOf("artinstitutereview")<0&&e.href.indexOf("videos")<0&&e.href.indexOf("virtual-tours")<0&&e.href.indexOf("collection")<0&&e.href.indexOf("events")<0&&window.location.href.indexOf("articles")<0&&window.location.href.indexOf("artworks")<0&&window.location.href.indexOf("digital-publications")<0&&window.location.href.indexOf("exhibitions")<0&&window.location.href.indexOf("highlights")<0&&window.location.href.indexOf("artinstitutereview")<0&&window.location.href.indexOf("videos")<0&&window.location.href.indexOf("virtual-tours")<0&&window.location.href.indexOf("collection")<0&&window.location.href.indexOf("events")<0)&&(i.preventDefault(),window.open(e.href,"_blank").focus())}document.addEventListener("ajax:getPage",(function(e){e.data.url&&(m(e.data.url,e)?(history.state||e.data.type&&(!e.data.type||"modal"===e.data.type)||Object(o.r)(document,"history:replacestate",{url:location.href,type:e.data.type||"page",scrollY:window.scrollY||0}),a({href:e.data.url,type:e.data.type||"page",popstate:!1,modalClass:e.data.modalClass?e.data.modalClass:null,opener:e.data.opener?e.data.opener:null,ajaxScrollTarget:e.data.ajaxScrollTarget?e.data.ajaxScrollTarget:null})):window.location.href=e.data.url)})),document.addEventListener("ajax:pageload:popstate",(function(e){A17.currentPathname===window.location.pathname||e.data.type&&"page"!==e.data.type||(e.preventDefault(),a({href:e.data.url,type:e.data.type,title:e.data.title,popstate:e}))})),document.addEventListener("click",(function(e){var t=d(e.target,"A"),n=E(t);if(A17.ajaxLinksActive){var r=h(t,e);if(r){if(e.preventDefault(),!i){t.classList.contains("checkbox")&&(t.classList.contains("s-checked")?t.classList.remove("s-checked"):t.classList.add("s-checked")),n&&Object(o.r)(document,"gtm:push",n);var s=t.getAttribute("data-ajax-tab-target"),c=t.getAttribute("data-ajax-scroll-target"),u=null;null!==s&&null!==c&&(s=null),null!==s&&((u=document.getElementById(s))||(c=s,s=null)),u||Object(o.r)(document,"history:replacestate",{url:location.href,type:"page",scrollY:window.scrollY||0}),a({href:r.href,type:s?"tab":"page",popstate:!1,link:t,ajaxTabTarget:s||null,ajaxScrollTarget:c||null})}}else l(t,n,e)}else l(t,n,e)}))},u=function(){var e=!1;document.addEventListener("ajaxPageLoadMask:show",(function(){e||(e=!0,document.documentElement.classList.add("s-ajaxPageLoadMask-active"))}),!1),document.addEventListener("ajaxPageLoadMask:hide",(function(){e&&(e=!1,document.documentElement.classList.remove("s-ajaxPageLoadMask-active"))}),!1)},d=function(e,t){for(;e&&e.tagName!==t;)e=e.parentElement;return e},h=function(e,t){if(!e||!t)return!1;var i=e,n=i.href;return"A"===e.tagName&&(!!m(n,t)&&(!i.hasAttribute("data-no-ajax")&&!i.hasAttribute("download")&&((!i.target||"_blank"===i.target)&&(!(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&{href:n,el:i}))))},m=function(e,t){if(!e||"#"===e)return!1;var i=document.createElement("a");if(i.href=e,window.location.protocol!==i.protocol||window.location.hostname!==i.hostname)return!1;var n=t.target;if("A"!==n.tagName){if(n===document)return!0;n=n.closest("a")}return null!==n&&((n.host!==window.location.host||n.pathname!==window.location.pathname||!n.hash)&&(n.host===window.location.host&&n.pathname===window.location.pathname))},p=function(){var e,t=null,i=null,n=0;function o(){n+=.2*(90-n),i.style.width=n+"%",e=setTimeout(o,2e3*Math.random())}function r(){document.body.removeChild(t),t=null,i=null,n=0}document.addEventListener("loader:start",(function(){t&&r(),(t=document.createElement("span")).className="progress-bar",(i=document.createElement("span")).style.opacity=0,t.appendChild(i),document.body.appendChild(t),setTimeout((function(){i.style.opacity=1})),e=setTimeout((function(){n+=.4*(90-n),i.style.width=n+"%",o()}),250)})),document.addEventListener("loader:complete",(function(){try{clearTimeout(e)}catch(e){}i.style.width="100%",setTimeout(r,250)})),document.addEventListener("loader:error",(function(){try{clearTimeout(e)}catch(e){}i.style.width="0%",setTimeout(r,250)}))},g=function(){var e=document.documentElement,t=0,i=!1,n=!1,r=!1,s=!1,a=0,l=-1,c={25:{pos:0,hit:!1},50:{pos:0,hit:!1},75:{pos:0,hit:!1},100:{pos:0,hit:!1}};document.addEventListener("setScrollDirection:machineScroll",(function(e){window.requestAnimationFrame((function(){t=-1,s=e.data.machineScroll}))}),!1),document.addEventListener("page:updated",(function(e){l=-1}),!1),function u(){var d=document.documentElement.scrollTop||document.body.scrollTop;if(a=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight,l!=a&&(l=a,function(){for(var e in c){var t=100===e?(e-5)/100:e/100;c[e].pos=parseInt(a*t,10),c[e].hit=!1}}()),d===t||s)t=d;else{if(a>150)for(var h in c)d>=c[h].pos&&!c[h].hit&&(c[h].hit=!0,-1===window.location.href.indexOf("/interactive-features")&&Object(o.r)(document,"gtm:push",{event:(e.classList.contains("p-artworks-show")?"artwork-":"")+h+"%",eventCategory:"scroll-tracking"}));d>100&&!n?e.classList.contains("s-unsticky-header")||(e.classList.add("s-header-hide"),n=!0):d<=100&&n&&(e.classList.remove("s-header-hide"),n=!1),d>500&&!r?(e.classList.add("s-allow-top-link"),r=!0):d<=500&&r&&(e.classList.remove("s-allow-top-link"),r=!1),d>t+10&&"down"!==i?(i="down",e.classList.remove("s-scroll-direction-up"),e.classList.add("s-scroll-direction-down")):d-1&&(r=o.n.updateParameter(r,"enablejsapi","1"),r=o.n.updateParameter(r,"origin",window.location.origin)),n.src=r,t.querySelector("[data-modal-content]").innerHTML="",t.querySelector("[data-modal-content]").appendChild(n),r.indexOf("youtube.com")>-1&&x(n)}catch(e){console.log(e),t.querySelector("[data-modal-content]").innerHTML=i}return!0}return!1}(r)}i&&(Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(e),setTimeout((function(){Object(o.q)(t)}),0),Object(o.r)(document,"focus:trap",{element:t}),Object(o.r)(document,"page:updated")})))}}),!1),window.addEventListener("resized",(function(){i&&(console.log("resized"),t.style.display="none",window.requestAnimationFrame((function(){t.style.display=""})))}),!1),window.addEventListener("keyup",(function(t){document.documentElement.classList.contains(e)&&27===t.keyCode&&Object(o.r)(document,"modal:close")}),!1)},w=function(e){return"all"===e||(e===A17.currentMediaQuery||("small+"===e&&A17.currentMediaQuery.indexOf("xsmall")<0||("medium+"===e&&A17.currentMediaQuery.indexOf("small")<0||("large+"===e&&A17.currentMediaQuery.indexOf("small")<0&&A17.currentMediaQuery.indexOf("medium")<0||("small-"===e&&A17.currentMediaQuery.indexOf("small")>=0||("medium-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery)||"large-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery||"large"===A17.currentMediaQuery)))))))},b=function(e){var t,i,n=document.documentElement.classList.contains("s-collection-filters-active");document.addEventListener("collectionFilters:open",(function(){n||(n=!0,w("small-")?(i=window.scrollY,t=document.activeElement||document.querySelector("body"),Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add("s-collection-filters-active");var e=document.getElementById("collectionFilters");e&&(setTimeout((function(){Object(o.q)(e)}),0),Object(o.r)(document,"focus:trap",{element:e}))}))):document.documentElement.classList.add("s-collection-filters-active"))}),!1),document.addEventListener("collectionFilters:close",(function(){n&&(Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),setTimeout((function(){Object(o.q)(t),setTimeout((function(){window.scroll(0,i)}),0)}),0),document.documentElement.classList.remove("s-collection-filters-active"),n=!1)}),!1),document.addEventListener("collectionFilters:toggle",(function(){n?Object(o.r)(document,"collectionFilters:close"):Object(o.r)(document,"collectionFilters:open")}),!1),document.addEventListener("mediaQueryUpdated",(function(){n&&(Object(o.r)(document,"collectionFilters:close"),Object(o.r)(document,"collectionFilters:open"))}),!1)},S=function(e){var t=e&&e.icon?e.icon:null,i=e&&e.text?e.text:null,n=e&&e.type?"m-notification--"+e.type:null;if(i){var r="",s="";s=''.replace(/{{ text }}/gi,i),n&&(s=s.replace(/{{ type }}/gi,n)),t&&(r=' '.replace(/{{ icon }}/gi,e.icon),s=s.replace(/{{ icon }}/gi,r));var a=document.getElementById("content");a.insertAdjacentHTML("afterbegin",s),setTimeout((function(){Object(o.q)(a.firstChild)}),0),Object(o.r)(document,"page:updated")}},T=function(){document.addEventListener("gtm:push",(function(e){e.data&&(window.dataLayer=window.dataLayer||[],"Pageview"===e.data.event?window.dataLayer.push(e.data):(e.data.eventPageTitle=document.title.replace(/ \| The Art Institute of Chicago/gi,""),e.data.eventPagePathName=window.location.pathname,e.data.eventPageUrl=window.location.href,"production"!==A17.env&&console.log("gtm:dataLayerPush",e.data),window.dataLayer.push({event:"dataLayerPush",data:e.data})))}),!1)},E=function(e){if(!e||!e.dataset)return!1;var t=!1,i={};for(var n in e.dataset)if(e.dataset.hasOwnProperty(n)&&n.indexOf("gtm")>-1){var o=n.replace(/^gtm/,""),r=e.dataset[n];o=o.charAt(0).toLowerCase()+o.slice(1),"::document.title::"===r&&(r=document.title.replace(/ \| The Art Institute of Chicago/gi,"")),i[o]=r,t=!0}return!!t&&i},x=function(e){var t,i,n={25:!1,50:!1,75:!1,100:!1};function r(){var e=Math.round(t.getCurrentTime()/t.getDuration()*100);for(var i in n){e>=(100===i?99:i)&&!n[i]&&(n[i]=!0,Object(o.r)(document,"gtm:push",{event:i+"%",eventCategory:"video-engagement"}))}}function s(e){if(1===t.getPlayerState())i=setInterval(r,250),Object(o.r)(document,"gtm:push",{event:"playing",eventCategory:"video-engagement"});else{2===t.getPlayerState()&&Object(o.r)(document,"gtm:push",{event:"paused",eventCategory:"video-engagement"});try{clearInterval(i)}catch(e){}}}if(!document.getElementById("youtubeapijs")){var a=document.createElement("script");a.src="https://www.youtube.com/iframe_api",a.id="youtubeapijs";var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l)}e.id||(e.id="youtube_"+Math.random().toString(36).substr(2,9)),function i(){A17.onYouTubeIframeAPIReady?t=new YT.Player(e.id,{origin:window.location.origin,events:{onStateChange:s}}):setTimeout(i,250)}()},L=function(e,t){if("native"===t)return(new DOMParser).parseFromString(e,"text/html");var i=document.implementation.createHTMLDocument("");return e.toLowerCase().indexOf("-1?i.documentElement.innerHTML=e:i.body.innerHTML=e,i},P=function(){function e(){var e=document.querySelector("a"),t=document.querySelector("h1");if(t){var i=document.querySelector("#content-h1");i&&i.forEach((function(e){t.removeAttr("id")})),t.setAttribute("id","content-h1"),e&&e.setAttribute("href","#content-h1")}else e&&e.setAttribute("href","#content")}e(),document.addEventListener("DOMContentLoaded",e,!1),document.addEventListener("ajaxPageLoad:complete",e,!1)},O=function(){function e(){var e=document.getElementsByTagName("header")[0],t=document.getElementById("a17");if(t.style["padding-top"]=null,e.getElementsByClassName("m-notification--header").length<1)return null;parseInt(getComputedStyle(t)["padding-top"],10)>0&&(t.style["padding-top"]=e.offsetHeight+"px")}document.addEventListener("notification:confirmed",e,!1),document.addEventListener("ajaxPageLoad:complete",e,!1),window.addEventListener("resized",e,!1),e()},_=function(e){var t=e,i=new XMLHttpRequest,n=t.url;if(t.queryString="",void 0!==t.data){if(!o.default.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=o.default.fromObject(t.data)}if("POST"!==t.type&&(n+=n.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),i.open(t.type,n,!0),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var r=0;r=200&&i.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,i.responseText,i.status,i.responseURL):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,i.responseText,i.status,i.responseURL),console.log("We reached our target server, but it returned an error: "+i.statusText))},i.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,i.responseText,i.status)},i.send("POST"===t.type?t.queryString.replace("?",""):"")},C=function(e){var t="s-modal-active",i="s-roadblock-active",n="s-roadblock-defined",r=document.getElementById("modal"),s=document.getElementById("slider-promo"),a=!1,l=!1,c=null,u=null,d=!1,h="has_seen_lightbox";function m(){if(document.documentElement.classList.contains(n)){var e=document.getElementsByClassName("g-slider--promo--template");if(!(e.length<1)){var t=o.b.read(h)||"",i=Array.prototype.map.call(e,(function(e){return e.dataset.expires})),r=i.every((function(e,t,i){return e===i[0]}));if(!(t&&r&&i[0]>0)){var s=Array.prototype.map.call(e,(function(e){return e.dataset.geotarget}));d=!1,s.includes("all")?p("all"):null!==u?p(u?"local":"not-local"):(d=!0,Object(o.a)({url:"/api/v1/geotarget",type:"GET",onSuccess:function(e){p((u=null===(u=JSON.parse(e).is_local)||u)?"local":"not-local"),d=!1},onError:function(e){p("local"),d=!1}})),setTimeout(g,3e3)}}}}function p(e){var t=document.querySelector('.g-slider--promo--template[data-geotarget="'+e+'"]');if(t)s.dataset.expires=t.dataset.expires,s.innerHTML=t.innerHTML,Object(o.r)(s,"content:updated",{el:s}),document.documentElement.classList.add(n);else switch(e){case"local":p("all");break;case"all":document.documentElement.classList.remove(n)}}function g(e){if(document.documentElement.classList.contains(n)){if(d){if(!e)return void setTimeout((function(){g(!0)}),2e3);p("local")}if(""!==s.innerHTML){d=!1;var t=o.b.read(h)||"",r=parseInt(s.getAttribute("data-expires"))/60/60/24;if(!(t&&r>0)){document.documentElement.classList.add(i),l=null!==s.querySelector(".g-slider--promo__variation--newsletter"),c=null,a=!0,s.querySelector("form").addEventListener("submit",f,!0),r>0?o.b.create(h,!0,r):o.b.delete(h);var u=s.getElementsByTagName("button")[0];setTimeout((function(){u.classList.remove("btn--secondary"),u.classList.add("btn--animating"),setTimeout((function(){u.classList.remove("btn--animating")}),900)}),1200)}}}}function f(e){var t=document.getElementById("edit-submitted-first-name"),i=document.getElementById("edit-submitted-last-name"),n=document.getElementById("edit-submitted-mail"),r=document.getElementById("edit-submitted-tlcsource");if(l)return function(e){var t=s.querySelector("form");e.preventDefault(),e.stopPropagation(),y(),i=s.querySelector("button"),i.classList.add("s-loading"),i.setAttribute("disabled","disabled");var i;var n=Object(o.m)(t);Object(o.a)({url:t.action||"/subscribe",type:"POST",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"},{header:"X-CSRF-Token",value:document.querySelector("meta[name=csrf-token]").getAttribute("content")||""}],data:n,onSuccess:function(e){try{e=JSON.parse(e),t.classList.remove("s-loading"),t.setAttribute("disabled","disabled"),t.querySelector("input[name=email]").value="",w("success",e.message||e.email),Object(o.r)(document,"gtm:push",{event:"sign-up",eventCategory:"subscribe"})}catch(t){console.error("Error submitting newsletter sign up (a)"),console.log(t,e),w("error")}v()},onError:function(e){try{w("error",(e=JSON.parse(e)).message||e.email)}catch(t){console.error("Error submitting newsletter sign up (b)"),console.log(e,t),w("error")}v()}})}(e);var a=encodeURIComponent(JSON.stringify({firstname:t?t.value:null,lastname:i?i.value:null,email:n?n.value:null,tlcsource:r?r.value:null}));a+=";domain=.artic.edu",o.b.create("tlc_lb_signup",a,30);var c=E(e.target);c&&Object(o.r)(document,"gtm:push",c),Object(o.r)(document,"roadblock:close")}function v(){var e=s.querySelector("button");e.classList.remove("s-loading"),e.removeAttribute("disabled")}function y(){s.classList.remove("g-slider--msg-active");var e=s.querySelector(".g-slider--promo__variation--newsletter"),t=s.querySelector("form");c&&(e.removeChild(c),c=null),t.classList.remove("s-success"),t.classList.remove("s-error")}function w(e,t){var i=s.querySelector(".g-slider--promo__variation--newsletter");y();var n=document.createElement("div");n.className="g-slider__msg__content",(c=document.createElement("div")).className="g-slider__msg f-buttons","success"===e?(c.className+=" g-slider__msg--success",n.textContent=t||"Successfully signed up to the newsletter",i.classList.add("s-success")):"error"===e&&(c.className+=" g-slider__msg--error",n.textContent=t||"Error signing up to the newsletter",i.classList.add("s-error")),s.classList.add("g-slider--msg-active"),c.append(n),i.prepend(c)}document.addEventListener("roadblock:close",(function(){document.documentElement.classList.remove(i),a&&(Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),document.documentElement.classList.remove(t),setTimeout((function(){Object(o.q)(document.getElementById("a17"))}),0),setTimeout((function(){r.className="g-slider",r.querySelector("[data-modal-content]").innerHTML=""}),300),a=!1)}),!1),window.addEventListener("keyup",(function(e){document.documentElement.classList.contains(i)&&27===e.keyCode&&Object(o.r)(document,"roadblock:close")}),!1),document.addEventListener("ajaxPageLoad:complete",m,!1),m()};i.d(t,"w",(function(){return n})),i.d(t,"s",(function(){return r})),i.d(t,"l",(function(){return s})),i.d(t,"k",(function(){return a})),i.d(t,"q",(function(){return l})),i.d(t,"b",(function(){return c})),i.d(t,"c",(function(){return u})),i.d(t,"j",(function(){return d})),i.d(t,"f",(function(){return h})),i.d(t,"e",(function(){return m})),i.d(t,"r",(function(){return p})),i.d(t,"y",(function(){return g})),i.d(t,"g",(function(){return f})),i.d(t,"m",(function(){return v.a})),i.d(t,"u",(function(){return y})),i.d(t,"t",(function(){return w})),i.d(t,"h",(function(){return b})),i.d(t,"i",(function(){return S})),i.d(t,"n",(function(){return T})),i.d(t,"o",(function(){return E})),i.d(t,"z",(function(){return x})),i.d(t,"v",(function(){return L})),i.d(t,"a",(function(){return P})),i.d(t,"p",(function(){return O})),i.d(t,"d",(function(){return _})),i.d(t,"x",(function(){return C}))},425:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?P(t(document.querySelectorAll(e)),i):P([e],i)[0]}}("undefined"==typeof window?null:window)},64:function(e,t,i){var n,o,r;!function(i,s){"use strict";o=[],void 0===(r="function"==typeof(n=function(){var e={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal",window:window},t=["display:block","position:absolute","top:-999px","left:-999px","font-size:48px","width:auto","height:auto","line-height:normal","margin:0","padding:0","font-variant:normal","white-space:nowrap"],i='AxmTYklsjo190QW
',n=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return n.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},n.prototype.load=function(){var e,n=new Date,o=this,r=o.serif,s=o.sansSerif,a=o.parent,l=o.appended,c=o.options,u=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var h=i.replace(/\%s/,d("sans-serif")),m=i.replace(/\%s/,d("serif"));function p(e,t,i){return Math.abs(e.width-t.offsetWidth)>i||Math.abs(e.height-t.offsetHeight)>i}a||(a=o.parent=c.window.document.createElement("div")),a.innerHTML=h+m,s=o.sansSerif=a.firstChild,r=o.serif=s.nextSibling,c.glyphs&&(s.innerHTML+=c.glyphs,r.innerHTML+=c.glyphs),function t(){u||(u=c.window.document.body),!l&&u&&(u.appendChild(a),l=o.appended=!0,e=o.getMeasurements(),s.style.fontFamily=o.fontFamily+", sans-serif",r.style.fontFamily=o.fontFamily+", serif"),l&&e&&(p(e.sansSerif,s,c.tolerance)||p(e.serif,r,c.tolerance))?c.success():(new Date).getTime()-n.getTime()>c.timeout?c.error():!l&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},n.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},n.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},n.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(i){t.cleanFamilyName(i.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(i.weight)===t.cleanWeight(t.options.weight)&&i.style===t.options.style&&i.load().then((function(){t.options.success(i),t.options.window.clearTimeout(e)}))}))},n.prototype.init=function(t,i){var n;for(var o in e)i.hasOwnProperty(o)||(i[o]=e[o]);this.options=i,this.fontFamily=t,!i.glyphs&&"fonts"in i.window.document?(i.timeout&&(n=i.window.setTimeout((function(){i.error()}),i.timeout)),this.checkFontFaces(n)):this.load()},function(e,t){var i=new n;return i.init(e,t),i}})?n.apply(t,o):n)||(e.exports=r)}()},866:function(e,t,i){"use strict";i.r(t);var n={};i.r(n),i.d(n,"textCount",(function(){return r})),i.d(n,"dropdown",(function(){return a})),i.d(n,"formSelectFocus",(function(){return l})),i.d(n,"formUnsubscribe",(function(){return c})),i.d(n,"calendar",(function(){return u})),i.d(n,"selectDate",(function(){return d})),i.d(n,"dragScroll",(function(){return h})),i.d(n,"accordion",(function(){return m})),i.d(n,"notification",(function(){return p})),i.d(n,"printPage",(function(){return g})),i.d(n,"sharePage",(function(){return f})),i.d(n,"shareMenu",(function(){return v})),i.d(n,"mask",(function(){return y})),i.d(n,"pinboard",(function(){return w})),i.d(n,"bannerParallax",(function(){return b})),i.d(n,"imageInfo",(function(){return S})),i.d(n,"headerGallery",(function(){return T})),i.d(n,"imageZoomArea",(function(){return L})),i.d(n,"filterToggleShowMore",(function(){return P})),i.d(n,"filterWhittleDown",(function(){return O})),i.d(n,"showStickySidebar",(function(){return _})),i.d(n,"hideStickySidebar",(function(){return C})),i.d(n,"navMobile",(function(){return A})),i.d(n,"openNavMobile",(function(){return R})),i.d(n,"closeNavMobile",(function(){return k})),i.d(n,"infoButtonTrigger",(function(){return I})),i.d(n,"linksBar",(function(){return M})),i.d(n,"mobileSearch",(function(){return D})),i.d(n,"globalSearch",(function(){return H})),i.d(n,"globalSearchOpen",(function(){return B})),i.d(n,"globalSearchClose",(function(){return j})),i.d(n,"autocomplete",(function(){return F})),i.d(n,"newsletter",(function(){return z})),i.d(n,"openImageFullScreen",(function(){return N})),i.d(n,"blurMyBackground",(function(){return q})),i.d(n,"loadMore",(function(){return W})),i.d(n,"getUrl",(function(){return U})),i.d(n,"triggerMediaModal",(function(){return V})),i.d(n,"triggerMediaInline",(function(){return G})),i.d(n,"closeRoadblock",(function(){return $})),i.d(n,"closeModal",(function(){return Z})),i.d(n,"stickyFilters",(function(){return X})),i.d(n,"injectContent",(function(){return Y})),i.d(n,"clearHistory",(function(){return Q})),i.d(n,"addHistory",(function(){return K})),i.d(n,"maskEmail",(function(){return J})),i.d(n,"ajaxFormSubmit",(function(){return ee})),i.d(n,"reportSearchToGoogleTagManager",(function(){return te})),i.d(n,"mediaPlayPauseVideo",(function(){return ie})),i.d(n,"limitSearch",(function(){return ne})),i.d(n,"searchBarBlock",(function(){return oe})),i.d(n,"restrictDownload",(function(){return re})),i.d(n,"fixedOnScroll",(function(){return se})),i.d(n,"stickySidebar",(function(){return ae})),i.d(n,"fitText",(function(){return ue})),i.d(n,"magazineHeader",(function(){return de})),i.d(n,"imageSlider",(function(){return me})),i.d(n,"relatedSidebar",(function(){return pe}));var o=i(2),r=function(e){var t=e.querySelector("input"),i=e.querySelector("output");function n(){var e=t.value,n=e.length,o=e.match(/(\r\n|\n|\r)/g);null!==o&&(n+=o.length),i.value=n}this.destroy=function(){t.removeEventListener("input",n),A17.Helpers.purgeProperties(this)},this.init=function(){t.addEventListener("input",n,!1),n()}},s=i(32),a=function(e){var t=!1,i=!1,n=!0,r=e.getAttribute("data-dropdown-breakpoints")||"all";function a(t){n&&(t&&t.stopPropagation(),(t.target.classList.contains("dropdown__trigger")?t.target:t.target.parentNode).firstElementChild.setAttribute("aria-expanded","true"),Object(o.r)(document,"dropdown:close"),e.classList.add("s-active"),setTimeout((function(){Object(o.q)(e.querySelector("ul"))}),0),i=!0)}function l(t){t&&t.data.el&&t.data.el===e&&n&&!i&&a()}function c(t){if(i){if(t){var n=null;"focus"===t.type&&"INPUT"===document.activeElement.tagName&&(n=document.activeElement).blur(),t.stopPropagation(),n&&window.requestAnimationFrame((function(){n.focus()}))}(t.target.classList.contains("dropdown__trigger")?t.target:t.target.parentNode).firstElementChild.setAttribute("aria-expanded","false"),e.classList.remove("s-active"),i=!1}}function u(e){i&&c()}function d(t){document.activeElement===e||e.contains(document.activeElement)?(t.stopPropagation(),i?document.activeElement!==e&&document.activeElement!==e.firstElementChild||(c(t),setTimeout((function(){Object(o.q)(e.parentNode)}),0)):a(t)):c(t)}function h(t){document.activeElement!==e&&!e.contains(document.activeElement)&&i&&c(t)}function m(){t&&(i=!1,document.removeEventListener("focus",d),document.removeEventListener("click",h),document.removeEventListener("dropdown:open",l),document.removeEventListener("dropdown:close",u),t=!1)}function p(){!t&&Object(s.t)(r)?t||(e.setAttribute("tabindex","0"),i=e.classList.contains("s-active"),document.addEventListener("focus",d,!0),document.addEventListener("click",h,!1),document.addEventListener("dropdown:open",l,!1),document.addEventListener("dropdown:close",u,!1),t=!0):t&&!Object(s.t)(r)&&m()}this.destroy=function(){document.removeEventListener("mediaQueryUpdated",p),m(),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("mediaQueryUpdated",p,!0),p()}},l=function(e){function t(){e.classList.add("s-focus")}function i(){e.classList.remove("s-focus")}this.destroy=function(){e.querySelector("select").removeEventListener("focus",t),e.querySelector("select").removeEventListener("blur",i),A17.Helpers.purgeProperties(this)},this.init=function(){e.querySelector("select").addEventListener("focus",t,!1),e.querySelector("select").addEventListener("blur",i,!1)}},c=function(e){function t(t){!function(t){t.preventDefault(),t.stopPropagation(),Object(o.f)(document.querySelectorAll('input[type=checkbox][name^="subscriptions[]"]:not([id="subscriptions-OptEnews"])'),(function(t,i){"true"===i.getAttribute("disabled")?(i.removeAttribute("disabled"),e.querySelector('input[type=checkbox][name="unsubscribe"]').checked=!1):(i.setAttribute("disabled","true"),i.removeAttribute("checked"),i.checked=!1,e.querySelector('input[type=checkbox][name="unsubscribe"]').checked=!0)}))}(t)}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},u=function(e){e.getAttribute("data-calendar-url");var t,i,n,r,s,a,l,c,u=0,d=[],h=!1,m=[],p=[],g="",f={},v="single",y="start";function w(e){return new Date(parseInt(e.substring(0,4)),parseInt(e.substring(4,6))-1,parseInt(e.substring(6,8)))}function b(){n>11&&(n=0,r++),n<0&&(n=11,r--)}function S(e,n,r){new Date(n,r);var s=1===new Date(n,1,29).getMonth();p[1]=s?29:28;for(var a=new Date(n,r).getDay(),l=p[r]+a;l%7>0;)l++;g="";for(var c=1;c<=l;c++){var u="",d="";if(c<=a||c>p[r]+a)u=" ";else{var h=c-a,v=new Date(n,r,h),y=v.getTime()===t.getTime(),w=v.getTime()=f.end.dateObj.getTime())&&(d+=" s-range"),y||!w){var b=m[r]+" "+h+", "+n,S=r+1;S=S<10?"0"+S:S.toString();var T=h<10?"0"+h:h.toString();u=''+h+" "}else u=h}g=g+''+u+" \n"+(0!==c&&c!==l&&c%7==0?" \n\n":"")}g+=" ",e.querySelector("[data-calendar-title]").textContent=m[r]+" "+n,e.querySelector("tbody").innerHTML=g}function T(e,t){if(d.length!==u)for(var i=0;ie.clientWidth)?(e.classList.add("s-scrollable"),t&&t.classList.remove("s-hidden"),i&&i.classList.remove("s-hidden"),c=!0):(e.classList.remove("s-scrollable"),e.classList.remove("s-dragging"),e.classList.remove("s-mousedown"),e.parentElement.classList.remove("s-scroll-start"),e.parentElement.classList.remove("s-scroll-end"),t&&t.classList.add("s-hidden"),i&&i.classList.add("s-hidden")),u=null,b()}function p(t,i){if(l){var o=n-t;e.scrollLeft=o,n=o}}function g(){l&&!r&&(Math.abs(a)>0&&(a=a>0?a-1:a+1),Math.abs(a)>0&&(p(a),window.requestAnimationFrame(g)))}function f(e){l&&!s&&(e.preventDefault(),e.stopPropagation())}function v(t){l&&(t.preventDefault(),e.classList.add("s-mousedown"),a=0,n=e.scrollLeft,o=t.clientX,r=!0)}function y(t){l&&(r=!1,Math.abs(a)>0&&window.requestAnimationFrame(g),e.classList.remove("s-dragging"),e.classList.remove("s-mousedown"),setTimeout((function(){s=!0}),50))}function w(t){l&&r&&(p(a=-o+t.clientX),o=t.clientX,s=!(Math.abs(a)>3),e.classList.add("s-dragging"))}function b(){(n=e.scrollLeft)!==u&&(u=n,n>0?(e.parentElement.classList.add("s-scroll-start"),t&&(t.disabled=!1)):(e.parentElement.classList.remove("s-scroll-start"),t&&(t.disabled=!0)),e.clientWidth+n>=e.scrollWidth?(e.parentElement.classList.add("s-scroll-end"),i&&(i.disabled=!0)):(e.parentElement.classList.remove("s-scroll-end"),i&&(i.disabled=!1)))}function S(t){e.scrollTo({top:0,left:Math.max(e.scrollLeft-e.clientWidth*h,0),behavior:"smooth"})}function T(t){e.scrollTo({top:0,left:Math.min(e.scrollLeft+e.clientWidth*h,e.scrollWidth),behavior:"smooth"})}this.destroy=function(){e.removeEventListener("click",f),e.removeEventListener("mousedown",v),e.removeEventListener("scroll",b),window.removeEventListener("mouseup",y),window.removeEventListener("mousemove",w),window.removeEventListener("resized",m);for(var n=0;n0){var s=r.indexOf(i);if(s>-1)(r[s+1]||r[0]).focus()}}}(document.activeElement)}}function u(){e.addEventListener("click",a,!1),e.addEventListener("keyup",l,!1),window.addEventListener("keyup",c,!1),function(){if(window.location.hash&&"#"!==window.location.hash){var t=document.getElementById(window.location.hash.replace(/#/gi,""));if(e.contains(t)){var i=Math.round(Object(o.i)(t).top);window.scrollTo(0,i),t.click()}}}()}this.destroy=function(){e.removeEventListener("click",a),e.removeEventListener("keyup",l),window.removeEventListener("keyup",c),A17.Helpers.purgeProperties(this)},this.init=function(){u()}},p=function(e){var t=e.querySelectorAll("[data-notification-closer]"),i="has_seen_notification",n=e.getAttribute("data-notification-hash");function r(){this.parentNode.removeChild(this),e.removeEventListener("transitionend",r)}function s(s){s.preventDefault(),s.stopPropagation(),e.classList.add("s-hide"),e.addEventListener("transitionend",r,!1);var a=Array.prototype.map.call(t,(function(e){return e.dataset.expires}))[0];n&&(a>0?o.b.create(i,n,a):o.b.create(i,n,-3600))}this.destroy=function(){Object(o.f)(t,(function(e,t){t.removeEventListener("click",s)})),t=void 0,A17.Helpers.purgeProperties(this)},this.init=function(){var r;r=o.b.read(i)||"",n&&r===n?e.parentNode.removeChild(e):(e.classList.add("m-notification--header-loaded"),Object(o.r)(document,"notification:confirmed",{}),Object(o.f)(t,(function(e,t){t.addEventListener("click",s,!1)})))}},g=function(e){function t(e){e.preventDefault();window.open(o.n.updateParameter(window.location.href,"print","true"),"AIC_printWindow")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},f=function(e){var t,i,n=document.getElementById("shareMenu"),r=!1,a=!1;function l(){Object(s.w)({element:n,target:e,position:"top left",padding:{top:12},breakpoints:{xsmall:!1,small:!1,medium:!0,large:!0,xlarge:!0}})}function c(){r&&setTimeout(l,100)}function u(){r&&(h(),m())}function d(e){t&&i&&("default"===e?(t.setAttribute("class",i),t.querySelector("use").setAttribute("xlink:href","#"+i)):(t.setAttribute("class","icon--close"),t.querySelector("use").setAttribute("xlink:href","#icon--close")))}function h(){r&&(document.documentElement.classList.remove("s-shareMenu-active"),a||Object(o.r)(document,"body:unlock"),n.removeAttribute("style"),Object(o.r)(document,"focus:untrap"),setTimeout((function(){Object(o.q)(e.parentNode)}),0),d("default"),e.classList.remove("s-active"),e.setAttribute("aria-label","Share page"),r=!1)}function m(t){t&&(t.preventDefault(),t.stopPropagation()),e.blur(),r?h():((a=document.documentElement.classList.contains("s-body-locked"))||Object(o.r)(document,"body:lock",{breakpoints:"xsmall small"}),window.requestAnimationFrame((function(){r=!0,e.classList.add("s-active"),d("active"),document.documentElement.classList.add("s-shareMenu-active"),l(),setTimeout((function(){Object(o.q)(n)}),0),Object(o.r)(document,"focus:trap",{element:n}),Object(o.r)(n,"shareMenu:opened",{url:e.getAttribute("data-share-url"),title:e.getAttribute("data-share-title")}),e.setAttribute("aria-label","Close share page menu")})))}function p(e){e.preventDefault(),e.stopPropagation(),function(e){r?h():m(e)}(e)}function g(e){r&&(e.preventDefault(),e.stopPropagation(),h())}function f(e){var t="INPUT"===e.target.tagName;r&&27===e.keyCode&&!t&&h()}this.destroy=function(){e.removeEventListener("click",p),document.removeEventListener("shareMenu:close",h),document.removeEventListener("click",g),window.removeEventListener("resized",c),document.removeEventListener("mediaQueryUpdated",u),window.removeEventListener("keyup",f),A17.Helpers.purgeProperties(this)},this.init=function(){t=e.querySelector("svg[class*=icon--]"),i=t?t.getAttribute("class"):null,e.addEventListener("click",p,!1),document.addEventListener("shareMenu:close",h,!1),document.addEventListener("click",g,!1),window.addEventListener("resized",c,!1),document.addEventListener("mediaQueryUpdated",u,!1),window.addEventListener("keyup",f,!1)}},v=function(e){var t,i,n,r=[],a="%0D%0A";function l(){return Object(o.e)(i)}function c(){return Object(o.e)(n)}function u(e){e.preventDefault(),e.stopPropagation();var n=e.target,a=e.target.getAttribute("data-shareMenu");e.target.blur(),"copy"===a?Object(o.c)(i,"Copied!"):Object(o.f)(r,(function(i,n){n.name===a&&function(e,i){i||(i={});var n=i.width||575,o=i.height||400,r=(window.outerWidth-n)/2,s="status=1,width="+n+",height="+o+",top="+(window.outerHeight-o)/2+",left="+r;t&&!t.closed&&t.close(),setTimeout((function(){(t=window.open(e,"AIC_Share",s)).opener=null}),250)}(e.target.href,n.windowOptions)}));var l=Object(s.o)(n);l&&Object(o.r)(document,"gtm:push",l),Object(o.r)(document,"shareMenu:close")}function d(t){i=window.location.href,n=document.title,t&&t.data&&(i=t.data.url||window.location.href,n=t.data.title||document.title),Object(o.f)(r,(function(t,i){var n=e.querySelector("[data-shareMenu="+i.name+"]");n&&(n.href=i.href(),n.setAttribute("target","_blank"))}))}this.destroy=function(){e.removeEventListener("click",u),e.removeEventListener("shareMenu:opened",d),A17.Helpers.purgeProperties(this)},this.init=function(){r.push({name:"facebook",href:function(){return"https://www.facebook.com/sharer/sharer.php?u="+l()},windowOptions:{}}),r.push({name:"twitter",href:function(){return"https://twitter.com/intent/tweet?url="+l()+"&text="+c()+(e.getAttribute("data-share-twitter-via")?"&via="+e.getAttribute("data-share-twitter-via"):"")},windowOptions:{height:253}}),r.push({name:"google",href:function(){return"https://plus.google.com/share?url="+l()},windowOptions:{width:515,height:505}}),r.push({name:"pinterest",href:function(){var e=document.getElementsByTagName("img")[0];return"http://pinterest.com/pin/create/button/?url="+l()+"&media="+Object(o.e)(e.getAttribute("data-pin-media")||e.getAttribute("src")||"")+"&description="+c()},windowOptions:{width:750,height:675}}),r.push({name:"email",href:function(){return"mailto:?Subject="+c()+"&Body="+Object(o.e)()+a+a+l()+a+a},windowOptions:{}}),e.addEventListener("click",u,!1),e.addEventListener("shareMenu:opened",d,!1),d()}},y=function(e){function t(t){t.preventDefault(),t.stopPropagation(),e.blur(),Object(o.r)(document,"shareMenu:close"),Object(o.r)(document,"selectDate:close"),Object(o.r)(document,"fullScreenImage:close"),Object(o.r)(document,"collectionSearch:close"),Object(o.r)(document,"collectionFilters:close"),Object(o.r)(document,"stickySidebar:close"),Object(o.r)(document,"infoButtonInfo:close"),Object(o.r)(document,"modal:close"),Object(o.r)(document,"roadblock:close"),Object(o.r)(document,"globalSearch:close"),Object(o.r)(document,"navMobile:close"),Object(o.r)(document,"dropdown:close")}this.destroy=function(){e.removeEventListener("touchend",t),e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("touchend",t,!1),e.addEventListener("click",t,!1)}},w=function(e){var t,i={},n=0,r=0,a=!1,l=!1,c=(e.className,e.getAttribute("data-pinboard-option-layout")),u=/([0-9])-col@(\w*)/gi;function d(e){for(var t;null!==(t=u.exec(e));)i[t[2]]=t[1]}function h(i){var s=e.children;if(0!==s.length){var a=e.firstElementChild,c=a.offsetWidth,u=(e.offsetWidth-c*n)/(n-1);a.classList.add("s-repositioning");var d,h,m=(d=a,h=window.getComputedStyle(d),parseInt(h.getPropertyValue("margin-top")));a.classList.remove("s-repositioning"),m="number"==typeof m?m:60,r=0,Object(o.f)(s,(function(n,s){if(!1===s.classList.contains("s-positioned")||i){var a,d,h;s.style.height="auto",l?(a=t[r],h=(d=r)*(c+u),r=rf?f+"px":v+"px"}var y=s.offsetHeight;s.style.left=Math.round(h)+"px",s.style.top=Math.round(a)+"px",s.style.height=Math.round(y)+"px",setTimeout((function(){s.classList.add("s-positioned")}),250),t[d]=a+y+m,e.style.height=function(e){return Math.max.apply(Math,e)}(t)+"px",Object(o.r)(document,"page:updated")}var w}))}}function m(){if(n=i[A17.currentMediaQuery]){t=[];for(var r=0;r0){var a=Math.round(i-s/(window.innerHeight+r.height)*i);t.style.transform="translate3D(0px, "+a+"px, 0px)"}}window.requestAnimationFrame(o)}this.destroy=function(){n=!1,A17.Helpers.purgeProperties(this)},this.init=function(){n=!0,t=e.querySelector("[data-parallax-img]"),window.requestAnimationFrame(o)}},S=function(e){var t=e.nextElementSibling,i=!1;function n(){i?(e.setAttribute("aria-expanded","false"),e.setAttribute("aria-selected","false"),t.setAttribute("aria-hidden","true"),i=!1):(e.setAttribute("aria-expanded","true"),e.setAttribute("aria-selected","true"),t.setAttribute("aria-hidden","false"),i=!0)}function o(){e.blur(),n()}function r(){t.blur(),n()}this.destroy=function(){e.removeEventListener("click",o),t.removeEventListener("click",r),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",o,!1),t.addEventListener("click",r,!1)}},T=function(e){var t={},i={},n=0;function r(){var o=t.hero.querySelector("img");o.removeEventListener("load",r),o.setAttribute("srcset",i[n].srcset),e.classList.remove("s-updating")}function s(s){Object(o.f)(t.thumbButtons,(function(e,t){e!==n?(i[e].active=!1,t.removeAttribute("disabled")):(i[e].active=!0,t.setAttribute("disabled","disabled"))})),Object(o.f)(t.share,(function(e,t){t.setAttribute("data-share-url",i[n].shareUrl),t.setAttribute("data-share-title",i[n].shareTitle)})),s||(e.classList.add("s-updating"),setTimeout((function(){var e,o=t.hero.querySelector("img");o.removeAttribute("srcset"),o.removeAttribute("data-srcset"),o.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",o.addEventListener("load",r,!1),o.src=i[n].src,o.width=i[n].width,o.height=i[n].height,o.alt=i[n].alt,e=document.createElement("span"),i[n].credit?(i[n].creditUrl&&((e=document.createElement("a")).href=i[n].creditUrl),e.innerHTML=i[n].credit||i[n].creditUrl):e.innerHTML="",e.className="m-article-header__img-credit f-caption",e.setAttribute("data-gallery-credit",""),t.credit.parentNode.replaceChild(e,t.credit),t.credit=e}),150))}function a(e){"BUTTON"===e.target.tagName&&(e.preventDefault(),n=Object(o.h)(e.target,t.thumbButtons),s(),Object(o.r)(document,"gtm:push",{event:"artwork-alternate-image",eventCategory:"in-page"}))}function l(e){var t=document.createElement("a");document.body.appendChild(t),t.download=i[n].downloadName,t.href=i[n].downloadUrl,t.setAttribute("target","_blank"),t.click(),document.body.removeChild(t),Object(o.r)(document,"gtm:push",{event:"artwork-download",eventCategory:"in-page"})}function c(e){e.preventDefault(),Object(o.r)(document,"fullScreenImage:open",{img:i[n]})}function u(){s(!0)}function d(){t.hero=e.querySelector("[data-gallery-hero]")||!1,t.credit=e.querySelector("[data-gallery-credit]")||!1,t.fullscreen=e.querySelectorAll("[data-gallery-fullscreen]")||!1,t.download=e.querySelectorAll("[data-gallery-download]")||!1,t.share=e.querySelectorAll("[data-gallery-share]")||!1,t.thumbs=e.querySelector("[data-gallery-thumbs]")||!1,t.thumbButtons=t.thumbs.querySelectorAll("button")||!1,Object(o.f)(t.thumbButtons,(function(e,t){var o=t.getAttribute("disabled");o&&(n=e),i[e]={src:t.getAttribute("data-gallery-img-src")||t.nextElementSibling.getAttribute("src")||"",srcset:t.getAttribute("data-gallery-img-srcset")||t.nextElementSibling.getAttribute("srcset")||"",width:t.getAttribute("data-gallery-img-width")||t.nextElementSibling.getAttribute("width")||"",height:t.getAttribute("data-gallery-img-height")||t.nextElementSibling.getAttribute("height")||"",credit:t.getAttribute("data-gallery-img-credit")||"",alt:t.getAttribute("data-gallery-img-alt")||t.nextElementSibling.getAttribute("alt")||"",creditUrl:t.getAttribute("data-gallery-img-credit-url")||"",shareUrl:t.getAttribute("data-gallery-img-share-url")||"",shareTitle:t.getAttribute("data-gallery-img-share-title")||"",downloadUrl:t.getAttribute("data-gallery-img-download-url")||"",downloadName:t.getAttribute("data-gallery-img-download-name")||"",iiifId:t.getAttribute("data-gallery-img-iiifId")||t.nextElementSibling.getAttribute("data-gallery-img-iiifId")||null,active:o},""!==i[e].shareUrl&&"#"!==i[e].shareUrl||(i[e].shareUrl=window.location.href),""===i[e].shareTitle&&(i[e].shareTitle=document.title),""!==i[e].downloadUrl&&"#"!==i[e].downloadUrl||(i[e].downloadUrl=i[e].srcset.split(" ")[0]),""===i[e].downloadName&&(i[e].downloadName="image")})),t.thumbs&&t.thumbs.addEventListener("click",a,!1),t.download&&Object(o.f)(t.download,(function(e,t){t.addEventListener("click",l,!1)})),t.fullscreen&&Object(o.f)(t.fullscreen,(function(e,t){t.addEventListener("click",c,!1)})),document.addEventListener("resized",u,!1),s(!0)}this.destroy=function(){t.thumbs.removeEventListener("click",a),t.download.removeEventListener("click",l),t.fullscreen.removeEventListener("click",c),document.removeEventListener("resized",u),t={},i={},A17.Helpers.purgeProperties(this)},this.init=function(){d()}},E=i(181),x=i.n(E),L=function(e){var t,i,n,r,s,a,l,c,u,d,h,m=null,p=!1,g=null,f=null,v=0,y=0,w=!1;function b(e){w=!0,T(),g.click(),w=!1}function S(e){w=!0,T(),f.click(),w=!1}function T(i){p&&(w||(Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),document.documentElement.classList.remove("s-fullscreenImage-active"),setTimeout((function(){Object(o.q)(document.getElementById("a17"))}),0),e.classList.remove("s-zoomable")),l.removeAttribute("width"),l.removeAttribute("height"),l.removeAttribute("srcset"),l.removeAttribute("sizes"),l.removeAttribute("src"),l.classList.remove("restrict"),l.removeEventListener("contextmenu",L),l.removeEventListener("mousedown",L),t&&(t.removeAllHandlers(),t.destroy(),t=null,c.innerHTML=""),m=null,p=!1)}function E(){0!==v&&0!==y||(l.removeEventListener("load",E),v=l.naturalWidth,y=l.naturalHeight),l.setAttribute("width",v),l.setAttribute("height",y),l.setAttribute("src",m.src),l.setAttribute("srcset",m.srcset),l.setAttribute("sizes","(min-width: 1280px) 1280px, (min-height: 1024px) 1280px, 100vw"),m.restrict&&(l.setAttribute("class","restrict"),l.addEventListener("contextmenu",L),l.addEventListener("mousedown",L)),window.picturefill&&window.picturefill(l)}function L(e){e.preventDefault()}function P(a){!p&&a&&a.data&&a.data.img&&(m=a.data.img,w||Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){var c,b;w||(document.documentElement.classList.add("s-fullscreenImage-active"),setTimeout((function(){Object(o.q)(e)}),0),Object(o.r)(document,"focus:trap",{element:e})),a.data.img.iiifId&&a.data.img.width&&a.data.img.height?(e.classList.add("s-zoomable"),v=parseInt(a.data.img.width),y=parseInt(a.data.img.height),c=a.data.img.iiifId,b=c.includes("osd=imgix")?c:[{"@context":"http://iiif.io/api/image/2/context.json","@id":c,width:v,height:y,profile:["http://iiif.io/api/image/2/level2.json"],protocol:"http://iiif.io/api/image",tiles:[{scaleFactors:[1,2,4,8,16],width:256}]}],(t=x()({id:"openseadragon",prefixUrl:location.protocol+"//openseadragon.github.io/openseadragon/images/",springStiffness:15,visibilityRatio:1,zoomPerClick:1.3,constrainDuringPan:!0,animationTime:1.5,minZoomLevel:0,maxZoomPixelRatio:1,gestureSettingsMouse:{scrollToZoom:!0},zoomInButton:"osd_zoomInButton",zoomOutButton:"osd_zoomOutButton",showZoomControl:!0,showHomeControl:!0,showFullPageControl:!1,showRotationControl:!1,showSequenceControl:!1,tileSources:b})).addHandler("zoom",(function(e){e.zoom<=t.viewport.getMinZoom()?(r.disabled=!1,s.disabled=!0):e.zoom>=t.viewport.getMaxZoom()?(r.disabled=!0,s.disabled=!1,Object(o.r)(document,"gtm:push",{event:"artwork-terminal-zoom",eventCategory:"in-page"})):(r.disabled=!1,s.disabled=!1,Object(o.r)(document,"gtm:push",{event:"artwork-zoom",eventCategory:"in-page"}))}))):(e.classList.remove("s-zoomable"),"auto"!==a.data.img.width&&"auto"!==a.data.img.height?(v=parseInt(a.data.img.width),y=parseInt(a.data.img.height),E()):(v=0,y=0,l.addEventListener("load",E,!1),l.setAttribute("srcset",m.srcset))),m.credit?(h.innerHTML=m.credit,h.setAttribute("style",""),d.setAttribute("style","")):(h.innerHTML="",h.setAttribute("style","display: none"),d.setAttribute("style","display: none")),m.infoUrl&&!m.enableNavigation?(u.setAttribute("href",m.infoUrl),u.setAttribute("style","")):(u.setAttribute("href","javascript:;"),u.setAttribute("style","display: none")),m.enableNavigation?(i.setAttribute("style",""),n.setAttribute("style","")):(i.setAttribute("style","display: none"),n.setAttribute("style","display: none")),m.prevItem?(g=m.prevItem,i.disabled=!1):(g=null,i.disabled=!0),m.nextItem?(f=m.nextItem,n.disabled=!1):(f=null,n.disabled=!0),p=!0})))}function O(e){p&&27===e.keyCode&&Object(o.r)(document,"fullScreenImage:close")}this.destroy=function(){i.removeEventListener("click",b),n.removeEventListener("click",S),a.removeEventListener("click",T),document.removeEventListener("fullScreenImage:open",P),document.removeEventListener("fullScreenImage:close",T),window.removeEventListener("keyup",O),A17.Helpers.purgeProperties(this),w=!1},this.init=function(){l=e.querySelector(".o-fullscreen-image__img"),c=e.querySelector(".o-fullscreen-image__osd"),i=e.querySelector("[data-fullscreen-prev]"),n=e.querySelector("[data-fullscreen-next]"),r=e.querySelector("[data-fullscreen-zoom-in]"),s=e.querySelector("[data-fullscreen-zoom-out]"),a=e.querySelector("[data-fullscreen-close]"),u=e.querySelector(".o-fullscreen-image__info-link"),d=e.querySelector(".m-info-trigger"),h=e.querySelector(".m-info-trigger__info"),i.addEventListener("click",b,!1),n.addEventListener("click",S,!1),a.addEventListener("click",T,!1),document.addEventListener("fullScreenImage:open",P,!1),document.addEventListener("fullScreenImage:close",T,!1),window.addEventListener("keyup",O,!1),w=!1}},P=function(e){var t=e.previousElementSibling,i="s-capped";function n(n){n.preventDefault(),t.classList.contains(i)?(t.classList.remove(i),e.querySelector("span").textContent="Show Less"):(t.classList.add(i),e.querySelector("span").textContent="Show More"),e.blur()}this.destroy=function(){e.removeEventListener("click",n),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",n,!1)}},O=function(e){var t,i=e.querySelector("input"),n=e.getAttribute("data-filter-whittle-down-url"),r=e.nextElementSibling;function s(){e.classList.remove("s-loading")}function a(){clearTimeout(t),e.classList.add("s-loading"),t=setTimeout((function(){""===i.value?e.classList.remove("s-whittling"):e.classList.add("s-whittling"),Object(o.a)({url:n,data:{categoryQuery:i.value},type:"GET",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(e){try{var t=JSON.parse(e);r.innerHTML=t.html}catch(e){console.error("Error updating filters: "+e)}s()},onError:function(e){console.error("Error: "+e),s()}})}),250)}this.destroy=function(){i.removeEventListener("input",a),e.removeEventListener("submit",a),A17.Helpers.purgeProperties(this)},this.init=function(){i.addEventListener("input",a,!1),e.addEventListener("submit",a,!1)}},_=function(e){function t(t){t.preventDefault(),Object(o.r)(document,"stickySidebar:toggle"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},C=function(e){function t(t){t.preventDefault(),Object(o.r)(document,"stickySidebar:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},A=function(e){var t=e.querySelectorAll("[data-nav-trigger]"),i=e.querySelectorAll("[data-nav-back]"),n="s-nav-mobile-active",r="js-subnav-open",s=0,a=!1;function l(t){Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(n),setTimeout((function(){Object(o.q)(e)}),0),Object(o.r)(document,"focus:trap",{element:e})})),a=!0}function c(e){Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),document.documentElement.classList.remove(n),setTimeout((function(){Object(o.q)(document.getElementById("a17"))}),0),a=!1}function u(e){this.classList.toggle("nav-is-open"),this.classList.contains("g-footer-nav__expander-trigger")||(s++,h()),e.preventDefault(),e.stopPropagation()}function d(e){this.closest(".g-nav-mobile__subnav").previousElementSibling.classList.remove("nav-is-open"),s--,h(),e.preventDefault(),e.stopPropagation()}function h(){s>0?e.classList.add(r):e.classList.remove(r)}function m(){a&&mediaQuery("small+")&&(Object(o.r)(document,"navMobile:close"),setTimeout((function(){window.scrollTo(0,0)}),5))}this.destroy=function(){document.removeEventListener("navMobile:open",l),document.removeEventListener("navMobile:close",c),document.removeEventListener("mediaQueryUpdated",m),Object(o.f)(t,(function(e,t){t.removeEventListener("click",u)})),Object(o.f)(i,(function(e,t){t.removeEventListener("click",d)})),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("navMobile:open",l,!1),document.addEventListener("navMobile:close",c,!1),document.addEventListener("mediaQueryUpdated",m,!1),Object(o.f)(t,(function(e,t){t.addEventListener("click",u,!1)})),Object(o.f)(i,(function(e,t){t.addEventListener("click",d,!1)}))}},R=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.r)(document,"navMobile:open")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},k=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.r)(document,"navMobile:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},I=function(e){var t=e.nextElementSibling||e.nextSibling,i=!1,n=e.getAttribute("data-breakpoints")||"all";function r(){Object(s.w)({element:t,target:e,position:"top left",padding:{top:104,left:-76},breakpoints:{xsmall:n.includes("xsmall")||n.includes("all"),small:n.includes("small")||n.includes("all"),medium:n.includes("medium")||n.includes("all"),large:n.includes("large")||n.includes("all"),xlarge:n.includes("xlarge")||n.includes("all")}})}function a(){i&&setTimeout(r,100)}function l(){i&&(e.setAttribute("aria-expanded","false"),document.documentElement.classList.remove("s-infoButtonInfo-active"),t.removeAttribute("style"),Object(o.r)(document,"focus:untrap"),setTimeout((function(){Object(o.q)(e.parentNode)}),0),t.classList.add("s-hidden"),i=!1)}function c(n){i?l():function(n){n.preventDefault(),n.stopPropagation(),e.blur(),i?l():(e.setAttribute("aria-expanded","true"),document.documentElement.classList.add("s-infoButtonInfo-active"),r(),setTimeout((function(){Object(o.q)(t)}),0),Object(o.r)(document,"focus:trap",{element:t}),t.classList.remove("s-hidden"),i=!0)}(n)}function u(t){t.preventDefault(),t.stopPropagation(),c(t),e.blur()}function d(e){i&&(e.preventDefault(),e.stopPropagation(),l())}function h(e){var t="INPUT"===e.target.tagName;i&&27===e.keyCode&&!t&&l()}this.destroy=function(){e.removeEventListener("click",u),document.removeEventListener("infoButtonInfo:close",l),document.removeEventListener("click",d),window.removeEventListener("resized",a),window.removeEventListener("keyup",h),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",u,!1),document.addEventListener("infoButtonInfo:close",l,!1),document.addEventListener("click",d,!1),window.addEventListener("resized",a,!1),window.addEventListener("keyup",h,!1)}},M=function(e){function t(){var t=e.className.indexOf("tabs")>0,i=e.querySelector("[data-links-bar-primary]"),n=e.querySelector("[data-links-bar-primary-overflow]"),r=n.querySelector("[data-dropdown-list]");if(i&&n){var s=0,a=[],l=0,c=!1;e.classList.remove("s-overflowing"),n.classList.add("s-hidden"),i.classList.add("s-measuring"),Object(o.f)(i.children,(function(e,t){t!==n&&t.classList.remove("s-hidden")})),Object(o.f)(r.children,(function(e,t){t.classList.add("s-hidden")})),s=i.offsetWidth-20,Object(o.f)(i.children,(function(e,t){if(t!==n){var i=t.offsetWidth+20;l+=i,a.push(i),l>s&&(c=!0)}})),c&&(n.classList.remove("s-hidden"),t?(Object(o.f)(i.children,(function(e,t){t!==n&&t.classList.add("s-hidden")})),Object(o.f)(r.children,(function(e,t){t.classList.remove("s-hidden")}))):(s-=n.offsetWidth,l=0,Object(o.f)(a,(function(e,t){(l+=t)>s&&(i.children[e].classList.add("s-hidden"),r.children[e].classList.remove("s-hidden"))}))),e.classList.add("s-overflowing")),i.classList.remove("s-measuring")}}this.destroy=function(){document.removeEventListener("touchend",t),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("resized",t,!1),t()}},D=function(e){var t=e.querySelector('input[type="search"]'),i=e.querySelector("form");function n(e){e.preventDefault();var n,r=(n=t.value,encodeURIComponent(n).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)})));r.length>0&&(Object(o.r)(document,"navMobile:close"),Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(i.action,"q",r)}))}this.destroy=function(){i.removeEventListener("submit",n),A17.Helpers.purgeProperties(this)},this.init=function(){i.addEventListener("submit",n,!1)}},H=function(e){var t,i,n=e.getAttribute("data-autocomplete-url"),r=e.querySelector('input[type="search"]'),a=e.querySelector("form"),l="s-search-active",c="s-search-active--autocomplete",u="s-loading",d=!1,h="",m=0;function p(){e.classList.remove(u)}function g(){t&&(e.querySelector("[data-search-inner]").removeChild(t),t=null)}function f(){document.documentElement.classList.contains(c)&&document.documentElement.classList.remove(c),g()}function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function y(){clearTimeout(i);var s=Date.now();s>m&&(m=s,e.classList.add(u),i=setTimeout((function(){Object(o.a)({url:n,type:"GET",data:{q:r.value},requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(i){g();try{!function(i,n){if(n===m){var r=(new DOMParser).parseFromString(i,"text/html");(t=r.querySelector("[data-autocomplete-list]"))&&(e.querySelector("[data-search-inner]").appendChild(t),requestAnimationFrame((function(){document.documentElement.classList.contains(c)||document.documentElement.classList.add(c)})),Object(o.r)(document,"page:updated"))}}(i,m,r.value)}catch(e){console.error("Error updating autocomplete: "+e),Object(o.r)(document,"globalSearch:close"),Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(a.action,"q",v(r.value))})}p()},onError:function(e){p(),Object(o.r)(document,"globalSearch:close"),Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(a.action,"q",v(r.value))})}})}),250))}function w(){Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(l),setTimeout((function(){Object(o.q)(e)}),0),Object(o.r)(document,"focus:trap",{element:e}),setTimeout((function(){r.focus()}),250)})),d=!0}function b(){d=!1,clearTimeout(i),f(),Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),document.documentElement.classList.remove(l),r.value=""}function S(e){d&&27===e.keyCode&&Object(o.r)(document,"globalSearch:close")}function T(){d&&"xsmall"!==A17.currentMediaQuery&&Object(o.r)(document,"globalSearch:close")}function E(t){t.preventDefault();var i=v(r.value);if(d&&i.length>0){var n=Object(s.o)(e);n&&(n.event=v(r.value),Object(o.r)(document,"gtm:push",n)),Object(o.r)(document,"globalSearch:close"),Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(a.action,"q",i)})}}function x(){d&&((h=r.value).length>=3?y():0===h.length&&f())}this.destroy=function(){r.removeEventListener("input",x),r.removeEventListener("propertychange",x),a.removeEventListener("submit",E),document.removeEventListener("globalSearch:open",w),document.removeEventListener("globalSearch:close",b),window.removeEventListener("keyup",S),window.removeEventListener("resized",T),A17.Helpers.purgeProperties(this)},this.init=function(){a.addEventListener("submit",E,!1),document.addEventListener("globalSearch:open",w,!1),document.addEventListener("globalSearch:close",b,!1),window.addEventListener("keyup",S,!1),window.addEventListener("resized",T,!1),n&&""!==n&&(r.addEventListener("input",x,!1),r.addEventListener("propertychange",x,!1))}},B=function(e){function t(t){t.preventDefault(),Object(o.r)(document,"globalSearch:open"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},j=function(e){function t(t){t.preventDefault(),Object(o.r)(document,"globalSearch:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},F=function(e){var t=e.getAttribute("data-autocomplete-url");if(t&&""!==t){var i,n,r=e.querySelector('input[type="text"]'),a=e.querySelector("[data-autocomplete-clear]"),l="s-loading",c="s-autocomplete-active",u=!1,d="";this.destroy=function(){r.removeEventListener("input",w),r.removeEventListener("propertychange",w),e.removeEventListener("submit",y),a.removeEventListener("click",S),document.removeEventListener("click",T),document.removeEventListener("touchstart",E),window.removeEventListener("keyup",x),A17.Helpers.purgeProperties(this)},this.init=function(){r.addEventListener("input",w,!1),r.addEventListener("propertychange",w,!1),e.addEventListener("submit",y,!1),a.addEventListener("click",S,!1),document.addEventListener("click",T,!1),document.addEventListener("touchstart",E,!1),window.addEventListener("keyup",x,!1),""!==r.value&&e.classList.add(c)}}function h(){e.classList.remove(l)}function m(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function p(e){return m(e.replace(/<(?:.|\n)*?>/gm,"").replace(/"|'/gm,"")).replace(/%20/gm,"-").toLowerCase()}function g(){f(),r.focus()}function f(){e.classList.remove(c),i&&(e.removeChild(i),i=null),u=!1}function v(){clearTimeout(n),e.classList.add(l),n=setTimeout((function(){var n="?"+function(e){var t,i,n=[],o=function(e,t,i){var n,r=[];if(!0===t?t="1":!1===t&&(t="0"),null!==t){if("object"==typeof t){for(n in t)null!==t[n]&&r.push(o(e+"["+n+"]",t[n],i));return r.join(i)}if("function"!=typeof t)return b(e)+"="+b(t);throw new Error("There was an error processing for http_build_query().")}return""};for(i in e){t=e[i];var r=o(i,t,"&");""!==r&&n.push(r)}return n.join("&")}([{fuzzy:!1,q:r.value,resources:["artworks"],contexts:["accession"]},{q:r.value,resources:["artworks"],contexts:["title"]},{q:r.value,resources:["artists","category-terms"],contexts:["title"]}]),o=new XMLHttpRequest;o.open("get",t+n,!0),o.onload=function(){if(o.status>=200&&o.status<400){g();try{!function(t){var n=JSON.parse(t),o=n[0],s=n[1],a=n[2],l="";if(!(o.length<1&&s.length<1&&a.length<1)){(i=document.createElement("ul")).className="m-search-bar__autocomplete f-secondary",i.setAttribute("data-autocomplete-list","");var d=function(e,t){for(var i="",n=0;n'+o+'"'};break;case"artworks":s={path:"/artworks/"+e[n].id,title:'see "'+o+' " ('+e[n].main_reference_number+")"};break;case"category-terms":switch(e[n].subtype){case"classification":s={query:"classification_ids="+r,title:'classified as "'+o+' "'};break;case"material":s={query:"material_ids="+r,title:'made of "'+o+' "'};break;case"technique":s={query:"technique_ids="+e[n].id,title:'made via "'+o+' "'};break;case"style":s={query:"style_ids="+r,title:'in the style of "'+o+' "'};break;case"subject":s={query:"subject_ids="+r,title:'about "'+o+' "'};break;case"department":s={query:"department_ids="+r,title:'in the department "'+o+' "'};break;case"theme":s={query:"theme_ids="+e[n].id,title:'related to "'+o+' "'}}}if(s){var a="/collection?"+s.query;s.path&&(a=s.path),i+=''+s.title+" \n"}}return i};l+=d(o,1),l+=d(s,1),l+=d(a,5),l+='Search for "'+r.value+'" \n',i.innerHTML=l,e.appendChild(i),e.classList.add(c),u=!0}}(o.responseText)}catch(e){console.error("Error updating autocomplete: "+e)}h()}else console.error("Autocomplete error:",o.responseText,o.status),h()},o.onerror=function(){console.error("Autocomplete error:",o.responseText,o.status),h()},o.send()}),250)}function y(t){t.preventDefault();var i=Object(s.o)(e);i&&(i.event=m(r.value),Object(o.r)(document,"gtm:push",i)),Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(e.action,"q",m(r.value))})}function w(){(d=r.value).length>=3?v():0==d.length&&f()}function b(e){return encodeURIComponent(e).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S(e){e&&(e.preventDefault(),e.stopPropagation()),g(),r.value=""}function T(t){u&&document.activeElement!==e&&!e.contains(document.activeElement)&&(t.preventDefault(),t.stopPropagation(),f())}function E(t){u&&t.target!==e&&!e.contains(t.target)&&(t.preventDefault(),t.stopPropagation(),f())}function x(e){u&&27===e.keyCode&&f()}},z=function(e){var t=null;function i(){e.classList.remove("s-loading"),e.removeAttribute("disabled")}function n(){t&&(e.removeChild(t),t=null),e.classList.remove("s-success"),e.classList.remove("s-error")}function r(i,o){n(),(t=document.createElement("em")).className="m-aside-newsletter__msg f-buttons","success"===i?(t.className+=" m-aside-newsletter__msg--success",t.textContent=o||"Successfully signed up to the newsletter",e.classList.add("s-success")):"error"===i&&(t.className+=" m-aside-newsletter__msg--error",t.textContent=o||"Error signing up to the newsletter",e.classList.add("s-error")),e.appendChild(t)}function s(t){t.preventDefault(),t.stopPropagation(),n(),e.classList.add("s-loading"),e.setAttribute("disabled","disabled");var s=Object(o.m)(e);Object(o.a)({url:e.action||"/subscribe",type:"POST",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"},{header:"X-CSRF-Token",value:document.querySelector("meta[name=csrf-token]").getAttribute("content")||""}],data:s,onSuccess:function(t){try{t=JSON.parse(t),e.classList.remove("s-loading"),e.setAttribute("disabled","disabled"),e.querySelector("input[name=email]").value="",r("success",t.message||t.email),Object(o.r)(document,"gtm:push",{event:"sign-up",eventCategory:"subscribe"})}catch(e){console.error("Error submitting newsletter sign up (a)"),console.log(e,t),r("error")}i()},onError:function(e){try{r("error",(e=JSON.parse(e)).message||e.email)}catch(t){console.error("Error submitting newsletter sign up (b)"),console.log(e,t),r("error")}i()}})}function a(e){var t=e.firstElementChild.offsetHeight;e.style.height=t+"px"}function l(){this.removeAttribute("style"),this.removeEventListener("transitionend",l),Object(o.r)(document,"page:updated")}function c(t){var i=e.querySelector(".m-aside-newsletter__btn--list"),n=e.querySelector(".m-aside-newsletter__list-wrapper");if("true"===n.getAttribute("aria-hidden"))n.style.height=0,n.style.overflow="hidden",n.setAttribute("aria-hidden","false"),setTimeout((function(){setTimeout((function(){Object(o.q)(n)}),0)}),0),a(n),i.classList.add("m-aside-newsletter__btn--list--opened");else{a(n),n.setAttribute("aria-hidden","true");n.offsetHeight;n.style.height=0,n.style.overflow="hidden",i.classList.remove("m-aside-newsletter__btn--list--opened")}n.addEventListener("transitionend",l,!1)}this.destroy=function(){e.removeEventListener("submit",s),A17.Helpers.purgeProperties(this)},this.init=function(){!function(){e.addEventListener("submit",s,!1);var t=e.querySelector(".m-aside-newsletter__btn--list");t&&t.addEventListener("click",c,!1)}()}},N=function(e){function t(t){t.preventDefault(),t.stopPropagation();var i=e.getAttribute("data-gallery-img-width")||e.parentNode.querySelector("img").getAttribute("width"),n=e.getAttribute("data-gallery-img-height")||e.parentNode.querySelector("img").getAttribute("height");if("number"!=typeof i||i<200){var r=e.parentNode.querySelector("img").naturalWidth;"number"==typeof r&&r>i&&(i=r)}if("number"!=typeof n||n<200){var s=e.parentNode.querySelector("img").naturalHeight;"number"==typeof s&&s>n&&(n=s)}var a=null,l=null,c=!1;if("true"===e.getAttribute("data-modal-advanced")){var u=e.closest(".o-gallery");if(u){var d=u.querySelectorAll('[data-behavior*="openImageFullScreen"]'),h=Array.prototype.indexOf.call(d,e);a=d[h-1]||null,l=d[h+1]||null,(a||l)&&(c=!0)}}var m={src:e.getAttribute("data-gallery-img-src")||e.parentNode.querySelector("img").src,srcset:e.getAttribute("data-gallery-img-srcset")||e.parentNode.querySelector("img").getAttribute("srcset")||e.parentNode.querySelector("img").getAttribute("data-srcset"),width:i,height:n,credit:e.getAttribute("data-gallery-img-credit")||e.getAttribute("data-credit"),creditUrl:e.getAttribute("data-gallery-img-credit-url")||"",shareUrl:e.getAttribute("data-gallery-img-share-url")||"",shareTitle:e.getAttribute("data-gallery-img-share-title")||"",downloadUrl:e.getAttribute("data-gallery-img-download-url")||"",downloadName:e.getAttribute("data-gallery-img-download-name")||"",iiifId:e.getAttribute("data-gallery-img-iiifId")||e.parentNode.querySelector("img").getAttribute("data-iiifId"),infoUrl:e.parentNode.querySelector("img").getAttribute("data-infourl")||"",restrict:e.getAttribute("data-restrict")||"",enableNavigation:c,prevItem:a,nextItem:l};Object(o.r)(document,"fullScreenImage:open",{img:m})}function i(e){13==e.keyCode&&t(e)}this.destroy=function(){e.removeEventListener("click",t),e.removeEventListener("keyup",i),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1),e.addEventListener("keyup",i,!1)}},q=function(e){var t,i,n,o=!1;function r(){var t="clip-path: inset(top right bottom left);",o=e.getBoundingClientRect(),r=n.getBoundingClientRect();0===r.width&&0===r.height?i.setAttribute("style","clip-path: none; -webkit-clip-path: none; display: none;"):(t=(t=(t=(t=t.replace(/left/gi,Math.round(Math.abs(r.left-o.left))+"px")).replace(/top/gi,Math.round(Math.abs(r.top-o.top))+"px")).replace(/right/gi,Math.round(Math.abs(r.right-o.right))+"px")).replace(/bottom/gi,Math.round(Math.abs(r.bottom-o.bottom))+"px"),i.setAttribute("style",t+" -webkit-"+t))}function s(){var s;(function(){var e;(e=document.createElement("div")).style.cssText="-webkit-filter: blur(2px); filter: blur(2px);";var t=0!=e.style.length,i=void 0===document.documentMode||document.documentMode>9,n=t&&i;e=null,(e=document.createElement("div")).style.cssText="-webkit-clip-path: inset(1px 2px 3px 4px); clip-path: inset(1px 2px 3px 4px);";var r=0!=e.style.length;e=null,(e=document.createElement("div")).style.cssText="-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);";var s=0!=e.style.length;(s||!n||r)&&(o=!1),!o&&!s&&n&&r&&(o=!0)}(),o)&&(t=e.querySelector("[data-blur-img]"),(n=e.querySelector("[data-blur-clip-to]"))&&t&&(s=t.outerHTML.replace("data-blur-img","data-blur-img-dupe"),t.insertAdjacentHTML("afterend",s),i=e.querySelector("[data-blur-img-dupe]"),r(),window.addEventListener("resized",r,!1)))}this.destroy=function(){window.removeEventListener("resized",r),A17.Helpers.purgeProperties(this)},this.init=function(){s()}},W=function(e){var t,i=e.getAttribute("data-load-more-url"),n=e.getAttribute("data-load-more-target"),r=e.getAttribute("data-load-more-limit-text"),s=document.querySelector(n),a=1,l="s-loading",c="s-hidden",u=20;function d(){e.classList.remove(l)}function h(){clearTimeout(t),e.classList.add(l),t=setTimeout((function(){Object(o.a)({url:i,data:{page:a},type:"GET",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"}],onSuccess:function(t){try{var i=JSON.parse(t);s.innerHTML+=i.html,i.page||e.classList.add(c),s.classList.contains("o-pinboard")?Object(o.r)(s,"pinboard:contentAdded"):Object(o.r)(document,"page:updated")}catch(e){console.error("Error updating autocomplete: "+e)}d(),a>=u&&function(){e.classList.add(c);var t=document.createElement("h2");t.setAttribute("class","title f-list-3"),t.textContent="Sorry, we limit the results for any query after 20 pages.",e.parentNode.appendChild(t);var i=document.createElement("p");i.setAttribute("class","f-caption"),i.textContent="Try using our filters to refine your search."+(r?" "+r:""),e.parentNode.appendChild(i)}()},onError:function(e){console.error("Error: "+e),d()}})}),250)}function m(e){e.preventDefault(),e.stopPropagation(),a++,h()}this.destroy=function(){e.removeEventListener("click",m),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",m,!1)}},U=function(e){function t(t){t.preventDefault(),t.stopPropagation(),Object(o.r)(document,"ajax:getPage",{url:e.getAttribute("data-href")||e.getAttribute("href")||"#"})}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},V=function(e){function t(t){var i=e.querySelector("textarea");if(i||(i=e.parentNode.querySelector("textarea")),i){var n=i.value;n&&(t.preventDefault(),t.stopPropagation(),Object(o.r)(document,"modal:open",{type:"media",restricted:"true"==e.parentNode.dataset.restricted,module3d:"module3d"==e.parentNode.dataset.type,module360:"module360"==e.parentNode.dataset.type,moduleMirador:"moduleMirador"==e.parentNode.dataset.type,embedCode:n,subtype:e.getAttribute("data-subtype")||null}),"module3d"==e.parentNode.dataset.type&&e.dataset.title?Object(o.r)(document,"gtm:push",{event:"3D-open-modal",eventCategory:"in-page",eventAction:e.dataset.title+" - Modal 3D"}):"module360"==e.parentNode.dataset.type&&e.dataset.title?Object(o.r)(document,"gtm:push",{event:"360-open-modal",eventCategory:"in-page",eventAction:e.dataset.title+" - Modal 360"}):"moduleMirador"==e.parentNode.dataset.type&&e.dataset.title?Object(o.r)(document,"gtm:push",{event:"mirador-open-modal",eventCategory:"in-page",eventAction:e.dataset.title+" - Modal Mirador"}):Object(o.r)(document,"gtm:push",{event:e.parentNode.dataset.gtmEvent||e.parentNode.dataset.type+"-open-modal",eventCategory:e.parentNode.dataset.gtmEventCategory||"in-page",eventAction:e.parentNode.dataset.gtmEventAction||e.parentNode.dataset.title+" - "+e.parentNode.dataset.type}))}}function i(e){13==e.keyCode&&t(e)}this.destroy=function(){e.removeEventListener("click",t),e.removeEventListener("keyup",i),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1),e.addEventListener("keyup",i,!1)}},G=function(e){var t,i,n,r=e.dataset.platform;function a(n){n.preventDefault(),n.stopPropagation(),e.removeEventListener("click",a),e.removeEventListener("keyup",l),i=o.n.updateParameter(i,"autoplay","vimeo"==r?"true":"1"),i=o.n.updateParameter(i,"auto_play","vimeo"==r?"true":"1"),t.src=i,e.classList.add("s-inline-media-activated")}function l(e){13==e.keyCode&&a(e)}this.destroy=function(){e.removeEventListener("click",a),e.removeEventListener("keyup",l),A17.Helpers.purgeProperties(this)},this.init=function(){(t=e.querySelector("iframe"))&&(i=t.getAttribute("data-embed-src"),n="data-embed-src",""!==i&&i||(i=t.getAttribute("data-src"),n="data-src"),""!==i&&i||(i=t.getAttribute("src"),n="src"),""!==i&&i&&(i.indexOf("youtube.com")>-1&&(i=o.n.updateParameter(i,"enablejsapi","vimeo"==r?"true":"1"),i=o.n.updateParameter(i,"origin",window.location.origin),"data-src"===n&&t.setAttribute("data-src",i),"src"===n?(t.src=i,Object(s.z)(t)):t.addEventListener("load",(function(){Object(s.z)(t)}),!1)),"data-src"!==n?(e.addEventListener("click",a,!1),e.addEventListener("keyup",l,!1)):e.classList.add("s-inline-media-activated")))}},$=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.r)(document,"roadblock:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},Z=function(e){function t(e){e.preventDefault(),e.stopPropagation(),Object(o.r)(document,"modal:close")}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},X=function(e){var t,i="default",n=0,r=0,a=0,l=document.documentElement,c=e.getAttribute("data-stickyElement-breakpoints")||"all",u=!0;function d(){l.classList.remove("s-sticky-filters--fixed"),l.classList.remove("s-sticky-filters--bottom"),i="default"}function h(){if(Object(s.t)(c)&&!u){var e=document.documentElement.scrollTop||document.body.scrollTop;e>=r&&"bottom"!==i?(l.classList.remove("s-sticky-filters--fixed"),l.classList.add("s-sticky-filters--bottom"),i="bottom"):e>=n&&e0){Object(o.r)(document,"ajax:getPage",{url:o.n.updateParameter(i.action,"q",a),type:"page",ajaxScrollTarget:l});var c=Object(s.o)(e);c&&Object(o.r)(document,"gtm:push",c)}}this.destroy=function(){i.removeEventListener("submit",n),A17.Helpers.purgeProperties(this)},this.init=function(){i.addEventListener("submit",n,!1)}},te=function(e){this.destroy=function(){A17.Helpers.purgeProperties(this)},this.init=function(){var t;(t=Object(o.m)(e)).search&&""!==t.search&&Object(o.r)(document,"gtm:push",{event:t.search,eventCategory:"site-search"})}},ie=function(e){var t,i=!1;function n(){i=!0,e.classList.add("s-paused"),e.setAttribute("aria-label","Play video")}function o(){i=!1,e.classList.remove("s-paused"),e.setAttribute("aria-label","Pause video")}function r(e){e.preventDefault(),e.stopPropagation(),i?t.play():t.pause()}this.destroy=function(){t&&(e.removeEventListener("click",r),t.removeEventListener("play",o),t.removeEventListener("pause",n)),t=null,A17.Helpers.purgeProperties(this)},this.init=function(){(t=e.parentNode.querySelector("video"))&&(t.paused&&n(),e.addEventListener("click",r,!1),t.addEventListener("play",o,!1),t.addEventListener("pause",n,!1))}},ne=function(e){var t=function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}(e,"m-search-bar"),i="isSearchLimited",n="true"===o.b.read(i);function r(e){n=!n,o.b.create(i,n,1),s()}function s(){var i=e.getAttribute("value"),n=t.getAttribute("action");e.setAttribute("value",n),t.setAttribute("action",i)}function a(){e.addEventListener("click",r,!1),n&&(e.checked=!0,s())}this.destroy=function(){e.removeEventListener("click",r),A17.Helpers.purgeProperties(this)},this.init=function(){a()}},oe=function(e){function t(t){t.preventDefault();var i=e.getAttribute("data-url").replace("{query}",e.getElementsByTagName("input")[0].value);window.open(i)}this.destroy=function(){e.removeEventListener("submit",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("submit",t,!1)}},re=function(e){this.destroy=function(){A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("contextmenu",(function(e){e.preventDefault()})),e.addEventListener("mousedown",(function(e){e.preventDefault()}))}},se=function(e){var t=function(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t},i=document.documentElement.scrollTop||document.body.scrollTop,n=e.offsetHeight,o=t(e)+document.body.scrollTop,r=window.innerHeight||document.documentElement.clientHeight;function s(){(i=document.documentElement.scrollTop||document.body.scrollTop)>o+n-r?(document.documentElement.classList.contains("is-module3d-fixed")&&document.documentElement.classList.remove("is-module3d-fixed"),document.documentElement.classList.contains("is-module3d-bottom")||document.documentElement.classList.add("is-module3d-bottom")):i>o?(document.documentElement.classList.contains("is-module3d-bottom")&&document.documentElement.classList.remove("is-module3d-bottom"),document.documentElement.classList.contains("is-module3d-fixed")||document.documentElement.classList.add("is-module3d-fixed")):(document.documentElement.classList.contains("is-module3d-bottom")&&document.documentElement.classList.remove("is-module3d-bottom"),document.documentElement.classList.contains("is-module3d-fixed")&&document.documentElement.classList.remove("is-module3d-fixed"))}function a(){r=window.innerHeight||document.documentElement.clientHeight,n=e.offsetHeight,o=t(e)+document.body.scrollTop}this.destroy=function(){window.removeEventListener("resized",a),window.removeEventListener("scroll",s),document.removeEventListener("module3d:loaded",a),A17.Helpers.purgeProperties(this)},this.init=function(){window.addEventListener("scroll",s),window.addEventListener("resized",a),document.addEventListener("module3d:loaded",a),s(),a()}},ae=function(e){var t,i,n,r,a,l,c,u,d=function(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t},h=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop)+parseInt(i.marginBottom)},m=function(e){var t=document.documentElement.classList;["is-sidebar-top","is-sidebar-grabbed","is-sidebar-fixed","is-sidebar-bottom"].forEach((function(i){i!==e&&t.contains(i)&&t.remove(i)})),e&&!t.contains(e)&&t.add(e),c=e},p=function(){["is-sidebar-fixed","is-sidebar-bottom"].includes(c)&&e.scrollTo(0,0)},g=document.querySelector(".o-article"),f=document.querySelector(".m-article-actions--publication__logo"),v="is-sidebar-overlay",y=document.documentElement.classList.contains(v),w=null!==e.getAttribute("data-sticky-animated-logo");function b(){(t=document.documentElement.scrollTop||document.body.scrollTop)n?"is-sidebar-bottom":"is-sidebar-fixed"))}function S(){p(),m("is-sidebar-top")}function T(){window.requestAnimationFrame(b)}function E(){S(),window.innerHeight||document.documentElement.clientHeight,i=d(e)+document.body.scrollTop,f.setAttribute("style","display: block"),u=i-h(f),f.removeAttribute("style"),T()}function x(){y||(y=!0,history.replaceState(null,null," "),Object(s.t)("medium-")?(l=window.scrollY,a=document.activeElement||document.querySelector("body"),Object(o.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(v),setTimeout((function(){Object(o.q)(e)}),0),Object(o.r)(document,"focus:trap",{element:e})}))):document.documentElement.classList.add(v))}function L(){y&&(Object(o.r)(document,"body:unlock"),Object(o.r)(document,"focus:untrap"),setTimeout((function(){a&&Object(o.q)(a),setTimeout((function(){l&&window.scroll(0,l)}),0)}),0),document.documentElement.classList.remove(v),y=!1)}function P(){y?Object(o.r)(document,"stickySidebar:close"):Object(o.r)(document,"stickySidebar:open")}function O(){L(),m(null)}function _(){y&&(Object(o.r)(document,"stickySidebar:close"),Object(o.r)(document,"stickySidebar:open"))}this.destroy=function(){window.removeEventListener("resized",E),window.removeEventListener("scroll",T),document.removeEventListener("stickySidebar:open",x),document.removeEventListener("stickySidebar:close",L),document.removeEventListener("stickySidebar:toggle",P),document.removeEventListener("stickySidebar:clean",O),document.removeEventListener("mediaQueryUpdated",_),window.removeEventListener("hashchange",L),A17.Helpers.purgeProperties(this)},this.init=function(){window.addEventListener("scroll",T),window.addEventListener("resized",E),document.addEventListener("stickySidebar:open",x,!1),document.addEventListener("stickySidebar:close",L,!1),document.addEventListener("stickySidebar:toggle",P,!1),document.addEventListener("stickySidebar:clean",O,!1),document.addEventListener("mediaQueryUpdated",_,!1),window.addEventListener("hashchange",L,!1),E(),T()}},le=i(425),ce=i.n(le),ue=function(e){function t(){ce.a.fitAll()}this.destroy=function(){document.removeEventListener("fonts:loaded",t),Object(o.f)(e.querySelectorAll("img"),(function(e,i){i.removeEventListener("load",t)})),A17.Helpers.purgeProperties(this)},this.init=function(){ce()(".f-fit-text",{minSize:16,maxSize:36}),ce()(".f-fit-text-small",{minSize:10,maxSize:26}),document.addEventListener("fonts:loaded",t,!1),Object(o.f)(e.querySelectorAll("img"),(function(e,i){i.addEventListener("load",t,!1)}))}},de=function(e){var t,i,n,o,r,s,a,l,c,u=0,d=!0,h=2e3,m=5e3,p="is-slideshow-active";function g(){y(),f(),l=setTimeout((function(){v()}),h)}function f(){l&&clearTimeout(l)}function v(){y(),d&&(c=setTimeout((function(){++u>t.length-1&&(u=0),b(u),v()}),m))}function y(){c&&clearTimeout(c)}function w(e,t){t.forEach((function(e){e.classList.contains(p)&&e.classList.remove(p)})),void 0!==t[e]&&t[e].classList.add(p)}function b(e){u=e,w(e,t),w(e,i),w(e,n),w(e,s)}function S(e){var i=e.target.closest("a");b(Array.prototype.indexOf.call(t,i))}function T(e){var t=e.target.closest(".m-article-header__pip"),i=Array.prototype.indexOf.call(s,t);g(),b(i)}function E(e){e.preventDefault(),e.stopPropagation(),d?(d=!1,a.classList.add("s-paused"),a.setAttribute("aria-label","Play video"),y(),f()):(d=!0,a.classList.remove("s-paused"),a.setAttribute("aria-label","Pause video"),v())}this.destroy=function(){t.forEach((function(e){e.removeEventListener("mouseover",f),e.removeEventListener("mouseover",S),e.removeEventListener("mouseout",g)})),s.forEach((function(e){e.removeEventListener("click",T)})),a.removeEventListener("click",E),A17.Helpers.purgeProperties(this)},this.init=function(){t=e.querySelectorAll("a"),i=e.querySelectorAll(".m-article-header__img img.img-hero-desktop"),n=e.querySelectorAll(".m-article-header__img img.img-hero-mobile"),o=e.querySelector(".m-article-header__pips"),r=e.querySelector(".m-article-header__pip__template").innerHTML,a=e.querySelector(".m-article-header__play-pause"),t.forEach((function(e){e.addEventListener("mouseover",f,!1),e.addEventListener("mouseover",S,!1),e.addEventListener("mouseout",g,!1),o.insertAdjacentHTML("beforeend",r)})),(s=e.querySelectorAll(".m-article-header__pip")).forEach((function(e){e.addEventListener("click",T,!1)})),a.addEventListener("click",E,!1),b(0),v()}},he=x.a;he.ImgixTileSource=function(e){if(this.imgixAutoParam="compress,format",he.extend(!0,this,e),!(this.height&&this.width&&this.baseUrl))throw new Error("ImgixTileSource required parameters not provided.");if(e.tileSizePerScaleFactor={},this.tile_width&&this.tile_height)e.tileWidth=this.tile_width,e.tileHeight=this.tile_height;else if(this.tile_width)e.tileSize=this.tile_width;else if(this.tile_height)e.tileSize=this.tile_height;else if(this.tiles)if(1==this.tiles.length)e.tileWidth=this.tiles[0].width,e.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var t=0;t0?e.tileSize=Math.max.apply(null,s):e.tileSize=o}e.maxLevel||(this.scale_factors?e.maxLevel=Math.floor(Math.pow(Math.max.apply(null,this.scale_factors),.5)):e.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)))),he.TileSource.apply(this,[e])},he.extend(he.ImgixTileSource.prototype,he.TileSource.prototype,{supports:function(e,t){return t?null!=t.match(/(\?|\&)osd=imgix(\&|$)/):e.type&&"imgix"==e.type},configure:function(e,t){return t?{width:e.PixelWidth,height:e.PixelHeight,baseUrl:t.replace(/\?.*$/,"")}:e},getTileWidth:function(e){var t=Math.pow(2,this.maxLevel-e);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[t]?this.tileSizePerScaleFactor[t].width:this._tileWidth},getTileHeight:function(e){var t=Math.pow(2,this.maxLevel-e);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[t]?this.tileSizePerScaleFactor[t].height:this._tileHeight},getTileUrl:function(e,t,i){var n,o,r,s,a,l,c,u,d,h,m=Math.pow(.5,this.maxLevel-e),p=Math.ceil(this.width*m),g=Math.ceil(this.height*m);return n=this.getTileWidth(e),o=this.getTileHeight(e),r=Math.ceil(n/m),s=Math.ceil(o/m),pe&&l=0&&i.item(t)!==n;);}while(t<0&&(n=n.parentElement));return n})}});
//# sourceMappingURL=app.js.map
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/scripts/blocks360.js b/docs/.vuepress/public/assets/scripts/blocks360.js
new file mode 100644
index 000000000..59786a2ae
--- /dev/null
+++ b/docs/.vuepress/public/assets/scripts/blocks360.js
@@ -0,0 +1,10 @@
+!function(n){var t={};function e(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,e),u.l=!0,u.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var u in n)e.d(r,u,function(t){return n[t]}.bind(null,u));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/dist/scripts/",e(e.s=871)}({118:function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},2:function(n,t,e){"use strict";var r={toObject:function(n){if("string"!=typeof n)return{};var t={};return(n&&n.indexOf("?")>-1?n.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(n,e,r,u){t[e]=u})),t},fromObject:function(n){var t="",e=0;if(Object.getOwnPropertyNames(n).length>0)for(var r in t="?",n)n.hasOwnProperty(r)&&(t+=(e>0?"&":"")+r+"="+encodeURIComponent(n[r]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),e++);return t},updateParameter:function(n,t,e){var r=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");if(n.match(r))return n.replace(r,"$1"+t+"="+e+"$2");var u="";-1!==n.indexOf("#")&&(u=n.replace(/.*#/,"#"),n=n.replace(/#.*/,""));var i=-1!==n.indexOf("?")?"&":"?";return n+i+t+"="+e+u}},u=function(n){var t=n,e=new XMLHttpRequest,u=t.url;if(t.queryString="",void 0!==t.data){if(!r.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=r.fromObject(t.data)}if("POST"!==t.type&&(u+=u.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),e.open(t.type,u,!0),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var i=0;i=200&&e.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,e.responseText,e.status):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,e.responseText,e.status),console.log("We reached our target server, but it returned an error: "+e.statusText))},e.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,e.responseText,e.status)},e.send("POST"===t.type?t.queryString.replace("?",""):"")},i={create:function(n,t,e){var r="";if(e){var u=new Date;u.setTime(u.getTime()+24*e*60*60*1e3),r="; expires="+u.toGMTString()}document.cookie=n+"="+t+r+"; path=/"},delete:function(n){n&&this.create(n,"",-1)},read:function(n){if(n){for(var t=n+"=",e=document.cookie.split(";"),r=0;r]*>?/g,""));return t.appendChild(e),encodeURIComponent(t.textContent)}return""},c=function(n,t,e){var r=document.createEvent("HTMLEvents");r.initEvent(t,!0,!0),r.data=e||{},r.eventName=t,n.dispatchEvent(r)},f=(e(64),function(n,t,e){for(var r=0;r0&&(r--,u.unobserve(e.target),e.target.addEventListener("load",f,!1),l(e.target))}}function h(){var n,p,v;if("really-old"===i){for(r=a.length,n=0;n0&&v.right>0&&v.left<(window.innerWidth||document.documentElement.clientWidth)&&v.top<(window.innerHeight||document.documentElement.clientHeight))){var d=a[n];a[n]=void 0,d.lazyloaded=!0,d.addEventListener("load",f,!1),l(d)}for(n=0;n0&&(e++,t=window.requestAnimationFrame(h))}else if("new"===i)for(u=new IntersectionObserver(s,{rootMargin:o.rootMargin,threshold:o.threshold}),r=a.length,n=0;n=0;i--)t.options[i].selected&&(e[t.name]=t.options[i].value);else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(e[t.name]=t.value);return e},_=function(){var n,t=l();window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){var n=l();c(document,"resized"),n!==t&&(t=n,window.A17&&(window.A17.currentMediaQuery=n),c(document,"mediaQueryUpdated"))}),250)}))},y=function(n){var t,e={el:document,offset:0,duration:250,easing:"linear"},r=Date.now(),u=0,i=!1,o={linear:function(n){return n},easeIn:function(n){return n*n*n},easeOut:function(n){return--n*n*n+1},easeInOut:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1}},a=window.requestAnimationFrame;for(var c in n)void 0!==n[c]&&(e[c]=n[c]);function f(){if(i&&0===u)document.documentElement.scrollTop=1,document.body.scrollTop=1,u=1,e.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(f);else{var n=Date.now(),c=(h=1,p=(n-r)/e.duration,hAxmTYklsjo190QW',r=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return r.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},r.prototype.load=function(){var n,r=new Date,u=this,i=u.serif,o=u.sansSerif,a=u.parent,c=u.appended,f=u.options,l=f.reference;function s(n){return t.concat(["font-weight:"+f.weight,"font-style:"+f.style]).concat("font-family:"+n).join(";")}var h=e.replace(/\%s/,s("sans-serif")),p=e.replace(/\%s/,s("serif"));function v(n,t,e){return Math.abs(n.width-t.offsetWidth)>e||Math.abs(n.height-t.offsetHeight)>e}a||(a=u.parent=f.window.document.createElement("div")),a.innerHTML=h+p,o=u.sansSerif=a.firstChild,i=u.serif=o.nextSibling,f.glyphs&&(o.innerHTML+=f.glyphs,i.innerHTML+=f.glyphs),function t(){l||(l=f.window.document.body),!c&&l&&(l.appendChild(a),c=u.appended=!0,n=u.getMeasurements(),o.style.fontFamily=u.fontFamily+", sans-serif",i.style.fontFamily=u.fontFamily+", serif"),c&&n&&(v(n.sansSerif,o,f.tolerance)||v(n.serif,i,f.tolerance))?f.success():(new Date).getTime()-r.getTime()>f.timeout?f.error():!c&&"requestAnimationFrame"in f.window?f.window.requestAnimationFrame(t):f.window.setTimeout(t,f.delay)}()},r.prototype.cleanFamilyName=function(n){return n.replace(/[\'\"]/g,"").toLowerCase()},r.prototype.cleanWeight=function(n){return""+({normal:"400",bold:"700"}[n]||n)},r.prototype.checkFontFaces=function(n){var t=this;t.options.window.document.fonts.forEach((function(e){t.cleanFamilyName(e.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(e.weight)===t.cleanWeight(t.options.weight)&&e.style===t.options.style&&e.load().then((function(){t.options.success(e),t.options.window.clearTimeout(n)}))}))},r.prototype.init=function(t,e){var r;for(var u in n)e.hasOwnProperty(u)||(e[u]=n[u]);this.options=e,this.fontFamily=t,!e.glyphs&&"fonts"in e.window.document?(e.timeout&&(r=e.window.setTimeout((function(){e.error()}),e.timeout)),this.checkFontFaces(r)):this.load()},function(n,t){var e=new r;return e.init(n,t),e}})?r.apply(t,u):r)||(n.exports=i)}()},80:function(n,t,e){(function(n,r){var u;
+/**
+ * @license
+ * Lodash
+ * Copyright OpenJS Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */(function(){var i,o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="__lodash_hash_undefined__",l=500,s="__lodash_placeholder__",h=1,p=2,v=4,d=1,g=2,_=1,y=2,m=4,w=8,b=16,x=32,j=64,A=128,E=256,O=512,S=30,L="...",R=800,T=16,k=1,C=2,I=1/0,z=9007199254740991,M=17976931348623157e292,W=NaN,F=4294967295,q=F-1,U=F>>>1,P=[["ary",A],["bind",_],["bindKey",y],["curry",w],["curryRight",b],["flip",O],["partial",x],["partialRight",j],["rearg",E]],B="[object Arguments]",N="[object Array]",D="[object AsyncFunction]",$="[object Boolean]",H="[object Date]",Z="[object DOMException]",V="[object Error]",X="[object Function]",G="[object GeneratorFunction]",K="[object Map]",Y="[object Number]",J="[object Null]",Q="[object Object]",nn="[object Proxy]",tn="[object RegExp]",en="[object Set]",rn="[object String]",un="[object Symbol]",on="[object Undefined]",an="[object WeakMap]",cn="[object WeakSet]",fn="[object ArrayBuffer]",ln="[object DataView]",sn="[object Float32Array]",hn="[object Float64Array]",pn="[object Int8Array]",vn="[object Int16Array]",dn="[object Int32Array]",gn="[object Uint8Array]",_n="[object Uint8ClampedArray]",yn="[object Uint16Array]",mn="[object Uint32Array]",wn=/\b__p \+= '';/g,bn=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jn=/&(?:amp|lt|gt|quot|#39);/g,An=/[&<>"']/g,En=RegExp(jn.source),On=RegExp(An.source),Sn=/<%-([\s\S]+?)%>/g,Ln=/<%([\s\S]+?)%>/g,Rn=/<%=([\s\S]+?)%>/g,Tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kn=/^\w*$/,Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,In=/[\\^$.*+?()[\]{}|]/g,zn=RegExp(In.source),Mn=/^\s+|\s+$/g,Wn=/^\s+/,Fn=/\s+$/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Un=/\{\n\/\* \[wrapped with (.+)\] \*/,Pn=/,? & /,Bn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nn=/\\(\\)?/g,Dn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$n=/\w*$/,Hn=/^[-+]0x[0-9a-f]+$/i,Zn=/^0b[01]+$/i,Vn=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,Gn=/^(?:0|[1-9]\d*)$/,Kn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yn=/($^)/,Jn=/['\n\r\u2028\u2029\\]/g,Qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",nt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tt="[\\ud800-\\udfff]",et="["+nt+"]",rt="["+Qn+"]",ut="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",at="[^\\ud800-\\udfff"+nt+ut+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ct="\\ud83c[\\udffb-\\udfff]",ft="[^\\ud800-\\udfff]",lt="(?:\\ud83c[\\udde6-\\uddff]){2}",st="[\\ud800-\\udbff][\\udc00-\\udfff]",ht="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+ot+"|"+at+")",vt="(?:"+ht+"|"+at+")",dt="(?:"+rt+"|"+ct+")"+"?",gt="[\\ufe0e\\ufe0f]?"+dt+("(?:\\u200d(?:"+[ft,lt,st].join("|")+")[\\ufe0e\\ufe0f]?"+dt+")*"),_t="(?:"+[it,lt,st].join("|")+")"+gt,yt="(?:"+[ft+rt+"?",rt,lt,st,tt].join("|")+")",mt=RegExp("['’]","g"),wt=RegExp(rt,"g"),bt=RegExp(ct+"(?="+ct+")|"+yt+gt,"g"),xt=RegExp([ht+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[et,ht,"$"].join("|")+")",vt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[et,ht+pt,"$"].join("|")+")",ht+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ut,_t].join("|"),"g"),jt=RegExp("[\\u200d\\ud800-\\udfff"+Qn+"\\ufe0e\\ufe0f]"),At=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ot=-1,St={};St[sn]=St[hn]=St[pn]=St[vn]=St[dn]=St[gn]=St[_n]=St[yn]=St[mn]=!0,St[B]=St[N]=St[fn]=St[$]=St[ln]=St[H]=St[V]=St[X]=St[K]=St[Y]=St[Q]=St[tn]=St[en]=St[rn]=St[an]=!1;var Lt={};Lt[B]=Lt[N]=Lt[fn]=Lt[ln]=Lt[$]=Lt[H]=Lt[sn]=Lt[hn]=Lt[pn]=Lt[vn]=Lt[dn]=Lt[K]=Lt[Y]=Lt[Q]=Lt[tn]=Lt[en]=Lt[rn]=Lt[un]=Lt[gn]=Lt[_n]=Lt[yn]=Lt[mn]=!0,Lt[V]=Lt[X]=Lt[an]=!1;var Rt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tt=parseFloat,kt=parseInt,Ct="object"==typeof n&&n&&n.Object===Object&&n,It="object"==typeof self&&self&&self.Object===Object&&self,zt=Ct||It||Function("return this")(),Mt=t&&!t.nodeType&&t,Wt=Mt&&"object"==typeof r&&r&&!r.nodeType&&r,Ft=Wt&&Wt.exports===Mt,qt=Ft&&Ct.process,Ut=function(){try{var n=Wt&&Wt.require&&Wt.require("util").types;return n||qt&&qt.binding&&qt.binding("util")}catch(n){}}(),Pt=Ut&&Ut.isArrayBuffer,Bt=Ut&&Ut.isDate,Nt=Ut&&Ut.isMap,Dt=Ut&&Ut.isRegExp,$t=Ut&&Ut.isSet,Ht=Ut&&Ut.isTypedArray;function Zt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Vt(n,t,e,r){for(var u=-1,i=null==n?0:n.length;++u-1}function Qt(n,t,e){for(var r=-1,u=null==n?0:n.length;++r-1;);return e}function be(n,t){for(var e=n.length;e--&&ce(t,n[e],0)>-1;);return e}var xe=pe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=pe({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ae(n){return"\\"+Rt[n]}function Ee(n){return jt.test(n)}function Oe(n){var t=-1,e=Array(n.size);return n.forEach((function(n,r){e[++t]=[r,n]})),e}function Se(n,t){return function(e){return n(t(e))}}function Le(n,t){for(var e=-1,r=n.length,u=0,i=[];++e",""":'"',"'":"'"});var ze=function n(t){var e,r=(t=null==t?zt:ze.defaults(zt.Object(),t,ze.pick(zt,Et))).Array,u=t.Date,Qn=t.Error,nt=t.Function,tt=t.Math,et=t.Object,rt=t.RegExp,ut=t.String,it=t.TypeError,ot=r.prototype,at=nt.prototype,ct=et.prototype,ft=t["__core-js_shared__"],lt=at.toString,st=ct.hasOwnProperty,ht=0,pt=(e=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",vt=ct.toString,dt=lt.call(et),gt=zt._,_t=rt("^"+lt.call(st).replace(In,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=Ft?t.Buffer:i,bt=t.Symbol,jt=t.Uint8Array,Rt=yt?yt.allocUnsafe:i,Ct=Se(et.getPrototypeOf,et),It=et.create,Mt=ct.propertyIsEnumerable,Wt=ot.splice,qt=bt?bt.isConcatSpreadable:i,Ut=bt?bt.iterator:i,ie=bt?bt.toStringTag:i,pe=function(){try{var n=qi(et,"defineProperty");return n({},"",{}),n}catch(n){}}(),Me=t.clearTimeout!==zt.clearTimeout&&t.clearTimeout,We=u&&u.now!==zt.Date.now&&u.now,Fe=t.setTimeout!==zt.setTimeout&&t.setTimeout,qe=tt.ceil,Ue=tt.floor,Pe=et.getOwnPropertySymbols,Be=yt?yt.isBuffer:i,Ne=t.isFinite,De=ot.join,$e=Se(et.keys,et),He=tt.max,Ze=tt.min,Ve=u.now,Xe=t.parseInt,Ge=tt.random,Ke=ot.reverse,Ye=qi(t,"DataView"),Je=qi(t,"Map"),Qe=qi(t,"Promise"),nr=qi(t,"Set"),tr=qi(t,"WeakMap"),er=qi(et,"create"),rr=tr&&new tr,ur={},ir=lo(Ye),or=lo(Je),ar=lo(Qe),cr=lo(nr),fr=lo(tr),lr=bt?bt.prototype:i,sr=lr?lr.valueOf:i,hr=lr?lr.toString:i;function pr(n){if(La(n)&&!_a(n)&&!(n instanceof _r)){if(n instanceof gr)return n;if(st.call(n,"__wrapped__"))return so(n)}return new gr(n)}var vr=function(){function n(){}return function(t){if(!Sa(t))return{};if(It)return It(t);n.prototype=t;var e=new n;return n.prototype=i,e}}();function dr(){}function gr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function _r(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function yr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Mr(n,t,e,r,u,o){var a,c=t&h,f=t&p,l=t&v;if(e&&(a=u?e(n,r,u,o):e(n)),a!==i)return a;if(!Sa(n))return n;var s=_a(n);if(s){if(a=function(n){var t=n.length,e=new n.constructor(t);t&&"string"==typeof n[0]&&st.call(n,"index")&&(e.index=n.index,e.input=n.input);return e}(n),!c)return ei(n,a)}else{var d=Bi(n),g=d==X||d==G;if(ba(n))return Ku(n,c);if(d==Q||d==B||g&&!u){if(a=f||g?{}:Di(n),!c)return f?function(n,t){return ri(n,Pi(n),t)}(n,function(n,t){return n&&ri(t,ic(t),n)}(a,n)):function(n,t){return ri(n,Ui(n),t)}(n,kr(a,n))}else{if(!Lt[d])return u?n:{};a=function(n,t,e){var r=n.constructor;switch(t){case fn:return Yu(n);case $:case H:return new r(+n);case ln:return function(n,t){var e=t?Yu(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n,e);case sn:case hn:case pn:case vn:case dn:case gn:case _n:case yn:case mn:return Ju(n,e);case K:return new r;case Y:case rn:return new r(n);case tn:return function(n){var t=new n.constructor(n.source,$n.exec(n));return t.lastIndex=n.lastIndex,t}(n);case en:return new r;case un:return u=n,sr?et(sr.call(u)):{}}var u}(n,d,c)}}o||(o=new xr);var _=o.get(n);if(_)return _;o.set(n,a),Ia(n)?n.forEach((function(r){a.add(Mr(r,t,e,r,n,o))})):Ra(n)&&n.forEach((function(r,u){a.set(u,Mr(r,t,e,u,n,o))}));var y=s?i:(l?f?ki:Ti:f?ic:uc)(n);return Xt(y||n,(function(r,u){y&&(r=n[u=r]),Lr(a,u,Mr(r,t,e,u,n,o))})),a}function Wr(n,t,e){var r=e.length;if(null==n)return!r;for(n=et(n);r--;){var u=e[r],o=t[u],a=n[u];if(a===i&&!(u in n)||!o(a))return!1}return!0}function Fr(n,t,e){if("function"!=typeof n)throw new it(c);return ro((function(){n.apply(i,e)}),t)}function qr(n,t,e,r){var u=-1,i=Jt,a=!0,c=n.length,f=[],l=t.length;if(!c)return f;e&&(t=ne(t,_e(e))),r?(i=Qt,a=!1):t.length>=o&&(i=me,a=!1,t=new br(t));n:for(;++u-1},mr.prototype.set=function(n,t){var e=this.__data__,r=Rr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Je||mr),string:new yr}},wr.prototype.delete=function(n){var t=Wi(this,n).delete(n);return this.size-=t?1:0,t},wr.prototype.get=function(n){return Wi(this,n).get(n)},wr.prototype.has=function(n){return Wi(this,n).has(n)},wr.prototype.set=function(n,t){var e=Wi(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},br.prototype.add=br.prototype.push=function(n){return this.__data__.set(n,f),this},br.prototype.has=function(n){return this.__data__.has(n)},xr.prototype.clear=function(){this.__data__=new mr,this.size=0},xr.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},xr.prototype.get=function(n){return this.__data__.get(n)},xr.prototype.has=function(n){return this.__data__.has(n)},xr.prototype.set=function(n,t){var e=this.__data__;if(e instanceof mr){var r=e.__data__;if(!Je||r.length0&&e(a)?t>1?$r(a,t-1,e,r,u):te(u,a):r||(u[u.length]=a)}return u}var Hr=ai(),Zr=ai(!0);function Vr(n,t){return n&&Hr(n,t,uc)}function Xr(n,t){return n&&Zr(n,t,uc)}function Gr(n,t){return Yt(t,(function(t){return Aa(n[t])}))}function Kr(n,t){for(var e=0,r=(t=Zu(t,n)).length;null!=n&&et}function nu(n,t){return null!=n&&st.call(n,t)}function tu(n,t){return null!=n&&t in et(n)}function eu(n,t,e){for(var u=e?Qt:Jt,o=n[0].length,a=n.length,c=a,f=r(a),l=1/0,s=[];c--;){var h=n[c];c&&t&&(h=ne(h,_e(t))),l=Ze(h.length,l),f[c]=!e&&(t||o>=120&&h.length>=120)?new br(c&&h):i}h=n[0];var p=-1,v=f[0];n:for(;++p=a)return c;var f=e[r];return c*("desc"==f?-1:1)}}return n.index-t.index}(n,t,e)}))}function yu(n,t,e){for(var r=-1,u=t.length,i={};++r-1;)a!==n&&Wt.call(a,c,1),Wt.call(n,c,1);return n}function wu(n,t){for(var e=n?t.length:0,r=e-1;e--;){var u=t[e];if(e==r||u!==i){var i=u;Hi(u)?Wt.call(n,u,1):qu(n,u)}}return n}function bu(n,t){return n+Ue(Ge()*(t-n+1))}function xu(n,t){var e="";if(!n||t<1||t>z)return e;do{t%2&&(e+=n),(t=Ue(t/2))&&(n+=n)}while(t);return e}function ju(n,t){return uo(Qi(n,t,Tc),n+"")}function Au(n){return Ar(pc(n))}function Eu(n,t){var e=pc(n);return ao(e,zr(t,0,e.length))}function Ou(n,t,e,r){if(!Sa(n))return n;for(var u=-1,o=(t=Zu(t,n)).length,a=o-1,c=n;null!=c&&++ui?0:i+t),(e=e>i?i:e)<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=r(i);++u>>1,o=n[i];null!==o&&!Ma(o)&&(e?o<=t:o=o){var l=t?null:xi(n);if(l)return Re(l);a=!1,u=me,f=new br}else f=t?[]:c;n:for(;++r=r?n:Tu(n,t,e)}var Gu=Me||function(n){return zt.clearTimeout(n)};function Ku(n,t){if(t)return n.slice();var e=n.length,r=Rt?Rt(e):new n.constructor(e);return n.copy(r),r}function Yu(n){var t=new n.constructor(n.byteLength);return new jt(t).set(new jt(n)),t}function Ju(n,t){var e=t?Yu(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Qu(n,t){if(n!==t){var e=n!==i,r=null===n,u=n==n,o=Ma(n),a=t!==i,c=null===t,f=t==t,l=Ma(t);if(!c&&!l&&!o&&n>t||o&&a&&f&&!c&&!l||r&&a&&f||!e&&f||!u)return 1;if(!r&&!o&&!l&&n1?e[u-1]:i,a=u>2?e[2]:i;for(o=n.length>3&&"function"==typeof o?(u--,o):i,a&&Zi(e[0],e[1],a)&&(o=u<3?i:o,u=1),t=et(t);++r-1?u[o?t[a]:a]:i}}function hi(n){return Ri((function(t){var e=t.length,r=e,u=gr.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new it(c);if(u&&!a&&"wrapper"==Ii(o))var a=new gr([],!0)}for(r=a?r:e;++r1&&w.reverse(),h&&lc))return!1;var l=o.get(n);if(l&&o.get(t))return l==t;var s=-1,h=!0,p=e&g?new br:i;for(o.set(n,t),o.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(qn,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Xt(P,(function(e){var r="_."+e[0];t&e[1]&&!Jt(n,r)&&n.push(r)})),n.sort()}(function(n){var t=n.match(Un);return t?t[1].split(Pn):[]}(r),e)))}function oo(n){var t=0,e=0;return function(){var r=Ve(),u=T-(r-e);if(e=r,u>0){if(++t>=R)return arguments[0]}else t=0;return n.apply(i,arguments)}}function ao(n,t){var e=-1,r=n.length,u=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e="function"==typeof e?(n.pop(),e):i,Co(n,e)}));function Uo(n){var t=pr(n);return t.__chain__=!0,t}function Po(n,t){return t(n)}var Bo=Ri((function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,u=function(t){return Ir(t,n)};return!(t>1||this.__actions__.length)&&r instanceof _r&&Hi(e)?((r=r.slice(e,+e+(t?1:0))).__actions__.push({func:Po,args:[u],thisArg:i}),new gr(r,this.__chain__).thru((function(n){return t&&!n.length&&n.push(i),n}))):this.thru(u)}));var No=ui((function(n,t,e){st.call(n,e)?++n[e]:Cr(n,e,1)}));var Do=si(go),$o=si(_o);function Ho(n,t){return(_a(n)?Xt:Ur)(n,Mi(t,3))}function Zo(n,t){return(_a(n)?Gt:Pr)(n,Mi(t,3))}var Vo=ui((function(n,t,e){st.call(n,e)?n[e].push(t):Cr(n,e,[t])}));var Xo=ju((function(n,t,e){var u=-1,i="function"==typeof t,o=ma(n)?r(n.length):[];return Ur(n,(function(n){o[++u]=i?Zt(t,n,e):ru(n,t,e)})),o})),Go=ui((function(n,t,e){Cr(n,e,t)}));function Ko(n,t){return(_a(n)?ne:hu)(n,Mi(t,3))}var Yo=ui((function(n,t,e){n[e?0:1].push(t)}),(function(){return[[],[]]}));var Jo=ju((function(n,t){if(null==n)return[];var e=t.length;return e>1&&Zi(n,t[0],t[1])?t=[]:e>2&&Zi(t[0],t[1],t[2])&&(t=[t[0]]),_u(n,$r(t,1),[])})),Qo=We||function(){return zt.Date.now()};function na(n,t,e){return t=e?i:t,t=n&&null==t?n.length:t,Ai(n,A,i,i,i,i,t)}function ta(n,t){var e;if("function"!=typeof t)throw new it(c);return n=Ba(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var ea=ju((function(n,t,e){var r=_;if(e.length){var u=Le(e,zi(ea));r|=x}return Ai(n,r,t,e,u)})),ra=ju((function(n,t,e){var r=_|y;if(e.length){var u=Le(e,zi(ra));r|=x}return Ai(t,r,n,e,u)}));function ua(n,t,e){var r,u,o,a,f,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new it(c);function d(t){var e=r,o=u;return r=u=i,s=t,a=n.apply(o,e)}function g(n){var e=n-l;return l===i||e>=t||e<0||p&&n-s>=o}function _(){var n=Qo();if(g(n))return y(n);f=ro(_,function(n){var e=t-(n-l);return p?Ze(e,o-(n-s)):e}(n))}function y(n){return f=i,v&&r?d(n):(r=u=i,a)}function m(){var n=Qo(),e=g(n);if(r=arguments,u=this,l=n,e){if(f===i)return function(n){return s=n,f=ro(_,t),h?d(n):a}(l);if(p)return Gu(f),f=ro(_,t),d(l)}return f===i&&(f=ro(_,t)),a}return t=Da(t)||0,Sa(e)&&(h=!!e.leading,o=(p="maxWait"in e)?He(Da(e.maxWait)||0,t):o,v="trailing"in e?!!e.trailing:v),m.cancel=function(){f!==i&&Gu(f),s=0,r=l=u=f=i},m.flush=function(){return f===i?a:y(Qo())},m}var ia=ju((function(n,t){return Fr(n,1,t)})),oa=ju((function(n,t,e){return Fr(n,Da(t)||0,e)}));function aa(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new it(c);var e=function(){var r=arguments,u=t?t.apply(this,r):r[0],i=e.cache;if(i.has(u))return i.get(u);var o=n.apply(this,r);return e.cache=i.set(u,o)||i,o};return e.cache=new(aa.Cache||wr),e}function ca(n){if("function"!=typeof n)throw new it(c);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}aa.Cache=wr;var fa=Vu((function(n,t){var e=(t=1==t.length&&_a(t[0])?ne(t[0],_e(Mi())):ne($r(t,1),_e(Mi()))).length;return ju((function(r){for(var u=-1,i=Ze(r.length,e);++u=t})),ga=uu(function(){return arguments}())?uu:function(n){return La(n)&&st.call(n,"callee")&&!Mt.call(n,"callee")},_a=r.isArray,ya=Pt?_e(Pt):function(n){return La(n)&&Jr(n)==fn};function ma(n){return null!=n&&Oa(n.length)&&!Aa(n)}function wa(n){return La(n)&&ma(n)}var ba=Be||Dc,xa=Bt?_e(Bt):function(n){return La(n)&&Jr(n)==H};function ja(n){if(!La(n))return!1;var t=Jr(n);return t==V||t==Z||"string"==typeof n.message&&"string"==typeof n.name&&!ka(n)}function Aa(n){if(!Sa(n))return!1;var t=Jr(n);return t==X||t==G||t==D||t==nn}function Ea(n){return"number"==typeof n&&n==Ba(n)}function Oa(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=z}function Sa(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function La(n){return null!=n&&"object"==typeof n}var Ra=Nt?_e(Nt):function(n){return La(n)&&Bi(n)==K};function Ta(n){return"number"==typeof n||La(n)&&Jr(n)==Y}function ka(n){if(!La(n)||Jr(n)!=Q)return!1;var t=Ct(n);if(null===t)return!0;var e=st.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&<.call(e)==dt}var Ca=Dt?_e(Dt):function(n){return La(n)&&Jr(n)==tn};var Ia=$t?_e($t):function(n){return La(n)&&Bi(n)==en};function za(n){return"string"==typeof n||!_a(n)&&La(n)&&Jr(n)==rn}function Ma(n){return"symbol"==typeof n||La(n)&&Jr(n)==un}var Wa=Ht?_e(Ht):function(n){return La(n)&&Oa(n.length)&&!!St[Jr(n)]};var Fa=mi(su),qa=mi((function(n,t){return n<=t}));function Ua(n){if(!n)return[];if(ma(n))return za(n)?Ce(n):ei(n);if(Ut&&n[Ut])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[Ut]());var t=Bi(n);return(t==K?Oe:t==en?Re:pc)(n)}function Pa(n){return n?(n=Da(n))===I||n===-I?(n<0?-1:1)*M:n==n?n:0:0===n?n:0}function Ba(n){var t=Pa(n),e=t%1;return t==t?e?t-e:t:0}function Na(n){return n?zr(Ba(n),0,F):0}function Da(n){if("number"==typeof n)return n;if(Ma(n))return W;if(Sa(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Sa(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Mn,"");var e=Zn.test(n);return e||Xn.test(n)?kt(n.slice(2),e?2:8):Hn.test(n)?W:+n}function $a(n){return ri(n,ic(n))}function Ha(n){return null==n?"":Wu(n)}var Za=ii((function(n,t){if(Ki(t)||ma(t))ri(t,uc(t),n);else for(var e in t)st.call(t,e)&&Lr(n,e,t[e])})),Va=ii((function(n,t){ri(t,ic(t),n)})),Xa=ii((function(n,t,e,r){ri(t,ic(t),n,r)})),Ga=ii((function(n,t,e,r){ri(t,uc(t),n,r)})),Ka=Ri(Ir);var Ya=ju((function(n,t){n=et(n);var e=-1,r=t.length,u=r>2?t[2]:i;for(u&&Zi(t[0],t[1],u)&&(r=1);++e1),t})),ri(n,ki(n),e),r&&(e=Mr(e,h|p|v,Si));for(var u=t.length;u--;)qu(e,t[u]);return e}));var fc=Ri((function(n,t){return null==n?{}:function(n,t){return yu(n,t,(function(t,e){return nc(n,e)}))}(n,t)}));function lc(n,t){if(null==n)return{};var e=ne(ki(n),(function(n){return[n]}));return t=Mi(t),yu(n,e,(function(n,e){return t(n,e[0])}))}var sc=ji(uc),hc=ji(ic);function pc(n){return null==n?[]:ye(n,uc(n))}var vc=fi((function(n,t,e){return t=t.toLowerCase(),n+(e?dc(t):t)}));function dc(n){return jc(Ha(n).toLowerCase())}function gc(n){return(n=Ha(n))&&n.replace(Kn,xe).replace(wt,"")}var _c=fi((function(n,t,e){return n+(e?"-":"")+t.toLowerCase()})),yc=fi((function(n,t,e){return n+(e?" ":"")+t.toLowerCase()})),mc=ci("toLowerCase");var wc=fi((function(n,t,e){return n+(e?"_":"")+t.toLowerCase()}));var bc=fi((function(n,t,e){return n+(e?" ":"")+jc(t)}));var xc=fi((function(n,t,e){return n+(e?" ":"")+t.toUpperCase()})),jc=ci("toUpperCase");function Ac(n,t,e){return n=Ha(n),(t=e?i:t)===i?function(n){return At.test(n)}(n)?function(n){return n.match(xt)||[]}(n):function(n){return n.match(Bn)||[]}(n):n.match(t)||[]}var Ec=ju((function(n,t){try{return Zt(n,i,t)}catch(n){return ja(n)?n:new Qn(n)}})),Oc=Ri((function(n,t){return Xt(t,(function(t){t=fo(t),Cr(n,t,ea(n[t],n))})),n}));function Sc(n){return function(){return n}}var Lc=hi(),Rc=hi(!0);function Tc(n){return n}function kc(n){return cu("function"==typeof n?n:Mr(n,h))}var Cc=ju((function(n,t){return function(e){return ru(e,n,t)}})),Ic=ju((function(n,t){return function(e){return ru(n,e,t)}}));function zc(n,t,e){var r=uc(t),u=Gr(t,r);null!=e||Sa(t)&&(u.length||!r.length)||(e=t,t=n,n=this,u=Gr(t,uc(t)));var i=!(Sa(e)&&"chain"in e&&!e.chain),o=Aa(n);return Xt(u,(function(e){var r=t[e];n[e]=r,o&&(n.prototype[e]=function(){var t=this.__chain__;if(i||t){var e=n(this.__wrapped__),u=e.__actions__=ei(this.__actions__);return u.push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,te([this.value()],arguments))})})),n}function Mc(){}var Wc=gi(ne),Fc=gi(Kt),qc=gi(ue);function Uc(n){return Vi(n)?he(fo(n)):function(n){return function(t){return Kr(t,n)}}(n)}var Pc=yi(),Bc=yi(!0);function Nc(){return[]}function Dc(){return!1}var $c=di((function(n,t){return n+t}),0),Hc=bi("ceil"),Zc=di((function(n,t){return n/t}),1),Vc=bi("floor");var Xc,Gc=di((function(n,t){return n*t}),1),Kc=bi("round"),Yc=di((function(n,t){return n-t}),0);return pr.after=function(n,t){if("function"!=typeof t)throw new it(c);return n=Ba(n),function(){if(--n<1)return t.apply(this,arguments)}},pr.ary=na,pr.assign=Za,pr.assignIn=Va,pr.assignInWith=Xa,pr.assignWith=Ga,pr.at=Ka,pr.before=ta,pr.bind=ea,pr.bindAll=Oc,pr.bindKey=ra,pr.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return _a(n)?n:[n]},pr.chain=Uo,pr.chunk=function(n,t,e){t=(e?Zi(n,t,e):t===i)?1:He(Ba(t),0);var u=null==n?0:n.length;if(!u||t<1)return[];for(var o=0,a=0,c=r(qe(u/t));ou?0:u+e),(r=r===i||r>u?u:Ba(r))<0&&(r+=u),r=e>r?0:Na(r);e>>0)?(n=Ha(n))&&("string"==typeof t||null!=t&&!Ca(t))&&!(t=Wu(t))&&Ee(n)?Xu(Ce(n),0,e):n.split(t,e):[]},pr.spread=function(n,t){if("function"!=typeof n)throw new it(c);return t=null==t?0:He(Ba(t),0),ju((function(e){var r=e[t],u=Xu(e,0,t);return r&&te(u,r),Zt(n,this,u)}))},pr.tail=function(n){var t=null==n?0:n.length;return t?Tu(n,1,t):[]},pr.take=function(n,t,e){return n&&n.length?Tu(n,0,(t=e||t===i?1:Ba(t))<0?0:t):[]},pr.takeRight=function(n,t,e){var r=null==n?0:n.length;return r?Tu(n,(t=r-(t=e||t===i?1:Ba(t)))<0?0:t,r):[]},pr.takeRightWhile=function(n,t){return n&&n.length?Pu(n,Mi(t,3),!1,!0):[]},pr.takeWhile=function(n,t){return n&&n.length?Pu(n,Mi(t,3)):[]},pr.tap=function(n,t){return t(n),n},pr.throttle=function(n,t,e){var r=!0,u=!0;if("function"!=typeof n)throw new it(c);return Sa(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),ua(n,t,{leading:r,maxWait:t,trailing:u})},pr.thru=Po,pr.toArray=Ua,pr.toPairs=sc,pr.toPairsIn=hc,pr.toPath=function(n){return _a(n)?ne(n,fo):Ma(n)?[n]:ei(co(Ha(n)))},pr.toPlainObject=$a,pr.transform=function(n,t,e){var r=_a(n),u=r||ba(n)||Wa(n);if(t=Mi(t,4),null==e){var i=n&&n.constructor;e=u?r?new i:[]:Sa(n)&&Aa(i)?vr(Ct(n)):{}}return(u?Xt:Vr)(n,(function(n,r,u){return t(e,n,r,u)})),e},pr.unary=function(n){return na(n,1)},pr.union=Lo,pr.unionBy=Ro,pr.unionWith=To,pr.uniq=function(n){return n&&n.length?Fu(n):[]},pr.uniqBy=function(n,t){return n&&n.length?Fu(n,Mi(t,2)):[]},pr.uniqWith=function(n,t){return t="function"==typeof t?t:i,n&&n.length?Fu(n,i,t):[]},pr.unset=function(n,t){return null==n||qu(n,t)},pr.unzip=ko,pr.unzipWith=Co,pr.update=function(n,t,e){return null==n?n:Uu(n,t,Hu(e))},pr.updateWith=function(n,t,e,r){return r="function"==typeof r?r:i,null==n?n:Uu(n,t,Hu(e),r)},pr.values=pc,pr.valuesIn=function(n){return null==n?[]:ye(n,ic(n))},pr.without=Io,pr.words=Ac,pr.wrap=function(n,t){return la(Hu(t),n)},pr.xor=zo,pr.xorBy=Mo,pr.xorWith=Wo,pr.zip=Fo,pr.zipObject=function(n,t){return Du(n||[],t||[],Lr)},pr.zipObjectDeep=function(n,t){return Du(n||[],t||[],Ou)},pr.zipWith=qo,pr.entries=sc,pr.entriesIn=hc,pr.extend=Va,pr.extendWith=Xa,zc(pr,pr),pr.add=$c,pr.attempt=Ec,pr.camelCase=vc,pr.capitalize=dc,pr.ceil=Hc,pr.clamp=function(n,t,e){return e===i&&(e=t,t=i),e!==i&&(e=(e=Da(e))==e?e:0),t!==i&&(t=(t=Da(t))==t?t:0),zr(Da(n),t,e)},pr.clone=function(n){return Mr(n,v)},pr.cloneDeep=function(n){return Mr(n,h|v)},pr.cloneDeepWith=function(n,t){return Mr(n,h|v,t="function"==typeof t?t:i)},pr.cloneWith=function(n,t){return Mr(n,v,t="function"==typeof t?t:i)},pr.conformsTo=function(n,t){return null==t||Wr(n,t,uc(t))},pr.deburr=gc,pr.defaultTo=function(n,t){return null==n||n!=n?t:n},pr.divide=Zc,pr.endsWith=function(n,t,e){n=Ha(n),t=Wu(t);var r=n.length,u=e=e===i?r:zr(Ba(e),0,r);return(e-=t.length)>=0&&n.slice(e,u)==t},pr.eq=pa,pr.escape=function(n){return(n=Ha(n))&&On.test(n)?n.replace(An,je):n},pr.escapeRegExp=function(n){return(n=Ha(n))&&zn.test(n)?n.replace(In,"\\$&"):n},pr.every=function(n,t,e){var r=_a(n)?Kt:Br;return e&&Zi(n,t,e)&&(t=i),r(n,Mi(t,3))},pr.find=Do,pr.findIndex=go,pr.findKey=function(n,t){return oe(n,Mi(t,3),Vr)},pr.findLast=$o,pr.findLastIndex=_o,pr.findLastKey=function(n,t){return oe(n,Mi(t,3),Xr)},pr.floor=Vc,pr.forEach=Ho,pr.forEachRight=Zo,pr.forIn=function(n,t){return null==n?n:Hr(n,Mi(t,3),ic)},pr.forInRight=function(n,t){return null==n?n:Zr(n,Mi(t,3),ic)},pr.forOwn=function(n,t){return n&&Vr(n,Mi(t,3))},pr.forOwnRight=function(n,t){return n&&Xr(n,Mi(t,3))},pr.get=Qa,pr.gt=va,pr.gte=da,pr.has=function(n,t){return null!=n&&Ni(n,t,nu)},pr.hasIn=nc,pr.head=mo,pr.identity=Tc,pr.includes=function(n,t,e,r){n=ma(n)?n:pc(n),e=e&&!r?Ba(e):0;var u=n.length;return e<0&&(e=He(u+e,0)),za(n)?e<=u&&n.indexOf(t,e)>-1:!!u&&ce(n,t,e)>-1},pr.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var u=null==e?0:Ba(e);return u<0&&(u=He(r+u,0)),ce(n,t,u)},pr.inRange=function(n,t,e){return t=Pa(t),e===i?(e=t,t=0):e=Pa(e),function(n,t,e){return n>=Ze(t,e)&&n=-z&&n<=z},pr.isSet=Ia,pr.isString=za,pr.isSymbol=Ma,pr.isTypedArray=Wa,pr.isUndefined=function(n){return n===i},pr.isWeakMap=function(n){return La(n)&&Bi(n)==an},pr.isWeakSet=function(n){return La(n)&&Jr(n)==cn},pr.join=function(n,t){return null==n?"":De.call(n,t)},pr.kebabCase=_c,pr.last=jo,pr.lastIndexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var u=r;return e!==i&&(u=(u=Ba(e))<0?He(r+u,0):Ze(u,r-1)),t==t?function(n,t,e){for(var r=e+1;r--;)if(n[r]===t)return r;return r}(n,t,u):ae(n,le,u,!0)},pr.lowerCase=yc,pr.lowerFirst=mc,pr.lt=Fa,pr.lte=qa,pr.max=function(n){return n&&n.length?Nr(n,Tc,Qr):i},pr.maxBy=function(n,t){return n&&n.length?Nr(n,Mi(t,2),Qr):i},pr.mean=function(n){return se(n,Tc)},pr.meanBy=function(n,t){return se(n,Mi(t,2))},pr.min=function(n){return n&&n.length?Nr(n,Tc,su):i},pr.minBy=function(n,t){return n&&n.length?Nr(n,Mi(t,2),su):i},pr.stubArray=Nc,pr.stubFalse=Dc,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Gc,pr.nth=function(n,t){return n&&n.length?gu(n,Ba(t)):i},pr.noConflict=function(){return zt._===this&&(zt._=gt),this},pr.noop=Mc,pr.now=Qo,pr.pad=function(n,t,e){n=Ha(n);var r=(t=Ba(t))?ke(n):0;if(!t||r>=t)return n;var u=(t-r)/2;return _i(Ue(u),e)+n+_i(qe(u),e)},pr.padEnd=function(n,t,e){n=Ha(n);var r=(t=Ba(t))?ke(n):0;return t&&rt){var r=n;n=t,t=r}if(e||n%1||t%1){var u=Ge();return Ze(n+u*(t-n+Tt("1e-"+((u+"").length-1))),t)}return bu(n,t)},pr.reduce=function(n,t,e){var r=_a(n)?ee:ve,u=arguments.length<3;return r(n,Mi(t,4),e,u,Ur)},pr.reduceRight=function(n,t,e){var r=_a(n)?re:ve,u=arguments.length<3;return r(n,Mi(t,4),e,u,Pr)},pr.repeat=function(n,t,e){return t=(e?Zi(n,t,e):t===i)?1:Ba(t),xu(Ha(n),t)},pr.replace=function(){var n=arguments,t=Ha(n[0]);return n.length<3?t:t.replace(n[1],n[2])},pr.result=function(n,t,e){var r=-1,u=(t=Zu(t,n)).length;for(u||(u=1,n=i);++rz)return[];var e=F,r=Ze(n,F);t=Mi(t),n-=F;for(var u=ge(r,t);++e=o)return n;var c=e-ke(r);if(c<1)return r;var f=a?Xu(a,0,c).join(""):n.slice(0,c);if(u===i)return f+r;if(a&&(c+=f.length-c),Ca(u)){if(n.slice(c).search(u)){var l,s=f;for(u.global||(u=rt(u.source,Ha($n.exec(u))+"g")),u.lastIndex=0;l=u.exec(s);)var h=l.index;f=f.slice(0,h===i?c:h)}}else if(n.indexOf(Wu(u),c)!=c){var p=f.lastIndexOf(u);p>-1&&(f=f.slice(0,p))}return f+r},pr.unescape=function(n){return(n=Ha(n))&&En.test(n)?n.replace(jn,Ie):n},pr.uniqueId=function(n){var t=++ht;return Ha(n)+t},pr.upperCase=xc,pr.upperFirst=jc,pr.each=Ho,pr.eachRight=Zo,pr.first=mo,zc(pr,(Xc={},Vr(pr,(function(n,t){st.call(pr.prototype,t)||(Xc[t]=n)})),Xc),{chain:!1}),pr.VERSION="4.17.15",Xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){pr[n].placeholder=pr})),Xt(["drop","take"],(function(n,t){_r.prototype[n]=function(e){e=e===i?1:He(Ba(e),0);var r=this.__filtered__&&!t?new _r(this):this.clone();return r.__filtered__?r.__takeCount__=Ze(e,r.__takeCount__):r.__views__.push({size:Ze(e,F),type:n+(r.__dir__<0?"Right":"")}),r},_r.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),Xt(["filter","map","takeWhile"],(function(n,t){var e=t+1,r=e==k||3==e;_r.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Mi(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}})),Xt(["head","last"],(function(n,t){var e="take"+(t?"Right":"");_r.prototype[n]=function(){return this[e](1).value()[0]}})),Xt(["initial","tail"],(function(n,t){var e="drop"+(t?"":"Right");_r.prototype[n]=function(){return this.__filtered__?new _r(this):this[e](1)}})),_r.prototype.compact=function(){return this.filter(Tc)},_r.prototype.find=function(n){return this.filter(n).head()},_r.prototype.findLast=function(n){return this.reverse().find(n)},_r.prototype.invokeMap=ju((function(n,t){return"function"==typeof n?new _r(this):this.map((function(e){return ru(e,n,t)}))})),_r.prototype.reject=function(n){return this.filter(ca(Mi(n)))},_r.prototype.slice=function(n,t){n=Ba(n);var e=this;return e.__filtered__&&(n>0||t<0)?new _r(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(e=(t=Ba(t))<0?e.dropRight(-t):e.take(t-n)),e)},_r.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},_r.prototype.toArray=function(){return this.take(F)},Vr(_r.prototype,(function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),u=pr[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);u&&(pr.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof _r,f=a[0],l=c||_a(t),s=function(n){var t=u.apply(pr,te([n],a));return r&&h?t[0]:t};l&&e&&"function"==typeof f&&1!=f.length&&(c=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,d=c&&!p;if(!o&&l){t=d?t:new _r(this);var g=n.apply(t,a);return g.__actions__.push({func:Po,args:[s],thisArg:i}),new gr(g,h)}return v&&d?n.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Xt(["pop","push","shift","sort","splice","unshift"],(function(n){var t=ot[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);pr.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var u=this.value();return t.apply(_a(u)?u:[],n)}return this[e]((function(e){return t.apply(_a(e)?e:[],n)}))}})),Vr(_r.prototype,(function(n,t){var e=pr[t];if(e){var r=e.name+"";st.call(ur,r)||(ur[r]=[]),ur[r].push({name:t,func:e})}})),ur[pi(i,y).name]=[{name:"wrapper",func:i}],_r.prototype.clone=function(){var n=new _r(this.__wrapped__);return n.__actions__=ei(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=ei(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=ei(this.__views__),n},_r.prototype.reverse=function(){if(this.__filtered__){var n=new _r(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},_r.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=_a(n),r=t<0,u=e?n.length:0,i=function(n,t,e){var r=-1,u=e.length;for(;++r=this.__values__.length;return{done:n,value:n?i:this.__values__[this.__index__++]}},pr.prototype.plant=function(n){for(var t,e=this;e instanceof dr;){var r=so(e);r.__index__=0,r.__values__=i,t?u.__wrapped__=r:t=r;var u=r;e=e.__wrapped__}return u.__wrapped__=n,t},pr.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof _r){var t=n;return this.__actions__.length&&(t=new _r(this)),(t=t.reverse()).__actions__.push({func:Po,args:[So],thisArg:i}),new gr(t,this.__chain__)}return this.thru(So)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Bu(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,Ut&&(pr.prototype[Ut]=function(){return this}),pr}();zt._=ze,(u=function(){return ze}.call(t,e,t,r))===i||(r.exports=u)}).call(this)}).call(this,e(60),e(118)(n))},871:function(n,t,e){"use strict";e.r(t);var r={};e.r(r),e.d(r,"viewer360",(function(){return f}));var u=e(2),i=e(80);var o=function(n,t,e){void 0===t&&(t={}),void 0===e&&(e=!0);var r=function(n){if(!n)return!1;if(n.indexOf("?")<0)return!1;var t=n.slice(n.indexOf("?")+1).split("&");if(!t)return!1;var e={};return t.map((function(n){var t=n.split("="),r=t[0],u=t[1];e[r]=decodeURIComponent(u)})),e}(n);return r&&e&&(t=Object.assign(r,t)),function(n){return!!n&&n.split(/[?#]/)[0]}(n)+"?"+function(n){return Object.keys(n).map((function(t){return"width"===t&&(t="w"),"height"===t&&(t="h"),t+"="+n[t]})).join("&")}(t)},a=function(n,t){var e=new XMLHttpRequest;return e.onload=function(){t(e.response)},e.open("GET",n),e.responseType="blob",e.send(),e},c=function(){var n={},t=0,e=function(n){return n},r=function(r){if(!n)return e;var u=t++;return n[u]=r,function(t){return function(){for(var r=[],u=arguments.length;u--;)r[u]=arguments[u];var i=n;if(!i)return e.apply(void 0,r);var o=i[t];return delete i[t],o.apply(void 0,r)}}(u)};return r.unmount=function(){return n=null},r},f=function(n){var t=n,e=0,r=null,u=0,f=window.innerWidth,l=window.innerHeight,s=f>=900,h=t.querySelector(".m-viewer-360-image"),p=t.querySelector(".m-viewer-360-control"),v=t.querySelector(".m-viewer-360-control .input360"),d={},g=c(),_=t.dataset.id,y=document.getElementById(_).textContent,m=JSON.parse(y).src;m=m.map((function(n){return{frame:n.frame,src:o(n.src,{w:s?f-120:f,h:s?l-80:l,q:75})}}));var w=Object.keys(m).map((function(n){return parseInt(n)}));function b(n){var e=x(w,n),r=d[e];void 0!==r&&(t.classList.remove("loader"),h.style.opacity=1,h.src=r,p.style.opacity=1),v.value=e,v.setAttribute("value",e)}v.setAttribute("max",m.length-1);var x=Object(i.memoize)((function(n,t){return n.length?Object(i.includes)(n,t)?t:n.reduce((function(n,e){return Math.abs(e-t)Math.abs(n.deltaX)?Math.sign(n.deltaY):Math.sign(n.deltaX);b(e=j(e+t))}.bind(this)),t.addEventListener("mousedown",A.bind(this)),t.addEventListener("mousemove",A.bind(this)),t.addEventListener("mouseup",A.bind(this)),t.addEventListener("touchstart",A.bind(this)),t.addEventListener("touchmove",A.bind(this)),t.addEventListener("touchend",A.bind(this)),t.addEventListener("touchcancel",A.bind(this)),this.init=function(){E()},this.destroy=function(){A17.Helpers.purgeProperties(this)}};document.addEventListener("DOMContentLoaded",(function(){Object(u.l)(r)}))}});
+//# sourceMappingURL=blocks360.js.map
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/scripts/blocks3D.js b/docs/.vuepress/public/assets/scripts/blocks3D.js
new file mode 100644
index 000000000..2026f4f78
--- /dev/null
+++ b/docs/.vuepress/public/assets/scripts/blocks3D.js
@@ -0,0 +1,2 @@
+!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/scripts/",n(n.s=874)}({182:function(t,e,n){t.exports={EPSILON:n(279),create:n(280),clone:n(470),angle:n(471),fromValues:n(281),copy:n(472),set:n(473),equals:n(474),exactEquals:n(475),add:n(476),subtract:n(284),sub:n(477),multiply:n(285),mul:n(478),divide:n(286),div:n(479),min:n(480),max:n(481),floor:n(482),ceil:n(483),round:n(484),scale:n(485),scaleAndAdd:n(486),distance:n(287),dist:n(487),squaredDistance:n(288),sqrDist:n(488),length:n(289),len:n(489),squaredLength:n(290),sqrLen:n(490),negate:n(491),inverse:n(492),normalize:n(282),dot:n(283),cross:n(493),lerp:n(494),random:n(495),transformMat4:n(496),transformMat3:n(497),transformQuat:n(498),rotateX:n(499),rotateY:n(500),rotateZ:n(501),forEach:n(502)}},2:function(t,e,n){"use strict";var o={toObject:function(t){if("string"!=typeof t)return{};var e={};return(t&&t.indexOf("?")>-1?t.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(t,n,o,i){e[n]=i})),e},fromObject:function(t){var e="",n=0;if(Object.getOwnPropertyNames(t).length>0)for(var o in e="?",t)t.hasOwnProperty(o)&&(e+=(n>0?"&":"")+o+"="+encodeURIComponent(t[o]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),n++);return e},updateParameter:function(t,e,n){var o=new RegExp("([?&])"+e+"=.*?(&|#|$)","i");if(t.match(o))return t.replace(o,"$1"+e+"="+n+"$2");var i="";-1!==t.indexOf("#")&&(i=t.replace(/.*#/,"#"),t=t.replace(/#.*/,""));var r=-1!==t.indexOf("?")?"&":"?";return t+r+e+"="+n+i}},i=function(t){var e=t,n=new XMLHttpRequest,i=e.url;if(e.queryString="",void 0!==e.data){if(!o.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");e.queryString=o.fromObject(e.data)}if("POST"!==e.type&&(i+=i.indexOf("?")>0?e.queryString.replace("?","&"):e.queryString),n.open(e.type,i,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===e.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==e.requestHeaders&&e.requestHeaders.length>0)for(var r=0;r=200&&n.status<400?"function"===(typeof e.onSuccess).toLowerCase()&&e.onSuccess.call(this,n.responseText,n.status):("function"===(typeof e.onError).toLowerCase()&&e.onError.call(this,n.responseText,n.status),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof e.onError).toLowerCase()&&e.onError.call(this,n.responseText,n.status)},n.send("POST"===e.type?e.queryString.replace("?",""):"")},r={create:function(t,e,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toGMTString()}document.cookie=t+"="+e+o+"; path=/"},delete:function(t){t&&this.create(t,"",-1)},read:function(t){if(t){for(var e=t+"=",n=document.cookie.split(";"),o=0;o]*>?/g,""));return e.appendChild(n),encodeURIComponent(e.textContent)}return""},c=function(t,e,n){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0),o.data=n||{},o.eventName=e,t.dispatchEvent(o)},u=(n(64),function(t,e,n){for(var o=0;o0&&(o--,i.unobserve(n.target),n.target.addEventListener("load",u,!1),d(n.target))}}function f(){var t,p,h;if("really-old"===r){for(o=s.length,t=0;t0&&h.right>0&&h.left<(window.innerWidth||document.documentElement.clientWidth)&&h.top<(window.innerHeight||document.documentElement.clientHeight))){var m=s[t];s[t]=void 0,m.lazyloaded=!0,m.addEventListener("load",u,!1),d(m)}for(t=0;t0&&(n++,e=window.requestAnimationFrame(f))}else if("new"===r)for(i=new IntersectionObserver(l,{rootMargin:a.rootMargin,threshold:a.threshold}),o=s.length,t=0;t=0;r--)e.options[r].selected&&(n[e.name]=e.options[r].value);else("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(n[e.name]=e.value);return n},y=function(){var t,e=d();window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){var t=d();c(document,"resized"),t!==e&&(e=t,window.A17&&(window.A17.currentMediaQuery=t),c(document,"mediaQueryUpdated"))}),250)}))},g=function(t){var e,n={el:document,offset:0,duration:250,easing:"linear"},o=Date.now(),i=0,r=!1,a={linear:function(t){return t},easeIn:function(t){return t*t*t},easeOut:function(t){return--t*t*t+1},easeInOut:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1}},s=window.requestAnimationFrame;for(var c in t)void 0!==t[c]&&(n[c]=t[c]);function u(){if(r&&0===i)document.documentElement.scrollTop=1,document.body.scrollTop=1,i=1,n.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(u);else{var t=Date.now(),c=(f=1,p=(t-o)/n.duration,f0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r);return t}},283:function(t,e){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},284:function(t,e){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}},285:function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}},286:function(t,e){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}},287:function(t,e){t.exports=function(t,e){var n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+o*o+i*i)}},288:function(t,e){t.exports=function(t,e){var n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2];return n*n+o*o+i*i}},289:function(t,e){t.exports=function(t){var e=t[0],n=t[1],o=t[2];return Math.sqrt(e*e+n*n+o*o)}},290:function(t,e){t.exports=function(t){var e=t[0],n=t[1],o=t[2];return e*e+n*n+o*o}},371:function(t,e,n){window,t.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/static/builds/web/dist/",n(n.s=1)}([function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e,n){"use strict";n.r(e);var o=n(0),i=n.n(o),r=function(t,e,n){this._target=t,this._requestIdCounter=0,this._pendingRequests={},this._eventListeners={},this._ready=!1,this._domain=n,this._instanceId=e,this.listenServer()};r.prototype={getIdentifier:function(){return this._instanceId},getDomain:function(){return this._domain},setIdentifier:function(t){this._instanceId=t},use:function(t,e){this._version=t,this._ready=!0;var n=this._requestIdCounter++;this._pendingRequests[n]=function(t,n,o){t?e.call(this,t):e.call(this,null,new function(t,e){t.forEach((function(t){this[t]=function(){var n,o=e._requestIdCounter++,i=Array.prototype.slice.call(arguments);i.length>0&&"function"==typeof i[i.length-1]&&(n=i.pop()),n&&(e._pendingRequests[o]=n.bind(this)),e._target.postMessage({type:"api.request",instanceId:e.getIdentifier(),requestId:o,member:t,arguments:i},e.getDomain())}}),this),this.addEventListener=function(t,n,o){"viewerready"===t&&e.isViewerReady&&n(),e._eventListeners[t]||(e._eventListeners[t]=[]),e._eventListeners[t].push(n),o&&this.setListenerOptions&&(o.name=t,this.setListenerOptions(o))},this.removeEventListener=function(t,n){if(e._eventListeners[t]){var o=e._eventListeners[t].indexOf(n);-1!==o&&e._eventListeners[t].splice(o,1)}}}(o,this))}.bind(this),this._target.postMessage({type:"api.initialize",requestId:n,name:t,instanceId:this._instanceId},this._domain)},listenServer:function(){var t=["api.initialize.result","api.request.result","api.event"];window.addEventListener("message",function(e){if(e.origin===this._domain&&e.data&&e.data.type&&e.data.instanceId&&e.data.instanceId===this.getIdentifier()){var n=e.data.type;if(-1!==t.indexOf(n))if("api.event"===n){var o=e.data.results,i=o[0];if(this._eventListeners["*"]||this._eventListeners.all)return void["*","all"].forEach((function(t){var e=this._eventListeners[t];e&&e.forEach((function(t){t.apply(t,o)}))}),this);var r=o.slice(1),a=this._eventListeners[i];a?a.forEach((function(t){t.apply(t,r)})):"viewerready"===i&&(this.isViewerReady=!0)}else{var s=e.data.requestId,c=this._pendingRequests[s];if(!c)return;c.apply(null,e.data.results),this._pendingRequests[s]=void 0}}}.bind(this))}};var a=r,s=/[&|;]+/g;function c(t){return"object"===i()(t)?function(t){var e={};return Object.keys(t).forEach((function(n){e[n]=Array.isArray(t[n])?t[n]:[t[n]]})),e}(t):("?"===t[0]&&(t=t.substr(1)),t.split(s).reduce((function(t,e){if(0===e.length)return t;var n=e.indexOf("=");-1===n&&(n=e.length);var o=decodeURIComponent(e.substr(0,n).replace(/\+/g,"%20")),i=decodeURIComponent(e.substr(n+1).replace(/\+/g,"%20"));return void 0===t[o]&&(t[o]=[]),t[o].push(i),t}),{}))}window.SketchfabAPIClient=a;var u=function(t,e){var n=t,o=e;"object"===i()(t)&&(o=t,n=null),this._version=n,this._target=o,window.sketchfabAPIinstances||(window.sketchfabAPIinstances=[]),window.sketchfabAPIinstances.push(this),this._apiId=window.sketchfabAPIinstances.length.toString(),this._target.id&&(this._apiId+="_"+this._target.id),this._target.allow||(this._target.allow="vr; autoplay; fullscreen"),this._client=void 0,this._options=void 0,this._domain="sketchfab.com",this._domain="same-as-current"===this._domain?window.location.hostname:this._domain,this._urlTemplate="https://YYYY/models/XXXX/embed",this._url=this._urlTemplate.replace("YYYY",this._domain),this._transmitOptions={},this._getURLOptions()};u.prototype={_urlOptionsDict:{skfb_api_version:{default:"1.5.2",type:"string"}},_optionsLoaded:function(t){this._urlOptions=t,this._version=this._getURLOption("skfb_api_version",this._version)},_getURLOption:function(t,e){var n=this._urlOptionsDict[t];if(!n)return e;null!=e||(e=n.default);var o=this._urlOptions[t];return o&&o.length?o[0]:e},_getURLOptions:function(){if(!window||!window.location.search)return this._optionsLoaded({});var t=c(window.location.search);for(var e in t)e.startsWith("skfb_")&&(this._transmitOptions[e.substr(5)]=t[e]);return this._optionsLoaded(t)},getEmbedURL:function(t,e){var n=this._url+"?api_version="+this._version+"&api_id="+this._apiId;e&&Object.keys(e).forEach((function(t){null!=e[t]&&"function"!=typeof e[t]&&(n+="&"+t.toString()+"="+e[t].toString())}));var o=this._transmitOptions;return Object.keys(this._transmitOptions).forEach((function(t){n+="&"+t.toString()+"="+o[t].toString()})),n.replace("XXXX",t)},init:function(t,e){this._options=e,this._uid=t,this._realInit()},reload:function(t){var e=document.createElement("script");e.setAttribute("src","https://static."+t+"/api/sketchfab-viewer-"+this._version+".js"),e.addEventListener("load",function(){this._url=this._urlTemplate.replace("YYYY",t),-1!==this._domain.indexOf("sketchfab.com")&&(this._transmitOptions.hook_prod=1,this._transmitOptions.model=this._uid),this._realInit()}.bind(this)),document.body.appendChild(e)},_initializeAPIEmbed:function(t){if(t.data&&t.data.instanceId&&this._apiId===t.data.instanceId&&"api.ready"===t.data.type){var e=t.data.options;if(e&&e.domain)this.reload(e.domain);else{if(void 0!==t.data.error)return this.error(t.data.error),void window.removeEventListener("message",this._initializeAPIEmbedBinded);var n=this._target.src.split("/");n="https://"+n[2],this._client=new window.SketchfabAPIClient(this._target.contentWindow,this._apiId,n),this._client.use(this._version,function(t,e){if(t)throw t;this.success.call(this,e)}.bind(this)),window.removeEventListener("message",this._initializeAPIEmbedBinded)}}},_realInit:function(){this._initializeAPIEmbedBinded=this._initializeAPIEmbed.bind(this),window.addEventListener("message",this._initializeAPIEmbedBinded),this._target.src=this.getEmbedURL(this._uid,this._options)},success:function(t){this._options.success&&"function"==typeof this._options.success&&this._options.success(t)},error:function(t){this._options.error&&"function"==typeof this._options.error&&this._options.error(t)}},e.default=u}]).default},470:function(t,e){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},471:function(t,e,n){t.exports=function(t,e){var n=o(t[0],t[1],t[2]),a=o(e[0],e[1],e[2]);i(n,n),i(a,a);var s=r(n,a);return s>1?0:Math.acos(s)};var o=n(281),i=n(282),r=n(283)},472:function(t,e){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},473:function(t,e){t.exports=function(t,e,n,o){return t[0]=e,t[1]=n,t[2]=o,t}},474:function(t,e,n){t.exports=function(t,e){var n=t[0],i=t[1],r=t[2],a=e[0],s=e[1],c=e[2];return Math.abs(n-a)<=o*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=o*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(r-c)<=o*Math.max(1,Math.abs(r),Math.abs(c))};var o=n(279)},475:function(t,e){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},476:function(t,e){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}},477:function(t,e,n){t.exports=n(284)},478:function(t,e,n){t.exports=n(285)},479:function(t,e,n){t.exports=n(286)},480:function(t,e){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}},481:function(t,e){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}},482:function(t,e){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},483:function(t,e){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},484:function(t,e){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},485:function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}},486:function(t,e){t.exports=function(t,e,n,o){return t[0]=e[0]+n[0]*o,t[1]=e[1]+n[1]*o,t[2]=e[2]+n[2]*o,t}},487:function(t,e,n){t.exports=n(287)},488:function(t,e,n){t.exports=n(288)},489:function(t,e,n){t.exports=n(289)},490:function(t,e,n){t.exports=n(290)},491:function(t,e){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},492:function(t,e){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},493:function(t,e){t.exports=function(t,e,n){var o=e[0],i=e[1],r=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-r*s,t[1]=r*a-o*c,t[2]=o*s-i*a,t}},494:function(t,e){t.exports=function(t,e,n,o){var i=e[0],r=e[1],a=e[2];return t[0]=i+o*(n[0]-i),t[1]=r+o*(n[1]-r),t[2]=a+o*(n[2]-a),t}},495:function(t,e){t.exports=function(t,e){e=e||1;var n=2*Math.random()*Math.PI,o=2*Math.random()-1,i=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=o*e,t}},496:function(t,e){t.exports=function(t,e,n){var o=e[0],i=e[1],r=e[2],a=n[3]*o+n[7]*i+n[11]*r+n[15];return a=a||1,t[0]=(n[0]*o+n[4]*i+n[8]*r+n[12])/a,t[1]=(n[1]*o+n[5]*i+n[9]*r+n[13])/a,t[2]=(n[2]*o+n[6]*i+n[10]*r+n[14])/a,t}},497:function(t,e){t.exports=function(t,e,n){var o=e[0],i=e[1],r=e[2];return t[0]=o*n[0]+i*n[3]+r*n[6],t[1]=o*n[1]+i*n[4]+r*n[7],t[2]=o*n[2]+i*n[5]+r*n[8],t}},498:function(t,e){t.exports=function(t,e,n){var o=e[0],i=e[1],r=e[2],a=n[0],s=n[1],c=n[2],u=n[3],d=u*o+s*r-c*i,l=u*i+c*o-a*r,f=u*r+a*i-s*o,p=-a*o-s*i-c*r;return t[0]=d*u+p*-a+l*-c-f*-s,t[1]=l*u+p*-s+f*-a-d*-c,t[2]=f*u+p*-c+d*-s-l*-a,t}},499:function(t,e){t.exports=function(t,e,n,o){var i=n[1],r=n[2],a=e[1]-i,s=e[2]-r,c=Math.sin(o),u=Math.cos(o);return t[0]=e[0],t[1]=i+a*u-s*c,t[2]=r+a*c+s*u,t}},500:function(t,e){t.exports=function(t,e,n,o){var i=n[0],r=n[2],a=e[0]-i,s=e[2]-r,c=Math.sin(o),u=Math.cos(o);return t[0]=i+s*c+a*u,t[1]=e[1],t[2]=r+s*u-a*c,t}},501:function(t,e){t.exports=function(t,e,n,o){var i=n[0],r=n[1],a=e[0]-i,s=e[1]-r,c=Math.sin(o),u=Math.cos(o);return t[0]=i+a*u-s*c,t[1]=r+a*c+s*u,t[2]=e[2],t}},502:function(t,e,n){t.exports=function(t,e,n,i,r,a){var s,c;e||(e=3);n||(n=0);c=i?Math.min(i*e+n,t.length):t.length;for(s=n;sAxmTYklsjo190QW',o=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return o.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},o.prototype.load=function(){var t,o=new Date,i=this,r=i.serif,a=i.sansSerif,s=i.parent,c=i.appended,u=i.options,d=u.reference;function l(t){return e.concat(["font-weight:"+u.weight,"font-style:"+u.style]).concat("font-family:"+t).join(";")}var f=n.replace(/\%s/,l("sans-serif")),p=n.replace(/\%s/,l("serif"));function h(t,e,n){return Math.abs(t.width-e.offsetWidth)>n||Math.abs(t.height-e.offsetHeight)>n}s||(s=i.parent=u.window.document.createElement("div")),s.innerHTML=f+p,a=i.sansSerif=s.firstChild,r=i.serif=a.nextSibling,u.glyphs&&(a.innerHTML+=u.glyphs,r.innerHTML+=u.glyphs),function e(){d||(d=u.window.document.body),!c&&d&&(d.appendChild(s),c=i.appended=!0,t=i.getMeasurements(),a.style.fontFamily=i.fontFamily+", sans-serif",r.style.fontFamily=i.fontFamily+", serif"),c&&t&&(h(t.sansSerif,a,u.tolerance)||h(t.serif,r,u.tolerance))?u.success():(new Date).getTime()-o.getTime()>u.timeout?u.error():!c&&"requestAnimationFrame"in u.window?u.window.requestAnimationFrame(e):u.window.setTimeout(e,u.delay)}()},o.prototype.cleanFamilyName=function(t){return t.replace(/[\'\"]/g,"").toLowerCase()},o.prototype.cleanWeight=function(t){return""+({normal:"400",bold:"700"}[t]||t)},o.prototype.checkFontFaces=function(t){var e=this;e.options.window.document.fonts.forEach((function(n){e.cleanFamilyName(n.family)===e.cleanFamilyName(e.fontFamily)&&e.cleanWeight(n.weight)===e.cleanWeight(e.options.weight)&&n.style===e.options.style&&n.load().then((function(){e.options.success(n),e.options.window.clearTimeout(t)}))}))},o.prototype.init=function(e,n){var o;for(var i in t)n.hasOwnProperty(i)||(n[i]=t[i]);this.options=n,this.fontFamily=e,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(o=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(o)):this.load()},function(t,e){var n=new o;return n.init(t,e),n}})?o.apply(e,i):o)||(t.exports=r)}()},874:function(t,e,n){"use strict";n.r(e);var o={};n.r(o),n.d(o,"viewer3D",(function(){return l}));var i=n(2),r=n(371),a=n.n(r),s=n(182),c=n.n(s),u=function(t,e){var n,o=t,i=e,r=!1,a=0;function s(){r=!1;var t=o,n=Math.max(document.documentElement.clientHeight,window.innerHeight||0),s=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,c=document.body.getBoundingClientRect(),u=t.getBoundingClientRect(),d=s+n/2,l=u.top-c.top,f=u.top-c.top+u.height;a=100*(d-l)/(f-l),i&&e(a)}function c(){r||requestAnimationFrame(n),r=!0}!function(){window.addEventListener("scroll",c,!1),n=s.bind(this),c()}()},d=function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},l=function(t){var e=t,n=e.querySelector("iframe"),o=e.querySelector(".m-viewer-3d__hotspots"),r=e.querySelector(".m-viewer-3d__annotation"),s=e.querySelector(".m-viewer-3d__tools"),l=e.querySelector(".m-viewer-3d__fullscreen"),f=e.querySelector(".m-viewer-3d__zoom-in"),p=e.querySelector(".m-viewer-3d__zoom-out"),h=e.querySelector(".m-viewer-3d__overlay"),m=r.querySelector(".m-viewer-3d__annotation__close"),v=JSON.parse(e.dataset.hideannot),y=JSON.parse(e.dataset.hideannottitle),g=JSON.parse(e.dataset.cc),b=(JSON.parse(e.dataset.guided),e.dataset.uid),_=e.dataset.type,w=e.dataset.title,x=JSON.parse(e.dataset.annotations),E="modal"!=_&&"standalone"!=_,L="modal"==_||"standalone"==_,M=("article"!=_?x:[]).map((function(t){return{position3d:t.position,position2d:null,eye:t.eye,distance:null,title:t.name,description:t.content.raw}})),S=null,O=null,q=null,A=null,C=null,T=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen,I=new a.a(n),k=null,F=null;function R(){F&&k&&q&&"modal"!=_&&"standalone"!=_&&F.setCameraLookAt(q,k.target,0),M.forEach(P),requestAnimationFrame(j)}var P=function(t,e){F.getWorldToScreenCoordinates(t.position3d,function(n){if(t.position2d=n.canvasCoord,S){var o="translate("+n.canvasCoord[0]+"px, "+n.canvasCoord[1]+"px)";S[e].style.transform=o}}.bind(this))}.bind(this),j=R.bind(this),N=function(t){for(var e,n=null,o=1/0,i=0,r=M.length;i '})).join(""),o.innerHTML=n,S=Array.from(o.querySelectorAll(".a-hotspot")),document.addEventListener("keyup",B),F.setCameraEasing("easeLinear"),F.getCameraLookAt(function(t,n){k=n,function(){q=c.a.fromValues(k.position[0],k.position[1],k.position[2]),A=c.a.fromValues(k.target[0],k.target[1],k.target[2]),C=c.a.clone(q);var t=[];x.length;if("article"==_)var n=e.parentNode;if(x.forEach((function(e,o){var i,r=document.createElement("div");if("article"==_){var a=document.createElement("div");a.classList.add("m-media--3d-tour__sep"),a.setAttribute("data-hotspot",o),r.innerHTML=y?''+e.content.raw+"
":''+e.name+" "+e.content.raw+"
",n.appendChild(a),n.appendChild(r)}i=0==o?[C,x[o].eye]:[x[o-1].eye,x[o].eye],t.push(i)})),"article"==_){e.parentNode.querySelectorAll(".m-media--3d-tour__sep").forEach((function(e,n){new u(e,(function(e){if(q&&e>0&&e<100){var o=Math.min(100,1.5*e);q[0]=t[n][0][0]+(t[n][1][0]-t[n][0][0])/100*o,q[1]=t[n][0][1]+(t[n][1][1]-t[n][0][1])/100*o,q[2]=t[n][0][2]+(t[n][1][2]-t[n][0][2])/100*o}}))})),Object(i.r)(document,"module3d:loaded")}}()}.bind(this)),s&&s.classList.add("is-visible"),m&&m.addEventListener("click",Y.bind(this,2)),l&&g&&T&&(l.addEventListener("click",H.bind(this,2)),document.addEventListener("fullscreenchange",U),document.addEventListener("webkitfullscreenchange",U),document.addEventListener("mozfullscreenchange",U),document.addEventListener("MSFullscreenChange",U));L&&(F.zoom=function(t,e){F.getCameraLookAt((function(n,o){if(!n){var i,r,a=o.position,s=a[0],c=a[1],u=a[2],d=o.target,l=Math.sqrt(s*s+c*c+u*u);if(.1===l||l===1/0)return;(l*=t)<.1&&t<1?l=.1:l>1/0&&t>1&&(l=1/0),i=Math.atan2(c,s),r=Math.atan2(Math.sqrt(s*s+c*c),u),s=l*Math.sin(r)*Math.cos(i),c=l*Math.sin(r)*Math.sin(i),u=l*Math.cos(r),F.setCameraLookAt([s,c,u],d,e)}}))},f.addEventListener("click",(function(){F.zoom(.5,.2)})),p.addEventListener("click",(function(){F.zoom(1.5,.2)})))}.bind(this)),t.addEventListener("click",N)}.bind(this),error:function(){}}),g&&T||!l||l.remove(),L||(f&&f.remove(),p&&p.remove()),v&&e.parentNode.classList.add("no-annotations"),"standalone"==_&&(e.classList.add("has-overlay"),Object(i.r)(document,"gtm:push",{event:"3D-tap-start",eventCategory:"in-page",eventAction:w}),h&&h.addEventListener("click",D.bind(this,2)))}function H(){g&&T&&(document.fullscreenElement?(l.classList.remove("is-active"),document.exitFullscreen()):(l.classList.add("is-active"),T.call(e)))}function U(){!document.fullscreenElement&&l&&l.classList.remove("is-active")}function D(){e.classList.remove("has-overlay"),h&&h.removeEventListener("click",D.bind(this,2))}function Y(){O=null,W()}function W(){null!==o.querySelector(".a-hotspot--selected")&&o.querySelector(".a-hotspot--selected").classList.remove("a-hotspot--selected"),null!==O?(r.querySelector(".m-viewer-3d__annotation__content").innerHTML=''+M[O].title+"
"+M[O].description,-1===r.className.indexOf(" is-visible")&&(r.className+=" is-visible"),"modal"!=_&&"standalone"!=_||F.setCameraLookAt(M[O].eye,M[O].position3d,.6),S[O].classList.add("a-hotspot--selected"),r.querySelector(".m-viewer-3d__annotation__close").tabIndex=0,r.querySelector(".m-viewer-3d__annotation__close").focus(),Object(i.r)(document,"gtm:push",{event:"3D-tap-hotspot",eventCategory:"in-page",eventAction:w+" - "+O})):(r.className=r.className.replace(" is-visible",""),r.querySelector(".m-viewer-3d__annotation__close").tabIndex=-1,setTimeout((function(){r.querySelector(".m-viewer-3d__annotation__content").innerHTML=""}),400),"modal"!=_&&"standalone"!=_||F.setCameraLookAt(C,A,.6))}function B(t){!t.target.matches(".a-hotspot__point")||13!=t.keyCode&&32!=t.keyCode||(O=parseInt(t.target.parentNode.dataset.id),W())}this.destroy=function(){apiVar&&apiVar.removeEventListener("click",N),m&&m.removeEventListener("click",Y.bind(this,2)),h&&h.removeEventListener("click",D.bind(this,2)),l&&g&&T&&(l.removeEventListener("click",H.bind(this,2)),document.removeEventListener("fullscreenchange",U),document.removeEventListener("webkitfullscreenchange",U),document.removeEventListener("mozfullscreenchange",U),document.removeEventListener("MSFullscreenChange",U)),document.removeEventListener("keyup",B),A17.Helpers.purgeProperties(this)},this.init=function(){z()}};document.addEventListener("DOMContentLoaded",(function(){Object(i.l)(o)}))}});
+//# sourceMappingURL=blocks3D.js.map
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/scripts/collectionSearch.js b/docs/.vuepress/public/assets/scripts/collectionSearch.js
new file mode 100644
index 000000000..b4ed4ab0d
--- /dev/null
+++ b/docs/.vuepress/public/assets/scripts/collectionSearch.js
@@ -0,0 +1,17 @@
+!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/scripts/",n(n.s=869)}({157:function(e,t,n){"use strict";var o=n(2),r=n(187),i=n.n(r);t.a=function(e){if("object"!==(typeof e).toLowerCase())return!1;var t=0,n=e.variants.length,r="A17_fonts_cookie_"+e.name,a=o.b.read(r)||"";function s(){if(++t>=n){o.b.create(r,n,1);var i="s-"+e.name+"-loaded",a=document.documentElement;a.classList.contains(i)||(a.classList.add(i),Object(o.r)(document,"content:populated"))}}if(a&&a===n.toString())t=a,s();else for(var c=0;cAxmTYklsjo190QW',o=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return o.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},o.prototype.load=function(){var e,o=new Date,r=this,i=r.serif,a=r.sansSerif,s=r.parent,c=r.appended,l=r.options,u=l.reference;function d(e){return t.concat(["font-weight:"+l.weight,"font-style:"+l.style]).concat("font-family:"+e).join(";")}var m=n.replace(/\%s/,d("sans-serif")),f=n.replace(/\%s/,d("serif"));function p(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=r.parent=l.window.document.createElement("div")),s.innerHTML=m+f,a=r.sansSerif=s.firstChild,i=r.serif=a.nextSibling,l.glyphs&&(a.innerHTML+=l.glyphs,i.innerHTML+=l.glyphs),function t(){u||(u=l.window.document.body),!c&&u&&(u.appendChild(s),c=r.appended=!0,e=r.getMeasurements(),a.style.fontFamily=r.fontFamily+", sans-serif",i.style.fontFamily=r.fontFamily+", serif"),c&&e&&(p(e.sansSerif,a,l.tolerance)||p(e.serif,i,l.tolerance))?l.success():(new Date).getTime()-o.getTime()>l.timeout?l.error():!c&&"requestAnimationFrame"in l.window?l.window.requestAnimationFrame(t):l.window.setTimeout(t,l.delay)}()},o.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},o.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},o.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},o.prototype.init=function(t,n){var o;for(var r in e)n.hasOwnProperty(r)||(n[r]=e[r]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(o=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(o)):this.load()},function(e,t){var n=new o;return n.init(e,t),n}})?o.apply(t,r):o)||(e.exports=i)}()},2:function(e,t,n){"use strict";var o={toObject:function(e){if("string"!=typeof e)return{};var t={};return(e&&e.indexOf("?")>-1?e.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(e,n,o,r){t[n]=r})),t},fromObject:function(e){var t="",n=0;if(Object.getOwnPropertyNames(e).length>0)for(var o in t="?",e)e.hasOwnProperty(o)&&(t+=(n>0?"&":"")+o+"="+encodeURIComponent(e[o]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),n++);return t},updateParameter:function(e,t,n){var o=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");if(e.match(o))return e.replace(o,"$1"+t+"="+n+"$2");var r="";-1!==e.indexOf("#")&&(r=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));var i=-1!==e.indexOf("?")?"&":"?";return e+i+t+"="+n+r}},r=function(e){var t=e,n=new XMLHttpRequest,r=t.url;if(t.queryString="",void 0!==t.data){if(!o.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=o.fromObject(t.data)}if("POST"!==t.type&&(r+=r.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),n.open(t.type,r,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var i=0;i=200&&n.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,n.responseText,n.status):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status)},n.send("POST"===t.type?t.queryString.replace("?",""):"")},i={create:function(e,t,n){var o="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),o="; expires="+r.toGMTString()}document.cookie=e+"="+t+o+"; path=/"},delete:function(e){e&&this.create(e,"",-1)},read:function(e){if(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o]*>?/g,""));return t.appendChild(n),encodeURIComponent(t.textContent)}return""},c=function(e,t,n){var o=document.createEvent("HTMLEvents");o.initEvent(t,!0,!0),o.data=n||{},o.eventName=t,e.dispatchEvent(o)},l=(n(64),function(e,t,n){for(var o=0;o0&&(o--,r.unobserve(n.target),n.target.addEventListener("load",l,!1),u(n.target))}}function m(){var e,f,p;if("really-old"===i){for(o=s.length,e=0;e0&&p.right>0&&p.left<(window.innerWidth||document.documentElement.clientWidth)&&p.top<(window.innerHeight||document.documentElement.clientHeight))){var h=s[e];s[e]=void 0,h.lazyloaded=!0,h.addEventListener("load",l,!1),u(h)}for(e=0;e0&&(n++,t=window.requestAnimationFrame(m))}else if("new"===i)for(r=new IntersectionObserver(d,{rootMargin:a.rootMargin,threshold:a.threshold}),o=s.length,e=0;e=0;i--)t.options[i].selected&&(n[t.name]=t.options[i].value);else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(n[t.name]=t.value);return n},v=function(){var e,t=u();window.addEventListener("resize",(function(){clearTimeout(e),e=setTimeout((function(){var e=u();c(document,"resized"),e!==t&&(t=e,window.A17&&(window.A17.currentMediaQuery=e),c(document,"mediaQueryUpdated"))}),250)}))},y=function(e){var t,n={el:document,offset:0,duration:250,easing:"linear"},o=Date.now(),r=0,i=!1,a={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},s=window.requestAnimationFrame;for(var c in e)void 0!==e[c]&&(n[c]=e[c]);function l(){if(i&&0===r)document.documentElement.scrollTop=1,document.body.scrollTop=1,r=1,n.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(l);else{var e=Date.now(),c=(m=1,f=(e-o)/n.duration,m-1&&m(),r.indexOf("center")>-1&&(m(),l+=a.width/2-s.width/2-o.left),r.indexOf("right")>-1&&f()):m(),r.indexOf("top")>-1?u=a.top+c-o.top-s.height:d(),c>u&&d(),"auto"!==o.left&&(l+s.width>window.innerWidth?f():l-1&&(Object(r.r)(document,"setScrollDirection:machineScroll",{machineScroll:!0}),t=!0,e=window.pageYOffset,document.getElementById("a17").style.top=-1*e+"px",window.requestAnimationFrame((function(){document.documentElement.classList.add("s-body-locked")})))}),!1),document.addEventListener("body:unlock",(function(){t&&(t=!1,document.getElementById("a17").style.top="",document.documentElement.classList.remove("s-body-locked"),window.scrollTo(0,e),setTimeout((function(){window.scrollTo(0,e),e=0,Object(r.r)(document,"setScrollDirection:machineScroll",{machineScroll:!1})}),1))}),!1)},a=function(){var e;function t(){e?document.activeElement===e||e.contains(document.activeElement)||setTimeout((function(){Object(r.q)(e)}),0):document.removeEventListener("focus",n)}function n(n){try{document.removeEventListener("focus",t)}catch(e){}(n||n.data.element)&&(e=n.data.element,document.addEventListener("focus",t,!0))}document.addEventListener("focus:trap",n,!1),document.addEventListener("focus:untrap",(function(){document.removeEventListener("focus",n),e=null}),!1)},s=function(){var e,t="data-focus-method",n="touch",o="mouse",r="key",i=!1;document.addEventListener("keydown",(function(){i=r}),!0),document.addEventListener("mousedown",(function(){i!==n&&(i=o)}),!0),document.addEventListener("touchstart",(function(){i=n}),!0),document.addEventListener("focus",(function(n){i||(i=e),n.target&&"function"==typeof n.target.setAttribute&&(n.target.setAttribute(t,i),e=i,i=!1)}),!0),document.addEventListener("blur",(function(e){e.target&&"function"==typeof e.target.removeAttribute&&e.target.removeAttribute(t)}),!0),window.addEventListener("blur",(function(){i=!1}))},c=function(){window.history.pushState&&(document.addEventListener("history:replacestate",(function(e){"about:srcdoc"!==e.data.url&&history.replaceState(e.data,"",e.data.url)}),!1),document.addEventListener("history:pushstate",(function(e){history.pushState(e.data,"",e.data.url)}),!1),window.addEventListener("popstate",(function(e){e&&e.state&&e.state.type&&Object(r.r)(document,"ajax:pageload:popstate",e.state)}),!1),Object(r.r)(document,"history:replacestate",{url:location.href,type:"page"}))},l=function(){var e,t,n=!1,o=5e3;function i(){window.picturefill&&window.picturefill(),window.requestAnimationFrame((function(){Object(r.r)(document,"page:updated"),Object(r.r)(document,"loader:complete"),Object(r.r)(document,"ajaxPageLoadMask:hide"),Object(r.r)(document,"ajaxPageLoad:complete"),Object(r.r)(document,"setScrollDirection:machineScroll",{machineScroll:!1})})),n=!1}function a(e,n){document.documentElement.classList.add("s-page-nav-swapping"),setTimeout((function(){var t=document.querySelector("#a17");t.innerHTML=n.querySelector("#a17").innerHTML,t.style.minHeight="",function(e){if(e.documentElement.classList.contains("s-unsticky-header")?document.documentElement.classList.add("s-unsticky-header"):document.documentElement.classList.remove("s-unsticky-header"),e.documentElement.classList.contains("s-contrast-header")?document.documentElement.classList.add("s-contrast-header"):document.documentElement.classList.remove("s-contrast-header"),e.documentElement.classList.contains("s-filled-logo")?document.documentElement.classList.add("s-filled-logo"):document.documentElement.classList.remove("s-filled-logo"),e.documentElement.classList.contains("s-gallery-header")?document.documentElement.classList.add("s-gallery-header"):document.documentElement.classList.remove("s-gallery-header"),e.documentElement.classList.contains("s-roadblock-defined")){var t=e.querySelector(".g-modal--promo");t&&(Array.prototype.forEach.call(t,(function(e){var t=e.cloneNode(!0);document.body.append(t)})),document.documentElement.classList.add("s-roadblock-defined"))}else document.documentElement.classList.remove("s-roadblock-defined");var n=/p-\S*/g,o=document.documentElement.className.match(n),i=e.documentElement.className.match(n);Object(r.f)(o,(function(e,t){document.documentElement.classList.remove(t)})),Object(r.f)(i,(function(e,t){document.documentElement.classList.add(t)}))}(n),window.requestAnimationFrame((function(){var t=0,n=null;e.popstate&&e.popstate.data.scrollY?t=e.popstate.data.scrollY:window.location.hash?n=document.getElementById(window.location.hash.replace("#","")):e.ajaxScrollTarget&&(n=document.getElementById(e.ajaxScrollTarget)),n&&(t=Math.round(Object(r.i)(n).top)),document.documentElement.scrollTop=t,document.body.scrollTop=t,document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),Object(r.r)(document,"page:updated"),n&&setTimeout((function(){Object(r.q)(n)}),0),i()}))}),1),t=n.title,document.title=t,e.popstate||Object(r.r)(document,"history:pushstate",{url:e.href,type:e.type,title:t}),A17.currentPathname=window.location.pathname,Object(r.r)(document,"gtm:push",{event:"Pageview",url:e.href})}function s(s){if(!A17.ajaxLinksActive)return window.location.href=s.href,!1;if(!n){switch(n=!0,Object(r.r)(document,"shareMenu:close"),Object(r.r)(document,"selectDate:close"),Object(r.r)(document,"fullScreenImage:close"),Object(r.r)(document,"collectionSearch:close"),Object(r.r)(document,"infoButtonInfo:close"),Object(r.r)(document,"stickySidebar:clean"),Object(r.r)(document,"modal:close"),Object(r.r)(document,"roadblock:close"),Object(r.r)(document,"globalSearch:close"),Object(r.r)(document,"navMobile:close"),Object(r.r)(document,"dropdown:close"),t=null,null,null,Object(r.r)(document,"ajaxPageLoadMask:show"),Object(r.r)(document,"loader:start"),s.type){case"tab":document.documentElement.classList.add("s-page-nav");break;case"modal":break;default:(c=document.querySelector("#a17")).style.minHeight=c.offsetHeight+"px",document.documentElement.classList.add("s-page-nav")}var c,l=document.querySelector('meta[name="csrf-token"]');l=l?l.getAttribute("content"):"",k({url:s.href,type:"GET",requestHeaders:[{header:"X-CSRF-Token",value:l}],onSuccess:function(t,o,c){try{clearTimeout(e)}catch(e){}try{s.href=c,Object(r.r)(document,"setScrollDirection:machineScroll",{machineScroll:!0});var l=O(t,"native");switch(s.type){case"tab":!function(e,t){var n=document.getElementById(e.ajaxTabTarget);n.innerHTML=t.getElementById(e.ajaxTabTarget).innerHTML;var o=Math.round(Object(r.i)(n).top);Object(r.p)({el:document,offset:o,duration:500,easing:"easeInOut",onComplete:function(){setTimeout((function(){Object(r.q)(n)}),0)}}),document.documentElement.classList.remove("s-page-nav"),Object(r.r)(document,"page:updated"),Object(r.r)(document,"gtm:push",{event:"Pageview",url:e.href}),i()}(s,l);break;case"modal":!function(e,t){document.querySelector("[data-modal]").className="g-modal "+(e.modalClass?e.modalClass:""),document.querySelector("[data-modal-content]").innerHTML=t.querySelector("body").innerHTML,Object(r.r)(document,"modal:show",{opener:e.opener}),i()}(s,l);break;default:a(s,l)}}catch(e){Object(r.r)(document,"loader:error"),Object(r.r)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),n=!1,A17.ajaxLinksFailSafe?location.href=s.href:console.log(e)}},onError:function(t){clearTimeout(e),Object(r.r)(document,"loader:error"),Object(r.r)(document,"ajaxPageLoadMask:hide"),document.documentElement.classList.remove("s-page-nav"),document.documentElement.classList.remove("s-page-nav-swapping"),n=!1,A17.ajaxLinksFailSafe?location.href=s.href:console.log(t)}}),e=setTimeout((function(){A17.ajaxLinksFailSafe?location.href=s.href:console.log("Ajax response taking a long time to complete")}),o)}}function c(e,t,n){(t&&Object(r.r)(document,"gtm:push",t),n&&e&&"_blank"!==e.getAttribute("target")&&e.href&&e.href.indexOf("#")<0&&e.href.indexOf("interactive-features")<0&&window.location.href.indexOf("interactive-features")<0&&e.href.indexOf("articles")<0&&e.href.indexOf("artworks")<0&&e.href.indexOf("digital-publications")<0&&e.href.indexOf("exhibitions")<0&&e.href.indexOf("highlights")<0&&e.href.indexOf("artinstitutereview")<0&&e.href.indexOf("videos")<0&&e.href.indexOf("virtual-tours")<0&&e.href.indexOf("collection")<0&&e.href.indexOf("events")<0&&window.location.href.indexOf("articles")<0&&window.location.href.indexOf("artworks")<0&&window.location.href.indexOf("digital-publications")<0&&window.location.href.indexOf("exhibitions")<0&&window.location.href.indexOf("highlights")<0&&window.location.href.indexOf("artinstitutereview")<0&&window.location.href.indexOf("videos")<0&&window.location.href.indexOf("virtual-tours")<0&&window.location.href.indexOf("collection")<0&&window.location.href.indexOf("events")<0)&&(n.preventDefault(),window.open(e.href,"_blank").focus())}document.addEventListener("ajax:getPage",(function(e){e.data.url&&(f(e.data.url,e)?(history.state||e.data.type&&(!e.data.type||"modal"===e.data.type)||Object(r.r)(document,"history:replacestate",{url:location.href,type:e.data.type||"page",scrollY:window.scrollY||0}),s({href:e.data.url,type:e.data.type||"page",popstate:!1,modalClass:e.data.modalClass?e.data.modalClass:null,opener:e.data.opener?e.data.opener:null,ajaxScrollTarget:e.data.ajaxScrollTarget?e.data.ajaxScrollTarget:null})):window.location.href=e.data.url)})),document.addEventListener("ajax:pageload:popstate",(function(e){A17.currentPathname===window.location.pathname||e.data.type&&"page"!==e.data.type||(e.preventDefault(),s({href:e.data.url,type:e.data.type,title:e.data.title,popstate:e}))})),document.addEventListener("click",(function(e){var t=d(e.target,"A"),o=S(t);if(A17.ajaxLinksActive){var i=m(t,e);if(i){if(e.preventDefault(),!n){t.classList.contains("checkbox")&&(t.classList.contains("s-checked")?t.classList.remove("s-checked"):t.classList.add("s-checked")),o&&Object(r.r)(document,"gtm:push",o);var a=t.getAttribute("data-ajax-tab-target"),l=t.getAttribute("data-ajax-scroll-target"),u=null;null!==a&&null!==l&&(a=null),null!==a&&((u=document.getElementById(a))||(l=a,a=null)),u||Object(r.r)(document,"history:replacestate",{url:location.href,type:"page",scrollY:window.scrollY||0}),s({href:i.href,type:a?"tab":"page",popstate:!1,link:t,ajaxTabTarget:a||null,ajaxScrollTarget:l||null})}}else c(t,o,e)}else c(t,o,e)}))},u=function(){var e=!1;document.addEventListener("ajaxPageLoadMask:show",(function(){e||(e=!0,document.documentElement.classList.add("s-ajaxPageLoadMask-active"))}),!1),document.addEventListener("ajaxPageLoadMask:hide",(function(){e&&(e=!1,document.documentElement.classList.remove("s-ajaxPageLoadMask-active"))}),!1)},d=function(e,t){for(;e&&e.tagName!==t;)e=e.parentElement;return e},m=function(e,t){if(!e||!t)return!1;var n=e,o=n.href;return"A"===e.tagName&&(!!f(o,t)&&(!n.hasAttribute("data-no-ajax")&&!n.hasAttribute("download")&&((!n.target||"_blank"===n.target)&&(!(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)&&{href:o,el:n}))))},f=function(e,t){if(!e||"#"===e)return!1;var n=document.createElement("a");if(n.href=e,window.location.protocol!==n.protocol||window.location.hostname!==n.hostname)return!1;var o=t.target;if("A"!==o.tagName){if(o===document)return!0;o=o.closest("a")}return null!==o&&((o.host!==window.location.host||o.pathname!==window.location.pathname||!o.hash)&&(o.host===window.location.host&&o.pathname===window.location.pathname))},p=function(){var e,t=null,n=null,o=0;function r(){o+=.2*(90-o),n.style.width=o+"%",e=setTimeout(r,2e3*Math.random())}function i(){document.body.removeChild(t),t=null,n=null,o=0}document.addEventListener("loader:start",(function(){t&&i(),(t=document.createElement("span")).className="progress-bar",(n=document.createElement("span")).style.opacity=0,t.appendChild(n),document.body.appendChild(t),setTimeout((function(){n.style.opacity=1})),e=setTimeout((function(){o+=.4*(90-o),n.style.width=o+"%",r()}),250)})),document.addEventListener("loader:complete",(function(){try{clearTimeout(e)}catch(e){}n.style.width="100%",setTimeout(i,250)})),document.addEventListener("loader:error",(function(){try{clearTimeout(e)}catch(e){}n.style.width="0%",setTimeout(i,250)}))},h=function(){var e=document.documentElement,t=0,n=!1,o=!1,i=!1,a=!1,s=0,c=-1,l={25:{pos:0,hit:!1},50:{pos:0,hit:!1},75:{pos:0,hit:!1},100:{pos:0,hit:!1}};document.addEventListener("setScrollDirection:machineScroll",(function(e){window.requestAnimationFrame((function(){t=-1,a=e.data.machineScroll}))}),!1),document.addEventListener("page:updated",(function(e){c=-1}),!1),function u(){var d=document.documentElement.scrollTop||document.body.scrollTop;if(s=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight,c!=s&&(c=s,function(){for(var e in l){var t=100===e?(e-5)/100:e/100;l[e].pos=parseInt(s*t,10),l[e].hit=!1}}()),d===t||a)t=d;else{if(s>150)for(var m in l)d>=l[m].pos&&!l[m].hit&&(l[m].hit=!0,-1===window.location.href.indexOf("/interactive-features")&&Object(r.r)(document,"gtm:push",{event:(e.classList.contains("p-artworks-show")?"artwork-":"")+m+"%",eventCategory:"scroll-tracking"}));d>100&&!o?e.classList.contains("s-unsticky-header")||(e.classList.add("s-header-hide"),o=!0):d<=100&&o&&(e.classList.remove("s-header-hide"),o=!1),d>500&&!i?(e.classList.add("s-allow-top-link"),i=!0):d<=500&&i&&(e.classList.remove("s-allow-top-link"),i=!1),d>t+10&&"down"!==n?(n="down",e.classList.remove("s-scroll-direction-up"),e.classList.add("s-scroll-direction-down")):d-1&&(i=r.n.updateParameter(i,"enablejsapi","1"),i=r.n.updateParameter(i,"origin",window.location.origin)),o.src=i,t.querySelector("[data-modal-content]").innerHTML="",t.querySelector("[data-modal-content]").appendChild(o),i.indexOf("youtube.com")>-1&&L(o)}catch(e){console.log(e),t.querySelector("[data-modal-content]").innerHTML=n}return!0}return!1}(i)}n&&(Object(r.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add(e),setTimeout((function(){Object(r.q)(t)}),0),Object(r.r)(document,"focus:trap",{element:t}),Object(r.r)(document,"page:updated")})))}}),!1),window.addEventListener("resized",(function(){n&&(console.log("resized"),t.style.display="none",window.requestAnimationFrame((function(){t.style.display=""})))}),!1),window.addEventListener("keyup",(function(t){document.documentElement.classList.contains(e)&&27===t.keyCode&&Object(r.r)(document,"modal:close")}),!1)},b=function(e){return"all"===e||(e===A17.currentMediaQuery||("small+"===e&&A17.currentMediaQuery.indexOf("xsmall")<0||("medium+"===e&&A17.currentMediaQuery.indexOf("small")<0||("large+"===e&&A17.currentMediaQuery.indexOf("small")<0&&A17.currentMediaQuery.indexOf("medium")<0||("small-"===e&&A17.currentMediaQuery.indexOf("small")>=0||("medium-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery)||"large-"===e&&(A17.currentMediaQuery.indexOf("small")>=0||"medium"===A17.currentMediaQuery||"large"===A17.currentMediaQuery)))))))},w=function(e){var t,n,o=document.documentElement.classList.contains("s-collection-filters-active");document.addEventListener("collectionFilters:open",(function(){o||(o=!0,b("small-")?(n=window.scrollY,t=document.activeElement||document.querySelector("body"),Object(r.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add("s-collection-filters-active");var e=document.getElementById("collectionFilters");e&&(setTimeout((function(){Object(r.q)(e)}),0),Object(r.r)(document,"focus:trap",{element:e}))}))):document.documentElement.classList.add("s-collection-filters-active"))}),!1),document.addEventListener("collectionFilters:close",(function(){o&&(Object(r.r)(document,"body:unlock"),Object(r.r)(document,"focus:untrap"),setTimeout((function(){Object(r.q)(t),setTimeout((function(){window.scroll(0,n)}),0)}),0),document.documentElement.classList.remove("s-collection-filters-active"),o=!1)}),!1),document.addEventListener("collectionFilters:toggle",(function(){o?Object(r.r)(document,"collectionFilters:close"):Object(r.r)(document,"collectionFilters:open")}),!1),document.addEventListener("mediaQueryUpdated",(function(){o&&(Object(r.r)(document,"collectionFilters:close"),Object(r.r)(document,"collectionFilters:open"))}),!1)},E=function(e){var t=e&&e.icon?e.icon:null,n=e&&e.text?e.text:null,o=e&&e.type?"m-notification--"+e.type:null;if(n){var i="",a="";a=''.replace(/{{ text }}/gi,n),o&&(a=a.replace(/{{ type }}/gi,o)),t&&(i=' '.replace(/{{ icon }}/gi,e.icon),a=a.replace(/{{ icon }}/gi,i));var s=document.getElementById("content");s.insertAdjacentHTML("afterbegin",a),setTimeout((function(){Object(r.q)(s.firstChild)}),0),Object(r.r)(document,"page:updated")}},x=function(){document.addEventListener("gtm:push",(function(e){e.data&&(window.dataLayer=window.dataLayer||[],"Pageview"===e.data.event?window.dataLayer.push(e.data):(e.data.eventPageTitle=document.title.replace(/ \| The Art Institute of Chicago/gi,""),e.data.eventPagePathName=window.location.pathname,e.data.eventPageUrl=window.location.href,"production"!==A17.env&&console.log("gtm:dataLayerPush",e.data),window.dataLayer.push({event:"dataLayerPush",data:e.data})))}),!1)},S=function(e){if(!e||!e.dataset)return!1;var t=!1,n={};for(var o in e.dataset)if(e.dataset.hasOwnProperty(o)&&o.indexOf("gtm")>-1){var r=o.replace(/^gtm/,""),i=e.dataset[o];r=r.charAt(0).toLowerCase()+r.slice(1),"::document.title::"===i&&(i=document.title.replace(/ \| The Art Institute of Chicago/gi,"")),n[r]=i,t=!0}return!!t&&n},L=function(e){var t,n,o={25:!1,50:!1,75:!1,100:!1};function i(){var e=Math.round(t.getCurrentTime()/t.getDuration()*100);for(var n in o){e>=(100===n?99:n)&&!o[n]&&(o[n]=!0,Object(r.r)(document,"gtm:push",{event:n+"%",eventCategory:"video-engagement"}))}}function a(e){if(1===t.getPlayerState())n=setInterval(i,250),Object(r.r)(document,"gtm:push",{event:"playing",eventCategory:"video-engagement"});else{2===t.getPlayerState()&&Object(r.r)(document,"gtm:push",{event:"paused",eventCategory:"video-engagement"});try{clearInterval(n)}catch(e){}}}if(!document.getElementById("youtubeapijs")){var s=document.createElement("script");s.src="https://www.youtube.com/iframe_api",s.id="youtubeapijs";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(s,c)}e.id||(e.id="youtube_"+Math.random().toString(36).substr(2,9)),function n(){A17.onYouTubeIframeAPIReady?t=new YT.Player(e.id,{origin:window.location.origin,events:{onStateChange:a}}):setTimeout(n,250)}()},O=function(e,t){if("native"===t)return(new DOMParser).parseFromString(e,"text/html");var n=document.implementation.createHTMLDocument("");return e.toLowerCase().indexOf("-1?n.documentElement.innerHTML=e:n.body.innerHTML=e,n},j=function(){function e(){var e=document.querySelector("a"),t=document.querySelector("h1");if(t){var n=document.querySelector("#content-h1");n&&n.forEach((function(e){t.removeAttr("id")})),t.setAttribute("id","content-h1"),e&&e.setAttribute("href","#content-h1")}else e&&e.setAttribute("href","#content")}e(),document.addEventListener("DOMContentLoaded",e,!1),document.addEventListener("ajaxPageLoad:complete",e,!1)},C=function(){function e(){var e=document.getElementsByTagName("header")[0],t=document.getElementById("a17");if(t.style["padding-top"]=null,e.getElementsByClassName("m-notification--header").length<1)return null;parseInt(getComputedStyle(t)["padding-top"],10)>0&&(t.style["padding-top"]=e.offsetHeight+"px")}document.addEventListener("notification:confirmed",e,!1),document.addEventListener("ajaxPageLoad:complete",e,!1),window.addEventListener("resized",e,!1),e()},k=function(e){var t=e,n=new XMLHttpRequest,o=t.url;if(t.queryString="",void 0!==t.data){if(!r.default.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=r.default.fromObject(t.data)}if("POST"!==t.type&&(o+=o.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),n.open(t.type,o,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var i=0;i=200&&n.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,n.responseText,n.status,n.responseURL):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status,n.responseURL),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status)},n.send("POST"===t.type?t.queryString.replace("?",""):"")},T=function(e){var t="s-modal-active",n="s-roadblock-active",o="s-roadblock-defined",i=document.getElementById("modal"),a=document.getElementById("slider-promo"),s=!1,c=!1,l=null,u=null,d=!1,m="has_seen_lightbox";function f(){if(document.documentElement.classList.contains(o)){var e=document.getElementsByClassName("g-slider--promo--template");if(!(e.length<1)){var t=r.b.read(m)||"",n=Array.prototype.map.call(e,(function(e){return e.dataset.expires})),i=n.every((function(e,t,n){return e===n[0]}));if(!(t&&i&&n[0]>0)){var a=Array.prototype.map.call(e,(function(e){return e.dataset.geotarget}));d=!1,a.includes("all")?p("all"):null!==u?p(u?"local":"not-local"):(d=!0,Object(r.a)({url:"/api/v1/geotarget",type:"GET",onSuccess:function(e){p((u=null===(u=JSON.parse(e).is_local)||u)?"local":"not-local"),d=!1},onError:function(e){p("local"),d=!1}})),setTimeout(h,3e3)}}}}function p(e){var t=document.querySelector('.g-slider--promo--template[data-geotarget="'+e+'"]');if(t)a.dataset.expires=t.dataset.expires,a.innerHTML=t.innerHTML,Object(r.r)(a,"content:updated",{el:a}),document.documentElement.classList.add(o);else switch(e){case"local":p("all");break;case"all":document.documentElement.classList.remove(o)}}function h(e){if(document.documentElement.classList.contains(o)){if(d){if(!e)return void setTimeout((function(){h(!0)}),2e3);p("local")}if(""!==a.innerHTML){d=!1;var t=r.b.read(m)||"",i=parseInt(a.getAttribute("data-expires"))/60/60/24;if(!(t&&i>0)){document.documentElement.classList.add(n),c=null!==a.querySelector(".g-slider--promo__variation--newsletter"),l=null,s=!0,a.querySelector("form").addEventListener("submit",g,!0),i>0?r.b.create(m,!0,i):r.b.delete(m);var u=a.getElementsByTagName("button")[0];setTimeout((function(){u.classList.remove("btn--secondary"),u.classList.add("btn--animating"),setTimeout((function(){u.classList.remove("btn--animating")}),900)}),1200)}}}}function g(e){var t=document.getElementById("edit-submitted-first-name"),n=document.getElementById("edit-submitted-last-name"),o=document.getElementById("edit-submitted-mail"),i=document.getElementById("edit-submitted-tlcsource");if(c)return function(e){var t=a.querySelector("form");e.preventDefault(),e.stopPropagation(),y(),n=a.querySelector("button"),n.classList.add("s-loading"),n.setAttribute("disabled","disabled");var n;var o=Object(r.m)(t);Object(r.a)({url:t.action||"/subscribe",type:"POST",requestHeaders:[{header:"Content-Type",value:"application/x-www-form-urlencoded; charset=UTF-8"},{header:"X-CSRF-Token",value:document.querySelector("meta[name=csrf-token]").getAttribute("content")||""}],data:o,onSuccess:function(e){try{e=JSON.parse(e),t.classList.remove("s-loading"),t.setAttribute("disabled","disabled"),t.querySelector("input[name=email]").value="",b("success",e.message||e.email),Object(r.r)(document,"gtm:push",{event:"sign-up",eventCategory:"subscribe"})}catch(t){console.error("Error submitting newsletter sign up (a)"),console.log(t,e),b("error")}v()},onError:function(e){try{b("error",(e=JSON.parse(e)).message||e.email)}catch(t){console.error("Error submitting newsletter sign up (b)"),console.log(e,t),b("error")}v()}})}(e);var s=encodeURIComponent(JSON.stringify({firstname:t?t.value:null,lastname:n?n.value:null,email:o?o.value:null,tlcsource:i?i.value:null}));s+=";domain=.artic.edu",r.b.create("tlc_lb_signup",s,30);var l=S(e.target);l&&Object(r.r)(document,"gtm:push",l),Object(r.r)(document,"roadblock:close")}function v(){var e=a.querySelector("button");e.classList.remove("s-loading"),e.removeAttribute("disabled")}function y(){a.classList.remove("g-slider--msg-active");var e=a.querySelector(".g-slider--promo__variation--newsletter"),t=a.querySelector("form");l&&(e.removeChild(l),l=null),t.classList.remove("s-success"),t.classList.remove("s-error")}function b(e,t){var n=a.querySelector(".g-slider--promo__variation--newsletter");y();var o=document.createElement("div");o.className="g-slider__msg__content",(l=document.createElement("div")).className="g-slider__msg f-buttons","success"===e?(l.className+=" g-slider__msg--success",o.textContent=t||"Successfully signed up to the newsletter",n.classList.add("s-success")):"error"===e&&(l.className+=" g-slider__msg--error",o.textContent=t||"Error signing up to the newsletter",n.classList.add("s-error")),a.classList.add("g-slider--msg-active"),l.append(o),n.prepend(l)}document.addEventListener("roadblock:close",(function(){document.documentElement.classList.remove(n),s&&(Object(r.r)(document,"body:unlock"),Object(r.r)(document,"focus:untrap"),document.documentElement.classList.remove(t),setTimeout((function(){Object(r.q)(document.getElementById("a17"))}),0),setTimeout((function(){i.className="g-slider",i.querySelector("[data-modal-content]").innerHTML=""}),300),s=!1)}),!1),window.addEventListener("keyup",(function(e){document.documentElement.classList.contains(n)&&27===e.keyCode&&Object(r.r)(document,"roadblock:close")}),!1),document.addEventListener("ajaxPageLoad:complete",f,!1),f()};n.d(t,"w",(function(){return o})),n.d(t,"s",(function(){return i})),n.d(t,"l",(function(){return a})),n.d(t,"k",(function(){return s})),n.d(t,"q",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return f})),n.d(t,"r",(function(){return p})),n.d(t,"y",(function(){return h})),n.d(t,"g",(function(){return g})),n.d(t,"m",(function(){return v.a})),n.d(t,"u",(function(){return y})),n.d(t,"t",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"i",(function(){return E})),n.d(t,"n",(function(){return x})),n.d(t,"o",(function(){return S})),n.d(t,"z",(function(){return L})),n.d(t,"v",(function(){return O})),n.d(t,"a",(function(){return j})),n.d(t,"p",(function(){return C})),n.d(t,"d",(function(){return k})),n.d(t,"x",(function(){return T}))},64:function(e,t,n){var o,r,i;!function(n,a){"use strict";r=[],void 0===(i="function"==typeof(o=function(){var e={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal",window:window},t=["display:block","position:absolute","top:-999px","left:-999px","font-size:48px","width:auto","height:auto","line-height:normal","margin:0","padding:0","font-variant:normal","white-space:nowrap"],n='AxmTYklsjo190QW
',o=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return o.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},o.prototype.load=function(){var e,o=new Date,r=this,i=r.serif,a=r.sansSerif,s=r.parent,c=r.appended,l=r.options,u=l.reference;function d(e){return t.concat(["font-weight:"+l.weight,"font-style:"+l.style]).concat("font-family:"+e).join(";")}var m=n.replace(/\%s/,d("sans-serif")),f=n.replace(/\%s/,d("serif"));function p(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=r.parent=l.window.document.createElement("div")),s.innerHTML=m+f,a=r.sansSerif=s.firstChild,i=r.serif=a.nextSibling,l.glyphs&&(a.innerHTML+=l.glyphs,i.innerHTML+=l.glyphs),function t(){u||(u=l.window.document.body),!c&&u&&(u.appendChild(s),c=r.appended=!0,e=r.getMeasurements(),a.style.fontFamily=r.fontFamily+", sans-serif",i.style.fontFamily=r.fontFamily+", serif"),c&&e&&(p(e.sansSerif,a,l.tolerance)||p(e.serif,i,l.tolerance))?l.success():(new Date).getTime()-o.getTime()>l.timeout?l.error():!c&&"requestAnimationFrame"in l.window?l.window.requestAnimationFrame(t):l.window.setTimeout(t,l.delay)}()},o.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},o.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},o.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},o.prototype.init=function(t,n){var o;for(var r in e)n.hasOwnProperty(r)||(n[r]=e[r]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(o=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(o)):this.load()},function(e,t){var n=new o;return n.init(e,t),n}})?o.apply(t,r):o)||(e.exports=i)}()},701:function(e,t,n){var o,r,i;
+/*! nouislider - 11.0.3 - 2018-01-21 14:04:07
+ https://github.com/leongersen/noUiSlider/blob/11.0.3/LICENSE */r=[],void 0===(i="function"==typeof(o=function(){"use strict";var e="11.0.3";function t(e){e.preventDefault()}function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function o(e,t,n){n>0&&(s(e,t),setTimeout((function(){c(e,t)}),n))}function r(e){return Math.max(Math.min(e,100),0)}function i(e){return Array.isArray(e)?e:[e]}function a(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function s(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(e){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop}}function u(e,t){return 100/(t-e)}function d(e,t){return 100*t/(e[1]-e[0])}function m(e,t){for(var n=1;e>=t[n];)n+=1;return n}function f(e,t,n){if(n>=e.slice(-1)[0])return 100;var o=m(n,e),r=e[o-1],i=e[o],a=t[o-1],s=t[o];return a+function(e,t){return d(e,e[0]<0?t+Math.abs(e[0]):t-e[0])}([r,i],n)/u(a,s)}function p(e,t,n,o){if(100===o)return o;var r=m(o,e),i=e[r-1],a=e[r];return n?o-i>(a-i)/2?a:i:t[r-1]?e[r-1]+function(e,t){return Math.round(e/t)*t}(o-e[r-1],t[r-1]):o}function h(t,o,r){var i;if("number"==typeof o&&(o=[o]),!Array.isArray(o))throw new Error("noUiSlider ("+e+"): 'range' contains invalid value.");if(!n(i="min"===t?0:"max"===t?100:parseFloat(t))||!n(o[0]))throw new Error("noUiSlider ("+e+"): 'range' value isn't numeric.");r.xPct.push(i),r.xVal.push(o[0]),i?r.xSteps.push(!isNaN(o[1])&&o[1]):isNaN(o[1])||(r.xSteps[0]=o[1]),r.xHighestCompleteStep.push(0)}function g(e,t,n){if(!t)return!0;n.xSteps[e]=d([n.xVal[e],n.xVal[e+1]],t)/u(n.xPct[e],n.xPct[e+1]);var o=(n.xVal[e+1]-n.xVal[e])/n.xNumSteps[e],r=Math.ceil(Number(o.toFixed(3))-1),i=n.xVal[e]+n.xNumSteps[e]*r;n.xHighestCompleteStep[e]=i}function v(e,t,n){var o;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=t;var r=[];for(o in e)e.hasOwnProperty(o)&&r.push([e[o],o]);for(r.length&&"object"==typeof r[0][0]?r.sort((function(e,t){return e[0][0]-t[0][0]})):r.sort((function(e,t){return e[0]-t[0]})),o=0;o=100)return e.slice(-1)[0];var o=m(n,t),r=e[o-1],i=e[o],a=t[o-1];return function(e,t){return t*(e[1]-e[0])/100+e[0]}([r,i],(n-a)*u(a,t[o]))}(this.xVal,this.xPct,e)},v.prototype.getStep=function(e){return e=p(this.xPct,this.xSteps,this.snap,e)},v.prototype.getNearbySteps=function(e){var t=m(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t-0],step:this.xNumSteps[t-0],highestStep:this.xHighestCompleteStep[t-0]}}},v.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(a);return Math.max.apply(null,e)},v.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var y={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number};function b(t){if(function(e){return"object"==typeof e&&"function"==typeof e.to&&"function"==typeof e.from}(t))return!0;throw new Error("noUiSlider ("+e+"): 'format' requires 'to' and 'from' methods.")}function w(t,o){if(!n(o))throw new Error("noUiSlider ("+e+"): 'step' is not numeric.");t.singleStep=o}function E(t,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider ("+e+"): 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider ("+e+"): Missing 'min' or 'max' in 'range'.");if(n.min===n.max)throw new Error("noUiSlider ("+e+"): 'range' 'min' and 'max' cannot be equal.");t.spectrum=new v(n,t.snap,t.singleStep)}function x(t,n){if(n=i(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider ("+e+"): 'start' option is incorrect.");t.handles=n.length,t.start=n}function S(t,n){if(t.snap=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+e+"): 'snap' option must be a boolean.")}function L(t,n){if(t.animate=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+e+"): 'animate' option must be a boolean.")}function O(t,n){if(t.animationDuration=n,"number"!=typeof n)throw new Error("noUiSlider ("+e+"): 'animationDuration' option must be a number.")}function j(t,n){var o,r=[!1];if("lower"===n?n=[!0,!1]:"upper"===n&&(n=[!1,!0]),!0===n||!1===n){for(o=1;o=50||t.padding[1]>=50)throw new Error("noUiSlider ("+e+"): 'padding' option must be less than half the range.")}}function M(t,n){switch(n){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider ("+e+"): 'direction' option was not recognized.")}}function q(t,n){if("string"!=typeof n)throw new Error("noUiSlider ("+e+"): 'behaviour' must be a string containing options.");var o=n.indexOf("tap")>=0,r=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,a=n.indexOf("snap")>=0,s=n.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider ("+e+"): 'fixed' behaviour must be used with 2 handles");k(t,t.start[1]-t.start[0])}t.events={tap:o||a,drag:r,fixed:i,snap:a,hover:s}}function P(t,n){if(!1!==n)if(!0===n){t.tooltips=[];for(var o=0;o= 2) required for mode 'count'.");var r=n-1,i=100/r;for(n=[];r--;)n[r]=r*i;n.push(100),t="positions"}return"positions"===t?n.map((function(e){return O.fromStepping(o?O.getStep(e):e)})):"values"===t?o?n.map((function(e){return O.fromStepping(O.getStep(O.toStepping(e)))})):n:void 0}(n,t.values||!1,t.stepped||!1),a=function(e,t,n){var o,r={},i=O.xVal[0],a=O.xVal[O.xVal.length-1],s=!1,c=!1,l=0;return o=n.slice().sort((function(e,t){return e-t})),(n=o.filter((function(e){return!this[e]&&(this[e]=!0)}),{}))[0]!==i&&(n.unshift(i),s=!0),n[n.length-1]!==a&&(n.push(a),c=!0),n.forEach((function(o,i){var a,u,d,m,f,p,h,g,v,y=o,b=n[i+1];if("steps"===t&&(a=O.xNumSteps[i]),a||(a=b-y),!1!==y&&void 0!==b)for(a=Math.max(a,1e-7),u=y;u<=b;u=(u+a).toFixed(7)/1){for(h=(f=(m=O.toStepping(u))-l)/e,v=f/(g=Math.round(h)),d=1;d<=g;d+=1)r[(l+d*v).toFixed(5)]=["x",0];p=n.indexOf(u)>-1?1:"steps"===t?2:0,!i&&s&&(p=0),u===b&&c||(r[m.toFixed(5)]=[u,p]),l=m}})),r}(o,n,i),s=t.format||{to:Math.round};return h=E.appendChild(H(a,r,s))}
+/*! In this file: Browser events (not slider events like slide, change); */function R(){var e=d.getBoundingClientRect(),t="offset"+["Width","Height"][a.ort];return 0===a.ort?e.width||d[t]:e.height||d[t]}function B(e,t,n,o){var r=function(r){return!!(r=function(e,t,n){var o,r,i=0===e.type.indexOf("touch"),a=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer");if(0===e.type.indexOf("MSPointer")&&(s=!0),i){var c=function(e){return e.target===n||n.contains(e.target)};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,c);if(u.length>1)return!1;o=u[0].pageX,r=u[0].pageY}else{var d=Array.prototype.find.call(e.changedTouches,c);if(!d)return!1;o=d.pageX,r=d.pageY}}return t=t||l(k),(a||s)&&(o=e.clientX+t.x,r=e.clientY+t.y),e.pageOffset=t,e.points=[o,r],e.cursor=a||s,e}(r,o.pageOffset,o.target||t))&&!(E.hasAttribute("disabled")&&!o.doNotReject)&&(i=E,s=a.cssClasses.tap,!((i.classList?i.classList.contains(s):new RegExp("\\b"+s+"\\b").test(i.className))&&!o.doNotReject)&&!(e===b.start&&void 0!==r.buttons&&r.buttons>1)&&(!o.hover||!r.buttons)&&(w||r.preventDefault(),r.calcPoint=r.points[a.ort],void n(r,o)));var i,s},i=[];return e.split(" ").forEach((function(e){t.addEventListener(e,r,!!w&&{passive:!0}),i.push([e,r])})),i}function D(e){var t,n,o,i,s,c,u=100*(e-(t=d,n=a.ort,o=t.getBoundingClientRect(),i=t.ownerDocument,s=i.documentElement,c=l(i),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(c.x=0),n?o.top+c.y-s.clientTop:o.left+c.x-s.clientLeft))/R();return u=r(u),a.dir?100-u:u}function z(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&W(e,t)}function V(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return W(e,t);var n=(a.dir?-1:1)*(e.calcPoint-t.startCalcPoint);ee(n>0,100*n/t.baseSize,t.locations,t.handleNumbers)}function W(e,n){n.handle&&(c(n.handle,a.cssClasses.active),L-=1),n.listeners.forEach((function(e){T.removeEventListener(e[0],e[1])})),0===L&&(c(E,a.cssClasses.drag),ne(),e.cursor&&(A.style.cursor="",A.removeEventListener("selectstart",t))),n.handleNumbers.forEach((function(e){$("change",e),$("set",e),$("end",e)}))}function Q(e,n){var o;if(1===n.handleNumbers.length){var r=m[n.handleNumbers[0]];if(r.hasAttribute("disabled"))return!1;o=r.children[0],L+=1,s(o,a.cssClasses.active)}e.stopPropagation();var i=[],c=B(b.move,T,V,{target:e.target,handle:o,listeners:i,startCalcPoint:e.calcPoint,baseSize:R(),pageOffset:e.pageOffset,handleNumbers:n.handleNumbers,buttonsProperty:e.buttons,locations:x.slice()}),l=B(b.end,T,W,{target:e.target,handle:o,listeners:i,doNotReject:!0,handleNumbers:n.handleNumbers}),u=B("mouseout",T,z,{target:e.target,handle:o,listeners:i,doNotReject:!0,handleNumbers:n.handleNumbers});i.push.apply(i,c.concat(l,u)),e.cursor&&(A.style.cursor=getComputedStyle(e.target).cursor,m.length>1&&s(E,a.cssClasses.drag),A.addEventListener("selectstart",t,!1)),n.handleNumbers.forEach((function(e){$("start",e)}))}function Y(e){e.stopPropagation();var t=D(e.calcPoint),n=function(e){var t=100,n=!1;return m.forEach((function(o,r){if(!o.hasAttribute("disabled")){var i=Math.abs(x[r]-e);(i1&&(o&&t>0&&(n=Math.max(n,e[t-1]+a.margin)),i&&t1&&a.limit&&(o&&t>0&&(n=Math.min(n,e[t-1]+a.limit)),i&&t1?o.forEach((function(e,n){var o=J(r,e,r[e]+t,i[n],a[n],!1);!1===o?t=0:(t=o-r[e],r[e]=o)})):i=a=[!0];var s=!1;o.forEach((function(e,o){s=oe(e,n[e]+t,i[o],a[o])||s})),s&&o.forEach((function(e){$("update",e),$("slide",e)}))}function te(e,t){return a.dir?100-e-t:e}function ne(){S.forEach((function(e){var t=x[e]>50?-1:1,n=3+(m.length+t*e);m[e].style.zIndex=n}))}function oe(e,t,n,o){return!1!==(t=J(x,e,t,n,o,!1))&&(function(e,t){x[e]=t,j[e]=O.fromStepping(t);var n="translate("+Z(K(te(t,0)-M),"0")+")";m[e].style[a.transformRule]=n,re(e),re(e+1)}(e,t),!0)}function re(e){if(f[e]){var t=0,n=100;0!==e&&(t=x[e-1]),e!==f.length-1&&(n=x[e]);var o=n-t,r="translate("+Z(K(te(t,o)),"0")+")",i="scale("+Z(o/100,"1")+")";f[e].style[a.transformRule]=r+" "+i}}
+/*! In this file: All methods eventually exposed in slider.noUiSlider... */function ie(e,t){var n=i(e),r=void 0===x[0];t=void 0===t||!!t,a.animate&&!r&&o(E,a.cssClasses.tap,a.animationDuration),S.forEach((function(e){oe(e,function(e,t){return null===e||!1===e||void 0===e?x[t]:("number"==typeof e&&(e=String(e)),e=a.format.from(e),!1===(e=O.toStepping(e))||isNaN(e)?x[t]:e)}(n[e],e),!0,!1)})),S.forEach((function(e){oe(e,x[e],!0,!0)})),ne(),S.forEach((function(e){$("update",e),null!==n[e]&&t&&$("set",e)}))}function ae(){var e=j.map(a.format.to);return 1===e.length?e[0]:e}
+/*! In this file: Calls to functions. All other scope_ files define functions only; */
+return s(g=E,a.cssClasses.target),0===a.dir?s(g,a.cssClasses.ltr):s(g,a.cssClasses.rtl),0===a.ort?s(g,a.cssClasses.horizontal):s(g,a.cssClasses.vertical),d=q(g,a.cssClasses.base),function(e,t){var n=q(t,a.cssClasses.connects);m=[],(f=[]).push(N(n,e[0]));for(var o=0;on.stepAfter.startValue&&(r=n.stepAfter.startValue-o),i=o>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&o-n.stepBefore.highestStep,100===e?r=null:0===e&&(i=null);var a=O.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(a))),null!==i&&!1!==i&&(i=Number(i.toFixed(a))),[i,r]}))},on:G,off:function(e){var t=e&&e.split(".")[0],n=t&&e.substring(t.length);Object.keys(C).forEach((function(e){var o=e.split(".")[0],r=e.substring(o.length);t&&t!==o||n&&n!==r||delete C[e]}))},get:ae,set:ie,reset:function(e){ie(a.start,e)},__moveHandles:function(e,t,n){ee(e,t,x,n)},options:u,updateOptions:function(e,t){var n=ae(),o=["margin","limit","padding","range","animate","snap","step","format"];o.forEach((function(t){void 0!==e[t]&&(u[t]=e[t])}));var r=I(u);o.forEach((function(t){void 0!==e[t]&&(a[t]=r[t])})),O=r.spectrum,a.margin=r.margin,a.limit=r.limit,a.padding=r.padding,a.pips&&_(a.pips),x=[],ie(e.start||n,t)},target:E,removePips:U,pips:_},a.pips&&_(a.pips),a.tooltips&&(y=m.map(F),G("update",(function(e,t,n){if(y[t]){var o=e[t];!0!==a.tooltips[t]&&(o=a.tooltips[t].to(n[t])),y[t].innerHTML=o}}))),G("update",(function(e,t,n,o,r){S.forEach((function(e){var t=m[e],o=J(x,e,0,!0,!0,!0),i=J(x,e,100,!0,!0,!0),s=r[e],c=a.ariaFormat.to(n[e]);t.children[0].setAttribute("aria-valuemin",o.toFixed(1)),t.children[0].setAttribute("aria-valuemax",i.toFixed(1)),t.children[0].setAttribute("aria-valuenow",s.toFixed(1)),t.children[0].setAttribute("aria-valuetext",c)}))})),p}return{version:e,create:function(t,n){if(!t||!t.nodeName)throw new Error("noUiSlider ("+e+"): create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider ("+e+"): Slider was already initialized.");var o=_(t,I(n),n);return t.noUiSlider=o,o}}})?o.apply(t,r):o)||(e.exports=i)},851:function(e,t){!function(){var e=Math.PI,t=2*e,n=e/180,o=document.createElement("div");document.body.appendChild(o);var r=self.ConicGradient=function(e){r.all.push(this),e=e||{},this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.repeating=!!e.repeating,this.size=e.size||Math.max(innerWidth,innerHeight),this.canvas.width=this.canvas.height=this.size;var t=e.stops;this.stops=(t||"").split(/\s*,(?![^(]*\))\s*/),this.from=e.from||0;for(var n=0;n0){var i=this.stops[0].clone();i.pos=0,this.stops.unshift(i)}if(void 0===this.stops[this.stops.length-1].pos)this.stops[this.stops.length-1].pos=1;else if(!this.repeating&&this.stops[this.stops.length-1].pos<1){var a=this.stops[this.stops.length-1].clone();a.pos=1,this.stops.push(a)}if(this.stops.forEach((function(e,t){if(void 0===e.pos){for(var n=t+1;this[n];n++)if(void 0!==this[n].pos){e.pos=this[t-1].pos+(this[n].pos-this[t-1].pos)/(n-t+1);break}}else t>0&&(e.pos=Math.max(e.pos,this[t-1].pos))}),this.stops),this.repeating){var s=(t=this.stops.slice())[t.length-1].pos-t[0].pos;for(n=0;this.stops[this.stops.length-1].pos<1&&n<1e4;n++)for(var c=0;c '},get png(){return this.canvas.toDataURL()},get r(){return Math.sqrt(2)*this.size/2},paint:function(){var e,t,o,r=this.context,i=this.r,a=this.size/2,s=0,c=this.stops[s];r.translate(this.size/2,this.size/2),r.rotate(-90*n),r.rotate(this.from*n),r.translate(-this.size/2,-this.size/2);for(var l=0;l<360;){if(l/360+1e-5>=c.pos){do{e=c,s++,c=this.stops[s]}while(c&&c!=e&&l/360+1e-5>=c.pos);if(!c)break;var u=e.color+""==c.color+""&&e!=c;t=e.color.map((function(e,t){return c.color[t]-e}))}o=(l/360-e.pos)/(c.pos-e.pos);var d=u?c.color:t.map((function(t,n){var r=t*o+e.color[n];return n<3?255&r:r}));if(r.fillStyle="rgba("+d.join(",")+")",r.beginPath(),r.moveTo(a,a),u)var m=360*(c.pos-e.pos);else m=.5;var f=l*n,p=(f=Math.min(360*n,f))+m*n;p=Math.min(360*n,p+.02),r.arc(a,a,i,f,p),r.closePath(),r.fill(),l+=m}}},r.ColorStop=function(e,n){if(this.gradient=e,n){var o=n.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/);if(this.color=r.ColorStop.colorToRGBA(o[1]),o[2]){var i=o[3];"%"==i||"0"===o[2]&&!i?this.pos=o[2]/100:"turn"==i?this.pos=+o[2]:"deg"==i?this.pos=o[2]/360:"grad"==i?this.pos=o[2]/400:"rad"==i&&(this.pos=o[2]/t)}o[4]&&(this.next=new r.ColorStop(e,o[1]+" "+o[4]+o[5]))}},r.ColorStop.prototype={clone:function(){var e=new r.ColorStop(this.gradient);return e.color=this.color,e.pos=this.pos,e},toString:function(){return"rgba("+this.color.join(", ")+") "+100*this.pos+"%"}},r.ColorStop.colorToRGBA=function(e){if(!Array.isArray(e)&&-1==e.indexOf("from")){o.style.color=e;var t=getComputedStyle(o).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/);return t&&(t.shift(),(t=t.map((function(e){return+e})))[3]=isNaN(t[3])?1:t[3]),t||[0,0,0,0]}return e}}(),self.StyleFix&&function(){function e(e){var t=document.createElement("p");return t.style.backgroundImage=e,t.style.backgroundImage=PrefixFree.prefix+e,!!t.style.backgroundImage}function t(e,t){var n=new RegExp("(?:repeating-)?"+e+"\\(\\s*((?:\\([^()]+\\)|[^;()}])+?)\\)","g");StyleFix.register((function(e,o){return e.indexOf("-gradient")>-1?e.replace(n,t):e}))}e("linear-gradient(white 0% 50%, black 50% 100%)")||t("(?:linear|radial|conic)-gradient",(function(e,t){var n="";return(t||"").split(/\s*,(?![^(]*\))\s*/).forEach((function(e,t){if(e){n+=""!=n?", ":"";var o=e.split(/ /);3===o.length?n+=o[0]+" "+o[1]+", "+o[0]+" "+o[2]:n+=e}})),e.replace(t,n)})),e("conic-gradient(white, black)")||t("conic-gradient",(function(e,t){return new ConicGradient({stops:t,repeating:e.indexOf("repeating-")>-1})}))}()},869:function(e,t,n){"use strict";n.r(t);var o={};n.r(o),n.d(o,"colorPickerFilter",(function(){return i})),n.d(o,"collectionSearch",(function(){return s})),n.d(o,"hideCollectionFilters",(function(){return c})),n.d(o,"hideCollectionSearch",(function(){return l})),n.d(o,"showCollectionFilters",(function(){return u})),n.d(o,"showCollectionSearch",(function(){return d})),n.d(o,"rangeSlider",(function(){return p}));var r=n(2),i=(n(851),function(e){var t,n,o,i,a,s,c,l,u=null,d=[16727614,16357674,16510030,15659690,9628976,4638949,4606186,11558884,16727614],m=360/(d.length-1),f=.65,p=(_(7829367,0,f),_(7829367,16777215,f),_(7829367,0,.95)),h=_(7829367,16777215,.95),g=[R(p),R(7829367),R(h),R(7829367),R(p)],v=!1,y=0,b=270,w=(d[0],d[0]),E=w,x=R(E);function S(){c.setAttribute("style","height: 48px"),[i,o,a].forEach((function(e,t){e.classList.add("o-color-picker__handle--initialized")})),v=!0}function L(e){e.preventDefault(),e.stopPropagation();var t=function(e){var t,n,o,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);t=parseInt(r[1],16),n=parseInt(r[2],16),o=parseInt(r[3],16),t/=255,n/=255,o/=255;var i,a,s=Math.max(t,n,o),c=Math.min(t,n,o),l=(s+c)/2;if(s==c)i=a=0;else{var u=s-c;switch(a=l>.5?u/(2-s-c):u/(s+c),s){case t:i=(n-o)/u+(n ')})),document.addEventListener("collectionFilters:open",C,!1),document.addEventListener("collectionFilters:close",k,!1),document.addEventListener("ajaxPageLoad:complete",j,!1),l.addEventListener("click",L,!1),(document.querySelector("html").className+" ").replace(/[\n\t]/g," ").indexOf(" s-collection-filters-active ")>-1&&C()}function C(){setTimeout((function(){e.setAttribute("style","display: block")}),432)}function k(){setTimeout((function(){e.setAttribute("style","display: none")}),432)}function T(e){document.addEventListener("mouseup",u,!1),document.addEventListener("touchend",u,!1),document.addEventListener("mouseup",A,!1),document.addEventListener("touchend",A,!1),window.addEventListener("mousemove",u,{passive:!1}),window.addEventListener("touchmove",u,{passive:!1}),S(),u(e)}function A(){document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u)}function M(e,t){var n=void 0;e.touches&&(n=e.touches[0]);var o=t.getBoundingClientRect(),r=t.offsetWidth/2+o.left+window.scrollX,i=t.offsetHeight/2+o.top+window.scrollY,a=e.pageX||n.pageX,s=i-(e.pageY||n.pageY),c=r-a,l=Math.atan2(s,c)*(180/Math.PI);return(l-=90)<0&&(l=360+l),l=Math.floor(l)}function q(){var e=y/360,t=Math.floor(e*(d.length-1)),n=t+1>d.length-1?0:t+1;w=_(d[t],d[n],y%m/m),o.setAttribute("style","transform:translate(-50%, -50%) rotate("+y+"deg);color:"+R(w)+";"),a.setAttribute("style","transform:translate(-50%, -50%) rotate("+y+"deg);")}function P(){var e=b>270||b<90?0:16777215,t=Math.abs(0===e?b>270?b-360:b:b-180);E=_(w,e,(1-t/90)*f),x=R(E);var n=_(p,h,1-Math.abs(b-180)/180);i.setAttribute("style","transform:translate(-50%, -50%) rotate("+b+"deg);color:"+R(n)+";")}function N(){s.setAttribute("style","background-color:"+(v?R(E):"transparent")+";"),l.innerHTML=' OK'}function F(e){u=U,T(e)}function H(e){u=I,T(e)}function U(e){e.preventDefault(),e.stopPropagation(),y=M(e,t),q(),P(),N()}function I(e){e.preventDefault(),e.stopPropagation(),b=M(e,n),P(),N()}function _(e,t,n){var o=e>>16,r=e>>8&255,i=255&e;return(o+n*((t>>16)-o)<<16)+(r+n*((t>>8&255)-r)<<8)+(0|i+n*((255&t)-i))}function R(e){return"#"+e.toString(16).padStart(6,"0")}this.destroy=function(){l.removeEventListener("click",L),t.removeEventListener("mousedown",F),t.removeEventListener("touchstart",F),n.removeEventListener("mousedown",H),n.removeEventListener("touchstart",H),document.removeEventListener("collectionFilters:open",C),document.removeEventListener("collectionFilters:close",k),document.removeEventListener("ajaxPageLoad:complete",j),A17.Helpers.purgeProperties(this)},this.init=function(){j()}}),a=n(32),s=function(e){var t=!1;function n(){t||(Object(r.r)(document,"body:lock",{breakpoints:"all"}),window.requestAnimationFrame((function(){document.documentElement.classList.add("s-collection-search-active"),setTimeout((function(){Object(r.q)(e)}),0),Object(r.r)(document,"focus:trap",{element:e}),Object(r.r)(document,"collectionSearch:visible"),t=!0})))}function o(){t&&(document.documentElement.classList.remove("s-collection-search-active"),Object(r.r)(document,"body:unlock"),Object(r.r)(document,"focus:untrap"),setTimeout((function(){Object(r.q)(document.getElementById("a17"))}),0),Object(r.r)(document,"collectionSearch:hidden"),t=!1)}function i(){t&&Object(a.t)("medium+")&&(Object(r.r)(document,"collectionSearch:close"),setTimeout((function(){window.scrollTo(0,0)}),5))}this.destroy=function(){document.removeEventListener("collectionSearch:open",n),document.removeEventListener("collectionSearch:close",o),document.removeEventListener("mediaQueryUpdated",i),A17.Helpers.purgeProperties(this)},this.init=function(){document.addEventListener("collectionSearch:open",n,!1),document.addEventListener("collectionSearch:close",o,!1),document.addEventListener("mediaQueryUpdated",i,!1)}},c=function(e){function t(t){t.preventDefault(),Object(r.r)(document,"collectionFilters:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},l=function(e){function t(t){t.preventDefault(),Object(r.r)(document,"collectionSearch:close"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},u=function(e){function t(t){t.preventDefault(),Object(r.r)(document,"collectionFilters:toggle"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},d=function(e){function t(t){t.preventDefault(),Object(r.r)(document,"collectionSearch:open"),e.blur()}this.destroy=function(){e.removeEventListener("click",t),A17.Helpers.purgeProperties(this)},this.init=function(){e.addEventListener("click",t,!1)}},m=n(701),f=n.n(m),p=function(e){var t,n=e.querySelector("[data-range-slider]"),o=(e.querySelector("[data-range-thumb-min]"),e.querySelector("[data-range-thumb-max]"),e.querySelector("[data-range-bar]"),e.querySelector("[data-range-min-display]")),i=e.querySelector("[data-range-max-display]"),a=e.querySelector("[data-range-custom-from]"),s=e.querySelector("[data-range-custom-to]"),c=e.querySelector("[data-range-custom-btn]"),l=e.getAttribute("data-param"),u="BCE",d="CE",m=[a,s],p=[o,i],h=0,g=0;function v(e,t){var n=-1;return Object(r.f)(e,(function(e,o){o===t&&(n=e)})),n}function y(e){var o,i,a,s=b();n.noUiSlider.updateOptions({range:{min:0,max:t.length-1}}),n.noUiSlider.set([s.fromIndex,s.toIndex]),o=s.fromIndex,i=s.toIndex,a=r.n.updateParameter(window.location.href,l+"-start",t[o].replace(/\s(CE|BCE)/gi,"$1")),a=r.n.updateParameter(a,l+"-end",t[i].replace(/\s(CE|BCE)/gi,"$1")),Object(r.r)(document,"ajax:getPage",{url:a,ajaxScrollTarget:"collection"}),e.preventDefault()}function b(e){var n=a.value,o=s.value,r=parseInt(n),i=parseInt(o),c=n,l=o,d=v(t,n)>-1,m=v(t,o)>-1;if(n.indexOf(u)>-1)r=-1*r;if(!(r>i))return d||null==n||""==n||(c=w(r)),m||null==o||""==o||(l=w(i)),{fromIndex:v(t,c)>-1?v(t,c):0,toIndex:v(t,l)>-1?v(t,l):t.length-1};alert("Upper date range must be higher than the lower date range")}function w(e){var n=!1,o=!1,r=!1;if(!isNaN(e)){e<0&&(n=!0);var i=Math.abs(e)+(n?" "+u:" "+d);return t.forEach((function(a,s){var c=parseInt(a);n?-1!=a.indexOf(u)&&(e<=-1*c&&0==o&&(-1==t.indexOf(i)&&t.splice(s,0,Math.abs(e)+u),o=!0,s),r=s):-1!=a.indexOf(d)&&(e<=c&&0==o&&(-1==t.indexOf(i)&&t.splice(s,0,i),o=!0,s),r=s)})),!o&&r&&(t.splice(r+1,0,Math.abs(e)+(n?u:d)),r+1),i}alert("Please enter a valid number")}function E(){t=A17[e.getAttribute("data-range-values")]||["0","25","50","75","100"],g=t.length-1,function(){var e=Object(r.j)(l+"-start",window.location.search),t=Object(r.j)(l+"-end",window.location.search);if(e&&(a.value=e),t&&(s.value=t),e||t){var n=b();h=n.fromIndex,g=n.toIndex}}(),f.a.create(n,{start:[h,g],connect:!0,step:1,range:{min:0,max:t.length-1},format:{to:function(e){return Math.round(e)},from:function(e){return Math.round(e)}}}),n.noUiSlider.on("update",(function(e,n){m[n].value=t[e[n]],p[n].innerHTML=t[e[n]]})),c.addEventListener("click",y,!1)}this.destroy=function(){c.removeEventListener("click",y),A17.Helpers.purgeProperties(this)},this.init=function(){E()}};document.addEventListener("DOMContentLoaded",(function(){Object(r.l)(o)}))}});
+//# sourceMappingURL=collectionSearch.js.map
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/scripts/head.js b/docs/.vuepress/public/assets/scripts/head.js
index b00491c45..d352ffc18 100644
--- a/docs/.vuepress/public/assets/scripts/head.js
+++ b/docs/.vuepress/public/assets/scripts/head.js
@@ -1,2 +1,2 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/scripts/",n(n.s=132)}({132:function(e,t){!function(e){var t,n,r=window.A17||{},i=e.documentElement,s=window,o=e.getElementsByTagName("head")[0];function l(){if(/in/.test(e.readyState))setTimeout(l,9);else{var t=e.body,r=e.createElement("div");r.className="svg-sprite",r.innerHTML=n.responseText,t.insertBefore(r,t.childNodes[0])}}if(r.browserSpec=(e.querySelectorAll,"addEventListener"in s&&s.history.pushState&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"html5":"html4"),r.objectFit="objectFit"in i.style,window.A17=r,i.className=i.className.replace(/\bno-js\b/," js "+r.browserSpec+(r.objectFit?" objectFit":" no-objectFit")),"html4"===r.browserSpec)(t=e.createElement("link")).rel="stylesheet",t.title="html4css",t.href="/dist/styles/html4css.css",o.appendChild(t),(t=e.createElement("script")).src="//legacypicturefill.s3.amazonaws.com/legacypicturefill.min.js",o.appendChild(t),function t(){!e.readyState&&e.addEventListener&&(e.body?setTimeout((function(){e.readyState="complete"}),500):setTimeout(t,9))}(),function t(){if(/in/.test(e.readyState))setTimeout(t,9);else for(var n=0;n=200&&n.status<400&&l()}}}(document)}});
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/scripts/",n(n.s=746)}({746:function(e,t){!function(e){var t,n,r=window.A17||{},i=e.documentElement,s=window,o=e.getElementsByTagName("head")[0];function l(){if(/in/.test(e.readyState))setTimeout(l,9);else{var t=e.body,r=e.createElement("div");r.className="svg-sprite",r.innerHTML=n.responseText,t.insertBefore(r,t.childNodes[0])}}if(r.browserSpec=(e.querySelectorAll,"addEventListener"in s&&s.history.pushState&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"html5":"html4"),r.objectFit="objectFit"in i.style,window.A17=r,i.className=i.className.replace(/\bno-js\b/," js "+r.browserSpec+(r.objectFit?" objectFit":" no-objectFit")),"html4"===r.browserSpec)(t=e.createElement("link")).rel="stylesheet",t.title="html4css",t.href="/dist/styles/html4css.css",o.appendChild(t),(t=e.createElement("script")).src="//legacypicturefill.s3.amazonaws.com/legacypicturefill.min.js",o.appendChild(t),function t(){!e.readyState&&e.addEventListener&&(e.body?setTimeout((function(){e.readyState="complete"}),500):setTimeout(t,9))}(),function t(){if(/in/.test(e.readyState))setTimeout(t,9);else for(var n=0;n=200&&n.status<400&&l()}}}(document)}});
//# sourceMappingURL=head.js.map
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/scripts/interactiveFeatures.js b/docs/.vuepress/public/assets/scripts/interactiveFeatures.js
index 5869f2abe..dc83f8cb8 100644
--- a/docs/.vuepress/public/assets/scripts/interactiveFeatures.js
+++ b/docs/.vuepress/public/assets/scripts/interactiveFeatures.js
@@ -1,4 +1,16 @@
-!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/scripts/",n(n.s=223)}([function(e,t,n){"use strict";e.exports=n(134)},function(e,t,n){"use strict";var i={toObject:function(e){if("string"!=typeof e)return{};var t={};return(e&&e.indexOf("?")>-1?e.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(e,n,i,r){t[n]=r})),t},fromObject:function(e){var t="",n=0;if(Object.getOwnPropertyNames(e).length>0)for(var i in t="?",e)e.hasOwnProperty(i)&&(t+=(n>0?"&":"")+i+"="+encodeURIComponent(e[i]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),n++);return t},updateParameter:function(e,t,n){var i=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");if(e.match(i))return e.replace(i,"$1"+t+"="+n+"$2");var r="";-1!==e.indexOf("#")&&(r=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));var o=-1!==e.indexOf("?")?"&":"?";return e+o+t+"="+n+r}},r=function(e){var t=e,n=new XMLHttpRequest,r=t.url;if(t.queryString="",void 0!==t.data){if(!i.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=i.fromObject(t.data)}if("POST"!==t.type&&(r+=r.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),n.open(t.type,r,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var o=0;o=200&&n.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,n.responseText,n.status):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status)},n.send("POST"===t.type?t.queryString.replace("?",""):"")},o={create:function(e,t,n){var i="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),i="; expires="+r.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},delete:function(e){e&&this.create(e,"",-1)},read:function(e){if(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i]*>?/g,""));return t.appendChild(n),encodeURIComponent(t.textContent)}return""},l=function(e,t,n){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!0),i.data=n||{},i.eventName=t,e.dispatchEvent(i)},c=(n(35),function(e,t,n){for(var i=0;i0&&(i--,r.unobserve(n.target),n.target.addEventListener("load",c,!1),u(n.target))}}function p(){var e,f,h;if("really-old"===o){for(i=s.length,e=0;e0&&h.right>0&&h.left<(window.innerWidth||document.documentElement.clientWidth)&&h.top<(window.innerHeight||document.documentElement.clientHeight))){var m=s[e];s[e]=void 0,m.lazyloaded=!0,m.addEventListener("load",c,!1),u(m)}for(e=0;e0&&(n++,t=window.requestAnimationFrame(p))}else if("new"===o)for(r=new IntersectionObserver(d,{rootMargin:a.rootMargin,threshold:a.threshold}),i=s.length,e=0;e=0;o--)t.options[o].selected&&(n[t.name]=t.options[o].value);else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(n[t.name]=t.value);return n},v=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},y=function(){var e,t=u();window.addEventListener("resize",(function(){clearTimeout(e),e=setTimeout((function(){var e=u();l(document,"resized"),e!==t&&(t=e,window.A17&&(window.A17.currentMediaQuery=e),l(document,"mediaQueryUpdated"))}),250)}))},b=function(e){var t,n={el:document,offset:0,duration:250,easing:"linear"},i=Date.now(),r=0,o=!1,a={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},s=window.requestAnimationFrame;for(var l in e)void 0!==e[l]&&(n[l]=e[l]);function c(){if(o&&0===r)document.documentElement.scrollTop=1,document.body.scrollTop=1,r=1,n.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(c);else{var e=Date.now(),l=(p=1,f=(e-i)/n.duration,p-1?e.split("?")[1]:location.search).replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(e,n,r,i){t[n]=i})),t},fromObject:function(e){var t="",n=0;if(Object.getOwnPropertyNames(e).length>0)for(var r in t="?",e)e.hasOwnProperty(r)&&(t+=(n>0?"&":"")+r+"="+encodeURIComponent(e[r]).replace(/[!'()]/g,"").replace(/\*/g,"%2A").replace(/%2B/gi,"+"),n++);return t},updateParameter:function(e,t,n){var r=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");if(e.match(r))return e.replace(r,"$1"+t+"="+n+"$2");var i="";-1!==e.indexOf("#")&&(i=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));var o=-1!==e.indexOf("?")?"&":"?";return e+o+t+"="+n+i}},i=function(e){var t=e,n=new XMLHttpRequest,i=t.url;if(t.queryString="",void 0!==t.data){if(!r.fromObject)throw new ReferenceError("Missing: queryStringHandler.fromObject");t.queryString=r.fromObject(t.data)}if("POST"!==t.type&&(i+=i.indexOf("?")>0?t.queryString.replace("?","&"):t.queryString),n.open(t.type,i,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===t.type&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),void 0!==t.requestHeaders&&t.requestHeaders.length>0)for(var o=0;o=200&&n.status<400?"function"===(typeof t.onSuccess).toLowerCase()&&t.onSuccess.call(this,n.responseText,n.status):("function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status),console.log("We reached our target server, but it returned an error: "+n.statusText))},n.onerror=function(){console.log("There was a connection error of some sort"),"function"===(typeof t.onError).toLowerCase()&&t.onError.call(this,n.responseText,n.status)},n.send("POST"===t.type?t.queryString.replace("?",""):"")},o={create:function(e,t,n){var r="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),r="; expires="+i.toGMTString()}document.cookie=e+"="+t+r+"; path=/"},delete:function(e){e&&this.create(e,"",-1)},read:function(e){if(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r]*>?/g,""));return t.appendChild(n),encodeURIComponent(t.textContent)}return""},l=function(e,t,n){var r=document.createEvent("HTMLEvents");r.initEvent(t,!0,!0),r.data=n||{},r.eventName=t,e.dispatchEvent(r)},c=(n(64),function(e,t,n){for(var r=0;r0&&(r--,i.unobserve(n.target),n.target.addEventListener("load",c,!1),u(n.target))}}function f(){var e,p,h;if("really-old"===o){for(r=s.length,e=0;e0&&h.right>0&&h.left<(window.innerWidth||document.documentElement.clientWidth)&&h.top<(window.innerHeight||document.documentElement.clientHeight))){var m=s[e];s[e]=void 0,m.lazyloaded=!0,m.addEventListener("load",c,!1),u(m)}for(e=0;e0&&(n++,t=window.requestAnimationFrame(f))}else if("new"===o)for(i=new IntersectionObserver(d,{rootMargin:a.rootMargin,threshold:a.threshold}),r=s.length,e=0;e=0;o--)t.options[o].selected&&(n[t.name]=t.options[o].value);else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(n[t.name]=t.value);return n},v=function(){var e,t=u();window.addEventListener("resize",(function(){clearTimeout(e),e=setTimeout((function(){var e=u();l(document,"resized"),e!==t&&(t=e,window.A17&&(window.A17.currentMediaQuery=e),l(document,"mediaQueryUpdated"))}),250)}))},y=function(e){var t,n={el:document,offset:0,duration:250,easing:"linear"},r=Date.now(),i=0,o=!1,a={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},s=window.requestAnimationFrame;for(var l in e)void 0!==e[l]&&(n[l]=e[l]);function c(){if(o&&0===i)document.documentElement.scrollTop=1,document.body.scrollTop=1,i=1,n.el=document.documentElement.scrollTop?document.documentElement:document.body,requestAnimationFrame(c);else{var e=Date.now(),l=(f=1,p=(e-r)/n.duration,f=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";function r(e,t){return e===t}function i(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:l;if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,o=t.classNamePrefix,s=t.Component,l=t.defaultTheme,c=void 0===l?g:l,u=Object(i.a)(t,["name","classNamePrefix","Component","defaultTheme"]),d=function(e){var t="function"==typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(e){throw e}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=Object(r.a)({},o);return Object.keys(a).forEach((function(e){s[e]=Object(m.a)(s[e],a[e])})),s},options:{}}}(e),x=n||o||"makeStyles";d.options={index:h+=1,name:n,meta:x,classNamePrefix:x};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(f.a)()||c,i=Object(r.a)({},a.a.useContext(p.a),u),o=a.a.useRef(),l=a.a.useRef();_((function(){var r={name:n,state:{},stylesCreator:d,stylesOptions:i,theme:t};return y(r,e),l.current=!1,o.current=r,function(){w(r)}}),[t,d]),a.a.useEffect((function(){l.current&&b(o.current,e),l.current=!0}));var h=v(o.current,e.classes,s);return h}}var O=n(832),E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,c=void 0!==s&&s,u=t.name,d=Object(i.a)(t,["defaultTheme","withTheme","name"]);var p=u,h=x(e,Object(r.a)({defaultTheme:o,Component:n,name:u||n.displayName,classNamePrefix:p},d)),m=a.a.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=Object(i.a)(e,["classes","innerRef"]),p=h(Object(r.a)({},n.defaultProps,e)),m=d;return("string"==typeof u||c)&&(s=Object(f.a)()||o,u&&(m=Object(O.a)({theme:s,name:u,props:d})),c&&!m.theme&&(m.theme=s)),a.a.createElement(n,Object(r.a)({ref:l||t,classes:p},m))}));return l()(m,n),m}},S=n(169);t.a=function(e,t){return E(e,Object(r.a)({defaultTheme:S.a},t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(t.AnnotationMotivation||(t.AnnotationMotivation={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(t.Behavior||(t.Behavior={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.OA_CHOICE="oa:choice",e.CONTENT_AS_TEXT="contentastext",e.DATASET="dataset",e.DOCUMENT="document",e.IMAGE="image",e.MODEL="model",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXT="text",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(t.ExternalResourceType||(t.ExternalResourceType={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(t.IIIFResourceType||(t.IIIFResourceType={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DICOM="application/dicom",e.DRACO="application/draco",e.EPUB="application/epub+zip",e.GLB="model/gltf-binary",e.GLTF="model/gltf+json",e.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',e.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.OPF="application/oebps-package+xml",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.USDZ="model/vnd.usd+zip",e.VIDEO_MP4="video/mp4",e.WEBM="video/webm"}(t.MediaType||(t.MediaType={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(t.RenderingFormat||(t.RenderingFormat={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(t.ServiceProfile||(t.ServiceProfile={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(t.ViewingDirection||(t.ViewingDirection={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(t.ViewingHint||(t.ViewingHint={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return o})),n.d(t,"applyMiddleware",(function(){return g})),n.d(t,"bindActionCreators",(function(){return d})),n.d(t,"combineReducers",(function(){return c})),n.d(t,"compose",(function(){return m})),n.d(t,"createStore",(function(){return s}));var r=n(240),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var l=e,c=t,u=[],d=u,f=!1;function p(){d===u&&(d=u.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),u=null}}}function g(e){if(!a(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,c=l(c,e)}finally{f=!1}for(var t=u=d,n=0;n=0||(i[n]=e[n]);return i}var p=n(239),h=n.n(p),m=n(233),g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,v=[],y=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function w(e,t,n){g((function(){return e.apply(void 0,t)}),n)}function _(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function x(e,t,n,r,i,o,a,s,l,c){if(e){var u=!1,d=null,f=function(){if(!u){var e,n,f=t.getState();try{e=r(f,i.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?a.current||l():(o.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var O=function(){return[null,0]};function E(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,s=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,l=n.methodName,u=void 0===l?"connectAdvanced":l,p=n.renderCountProp,g=void 0===p?void 0:p,E=n.shouldHandleStateChanges,S=void 0===E||E,T=n.storeKey,k=void 0===T?"store":T,C=(n.withRef,n.forwardRef),I=void 0!==C&&C,P=n.context,j=void 0===P?o:P,A=f(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),R=j;return function(t){var n=t.displayName||t.name||"Component",o=s(n),a=d({},A,{getDisplayName:s,methodName:u,renderCountProp:g,shouldHandleStateChanges:S,storeKey:k,displayName:o,wrappedComponentName:n,WrappedComponent:t}),l=A.pure;var p=l?r.useMemo:function(e){return e()};function E(n){var o=Object(r.useMemo)((function(){var e=n.reactReduxForwardedRef,t=f(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),s=o[0],l=o[1],u=o[2],h=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(m.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:R}),[s,R]),g=Object(r.useContext)(h),E=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var T=E?n.store:g.store,k=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(T)}),[T]),C=Object(r.useMemo)((function(){if(!S)return y;var e=new c(T,E?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[T,E,g]),I=C[0],P=C[1],j=Object(r.useMemo)((function(){return E?g:d({},g,{subscription:I})}),[E,g,I]),A=Object(r.useReducer)(b,v,O),M=A[0][0],D=A[1];if(M&&M.error)throw M.error;var N=Object(r.useRef)(),L=Object(r.useRef)(u),z=Object(r.useRef)(),F=Object(r.useRef)(!1),W=p((function(){return z.current&&u===L.current?z.current:k(T.getState(),u)}),[T,M,u]);w(_,[L,N,F,u,W,z,P]),w(x,[S,T,I,k,L,N,F,z,P,D],[T,I,k]);var B=Object(r.useMemo)((function(){return i.a.createElement(t,d({},W,{ref:l}))}),[l,t,W]);return Object(r.useMemo)((function(){return S?i.a.createElement(h.Provider,{value:j},B):B}),[h,B,j])}var T=l?i.a.memo(E):E;if(T.WrappedComponent=t,T.displayName=o,I){var C=i.a.forwardRef((function(e,t){return i.a.createElement(T,d({},e,{reactReduxForwardedRef:t}))}));return C.displayName=o,C.WrappedComponent=t,h()(C,t)}return h()(T,t)}}function S(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(S(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function F(e,t){return e===t}function W(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?E:n,i=t.mapStateToPropsFactories,o=void 0===i?A:i,a=t.mapDispatchToPropsFactories,s=void 0===a?j:a,l=t.mergePropsFactories,c=void 0===l?M:l,u=t.selectorFactory,p=void 0===u?L:u;return function(e,t,n,i){void 0===i&&(i={});var a=i,l=a.pure,u=void 0===l||l,h=a.areStatesEqual,m=void 0===h?F:h,g=a.areOwnPropsEqual,v=void 0===g?T:g,y=a.areStatePropsEqual,b=void 0===y?T:y,w=a.areMergedPropsEqual,_=void 0===w?T:w,x=f(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=z(e,o,"mapStateToProps"),E=z(t,s,"mapDispatchToProps"),S=z(n,c,"mergeProps");return r(p,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:E,initMergeProps:S,pure:u,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:_},x))}}var B=W();var H,U=n(20);n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return B})),H=U.unstable_batchedUpdates,a=H},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n.n(r),o=n(234),a=n.n(o),s=n(132),l=n.n(s),c=n(174);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t2?n-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=l(e),r=l(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return l(e)>.5?d(e,t):f(e,t)}function u(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function f(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return a(e)}},,function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(447)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(57);function o(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(i.a)(e,n),Object(i.a)(t,n)}}),[e,t])}},,function(e,t,n){"use strict";n.r(t);var r=n(352);n.d(t,"getAnnotations",(function(){return r.c})),n.d(t,"getPresentAnnotationsOnSelectedCanvases",(function(){return r.d})),n.d(t,"getAnnotationResourcesByMotivationForCanvas",(function(){return r.b})),n.d(t,"getAnnotationResourcesByMotivation",(function(){return r.a})),n.d(t,"getSelectedAnnotationId",(function(){return r.e})),n.d(t,"getSelectedAnnotationsOnCanvases",(function(){return r.f}));var i=n(41);n.d(t,"selectInfoResponses",(function(){return i.q})),n.d(t,"getCanvases",(function(){return i.f})),n.d(t,"getCanvas",(function(){return i.a})),n.d(t,"getCurrentCanvas",(function(){return i.g})),n.d(t,"getVisibleCanvasIds",(function(){return i.l})),n.d(t,"getVisibleCanvases",(function(){return i.o})),n.d(t,"getCanvasGroupings",(function(){return i.d})),n.d(t,"getCanvasGrouping",(function(){return i.c})),n.d(t,"getNextCanvasGrouping",(function(){return i.h})),n.d(t,"getPreviousCanvasGrouping",(function(){return i.i})),n.d(t,"getCanvasLabel",(function(){return i.e})),n.d(t,"getCanvasDescription",(function(){return i.b})),n.d(t,"getVisibleCanvasNonTiledResources",(function(){return i.m})),n.d(t,"getVisibleCanvasVideoResources",(function(){return i.n})),n.d(t,"getVisibleCanvasCaptions",(function(){return i.k})),n.d(t,"getVisibleCanvasAudioResources",(function(){return i.j})),n.d(t,"selectInfoResponse",(function(){return i.p}));var o=n(101);n.d(t,"getCompanionWindows",(function(){return o.d})),n.d(t,"getCompanionWindow",(function(){return o.b})),n.d(t,"getThumbnailNavigationPosition",(function(){return o.g})),n.d(t,"getCompanionWindowsForPosition",(function(){return o.f})),n.d(t,"getCompanionWindowsForContent",(function(){return o.e})),n.d(t,"getCompanionWindowIdsForPosition",(function(){return o.c})),n.d(t,"getCompanionAreaVisibility",(function(){return o.a})),n.d(t,"selectCompanionWindowDimensions",(function(){return o.h}));var a=n(73);n.d(t,"getConfig",(function(){return a.a})),n.d(t,"getExportableState",(function(){return a.c})),n.d(t,"getLanguagesFromConfigWithCurrent",(function(){return a.d})),n.d(t,"getShowZoomControlsConfig",(function(){return a.f})),n.d(t,"getTheme",(function(){return a.g})),n.d(t,"getThemeIds",(function(){return a.i})),n.d(t,"getContainerId",(function(){return a.b})),n.d(t,"getThemeDirection",(function(){return a.h})),n.d(t,"getRequestsConfig",(function(){return a.e}));var s=n(26);n.d(t,"getWindowManifests",(function(){return s.g})),n.d(t,"getWindows",(function(){return s.h})),n.d(t,"getWindow",(function(){return s.e})),n.d(t,"getViewer",(function(){return s.d})),n.d(t,"getWorkspace",(function(){return s.i})),n.d(t,"getWindowIds",(function(){return s.f})),n.d(t,"getManifests",(function(){return s.c})),n.d(t,"getManifest",(function(){return s.b})),n.d(t,"getCatalog",(function(){return s.a}));var l=n(67);n.d(t,"getManifestStatus",(function(){return l.m})),n.d(t,"getManifestError",(function(){return l.d})),n.d(t,"getManifestoInstance",(function(){return l.q})),n.d(t,"getManifestLocale",(function(){return l.f})),n.d(t,"getManifestLogo",(function(){return l.g})),n.d(t,"getManifestProvider",(function(){return l.i})),n.d(t,"getManifestHomepage",(function(){return l.e})),n.d(t,"getManifestRenderings",(function(){return l.k})),n.d(t,"getManifestRelatedContent",(function(){return l.j})),n.d(t,"getRequiredStatement",(function(){return l.s})),n.d(t,"getRights",(function(){return l.t})),n.d(t,"getManifestThumbnail",(function(){return l.n})),n.d(t,"getManifestTitle",(function(){return l.o})),n.d(t,"getManifestDescription",(function(){return l.c})),n.d(t,"getManifestUrl",(function(){return l.p})),n.d(t,"getDestructuredMetadata",(function(){return l.a})),n.d(t,"getManifestMetadata",(function(){return l.h})),n.d(t,"getMetadataLocales",(function(){return l.r})),n.d(t,"getManifestSearchService",(function(){return l.l})),n.d(t,"getManifestAutocompleteService",(function(){return l.b}));var c=n(159);n.d(t,"getWindowConfig",(function(){return c.c})),n.d(t,"getWindowTitles",(function(){return c.e})),n.d(t,"getMaximizedWindowsIds",(function(){return c.b})),n.d(t,"getWindowViewType",(function(){return c.f})),n.d(t,"getAllowedWindowViewTypes",(function(){return c.a})),n.d(t,"getWindowDraggability",(function(){return c.d}));var u=n(160);n.d(t,"getElasticLayout",(function(){return u.a})),n.d(t,"getFullScreenEnabled",(function(){return u.b})),n.d(t,"getLatestError",(function(){return u.c})),n.d(t,"getWorkspaceType",(function(){return u.d})),n.d(t,"isFocused",(function(){return u.e}));var d=n(335);n.d(t,"getSearchForWindow",(function(){return d.g})),n.d(t,"getSearchQuery",(function(){return d.i})),n.d(t,"getSearchIsFetching",(function(){return d.h})),n.d(t,"getNextSearchId",(function(){return d.b})),n.d(t,"getSortedSearchHitsForCompanionWindow",(function(){return d.l})),n.d(t,"getSearchAnnotationsForCompanionWindow",(function(){return d.e})),n.d(t,"sortSearchAnnotationsByCanvasOrder",(function(){return d.m})),n.d(t,"getSortedSearchAnnotationsForCompanionWindow",(function(){return d.k})),n.d(t,"getSearchAnnotationsForWindow",(function(){return d.f})),n.d(t,"getSelectedContentSearchAnnotationIds",(function(){return d.j})),n.d(t,"getResourceAnnotationForSearchHit",(function(){return d.c})),n.d(t,"getResourceAnnotationLabel",(function(){return d.d})),n.d(t,"getCanvasForAnnotation",(function(){return d.a}));var f=n(131);n.d(t,"getVisibleNodeIds",(function(){return f.e})),n.d(t,"getManuallyExpandedNodeIds",(function(){return f.c})),n.d(t,"getExpandedNodeIds",(function(){return f.b})),n.d(t,"getNodeIdToScrollTo",(function(){return f.d})),n.d(t,"getDefaultSidebarVariant",(function(){return f.a}));var p=n(163);n.d(t,"getCanvasLayers",(function(){return p.a})),n.d(t,"getLayers",(function(){return p.b})),n.d(t,"getSortedLayers",(function(){return p.d})),n.d(t,"getLayersForVisibleCanvases",(function(){return p.c}));var h=n(52);n.d(t,"getSequences",(function(){return h.g})),n.d(t,"getSequence",(function(){return h.b})),n.d(t,"getCanvasIndex",(function(){return h.a})),n.d(t,"getSequenceViewingHint",(function(){return h.f})),n.d(t,"getSequenceViewingDirection",(function(){return h.e})),n.d(t,"getSequenceBehaviors",(function(){return h.c})),n.d(t,"getSequenceTreeStructure",(function(){return h.d}));var m=n(331);n.d(t,"getAuthProfiles",(function(){return m.c})),n.d(t,"getAccessTokens",(function(){return m.a})),n.d(t,"getAuth",(function(){return m.b})),n.d(t,"selectCurrentAuthServices",(function(){return m.d}));var g=n(30);n.d(t,"miradorSlice",(function(){return g.a}));var v=n(351);n.d(t,"getCurrentCanvasWorld",(function(){return v.a}))},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t);var i=n(231),o=n(4),a=n.n(o);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var l=s;var c=(o.elementType,function(){return null});n(25),n(1);function u(e){return e}var d=n(166),f=n(71),p=n(81),h=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function m(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||((t="".concat(e).match(h))&&t[1]||"")||n}function g(e,t,n){var r=m(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function v(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return m(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case p.ForwardRef:return g(e,e.render,"ForwardRef");case p.Memo:return g(e,e.type,"memo");default:return}}}function y(e,t,n,r,i){return null}var b="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object]);n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return i.a})),n.d(t,"elementAcceptingRef",(function(){return l})),n.d(t,"elementTypeAcceptingRef",(function(){return c})),n.d(t,"exactProp",(function(){return u})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return v})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return b})),n.d(t,"refType",(function(){return w}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"i",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(7),i=n(30);function o(e){return Object.values(Object(i.a)(e).windows).map((function(e){return e.manifestId}))}function a(e){return Object(i.a)(e).windows||{}}function s(e,t){var n=t.windowId;return a(e)[n]}var l=Object(r.createSelector)([function(e){return Object(i.a)(e).viewers},function(e,t){return t.windowId}],(function(e,t){return e[t]}));function c(e){return Object(i.a)(e).workspace}var u=Object(r.createSelector)([c],(function(e){return e.windowIds||[]}));function d(e){return Object(i.a)(e).manifests||{}}function f(e,t){var n=t.manifestId,r=t.windowId,i=d(e);return i&&i[n||r&&(s(e,{windowId:r})||{}).manifestId]}function p(e){return Object(i.a)(e).catalog||{}}},function(e,t,n){"use strict";n.r(t);var r=n(341);n.d(t,"addCompanionWindow",(function(){return r.a})),n.d(t,"addOrUpdateCompanionWindow",(function(){return r.b})),n.d(t,"updateCompanionWindow",(function(){return r.e})),n.d(t,"removeCompanionWindow",(function(){return r.c})),n.d(t,"toggleNode",(function(){return r.d}));var i=n(161);n.d(t,"importConfig",(function(){return i.a})),n.d(t,"setConfig",(function(){return i.c})),n.d(t,"updateConfig",(function(){return i.d})),n.d(t,"importMiradorState",(function(){return i.b}));var o=n(342);n.d(t,"addError",(function(){return o.a})),n.d(t,"removeError",(function(){return o.b}));var a=n(334);n.d(t,"focusWindow",(function(){return a.b})),n.d(t,"addWindow",(function(){return a.a})),n.d(t,"updateWindow",(function(){return a.l})),n.d(t,"maximizeWindow",(function(){return a.d})),n.d(t,"minimizeWindow",(function(){return a.e})),n.d(t,"setCompanionAreaOpen",(function(){return a.g})),n.d(t,"removeWindow",(function(){return a.f})),n.d(t,"toggleWindowSideBar",(function(){return a.k})),n.d(t,"setWindowThumbnailPosition",(function(){return a.h})),n.d(t,"setWindowViewType",(function(){return a.i})),n.d(t,"showCollectionDialog",(function(){return a.j})),n.d(t,"hideCollectionDialog",(function(){return a.c}));var s=n(330);n.d(t,"requestManifest",(function(){return s.e})),n.d(t,"receiveManifest",(function(){return s.b})),n.d(t,"receiveManifestFailure",(function(){return s.c})),n.d(t,"fetchManifest",(function(){return s.a})),n.d(t,"removeManifest",(function(){return s.d}));var l=n(332);n.d(t,"requestInfoResponse",(function(){return l.f})),n.d(t,"receiveInfoResponse",(function(){return l.c})),n.d(t,"receiveDegradedInfoResponse",(function(){return l.b})),n.d(t,"receiveInfoResponseFailure",(function(){return l.d})),n.d(t,"fetchInfoResponse",(function(){return l.a})),n.d(t,"removeInfoResponse",(function(){return l.e}));var c=n(307);n.d(t,"setCanvas",(function(){return c.a})),n.d(t,"setNextCanvas",(function(){return c.b})),n.d(t,"setPreviousCanvas",(function(){return c.c})),n.d(t,"updateViewport",(function(){return c.d}));var u=n(336);n.d(t,"updateWorkspace",(function(){return u.g})),n.d(t,"setWorkspaceFullscreen",(function(){return u.b})),n.d(t,"toggleZoomControls",(function(){return u.f})),n.d(t,"updateWorkspaceMosaicLayout",(function(){return u.h})),n.d(t,"setWorkspaceAddVisibility",(function(){return u.a})),n.d(t,"setWorkspaceViewportPosition",(function(){return u.d})),n.d(t,"setWorkspaceViewportDimensions",(function(){return u.c})),n.d(t,"toggleDraggingEnabled",(function(){return u.e}));var d=n(329);n.d(t,"requestCanvasAnnotations",(function(){return d.f})),n.d(t,"requestAnnotation",(function(){return d.e})),n.d(t,"receiveAnnotation",(function(){return d.c})),n.d(t,"receiveAnnotationFailure",(function(){return d.d})),n.d(t,"selectAnnotation",(function(){return d.g})),n.d(t,"deselectAnnotation",(function(){return d.a})),n.d(t,"toggleAnnotationDisplay",(function(){return d.h})),n.d(t,"hoverAnnotation",(function(){return d.b}));var f=n(337);n.d(t,"addAuthenticationRequest",(function(){return f.a})),n.d(t,"resolveAuthenticationRequest",(function(){return f.g})),n.d(t,"requestAccessToken",(function(){return f.d})),n.d(t,"receiveAccessToken",(function(){return f.b})),n.d(t,"receiveAccessTokenFailure",(function(){return f.c})),n.d(t,"resolveAccessTokenRequest",(function(){return f.f})),n.d(t,"resetAuthenticationState",(function(){return f.e}));var p=n(343);n.d(t,"updateElasticWindowLayout",(function(){return p.a}));var h=n(333);n.d(t,"requestSearch",(function(){return h.e})),n.d(t,"receiveSearch",(function(){return h.b})),n.d(t,"receiveSearchFailure",(function(){return h.c})),n.d(t,"removeSearch",(function(){return h.d})),n.d(t,"fetchSearch",(function(){return h.a})),n.d(t,"setContentSearchCurrentAnnotation",(function(){return h.f}));var m=n(344);n.d(t,"updateLayers",(function(){return m.a}));var g=n(345);n.d(t,"addResource",(function(){return g.a})),n.d(t,"removeResource",(function(){return g.b}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(66);function i(e){return r.a.state.slice?e[r.a.state.slice]:e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(53),i=n(11),o=n(63),a=(n(232),function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}),s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.canvas.getLabel().getValue():String(this.canvas.index+1)}},{key:"id",get:function(){return this.canvas.id}},{key:"aspectRatio",get:function(){return this.canvas.getWidth()/this.canvas.getHeight()}},{key:"annotationListUris",get:function(){return i()(new Array(this.canvas.__jsonld.otherContent)).filter((function(e){return e&&("string"==typeof e||"sc:AnnotationList"===e["@type"])})).map((function(e){return"string"==typeof e?e:e["@id"]}))}},{key:"canvasAnnotationPages",get:function(){return i()(new Array(this.canvas.__jsonld.annotations)).filter((function(e){return e&&"AnnotationPage"===e.type}))}},{key:"imageResource",get:function(){return this.imageResources[0]}},{key:"imageResources",get:function(){var e=this,t=a()([this.canvas.getImages().map((function(e){return e.getResource()})),this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(t.map((function(t){switch(t.getProperty("type")){case"oa:Choice":return new s.a({images:i()([t.getProperty("default"),t.getProperty("item")]).map((function(e){return{resource:e}}))},e.canvas.options).getImages().map((function(e){return e.getResource()}));default:return t}})))}},{key:"videoResources",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"Video"===e.getProperty("type")})))}},{key:"audioResources",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"Sound"===e.getProperty("type")})))}},{key:"vttContent",get:function(){var e=a()([this.canvas.getContent().map((function(e){return e.getBody()}))]);return i()(e.filter((function(e){return"text/vtt"===e.getProperty("format")})))}},{key:"resourceAnnotations",get:function(){return a()([this.canvas.getImages(),this.canvas.getContent()])}},{key:"iiifImageResources",get:function(){return this.imageResources.filter((function(e){return e&&e.getServices()[0]&&e.getServices()[0].id}))}},{key:"imageServiceIds",get:function(){return this.iiifImageResources.map((function(e){return e.getServices()[0].id}))}},{key:"service",get:function(){return this.canvas.__jsonld.service}}])&&l(t.prototype,n),r&&l(t,r),e}()},function(e,t,n){"use strict";var r=n(7),i=n(16),o=n.n(i);function a(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"single";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvases=t,this.viewType=n,this._groupings=null}var t,n,r;return t=e,(n=[{key:"getCanvases",value:function(e){switch(this.viewType){case"book":return this.groupings()[Math.ceil(e/2)];default:return this.groupings()[e]}}},{key:"groupings",value:function(){if(this._groupings)return this._groupings;if("scroll"===this.viewType)return[this.canvases];if("book"!==this.viewType)return this.canvases.map((function(e){return[e]}));var e=[];return this.canvases.forEach((function(t,n){0!==n?n%2!=0?e.push([t]):e[Math.ceil(n/2)].push(t):e.push([t])})),this._groupings=e,e}}])&&a(t.prototype,n),r&&a(t,r),e}(),l=n(40),c=n(30),u=n(26),d=n(52),f=n(159);n.d(t,"q",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"o",(function(){return y})),n.d(t,"d",(function(){return b})),n.d(t,"c",(function(){return w})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return x})),n.d(t,"e",(function(){return O})),n.d(t,"b",(function(){return E})),n.d(t,"m",(function(){return S})),n.d(t,"n",(function(){return T})),n.d(t,"k",(function(){return k})),n.d(t,"j",(function(){return C})),n.d(t,"p",(function(){return I}));var p=function(e){return Object(c.a)(e).infoResponses},h=Object(r.createSelector)([d.b],(function(e){return e&&e.getCanvases()||[]})),m=Object(r.createSelector)([d.b,function(e,t){return t.canvasId}],(function(e,t){if(e&&t)return e.getCanvasById(t)})),g=Object(r.createSelector)([d.b,u.e],(function(e,t){if(e&&t)return t.canvasId?e.getCanvasById(t.canvasId):e.getCanvasByIndex(0)})),v=Object(r.createSelector)([u.e],(function(e){return e&&(e.visibleCanvases||e.canvasId&&[e.canvasId])||[]})),y=Object(r.createSelector)([v,h],(function(e,t){return(t||[]).filter((function(t){return e.includes(t.id)}))})),b=Object(r.createSelector)([h,f.f],(function(e,t){return e&&new s(e,t).groupings()})),w=Object(r.createSelector)([b,function(e,t){return t.canvasId}],(function(e,t){return e&&e.find((function(e){return e.some((function(e){return e.id===t}))}))||[]})),_=Object(r.createSelector)([b,g],(function(e,t,n){if(e&&t){var r=e.findIndex((function(e){return e.some((function(e){return e.id===t.id}))}));if(!(r<0||r+1>=e.length))return e[r+1]}})),x=Object(r.createSelector)([b,g],(function(e,t,n){if(e&&t){var r=e.findIndex((function(e){return e.some((function(e){return e.id===t.id}))}));if(!(r<1))return e[r-1]}})),O=Object(r.createSelector)([m],(function(e){return e&&(e.getLabel().length>0?e.getLabel().getValue():String(e.index+1))})),E=Object(r.createSelector)([m],(function(e){return e&&e.getProperty("description")})),S=Object(r.createSelector)([y],(function(e){return o()(e.map((function(e){return new l.a(e).imageResources}))).filter((function(e){return e.getServices().length<1}))})),T=Object(r.createSelector)([y],(function(e){return o()(e.map((function(e){return new l.a(e).videoResources})))})),k=Object(r.createSelector)([y],(function(e){return o()(e.map((function(e){return new l.a(e).vttContent})))})),C=Object(r.createSelector)([y],(function(e){return o()(e.map((function(e){return new l.a(e).audioResources})))})),I=Object(r.createSelector)([function(e,t){return t.infoId},m,p],(function(e,t,n){var r=e;if(!e){if(!t)return;var i=new l.a(t).iiifImageResources[0];r=i&&i.getServices()[0].id}return r&&n[r]&&!n[r].isFetching&&n[r]}))},,function(e,t,n){var r=n(248);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(98)},function(e,t,n){var r=n(121),i=n(217),o=n(592),a=n(122),s=n(125),l=n(594),c=n(313),u=n(264),d=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=a(t,e),c||(c=t.length>1),t})),s(e,u(e),n),c&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},function(e,t,n){"use strict";var r=n(357);var i=n(165),o=n(358);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return ve})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return me})),n.d(t,"e",(function(){return ge})),n.d(t,"f",(function(){return p}));var r=n(1),i=n(106),o=(n(126),n(115)),a=n(59),s=n(47),l=n(58),c={}.constructor;function u(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(u);if(e.constructor!==c)return e;var t={};for(var n in e)t[n]=u(e[n]);return t}function d(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=u(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var f=function(e,t){for(var n="",r=0;r<+~=|^:(),"'`\s])/g,v="undefined"!=typeof CSS&&CSS.escape,y=function(e){return v?v(e):e.replace(g,"\\$1")},b=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),w=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,l=r.sheet,c=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=c(Object(s.a)(Object(s.a)(i)),l),i.selectorText="."+y(i.id)),i}Object(a.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=p(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return m(this.selectorText,this.style,n)},Object(o.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(b),_={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new w(e,t,n)}},x={indent:1,children:!0},O=/@([\w-]+)/,E=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var i=e.match(O);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new $(Object(r.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=x),null==e.indent&&(e.indent=x.indent),null==e.children&&(e.children=x.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),S=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return S.test(e)?new E(e,t,n):null}},k={indent:1,children:!0},C=/@keyframes\s+([\w-]+)/,I=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(C);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===o?this.name:y(s(this,a)),this.rules=new $(Object(r.a)({},n,{parent:this})),t)this.rules.add(l,t[l],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=k),null==e.indent&&(e.indent=k.indent),null==e.children&&(e.children=k.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),P=/@keyframes\s+/,j=/\$([\w-]+)/g,A=function(e,t){return"string"==typeof e?e.replace(j,(function(e,n){return n in t?t[n]:e})):e},R=function(e,t,n){var r=e[t],i=A(r,n);i!==r&&(e[t]=i)},M={onCreateRule:function(e,t,n){return"string"==typeof e&&P.test(e)?new I(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&R(e,"animation-name",n.keyframes),"animation"in e&&R(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(l.a)(t,["attached"]),i="",o=0;o0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=ae(),n=0;nn?n:t},de=function(){var e=document.createElement("style");return e.textContent="\n",e},fe=function(){function e(e){this.getPropertyValue=ne,this.setProperty=re,this.removeProperty=ie,this.setSelector=oe,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&Z.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||de(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=le();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=se(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else ae().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e){var t=e["aria-label"],n=e.badge,r=e.children,i=e.containerId,o=(e.dispatch,e.BadgeProps),a=e.TooltipProps,p=f(e,["badge","children","containerId","dispatch","BadgeProps","TooltipProps"]),h=s.a.createElement(c.a,p,n?s.a.createElement(l.a,o,r):r);return p.disabled?h:s.a.createElement(u.a,Object.assign({PopperProps:{container:document.querySelector("#".concat(i," .").concat(Object(d.a)("viewer")))},title:t},a),h)}p.defaultProps={badge:!1,BadgeProps:{},dispatch:function(){},TooltipProps:{}};var h=n(73),m=Object(r.compose)(Object(i.b)((function(e){return{containerId:Object(h.b)(e)}}),null),Object(o.a)("MiradorMenuButton"));t.a=m(p)},function(e,t,n){"use strict";var r=n(12),i=n(14),o=n(877),a=n(10),s=n(359),l=n(15),c=n(0),u=n.n(c),d=n(341),f=n(27),p=n(101),h=n(159),m=n(73),g=n(268),v=n.n(g),y=n(380),b=n.n(y),w=n(381),_=n.n(w),x=n(835),O=n(109),E=n(836),S=n(353),T=n(50),k=n(36);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t0})}),(function(e,t){var n=t.windowId,r=t.id;return{onCloseClick:function(){return e(d.c(n,r))},updateCompanionWindow:function(){for(var t=arguments.length,i=new Array(t),o=0;o-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(r="native");else{var o=this.getImages();if(o&&o.length){var a=o[0].getResource(),s=a.getServices();if(i||(i=a.getWidth()),s.length){var l=s[0];n=l.id,r=$.a.getImageQuality(l.getProfile())}else if(i===a.getWidth())return a.id}if(!n){var c=this.getProperty("thumbnail");if(c){if("string"==typeof c)return c;if(c["@id"])return c["@id"];if(c.length)return c[0].id}}}return t=i+",",n&&n.endsWith("/")&&(n=n.substr(0,n.length-1)),[n,"full",t,0,r+".jpg"].join("/")},t.prototype.getMaxDimensions=function(){var e,t=null;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(e=this.externalResource.data.profile,Array.isArray(e)&&(e=e.filter((function(e){return e.maxWidth}))[0])&&(t=new B(e.maxWidth,e.maxHeight?e.maxHeight:e.maxWidth))),t},t.prototype.getContent=function(){var e=[],t=this.__jsonld.items||this.__jsonld.content;if(!t)return e;var n=null;if(t.length&&(n=new w(t[0],this.options)),!n)return e;for(var r=n.getItems(),i=0;i "),null===this.value?null:(Array.isArray(e)&&!e.length&&(e=void 0),this.value.getValue(e||this.defaultLocale,t))},e.prototype.getValues=function(e){return null===this.value?[]:(Array.isArray(e)&&!e.length&&(e=void 0),this.value.getValues(e||this.defaultLocale))},e.prototype.setValue=function(e){null===this.value&&(this.value=new C.a([])),this.value.setValue(e,this.defaultLocale)},e}(),k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}k(t,e),t.getValue=function(e,t){return e.getValue(t," ")},t.getValues=function(e,t){return e.getValues(t)}}(Array),n(82)),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){function t(t,n){var r=e.call(this,t,n)||this;if(r.index=0,r._allRanges=null,r.items=[],r._topRanges=[],r.__jsonld.structures&&r.__jsonld.structures.length)for(var i=r._getTopRanges(),o=0;o1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===a.ViewingHint.PAGED;var t=this.getBehavior();return!!t&&t===a.Behavior.PAGED},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t}(f);!function(e){e.EMPTY="",e.MANUSCRIPT="manuscript",e.MONOGRAPH="monograph"}(i||(i={}));var j,A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._ranges=null,r.canvases=null,r.items=[],r}return A(t,e),t.prototype.getCanvasIds=function(){return this.__jsonld.canvases?this.__jsonld.canvases:this.canvases?this.canvases:[]},t.prototype.getDuration=function(){if(this.canvases&&this.canvases.length){for(var e=[],t=[],n=0,r=this.canvases;n1&&(0===f&&(u=Number(h[0])),f===this.canvases.length-1&&(d=Number(h[1])))}else{var m=this.getRanges();for(f=0;f=t.start&&e<=t.end)},t.prototype._parseTreeNode=function(e,t){e.label=t.getLabel().getValue(this.options.locale),e.data=t,e.data.type=$.a.normaliseType(H.RANGE),t.treeNode=e;var n=t.getRanges();if(n&&n.length)for(var r=0;r=0;t--){var n=this.getCanvasByIndex(t).getLabel().getValue(this.options.locale);if(e){if(/^[a-zA-Z0-9]*$/.test(n))return n}else if(n)return n}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[0]+1:r[r.length-1]+1}else n=e+1;return n>this.getLastPageIndex()?-1:n},t.prototype.getPagedIndices=function(e,t){var n=[];if(t){n=this.isFirstCanvas(e)||this.isLastCanvas(e)?[e]:e%2?[e,e+1]:[e-1,e];var r=this.getViewingDirection();r&&r===a.ViewingDirection.RIGHT_TO_LEFT&&(n=n.reverse())}else n.push(e);return n},t.prototype.getPrevPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[r.length-1]-1:r[0]-1}else n=e-1;return n},t.prototype.getStartCanvasIndex=function(){var e=this.getStartCanvas();if(e)for(var t=0;tthis.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(e){return 0===e},t.prototype.isLastCanvas=function(e){return e===this.getTotalCanvases()-1},t.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();return!!e&&e===a.ViewingHint.PAGED},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2==0},t}(l),z=function(){function e(){}return e.parse=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),this.parseJson(e,t)},e.parseJson=function(e,t){var n;if(t&&t.navDate&&!isNaN(t.navDate.getTime())&&(e.navDate=t.navDate.toString()),e["@type"])switch(e["@type"]){case"sc:Collection":n=this.parseCollection(e,t);break;case"sc:Manifest":n=this.parseManifest(e,t);break;default:return null}else switch(e.type){case"Collection":n=this.parseCollection(e,t);break;case"Manifest":n=this.parseManifest(e,t);break;default:return null}return n.isLoaded=!0,n},e.parseCollection=function(e,t){var n=new E(e,t);return t?(n.index=t.index||0,t.resource&&(n.parentCollection=t.resource.parentCollection)):n.index=0,this.parseCollections(n,t),this.parseManifests(n,t),this.parseItems(n,t),n},e.parseCollections=function(e,t){var n;if(e.__jsonld.collections?n=e.__jsonld.collections:e.__jsonld.items&&(n=e.__jsonld.items.filter((function(e){return"collection"===e.type.toLowerCase()}))),n)for(var r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(10),i=n(0),o=n.n(i),a=n(243),s=n.n(a),l=n(36),c={iiif:{ALLOWED_ATTR:["href","src","alt"],ALLOWED_TAGS:["a","b","br","i","img","p","span"]},liberal:{},mirador2:{ALLOWED_ATTR:["href","target","src","alt","dir"],ALLOWED_TAGS:["a","b","br","i","img","p","span","strong","em","ul","ol","li"]},noHtml:{ALLOWED_TAGS:[]}};function u(e,t){for(var n=0;nAxmTYklsjo190QW',r=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return r.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},r.prototype.load=function(){var e,r=new Date,i=this,o=i.serif,a=i.sansSerif,s=i.parent,l=i.appended,c=i.options,u=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var f=n.replace(/\%s/,d("sans-serif")),p=n.replace(/\%s/,d("serif"));function h(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=i.parent=c.window.document.createElement("div")),s.innerHTML=f+p,a=i.sansSerif=s.firstChild,o=i.serif=a.nextSibling,c.glyphs&&(a.innerHTML+=c.glyphs,o.innerHTML+=c.glyphs),function t(){u||(u=c.window.document.body),!l&&u&&(u.appendChild(s),l=i.appended=!0,e=i.getMeasurements(),a.style.fontFamily=i.fontFamily+", sans-serif",o.style.fontFamily=i.fontFamily+", serif"),l&&e&&(h(e.sansSerif,a,c.tolerance)||h(e.serif,o,c.tolerance))?c.success():(new Date).getTime()-r.getTime()>c.timeout?c.error():!l&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},r.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},r.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},r.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},r.prototype.init=function(t,n){var r;for(var i in e)n.hasOwnProperty(i)||(n[i]=e[i]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(r=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(r)):this.load()},function(e,t){var n=new r;return n.init(e,t),n}})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(96);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.locale||t.language})),g=Object(r.createSelector)([u.b],(function(e){return e||{missing:!0}})),v=Object(r.createSelector)([u.b],(function(e){return e&&e.error})),y=o()(u.b,m,(function(e,t){return e&&h(e.json,t)}))((function(e,t){var n=t.companionWindowId;return[t.manifestId,t.windowId,m(e,{companionWindowId:n})].join(" - ")})),b=Object(r.createSelector)(y,(function(e,t){return t.json}),m,(function(e,t,n){return t&&h(t,n)||e})),w=Object(r.createSelector)([b],(function(e){return e&&e.options&&e.options.locale&&e.options.locale.replace(/-.*$/,"")}));function _(e){return Object(r.createSelector)([b],(function(t){return t&&t.getProperty(e)}))}var x=Object(r.createSelector)([b],(function(e){return e&&e.getLogo()})),O=Object(r.createSelector)([_("provider"),w],(function(e,t){return e&&e[0].label&&a.a.parse(e[0].label,t).getValue()}));function E(e){return Array.isArray(e)?e:[e]}var S=Object(r.createSelector)([_("homepage"),w],(function(e,t){return e&&E(e).map((function(e){return{label:a.a.parse(e.label,t).getValue(),value:e.id||e["@id"]}}))})),T=Object(r.createSelector)([b],(function(e){return e&&e.getRenderings().map((function(e){return{label:e.getLabel().getValue(),value:e.id}}))})),k=Object(r.createSelector)([_("seeAlso"),w],(function(e,t){return e&&E(e).map((function(e){return{format:e.format,label:a.a.parse(e.label,t).getValue(),value:e.id||e["@id"]}}))})),C=Object(r.createSelector)([b],(function(e){return e&&E(e.getRequiredStatement()).filter((function(e){return e.getValues().some((function(e){return e}))})).map((function(e){return{label:e.label&&e.label.getValue()||null,values:e.getValues()}}))})),I=Object(r.createSelector)([_("rights"),_("license"),w],(function(e,t,n){var r=e||t;return E(a.a.parse(r,n).getValues())}));function P(e,t){var n=b(e,t);if(n){var r=Object(l.a)(n,{maxHeight:80,maxWidth:120});return r&&r.url}}var j=Object(r.createSelector)([b],(function(e){return e&&e.getLabel().getValue()})),A=Object(r.createSelector)([b],(function(e){return e&&e.getDescription().getValue()})),R=Object(r.createSelector)([b],(function(e){return e&&e.id}));function M(e){return e&&e.getMetadata().map((function(e){return{label:e.getLabel(),values:e.getValues()}}))}var D=Object(r.createSelector)([b],(function(e){return e&&M(e)}));function N(e){var t=[];return Array.isArray(e)?t.push.apply(t,f(e.filter((function(e){return"object"==typeof e&&e["@language"]})).map((function(e){return e["@language"]})))):e&&"object"==typeof e&&e["@language"]&&t.push(e["@language"]),t}var L=Object(r.createSelector)([b],(function(e){return function(e){if(!e)return[];for(var t=e.getProperty("metadata")||[],n={},r=0;r1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(t.previews);try{for(r.s();!(n=r.n()).done;){n.value.backendChanged(e)}}catch(e){r.e(e)}finally{r.f()}},this.previews=[]},f=function e(t,n,r){var i=this;u(this,e),this.setup=function(){if("undefined"!=typeof window){if(i.constructor.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");i.constructor.isSetUp=!0,i.addEventListeners(window),i.backends[i.current].instance.setup()}},this.teardown=function(){"undefined"!=typeof window&&(i.constructor.isSetUp=!1,i.removeEventListeners(window),i.backends[i.current].instance.teardown())},this.connectDragSource=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n
@@ -6,40 +18,58 @@
* Released under MIT license
* Based on Underscore.js 1.8.3
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,f=2,h=4,m=1,g=2,v=1,y=2,b=4,w=8,_=16,x=32,k=64,T=128,S=256,E=512,C=30,P="...",O=800,M=16,R=1,A=2,I=1/0,L=9007199254740991,z=17976931348623157e292,D=NaN,N=4294967295,H=N-1,j=N>>>1,B=[["ary",T],["bind",v],["bindKey",y],["curry",w],["curryRight",_],["flip",E],["partial",x],["partialRight",k],["rearg",S]],F="[object Arguments]",W="[object Array]",U="[object AsyncFunction]",V="[object Boolean]",q="[object Date]",$="[object DOMException]",G="[object Error]",Z="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",K="[object Number]",Q="[object Null]",J="[object Object]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",ie="[object String]",re="[object Symbol]",oe="[object Undefined]",ae="[object WeakMap]",se="[object WeakSet]",le="[object ArrayBuffer]",ce="[object DataView]",ue="[object Float32Array]",de="[object Float64Array]",pe="[object Int8Array]",fe="[object Int16Array]",he="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ve="[object Uint16Array]",ye="[object Uint32Array]",be=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Te=RegExp(xe.source),Se=RegExp(ke.source),Ee=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Oe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Me=/^\w*$/,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ae=/[\\^$.*+?()[\]{}|]/g,Ie=RegExp(Ae.source),Le=/^\s+|\s+$/g,ze=/^\s+/,De=/\s+$/,Ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,He=/\{\n\/\* \[wrapped with (.+)\] \*/,je=/,? & /,Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,We=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ue=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,$e=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ze=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xe=/($^)/,Ke=/['\n\r\u2028\u2029\\]/g,Qe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+Je+"]",nt="["+Qe+"]",it="\\d+",rt="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",at="[^\\ud800-\\udfff"+Je+it+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",lt="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",ut="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+ot+"|"+at+")",ft="(?:"+dt+"|"+at+")",ht="(?:"+nt+"|"+st+")"+"?",mt="[\\ufe0e\\ufe0f]?"+ht+("(?:\\u200d(?:"+[lt,ct,ut].join("|")+")[\\ufe0e\\ufe0f]?"+ht+")*"),gt="(?:"+[rt,ct,ut].join("|")+")"+mt,vt="(?:"+[lt+nt+"?",nt,ct,ut,et].join("|")+")",yt=RegExp("['’]","g"),bt=RegExp(nt,"g"),wt=RegExp(st+"(?="+st+")|"+vt+mt,"g"),_t=RegExp([dt+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,dt,"$"].join("|")+")",ft+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,dt+pt,"$"].join("|")+")",dt+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",it,gt].join("|"),"g"),xt=RegExp("[\\u200d\\ud800-\\udfff"+Qe+"\\ufe0e\\ufe0f]"),kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],St=-1,Et={};Et[ue]=Et[de]=Et[pe]=Et[fe]=Et[he]=Et[me]=Et[ge]=Et[ve]=Et[ye]=!0,Et[F]=Et[W]=Et[le]=Et[V]=Et[ce]=Et[q]=Et[G]=Et[Z]=Et[X]=Et[K]=Et[J]=Et[te]=Et[ne]=Et[ie]=Et[ae]=!1;var Ct={};Ct[F]=Ct[W]=Ct[le]=Ct[ce]=Ct[V]=Ct[q]=Ct[ue]=Ct[de]=Ct[pe]=Ct[fe]=Ct[he]=Ct[X]=Ct[K]=Ct[J]=Ct[te]=Ct[ne]=Ct[ie]=Ct[re]=Ct[me]=Ct[ge]=Ct[ve]=Ct[ye]=!0,Ct[G]=Ct[Z]=Ct[ae]=!1;var Pt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ot=parseFloat,Mt=parseInt,Rt="object"==typeof e&&e&&e.Object===Object&&e,At="object"==typeof self&&self&&self.Object===Object&&self,It=Rt||At||Function("return this")(),Lt=t&&!t.nodeType&&t,zt=Lt&&"object"==typeof i&&i&&!i.nodeType&&i,Dt=zt&&zt.exports===Lt,Nt=Dt&&Rt.process,Ht=function(){try{var e=zt&&zt.require&&zt.require("util").types;return e||Nt&&Nt.binding&&Nt.binding("util")}catch(e){}}(),jt=Ht&&Ht.isArrayBuffer,Bt=Ht&&Ht.isDate,Ft=Ht&&Ht.isMap,Wt=Ht&&Ht.isRegExp,Ut=Ht&&Ht.isSet,Vt=Ht&&Ht.isTypedArray;function qt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function $t(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r-1}function Qt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i-1;);return n}function _n(e,t){for(var n=e.length;n--&&ln(t,e[n],0)>-1;);return n}var xn=fn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),kn=fn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Tn(e){return"\\"+Pt[e]}function Sn(e){return xt.test(e)}function En(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Cn(e,t){return function(n){return e(t(n))}}function Pn(e,t){for(var n=-1,i=e.length,r=0,o=[];++n",""":'"',"'":"'"});var Ln=function e(t){var n,i=(t=null==t?It:Ln.defaults(It.Object(),t,Ln.pick(It,Tt))).Array,r=t.Date,Qe=t.Error,Je=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,it=t.String,rt=t.TypeError,ot=i.prototype,at=Je.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ct=at.toString,ut=st.hasOwnProperty,dt=0,pt=(n=/[^.]+$/.exec(lt&<.keys&<.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ft=st.toString,ht=ct.call(tt),mt=It._,gt=nt("^"+ct.call(ut).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=Dt?t.Buffer:o,wt=t.Symbol,xt=t.Uint8Array,Pt=vt?vt.allocUnsafe:o,Rt=Cn(tt.getPrototypeOf,tt),At=tt.create,Lt=st.propertyIsEnumerable,zt=ot.splice,Nt=wt?wt.isConcatSpreadable:o,Ht=wt?wt.iterator:o,on=wt?wt.toStringTag:o,fn=function(){try{var e=jo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),zn=t.clearTimeout!==It.clearTimeout&&t.clearTimeout,Dn=r&&r.now!==It.Date.now&&r.now,Nn=t.setTimeout!==It.setTimeout&&t.setTimeout,Hn=et.ceil,jn=et.floor,Bn=tt.getOwnPropertySymbols,Fn=vt?vt.isBuffer:o,Wn=t.isFinite,Un=ot.join,Vn=Cn(tt.keys,tt),qn=et.max,$n=et.min,Gn=r.now,Zn=t.parseInt,Yn=et.random,Xn=ot.reverse,Kn=jo(t,"DataView"),Qn=jo(t,"Map"),Jn=jo(t,"Promise"),ei=jo(t,"Set"),ti=jo(t,"WeakMap"),ni=jo(tt,"create"),ii=ti&&new ti,ri={},oi=da(Kn),ai=da(Qn),si=da(Jn),li=da(ei),ci=da(ti),ui=wt?wt.prototype:o,di=ui?ui.valueOf:o,pi=ui?ui.toString:o;function fi(e){if(Ps(e)&&!vs(e)&&!(e instanceof vi)){if(e instanceof gi)return e;if(ut.call(e,"__wrapped__"))return pa(e)}return new gi(e)}var hi=function(){function e(){}return function(t){if(!Cs(t))return{};if(At)return At(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function mi(){}function gi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function vi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=N,this.__views__=[]}function yi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function zi(e,t,n,i,r,a){var s,l=t&p,c=t&f,u=t&h;if(n&&(s=r?n(e,i,r,a):n(e)),s!==o)return s;if(!Cs(e))return e;var d=vs(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ut.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return no(e,s)}else{var m=Wo(e),g=m==Z||m==Y;if(_s(e))return Xr(e,l);if(m==J||m==F||g&&!r){if(s=c||g?{}:Vo(e),!l)return c?function(e,t){return io(e,Fo(e),t)}(e,function(e,t){return e&&io(t,ol(t),e)}(s,e)):function(e,t){return io(e,Bo(e),t)}(e,Ri(s,e))}else{if(!Ct[m])return r?e:{};s=function(e,t,n){var i=e.constructor;switch(t){case le:return Kr(e);case V:case q:return new i(+e);case ce:return function(e,t){var n=t?Kr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case ue:case de:case pe:case fe:case he:case me:case ge:case ve:case ye:return Qr(e,n);case X:return new i;case K:case ie:return new i(e);case te:return function(e){var t=new e.constructor(e.source,Ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ne:return new i;case re:return r=e,di?tt(di.call(r)):{}}var r}(e,m,l)}}a||(a=new xi);var v=a.get(e);if(v)return v;a.set(e,s),Is(e)?e.forEach((function(i){s.add(zi(i,t,n,i,e,a))})):Os(e)&&e.forEach((function(i,r){s.set(r,zi(i,t,n,r,e,a))}));var y=d?o:(u?c?Ao:Ro:c?ol:rl)(e);return Gt(y||e,(function(i,r){y&&(i=e[r=i]),Pi(s,r,zi(i,t,n,r,e,a))})),s}function Di(e,t,n){var i=n.length;if(null==e)return!i;for(e=tt(e);i--;){var r=n[i],a=t[r],s=e[r];if(s===o&&!(r in e)||!a(s))return!1}return!0}function Ni(e,t,n){if("function"!=typeof e)throw new rt(l);return ra((function(){e.apply(o,n)}),t)}function Hi(e,t,n,i){var r=-1,o=Kt,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=Jt(t,vn(n))),i?(o=Qt,s=!1):t.length>=a&&(o=bn,s=!1,t=new _i(t));e:for(;++r-1},bi.prototype.set=function(e,t){var n=this.__data__,i=Oi(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},wi.prototype.clear=function(){this.size=0,this.__data__={hash:new yi,map:new(Qn||bi),string:new yi}},wi.prototype.delete=function(e){var t=No(this,e).delete(e);return this.size-=t?1:0,t},wi.prototype.get=function(e){return No(this,e).get(e)},wi.prototype.has=function(e){return No(this,e).has(e)},wi.prototype.set=function(e,t){var n=No(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},_i.prototype.add=_i.prototype.push=function(e){return this.__data__.set(e,c),this},_i.prototype.has=function(e){return this.__data__.has(e)},xi.prototype.clear=function(){this.__data__=new bi,this.size=0},xi.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xi.prototype.get=function(e){return this.__data__.get(e)},xi.prototype.has=function(e){return this.__data__.has(e)},xi.prototype.set=function(e,t){var n=this.__data__;if(n instanceof bi){var i=n.__data__;if(!Qn||i.length0&&n(s)?t>1?Vi(s,t-1,n,i,r):en(r,s):i||(r[r.length]=s)}return r}var qi=so(),$i=so(!0);function Gi(e,t){return e&&qi(e,t,rl)}function Zi(e,t){return e&&$i(e,t,rl)}function Yi(e,t){return Xt(t,(function(t){return Ts(e[t])}))}function Xi(e,t){for(var n=0,i=(t=$r(t,e)).length;null!=e&&nt}function er(e,t){return null!=e&&ut.call(e,t)}function tr(e,t){return null!=e&&t in tt(e)}function nr(e,t,n){for(var r=n?Qt:Kt,a=e[0].length,s=e.length,l=s,c=i(s),u=1/0,d=[];l--;){var p=e[l];l&&t&&(p=Jt(p,vn(t))),u=$n(p.length,u),c[l]=!n&&(t||a>=120&&p.length>=120)?new _i(l&&p):o}p=e[0];var f=-1,h=c[0];e:for(;++f=s)return l;var c=n[i];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function yr(e,t,n){for(var i=-1,r=t.length,o={};++i-1;)s!==e&&zt.call(s,l,1),zt.call(e,l,1);return e}function wr(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;$o(r)?zt.call(e,r,1):Hr(e,r)}}return e}function _r(e,t){return e+jn(Yn()*(t-e+1))}function xr(e,t){var n="";if(!e||t<1||t>L)return n;do{t%2&&(n+=e),(t=jn(t/2))&&(e+=e)}while(t);return n}function kr(e,t){return oa(ea(e,t,Ml),e+"")}function Tr(e){return Ti(fl(e))}function Sr(e,t){var n=fl(e);return la(n,Li(t,0,n.length))}function Er(e,t,n,i){if(!Cs(e))return e;for(var r=-1,a=(t=$r(t,e)).length,s=a-1,l=e;null!=l&&++ro?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=i(o);++r>>1,a=e[o];null!==a&&!zs(a)&&(n?a<=t:a=a){var u=t?null:ko(e);if(u)return On(u);s=!1,r=bn,c=new _i}else c=t?[]:l;e:for(;++i=i?e:Mr(e,t,n)}var Yr=zn||function(e){return It.clearTimeout(e)};function Xr(e,t){if(t)return e.slice();var n=e.length,i=Pt?Pt(n):new e.constructor(n);return e.copy(i),i}function Kr(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}function Qr(e,t){var n=t?Kr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Jr(e,t){if(e!==t){var n=e!==o,i=null===e,r=e==e,a=zs(e),s=t!==o,l=null===t,c=t==t,u=zs(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!n&&c||!r)return 1;if(!i&&!a&&!u&&e1?n[r-1]:o,s=r>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(r--,a):o,s&&Go(n[0],n[1],s)&&(a=r<3?o:a,r=1),t=tt(t);++i-1?r[a?t[s]:s]:o}}function fo(e){return Mo((function(t){var n=t.length,i=n,r=gi.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new rt(l);if(r&&!s&&"wrapper"==Lo(a))var s=new gi([],!0)}for(i=s?i:n;++i1&&w.reverse(),p&&ul))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,p=!0,f=n&g?new _i:o;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Ne,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return Gt(B,(function(n){var i="_."+n[0];t&n[1]&&!Kt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(He);return t?t[1].split(je):[]}(i),n)))}function sa(e){var t=0,n=0;return function(){var i=Gn(),r=M-(i-n);if(n=i,r>0){if(++t>=O)return arguments[0]}else t=0;return e.apply(o,arguments)}}function la(e,t){var n=-1,i=e.length,r=i-1;for(t=t===o?i:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Aa(e,n)}));function ja(e){var t=fi(e);return t.__chain__=!0,t}function Ba(e,t){return t(e)}var Fa=Mo((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,r=function(t){return Ii(t,e)};return!(t>1||this.__actions__.length)&&i instanceof vi&&$o(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:Ba,args:[r],thisArg:o}),new gi(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(r)}));var Wa=ro((function(e,t,n){ut.call(e,n)?++e[n]:Ai(e,n,1)}));var Ua=po(ga),Va=po(va);function qa(e,t){return(vs(e)?Gt:ji)(e,Do(t,3))}function $a(e,t){return(vs(e)?Zt:Bi)(e,Do(t,3))}var Ga=ro((function(e,t,n){ut.call(e,n)?e[n].push(t):Ai(e,n,[t])}));var Za=kr((function(e,t,n){var r=-1,o="function"==typeof t,a=bs(e)?i(e.length):[];return ji(e,(function(e){a[++r]=o?qt(t,e,n):ir(e,t,n)})),a})),Ya=ro((function(e,t,n){Ai(e,n,t)}));function Xa(e,t){return(vs(e)?Jt:pr)(e,Do(t,3))}var Ka=ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Qa=kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Go(e,t[0],t[1])?t=[]:n>2&&Go(t[0],t[1],t[2])&&(t=[t[0]]),vr(e,Vi(t,1),[])})),Ja=Dn||function(){return It.Date.now()};function es(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,So(e,T,o,o,o,o,t)}function ts(e,t){var n;if("function"!=typeof t)throw new rt(l);return e=Fs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var ns=kr((function(e,t,n){var i=v;if(n.length){var r=Pn(n,zo(ns));i|=x}return So(e,i,t,n,r)})),is=kr((function(e,t,n){var i=v|y;if(n.length){var r=Pn(n,zo(is));i|=x}return So(t,i,e,n,r)}));function rs(e,t,n){var i,r,a,s,c,u,d=0,p=!1,f=!1,h=!0;if("function"!=typeof e)throw new rt(l);function m(t){var n=i,a=r;return i=r=o,d=t,s=e.apply(a,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||f&&e-d>=a}function v(){var e=Ja();if(g(e))return y(e);c=ra(v,function(e){var n=t-(e-u);return f?$n(n,a-(e-d)):n}(e))}function y(e){return c=o,h&&i?m(e):(i=r=o,s)}function b(){var e=Ja(),n=g(e);if(i=arguments,r=this,u=e,n){if(c===o)return function(e){return d=e,c=ra(v,t),p?m(e):s}(u);if(f)return Yr(c),c=ra(v,t),m(u)}return c===o&&(c=ra(v,t)),s}return t=Us(t)||0,Cs(n)&&(p=!!n.leading,a=(f="maxWait"in n)?qn(Us(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==o&&Yr(c),d=0,i=u=r=c=o},b.flush=function(){return c===o?s:y(Ja())},b}var os=kr((function(e,t){return Ni(e,1,t)})),as=kr((function(e,t,n){return Ni(e,Us(t)||0,n)}));function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new rt(l);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(ss.Cache||wi),n}function ls(e){if("function"!=typeof e)throw new rt(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=wi;var cs=Gr((function(e,t){var n=(t=1==t.length&&vs(t[0])?Jt(t[0],vn(Do())):Jt(Vi(t,1),vn(Do()))).length;return kr((function(i){for(var r=-1,o=$n(i.length,n);++r=t})),gs=rr(function(){return arguments}())?rr:function(e){return Ps(e)&&ut.call(e,"callee")&&!Lt.call(e,"callee")},vs=i.isArray,ys=jt?vn(jt):function(e){return Ps(e)&&Qi(e)==le};function bs(e){return null!=e&&Es(e.length)&&!Ts(e)}function ws(e){return Ps(e)&&bs(e)}var _s=Fn||Ul,xs=Bt?vn(Bt):function(e){return Ps(e)&&Qi(e)==q};function ks(e){if(!Ps(e))return!1;var t=Qi(e);return t==G||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Rs(e)}function Ts(e){if(!Cs(e))return!1;var t=Qi(e);return t==Z||t==Y||t==U||t==ee}function Ss(e){return"number"==typeof e&&e==Fs(e)}function Es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=L}function Cs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ps(e){return null!=e&&"object"==typeof e}var Os=Ft?vn(Ft):function(e){return Ps(e)&&Wo(e)==X};function Ms(e){return"number"==typeof e||Ps(e)&&Qi(e)==K}function Rs(e){if(!Ps(e)||Qi(e)!=J)return!1;var t=Rt(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==ht}var As=Wt?vn(Wt):function(e){return Ps(e)&&Qi(e)==te};var Is=Ut?vn(Ut):function(e){return Ps(e)&&Wo(e)==ne};function Ls(e){return"string"==typeof e||!vs(e)&&Ps(e)&&Qi(e)==ie}function zs(e){return"symbol"==typeof e||Ps(e)&&Qi(e)==re}var Ds=Vt?vn(Vt):function(e){return Ps(e)&&Es(e.length)&&!!Et[Qi(e)]};var Ns=wo(dr),Hs=wo((function(e,t){return e<=t}));function js(e){if(!e)return[];if(bs(e))return Ls(e)?An(e):no(e);if(Ht&&e[Ht])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ht]());var t=Wo(e);return(t==X?En:t==ne?On:fl)(e)}function Bs(e){return e?(e=Us(e))===I||e===-I?(e<0?-1:1)*z:e==e?e:0:0===e?e:0}function Fs(e){var t=Bs(e),n=t%1;return t==t?n?t-n:t:0}function Ws(e){return e?Li(Fs(e),0,N):0}function Us(e){if("number"==typeof e)return e;if(zs(e))return D;if(Cs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Cs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Le,"");var n=qe.test(e);return n||Ge.test(e)?Mt(e.slice(2),n?2:8):Ve.test(e)?D:+e}function Vs(e){return io(e,ol(e))}function qs(e){return null==e?"":Dr(e)}var $s=oo((function(e,t){if(Ko(t)||bs(t))io(t,rl(t),e);else for(var n in t)ut.call(t,n)&&Pi(e,n,t[n])})),Gs=oo((function(e,t){io(t,ol(t),e)})),Zs=oo((function(e,t,n,i){io(t,ol(t),e,i)})),Ys=oo((function(e,t,n,i){io(t,rl(t),e,i)})),Xs=Mo(Ii);var Ks=kr((function(e,t){e=tt(e);var n=-1,i=t.length,r=i>2?t[2]:o;for(r&&Go(t[0],t[1],r)&&(i=1);++n1),t})),io(e,Ao(e),n),i&&(n=zi(n,p|f|h,Po));for(var r=t.length;r--;)Hr(n,t[r]);return n}));var cl=Mo((function(e,t){return null==e?{}:function(e,t){return yr(e,t,(function(t,n){return el(e,n)}))}(e,t)}));function ul(e,t){if(null==e)return{};var n=Jt(Ao(e),(function(e){return[e]}));return t=Do(t),yr(e,n,(function(e,n){return t(e,n[0])}))}var dl=To(rl),pl=To(ol);function fl(e){return null==e?[]:yn(e,rl(e))}var hl=co((function(e,t,n){return t=t.toLowerCase(),e+(n?ml(t):t)}));function ml(e){return kl(qs(e).toLowerCase())}function gl(e){return(e=qs(e))&&e.replace(Ye,xn).replace(bt,"")}var vl=co((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),yl=co((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),bl=lo("toLowerCase");var wl=co((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var _l=co((function(e,t,n){return e+(n?" ":"")+kl(t)}));var xl=co((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),kl=lo("toUpperCase");function Tl(e,t,n){return e=qs(e),(t=n?o:t)===o?function(e){return kt.test(e)}(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.match(Be)||[]}(e):e.match(t)||[]}var Sl=kr((function(e,t){try{return qt(e,o,t)}catch(e){return ks(e)?e:new Qe(e)}})),El=Mo((function(e,t){return Gt(t,(function(t){t=ua(t),Ai(e,t,ns(e[t],e))})),e}));function Cl(e){return function(){return e}}var Pl=fo(),Ol=fo(!0);function Ml(e){return e}function Rl(e){return lr("function"==typeof e?e:zi(e,p))}var Al=kr((function(e,t){return function(n){return ir(n,e,t)}})),Il=kr((function(e,t){return function(n){return ir(e,n,t)}}));function Ll(e,t,n){var i=rl(t),r=Yi(t,i);null!=n||Cs(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Yi(t,rl(t)));var o=!(Cs(n)&&"chain"in n&&!n.chain),a=Ts(e);return Gt(r,(function(n){var i=t[n];e[n]=i,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=no(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,en([this.value()],arguments))})})),e}function zl(){}var Dl=vo(Jt),Nl=vo(Yt),Hl=vo(rn);function jl(e){return Zo(e)?pn(ua(e)):function(e){return function(t){return Xi(t,e)}}(e)}var Bl=bo(),Fl=bo(!0);function Wl(){return[]}function Ul(){return!1}var Vl=go((function(e,t){return e+t}),0),ql=xo("ceil"),$l=go((function(e,t){return e/t}),1),Gl=xo("floor");var Zl,Yl=go((function(e,t){return e*t}),1),Xl=xo("round"),Kl=go((function(e,t){return e-t}),0);return fi.after=function(e,t){if("function"!=typeof t)throw new rt(l);return e=Fs(e),function(){if(--e<1)return t.apply(this,arguments)}},fi.ary=es,fi.assign=$s,fi.assignIn=Gs,fi.assignInWith=Zs,fi.assignWith=Ys,fi.at=Xs,fi.before=ts,fi.bind=ns,fi.bindAll=El,fi.bindKey=is,fi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return vs(e)?e:[e]},fi.chain=ja,fi.chunk=function(e,t,n){t=(n?Go(e,t,n):t===o)?1:qn(Fs(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,s=0,l=i(Hn(r/t));ar?0:r+n),(i=i===o||i>r?r:Fs(i))<0&&(i+=r),i=n>i?0:Ws(i);n>>0)?(e=qs(e))&&("string"==typeof t||null!=t&&!As(t))&&!(t=Dr(t))&&Sn(e)?Zr(An(e),0,n):e.split(t,n):[]},fi.spread=function(e,t){if("function"!=typeof e)throw new rt(l);return t=null==t?0:qn(Fs(t),0),kr((function(n){var i=n[t],r=Zr(n,0,t);return i&&en(r,i),qt(e,this,r)}))},fi.tail=function(e){var t=null==e?0:e.length;return t?Mr(e,1,t):[]},fi.take=function(e,t,n){return e&&e.length?Mr(e,0,(t=n||t===o?1:Fs(t))<0?0:t):[]},fi.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Mr(e,(t=i-(t=n||t===o?1:Fs(t)))<0?0:t,i):[]},fi.takeRightWhile=function(e,t){return e&&e.length?Br(e,Do(t,3),!1,!0):[]},fi.takeWhile=function(e,t){return e&&e.length?Br(e,Do(t,3)):[]},fi.tap=function(e,t){return t(e),e},fi.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new rt(l);return Cs(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),rs(e,t,{leading:i,maxWait:t,trailing:r})},fi.thru=Ba,fi.toArray=js,fi.toPairs=dl,fi.toPairsIn=pl,fi.toPath=function(e){return vs(e)?Jt(e,ua):zs(e)?[e]:no(ca(qs(e)))},fi.toPlainObject=Vs,fi.transform=function(e,t,n){var i=vs(e),r=i||_s(e)||Ds(e);if(t=Do(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:Cs(e)&&Ts(o)?hi(Rt(e)):{}}return(r?Gt:Gi)(e,(function(e,i,r){return t(n,e,i,r)})),n},fi.unary=function(e){return es(e,1)},fi.union=Pa,fi.unionBy=Oa,fi.unionWith=Ma,fi.uniq=function(e){return e&&e.length?Nr(e):[]},fi.uniqBy=function(e,t){return e&&e.length?Nr(e,Do(t,2)):[]},fi.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Nr(e,o,t):[]},fi.unset=function(e,t){return null==e||Hr(e,t)},fi.unzip=Ra,fi.unzipWith=Aa,fi.update=function(e,t,n){return null==e?e:jr(e,t,qr(n))},fi.updateWith=function(e,t,n,i){return i="function"==typeof i?i:o,null==e?e:jr(e,t,qr(n),i)},fi.values=fl,fi.valuesIn=function(e){return null==e?[]:yn(e,ol(e))},fi.without=Ia,fi.words=Tl,fi.wrap=function(e,t){return us(qr(t),e)},fi.xor=La,fi.xorBy=za,fi.xorWith=Da,fi.zip=Na,fi.zipObject=function(e,t){return Ur(e||[],t||[],Pi)},fi.zipObjectDeep=function(e,t){return Ur(e||[],t||[],Er)},fi.zipWith=Ha,fi.entries=dl,fi.entriesIn=pl,fi.extend=Gs,fi.extendWith=Zs,Ll(fi,fi),fi.add=Vl,fi.attempt=Sl,fi.camelCase=hl,fi.capitalize=ml,fi.ceil=ql,fi.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Us(n))==n?n:0),t!==o&&(t=(t=Us(t))==t?t:0),Li(Us(e),t,n)},fi.clone=function(e){return zi(e,h)},fi.cloneDeep=function(e){return zi(e,p|h)},fi.cloneDeepWith=function(e,t){return zi(e,p|h,t="function"==typeof t?t:o)},fi.cloneWith=function(e,t){return zi(e,h,t="function"==typeof t?t:o)},fi.conformsTo=function(e,t){return null==t||Di(e,t,rl(t))},fi.deburr=gl,fi.defaultTo=function(e,t){return null==e||e!=e?t:e},fi.divide=$l,fi.endsWith=function(e,t,n){e=qs(e),t=Dr(t);var i=e.length,r=n=n===o?i:Li(Fs(n),0,i);return(n-=t.length)>=0&&e.slice(n,r)==t},fi.eq=fs,fi.escape=function(e){return(e=qs(e))&&Se.test(e)?e.replace(ke,kn):e},fi.escapeRegExp=function(e){return(e=qs(e))&&Ie.test(e)?e.replace(Ae,"\\$&"):e},fi.every=function(e,t,n){var i=vs(e)?Yt:Fi;return n&&Go(e,t,n)&&(t=o),i(e,Do(t,3))},fi.find=Ua,fi.findIndex=ga,fi.findKey=function(e,t){return an(e,Do(t,3),Gi)},fi.findLast=Va,fi.findLastIndex=va,fi.findLastKey=function(e,t){return an(e,Do(t,3),Zi)},fi.floor=Gl,fi.forEach=qa,fi.forEachRight=$a,fi.forIn=function(e,t){return null==e?e:qi(e,Do(t,3),ol)},fi.forInRight=function(e,t){return null==e?e:$i(e,Do(t,3),ol)},fi.forOwn=function(e,t){return e&&Gi(e,Do(t,3))},fi.forOwnRight=function(e,t){return e&&Zi(e,Do(t,3))},fi.get=Js,fi.gt=hs,fi.gte=ms,fi.has=function(e,t){return null!=e&&Uo(e,t,er)},fi.hasIn=el,fi.head=ba,fi.identity=Ml,fi.includes=function(e,t,n,i){e=bs(e)?e:fl(e),n=n&&!i?Fs(n):0;var r=e.length;return n<0&&(n=qn(r+n,0)),Ls(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&ln(e,t,n)>-1},fi.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:Fs(n);return r<0&&(r=qn(i+r,0)),ln(e,t,r)},fi.inRange=function(e,t,n){return t=Bs(t),n===o?(n=t,t=0):n=Bs(n),function(e,t,n){return e>=$n(t,n)&&e=-L&&e<=L},fi.isSet=Is,fi.isString=Ls,fi.isSymbol=zs,fi.isTypedArray=Ds,fi.isUndefined=function(e){return e===o},fi.isWeakMap=function(e){return Ps(e)&&Wo(e)==ae},fi.isWeakSet=function(e){return Ps(e)&&Qi(e)==se},fi.join=function(e,t){return null==e?"":Un.call(e,t)},fi.kebabCase=vl,fi.last=ka,fi.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=i;return n!==o&&(r=(r=Fs(n))<0?qn(i+r,0):$n(r,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,r):sn(e,un,r,!0)},fi.lowerCase=yl,fi.lowerFirst=bl,fi.lt=Ns,fi.lte=Hs,fi.max=function(e){return e&&e.length?Wi(e,Ml,Ji):o},fi.maxBy=function(e,t){return e&&e.length?Wi(e,Do(t,2),Ji):o},fi.mean=function(e){return dn(e,Ml)},fi.meanBy=function(e,t){return dn(e,Do(t,2))},fi.min=function(e){return e&&e.length?Wi(e,Ml,dr):o},fi.minBy=function(e,t){return e&&e.length?Wi(e,Do(t,2),dr):o},fi.stubArray=Wl,fi.stubFalse=Ul,fi.stubObject=function(){return{}},fi.stubString=function(){return""},fi.stubTrue=function(){return!0},fi.multiply=Yl,fi.nth=function(e,t){return e&&e.length?gr(e,Fs(t)):o},fi.noConflict=function(){return It._===this&&(It._=mt),this},fi.noop=zl,fi.now=Ja,fi.pad=function(e,t,n){e=qs(e);var i=(t=Fs(t))?Rn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return yo(jn(r),n)+e+yo(Hn(r),n)},fi.padEnd=function(e,t,n){e=qs(e);var i=(t=Fs(t))?Rn(e):0;return t&&it){var i=e;e=t,t=i}if(n||e%1||t%1){var r=Yn();return $n(e+r*(t-e+Ot("1e-"+((r+"").length-1))),t)}return _r(e,t)},fi.reduce=function(e,t,n){var i=vs(e)?tn:hn,r=arguments.length<3;return i(e,Do(t,4),n,r,ji)},fi.reduceRight=function(e,t,n){var i=vs(e)?nn:hn,r=arguments.length<3;return i(e,Do(t,4),n,r,Bi)},fi.repeat=function(e,t,n){return t=(n?Go(e,t,n):t===o)?1:Fs(t),xr(qs(e),t)},fi.replace=function(){var e=arguments,t=qs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},fi.result=function(e,t,n){var i=-1,r=(t=$r(t,e)).length;for(r||(r=1,e=o);++iL)return[];var n=N,i=$n(e,N);t=Do(t),e-=N;for(var r=gn(i,t);++n=a)return e;var l=n-Rn(i);if(l<1)return i;var c=s?Zr(s,0,l).join(""):e.slice(0,l);if(r===o)return c+i;if(s&&(l+=c.length-l),As(r)){if(e.slice(l).search(r)){var u,d=c;for(r.global||(r=nt(r.source,qs(Ue.exec(r))+"g")),r.lastIndex=0;u=r.exec(d);)var p=u.index;c=c.slice(0,p===o?l:p)}}else if(e.indexOf(Dr(r),l)!=l){var f=c.lastIndexOf(r);f>-1&&(c=c.slice(0,f))}return c+i},fi.unescape=function(e){return(e=qs(e))&&Te.test(e)?e.replace(xe,In):e},fi.uniqueId=function(e){var t=++dt;return qs(e)+t},fi.upperCase=xl,fi.upperFirst=kl,fi.each=qa,fi.eachRight=$a,fi.first=ba,Ll(fi,(Zl={},Gi(fi,(function(e,t){ut.call(fi.prototype,t)||(Zl[t]=e)})),Zl),{chain:!1}),fi.VERSION="4.17.15",Gt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){fi[e].placeholder=fi})),Gt(["drop","take"],(function(e,t){vi.prototype[e]=function(n){n=n===o?1:qn(Fs(n),0);var i=this.__filtered__&&!t?new vi(this):this.clone();return i.__filtered__?i.__takeCount__=$n(n,i.__takeCount__):i.__views__.push({size:$n(n,N),type:e+(i.__dir__<0?"Right":"")}),i},vi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Gt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=n==R||3==n;vi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Do(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),Gt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");vi.prototype[e]=function(){return this[n](1).value()[0]}})),Gt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");vi.prototype[e]=function(){return this.__filtered__?new vi(this):this[n](1)}})),vi.prototype.compact=function(){return this.filter(Ml)},vi.prototype.find=function(e){return this.filter(e).head()},vi.prototype.findLast=function(e){return this.reverse().find(e)},vi.prototype.invokeMap=kr((function(e,t){return"function"==typeof e?new vi(this):this.map((function(n){return ir(n,e,t)}))})),vi.prototype.reject=function(e){return this.filter(ls(Do(e)))},vi.prototype.slice=function(e,t){e=Fs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new vi(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Fs(t))<0?n.dropRight(-t):n.take(t-e)),n)},vi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vi.prototype.toArray=function(){return this.take(N)},Gi(vi.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),r=fi[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);r&&(fi.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof vi,c=s[0],u=l||vs(t),d=function(e){var t=r.apply(fi,en([e],s));return i&&p?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,h=a&&!p,m=l&&!f;if(!a&&u){t=m?t:new vi(this);var g=e.apply(t,s);return g.__actions__.push({func:Ba,args:[d],thisArg:o}),new gi(g,p)}return h&&m?e.apply(this,s):(g=this.thru(d),h?i?g.value()[0]:g.value():g)})})),Gt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);fi.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(vs(r)?r:[],e)}return this[n]((function(n){return t.apply(vs(n)?n:[],e)}))}})),Gi(vi.prototype,(function(e,t){var n=fi[t];if(n){var i=n.name+"";ut.call(ri,i)||(ri[i]=[]),ri[i].push({name:t,func:n})}})),ri[ho(o,y).name]=[{name:"wrapper",func:o}],vi.prototype.clone=function(){var e=new vi(this.__wrapped__);return e.__actions__=no(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=no(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=no(this.__views__),e},vi.prototype.reverse=function(){if(this.__filtered__){var e=new vi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},vi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=vs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){var i=-1,r=n.length;for(;++i=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},fi.prototype.plant=function(e){for(var t,n=this;n instanceof mi;){var i=pa(n);i.__index__=0,i.__values__=o,t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t},fi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof vi){var t=e;return this.__actions__.length&&(t=new vi(this)),(t=t.reverse()).__actions__.push({func:Ba,args:[Ca],thisArg:o}),new gi(t,this.__chain__)}return this.thru(Ca)},fi.prototype.toJSON=fi.prototype.valueOf=fi.prototype.value=function(){return Fr(this.__wrapped__,this.__actions__)},fi.prototype.first=fi.prototype.head,Ht&&(fi.prototype[Ht]=function(){return this}),fi}();It._=Ln,(r=function(){return Ln}.call(t,n,t,i))===o||(i.exports=r)}).call(this)}).call(this,n(8),n(79)(e))},function(e,t,n){var i;
-/*!
- Copyright (c) 2017 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
-*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t=n){i.b.create(r,n,1);var o="s-"+e.name+"-loaded",a=document.documentElement;a.classList.contains(o)||(a.classList.add(o),Object(i.s)(document,"content:populated"))}}if(a&&a===n.toString())t=a,s();else for(var l=0;l0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o);return e}},function(e,t){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}},function(e,t){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},function(e,t){e.exports=function(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}},function(e,t){e.exports=function(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}},function(e,t){e.exports=function(e){var t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}},function(e,t){e.exports=function(e){var t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}},function(e,t,n){var i=n(13),r=n(32);e.exports=n(15)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(31);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){var i=n(150),r=n(86);e.exports=function(e){return i(r(e))}},function(e,t,n){var i,r,o;!function(n,a){"use strict";r=[],void 0===(o="function"==typeof(i=function(){var e={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal",window:window},t=["display:block","position:absolute","top:-999px","left:-999px","font-size:48px","width:auto","height:auto","line-height:normal","margin:0","padding:0","font-variant:normal","white-space:nowrap"],n='AxmTYklsjo190QW
',i=function(){this.fontFamily="",this.appended=!1,this.serif=void 0,this.sansSerif=void 0,this.parent=void 0,this.options={}};return i.prototype.getMeasurements=function(){return{sansSerif:{width:this.sansSerif.offsetWidth,height:this.sansSerif.offsetHeight},serif:{width:this.serif.offsetWidth,height:this.serif.offsetHeight}}},i.prototype.load=function(){var e,i=new Date,r=this,o=r.serif,a=r.sansSerif,s=r.parent,l=r.appended,c=r.options,u=c.reference;function d(e){return t.concat(["font-weight:"+c.weight,"font-style:"+c.style]).concat("font-family:"+e).join(";")}var p=n.replace(/\%s/,d("sans-serif")),f=n.replace(/\%s/,d("serif"));function h(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}s||(s=r.parent=c.window.document.createElement("div")),s.innerHTML=p+f,a=r.sansSerif=s.firstChild,o=r.serif=a.nextSibling,c.glyphs&&(a.innerHTML+=c.glyphs,o.innerHTML+=c.glyphs),function t(){u||(u=c.window.document.body),!l&&u&&(u.appendChild(s),l=r.appended=!0,e=r.getMeasurements(),a.style.fontFamily=r.fontFamily+", sans-serif",o.style.fontFamily=r.fontFamily+", serif"),l&&e&&(h(e.sansSerif,a,c.tolerance)||h(e.serif,o,c.tolerance))?c.success():(new Date).getTime()-i.getTime()>c.timeout?c.error():!l&&"requestAnimationFrame"in c.window?c.window.requestAnimationFrame(t):c.window.setTimeout(t,c.delay)}()},i.prototype.cleanFamilyName=function(e){return e.replace(/[\'\"]/g,"").toLowerCase()},i.prototype.cleanWeight=function(e){return""+({normal:"400",bold:"700"}[e]||e)},i.prototype.checkFontFaces=function(e){var t=this;t.options.window.document.fonts.forEach((function(n){t.cleanFamilyName(n.family)===t.cleanFamilyName(t.fontFamily)&&t.cleanWeight(n.weight)===t.cleanWeight(t.options.weight)&&n.style===t.options.style&&n.load().then((function(){t.options.success(n),t.options.window.clearTimeout(e)}))}))},i.prototype.init=function(t,n){var i;for(var r in e)n.hasOwnProperty(r)||(n[r]=e[r]);this.options=n,this.fontFamily=t,!n.glyphs&&"fonts"in n.window.document?(n.timeout&&(i=n.window.setTimeout((function(){n.error()}),n.timeout)),this.checkFontFaces(i)):this.load()},function(e,t){var n=new i;return n.init(e,t),n}})?i.apply(t,r):i)||(e.exports=o)}()},function(e,t,n){var i,r,o;
+ */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",f=1,p=2,h=4,m=1,g=2,v=1,y=2,b=4,w=8,_=16,x=32,O=64,E=128,S=256,T=512,k=30,C="...",I=800,P=16,j=1,A=2,R=1/0,M=9007199254740991,D=17976931348623157e292,N=NaN,L=4294967295,z=L-1,F=L>>>1,W=[["ary",E],["bind",v],["bindKey",y],["curry",w],["curryRight",_],["flip",T],["partial",x],["partialRight",O],["rearg",S]],B="[object Arguments]",H="[object Array]",U="[object AsyncFunction]",V="[object Boolean]",q="[object Date]",G="[object DOMException]",$="[object Error]",K="[object Function]",Y="[object GeneratorFunction]",Z="[object Map]",X="[object Number]",Q="[object Null]",J="[object Object]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",ae="[object WeakMap]",se="[object WeakSet]",le="[object ArrayBuffer]",ce="[object DataView]",ue="[object Float32Array]",de="[object Float64Array]",fe="[object Int8Array]",pe="[object Int16Array]",he="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ve="[object Uint16Array]",ye="[object Uint32Array]",be=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,Oe=/[&<>"']/g,Ee=RegExp(xe.source),Se=RegExp(Oe.source),Te=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,Ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ae=/[\\^$.*+?()[\]{}|]/g,Re=RegExp(Ae.source),Me=/^\s+|\s+$/g,De=/^\s+/,Ne=/\s+$/,Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Fe=/,? & /,We=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ue=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,Ge=/^\[object .+?Constructor\]$/,$e=/^0o[0-7]+$/i,Ke=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Xe=/['\n\r\u2028\u2029\\]/g,Qe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+Je+"]",nt="["+Qe+"]",rt="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",at="[^\\ud800-\\udfff"+Je+rt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",lt="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",ut="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ft="(?:"+ot+"|"+at+")",pt="(?:"+dt+"|"+at+")",ht="(?:"+nt+"|"+st+")"+"?",mt="[\\ufe0e\\ufe0f]?"+ht+("(?:\\u200d(?:"+[lt,ct,ut].join("|")+")[\\ufe0e\\ufe0f]?"+ht+")*"),gt="(?:"+[it,ct,ut].join("|")+")"+mt,vt="(?:"+[lt+nt+"?",nt,ct,ut,et].join("|")+")",yt=RegExp("['’]","g"),bt=RegExp(nt,"g"),wt=RegExp(st+"(?="+st+")|"+vt+mt,"g"),_t=RegExp([dt+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,dt,"$"].join("|")+")",pt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,dt+ft,"$"].join("|")+")",dt+"?"+ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt,gt].join("|"),"g"),xt=RegExp("[\\u200d\\ud800-\\udfff"+Qe+"\\ufe0e\\ufe0f]"),Ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],St=-1,Tt={};Tt[ue]=Tt[de]=Tt[fe]=Tt[pe]=Tt[he]=Tt[me]=Tt[ge]=Tt[ve]=Tt[ye]=!0,Tt[B]=Tt[H]=Tt[le]=Tt[V]=Tt[ce]=Tt[q]=Tt[$]=Tt[K]=Tt[Z]=Tt[X]=Tt[J]=Tt[te]=Tt[ne]=Tt[re]=Tt[ae]=!1;var kt={};kt[B]=kt[H]=kt[le]=kt[ce]=kt[V]=kt[q]=kt[ue]=kt[de]=kt[fe]=kt[pe]=kt[he]=kt[Z]=kt[X]=kt[J]=kt[te]=kt[ne]=kt[re]=kt[ie]=kt[me]=kt[ge]=kt[ve]=kt[ye]=!0,kt[$]=kt[K]=kt[ae]=!1;var Ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=parseFloat,Pt=parseInt,jt="object"==typeof e&&e&&e.Object===Object&&e,At="object"==typeof self&&self&&self.Object===Object&&self,Rt=jt||At||Function("return this")(),Mt=t&&!t.nodeType&&t,Dt=Mt&&"object"==typeof r&&r&&!r.nodeType&&r,Nt=Dt&&Dt.exports===Mt,Lt=Nt&&jt.process,zt=function(){try{var e=Dt&&Dt.require&&Dt.require("util").types;return e||Lt&&Lt.binding&&Lt.binding("util")}catch(e){}}(),Ft=zt&&zt.isArrayBuffer,Wt=zt&&zt.isDate,Bt=zt&&zt.isMap,Ht=zt&&zt.isRegExp,Ut=zt&&zt.isSet,Vt=zt&&zt.isTypedArray;function qt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Gt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Qt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function _n(e,t){for(var n=e.length;n--&&ln(t,e[n],0)>-1;);return n}var xn=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),On=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function En(e){return"\\"+Ct[e]}function Sn(e){return xt.test(e)}function Tn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function kn(e,t){return function(n){return e(t(n))}}function Cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Mn=function e(t){var n,r=(t=null==t?Rt:Mn.defaults(Rt.Object(),t,Mn.pick(Rt,Et))).Array,i=t.Date,Qe=t.Error,Je=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=r.prototype,at=Je.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ct=at.toString,ut=st.hasOwnProperty,dt=0,ft=(n=/[^.]+$/.exec(lt&<.keys&<.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pt=st.toString,ht=ct.call(tt),mt=Rt._,gt=nt("^"+ct.call(ut).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=Nt?t.Buffer:o,wt=t.Symbol,xt=t.Uint8Array,Ct=vt?vt.allocUnsafe:o,jt=kn(tt.getPrototypeOf,tt),At=tt.create,Mt=st.propertyIsEnumerable,Dt=ot.splice,Lt=wt?wt.isConcatSpreadable:o,zt=wt?wt.iterator:o,on=wt?wt.toStringTag:o,pn=function(){try{var e=Fo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Dn=t.clearTimeout!==Rt.clearTimeout&&t.clearTimeout,Nn=i&&i.now!==Rt.Date.now&&i.now,Ln=t.setTimeout!==Rt.setTimeout&&t.setTimeout,zn=et.ceil,Fn=et.floor,Wn=tt.getOwnPropertySymbols,Bn=vt?vt.isBuffer:o,Hn=t.isFinite,Un=ot.join,Vn=kn(tt.keys,tt),qn=et.max,Gn=et.min,$n=i.now,Kn=t.parseInt,Yn=et.random,Zn=ot.reverse,Xn=Fo(t,"DataView"),Qn=Fo(t,"Map"),Jn=Fo(t,"Promise"),er=Fo(t,"Set"),tr=Fo(t,"WeakMap"),nr=Fo(tt,"create"),rr=tr&&new tr,ir={},or=da(Xn),ar=da(Qn),sr=da(Jn),lr=da(er),cr=da(tr),ur=wt?wt.prototype:o,dr=ur?ur.valueOf:o,fr=ur?ur.toString:o;function pr(e){if(Cs(e)&&!vs(e)&&!(e instanceof vr)){if(e instanceof gr)return e;if(ut.call(e,"__wrapped__"))return fa(e)}return new gr(e)}var hr=function(){function e(){}return function(t){if(!ks(t))return{};if(At)return At(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function mr(){}function gr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=L,this.__views__=[]}function yr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Dr(e,t,n,r,i,a){var s,l=t&f,c=t&p,u=t&h;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ks(e))return e;var d=vs(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ut.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return no(e,s)}else{var m=Ho(e),g=m==K||m==Y;if(_s(e))return Zi(e,l);if(m==J||m==B||g&&!i){if(s=c||g?{}:Vo(e),!l)return c?function(e,t){return ro(e,Bo(e),t)}(e,function(e,t){return e&&ro(t,ol(t),e)}(s,e)):function(e,t){return ro(e,Wo(e),t)}(e,jr(s,e))}else{if(!kt[m])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case le:return Xi(e);case V:case q:return new r(+e);case ce:return function(e,t){var n=t?Xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case ue:case de:case fe:case pe:case he:case me:case ge:case ve:case ye:return Qi(e,n);case Z:return new r;case X:case re:return new r(e);case te:return function(e){var t=new e.constructor(e.source,Ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ne:return new r;case ie:return i=e,dr?tt(dr.call(i)):{}}var i}(e,m,l)}}a||(a=new xr);var v=a.get(e);if(v)return v;a.set(e,s),Rs(e)?e.forEach((function(r){s.add(Dr(r,t,n,r,e,a))})):Is(e)&&e.forEach((function(r,i){s.set(i,Dr(r,t,n,i,e,a))}));var y=d?o:(u?c?Ao:jo:c?ol:il)(e);return $t(y||e,(function(r,i){y&&(r=e[i=r]),Cr(s,i,Dr(r,t,n,i,e,a))})),s}function Nr(e,t,n){var r=n.length;if(null==e)return!r;for(e=tt(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function Lr(e,t,n){if("function"!=typeof e)throw new it(l);return ia((function(){e.apply(o,n)}),t)}function zr(e,t,n,r){var i=-1,o=Xt,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=Jt(t,vn(n))),r?(o=Qt,s=!1):t.length>=a&&(o=bn,s=!1,t=new _r(t));e:for(;++i-1},br.prototype.set=function(e,t){var n=this.__data__,r=Ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Qn||br),string:new yr}},wr.prototype.delete=function(e){var t=Lo(this,e).delete(e);return this.size-=t?1:0,t},wr.prototype.get=function(e){return Lo(this,e).get(e)},wr.prototype.has=function(e){return Lo(this,e).has(e)},wr.prototype.set=function(e,t){var n=Lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},_r.prototype.add=_r.prototype.push=function(e){return this.__data__.set(e,c),this},_r.prototype.has=function(e){return this.__data__.has(e)},xr.prototype.clear=function(){this.__data__=new br,this.size=0},xr.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xr.prototype.get=function(e){return this.__data__.get(e)},xr.prototype.has=function(e){return this.__data__.has(e)},xr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof br){var r=n.__data__;if(!Qn||r.length0&&n(s)?t>1?Vr(s,t-1,n,r,i):en(i,s):r||(i[i.length]=s)}return i}var qr=so(),Gr=so(!0);function $r(e,t){return e&&qr(e,t,il)}function Kr(e,t){return e&&Gr(e,t,il)}function Yr(e,t){return Zt(t,(function(t){return Es(e[t])}))}function Zr(e,t){for(var n=0,r=(t=Gi(t,e)).length;null!=e&&nt}function ei(e,t){return null!=e&&ut.call(e,t)}function ti(e,t){return null!=e&&t in tt(e)}function ni(e,t,n){for(var i=n?Qt:Xt,a=e[0].length,s=e.length,l=s,c=r(s),u=1/0,d=[];l--;){var f=e[l];l&&t&&(f=Jt(f,vn(t))),u=Gn(f.length,u),c[l]=!n&&(t||a>=120&&f.length>=120)?new _r(l&&f):o}f=e[0];var p=-1,h=c[0];e:for(;++p=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function yi(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Dt.call(s,l,1),Dt.call(e,l,1);return e}function wi(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Go(i)?Dt.call(e,i,1):zi(e,i)}}return e}function _i(e,t){return e+Fn(Yn()*(t-e+1))}function xi(e,t){var n="";if(!e||t<1||t>M)return n;do{t%2&&(n+=e),(t=Fn(t/2))&&(e+=e)}while(t);return n}function Oi(e,t){return oa(ea(e,t,Pl),e+"")}function Ei(e){return Er(pl(e))}function Si(e,t){var n=pl(e);return la(n,Mr(t,0,n.length))}function Ti(e,t,n,r){if(!ks(e))return e;for(var i=-1,a=(t=Gi(t,e)).length,s=a-1,l=e;null!=l&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!Ds(a)&&(n?a<=t:a=a){var u=t?null:Oo(e);if(u)return In(u);s=!1,i=bn,c=new _r}else c=t?[]:l;e:for(;++r=r?e:Pi(e,t,n)}var Yi=Dn||function(e){return Rt.clearTimeout(e)};function Zi(e,t){if(t)return e.slice();var n=e.length,r=Ct?Ct(n):new e.constructor(n);return e.copy(r),r}function Xi(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}function Qi(e,t){var n=t?Xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ji(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=Ds(e),s=t!==o,l=null===t,c=t==t,u=Ds(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&$o(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=tt(t);++r-1?i[a?t[s]:s]:o}}function po(e){return Po((function(t){var n=t.length,r=n,i=gr.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new it(l);if(i&&!s&&"wrapper"==Mo(a))var s=new gr([],!0)}for(r=s?r:n;++r1&&w.reverse(),f&&ul))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,f=!0,p=n&g?new _r:o;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return $t(W,(function(n){var r="_."+n[0];t&n[1]&&!Xt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ze);return t?t[1].split(Fe):[]}(r),n)))}function sa(e){var t=0,n=0;return function(){var r=$n(),i=P-(r-n);if(n=r,i>0){if(++t>=I)return arguments[0]}else t=0;return e.apply(o,arguments)}}function la(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Aa(e,n)}));function Fa(e){var t=pr(e);return t.__chain__=!0,t}function Wa(e,t){return t(e)}var Ba=Po((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Rr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof vr&&Go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Wa,args:[i],thisArg:o}),new gr(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var Ha=io((function(e,t,n){ut.call(e,n)?++e[n]:Ar(e,n,1)}));var Ua=fo(ga),Va=fo(va);function qa(e,t){return(vs(e)?$t:Fr)(e,No(t,3))}function Ga(e,t){return(vs(e)?Kt:Wr)(e,No(t,3))}var $a=io((function(e,t,n){ut.call(e,n)?e[n].push(t):Ar(e,n,[t])}));var Ka=Oi((function(e,t,n){var i=-1,o="function"==typeof t,a=bs(e)?r(e.length):[];return Fr(e,(function(e){a[++i]=o?qt(t,e,n):ri(e,t,n)})),a})),Ya=io((function(e,t,n){Ar(e,n,t)}));function Za(e,t){return(vs(e)?Jt:fi)(e,No(t,3))}var Xa=io((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Qa=Oi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&$o(e,t[0],t[1])?t=[]:n>2&&$o(t[0],t[1],t[2])&&(t=[t[0]]),vi(e,Vr(t,1),[])})),Ja=Nn||function(){return Rt.Date.now()};function es(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,So(e,E,o,o,o,o,t)}function ts(e,t){var n;if("function"!=typeof t)throw new it(l);return e=Bs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var ns=Oi((function(e,t,n){var r=v;if(n.length){var i=Cn(n,Do(ns));r|=x}return So(e,r,t,n,i)})),rs=Oi((function(e,t,n){var r=v|y;if(n.length){var i=Cn(n,Do(rs));r|=x}return So(t,r,e,n,i)}));function is(e,t,n){var r,i,a,s,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new it(l);function m(t){var n=r,a=i;return r=i=o,d=t,s=e.apply(a,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||p&&e-d>=a}function v(){var e=Ja();if(g(e))return y(e);c=ia(v,function(e){var n=t-(e-u);return p?Gn(n,a-(e-d)):n}(e))}function y(e){return c=o,h&&r?m(e):(r=i=o,s)}function b(){var e=Ja(),n=g(e);if(r=arguments,i=this,u=e,n){if(c===o)return function(e){return d=e,c=ia(v,t),f?m(e):s}(u);if(p)return Yi(c),c=ia(v,t),m(u)}return c===o&&(c=ia(v,t)),s}return t=Us(t)||0,ks(n)&&(f=!!n.leading,a=(p="maxWait"in n)?qn(Us(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==o&&Yi(c),d=0,r=u=i=c=o},b.flush=function(){return c===o?s:y(Ja())},b}var os=Oi((function(e,t){return Lr(e,1,t)})),as=Oi((function(e,t,n){return Lr(e,Us(t)||0,n)}));function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(l);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function ls(e){if("function"!=typeof e)throw new it(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=wr;var cs=$i((function(e,t){var n=(t=1==t.length&&vs(t[0])?Jt(t[0],vn(No())):Jt(Vr(t,1),vn(No()))).length;return Oi((function(r){for(var i=-1,o=Gn(r.length,n);++i=t})),gs=ii(function(){return arguments}())?ii:function(e){return Cs(e)&&ut.call(e,"callee")&&!Mt.call(e,"callee")},vs=r.isArray,ys=Ft?vn(Ft):function(e){return Cs(e)&&Qr(e)==le};function bs(e){return null!=e&&Ts(e.length)&&!Es(e)}function ws(e){return Cs(e)&&bs(e)}var _s=Bn||Ul,xs=Wt?vn(Wt):function(e){return Cs(e)&&Qr(e)==q};function Os(e){if(!Cs(e))return!1;var t=Qr(e);return t==$||t==G||"string"==typeof e.message&&"string"==typeof e.name&&!js(e)}function Es(e){if(!ks(e))return!1;var t=Qr(e);return t==K||t==Y||t==U||t==ee}function Ss(e){return"number"==typeof e&&e==Bs(e)}function Ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=M}function ks(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Cs(e){return null!=e&&"object"==typeof e}var Is=Bt?vn(Bt):function(e){return Cs(e)&&Ho(e)==Z};function Ps(e){return"number"==typeof e||Cs(e)&&Qr(e)==X}function js(e){if(!Cs(e)||Qr(e)!=J)return!1;var t=jt(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==ht}var As=Ht?vn(Ht):function(e){return Cs(e)&&Qr(e)==te};var Rs=Ut?vn(Ut):function(e){return Cs(e)&&Ho(e)==ne};function Ms(e){return"string"==typeof e||!vs(e)&&Cs(e)&&Qr(e)==re}function Ds(e){return"symbol"==typeof e||Cs(e)&&Qr(e)==ie}var Ns=Vt?vn(Vt):function(e){return Cs(e)&&Ts(e.length)&&!!Tt[Qr(e)]};var Ls=wo(di),zs=wo((function(e,t){return e<=t}));function Fs(e){if(!e)return[];if(bs(e))return Ms(e)?An(e):no(e);if(zt&&e[zt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[zt]());var t=Ho(e);return(t==Z?Tn:t==ne?In:pl)(e)}function Ws(e){return e?(e=Us(e))===R||e===-R?(e<0?-1:1)*D:e==e?e:0:0===e?e:0}function Bs(e){var t=Ws(e),n=t%1;return t==t?n?t-n:t:0}function Hs(e){return e?Mr(Bs(e),0,L):0}function Us(e){if("number"==typeof e)return e;if(Ds(e))return N;if(ks(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ks(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Me,"");var n=qe.test(e);return n||$e.test(e)?Pt(e.slice(2),n?2:8):Ve.test(e)?N:+e}function Vs(e){return ro(e,ol(e))}function qs(e){return null==e?"":Ni(e)}var Gs=oo((function(e,t){if(Xo(t)||bs(t))ro(t,il(t),e);else for(var n in t)ut.call(t,n)&&Cr(e,n,t[n])})),$s=oo((function(e,t){ro(t,ol(t),e)})),Ks=oo((function(e,t,n,r){ro(t,ol(t),e,r)})),Ys=oo((function(e,t,n,r){ro(t,il(t),e,r)})),Zs=Po(Rr);var Xs=Oi((function(e,t){e=tt(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&$o(t[0],t[1],i)&&(r=1);++n1),t})),ro(e,Ao(e),n),r&&(n=Dr(n,f|p|h,Co));for(var i=t.length;i--;)zi(n,t[i]);return n}));var cl=Po((function(e,t){return null==e?{}:function(e,t){return yi(e,t,(function(t,n){return el(e,n)}))}(e,t)}));function ul(e,t){if(null==e)return{};var n=Jt(Ao(e),(function(e){return[e]}));return t=No(t),yi(e,n,(function(e,n){return t(e,n[0])}))}var dl=Eo(il),fl=Eo(ol);function pl(e){return null==e?[]:yn(e,il(e))}var hl=co((function(e,t,n){return t=t.toLowerCase(),e+(n?ml(t):t)}));function ml(e){return Ol(qs(e).toLowerCase())}function gl(e){return(e=qs(e))&&e.replace(Ye,xn).replace(bt,"")}var vl=co((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),yl=co((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),bl=lo("toLowerCase");var wl=co((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var _l=co((function(e,t,n){return e+(n?" ":"")+Ol(t)}));var xl=co((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ol=lo("toUpperCase");function El(e,t,n){return e=qs(e),(t=n?o:t)===o?function(e){return Ot.test(e)}(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.match(We)||[]}(e):e.match(t)||[]}var Sl=Oi((function(e,t){try{return qt(e,o,t)}catch(e){return Os(e)?e:new Qe(e)}})),Tl=Po((function(e,t){return $t(t,(function(t){t=ua(t),Ar(e,t,ns(e[t],e))})),e}));function kl(e){return function(){return e}}var Cl=po(),Il=po(!0);function Pl(e){return e}function jl(e){return li("function"==typeof e?e:Dr(e,f))}var Al=Oi((function(e,t){return function(n){return ri(n,e,t)}})),Rl=Oi((function(e,t){return function(n){return ri(e,n,t)}}));function Ml(e,t,n){var r=il(t),i=Yr(t,r);null!=n||ks(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Yr(t,il(t)));var o=!(ks(n)&&"chain"in n&&!n.chain),a=Es(e);return $t(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=no(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,en([this.value()],arguments))})})),e}function Dl(){}var Nl=vo(Jt),Ll=vo(Yt),zl=vo(rn);function Fl(e){return Ko(e)?fn(ua(e)):function(e){return function(t){return Zr(t,e)}}(e)}var Wl=bo(),Bl=bo(!0);function Hl(){return[]}function Ul(){return!1}var Vl=go((function(e,t){return e+t}),0),ql=xo("ceil"),Gl=go((function(e,t){return e/t}),1),$l=xo("floor");var Kl,Yl=go((function(e,t){return e*t}),1),Zl=xo("round"),Xl=go((function(e,t){return e-t}),0);return pr.after=function(e,t){if("function"!=typeof t)throw new it(l);return e=Bs(e),function(){if(--e<1)return t.apply(this,arguments)}},pr.ary=es,pr.assign=Gs,pr.assignIn=$s,pr.assignInWith=Ks,pr.assignWith=Ys,pr.at=Zs,pr.before=ts,pr.bind=ns,pr.bindAll=Tl,pr.bindKey=rs,pr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return vs(e)?e:[e]},pr.chain=Fa,pr.chunk=function(e,t,n){t=(n?$o(e,t,n):t===o)?1:qn(Bs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,l=r(zn(i/t));ai?0:i+n),(r=r===o||r>i?i:Bs(r))<0&&(r+=i),r=n>r?0:Hs(r);n>>0)?(e=qs(e))&&("string"==typeof t||null!=t&&!As(t))&&!(t=Ni(t))&&Sn(e)?Ki(An(e),0,n):e.split(t,n):[]},pr.spread=function(e,t){if("function"!=typeof e)throw new it(l);return t=null==t?0:qn(Bs(t),0),Oi((function(n){var r=n[t],i=Ki(n,0,t);return r&&en(i,r),qt(e,this,i)}))},pr.tail=function(e){var t=null==e?0:e.length;return t?Pi(e,1,t):[]},pr.take=function(e,t,n){return e&&e.length?Pi(e,0,(t=n||t===o?1:Bs(t))<0?0:t):[]},pr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Pi(e,(t=r-(t=n||t===o?1:Bs(t)))<0?0:t,r):[]},pr.takeRightWhile=function(e,t){return e&&e.length?Wi(e,No(t,3),!1,!0):[]},pr.takeWhile=function(e,t){return e&&e.length?Wi(e,No(t,3)):[]},pr.tap=function(e,t){return t(e),e},pr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(l);return ks(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(e,t,{leading:r,maxWait:t,trailing:i})},pr.thru=Wa,pr.toArray=Fs,pr.toPairs=dl,pr.toPairsIn=fl,pr.toPath=function(e){return vs(e)?Jt(e,ua):Ds(e)?[e]:no(ca(qs(e)))},pr.toPlainObject=Vs,pr.transform=function(e,t,n){var r=vs(e),i=r||_s(e)||Ns(e);if(t=No(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ks(e)&&Es(o)?hr(jt(e)):{}}return(i?$t:$r)(e,(function(e,r,i){return t(n,e,r,i)})),n},pr.unary=function(e){return es(e,1)},pr.union=Ca,pr.unionBy=Ia,pr.unionWith=Pa,pr.uniq=function(e){return e&&e.length?Li(e):[]},pr.uniqBy=function(e,t){return e&&e.length?Li(e,No(t,2)):[]},pr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Li(e,o,t):[]},pr.unset=function(e,t){return null==e||zi(e,t)},pr.unzip=ja,pr.unzipWith=Aa,pr.update=function(e,t,n){return null==e?e:Fi(e,t,qi(n))},pr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Fi(e,t,qi(n),r)},pr.values=pl,pr.valuesIn=function(e){return null==e?[]:yn(e,ol(e))},pr.without=Ra,pr.words=El,pr.wrap=function(e,t){return us(qi(t),e)},pr.xor=Ma,pr.xorBy=Da,pr.xorWith=Na,pr.zip=La,pr.zipObject=function(e,t){return Ui(e||[],t||[],Cr)},pr.zipObjectDeep=function(e,t){return Ui(e||[],t||[],Ti)},pr.zipWith=za,pr.entries=dl,pr.entriesIn=fl,pr.extend=$s,pr.extendWith=Ks,Ml(pr,pr),pr.add=Vl,pr.attempt=Sl,pr.camelCase=hl,pr.capitalize=ml,pr.ceil=ql,pr.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Us(n))==n?n:0),t!==o&&(t=(t=Us(t))==t?t:0),Mr(Us(e),t,n)},pr.clone=function(e){return Dr(e,h)},pr.cloneDeep=function(e){return Dr(e,f|h)},pr.cloneDeepWith=function(e,t){return Dr(e,f|h,t="function"==typeof t?t:o)},pr.cloneWith=function(e,t){return Dr(e,h,t="function"==typeof t?t:o)},pr.conformsTo=function(e,t){return null==t||Nr(e,t,il(t))},pr.deburr=gl,pr.defaultTo=function(e,t){return null==e||e!=e?t:e},pr.divide=Gl,pr.endsWith=function(e,t,n){e=qs(e),t=Ni(t);var r=e.length,i=n=n===o?r:Mr(Bs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},pr.eq=ps,pr.escape=function(e){return(e=qs(e))&&Se.test(e)?e.replace(Oe,On):e},pr.escapeRegExp=function(e){return(e=qs(e))&&Re.test(e)?e.replace(Ae,"\\$&"):e},pr.every=function(e,t,n){var r=vs(e)?Yt:Br;return n&&$o(e,t,n)&&(t=o),r(e,No(t,3))},pr.find=Ua,pr.findIndex=ga,pr.findKey=function(e,t){return an(e,No(t,3),$r)},pr.findLast=Va,pr.findLastIndex=va,pr.findLastKey=function(e,t){return an(e,No(t,3),Kr)},pr.floor=$l,pr.forEach=qa,pr.forEachRight=Ga,pr.forIn=function(e,t){return null==e?e:qr(e,No(t,3),ol)},pr.forInRight=function(e,t){return null==e?e:Gr(e,No(t,3),ol)},pr.forOwn=function(e,t){return e&&$r(e,No(t,3))},pr.forOwnRight=function(e,t){return e&&Kr(e,No(t,3))},pr.get=Js,pr.gt=hs,pr.gte=ms,pr.has=function(e,t){return null!=e&&Uo(e,t,ei)},pr.hasIn=el,pr.head=ba,pr.identity=Pl,pr.includes=function(e,t,n,r){e=bs(e)?e:pl(e),n=n&&!r?Bs(n):0;var i=e.length;return n<0&&(n=qn(i+n,0)),Ms(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ln(e,t,n)>-1},pr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Bs(n);return i<0&&(i=qn(r+i,0)),ln(e,t,i)},pr.inRange=function(e,t,n){return t=Ws(t),n===o?(n=t,t=0):n=Ws(n),function(e,t,n){return e>=Gn(t,n)&&e=-M&&e<=M},pr.isSet=Rs,pr.isString=Ms,pr.isSymbol=Ds,pr.isTypedArray=Ns,pr.isUndefined=function(e){return e===o},pr.isWeakMap=function(e){return Cs(e)&&Ho(e)==ae},pr.isWeakSet=function(e){return Cs(e)&&Qr(e)==se},pr.join=function(e,t){return null==e?"":Un.call(e,t)},pr.kebabCase=vl,pr.last=Oa,pr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Bs(n))<0?qn(r+i,0):Gn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):sn(e,un,i,!0)},pr.lowerCase=yl,pr.lowerFirst=bl,pr.lt=Ls,pr.lte=zs,pr.max=function(e){return e&&e.length?Hr(e,Pl,Jr):o},pr.maxBy=function(e,t){return e&&e.length?Hr(e,No(t,2),Jr):o},pr.mean=function(e){return dn(e,Pl)},pr.meanBy=function(e,t){return dn(e,No(t,2))},pr.min=function(e){return e&&e.length?Hr(e,Pl,di):o},pr.minBy=function(e,t){return e&&e.length?Hr(e,No(t,2),di):o},pr.stubArray=Hl,pr.stubFalse=Ul,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Yl,pr.nth=function(e,t){return e&&e.length?gi(e,Bs(t)):o},pr.noConflict=function(){return Rt._===this&&(Rt._=mt),this},pr.noop=Dl,pr.now=Ja,pr.pad=function(e,t,n){e=qs(e);var r=(t=Bs(t))?jn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return yo(Fn(i),n)+e+yo(zn(i),n)},pr.padEnd=function(e,t,n){e=qs(e);var r=(t=Bs(t))?jn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Yn();return Gn(e+i*(t-e+It("1e-"+((i+"").length-1))),t)}return _i(e,t)},pr.reduce=function(e,t,n){var r=vs(e)?tn:hn,i=arguments.length<3;return r(e,No(t,4),n,i,Fr)},pr.reduceRight=function(e,t,n){var r=vs(e)?nn:hn,i=arguments.length<3;return r(e,No(t,4),n,i,Wr)},pr.repeat=function(e,t,n){return t=(n?$o(e,t,n):t===o)?1:Bs(t),xi(qs(e),t)},pr.replace=function(){var e=arguments,t=qs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},pr.result=function(e,t,n){var r=-1,i=(t=Gi(t,e)).length;for(i||(i=1,e=o);++rM)return[];var n=L,r=Gn(e,L);t=No(t),e-=L;for(var i=gn(r,t);++n=a)return e;var l=n-jn(r);if(l<1)return r;var c=s?Ki(s,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(s&&(l+=c.length-l),As(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=nt(i.source,qs(Ue.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===o?l:f)}}else if(e.indexOf(Ni(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},pr.unescape=function(e){return(e=qs(e))&&Ee.test(e)?e.replace(xe,Rn):e},pr.uniqueId=function(e){var t=++dt;return qs(e)+t},pr.upperCase=xl,pr.upperFirst=Ol,pr.each=qa,pr.eachRight=Ga,pr.first=ba,Ml(pr,(Kl={},$r(pr,(function(e,t){ut.call(pr.prototype,t)||(Kl[t]=e)})),Kl),{chain:!1}),pr.VERSION="4.17.15",$t(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){pr[e].placeholder=pr})),$t(["drop","take"],(function(e,t){vr.prototype[e]=function(n){n=n===o?1:qn(Bs(n),0);var r=this.__filtered__&&!t?new vr(this):this.clone();return r.__filtered__?r.__takeCount__=Gn(n,r.__takeCount__):r.__views__.push({size:Gn(n,L),type:e+(r.__dir__<0?"Right":"")}),r},vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),$t(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==j||3==n;vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:No(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),$t(["head","last"],(function(e,t){var n="take"+(t?"Right":"");vr.prototype[e]=function(){return this[n](1).value()[0]}})),$t(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");vr.prototype[e]=function(){return this.__filtered__?new vr(this):this[n](1)}})),vr.prototype.compact=function(){return this.filter(Pl)},vr.prototype.find=function(e){return this.filter(e).head()},vr.prototype.findLast=function(e){return this.reverse().find(e)},vr.prototype.invokeMap=Oi((function(e,t){return"function"==typeof e?new vr(this):this.map((function(n){return ri(n,e,t)}))})),vr.prototype.reject=function(e){return this.filter(ls(No(e)))},vr.prototype.slice=function(e,t){e=Bs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new vr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Bs(t))<0?n.dropRight(-t):n.take(t-e)),n)},vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vr.prototype.toArray=function(){return this.take(L)},$r(vr.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=pr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(pr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof vr,c=s[0],u=l||vs(t),d=function(e){var t=i.apply(pr,en([e],s));return r&&f?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new vr(this);var g=e.apply(t,s);return g.__actions__.push({func:Wa,args:[d],thisArg:o}),new gr(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?r?g.value()[0]:g.value():g)})})),$t(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);pr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(vs(i)?i:[],e)}return this[n]((function(n){return t.apply(vs(n)?n:[],e)}))}})),$r(vr.prototype,(function(e,t){var n=pr[t];if(n){var r=n.name+"";ut.call(ir,r)||(ir[r]=[]),ir[r].push({name:t,func:n})}})),ir[ho(o,y).name]=[{name:"wrapper",func:o}],vr.prototype.clone=function(){var e=new vr(this.__wrapped__);return e.__actions__=no(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=no(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=no(this.__views__),e},vr.prototype.reverse=function(){if(this.__filtered__){var e=new vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=vs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},pr.prototype.plant=function(e){for(var t,n=this;n instanceof mr;){var r=fa(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},pr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof vr){var t=e;return this.__actions__.length&&(t=new vr(this)),(t=t.reverse()).__actions__.push({func:Wa,args:[ka],thisArg:o}),new gr(t,this.__chain__)}return this.thru(ka)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Bi(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,zt&&(pr.prototype[zt]=function(){return this}),pr}();Rt._=Mn,(i=function(){return Mn}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(this,n(60),n(118)(e))},function(e,t,n){"use strict";e.exports=n(509)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,i=n(31),o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){for(var e=0,t=0,n=arguments.length;t "):this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return void 0===this._locale?this._defaultLocale:this._locale},enumerable:!0,configurable:!0}),e.prototype.addValue=function(e){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(e)?this._value=this._value.concat(e):this._value.push(e)},e}(),l=function(e){function t(n,r){void 0===n&&(n=[]);var i=e.apply(this,n)||this;return i.__proto__=t.prototype,i._defaultLocale=r,i}return o(t,e),t.parse=function(e,n){if(!e)return new t([],n);if(Array.isArray(e)){var r=(i=e.map((function(e){return s.parseV2Value(e,n)})).filter((function(e){return null!==e}))).reduce((function(e,t){var n=t._locale;return n||(n="none"),e[n]?e[n].addValue(t._value):e[n]=t,e}),{});return new t(Object.values(r),n)}return"string"==typeof e?new t([new s(e,void 0,n)],n):e["@language"]?new t(null!==(i=s.parseV2Value(e))?[i]:[],n):new t(Object.keys(e).map((function(t){var r=e[t];if(!Array.isArray(r))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new s(r,t,n)})),n);var i},t.prototype.getSuitableLocale=function(e){for(var t=a(this).map((function(e){return e._locale})).filter((function(e){return void 0!==e})),n=function(e){var n=t.find((function(t){return t===e}));if(n)return{value:n}},r=0,o=e;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=i.a.forwardRef((function(e,t){var n=e.PluginComponents,r=(e.classes,l(e,["classes"]));return n?n.map((function(e,n){return i.a.isValidElement(e)?i.a.cloneElement(e,a(a({},r),{},{ref:t})):i.a.createElement(e,Object.assign({ref:t},r,{key:n}))})):null}))},,function(e,t,n){var r=n(112),i=n(512),o=n(513),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:l&&l in Object(e)?i(e):o(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),o=r.useState(n),a=o[0],s=o[1];return[i?t:a,r.useCallback((function(e){i||s(e)}),[])]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(12),i=n(877),o=n(10),a=n(0),s=n.n(a),l=n(109),c=n(388),u=n.n(c),d=n(387),f=n.n(d),p=n(50);function h(e,t){for(var n=0;n0?e.getLabel().getValue():String(t+1)}}]),y(n,[{key:"componentDidMount",value:function(){var e=this;this.setState((function(t){return m(m({},t),{},{image:e.image()})}))}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,r=n.maxHeight,i=n.maxWidth,o=n.resource;e.maxHeight===r&&e.maxWidth===i&&e.resource===o||this.setState((function(e){return m(m({},e),{},{image:t.image()})}))}},{key:"handleIntersection",value:function(e){!this.state.loaded&&e.isIntersecting&&this.setState((function(e){return m(m({},e),{},{loaded:!0})}))}},{key:"imageStyles",value:function(){var e=this.props,t=e.maxHeight,n=e.maxWidth,r=e.style,i=this.image(),o={height:"auto",width:"auto"};if(!i)return m(m({},r),{},{height:t||"auto",width:n||"auto"});var a=i.height,s=i.width;if(a&&s)if(t&&a>t||n&&s>n){var l=s/a;t&&n?n/tt.some(t=>t instanceof RegExp?t.test(e):t===e),o=(e,t)=>{if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},Reflect.has(t,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(t,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(t,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const n=e.match(/^data:(.*?),(.*?)(?:#(.*))?$/);if(!n)throw new Error(`Invalid URL: ${e}`);const r=n[1].split(";"),i=n[2],o=t?"":n[3];let a=!1;"base64"===r[r.length-1]&&(r.pop(),a=!0);const s=(r.shift()||"").toLowerCase(),l=[...r.map(e=>{let[t,n=""]=e.split("=").map(e=>e.trim());return"charset"===t&&"us-ascii"===(n=n.toLowerCase())?"":`${t}${n?`=${n}`:""}`}).filter(Boolean)];return a&&l.push("base64"),(0!==l.length||s&&"text/plain"!==s)&&l.unshift(s),`data:${l.join(";")},${a?i.trim():i}${o?`#${o}`:""}`})(e,t);const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const o=new r(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===o.protocol&&(o.protocol="http:"),t.forceHttps&&"http:"===o.protocol&&(o.protocol="https:"),t.stripAuthentication&&(o.username="",o.password=""),t.stripHash&&(o.hash=""),o.pathname&&(o.pathname=o.pathname.replace(/((?!:).|^)\/{2,}/g,(e,t)=>/^(?!\/)/g.test(t)?`${t}/`:"/")),o.pathname&&(o.pathname=decodeURI(o.pathname)),!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split("/");const n=e[e.length-1];i(n,t.removeDirectoryIndex)&&(e=e.slice(0,e.length-1),o.pathname=e.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...o.searchParams.keys()])i(e,t.removeQueryParameters)&&o.searchParams.delete(e);return t.sortQueryParameters&&o.searchParams.sort(),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,"")),e=o.toString(),!t.removeTrailingSlash&&"/"!==o.pathname||""!==o.hash||(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};e.exports=o,e.exports.default=o},function(e,t){e.exports=function(e){return void 0===e}},function(e,t){function n(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function r(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function i(e,t,n,r,i){return n.bind(t,e,r,i)}function o(e,t){return i(e,this,1===e.length?n:r,t.cache.create(),t.serializer)}function a(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new s}};e.exports=function(e,t){var n=t&&t.cache?t.cache:l,r=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:o)(e,{cache:n,serializer:r})},e.exports.strategies={variadic:function(e,t){return i(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)}}},function(e,t,n){"use strict";var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&a.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";n.r(t);var r=n(13),i=n(74),o=n(68),a=n(69);function s(e,t){return function(){return null}}var l=n(91),c=n(37),u=n(88),d=n(267),f=n(57),p=n(156),h=n(87),m=n(33),g=n(21),v=n(162),y=n(72);n.d(t,"capitalize",(function(){return r.a})),n.d(t,"createChainedFunction",(function(){return i.a})),n.d(t,"createSvgIcon",(function(){return o.a})),n.d(t,"debounce",(function(){return a.a})),n.d(t,"deprecatedPropType",(function(){return s})),n.d(t,"isMuiElement",(function(){return l.a})),n.d(t,"ownerDocument",(function(){return c.a})),n.d(t,"ownerWindow",(function(){return u.a})),n.d(t,"requirePropFactory",(function(){return d.a})),n.d(t,"setRef",(function(){return f.a})),n.d(t,"unsupportedProp",(function(){return p.a})),n.d(t,"useControlled",(function(){return h.a})),n.d(t,"useEventCallback",(function(){return m.a})),n.d(t,"useForkRef",(function(){return g.a})),n.d(t,"unstable_useId",(function(){return v.a})),n.d(t,"useIsFocusVisible",(function(){return y.a}))},function(e,t,n){var r=n(514),i=n(517);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(123),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"f",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"c",(function(){return O})),n.d(t,"a",(function(){return E})),n.d(t,"h",(function(){return S}));var r=n(7),i=n(238),o=n.n(i),a=n(30),s=n(26);function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType;t.a=i},function(e,t,n){"use strict";var r=n(53);n.d(t,"a",(function(){return r.e})),n.d(t,"b",(function(){return r.A}));n(31)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return y}));var r=n(137),i=n.n(r),o=n(138),a=n.n(o),s=n(103),l=n.n(s),c=n(0);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};p=d(d({},p),e)}(e.options.react),function(e){f=e}(e)}}},function(e,t,n){"use strict";var r=n(1),i=n(6),o=n(0),a=(n(4),n(5)),s=n(10),l=n(13),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=o.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,f=e.color,p=void 0===f?"initial":f,h=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,y=void 0!==v&&v,b=e.noWrap,w=void 0!==b&&b,_=e.paragraph,x=void 0!==_&&_,O=e.variant,E=void 0===O?"body1":O,S=e.variantMapping,T=void 0===S?c:S,k=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=h||(x?"p":T[E]||c[E])||"span";return o.createElement(C,Object(r.a)({className:Object(a.a)(u.root,d,"inherit"!==E&&u[E],"initial"!==p&&u["color".concat(Object(l.a)(p))],w&&u.noWrap,y&&u.gutterBottom,x&&u.paragraph,"inherit"!==s&&u["align".concat(Object(l.a)(s))],"initial"!==g&&u["display".concat(Object(l.a)(g))]),ref:t},k))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},,function(e,t,n){var r=n(295),i=n(207),o=n(120);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(54).Symbol;e.exports=r},function(e,t,n){var r=n(559),i=n(209),o=n(560),a=n(302),s=n(303),l=n(86),c=n(294),u=c(r),d=c(i),f=c(o),p=c(a),h=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case f:return"[object Promise]";case p:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n.n(r),o=n(109),a=n(62),s=n(36);function l(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,i=r.payload;switch(r.type){case o:case a:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case l:return e=n.clientOffset,t=i.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?n:function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:S,r=arguments.length>1?arguments[1]:void 0,i=r.payload;switch(r.type){case a:return O({},n,{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case s:return O({},n,{isSourcePublic:!0});case l:return O({},n,{targetIds:i.targetIds});case b:return-1===n.targetIds.indexOf(i.targetId)?n:O({},n,{targetIds:(e=n.targetIds,t=i.targetId,e.filter((function(e){return e!==t})))});case c:return O({},n,{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case u:return O({},n,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return n}}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case g:case v:return e+1;case y:case b:return e-1;default:return e}}var C=[],I=[];function P(e,t){return e!==C&&(e===I||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function j(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case l:break;case g:case v:case b:case y:return C;case a:case s:case u:case c:default:return I}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,i=t.prevTargetIds,o=void 0===i?[]:i,f=function(e,t){var n=new Map,r=function(e){return n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e,t){1===e&&i.push(t)})),i}(r,o);if(!(f.length>0||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;if(e.length!==t.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0)+1}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:j(r.dirtyHandlerIds,{type:i.type,payload:M({},i.payload,{prevTargetIds:(e=r,t="dragOperation.targetIds",n=[],t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e))})}),dragOffset:m(r.dragOffset,i),refCount:k(r.refCount,i),dragOperation:T(r.dragOperation,i),stateId:A(r.stateId)}}C.__IS_NONE__=!0,I.__IS_ALL__=!0;var L=n(17);function z(e,t){return{type:o,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var F={type:o,payload:{clientOffset:null,sourceClientOffset:null}};function W(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,i=void 0===r||r,o=n.clientOffset,s=n.getSourceClientOffset,l=e.getMonitor(),c=e.getRegistry();e.dispatch(z(o)),B(t,l,c);var u=V(t,l);if(null!==u){var d=null;o&&(H(s),d=s(u)),e.dispatch(z(o,d));var f=c.getSource(u),p=f.beginDrag(l,u);U(p),c.pinSource(u);var h=c.getSourceType(u);return{type:a,payload:{itemType:h,item:p,sourceId:u,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}e.dispatch(F)}}function B(e,t,n){Object(L.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(L.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function H(e){Object(L.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function U(e){Object(L.a)(_(e),"Item must be an object.")}function V(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function q(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function G(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function $(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;K(t);var i=t.slice(0),o=e.getMonitor(),a=e.getRegistry();Y(i,o,a);var s=o.getItemType();return Z(i,a,s),X(i,o,a),{type:l,payload:{targetIds:i,clientOffset:r||null}}}}function K(e){Object(L.a)(Array.isArray(e),"Expected targetIds to be an array.")}function Y(e,t,n){Object(L.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(L.a)(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r=0;r--){var i=e[r];G(t.getTargetType(i),n)||e.splice(r,1)}}function X(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();ne(n);var i=ie(n);i.forEach((function(i,o){var a=re(i,o,r,n),s={type:c,payload:{dropResult:J({},t,{},a)}};e.dispatch(s)}))}}function ne(e){Object(L.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(L.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function re(e,t,n,r){var i=n.getTarget(e),o=i?i.drop(r,e):void 0;return function(e){Object(L.a)(void 0===e||_(e),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===t?{}:r.getDropResult()),o}function ie(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function oe(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(L.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var r=t.getSourceId();return n.getSource(r,!0).endDrag(t,r),n.unpinSource(),{type:u}}}function ae(e,t){return{x:e.x-t.x,y:e.y-t.y}}function se(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},r=n.handlerIds;Object(L.a)("function"==typeof e,"listener must be a function."),Object(L.a)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,o=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!P(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(L.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(L.a)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return Object(L.a)(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&G(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return Object(L.a)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!G(r,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return n?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset,r&&i&&o?ae((n=o,{x:(t=r).x+n.x,y:t.y+n.y}),i):null;var e,t,n,r,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?ae(t,n):null;var e,t,n}}])&&se(t.prototype,n),r&&se(t,r),e}(),ue=0;function de(e){return(de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){t&&Array.isArray(e)?e.forEach((function(e){return fe(e,!1)})):Object(L.a)("string"==typeof e||"symbol"===de(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(le||(le={}));var pe=n(244),he=[],me=[],ge=pe.a.makeRequestCallFromTimer((function(){if(me.length)throw me.shift()}));function ve(e){var t;(t=he.length?he.pop():new ye).task=e,Object(pe.a)(t)}var ye=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){ve.onerror?ve.onerror(e):(me.push(e),ge())}finally{this.task=null,he[he.length]=this}},e}();function be(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];Object(L.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.dragSources.get(e);return r}},{key:"getTarget",value:function(e){return Object(L.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return Object(L.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(L.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return xe(e)===le.SOURCE}},{key:"isTargetId",value:function(e){return xe(e)===le.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(L.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:y,payload:{sourceId:e}}}(e)),ve((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(L.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:b,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(L.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(L.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=_e(e);return this.types.set(r,t),e===le.SOURCE?this.dragSources.set(r,n):e===le.TARGET&&this.dropTargets.set(r,n),r}}])&&be(t.prototype,n),r&&be(t,r),e}();function Se(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var r=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(i.createStore)(N,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n);this.store=r,this.monitor=new ce(r,new Ee(r)),r.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:W(e),publishDragSource:q(e),hover:$(e),drop:te(e),endDrag:oe(e)}}(this);return Object.keys(n).reduce((function(r,i){var o,a=n[i];return r[i]=(o=a,function(){for(var n=arguments.length,r=new Array(n),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?y(n.nodes,t):[];return r.push.apply(r,m(o)),(i||o.length>0)&&r.push({containsVisibleCanvas:i,descendantsContainVisibleCanvas:o.length>0,id:n.id,leaf:0===n.nodes.length,parentIds:v(n)}),r}),[])}var b=Object(r.createSelector)([d.d,c.l],(function(e,t){return 0!==t.length&&e?y(e.nodes,t):[]})),w=Object(r.createSelector)([b],(function(e){return e.map((function(e){return e.id}))})),_=Object(r.createSelector)([b],(function(e){return e.reduce((function(e,t){return t.leaf||!t.descendantsContainVisibleCanvas?e:[].concat(m(e),[t.id])}),[])})),x=Object(r.createSelector)([b],(function(e){return e.reduce((function(e,t){return t.containsVisibleCanvas?[].concat(m(e),[t]):e}),[])}));function O(e,t,n){var r=t.companionWindowId,i=Object(u.b)(e,{companionWindowId:r});return i.tocNodes?Object.keys(i.tocNodes).reduce((function(e,t){return i.tocNodes[t].expanded===n?[].concat(m(e),[t]):e}),[]):[]}function E(e,t){var n=t.companionWindowId,r=t.windowId,i=_(e,{companionWindowId:n,windowId:r}),a=O(e,{companionWindowId:n},!0),l=O(e,{companionWindowId:n},!1);return s.a.apply(void 0,[o()(a,i)].concat(m(l)))}function S(e,t){var n=h({},t),r=x(e,function(e){for(var t=1;t0){for(var o=0;o0?"tableOfContents":"item"}))},function(e,t,n){var r=n(207),i=n(113),o=n(145),a=n(49),s=n(120),l=n(146),c=n(147),u=n(204),d="[object Map]",f="[object Set]",p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||o(e)))return!e.length;var t=i(e);if(t==d||t==f)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t,n){var r=n(263),i=n(627),o=n(192),a=n(49);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,l,"next",e)}function l(e){n(a,i,o,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(419)("wks"),i=n(277),o=n(186).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?o.standard:n,l=t.easing,c=void 0===l?i.easeInOut:l,u=t.delay,d=void 0===u?0:u;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:a(s)," ").concat(c," ").concat("string"==typeof d?d:a(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e=n){r.b.create(i,n,1);var o="s-"+e.name+"-loaded",a=document.documentElement;a.classList.contains(o)||(a.classList.add(o),Object(r.r)(document,"content:populated"))}}if(a&&a===n.toString())t=a,s();else for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return u(u({},t),n)}));function p(e){var t={};return Object.keys(Object(a.h)(e)).forEach((function(n){t[n]=Object(i.o)(e,{windowId:n})})),t}var h=Object(r.createSelector)([a.h],(function(e){return Object.values(e).filter((function(e){return!0===e.maximized})).map((function(e){return e.id}))})),m=Object(r.createSelector)([a.e,f,l.f,l.c],(function(e,t,n,r){var i=t.views,o=void 0===i?[]:i,a=t.defaultView;if(e&&e.view)return e.view;var s=(o||[]).find((function(e){return e.behaviors&&e.behaviors.some((function(e){return n===e||r.includes(e)}))}));return s&&s.key||a})),g=Object(r.createSelector)([l.f,l.c,f],(function(e,t,n){var r=n.views,i=void 0===r?[]:r,o=n.defaultView;return(i||[]).reduce((function(n,r){return r.key!==o&&r.behaviors&&!r.behaviors.some((function(n){return e===n||t.includes(n)}))||n.push(r.key),n}),[])})),v=Object(r.createSelector)([s.d,a.e,function(e){return Object(a.f)(e).length>1}],(function(e,t,n){return"elastic"===e||n&&t&&!1===t.maximized}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p}));var r=n(7),i=n(26),o=n(30);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"left-to-right";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvases=t.map((function(e){return new o.a(e)})),this.layers=n,this.viewingDirection=r,this._canvasDimensions=null}var t,n,r;return t=e,(n=[{key:"contentResourceToWorldCoordinates",value:function(e){var t=this.canvases.findIndex((function(t){return t.imageResources.find((function(t){return t.id===e.id}))})),n=this.canvases[t];if(!n)return[];var r=u(this.canvasToWorldCoordinates(n.id),4),i=r[0],o=r[1],a=r[2],s=r[3],l=n.onFragment(e.id);return l?[i+l[0],o+l[1],l[2],l[3]]:[i,o,a,s]}},{key:"canvasToWorldCoordinates",value:function(e){var t=this.canvasDimensions.find((function(t){return t.canvas.id===e}));return[t.x,t.y,t.width,t.height]}},{key:"contentResource",value:function(e){var t=this.canvases.find((function(t){return t.imageServiceIds.some((function(t){return i()(t,{stripAuthentication:!1})===i()(e,{stripAuthentication:!1})}))}));if(t)return t.imageResources.find((function(t){return i()(t.getServices()[0].id,{stripAuthentication:!1})===i()(e,{stripAuthentication:!1})}))}},{key:"getLayerMetadata",value:function(e){if(this.layers){var t=this.canvases.find((function(t){return t.imageResources.find((function(t){return t.id===e.id}))}));if(t){var n=t.imageResources.findIndex((function(t){return t.id===e.id})),r=this.layers[t.canvas.id],i=r&&r[e.id];return l({index:n,opacity:1,total:t.imageResources.length,visibility:!0},i)}}}},{key:"layerOpacityOfImageResource",value:function(e){var t=this.getLayerMetadata(e);return t?t.visibility?t.opacity:0:1}},{key:"layerIndexOfImageResource",value:function(e){var t=this.getLayerMetadata(e);if(t)return t.total-t.index-1}},{key:"offsetByCanvas",value:function(e){var t=this.canvasToWorldCoordinates(e);return{x:t[0],y:t[1]}}},{key:"worldBounds",value:function(){return[0,0,Math.max.apply(Math,a(this.canvasDimensions.map((function(e){return e.x+e.width})))),Math.max.apply(Math,a(this.canvasDimensions.map((function(e){return e.y+e.height}))))]}},{key:"canvasAtPoint",value:function(e){var t=this.canvasDimensions.find((function(t){return t.x<=e.x&&e.x<=t.x+t.width&&t.y<=e.y&&e.y<=t.y+t.height}));return t&&t.canvas}},{key:"canvasIds",get:function(){return this.canvases.map((function(e){return e.id}))}},{key:"canvasDimensions",get:function(){if(this._canvasDimensions)return this._canvasDimensions;var e=u(this.canvasDirection,2),t=e[0],n=e[1],r=0===n?Math.min.apply(Math,a(this.canvases.map((function(e){return e.getHeight()})))):Math.min.apply(Math,a(this.canvases.map((function(e){return e.getWidth()})))),i=0,o=0,s=this.canvases.reduce((function(e,a){var s=0,l=0;return isNaN(a.aspectRatio)||(0===n?(s=r,l=Math.floor(r*a.aspectRatio)):(l=r,s=Math.floor(r*(1/a.aspectRatio)))),e.push({canvas:a,height:s,width:l,x:i,y:o}),i+=t*l,o+=n*s,e}),[]),c=0===n?r:Math.abs(o),d=0===t?r:Math.abs(i);return this._canvasDimensions=s.reduce((function(e,r){return e.push(l(l({},r),{},{x:-1===t?r.x+d-r.width:r.x,y:-1===n?r.y+c-r.height:r.y})),e}),[]),this._canvasDimensions}},{key:"canvasDirection",get:function(){switch(this.viewingDirection){case"left-to-right":return[1,0];case"right-to-left":return[-1,0];case"top-to-bottom":return[0,1];case"bottom-to-top":return[0,-1];default:return[1,0]}}}])&&p(t.prototype,n),r&&p(t,r),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(129);function i(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resource=t,this.iiifOpts=n}var t,n,c;return t=e,c=[{key:"staticImageUrl",value:function(e){return{height:e.getProperty("height"),url:e.id,width:e.getProperty("width")}}}],(n=[{key:"iiifThumbnailUrl",value:function(t){var n,i,o,a=120,c=120,u=this.iiifOpts,d=u.maxHeight,f=u.maxWidth;d&&(a=Math.max(d,120)),f&&(c=Math.max(f,120));var p=l(t);if(p){var h=t.getWidth()&&t.getHeight()&&t.getWidth()/t.getHeight();if(function(e){var t=e.getProfile();return!t.endsWith("#level1")&&!t.endsWith("#level2")&&("level0"===t||r.b.isLevel0ImageProfile(t))}(p)){var m=s(p.getProperty("sizes")),g=p.getProperty("height"),v=p.getProperty("width"),y=f&&d?f*d:a*c,b={default:!0,height:g||Number.MAX_SAFE_INTEGER,width:v||Number.MAX_SAFE_INTEGER},w=function(e){return e.width*e.height-y};if((b=m.reduce((function(e,t){var n=w(t);return n<0?e:Math.abs(n)6*y&&(b=m.reduce((function(e,t){return Math.abs(w(t))1&&(o=Math.round(c/h)),h&&h<1&&(i=Math.round(a*h))):c/a0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resource=t}var t,n,r;return t=e,(n=[{key:"isOnlyTag",value:function(){return 1===this.motivations.length&&"oa:tagging"===this.motivations[0]}},{key:"id",get:function(){return this._id=this._id||this.resource["@id"]||this.resources[0]&&this.resources[0]["@id"]||Object(s.a)(),this._id}},{key:"targetId",get:function(){var e=this.on[0];switch(typeof e){case"string":return e.replace(/#?xywh=(.*)$/,"");case"object":return e.full.replace(/#?xywh=(.*)$/,"");default:return null}}},{key:"motivations",get:function(){return i()(a()(new Array(this.resource.motivation)))}},{key:"resources",get:function(){return i()(a()(new Array(this.resource.resource)))}},{key:"on",get:function(){return i()(a()(new Array(this.resource.on)))}},{key:"tags",get:function(){return this.isOnlyTag()?this.resources.map((function(e){return e.chars})):this.resources.filter((function(e){return"oa:Tag"===e["@type"]})).map((function(e){return e.chars}))}},{key:"chars",get:function(){return this.resources.filter((function(e){return"oa:Tag"!==e["@type"]})).map((function(e){return e.chars})).join(" ")}},{key:"selector",get:function(){var e=this.on[0];switch(typeof e){case"string":return e;case"object":return"oa:Choice"===e.selector["@type"]?e.selector.default:e.selector;default:return null}}},{key:"svgSelector",get:function(){var e=this.on[0];switch(typeof e){case"string":return null;case"object":return e.selector&&e.selector.item&&"oa:SvgSelector"===e.selector.item["@type"]?e.selector.item:null;default:return null}}},{key:"fragmentSelector",get:function(){var e,t=this.selector;switch(typeof t){case"string":e=t.match(/xywh=(.*)$/);break;case"object":e=t.value.match(/xywh=(.*)$/);break;default:return null}return e&&e[1].split(",").map((function(e){return parseInt(e,10)}))}}])&&l(t.prototype,n),r&&l(t,r),e}();function u(e,t){for(var n=0;n