triiiceratops 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
1
|
+
var y4=Object.defineProperty;var x4=Object.getPrototypeOf;var T4=Reflect.get;var gh=$e=>{throw TypeError($e)};var E4=($e,rt,dt)=>rt in $e?y4($e,rt,{enumerable:!0,configurable:!0,writable:!0,value:dt}):$e[rt]=dt;var nt=($e,rt,dt)=>E4($e,typeof rt!="symbol"?rt+"":rt,dt),Ms=($e,rt,dt)=>rt.has($e)||gh("Cannot "+dt);var I=($e,rt,dt)=>(Ms($e,rt,"read from private field"),dt?dt.call($e):rt.get($e)),ve=($e,rt,dt)=>rt.has($e)?gh("Cannot add the same private member more than once"):rt instanceof WeakSet?rt.add($e):rt.set($e,dt),He=($e,rt,dt,en)=>(Ms($e,rt,"write to private field"),en?en.call($e,dt):rt.set($e,dt),dt),qe=($e,rt,dt)=>(Ms($e,rt,"access private method"),dt);var vh=($e,rt,dt)=>T4(x4($e),dt,rt);(function(){"use strict";var Wi,qi,wi,bi,xn,Xi,Yi,yt,Os,ki,Ds,mh,_h,lr,er,Tn,Ir,yi,Mr,cr,Gt,Or,Vr,ei,xi,ti,Ti,ri,Xo,gt,wh,bh,Ls,ta,ra,zs,vr,Dr,tr,Ei,En,kn,Yo,ii,Ki,Sn,Ko,yh,jr,ur,hh,Qi,mr,ni,Jo,Ji,xh,Th,Lr,zr,Ur,ea,_r,ro,ia,Cn,Pn,An,Rn,In,Mn,On,Dn,Ln,zn,Hn,Nn,Fn,Bn,Vn,jn,Un,Gn,Zn,Wn,qn,Xn,Yn,Kn,Qn,Jn,$n,eo,to;function $e(i,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in i)){const o=Object.getOwnPropertyDescriptor(r,n);o&&Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}const rt=1,dt=2,en=4,Eh=8,kh=16,Sh=1,Hs=4,Ch=8,Ph=16,Ah=1,Rh=2,Ih=4,na=1,Ns=2,Mh=4,Oh=8,oa="[",Si="[!",io="]",oi={},ct=Symbol(),Zt=Symbol("filename"),Fs=Symbol("hmr"),Dh="http://www.w3.org/1999/xhtml",no="http://www.w3.org/2000/svg",Bs="http://www.w3.org/1998/Math/MathML",Vs="@attach",aa=!1;var ai=Array.isArray,Lh=Array.prototype.indexOf,oo=Array.from,ao=Object.keys,si=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,js=Object.getOwnPropertyDescriptors,Us=Object.prototype,zh=Array.prototype,so=Object.getPrototypeOf,Gs=Object.isExtensible;function Ci(i){return typeof i=="function"}const wr=()=>{};function Zs(i){return typeof(i==null?void 0:i.then)=="function"}function Hh(i){return i()}function sa(i){for(var t=0;t<i.length;t++)i[t]()}function Ws(){var i,t,e=new Promise((r,n)=>{i=r,t=n});return{promise:e,resolve:i,reject:t}}function Nh(i,t,e=!1){return i===void 0?e?t():t:i}function Fh(i,t){if(Array.isArray(i))return i;if(t===void 0||!(Symbol.iterator in i))return Array.from(i);const e=[];for(const r of i)if(e.push(r),e.length===t)break;return e}const vt=2,lo=4,co=8,qs=1<<24,br=16,Hr=32,Gr=64,uo=128,dr=512,Ct=1024,Ot=2048,yr=4096,Wt=8192,xr=16384,tn=32768,fr=65536,ho=1<<17,la=1<<18,li=1<<19,Xs=1<<20,Nr=1<<25,ci=32768,ca=1<<21,fo=1<<22,Zr=1<<23,Dt=Symbol("$state"),po=Symbol("legacy props"),Bh=Symbol(""),Vh=Symbol("proxy path"),ui=new class extends Error{constructor(){super(...arguments);nt(this,"name","StaleReactionError");nt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ys=1,go=3,Tr=8,Ks=11;function Qs(i){throw new Error("https://svelte.dev/e/experimental_async_required")}function jh(){throw new Error("https://svelte.dev/e/invalid_default_snippet")}function Js(){throw new Error("https://svelte.dev/e/invalid_snippet_arguments")}function Pi(i){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Uh(){throw new Error("https://svelte.dev/e/missing_context")}function Gh(){throw new Error("https://svelte.dev/e/snippet_without_render_tag")}function Zh(i){throw new Error("https://svelte.dev/e/store_invalid_shape")}function Wh(){throw new Error("https://svelte.dev/e/svelte_element_invalid_this_value")}function qh(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xh(i,t){throw new Error("https://svelte.dev/e/component_api_changed")}function Yh(i,t){throw new Error("https://svelte.dev/e/component_api_invalid_new")}function Kh(i,t,e){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Qh(i){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Jh(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $h(i){throw new Error("https://svelte.dev/e/effect_orphan")}function ed(){throw new Error("https://svelte.dev/e/effect_pending_outside_reaction")}function td(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rd(){throw new Error("https://svelte.dev/e/fork_discarded")}function id(){throw new Error("https://svelte.dev/e/fork_timing")}function nd(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function od(){throw new Error("https://svelte.dev/e/hydration_failed")}function $s(i){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function ad(i){throw new Error("https://svelte.dev/e/props_invalid_value")}function sd(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ld(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function cd(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ud(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function hd(i,t){console.warn("https://svelte.dev/e/assignment_value_stale")}function dd(i,t){console.warn("https://svelte.dev/e/binding_property_non_reactive")}function fd(i){console.warn("https://svelte.dev/e/console_log_state")}function pd(i,t){console.warn("https://svelte.dev/e/event_handler_invalid")}function gd(i){console.warn("https://svelte.dev/e/hydratable_missing_but_expected")}function rn(i){console.warn("https://svelte.dev/e/hydration_mismatch")}function vd(i,t,e,r){console.warn("https://svelte.dev/e/ownership_invalid_binding")}function md(i,t,e,r){console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function _d(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function el(i){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function wd(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let me=!1;function ut(i){me=i}let De;function it(i){if(i===null)throw rn(),oi;return De=i}function Pt(){return it(Kt(De))}function j(i){if(me){if(Kt(De)!==null)throw rn(),oi;De=i}}function bd(i){me&&(De=i.content)}function ft(i=1){if(me){for(var t=i,e=De;t--;)e=Kt(e);De=e}}function hi(i=!0){for(var t=0,e=De;;){if(e.nodeType===Tr){var r=e.data;if(r===io){if(t===0)return e;t-=1}else(r===oa||r===Si)&&(t+=1)}var n=Kt(e);i&&e.remove(),e=n}}function tl(i){if(!i||i.nodeType!==Tr)throw rn(),oi;return i.data}function rl(i){return i===this.v}function il(i,t){return i!=i?t==t:i!==t||i!==null&&typeof i=="object"||typeof i=="function"}function nl(i){return!il(i,this.v)}let yd=!1;function xd(i){console.warn("https://svelte.dev/e/dynamic_void_element_content")}const Td=[];function vo(i,t=!1,e=!1){return mo(i,new Map,"",Td,null,e)}function mo(i,t,e,r,n=null,o=!1){if(typeof i=="object"&&i!==null){var a=t.get(i);if(a!==void 0)return a;if(i instanceof Map)return new Map(i);if(i instanceof Set)return new Set(i);if(ai(i)){var s=Array(i.length);t.set(i,s),n!==null&&t.set(n,s);for(var c=0;c<i.length;c+=1){var l=i[c];c in i&&(s[c]=mo(l,t,e,r,null,o))}return s}if(so(i)===Us){s={},t.set(i,s),n!==null&&t.set(n,s);for(var u in i)s[u]=mo(i[u],t,e,r,null,o);return s}if(i instanceof Date)return structuredClone(i);if(typeof i.toJSON=="function"&&!o)return mo(i.toJSON(),t,e,r,i)}if(i instanceof EventTarget)return i;try{return structuredClone(i)}catch{return i}}let Ai=null;function ol(i,t){const e=i.v;if(e===ct)return;const r=Ed(i),n=Ge,o=i.wv>n.wv||n.wv===0,a=o?"color: CornflowerBlue; font-weight: bold":"color: grey; font-weight: normal";if(console.groupCollapsed(i.label?`%c${r}%c ${i.label}`:`%c${r}%c`,a,o?"font-weight: normal":a,typeof e=="object"&&e!==null&&Dt in e?vo(e,!0):e),r==="$derived"){const c=new Set(i.deps);for(const l of c)ol(l)}if(i.created&&console.log(i.created),o&&i.updated)for(const c of i.updated.values())c.error&&console.log(c.error);if(t)for(var s of t.traces)console.log(s);console.groupEnd()}function Ed(i){var t;return(i.f&(vt|fo))!==0?"$derived":(t=i.label)!=null&&t.startsWith("$")?"store":"$state"}function kd(i,t){var e=Ai;try{Ai={entries:new Map,reaction:Ge};var r=performance.now(),n=t(),o=(performance.now()-r).toFixed(2),a=et(i);if(!gi())console.log(`${a} %cran outside of an effect (${o}ms)`,"color: grey");else if(Ai.entries.size===0)console.log(`${a} %cno reactive dependencies (${o}ms)`,"color: grey");else{console.group(`${a} %c(${o}ms)`,"color: grey");var s=Ai.entries;et(()=>{for(const[c,l]of s)ol(c,l)}),Ai=null,console.groupEnd()}return n}finally{Ai=e}}function Sd(i,t){return i.label=t,al(i.v,t),i}function al(i,t){var e;return(e=i==null?void 0:i[Vh])==null||e.call(i,t),i}function Cd(i){const t=new Error,e=Pd();return e.length===0?null:(e.unshift(`
|
|
2
2
|
`),si(t,"stack",{value:e.join(`
|
|
3
3
|
`)}),si(t,"name",{value:i}),t)}function Pd(){const i=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=i,!t)return[];const e=t.split(`
|
|
4
|
-
`),r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.replaceAll("\\","/");if(o.trim()!=="Error"){if(o.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||r.push(o)}}return r}let Ze=null;function Ri(i){Ze=i}let _o=null;function Ad(i,t,e,r,n,o){const a=_o;_o={type:t,file:e[Zt],line:r,column:n,parent:a,...o};try{return i()}finally{_o=a}}let nn=null;function sl(i){nn=i}function Rd(){const i={};return[()=>(ha(i)||Uh(),Wr(i)),t=>ua(i,t)]}function Wr(i){return wo().get(i)}function ua(i,t){return wo().set(i,t),t}function ha(i){return wo().has(i)}function Id(){return wo()}function Qe(i,t=!1,e){Ze={p:Ze,i:!1,c:null,e:null,s:i,x:null,l:null}}function Je(i){var t=Ze,e=t.e;if(e!==null){t.e=null;for(var r of e)Il(r)}return i!==void 0&&(t.x=i),t.i=!0,Ze=t.p,i??{}}function ll(){return!0}function wo(i){return Ze===null&&Pi(),Ze.c??(Ze.c=new Map(Md(Ze)||void 0))}function Md(i){let t=i.p;for(;t!==null;){const e=t.c;if(e!==null)return e;t=t.p}return null}let di=[];function cl(){var i=di;di=[],sa(i)}function qt(i){if(di.length===0&&!Ii){var t=di;queueMicrotask(()=>{t===di&&cl()})}di.push(i)}function Od(){for(;di.length>0;)cl()}function ul(i){var t=Fe;if(t===null)return Ue.f|=Zr,i;if((t.f&tn)===0){if((t.f&uo)===0)throw i;t.b.error(i)}else Fr(i,t)}function Fr(i,t){for(;t!==null;){if((t.f&uo)!==0)try{t.b.error(i);return}catch(e){i=e}t=t.parent}throw i}const fi=new Set;let Be=null,on=null,ot=null,ir=[],bo=null,da=!1,Ii=!1;const qo=class qo{constructor(){be(this,yt);nt(this,"committed",!1);nt(this,"current",new Map);nt(this,"previous",new Map);be(this,Wi,new Set);be(this,qi,new Set);be(this,wi,0);be(this,bi,0);be(this,xn,null);be(this,Xi,[]);be(this,Yi,[]);nt(this,"skipped_effects",new Set);nt(this,"is_fork",!1)}is_deferred(){return this.is_fork||R(this,bi)>0}process(t){var r;ir=[],on=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)We(this,yt,Os).call(this,n,e);this.is_fork||We(this,yt,mh).call(this),this.is_deferred()?(We(this,yt,ki).call(this,e.effects),We(this,yt,ki).call(this,e.render_effects),We(this,yt,ki).call(this,e.block_effects)):(on=this,Be=null,hl(e.render_effects),hl(e.effects),on=null,(r=R(this,xn))==null||r.resolve()),ot=null}capture(t,e){this.previous.has(t)||this.previous.set(t,e),(t.f&Zr)===0&&(this.current.set(t,t.v),ot==null||ot.set(t,t.v))}activate(){Be=this,this.apply()}deactivate(){Be===this&&(Be=null,ot=null)}flush(){if(this.activate(),ir.length>0){if(fa(),Be!==null&&Be!==this)return}else R(this,wi)===0&&this.process([]);this.deactivate()}discard(){for(const t of R(this,qi))t(this);R(this,qi).clear()}increment(t){ze(this,wi,R(this,wi)+1),t&&ze(this,bi,R(this,bi)+1)}decrement(t){ze(this,wi,R(this,wi)-1),t&&ze(this,bi,R(this,bi)-1),this.revive()}revive(){for(const t of R(this,Xi))Tt(t,Ot),pi(t);for(const t of R(this,Yi))Tt(t,yr),pi(t);ze(this,Xi,[]),ze(this,Yi,[]),this.flush()}oncommit(t){R(this,Wi).add(t)}ondiscard(t){R(this,qi).add(t)}settled(){return(R(this,xn)??ze(this,xn,Ws())).promise}static ensure(){if(Be===null){const t=Be=new qo;fi.add(Be),Ii||qo.enqueue(()=>{Be===t&&t.flush()})}return Be}static enqueue(t){qt(t)}apply(){}};Wi=new WeakMap,qi=new WeakMap,wi=new WeakMap,bi=new WeakMap,xn=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,yt=new WeakSet,Os=function(t,e){var u;t.f^=Pt;for(var r=t.first;r!==null;){var n=r.f,o=(n&(Hr|Gr))!==0,a=o&&(n&Pt)!==0,s=a||(n&Wt)!==0||this.skipped_effects.has(r);if((r.f&uo)!==0&&((u=r.b)!=null&&u.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!s&&r.fn!==null){o?r.f^=Pt:(n&lo)!==0?e.effects.push(r):Oi(r)&&((r.f&br)!==0&&e.block_effects.push(r),Di(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)l===e.effect&&(We(this,yt,ki).call(this,e.effects),We(this,yt,ki).call(this,e.render_effects),We(this,yt,ki).call(this,e.block_effects),e=e.parent),r=l.next,l=l.parent}},ki=function(t){for(const e of t)((e.f&Ot)!==0?R(this,Xi):R(this,Yi)).push(e),We(this,yt,Ds).call(this,e.deps),Tt(e,Pt)},Ds=function(t){if(t!==null)for(const e of t)(e.f&vt)===0||(e.f&ci)===0||(e.f^=ci,We(this,yt,Ds).call(this,e.deps))},mh=function(){if(R(this,bi)===0){for(const t of R(this,Wi))t();R(this,Wi).clear()}R(this,wi)===0&&We(this,yt,_h).call(this)},_h=function(){var o;if(fi.size>1){this.previous.clear();var t=ot,e=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const a of fi){if(a===this){e=!1;continue}const s=[];for(const[l,u]of this.current){if(a.current.has(l))if(e&&u!==a.current.get(l))a.current.set(l,u);else continue;s.push(l)}if(s.length===0)continue;const c=[...a.current.keys()].filter(l=>!this.current.has(l));if(c.length>0){var n=ir;ir=[];const l=new Set,u=new Map;for(const h of s)dl(h,c,l,u);if(ir.length>0){Be=a,a.apply();for(const h of ir)We(o=a,yt,Os).call(o,h,r);a.deactivate()}ir=n}}Be=null,ot=t}this.committed=!0,fi.delete(this)};let Xt=qo;function Ft(i){var t=Ii;Ii=!0;try{var e;for(i&&(Be!==null&&fa(),e=i());;){if(Od(),ir.length===0&&(Be==null||Be.flush(),ir.length===0))return bo=null,e;fa()}}finally{Ii=t}}function fa(){var i=mi;da=!0;var t=null;try{var e=0;for(So(!0);ir.length>0;){var r=Xt.ensure();if(e++>1e3){var n,o;Dd()}r.process(ir),Xr.clear()}}finally{da=!1,So(i),bo=null}}function Dd(){try{td()}catch(i){Fr(i,bo)}}let pr=null;function hl(i){var t=i.length;if(t!==0){for(var e=0;e<t;){var r=i[e++];if((r.f&(xr|Wt))===0&&Oi(r)&&(pr=new Set,Di(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Fl(r):r.fn=null),(pr==null?void 0:pr.size)>0)){Xr.clear();for(const n of pr){if((n.f&(xr|Wt))!==0)continue;const o=[n];let a=n.parent;for(;a!==null;)pr.has(a)&&(pr.delete(a),o.push(a)),a=a.parent;for(let s=o.length-1;s>=0;s--){const c=o[s];(c.f&(xr|Wt))===0&&Di(c)}}pr.clear()}}pr=null}}function dl(i,t,e,r){if(!e.has(i)&&(e.add(i),i.reactions!==null))for(const n of i.reactions){const o=n.f;(o&vt)!==0?dl(n,t,e,r):(o&(fo|br))!==0&&(o&Ot)===0&&pl(n,t,r)&&(Tt(n,Ot),pi(n))}}function fl(i,t){if(i.reactions!==null)for(const e of i.reactions){const r=e.f;(r&vt)!==0?fl(e,t):(r&ho)!==0&&(Tt(e,Ot),t.add(e))}}function pl(i,t,e){const r=e.get(i);if(r!==void 0)return r;if(i.deps!==null)for(const n of i.deps){if(t.includes(n))return!0;if((n.f&vt)!==0&&pl(n,t,e))return e.set(n,!0),!0}return e.set(i,!1),!1}function pi(i){for(var t=bo=i;t.parent!==null;){t=t.parent;var e=t.f;if(da&&t===Fe&&(e&br)!==0&&(e&la)===0)return;if((e&(Gr|Hr))!==0){if((e&Pt)===0)return;t.f^=Pt}}ir.push(t)}let yo=[];function Ld(){try{Ft(()=>{for(const i of yo)ln(i)})}finally{yo=[]}}function zd(i){var t=Lt(0),e=!0,r=void 0;return p(t),Ol(()=>{if(e){var n=ot;try{ot=null,r=i()}finally{ot=n}return}yo.length===0&&qt(Ld),yo.push(t)}),e=!1,r}function Hd(i){Qs(),Be!==null&&id();var t=Xt.ensure();t.is_fork=!0,ot=new Map;var e=!1,r=t.settled();Ft(i),ot=null;for(var[n,o]of t.previous)n.v=o;return{commit:async()=>{if(e){await r;return}fi.has(t)||rd(),e=!0,t.is_fork=!1;for(var[a,s]of t.current)a.v=s;Ft(()=>{var c=new Set;for(var l of t.current.keys())fl(l,c);qd(c),yl()}),t.revive(),await r},discard:()=>{!e&&fi.has(t)&&(fi.delete(t),t.discard())}}}function Nd(i){let t=0,e=Lt(0),r;return()=>{gi()&&(p(e),ht(()=>(t===0&&(r=et(()=>i(()=>Yt(e)))),t+=1,()=>{qt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Yt(e))})})))}}var Fd=fr|li|uo;function gl(i,t,e){new Bd(i,t,e)}class Bd{constructor(t,e,r){be(this,gt);nt(this,"parent");be(this,lr,!1);be(this,er);be(this,Tn,ye?Oe:null);be(this,Ir);be(this,yi);be(this,Mr);be(this,cr,null);be(this,Gt,null);be(this,Or,null);be(this,Vr,null);be(this,ei,null);be(this,xi,0);be(this,ti,0);be(this,Ti,!1);be(this,ri,null);be(this,Xo,Nd(()=>(ze(this,ri,Lt(R(this,xi))),()=>{ze(this,ri,null)})));ze(this,er,t),ze(this,Ir,e),ze(this,yi,r),this.parent=Fe.b,ze(this,lr,!!R(this,Ir).pending),ze(this,Mr,kr(()=>{if(Fe.b=this,ye){const o=R(this,Tn);At(),o.nodeType===Tr&&o.data===Si?We(this,gt,bh).call(this):We(this,gt,wh).call(this)}else{var n=We(this,gt,Ls).call(this);try{ze(this,cr,zt(()=>r(n)))}catch(o){this.error(o)}R(this,ti)>0?We(this,gt,ra).call(this):ze(this,lr,!1)}return()=>{var o;(o=R(this,ei))==null||o.remove()}},Fd)),ye&&ze(this,er,Oe)}is_pending(){return R(this,lr)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!R(this,Ir).pending}update_pending_count(t){We(this,gt,zs).call(this,t),ze(this,xi,R(this,xi)+t),R(this,ri)&&Er(R(this,ri),R(this,xi))}get_effect_pending(){return R(this,Xo).call(this),p(R(this,ri))}error(t){var e=R(this,Ir).onerror;let r=R(this,Ir).failed;if(R(this,Ti)||!e&&!r)throw t;R(this,cr)&&(mt(R(this,cr)),ze(this,cr,null)),R(this,Gt)&&(mt(R(this,Gt)),ze(this,Gt,null)),R(this,Or)&&(mt(R(this,Or)),ze(this,Or,null)),ye&&(it(R(this,Tn)),ft(),it(hi()));var n=!1,o=!1;const a=()=>{if(n){wd();return}n=!0,o&&ud(),Xt.ensure(),ze(this,xi,0),R(this,Or)!==null&&vi(R(this,Or),()=>{ze(this,Or,null)}),ze(this,lr,this.has_pending_snippet()),ze(this,cr,We(this,gt,ta).call(this,()=>(ze(this,Ti,!1),zt(()=>R(this,yi).call(this,R(this,er)))))),R(this,ti)>0?We(this,gt,ra).call(this):ze(this,lr,!1)};var s=Ue;try{It(null),o=!0,e==null||e(t,a),o=!1}catch(c){Fr(c,R(this,Mr)&&R(this,Mr).parent)}finally{It(s)}r&&qt(()=>{ze(this,Or,We(this,gt,ta).call(this,()=>{Xt.ensure(),ze(this,Ti,!0);try{return zt(()=>{r(R(this,er),()=>t,()=>a)})}catch(c){return Fr(c,R(this,Mr).parent),null}finally{ze(this,Ti,!1)}}))})}}lr=new WeakMap,er=new WeakMap,Tn=new WeakMap,Ir=new WeakMap,yi=new WeakMap,Mr=new WeakMap,cr=new WeakMap,Gt=new WeakMap,Or=new WeakMap,Vr=new WeakMap,ei=new WeakMap,xi=new WeakMap,ti=new WeakMap,Ti=new WeakMap,ri=new WeakMap,Xo=new WeakMap,gt=new WeakSet,wh=function(){try{ze(this,cr,zt(()=>R(this,yi).call(this,R(this,er))))}catch(t){this.error(t)}ze(this,lr,!1)},bh=function(){const t=R(this,Ir).pending;t&&(ze(this,Gt,zt(()=>t(R(this,er)))),Xt.enqueue(()=>{var e=We(this,gt,Ls).call(this);ze(this,cr,We(this,gt,ta).call(this,()=>(Xt.ensure(),zt(()=>R(this,yi).call(this,e))))),R(this,ti)>0?We(this,gt,ra).call(this):(vi(R(this,Gt),()=>{ze(this,Gt,null)}),ze(this,lr,!1))}))},Ls=function(){var t=R(this,er);return R(this,lr)&&(ze(this,ei,Rt()),R(this,er).before(R(this,ei)),t=R(this,ei)),t},ta=function(t){var e=Fe,r=Ue,n=Ze;jt(R(this,Mr)),It(R(this,Mr)),Ri(R(this,Mr).ctx);try{return t()}catch(o){return ul(o),null}finally{jt(e),It(r),Ri(n)}},ra=function(){const t=R(this,Ir).pending;R(this,cr)!==null&&(ze(this,Vr,document.createDocumentFragment()),R(this,Vr).append(R(this,ei)),jl(R(this,cr),R(this,Vr))),R(this,Gt)===null&&ze(this,Gt,zt(()=>t(R(this,er))))},zs=function(t){var e;if(!this.has_pending_snippet()){this.parent&&We(e=this.parent,gt,zs).call(e,t);return}ze(this,ti,R(this,ti)+t),R(this,ti)===0&&(ze(this,lr,!1),R(this,Gt)&&vi(R(this,Gt),()=>{ze(this,Gt,null)}),R(this,Vr)&&(R(this,er).before(R(this,Vr)),ze(this,Vr,null)))};function pa(){return Fe.b}function Vd(){Fe===null&&ed();var i=Fe.b;return i===null?0:i.get_effect_pending()}function an(i,t,e,r){const n=sn;if(e.length===0&&i.length===0){r(t.map(n));return}var o=Be,a=Fe,s=xo();function c(){Promise.all(e.map(l=>ml(l))).then(l=>{s();try{r([...t.map(n),...l])}catch(u){(a.f&xr)===0&&Fr(u,a)}o==null||o.deactivate(),qr()}).catch(l=>{Fr(l,a)})}i.length>0?Promise.all(i).then(()=>{s();try{return c()}finally{o==null||o.deactivate(),qr()}}):c()}function vl(i,t){an(i,[],[],t)}function xo(){var i=Fe,t=Ue,e=Ze,r=Be;return function(o=!0){jt(i),It(t),Ri(e),o&&(r==null||r.activate())}}async function jd(i){var t=xo(),e=await i;return()=>(t(),e)}async function ga(i){var t=await i;return()=>t}async function*Ud(i){var r,n;const t=((r=i[Symbol.asyncIterator])==null?void 0:r.call(i))??((n=i[Symbol.iterator])==null?void 0:n.call(i));if(t===void 0)throw new TypeError("value is not async iterable");let e=!1;try{for(;;){const{done:o,value:a}=(await ga(t.next()))();if(o){e=!0;break}yield a}}finally{if(e&&t.return!==void 0)return(await ga(t.return()))().value}}function qr(){jt(null),It(null),Ri(null)}async function Gd(i,t){var e=pa(),r=Be,n=!e.is_pending();e.update_pending_count(1),r.increment(n);var o=Fe,a=ye,s=void 0;a&&(At(),s=hi(!1));try{var c=t(i)}finally{s&&(it(s),At())}try{await c}catch(l){ko(o)||Fr(l,o)}finally{e.update_pending_count(-1),r.decrement(n),qr()}}function Zd(i){const t=xo();var e=pa(),r=Be,n=!e.is_pending();e.update_pending_count(1),r.increment(n);var o=Fe,a=null;const s=u=>{a={error:u},ko(o)||Fr(u,o)};var c=Promise.resolve(i[0]()).catch(s),l=[c];for(const u of i.slice(1))c=c.then(()=>{if(a)throw a.error;if(ko(o))throw ui;try{return t(),u()}finally{qr()}}).catch(s).finally(()=>{qr()}),l.push(c);return c.then(()=>Promise.resolve()).finally(()=>{e.update_pending_count(-1),r.decrement(n)}),l}function sn(i){var t=vt|Ot,e=Ue!==null&&(Ue.f&vt)!==0?Ue:null;return Fe!==null&&(Fe.f|=li),{ctx:Ze,deps:null,effects:null,equals:rl,f:t,fn:i,reactions:null,rv:0,v:ct,wv:0,parent:e??Fe,ac:null}}function ml(i,t){let e=Fe;e===null&&qh();var r=e.b,n=void 0,o=Lt(ct),a=!Ue,s=new Map;return lf(()=>{var f;var c=Ws();n=c.promise;try{Promise.resolve(i()).then(c.resolve,c.reject).then(()=>{l===Be&&l.committed&&l.deactivate(),qr()})}catch(v){c.reject(v),qr()}var l=Be;if(a){var u=!r.is_pending();r.update_pending_count(1),l.increment(u),(f=s.get(l))==null||f.reject(ui),s.delete(l),s.set(l,c)}const h=(v,_=void 0)=>{if(l.activate(),_)_!==ui&&(o.f|=Zr,Er(o,_));else{(o.f&Zr)!==0&&(o.f^=Zr),Er(o,v);for(const[d,g]of s){if(s.delete(d),d===l)break;g.reject(ui)}}a&&(r.update_pending_count(-1),l.decrement(u))};c.promise.then(h,v=>h(null,v||"unknown"))}),Qt(()=>{for(const c of s.values())c.reject(ui)}),new Promise(c=>{function l(u){function h(){u===n?c(o):l(n)}u.then(h,h)}l(n)})}function te(i){const t=sn(i);return Gl(t),t}function va(i){const t=sn(i);return t.equals=nl,t}function _l(i){var t=i.effects;if(t!==null){i.effects=null;for(var e=0;e<t.length;e+=1)mt(t[e])}}function Wd(i){for(var t=i.parent;t!==null;){if((t.f&vt)===0)return(t.f&xr)===0?t:null;t=t.parent}return null}function ma(i){var t,e=Fe;jt(Wd(i));try{i.f&=~ci,_l(i),t=Yl(i)}finally{jt(e)}return t}function wl(i){var t=ma(i);if(i.equals(t)||(Be!=null&&Be.is_fork||(i.v=t),i.wv=ql()),!_i)if(ot!==null)(gi()||Be!=null&&Be.is_fork)&&ot.set(i,t);else{var e=(i.f&dr)===0?yr:Pt;Tt(i,e)}}let To=new Set;const Xr=new Map;function qd(i){To=i}let bl=!1;function Lt(i,t){var e={f:0,v:i,reactions:null,equals:rl,rv:0,wv:0};return e}function Pe(i,t){const e=Lt(i);return Gl(e),e}function Eo(i,t=!1,e=!0){const r=Lt(i);return t||(r.equals=nl),r}function Xd(i,t){return xe(i,et(()=>p(i))),t}function xe(i,t,e=!1){Ue!==null&&(!Sr||(Ue.f&ho)!==0)&&ll()&&(Ue.f&(vt|br|fo|ho))!==0&&!(Ht!=null&&Ht.includes(i))&&cd();let r=e?xt(t):t;return Er(i,r)}function Er(i,t){if(!i.equals(t)){var e=i.v;_i?Xr.set(i,t):Xr.set(i,e),i.v=t;var r=Xt.ensure();r.capture(i,e),(i.f&vt)!==0&&((i.f&Ot)!==0&&ma(i),Tt(i,(i.f&dr)!==0?Pt:yr)),i.wv=ql(),xl(i,Ot),Fe!==null&&(Fe.f&Pt)!==0&&(Fe.f&(Hr|Gr))===0&&(nr===null?ff([i]):nr.push(i)),!r.is_fork&&To.size>0&&!bl&&yl()}return t}function yl(){bl=!1;var i=mi;So(!0);const t=Array.from(To);try{for(const e of t)(e.f&Pt)!==0&&Tt(e,yr),Oi(e)&&Di(e)}finally{So(i)}To.clear()}function ln(i,t=1){var e=p(i),r=t===1?e++:e--;return xe(i,e),r}function Yd(i,t=1){var e=p(i);return xe(i,t===1?++e:--e)}function Yt(i){xe(i,i.v+1)}function xl(i,t){var e=i.reactions;if(e!==null)for(var r=e.length,n=0;n<r;n++){var o=e[n],a=o.f,s=(a&Ot)===0;if(s&&Tt(o,t),(a&vt)!==0){var c=o;ot==null||ot.delete(c),(a&ci)===0&&(a&dr&&(o.f|=ci),xl(c,yr))}else s&&((a&br)!==0&&pr!==null&&pr.add(o),pi(o))}}function xt(i){if(typeof i!="object"||i===null||Dt in i)return i;const t=so(i);if(t!==Us&&t!==zh)return i;var e=new Map,r=ai(i),n=Pe(0),o=gr,a=s=>{if(gr===o)return s();var c=Ue,l=gr;It(null),Wl(o);var u=s();return It(c),Wl(l),u};return r&&e.set("length",Pe(i.length)),new Proxy(i,{defineProperty(s,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&sd();var u=e.get(c);return u===void 0?u=a(()=>{var h=Pe(l.value);return e.set(c,h),h}):xe(u,l.value,!0),!0},deleteProperty(s,c){var l=e.get(c);if(l===void 0){if(c in s){const u=a(()=>Pe(ct));e.set(c,u),Yt(n)}}else xe(l,ct),Yt(n);return!0},get(s,c,l){var v;if(c===Dt)return i;var u=e.get(c),h=c in s;if(u===void 0&&(!h||(v=hr(s,c))!=null&&v.writable)&&(u=a(()=>{var _=xt(h?s[c]:ct),d=Pe(_);return d}),e.set(c,u)),u!==void 0){var f=p(u);return f===ct?void 0:f}return Reflect.get(s,c,l)},getOwnPropertyDescriptor(s,c){var l=Reflect.getOwnPropertyDescriptor(s,c);if(l&&"value"in l){var u=e.get(c);u&&(l.value=p(u))}else if(l===void 0){var h=e.get(c),f=h==null?void 0:h.v;if(h!==void 0&&f!==ct)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return l},has(s,c){var f;if(c===Dt)return!0;var l=e.get(c),u=l!==void 0&&l.v!==ct||Reflect.has(s,c);if(l!==void 0||Fe!==null&&(!u||(f=hr(s,c))!=null&&f.writable)){l===void 0&&(l=a(()=>{var v=u?xt(s[c]):ct,_=Pe(v);return _}),e.set(c,l));var h=p(l);if(h===ct)return!1}return u},set(s,c,l,u){var P;var h=e.get(c),f=c in s;if(r&&c==="length")for(var v=l;v<h.v;v+=1){var _=e.get(v+"");_!==void 0?xe(_,ct):v in s&&(_=a(()=>Pe(ct)),e.set(v+"",_))}if(h===void 0)(!f||(P=hr(s,c))!=null&&P.writable)&&(h=a(()=>Pe(void 0)),xe(h,xt(l)),e.set(c,h));else{f=h.v!==ct;var d=a(()=>xt(l));xe(h,d)}var g=Reflect.getOwnPropertyDescriptor(s,c);if(g!=null&&g.set&&g.set.call(u,l),!f){if(r&&typeof c=="string"){var y=e.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&xe(y,S+1)}Yt(n)}return!0},ownKeys(s){p(n);var c=Reflect.ownKeys(s).filter(h=>{var f=e.get(h);return f===void 0||f.v!==ct});for(var[l,u]of e)u.v!==ct&&!(l in s)&&c.push(l);return c},setPrototypeOf(){ld()}})}function Mi(i){try{if(i!==null&&typeof i=="object"&&Dt in i)return i[Dt]}catch{}return i}function Tl(i,t){return Object.is(Mi(i),Mi(t))}function Kd(i,t,e=!0){try{i===t!=(Mi(i)===Mi(t))&&el(e?"===":"!==")}catch{}return i===t===e}function Qd(i,t,e=!0){return i==t!=(Mi(i)==Mi(t))&&el(),i==t===e}var _a,El,wa,kl,Sl;function ba(){if(_a===void 0){_a=window,El=document,wa=/Firefox/.test(navigator.userAgent);var i=Element.prototype,t=Node.prototype,e=Text.prototype;kl=hr(t,"firstChild").get,Sl=hr(t,"nextSibling").get,Gs(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Gs(e)&&(e.__t=void 0)}}function Rt(i=""){return document.createTextNode(i)}function at(i){return kl.call(i)}function Kt(i){return Sl.call(i)}function U(i,t){if(!ye)return at(i);var e=at(Oe);if(e===null)e=Oe.appendChild(Rt());else if(t&&e.nodeType!==go){var r=Rt();return e==null||e.before(r),it(r),r}return it(e),e}function Z(i,t=!1){if(!ye){var e=at(i);return e instanceof Comment&&e.data===""?Kt(e):e}if(t&&(Oe==null?void 0:Oe.nodeType)!==go){var r=Rt();return Oe==null||Oe.before(r),it(r),r}return Oe}function ue(i,t=1,e=!1){let r=ye?Oe:i;for(var n;t--;)n=r,r=Kt(r);if(!ye)return r;if(e&&(r==null?void 0:r.nodeType)!==go){var o=Rt();return r===null?n==null||n.after(o):r.before(o),it(o),o}return it(r),r}function ya(i){i.textContent=""}function Cl(){return!1}function Jd(i,t,e){let r=e?{is:e}:void 0;return t?document.createElementNS(t,i,r):document.createElement(i,r)}function $d(){return document.createDocumentFragment()}function ef(i=""){return document.createComment(i)}function tf(i,t,e=""){if(t.startsWith("xlink:")){i.setAttributeNS("http://www.w3.org/1999/xlink",t,e);return}return i.setAttribute(t,e)}function Pl(i,t){if(t){const e=document.body;i.autofocus=!0,qt(()=>{document.activeElement===e&&i.focus()})}}function rf(i){ye&&at(i)!==null&&ya(i)}let Al=!1;function Rl(){Al||(Al=!0,document.addEventListener("reset",i=>{Promise.resolve().then(()=>{var t;if(!i.defaultPrevented)for(const e of i.target.elements)(t=e.__on_r)==null||t.call(e)})},{capture:!0}))}function Bt(i,t,e,r=!0){r&&e();for(var n of t)i.addEventListener(n,e);Qt(()=>{for(var o of t)i.removeEventListener(o,e)})}function Yr(i){var t=Ue,e=Fe;It(null),jt(null);try{return i()}finally{It(t),jt(e)}}function cn(i,t,e,r=e){i.addEventListener(t,()=>Yr(e));const n=i.__on_r;n?i.__on_r=()=>{n(),r(!0)}:i.__on_r=()=>r(!0),Rl()}function xa(i){Fe===null&&(Ue===null&&$h(),Jh()),_i&&Qh()}function nf(i,t){var e=t.last;e===null?t.last=t.first=i:(e.next=i,i.prev=e,t.last=i)}function Vt(i,t,e){var r=Fe;r!==null&&(r.f&Wt)!==0&&(i|=Wt);var n={ctx:Ze,deps:null,nodes:null,f:i|Ot|dr,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(e)try{Di(n),n.f|=tn}catch(s){throw mt(n),s}else t!==null&&pi(n);var o=n;if(e&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&li)===0&&(o=o.first,(i&br)!==0&&(i&fr)!==0&&o!==null&&(o.f|=fr)),o!==null&&(o.parent=r,r!==null&&nf(o,r),Ue!==null&&(Ue.f&vt)!==0&&(i&Gr)===0)){var a=Ue;(a.effects??(a.effects=[])).push(o)}return n}function gi(){return Ue!==null&&!Sr}function Qt(i){const t=Vt(co,null,!1);return Tt(t,Pt),t.teardown=i,t}function st(i){xa();var t=Fe.f,e=!Ue&&(t&Hr)!==0&&(t&tn)===0;if(e){var r=Ze;(r.e??(r.e=[])).push(i)}else return Il(i)}function Il(i){return Vt(lo|Xs,i,!1)}function Ml(i){return xa(),Vt(co|Xs,i,!0)}function Ol(i){return Vt(ho,i,!0)}function Dl(i){Xt.ensure();const t=Vt(Gr|li,i,!0);return()=>{mt(t)}}function of(i){Xt.ensure();const t=Vt(Gr|li,i,!0);return(e={})=>new Promise(r=>{e.outro?vi(t,()=>{mt(t),r(void 0)}):(mt(t),r(void 0))})}function Jt(i){return Vt(lo,i,!1)}function af(i,t){var e=Ze,r={effect:null,ran:!1,deps:i};e.l.$.push(r),r.effect=ht(()=>{i(),!r.ran&&(r.ran=!0,et(t))})}function sf(){var i=Ze;ht(()=>{for(var t of i.l.$){t.deps();var e=t.effect;(e.f&Pt)!==0&&Tt(e,yr),Oi(e)&&Di(e),t.ran=!1}})}function lf(i){return Vt(fo|li,i,!0)}function ht(i,t=0){return Vt(co|t,i,!0)}function Re(i,t=[],e=[],r=[]){an(r,t,e,n=>{Vt(co,()=>i(...n.map(p)),!0)})}function cf(i,t=[],e=[],r=[]){var n=Be,o=e.length>0||r.length>0;o&&n.increment(!0),an(r,t,e,a=>{Vt(lo,()=>i(...a.map(p)),!1),o&&n.decrement(!0)})}function kr(i,t=0){var e=Vt(br|t,i,!0);return e}function Ll(i,t=0){var e=Vt(qs|t,i,!0);return e}function zt(i){return Vt(Hr|li,i,!0)}function zl(i){var t=i.teardown;if(t!==null){const e=_i,r=Ue;Ul(!0),It(null);try{t.call(null)}finally{Ul(e),It(r)}}}function Hl(i,t=!1){var e=i.first;for(i.first=i.last=null;e!==null;){const n=e.ac;n!==null&&Yr(()=>{n.abort(ui)});var r=e.next;(e.f&Gr)!==0?e.parent=null:mt(e,t),e=r}}function uf(i){for(var t=i.first;t!==null;){var e=t.next;(t.f&Hr)===0&&mt(t),t=e}}function mt(i,t=!0){var e=!1;(t||(i.f&la)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(Nl(i.nodes.start,i.nodes.end),e=!0),Hl(i,t&&!e),Co(i,0),Tt(i,xr);var r=i.nodes&&i.nodes.t;if(r!==null)for(const o of r)o.stop();zl(i);var n=i.parent;n!==null&&n.first!==null&&Fl(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=null}function Nl(i,t){for(;i!==null;){var e=i===t?null:Kt(i);i.remove(),i=e}}function Fl(i){var t=i.parent,e=i.prev,r=i.next;e!==null&&(e.next=r),r!==null&&(r.prev=e),t!==null&&(t.first===i&&(t.first=r),t.last===i&&(t.last=e))}function vi(i,t,e=!0){var r=[];Bl(i,r,!0);var n=()=>{e&&mt(i),t&&t()},o=r.length;if(o>0){var a=()=>--o||n();for(var s of r)s.out(a)}else n()}function Bl(i,t,e){if((i.f&Wt)===0){i.f^=Wt;var r=i.nodes&&i.nodes.t;if(r!==null)for(const s of r)(s.is_global||e)&&t.push(s);for(var n=i.first;n!==null;){var o=n.next,a=(n.f&fr)!==0||(n.f&Hr)!==0&&(i.f&br)!==0;Bl(n,t,a?e:!1),n=o}}}function Ta(i){Vl(i,!0)}function Vl(i,t){if((i.f&Wt)!==0){i.f^=Wt,(i.f&Pt)===0&&(Tt(i,Ot),pi(i));for(var e=i.first;e!==null;){var r=e.next,n=(e.f&fr)!==0||(e.f&Hr)!==0;Vl(e,n?t:!1),e=r}var o=i.nodes&&i.nodes.t;if(o!==null)for(const a of o)(a.is_global||t)&&a.in()}}function ko(i=Fe){return(i.f&xr)!==0}function jl(i,t){if(i.nodes)for(var e=i.nodes.start,r=i.nodes.end;e!==null;){var n=e===r?null:Kt(e);t.append(e),e=n}}let Kr=null;function hf(i){var t=Kr;try{if(Kr=new Set,et(i),t!==null)for(var e of Kr)t.add(e);return Kr}finally{Kr=t}}function df(i){for(var t of hf(i))Er(t,t.v)}let mi=!1;function So(i){mi=i}let _i=!1;function Ul(i){_i=i}let Ue=null,Sr=!1;function It(i){Ue=i}let Fe=null;function jt(i){Fe=i}let Ht=null;function Gl(i){Ue!==null&&(Ht===null?Ht=[i]:Ht.push(i))}let Nt=null,$t=0,nr=null;function ff(i){nr=i}let Zl=1,un=0,gr=un;function Wl(i){gr=i}function ql(){return++Zl}function Oi(i){var t=i.f;if((t&Ot)!==0)return!0;if(t&vt&&(i.f&=~ci),(t&yr)!==0){var e=i.deps;if(e!==null)for(var r=e.length,n=0;n<r;n++){var o=e[n];if(Oi(o)&&wl(o),o.wv>i.wv)return!0}(t&dr)!==0&&ot===null&&Tt(i,Pt)}return!1}function Xl(i,t,e=!0){var r=i.reactions;if(r!==null&&!(Ht!=null&&Ht.includes(i)))for(var n=0;n<r.length;n++){var o=r[n];(o.f&vt)!==0?Xl(o,t,!1):t===o&&(e?Tt(o,Ot):(o.f&Pt)!==0&&Tt(o,yr),pi(o))}}function Yl(i){var _;var t=Nt,e=$t,r=nr,n=Ue,o=Ht,a=Ze,s=Sr,c=gr,l=i.f;Nt=null,$t=0,nr=null,Ue=(l&(Hr|Gr))===0?i:null,Ht=null,Ri(i.ctx),Sr=!1,gr=++un,i.ac!==null&&(Yr(()=>{i.ac.abort(ui)}),i.ac=null);try{i.f|=ca;var u=i.fn,h=u(),f=i.deps;if(Nt!==null){var v;if(Co(i,$t),f!==null&&$t>0)for(f.length=$t+Nt.length,v=0;v<Nt.length;v++)f[$t+v]=Nt[v];else i.deps=f=Nt;if(gi()&&(i.f&dr)!==0)for(v=$t;v<f.length;v++)((_=f[v]).reactions??(_.reactions=[])).push(i)}else f!==null&&$t<f.length&&(Co(i,$t),f.length=$t);if(ll()&&nr!==null&&!Sr&&f!==null&&(i.f&(vt|yr|Ot))===0)for(v=0;v<nr.length;v++)Xl(nr[v],i);return n!==null&&n!==i&&(un++,nr!==null&&(r===null?r=nr:r.push(...nr))),(i.f&Zr)!==0&&(i.f^=Zr),h}catch(d){return ul(d)}finally{i.f^=ca,Nt=t,$t=e,nr=r,Ue=n,Ht=o,Ri(a),Sr=s,gr=c}}function pf(i,t){let e=t.reactions;if(e!==null){var r=Lh.call(e,i);if(r!==-1){var n=e.length-1;n===0?e=t.reactions=null:(e[r]=e[n],e.pop())}}e===null&&(t.f&vt)!==0&&(Nt===null||!Nt.includes(t))&&(Tt(t,yr),(t.f&dr)!==0&&(t.f^=dr,t.f&=~ci),_l(t),Co(t,0))}function Co(i,t){var e=i.deps;if(e!==null)for(var r=t;r<e.length;r++)pf(i,e[r])}function Di(i){var t=i.f;if((t&xr)===0){Tt(i,Pt);var e=Fe,r=mi;Fe=i,mi=!0;try{(t&(br|qs))!==0?uf(i):Hl(i),zl(i);var n=Yl(i);i.teardown=typeof n=="function"?n:null,i.wv=Zl;var o;aa&&yd&&(i.f&Ot)!==0&&i.deps}finally{mi=r,Fe=e}}}async function Ea(){await Promise.resolve(),Ft()}function gf(){return Xt.ensure().settled()}function p(i){var t=i.f,e=(t&vt)!==0;if(Kr==null||Kr.add(i),Ue!==null&&!Sr){var r=Fe!==null&&(Fe.f&xr)!==0;if(!r&&!(Ht!=null&&Ht.includes(i))){var n=Ue.deps;if((Ue.f&ca)!==0)i.rv<un&&(i.rv=un,Nt===null&&n!==null&&n[$t]===i?$t++:Nt===null?Nt=[i]:Nt.includes(i)||Nt.push(i));else{(Ue.deps??(Ue.deps=[])).push(i);var o=i.reactions;o===null?i.reactions=[Ue]:o.includes(Ue)||o.push(Ue)}}}if(_i){if(Xr.has(i))return Xr.get(i);if(e){var a=i,s=a.v;return((a.f&Pt)===0&&a.reactions!==null||Ql(a))&&(s=ma(a)),Xr.set(a,s),s}}else e&&(!(ot!=null&&ot.has(i))||Be!=null&&Be.is_fork&&!gi())&&(a=i,Oi(a)&&wl(a),mi&&gi()&&(a.f&dr)===0&&Kl(a));if(ot!=null&&ot.has(i))return ot.get(i);if((i.f&Zr)!==0)throw i.v;return i.v}function Kl(i){if(i.deps!==null){i.f^=dr;for(const t of i.deps)(t.reactions??(t.reactions=[])).push(i),(t.f&vt)!==0&&(t.f&dr)===0&&Kl(t)}}function Ql(i){if(i.v===ct)return!0;if(i.deps===null)return!1;for(const t of i.deps)if(Xr.has(t)||(t.f&vt)!==0&&Ql(t))return!0;return!1}function vf(i){return i&&p(i)}function et(i){var t=Sr;try{return Sr=!0,i()}finally{Sr=t}}const mf=-7169;function Tt(i,t){i.f=i.f&mf|t}function _f(i,t){var e={};for(var r in i)t.includes(r)||(e[r]=i[r]);for(var n of Object.getOwnPropertySymbols(i))Object.propertyIsEnumerable.call(i,n)&&!t.includes(n)&&(e[n]=i[n]);return e}function ka(i){if(!(typeof i!="object"||!i||i instanceof EventTarget)){if(Dt in i)Po(i);else if(!Array.isArray(i))for(let t in i){const e=i[t];typeof e=="object"&&e&&Dt in e&&Po(e)}}}function Po(i,t=new Set){if(typeof i=="object"&&i!==null&&!(i instanceof EventTarget)&&!t.has(i)){t.add(i),i instanceof Date&&i.getTime();for(let r in i)try{Po(i[r],t)}catch{}const e=so(i);if(e!==Object.prototype&&e!==Array.prototype&&e!==Map.prototype&&e!==Set.prototype&&e!==Date.prototype){const r=js(e);for(let n in r){const o=r[n].get;if(o)try{o.call(i)}catch{}}}}}function wf(i,t){var e;if(Qs(),ye){const r=(e=window.__svelte)==null?void 0:e.h;if(r!=null&&r.has(i))return r.get(i);gd()}return t()}const Jl=new Set,Sa=new Set;function bf(i){if(!ye)return;i.removeAttribute("onload"),i.removeAttribute("onerror");const t=i.__e;t!==void 0&&(i.__e=void 0,queueMicrotask(()=>{i.isConnected&&i.dispatchEvent(t)}))}function $l(i,t,e,r={}){function n(o){if(r.capture||hn.call(t,o),!o.cancelBubble)return Yr(()=>e==null?void 0:e.call(this,o))}return i.startsWith("pointer")||i.startsWith("touch")||i==="wheel"?qt(()=>{t.addEventListener(i,n,r)}):t.addEventListener(i,n,r),n}function Ao(i,t,e,r,n){var o={capture:r,passive:n},a=$l(i,t,e,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Qt(()=>{t.removeEventListener(i,a,o)})}function Qr(i){for(var t=0;t<i.length;t++)Jl.add(i[t]);for(var e of Sa)e(i)}let ec=null;function hn(i){var g;var t=this,e=t.ownerDocument,r=i.type,n=((g=i.composedPath)==null?void 0:g.call(i))||[],o=n[0]||i.target;ec=i;var a=0,s=ec===i&&i.__root;if(s){var c=n.indexOf(s);if(c!==-1&&(t===document||t===window)){i.__root=t;return}var l=n.indexOf(t);if(l===-1)return;c<=l&&(a=c)}if(o=n[a]||i.target,o!==t){si(i,"currentTarget",{configurable:!0,get(){return o||e}});var u=Ue,h=Fe;It(null),jt(null);try{for(var f,v=[];o!==null;){var _=o.assignedSlot||o.parentNode||o.host||null;try{var d=o["__"+r];d!=null&&(!o.disabled||i.target===o)&&d.call(o,i)}catch(y){f?v.push(y):f=y}if(i.cancelBubble||_===t||_===null)break;o=_}if(f){for(let y of v)queueMicrotask(()=>{throw y});throw f}}finally{i.__root=t,delete i.currentTarget,It(u),jt(h)}}}function yf(i,t,e,r,n,o=!1,a=!1){var l,u;let s,c;try{s=i()}catch(h){c=h}if(typeof s!="function"&&(o||s!=null||c)){const h=r==null?void 0:r[Zt];n?`${h}${n[0]}${n[1]}`:`${h}`;const f=((l=e[0])==null?void 0:l.eventPhase)<Event.BUBBLING_PHASE?"capture":"";if(((u=e[0])==null?void 0:u.type)+f,pd(),c)throw c}s==null||s.apply(t,e)}function Ro(i){var t=document.createElement("template");return t.innerHTML=i.replaceAll("<!>","<!---->"),t.content}function Et(i,t){var e=Fe;e.nodes===null&&(e.nodes={start:i,end:t,a:null,t:null})}function me(i,t){var e=(t&na)!==0,r=(t&Ns)!==0,n,o=!i.startsWith("<!>");return()=>{if(ye)return Et(Oe,null),Oe;n===void 0&&(n=Ro(o?i:"<!>"+i),e||(n=at(n)));var a=r||wa?document.importNode(n,!0):n.cloneNode(!0);if(e){var s=at(a),c=a.lastChild;Et(s,c)}else Et(a,a);return a}}function tc(i,t,e="svg"){var r=!i.startsWith("<!>"),n=(t&na)!==0,o=`<${e}>${r?i:"<!>"+i}</${e}>`,a;return()=>{if(ye)return Et(Oe,null),Oe;if(!a){var s=Ro(o),c=at(s);if(n)for(a=document.createDocumentFragment();at(c);)a.appendChild(at(c));else a=at(c)}var l=a.cloneNode(!0);if(n){var u=at(l),h=l.lastChild;Et(u,h)}else Et(l,l);return l}}function Q(i,t){return tc(i,t,"svg")}function xf(i,t){return tc(i,t,"math")}function rc(i,t){var e=$d();for(var r of i){if(typeof r=="string"){e.append(Rt(r));continue}if(r===void 0||r[0][0]==="/"){e.append(ef(r?r[0].slice(3):""));continue}const[s,c,...l]=r,u=s==="svg"?no:s==="math"?Bs:t;var n=Jd(s,u,c==null?void 0:c.is);for(var o in c)tf(n,o,c[o]);if(l.length>0){var a=n.tagName==="TEMPLATE"?n.content:n;a.append(rc(l,n.tagName==="foreignObject"?void 0:u))}e.append(n)}return e}function Tf(i,t){var e=(t&na)!==0,r=(t&Ns)!==0,n;return()=>{if(ye)return Et(Oe,null),Oe;if(n===void 0){const c=(t&Mh)!==0?no:(t&Oh)!==0?Bs:void 0;n=rc(i,c),e||(n=at(n))}var o=r||wa?document.importNode(n,!0):n.cloneNode(!0);if(e){var a=at(o),s=o.lastChild;Et(a,s)}else Et(o,o);return o}}function Ef(i){return()=>kf(i())}function kf(i){if(ye)return i;const t=i.nodeType===Ks,e=i.tagName==="SCRIPT"?[i]:i.querySelectorAll("script"),r=Fe;for(const o of e){const a=document.createElement("script");for(var n of o.attributes)a.setAttribute(n.name,n.value);a.textContent=o.textContent,(t?i.firstChild===o:i===o)&&(r.nodes.start=a),(t?i.lastChild===o:i===o)&&(r.nodes.end=a),o.replaceWith(a)}return i}function pt(i=""){if(!ye){var t=Rt(i+"");return Et(t,t),t}var e=Oe;return e.nodeType!==go&&(e.before(e=Rt()),it(e)),Et(e,e),e}function $(){if(ye)return Et(Oe,null),Oe;var i=document.createDocumentFragment(),t=document.createComment(""),e=Rt();return i.append(t,e),Et(t,e),i}function x(i,t){if(ye){var e=Fe;((e.f&tn)===0||e.nodes.end===null)&&(e.nodes.end=Oe),At();return}i!==null&&i.before(t)}function Sf(){var i,t;if(ye&&Oe&&Oe.nodeType===Tr&&((i=Oe.textContent)!=null&&i.startsWith("$"))){const e=Oe.textContent.substring(1);return At(),e}return(t=window.__svelte??(window.__svelte={})).uid??(t.uid=1),`c${window.__svelte.uid++}`}const Cf=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Pf(i){return Cf.includes(i)||i.toLowerCase()==="!doctype"}function Af(i){return i.endsWith("capture")&&i!=="gotpointercapture"&&i!=="lostpointercapture"}const Rf=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function If(i){return Rf.includes(i)}const Mf={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Of(i){return i=i.toLowerCase(),Mf[i]??i}const Df=["touchstart","touchmove"];function Lf(i){return Df.includes(i)}const zf=["textarea","script","style","title"];function Hf(i){return zf.includes(i)}function ic(i){return i==null?void 0:i.replace(/\//g,"/")}let Io=!0;function Li(i){Io=i}function qe(i,t){var e=t==null?"":typeof t=="object"?t+"":t;e!==(i.__t??(i.__t=i.nodeValue))&&(i.__t=e,i.nodeValue=e+"")}function Ca(i,t){return oc(i,t)}function nc(i,t){ba(),t.intro=t.intro??!1;const e=t.target,r=ye,n=Oe;try{for(var o=at(e);o&&(o.nodeType!==Tr||o.data!==oa);)o=Kt(o);if(!o)throw oi;ut(!0),it(o);const a=oc(i,{...t,anchor:o});return ut(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
5
|
-
`).some(s=>s.startsWith("https://svelte.dev/e/")))throw a;return a!==oi&&console.warn("Failed to hydrate: ",a),t.recover===!1&&od(),ba(),ya(e),ut(!1),Ca(i,t)}finally{ut(r),it(n)}}const zi=new Map;function oc(i,{target:t,anchor:e,props:r={},events:n,context:o,intro:a=!0}){ba();var s=new Set,c=h=>{for(var f=0;f<h.length;f++){var v=h[f];if(!s.has(v)){s.add(v);var _=Lf(v);t.addEventListener(v,hn,{passive:_});var d=zi.get(v);d===void 0?(document.addEventListener(v,hn,{passive:_}),zi.set(v,1)):zi.set(v,d+1)}}};c(oo(Jl)),Sa.add(c);var l=void 0,u=of(()=>{var h=e??t.appendChild(Rt());return gl(h,{pending:()=>{}},f=>{if(o){Qe({});var v=Ze;v.c=o}if(n&&(r.$$events=n),ye&&Et(f,null),Io=a,l=i(f,r)||{},Io=!0,ye&&(Fe.nodes.end=Oe,Oe===null||Oe.nodeType!==Tr||Oe.data!==io))throw rn(),oi;o&&Je()}),()=>{var _;for(var f of s){t.removeEventListener(f,hn);var v=zi.get(f);--v===0?(document.removeEventListener(f,hn),zi.delete(f)):zi.set(f,v)}Sa.delete(c),h!==e&&((_=h.parentNode)==null||_.removeChild(h))}});return Pa.set(l,u),l}let Pa=new WeakMap;function ac(i,t){const e=Pa.get(i);return e?(Pa.delete(i),e(t)):Promise.resolve()}function Nf(i){const t=i();t&&Pf(t)&&xd()}function Ff(i){const t=i();t&&!(typeof t=="string")&&Wh()}function Bf(i,t){i!=null&&typeof i.subscribe!="function"&&Zh()}function sc(i){return i.toString=()=>(Gh(),""),i}class Hi{constructor(t,e=!0){nt(this,"anchor");be(this,vr,new Map);be(this,Dr,new Map);be(this,tr,new Map);be(this,Ei,new Set);be(this,En,!0);be(this,kn,()=>{var t=Be;if(R(this,vr).has(t)){var e=R(this,vr).get(t),r=R(this,Dr).get(e);if(r)Ta(r),R(this,Ei).delete(e);else{var n=R(this,tr).get(e);n&&(R(this,Dr).set(e,n.effect),R(this,tr).delete(e),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[o,a]of R(this,vr)){if(R(this,vr).delete(o),o===t)break;const s=R(this,tr).get(a);s&&(mt(s.effect),R(this,tr).delete(a))}for(const[o,a]of R(this,Dr)){if(o===e||R(this,Ei).has(o))continue;const s=()=>{if(Array.from(R(this,vr).values()).includes(o)){var l=document.createDocumentFragment();jl(a,l),l.append(Rt()),R(this,tr).set(o,{effect:a,fragment:l})}else mt(a);R(this,Ei).delete(o),R(this,Dr).delete(o)};R(this,En)||!r?(R(this,Ei).add(o),vi(a,s,!1)):s()}}});be(this,Yo,t=>{R(this,vr).delete(t);const e=Array.from(R(this,vr).values());for(const[r,n]of R(this,tr))e.includes(r)||(mt(n.effect),R(this,tr).delete(r))});this.anchor=t,ze(this,En,e)}ensure(t,e){var r=Be,n=Cl();if(e&&!R(this,Dr).has(t)&&!R(this,tr).has(t))if(n){var o=document.createDocumentFragment(),a=Rt();o.append(a),R(this,tr).set(t,{effect:zt(()=>e(a)),fragment:o})}else R(this,Dr).set(t,zt(()=>e(this.anchor)));if(R(this,vr).set(r,t),n){for(const[s,c]of R(this,Dr))s===t?r.skipped_effects.delete(c):r.skipped_effects.add(c);for(const[s,c]of R(this,tr))s===t?r.skipped_effects.delete(c.effect):r.skipped_effects.add(c.effect);r.oncommit(R(this,kn)),r.ondiscard(R(this,Yo))}else ye&&(this.anchor=Oe),R(this,kn).call(this)}}vr=new WeakMap,Dr=new WeakMap,tr=new WeakMap,Ei=new WeakMap,En=new WeakMap,kn=new WeakMap,Yo=new WeakMap;function _t(i,t,...e){var r=new Hi(i);kr(()=>{const n=t()??null;r.ensure(n,n&&(o=>n(o,...e)))},fr)}function Vf(i,t){const e=(r,...n)=>{var o=nn;sl(i);try{return t(r,...n)}finally{sl(o)}};return sc(e),e}function jf(i){return(t,...e)=>{var c;var r=i(...e),n;if(ye)n=Oe,At();else{var o=r.render().trim(),a=Ro(o);n=at(a),t.before(n)}const s=(c=r.setup)==null?void 0:c.call(r,n);Et(n,n),typeof s=="function"&&Qt(s)}}function Uf(){return Ue===null&&nd(),(Ue.ac??(Ue.ac=new AbortController)).signal}function Aa(i){Ze===null&&Pi(),st(()=>{const t=et(i);if(typeof t=="function")return t})}function Ra(i){Ze===null&&Pi(),Aa(()=>()=>et(i))}function Gf(i,t,{bubbles:e=!1,cancelable:r=!1}={}){return new CustomEvent(i,{detail:t,bubbles:e,cancelable:r})}function Zf(){const i=Ze;return i===null&&Pi(),(t,e,r)=>{var o;const n=(o=i.s.$$events)==null?void 0:o[t];if(n){const a=ai(n)?n.slice():[n],s=Gf(t,e,r);for(const c of a)c.call(i.x,s);return!s.defaultPrevented}return!0}}function Wf(i){Ze===null&&Pi(),Ze.l===null&&$s(),lc(Ze).b.push(i)}function qf(i){Ze===null&&Pi(),Ze.l===null&&$s(),lc(Ze).a.push(i)}function lc(i){var t=i.l;return t.u??(t.u={a:[],b:[],m:[]})}const Xf=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:qf,beforeUpdate:Wf,createContext:Rd,createEventDispatcher:Zf,createRawSnippet:jf,flushSync:Ft,fork:Hd,getAbortSignal:Uf,getAllContexts:Id,getContext:Wr,hasContext:ha,hydratable:wf,hydrate:nc,mount:Ca,onDestroy:Ra,onMount:Aa,setContext:ua,settled:gf,tick:Ea,unmount:ac,untrack:et},Symbol.toStringTag,{value:"Module"}));function Yf(){return Symbol(Vs)}function Mo(i,t,e,r){return i!==t&&hd(e,ic(r)),i}function Kf(i,t,e,r){return Mo(i[t]=e,et(()=>i[t]),t,r)}function Qf(i,t,e,r){return Mo(i[t]&&(i[t]=e),et(()=>i[t]),t,r)}function Jf(i,t,e,r){return Mo(i[t]||(i[t]=e),et(()=>i[t]),t,r)}function $f(i,t,e,r){return Mo(i[t]??(i[t]=e),et(()=>i[t]),t,r)}var cc=new Map;function ep(i){var t=cc.get(i);if(t){for(const e of t)e.remove();cc.delete(i)}}function tp(i,t,e){return(...r)=>{const n=i(...r);var o=ye?n:n.nodeType===Ks?n.firstChild:n;return uc(o,t,e),n}}function rp(i,t,e){i.__svelte_meta={parent:_o,loc:{file:t,line:e[0],column:e[1]}},e[2]&&uc(i.firstChild,t,e[2])}function uc(i,t,e){for(var r=0,n=0;i&&r<e.length;){if(ye&&i.nodeType===Tr){var o=i;o.data===oa||o.data===Si?n+=1:o.data[0]===io&&(n-=1)}n===0&&i.nodeType===Ys&&rp(i,t,e[r++]),i=i.nextSibling}}function ip(i,t){function e(r,n){let o={},a,s=!1;return kr(()=>{const c=t(),l=p(c);if(a){for(var u in o)delete o[u];mt(a)}a=zt(()=>{s&&Li(!1),Object.defineProperties(o,Object.getOwnPropertyDescriptors(new.target?new l(r,n):l(r,n))),s&&Li(!0)})},fr),s=!0,ye&&(r=Oe),o}return e[Zt]=i[Zt],e[Fs]={original:i,source:Lt(i)},e}function np(i){var r;const t=Ze==null?void 0:Ze.function,e=(r=Ze==null?void 0:Ze.p)==null?void 0:r.function;return{mutation:(n,o,a,s,c)=>{const l=o[0];if(hc(i,l)||!e)return a;let u=i;for(let f=0;f<o.length-1;f++)if(u=u[o[f]],!(u!=null&&u[Dt]))return a;const h=ic(`${t[Zt]}:${s}:${c}`);return md(l,h,n,e[Zt]),a},binding:(n,o,a)=>{var s;!hc(i,n)&&e&&((s=a())!=null&&s[Dt])&&vd(t[Zt],n,o[Zt],e[Zt])}}}function hc(i,t){var r;const e=Dt in i||po in i;return!!((r=hr(i,t))!=null&&r.set)||e&&t in i||!(t in i)}function op(i){i&&Yh(i[Zt]??"a component",i.name)}function ap(){const i=Ze==null?void 0:Ze.function;function t(e){Xh(e,i[Zt])}return{$destroy:()=>t("$destroy()"),$on:()=>t("$on(...)"),$set:()=>t("$set(...)")}}function sp(i,t,e=!1){xa();let r=!0,n=ct;Ol(()=>{try{var o=i()}catch(s){n=s;return}var a=vo(o,!0,!0);et(()=>{if(e){if(t(...a),!r){const s=Cd("$inspect(...)");s&&(console.groupCollapsed("stack trace"),console.log(s),console.groupEnd())}}else t(r?"init":"update",...a)}),r=!1}),ht(()=>{try{i()}catch{}n!==ct&&(console.error(n),n=ct)})}function lp(i,t=[],e=[],r){var n=pa(),o=Be,a=!n.is_pending();n.update_pending_count(1),o.increment(a);var s=ye;if(s){At();var c=Oe,l=hi(!1);it(l)}an(t,[],e,u=>{s&&(ut(!0),it(c));try{for(const h of u)p(h);r(i,...u)}finally{s&&ut(!1),n.update_pending_count(-1),o.decrement(a)}})}function cp(i,...t){(typeof i!="object"||!(i instanceof Node))&&Js();for(let e of t)typeof e!="function"&&Js()}const dc=0,Ia=1;function up(i,t,e,r,n){ye&&At();var o=ct,a=Lt(o),s=Lt(o),c=new Hi(i);kr(()=>{var l=t(),u=!1;let h=ye&&Zs(l)===(i.data===Si);if(h&&(it(hi()),ut(!1)),Zs(l)){var f=xo(),v=!1;const _=d=>{if(!u){v=!0,f(!1),Xt.ensure(),ye&&ut(!1);try{d()}finally{qr(),Ii||Ft()}}};l.then(d=>{_(()=>{Er(a,d),c.ensure(Ia,r&&(g=>r(g,a)))})},d=>{_(()=>{if(Er(s,d),c.ensure(Ia,n&&(g=>n(g,s))),!n)throw s.v})}),ye?c.ensure(dc,e):qt(()=>{v||_(()=>{c.ensure(dc,e)})})}else Er(a,l),c.ensure(Ia,r&&(_=>r(_,a)));return h&&ut(!0),()=>{u=!0}})}function D(i,t,e=!1){ye&&At();var r=new Hi(i),n=e?fr:0;function o(a,s){if(ye){const l=tl(i)===Si;if(a===l){var c=hi();it(c),r.anchor=c,ut(!1),r.ensure(a,s),ut(!0);return}}r.ensure(a,s)}kr(()=>{var a=!1;t((s,c=!0)=>{a=!0,o(c,s)}),a||o(!1,null)},n)}function hp(i,t,e){ye&&At();var r=new Hi(i);kr(()=>{var n=t();r.ensure(n,e)})}function dp(i,t){ye&&it(at(i)),ht(()=>{var e=t();for(var r in e){var n=e[r];n?i.style.setProperty(r,n):i.style.removeProperty(r)}})}function Ni(i,t){return t}function fp(i,t,e){for(var r=[],n=t.length,o,a=t.length,s=0;s<n;s++){let h=t[s];vi(h,()=>{if(o){if(o.pending.delete(h),o.done.add(h),o.pending.size===0){var f=i.outrogroups;Ma(oo(o.done)),f.delete(o),f.size===0&&(i.outrogroups=null)}}else a-=1},!1)}if(a===0){var c=r.length===0&&e!==null;if(c){var l=e,u=l.parentNode;ya(u),u.append(l),i.items.clear()}Ma(t,!c)}else o={pending:new Set(t),done:new Set},(i.outrogroups??(i.outrogroups=new Set)).add(o)}function Ma(i,t=!0){for(var e=0;e<i.length;e++)mt(i[e],t)}var fc;function Ut(i,t,e,r,n,o=null){var a=i,s=new Map,c=(t&en)!==0;if(c){var l=i;a=ye?it(at(l)):l.appendChild(Rt())}ye&&At();var u=null,h=va(()=>{var y=e();return ai(y)?y:y==null?[]:oo(y)}),f,v=!0;function _(){g.fallback=u,pp(g,f,a,t,r),u!==null&&(f.length===0?(u.f&Nr)===0?Ta(u):(u.f^=Nr,dn(u,null,a)):vi(u,()=>{u=null}))}var d=kr(()=>{f=p(h);var y=f.length;let S=!1;if(ye){var P=tl(a)===Si;P!==(y===0)&&(a=hi(),it(a),ut(!1),S=!0)}for(var E=new Set,A=Be,B=Cl(),q=0;q<y;q+=1){ye&&Oe.nodeType===Tr&&Oe.data===io&&(a=Oe,S=!0,ut(!1));var z=f[q],I=r(z,q),M=v?null:s.get(I);M?(M.v&&Er(M.v,z),M.i&&Er(M.i,q),B&&A.skipped_effects.delete(M.e)):(M=gp(s,v?a:fc??(fc=Rt()),z,I,q,n,t,e),v||(M.e.f|=Nr),s.set(I,M)),E.add(I)}if(y===0&&o&&!u&&(v?u=zt(()=>o(a)):(u=zt(()=>o(fc??(fc=Rt()))),u.f|=Nr)),ye&&y>0&&it(hi()),!v)if(B){for(const[J,ee]of s)E.has(J)||A.skipped_effects.add(ee.e);A.oncommit(_),A.ondiscard(()=>{})}else _();S&&ut(!0),p(h)}),g={effect:d,items:s,outrogroups:null,fallback:u};v=!1,ye&&(a=Oe)}function pp(i,t,e,r,n){var M,J,ee,ie,L,F,X,ae,oe;var o=(r&Eh)!==0,a=t.length,s=i.items,c=i.effect.first,l,u=null,h,f=[],v=[],_,d,g,y;if(o)for(y=0;y<a;y+=1)_=t[y],d=n(_,y),g=s.get(d).e,(g.f&Nr)===0&&((J=(M=g.nodes)==null?void 0:M.a)==null||J.measure(),(h??(h=new Set)).add(g));for(y=0;y<a;y+=1){if(_=t[y],d=n(_,y),g=s.get(d).e,i.outrogroups!==null)for(const H of i.outrogroups)H.pending.delete(g),H.done.delete(g);if((g.f&Nr)!==0)if(g.f^=Nr,g===c)dn(g,null,e);else{var S=u?u.next:c;g===i.effect.last&&(i.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Jr(i,u,g),Jr(i,g,S),dn(g,S,e),u=g,f=[],v=[],c=u.next;continue}if((g.f&Wt)!==0&&(Ta(g),o&&((ie=(ee=g.nodes)==null?void 0:ee.a)==null||ie.unfix(),(h??(h=new Set)).delete(g))),g!==c){if(l!==void 0&&l.has(g)){if(f.length<v.length){var P=v[0],E;u=P.prev;var A=f[0],B=f[f.length-1];for(E=0;E<f.length;E+=1)dn(f[E],P,e);for(E=0;E<v.length;E+=1)l.delete(v[E]);Jr(i,A.prev,B.next),Jr(i,u,A),Jr(i,B,P),c=P,u=B,y-=1,f=[],v=[]}else l.delete(g),dn(g,c,e),Jr(i,g.prev,g.next),Jr(i,g,u===null?i.effect.first:u.next),Jr(i,u,g),u=g;continue}for(f=[],v=[];c!==null&&c!==g;)(l??(l=new Set)).add(c),v.push(c),c=c.next;if(c===null)continue}(g.f&Nr)===0&&f.push(g),u=g,c=g.next}if(i.outrogroups!==null){for(const H of i.outrogroups)H.pending.size===0&&(Ma(oo(H.done)),(L=i.outrogroups)==null||L.delete(H));i.outrogroups.size===0&&(i.outrogroups=null)}if(c!==null||l!==void 0){var q=[];if(l!==void 0)for(g of l)(g.f&Wt)===0&&q.push(g);for(;c!==null;)(c.f&Wt)===0&&c!==i.fallback&&q.push(c),c=c.next;var z=q.length;if(z>0){var I=(r&en)!==0&&a===0?e:null;if(o){for(y=0;y<z;y+=1)(X=(F=q[y].nodes)==null?void 0:F.a)==null||X.measure();for(y=0;y<z;y+=1)(oe=(ae=q[y].nodes)==null?void 0:ae.a)==null||oe.fix()}fp(i,q,I)}}o&&qt(()=>{var H,Y;if(h!==void 0)for(g of h)(Y=(H=g.nodes)==null?void 0:H.a)==null||Y.apply()})}function gp(i,t,e,r,n,o,a,s){var c=(a&rt)!==0?(a&kh)===0?Eo(e,!1,!1):Lt(e):null,l=(a&dt)!==0?Lt(n):null;return{v:c,i:l,e:zt(()=>(o(t,c??e,l??n,s),()=>{i.delete(r)}))}}function dn(i,t,e){if(i.nodes)for(var r=i.nodes.start,n=i.nodes.end,o=t&&(t.f&Nr)===0?t.nodes.start:e;r!==null;){var a=Kt(r);if(o.before(r),r===n)return;r=a}}function Jr(i,t,e){t===null?i.effect.first=e:t.next=e,e===null?i.effect.last=t:e.prev=t}function Cr(i,t,e=!1,r=!1,n=!1){var o=i,a="";Re(()=>{var s=Fe;if(a===(a=t()??"")){ye&&At();return}if(s.nodes!==null&&(Nl(s.nodes.start,s.nodes.end),s.nodes=null),a!==""){if(ye){Oe.data;for(var c=At(),l=c;c!==null&&(c.nodeType!==Tr||c.data!=="");)l=c,c=Kt(c);if(c===null)throw rn(),oi;Et(Oe,l),o=it(c);return}var u=a+"";e?u=`<svg>${u}</svg>`:r&&(u=`<math>${u}</math>`);var h=Ro(u);if((e||r)&&(h=at(h)),Et(at(h),h.lastChild),e||r)for(;at(h);)o.before(at(h));else o.before(h)}})}function vp(i,t,e,r,n){var s;ye&&At();var o=(s=t.$$slots)==null?void 0:s[e],a=!1;o===!0&&(o=t[e==="default"?"children":e],a=!0),o===void 0?n!==null&&n(i):o(i,a?()=>r:r)}function mp(i){const t={};i.children&&(t.default=!0);for(const e in i.$$slots)t[e]=!0;return t}function Fi(i,t,e){ye&&At();var r=new Hi(i);kr(()=>{var n=t()??null;r.ensure(n,n&&(o=>e(o,n)))},fr)}const _p=()=>performance.now(),Pr={tick:i=>requestAnimationFrame(i),now:()=>_p(),tasks:new Set};function pc(){const i=Pr.now();Pr.tasks.forEach(t=>{t.c(i)||(Pr.tasks.delete(t),t.f())}),Pr.tasks.size!==0&&Pr.tick(pc)}function wp(i){let t;return Pr.tasks.size===0&&Pr.tick(pc),{promise:new Promise(e=>{Pr.tasks.add(t={c:i,f:e})}),abort(){Pr.tasks.delete(t)}}}function Oo(i,t){Yr(()=>{i.dispatchEvent(new CustomEvent(t))})}function bp(i){if(i==="float")return"cssFloat";if(i==="offset")return"cssOffset";if(i.startsWith("--"))return i;const t=i.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}function gc(i){const t={},e=i.split(";");for(const r of e){const[n,o]=r.split(":");if(!n||o===void 0)break;const a=bp(n.trim());t[a]=o.trim()}return t}const yp=i=>i;let vc=null;function mc(i){vc=i}function xp(i,t,e){var r=vc??Fe,n=r.nodes,o,a,s,c=null;n.a??(n.a={element:i,measure(){o=this.element.getBoundingClientRect()},apply(){if(s==null||s.abort(),a=this.element.getBoundingClientRect(),o.left!==a.left||o.right!==a.right||o.top!==a.top||o.bottom!==a.bottom){const l=t()(this.element,{from:o,to:a},e==null?void 0:e());s=Do(this.element,l,void 0,1,()=>{s==null||s.abort(),s=void 0})}},fix(){if(!i.getAnimations().length){var{position:l,width:u,height:h}=getComputedStyle(i);if(l!=="absolute"&&l!=="fixed"){var f=i.style;c={position:f.position,width:f.width,height:f.height,transform:f.transform},f.position="absolute",f.width=u,f.height=h;var v=i.getBoundingClientRect();if(o.left!==v.left||o.top!==v.top){var _=`translate(${o.left-v.left}px, ${o.top-v.top}px)`;f.transform=f.transform?`${f.transform} ${_}`:_}}}},unfix(){if(c){var l=i.style;l.position=c.position,l.width=c.width,l.height=c.height,l.transform=c.transform}}}),n.a.element=i}function Tp(i,t,e,r){var P;var n=(i&Ah)!==0,o=(i&Rh)!==0,a=n&&o,s=(i&Ih)!==0,c=a?"both":n?"in":"out",l,u=t.inert,h=t.style.overflow,f,v;function _(){return Yr(()=>l??(l=e()(t,(r==null?void 0:r())??{},{direction:c})))}var d={is_global:s,in(){var E;if(t.inert=u,!n){v==null||v.abort(),(E=v==null?void 0:v.reset)==null||E.call(v);return}o||f==null||f.abort(),Oo(t,"introstart"),f=Do(t,_(),v,1,()=>{Oo(t,"introend"),f==null||f.abort(),f=l=void 0,t.style.overflow=h})},out(E){if(!o){E==null||E(),l=void 0;return}t.inert=!0,Oo(t,"outrostart"),v=Do(t,_(),f,0,()=>{Oo(t,"outroend"),E==null||E()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},g=Fe;if(((P=g.nodes).t??(P.t=[])).push(d),n&&Io){var y=s;if(!y){for(var S=g.parent;S&&(S.f&fr)!==0;)for(;(S=S.parent)&&(S.f&br)===0;);y=!S||(S.f&tn)!==0}y&&Jt(()=>{et(()=>d.in())})}}function Do(i,t,e,r,n){var o=r===1;if(Ci(t)){var a,s=!1;return qt(()=>{if(!s){var g=t({direction:o?"in":"out"});a=Do(i,g,e,r,n)}}),{abort:()=>{s=!0,a==null||a.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(e==null||e.deactivate(),!(t!=null&&t.duration))return n(),{abort:wr,deactivate:wr,reset:wr,t:()=>r};const{delay:c=0,css:l,tick:u,easing:h=yp}=t;var f=[];if(o&&e===void 0&&(u&&u(0,1),l)){var v=gc(l(0,1));f.push(v,v)}var _=()=>1-r,d=i.animate(f,{duration:c,fill:"forwards"});return d.onfinish=()=>{d.cancel();var g=(e==null?void 0:e.t())??1-r;e==null||e.abort();var y=r-g,S=t.duration*Math.abs(y),P=[];if(S>0){var E=!1;if(l)for(var A=Math.ceil(S/16.666666666666668),B=0;B<=A;B+=1){var q=g+y*h(B/A),z=gc(l(q,1-q));P.push(z),E||(E=z.overflow==="hidden")}E&&(i.style.overflow="hidden"),_=()=>{var I=d.currentTime;return g+y*h(I/S)},u&&wp(()=>{if(d.playState!=="running")return!1;var I=_();return u(I,1-I),!0})}d=i.animate(P,{duration:S,fill:"forwards"}),d.onfinish=()=>{_=()=>r,u==null||u(r,1-r),n()}},{abort:()=>{d&&(d.cancel(),d.effect=null,d.onfinish=wr)},deactivate:()=>{n=wr},reset:()=>{r===0&&(u==null||u(1,0))},t:()=>_()}}function Ep(i,t,e,r,n,o){let a=ye;ye&&At();var s=null;ye&&Oe.nodeType===Ys&&(s=Oe,At());var c=ye?Oe:i,l=Fe,u=new Hi(c,!1);kr(()=>{const h=t()||null;var f=n?n():e||h==="svg"?no:null;if(h===null){u.ensure(null,null),Li(!0);return}return u.ensure(h,v=>{if(h){if(s=ye?s:f?document.createElementNS(f,h):document.createElement(h),Et(s,s),r){ye&&Hf(h)&&s.append(document.createComment(""));var _=ye?at(s):s.appendChild(Rt());ye&&(_===null?ut(!1):it(_)),mc(l),r(s,_),mc(null)}Fe.nodes.end=s,v.before(s)}ye&&it(v)}),Li(!0),()=>{h&&Li(!1)}},fr),Qt(()=>{Li(!0)}),a&&(ut(!0),it(c))}function kp(i,t){let e=null,r=ye;var n;if(ye){e=Oe;for(var o=at(document.head);o!==null&&(o.nodeType!==Tr||o.data!==i);)o=Kt(o);if(o===null)ut(!1);else{var a=Kt(o);o.remove(),it(a)}}ye||(n=document.head.appendChild(Rt()));try{kr(()=>t(n),la)}finally{r&&(ut(!0),it(e))}}function Sp(i,t){Jt(()=>{var e=i.getRootNode(),r=e.host?e:e.head??e.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const n=document.createElement("style");n.id=t.hash,n.textContent=t.code,r.appendChild(n)}})}function Ar(i,t,e){Jt(()=>{var r=et(()=>t(i,e==null?void 0:e())||{});if(e&&(r!=null&&r.update)){var n=!1,o={};ht(()=>{var a=e();ka(a),n&&il(o,a)&&(o=a,r.update(a))}),n=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}function _c(i,t){var e=void 0,r;Ll(()=>{e!==(e=t())&&(r&&(mt(r),r=null),e&&(r=zt(()=>{Jt(()=>e(i))})))})}const Cp=/[&"<]/g;function Pp(i,t){const e=String(i??""),r=Cp;r.lastIndex=0;let n="",o=0;for(;r.test(e);){const a=r.lastIndex-1,s=e[a];n+=e.substring(o,a)+(s==="&"?"&":s==='"'?""":"<"),o=a+1}return n+e.substring(o)}function wc(i){var t,e,r="";if(typeof i=="string"||typeof i=="number")r+=i;else if(typeof i=="object")if(Array.isArray(i)){var n=i.length;for(t=0;t<n;t++)i[t]&&(e=wc(i[t]))&&(r&&(r+=" "),r+=e)}else for(e in i)i[e]&&(r&&(r+=" "),r+=e);return r}function Ap(){for(var i,t,e=0,r="",n=arguments.length;e<n;e++)(i=arguments[e])&&(t=wc(i))&&(r&&(r+=" "),r+=t);return r}const bc={translate:new Map([[!0,"yes"],[!1,"no"]])};function Rp(i,t,e=!1){if(i==="hidden"&&t!=="until-found"&&(e=!0),t==null||!t&&e)return"";const r=i in bc&&bc[i].get(t)||t,n=e?"":`="${Pp(r)}"`;return` ${i}${n}`}function kt(i){return typeof i=="object"?Ap(i):i??""}const yc=[...`
|
|
6
|
-
\r\f \v\uFEFF`];function Ip(i,t,e){var r=i==null?"":""+i;if(t&&(r=r?r+" "+t:t),e){for(var n in e)if(e[n])r=r?r+" "+n:n;else if(r.length)for(var o=n.length,a=0;(a=r.indexOf(n,a))>=0;){var s=a+o;(a===0||yc.includes(r[a-1]))&&(s===r.length||yc.includes(r[s]))?r=(a===0?"":r.substring(0,a))+r.substring(s+1):a=s}}return r===""?null:r}function xc(i,t=!1){var e=t?" !important;":";",r="";for(var n in i){var o=i[n];o!=null&&o!==""&&(r+=" "+n+": "+o+e)}return r}function Oa(i){return i[0]!=="-"||i[1]!=="-"?i.toLowerCase():i}function Mp(i,t){if(t){var e="",r,n;if(Array.isArray(t)?(r=t[0],n=t[1]):r=t,i){i=String(i).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Oa)),n&&c.push(...Object.keys(n).map(Oa));var l=0,u=-1;const d=i.length;for(var h=0;h<d;h++){var f=i[h];if(s?f==="/"&&i[h-1]==="*"&&(s=!1):o?o===f&&(o=!1):f==="/"&&i[h+1]==="*"?s=!0:f==='"'||f==="'"?o=f:f==="("?a++:f===")"&&a--,!s&&o===!1&&a===0){if(f===":"&&u===-1)u=h;else if(f===";"||h===d-1){if(u!==-1){var v=Oa(i.substring(l,u).trim());if(!c.includes(v)){f!==";"&&h++;var _=i.substring(l,h).trim();e+=" "+_+";"}}l=h+1,u=-1}}}}return r&&(e+=xc(r)),n&&(e+=xc(n,!0)),e=e.trim(),e===""?null:e}return i==null?null:String(i)}function He(i,t,e,r,n,o){var a=i.__className;if(ye||a!==e||a===void 0){var s=Ip(e,r,o);(!ye||s!==i.getAttribute("class"))&&(s==null?i.removeAttribute("class"):t?i.className=s:i.setAttribute("class",s)),i.__className=e}else if(o&&n!==o)for(var c in o){var l=!!o[c];(n==null||l!==!!n[c])&&i.classList.toggle(c,l)}return o}function Da(i,t={},e,r){for(var n in e){var o=e[n];t[n]!==o&&(e[n]==null?i.style.removeProperty(n):i.style.setProperty(n,o,r))}}function Mt(i,t,e,r){var n=i.__style;if(ye||n!==t){var o=Mp(t,r);(!ye||o!==i.getAttribute("style"))&&(o==null?i.removeAttribute("style"):i.style.cssText=o),i.__style=t}else r&&(Array.isArray(r)?(Da(i,e==null?void 0:e[0],r[0]),Da(i,e==null?void 0:e[1],r[1],"important")):Da(i,e,r));return r}function fn(i,t,e=!1){if(i.multiple){if(t==null)return;if(!ai(t))return _d();for(var r of i.options)r.selected=t.includes(pn(r));return}for(r of i.options){var n=pn(r);if(Tl(n,t)){r.selected=!0;return}}(!e||t!==void 0)&&(i.selectedIndex=-1)}function La(i){var t=new MutationObserver(()=>{fn(i,i.__value)});t.observe(i,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Qt(()=>{t.disconnect()})}function Op(i,t,e=t){var r=new WeakSet,n=!0;cn(i,"change",o=>{var a=o?"[selected]":":checked",s;if(i.multiple)s=[].map.call(i.querySelectorAll(a),pn);else{var c=i.querySelector(a)??i.querySelector("option:not([disabled])");s=c&&pn(c)}e(s),Be!==null&&r.add(Be)}),Jt(()=>{var o=t();if(i===document.activeElement){var a=on??Be;if(r.has(a))return}if(fn(i,o,n),n&&o===void 0){var s=i.querySelector(":checked");s!==null&&(o=pn(s),e(o))}i.__value=o,n=!1}),La(i)}function pn(i){return"__value"in i?i.__value:i.value}const Bi=Symbol("class"),Vi=Symbol("style"),Tc=Symbol("is custom element"),Ec=Symbol("is html");function Lo(i){if(ye){var t=!1,e=()=>{if(!t){if(t=!0,i.hasAttribute("value")){var r=i.value;Ne(i,"value",null),i.value=r}if(i.hasAttribute("checked")){var n=i.checked;Ne(i,"checked",null),i.checked=n}}};i.__on_r=e,qt(e),Rl()}}function Dp(i,t){var e=zo(i);e.value===(e.value=t??void 0)||i.value===t&&(t!==0||i.nodeName!=="PROGRESS")||(i.value=t??"")}function kc(i,t){var e=zo(i);e.checked!==(e.checked=t??void 0)&&(i.checked=t)}function Sc(i,t){t?i.hasAttribute("selected")||i.setAttribute("selected",""):i.removeAttribute("selected")}function Lp(i,t){const e=i.checked;i.defaultChecked=t,i.checked=e}function zp(i,t){const e=i.value;i.defaultValue=t,i.value=e}function Ne(i,t,e,r){var n=zo(i);ye&&(n[t]=i.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&i.nodeName==="LINK")||n[t]!==(n[t]=e)&&(t==="loading"&&(i[Bh]=e),e==null?i.removeAttribute(t):typeof e!="string"&&Ha(i).includes(t)?i[t]=e:i.setAttribute(t,e))}function Hp(i,t,e){i.setAttributeNS("http://www.w3.org/1999/xlink",t,e)}function Np(i,t,e){var r=Ue,n=Fe;let o=ye;ye&&ut(!1),It(null),jt(null);try{t!=="style"&&(za.has(i.getAttribute("is")||i.nodeName)||!customElements||customElements.get(i.getAttribute("is")||i.tagName.toLowerCase())?Ha(i).includes(t):e&&typeof e=="object")?i[t]=e:Ne(i,t,e==null?e:String(e))}finally{It(r),jt(n),o&&ut(!0)}}function Fp(i,t,e,r,n=!1,o=!1){if(ye&&n&&i.tagName==="INPUT"){var a=i,s=a.type==="checkbox"?"defaultChecked":"defaultValue";s in e||Lo(a)}var c=zo(i),l=c[Tc],u=!c[Ec];let h=ye&&l;h&&ut(!1);var f=t||{},v=i.tagName==="OPTION";for(var _ in t)_ in e||(e[_]=null);e.class?e.class=kt(e.class):(r||e[Bi])&&(e.class=null),e[Vi]&&(e.style??(e.style=null));var d=Ha(i);for(const B in e){let q=e[B];if(v&&B==="value"&&q==null){i.value=i.__value="",f[B]=q;continue}if(B==="class"){var g=i.namespaceURI==="http://www.w3.org/1999/xhtml";He(i,g,q,r,t==null?void 0:t[Bi],e[Bi]),f[B]=q,f[Bi]=e[Bi];continue}if(B==="style"){Mt(i,q,t==null?void 0:t[Vi],e[Vi]),f[B]=q,f[Vi]=e[Vi];continue}var y=f[B];if(!(q===y&&!(q===void 0&&i.hasAttribute(B)))){f[B]=q;var S=B[0]+B[1];if(S!=="$$")if(S==="on"){const z={},I="$$"+B;let M=B.slice(2);var P=If(M);if(Af(M)&&(M=M.slice(0,-7),z.capture=!0),!P&&y){if(q!=null)continue;i.removeEventListener(M,f[I],z),f[I]=null}if(q!=null)if(P)i[`__${M}`]=q,Qr([M]);else{let J=function(ee){f[B].call(this,ee)};f[I]=$l(M,i,J,z)}else P&&(i[`__${M}`]=void 0)}else if(B==="style")Ne(i,B,q);else if(B==="autofocus")Pl(i,!!q);else if(!l&&(B==="__value"||B==="value"&&q!=null))i.value=i.__value=q;else if(B==="selected"&&v)Sc(i,q);else{var E=B;u||(E=Of(E));var A=E==="defaultValue"||E==="defaultChecked";if(q==null&&!l&&!A)if(c[B]=null,E==="value"||E==="checked"){let z=i;const I=t===void 0;if(E==="value"){let M=z.defaultValue;z.removeAttribute(E),z.defaultValue=M,z.value=z.__value=I?M:null}else{let M=z.defaultChecked;z.removeAttribute(E),z.defaultChecked=M,z.checked=I?M:!1}}else i.removeAttribute(B);else A||d.includes(E)&&(l||typeof q!="string")?(i[E]=q,E in c&&(c[E]=ct)):typeof q!="function"&&Ne(i,E,q)}}}return h&&ut(!0),f}function wt(i,t,e=[],r=[],n=[],o,a=!1,s=!1){an(n,e,r,c=>{var l=void 0,u={},h=i.nodeName==="SELECT",f=!1;if(Ll(()=>{var _=t(...c.map(p)),d=Fp(i,l,_,o,a,s);f&&h&&"value"in _&&fn(i,_.value);for(let y of Object.getOwnPropertySymbols(u))_[y]||mt(u[y]);for(let y of Object.getOwnPropertySymbols(_)){var g=_[y];y.description===Vs&&(!l||g!==l[y])&&(u[y]&&mt(u[y]),u[y]=zt(()=>_c(i,()=>g))),d[y]=g}l=d}),h){var v=i;Jt(()=>{fn(v,l.value,!0),La(v)})}f=!0})}function zo(i){return i.__attributes??(i.__attributes={[Tc]:i.nodeName.includes("-"),[Ec]:i.namespaceURI===Dh})}var za=new Map;function Ha(i){var t=i.getAttribute("is")||i.nodeName,e=za.get(t);if(e)return e;za.set(t,e=[]);for(var r,n=i,o=Element.prototype;o!==n;){r=js(n);for(var a in r)r[a].set&&e.push(a);n=so(n)}return e}function Bp(i){Bt(document,["focusin","focusout"],t=>{t&&t.type==="focusout"&&t.relatedTarget||i(document.activeElement)})}function Cc(i,t,e=t){var r=new WeakSet;cn(i,"input",async n=>{var o=n?i.defaultValue:i.value;if(o=Fa(i)?Ba(o):o,e(o),Be!==null&&r.add(Be),await Ea(),o!==(o=t())){var a=i.selectionStart,s=i.selectionEnd,c=i.value.length;if(i.value=o??"",s!==null){var l=i.value.length;a===s&&s===c&&l>c?(i.selectionStart=l,i.selectionEnd=l):(i.selectionStart=a,i.selectionEnd=Math.min(s,l))}}}),(ye&&i.defaultValue!==i.value||et(t)==null&&i.value)&&(e(Fa(i)?Ba(i.value):i.value),Be!==null&&r.add(Be)),ht(()=>{var n=t();if(i===document.activeElement){var o=on??Be;if(r.has(o))return}Fa(i)&&n===Ba(i.value)||i.type==="date"&&!n&&!i.value||n!==i.value&&(i.value=n??"")})}const Na=new Set;function Vp(i,t,e,r,n=r){var o=e.getAttribute("type")==="checkbox",a=i;let s=!1;if(t!==null)for(var c of t)a=a[c]??(a[c]=[]);a.push(e),cn(e,"change",()=>{var l=e.__value;o&&(l=Pc(a,l,e.checked)),n(l)},()=>n(o?[]:null)),ht(()=>{var l=r();if(ye&&e.defaultChecked!==e.checked){s=!0;return}o?(l=l||[],e.checked=l.includes(e.__value)):e.checked=Tl(e.__value,l)}),Qt(()=>{var l=a.indexOf(e);l!==-1&&a.splice(l,1)}),Na.has(a)||(Na.add(a),qt(()=>{a.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),Na.delete(a)})),qt(()=>{if(s){var l;if(o)l=Pc(a,l,e.checked);else{var u=a.find(h=>h.checked);l=u==null?void 0:u.__value}n(l)}})}function jp(i,t,e=t){cn(i,"change",r=>{var n=r?i.defaultChecked:i.checked;e(n)}),(ye&&i.defaultChecked!==i.checked||et(t)==null)&&e(i.checked),ht(()=>{var r=t();i.checked=!!r})}function Pc(i,t,e){for(var r=new Set,n=0;n<i.length;n+=1)i[n].checked&&r.add(i[n].__value);return e||r.delete(t),Array.from(r)}function Fa(i){var t=i.type;return t==="number"||t==="range"}function Ba(i){return i===""?null:+i}function Up(i,t,e=t){cn(i,"change",()=>{e(i.files)}),ye&&i.files&&e(i.files),ht(()=>{i.files=t()})}function Va(i){for(var t=[],e=0;e<i.length;e+=1)t.push({start:i.start(e),end:i.end(e)});return t}function Gp(i,t,e=t){var r,n,o=()=>{cancelAnimationFrame(r),i.paused||(r=requestAnimationFrame(o));var a=i.currentTime;n!==a&&e(n=a)};r=requestAnimationFrame(o),i.addEventListener("timeupdate",o),ht(()=>{var a=Number(t());n!==a&&!isNaN(a)&&(i.currentTime=n=a)}),Qt(()=>{cancelAnimationFrame(r),i.removeEventListener("timeupdate",o)})}function Zp(i,t){var e;Bt(i,["loadedmetadata","progress","timeupdate","seeking"],()=>{var r=i.buffered;(!e||e.length!==r.length||e.some((n,o)=>r.start(o)!==n.start||r.end(o)!==n.end))&&(e=Va(r),t(e))})}function Wp(i,t){Bt(i,["loadedmetadata"],()=>t(Va(i.seekable)))}function qp(i,t){Bt(i,["timeupdate"],()=>t(Va(i.played)))}function Xp(i,t){Bt(i,["seeking","seeked"],()=>t(i.seeking))}function Yp(i,t){Bt(i,["timeupdate","ended"],()=>t(i.ended))}function Kp(i,t){Bt(i,["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","emptied"],()=>t(i.readyState))}function Qp(i,t,e=t){Jt(()=>{var r=Number(t());r!==i.playbackRate&&!isNaN(r)&&(i.playbackRate=r)}),Jt(()=>{Bt(i,["ratechange"],()=>{e(i.playbackRate)})})}function Jp(i,t,e=t){var r=t(),n=()=>{r!==i.paused&&e(r=i.paused)};Bt(i,["play","pause","canplay"],n,r==null),Jt(()=>{(r=!!t())!==i.paused&&(r?i.pause():i.play().catch(()=>{e(r=!0)}))})}function $p(i,t,e=t){var r=()=>{e(i.volume)};t()==null&&r(),Bt(i,["volumechange"],r,!1),ht(()=>{var n=Number(t());n!==i.volume&&!isNaN(n)&&(i.volume=n)})}function e0(i,t,e=t){var r=()=>{e(i.muted)};t()==null&&r(),Bt(i,["volumechange"],r,!1),ht(()=>{var n=!!t();i.muted!==n&&(i.muted=n)})}function t0(i){Bt(window,["online","offline"],()=>{i(navigator.onLine)})}function r0(i,t,e){var r=hr(i,t);r&&r.set&&(i[t]=e,Qt(()=>{i[t]=null}))}const Qo=class Qo{constructor(t){be(this,Ko);be(this,ii,new WeakMap);be(this,Ki);be(this,Sn);ze(this,Sn,t)}observe(t,e){var r=R(this,ii).get(t)||new Set;return r.add(e),R(this,ii).set(t,r),We(this,Ko,yh).call(this).observe(t,R(this,Sn)),()=>{var n=R(this,ii).get(t);n.delete(e),n.size===0&&(R(this,ii).delete(t),R(this,Ki).unobserve(t))}}};ii=new WeakMap,Ki=new WeakMap,Sn=new WeakMap,Ko=new WeakSet,yh=function(){return R(this,Ki)??ze(this,Ki,new ResizeObserver(t=>{for(var e of t){Qo.entries.set(e.target,e);for(var r of R(this,ii).get(e.target)||[])r(e)}}))},nt(Qo,"entries",new WeakMap);let gn=Qo;var i0=new gn({box:"content-box"}),Ac=new gn({box:"border-box"}),n0=new gn({box:"device-pixel-content-box"});function o0(i,t,e){var r=t==="contentRect"||t==="contentBoxSize"?i0:t==="borderBoxSize"?Ac:n0,n=r.observe(i,o=>e(o[t]));Qt(n)}function a0(i,t,e){var r=Ac.observe(i,()=>e(i[t]));Jt(()=>(et(()=>e(i[t])),r))}function Rc(i,t){return i===t||(i==null?void 0:i[Dt])===t}function ji(i={},t,e,r){return Jt(()=>{var n,o;return ht(()=>{n=o,o=(r==null?void 0:r())||[],et(()=>{i!==e(...o)&&(t(i,...o),n&&Rc(e(...n),i)&&t(null,...n))})}),()=>{qt(()=>{o&&Rc(e(...o),i)&&t(null,...o)})}}),i}function s0(i,t,e,r=e){t.addEventListener("input",()=>{r(t[i])}),ht(()=>{var n=e();if(t[i]!==n)if(n==null){var o=t[i];r(o)}else t[i]=n+""})}function l0(i,t,e,r,n){var o=()=>{r(e[i])};e.addEventListener(t,o),n?ht(()=>{e[i]=n()}):o(),(e===document.body||e===window||e===document)&&Qt(()=>{e.removeEventListener(t,o)})}function c0(i,t){Bt(i,["focus","blur"],()=>{t(i===document.activeElement)})}function u0(i,t,e=t){var r=i==="x",n=()=>Yr(()=>{o=!0,clearTimeout(a),a=setTimeout(s,100),e(window[r?"scrollX":"scrollY"])});addEventListener("scroll",n,{passive:!0});var o=!1,a,s=()=>{o=!1},c=!0;ht(()=>{var l=t();c?c=!1:!o&&l!=null&&(o=!0,clearTimeout(a),r?scrollTo(l,window.scrollY):scrollTo(window.scrollX,l),a=setTimeout(s,100))}),Jt(n),Qt(()=>{removeEventListener("scroll",n)})}function h0(i,t){Bt(window,["resize"],()=>Yr(()=>t(window[i])))}function d0(i){return function(...t){var e=t[0];e.isTrusted&&(i==null||i.apply(this,t))}}function f0(i){return function(...t){var e=t[0];e.target===this&&(i==null||i.apply(this,t))}}function p0(i){return function(...t){var e=t[0];return e.stopPropagation(),i==null?void 0:i.apply(this,t)}}function g0(i){var t=!1;return function(...e){if(!t)return t=!0,i==null?void 0:i.apply(this,e)}}function v0(i){return function(...t){var e=t[0];return e.stopImmediatePropagation(),i==null?void 0:i.apply(this,t)}}function m0(i){return function(...t){var e=t[0];return e.preventDefault(),i==null?void 0:i.apply(this,t)}}function _0(i=!1){const t=Ze,e=t.l.u;if(!e)return;let r=()=>ka(t.s);if(i){let n=0,o={};const a=sn(()=>{let s=!1;const c=t.s;for(const l in c)c[l]!==o[l]&&(o[l]=c[l],s=!0);return s&&n++,n});r=()=>p(a)}e.b.length&&Ml(()=>{Ic(t,r),sa(e.b)}),st(()=>{const n=et(()=>e.m.map(Hh));return()=>{for(const o of n)typeof o=="function"&&o()}}),e.a.length&&st(()=>{Ic(t,r),sa(e.a)})}function Ic(i,t){if(i.l.s)for(const e of i.l.s)p(e);t()}function w0(i){var t=Lt(0);return function(){return arguments.length===1?(xe(t,p(t)+1),arguments[0]):(p(t),i())}}function b0(i,t){var o;var e=(o=i.$$events)==null?void 0:o[t.type],r=ai(e)?e.slice():e==null?[]:[e];for(var n of r)n.call(this,t)}function y0(i,t,e){var r;i.$$events||(i.$$events={}),(r=i.$$events)[t]||(r[t]=[]),i.$$events[t].push(e)}function x0(i){for(var t in i)t in this&&(this[t]=i[t])}function Mc(i,t,e){if(i==null)return t(void 0),wr;const r=et(()=>i.subscribe(t,e));return r.unsubscribe?()=>r.unsubscribe():r}function T0(i){let t;return Mc(i,e=>t=e)(),t}let vn=!1,ja=Symbol();function E0(i,t,e){const r=e[t]??(e[t]={store:null,source:Eo(void 0),unsubscribe:wr});if(r.store!==i&&!(ja in e))if(r.unsubscribe(),r.store=i??null,i==null)r.source.v=void 0,r.unsubscribe=wr;else{var n=!0;r.unsubscribe=Mc(i,o=>{n?r.source.v=o:xe(r.source,o)}),n=!1}return i&&ja in e?T0(i):p(r.source)}function k0(i,t,e){let r=e[t];return r&&r.store!==i&&(r.unsubscribe(),r.unsubscribe=wr),i}function Oc(i,t){return i.set(t),t}function S0(i,t){var e=i[t];e.store!==null&&Oc(e.store,e.source.v)}function C0(){const i={};function t(){Qt(()=>{for(var e in i)i[e].unsubscribe();si(i,ja,{enumerable:!1,value:!0})})}return[i,t]}function P0(i,t,e){return i.set(e),t}function A0(i,t,e=1){return i.set(t+e),t}function R0(i,t,e=1){const r=t+e;return i.set(r),r}function I0(){vn=!0}function Dc(i){var t=vn;try{return vn=!1,[i(),vn]}finally{vn=t}}function M0(i,t=1){const e=i();return i(e+t),e}function O0(i,t=1){const e=i()+t;return i(e),e}const D0={get(i,t){if(!i.exclude.includes(t))return i.props[t]},set(i,t){return!1},getOwnPropertyDescriptor(i,t){if(!i.exclude.includes(t)&&t in i.props)return{enumerable:!0,configurable:!0,value:i.props[t]}},has(i,t){return i.exclude.includes(t)?!1:t in i.props},ownKeys(i){return Reflect.ownKeys(i.props).filter(t=>!i.exclude.includes(t))}};function bt(i,t,e){return new Proxy({props:i,exclude:t},D0)}const L0={get(i,t){if(!i.exclude.includes(t))return p(i.version),t in i.special?i.special[t]():i.props[t]},set(i,t,e){if(!(t in i.special)){var r=Fe;try{jt(i.parent_effect),i.special[t]=or({get[t](){return i.props[t]}},t,Hs)}finally{jt(r)}}return i.special[t](e),ln(i.version),!0},getOwnPropertyDescriptor(i,t){if(!i.exclude.includes(t)&&t in i.props)return{enumerable:!0,configurable:!0,value:i.props[t]}},deleteProperty(i,t){return i.exclude.includes(t)||(i.exclude.push(t),ln(i.version)),!0},has(i,t){return i.exclude.includes(t)?!1:t in i.props},ownKeys(i){return Reflect.ownKeys(i.props).filter(t=>!i.exclude.includes(t))}};function z0(i,t){return new Proxy({props:i,exclude:t,special:{},version:Lt(0),parent_effect:Fe},L0)}const H0={get(i,t){let e=i.props.length;for(;e--;){let r=i.props[e];if(Ci(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(i,t,e){let r=i.props.length;for(;r--;){let n=i.props[r];Ci(n)&&(n=n());const o=hr(n,t);if(o&&o.set)return o.set(e),!0}return!1},getOwnPropertyDescriptor(i,t){let e=i.props.length;for(;e--;){let r=i.props[e];if(Ci(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const n=hr(r,t);return n&&!n.configurable&&(n.configurable=!0),n}}},has(i,t){if(t===Dt||t===po)return!1;for(let e of i.props)if(Ci(e)&&(e=e()),e!=null&&t in e)return!0;return!1},ownKeys(i){const t=[];for(let e of i.props)if(Ci(e)&&(e=e()),!!e){for(const r in e)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(e))t.includes(r)||t.push(r)}return t}};function mn(...i){return new Proxy({props:i},H0)}function or(i,t,e,r){var S;var n=(e&Ch)!==0,o=(e&Ph)!==0,a=r,s=!0,c=()=>(s&&(s=!1,a=o?et(r):r),a),l;if(n){var u=Dt in i||po in i;l=((S=hr(i,t))==null?void 0:S.set)??(u&&t in i?P=>i[t]=P:void 0)}var h,f=!1;n?[h,f]=Dc(()=>i[t]):h=i[t],h===void 0&&r!==void 0&&(h=c(),l&&(ad(),l(h)));var v;if(v=()=>{var P=i[t];return P===void 0?c():(s=!0,P)},(e&Hs)===0)return v;if(l){var _=i.$$legacy;return(function(P,E){return arguments.length>0?((!E||_||f)&&l(E?v():P),P):v()})}var d=!1,g=((e&Sh)!==0?sn:va)(()=>(d=!1,v()));n&&p(g);var y=Fe;return(function(P,E){if(arguments.length>0){const A=E?p(g):n?xt(P):P;return xe(g,A),d=!0,a!==void 0&&(a=A),P}return _i&&d||(y.f&xr)!==0?g.v:p(g)})}function N0(i,t){ht(()=>{const e=new Map,r=i(),n=ai(r)?r:r==null?[]:Array.from(r),o=n.length;for(let a=0;a<o;a++){const s=t(n[a],a);if(e.has(s)){String(e.get(s));let c=String(s);c.startsWith("[object ")&&(c=null),Kh()}e.set(s,a)}})}function F0(i,t,e,r,n,o){vl(t,()=>{var a=!1;nn==null||nn[Zt],ht(()=>{if(!a){var[s,c]=Dc(e);if(!c){var l=r(),u=!1,h=ht(()=>{u||s[l]});u=!0,h.deps===null&&(dd(),a=!0)}}})})}function B0(i){return new V0(i)}class V0{constructor(t){be(this,jr);be(this,ur);var o;var e=new Map,r=(a,s)=>{var c=Eo(s,!1,!1);return e.set(a,c),c};const n=new Proxy({...t.props||{},$$events:{}},{get(a,s){return p(e.get(s)??r(s,Reflect.get(a,s)))},has(a,s){return s===po?!0:(p(e.get(s)??r(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,c){return xe(e.get(s)??r(s,c),c),Reflect.set(a,s,c)}});ze(this,ur,(t.hydrate?nc:Ca)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&Ft(),ze(this,jr,n.$$events);for(const a of Object.keys(R(this,ur)))a==="$set"||a==="$destroy"||a==="$on"||si(this,a,{get(){return R(this,ur)[a]},set(s){R(this,ur)[a]=s},enumerable:!0});R(this,ur).$set=a=>{Object.assign(n,a)},R(this,ur).$destroy=()=>{ac(R(this,ur))}}$set(t){R(this,ur).$set(t)}$on(t,e){R(this,jr)[t]=R(this,jr)[t]||[];const r=(...n)=>e.call(this,...n);return R(this,jr)[t].push(r),()=>{R(this,jr)[t]=R(this,jr)[t].filter(n=>n!==r)}}$destroy(){R(this,ur).$destroy()}}jr=new WeakMap,ur=new WeakMap;let Lc;typeof HTMLElement=="function"&&(Lc=class extends HTMLElement{constructor(t,e,r){super();nt(this,"$$ctor");nt(this,"$$s");nt(this,"$$c");nt(this,"$$cn",!1);nt(this,"$$d",{});nt(this,"$$r",!1);nt(this,"$$p_d",{});nt(this,"$$l",{});nt(this,"$$l_u",new Map);nt(this,"$$me");this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return o=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),x(o,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=j0(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=Ho(o,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=B0({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Dl(()=>{ht(()=>{var n;this.$$r=!0;for(const o of ao(this.$$c)){if(!((n=this.$$p_d[o])!=null&&n.reflect))continue;this.$$d[o]=this.$$c[o];const a=Ho(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1})});for(const n in this.$$l)for(const o of this.$$l[n]){const a=this.$$c.$on(n,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(t,e,r){var n;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ho(t,r,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return ao(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ho(i,t,e,r){var o;const n=(o=e[i])==null?void 0:o.type;if(t=n==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!e[i])return t;if(r==="toAttribute")switch(n){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(n){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function j0(i){const t={};return i.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}function zc(i,t,e,r,n,o){let a=class extends Lc{constructor(){super(i,e,n),this.$$p_d=t}static get observedAttributes(){return ao(t).map(s=>(t[s].attribute||s).toLowerCase())}};return ao(t).forEach(s=>{si(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=Ho(s,c,t),this.$$d[s]=c;var l=this.$$c;if(l){var u=(h=hr(l,s))==null?void 0:h.get;u?l[s]=c:l.$set({[s]:c})}}})}),r.forEach(s=>{si(a.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),o&&(a=o(a)),i.element=a,a}function U0(i,...t){return et(()=>{try{let e=!1;const r=[];for(const n of t)n&&typeof n=="object"&&Dt in n?(r.push(vo(n,!0)),e=!0):r.push(n);e&&(fd(i),console.log("%c[snapshot]","color: grey",...r))}catch{}}),t}const G0=Object.freeze(Object.defineProperty({__proto__:null,CLASS:Bi,FILENAME:Zt,HMR:Fs,NAMESPACE_SVG:no,STYLE:Vi,aborted:ko,action:Ar,get active_effect(){return Fe},add_legacy_event_listener:y0,add_locations:tp,add_svelte_meta:Ad,animation:xp,append:x,append_styles:Sp,apply:yf,assign:Kf,assign_and:Qf,assign_nullish:$f,assign_or:Jf,async:lp,async_body:Gd,async_derived:ml,attach:_c,attachment:Yf,attr:Rp,attribute_effect:wt,autofocus:Pl,await:up,bind_active_element:Bp,bind_buffered:Zp,bind_checked:jp,bind_content_editable:s0,bind_current_time:Gp,bind_element_size:a0,bind_ended:Yp,bind_files:Up,bind_focused:c0,bind_group:Vp,bind_muted:e0,bind_online:t0,bind_paused:Jp,bind_playback_rate:Qp,bind_played:qp,bind_prop:r0,bind_property:l0,bind_ready_state:Kp,bind_resize_observer:o0,bind_seekable:Wp,bind_seeking:Xp,bind_select_value:Op,bind_this:ji,bind_value:Cc,bind_volume:$p,bind_window_scroll:u0,bind_window_size:h0,boundary:gl,bubble_event:b0,check_target:op,child:U,cleanup_styles:ep,clsx:kt,comment:$,component:Fi,create_custom_element:zc,create_ownership_validator:np,css_props:dp,deep_read:Po,deep_read_state:ka,deferred_template_effect:cf,delegate:Qr,derived:te,derived_safe_equal:va,get document(){return El},each:Ut,eager:zd,effect:Jt,effect_root:Dl,effect_tracking:gi,element:Ep,equals:Qd,event:Ao,exclude_from_object:_f,fallback:Nh,first_child:Z,flush:Ft,for_await_track_reactivity_loss:Ud,from_html:me,from_mathml:xf,from_svg:Q,from_tree:Tf,get:p,head:kp,hmr:ip,html:Cr,hydrate_template:bd,if:D,index:Ni,init:_0,init_select:La,inspect:sp,invalid_default_snippet:jh,invalidate_inner_signals:df,invalidate_store:S0,invoke_error_boundary:Fr,key:hp,legacy_api:ap,legacy_pre_effect:af,legacy_pre_effect_reset:sf,legacy_rest_props:z0,log_if_contains_state:U0,mark_store_binding:I0,mutable_source:Eo,mutate:Xd,next:ft,noop:wr,once:g0,pending:Vd,pop:Je,preventDefault:m0,prevent_snippet_stringification:sc,prop:or,props_id:Sf,proxy:xt,push:Qe,raf:Pr,reactive_import:w0,remove_input_defaults:Lo,remove_textarea_child:rf,render_effect:ht,replay_events:bf,reset:j,rest_props:bt,run:Zd,run_after_blockers:vl,safe_get:vf,sanitize_slots:mp,save:jd,select_option:fn,self:f0,set:xe,set_attribute:Ne,set_checked:kc,set_class:He,set_custom_element_data:Np,set_default_checked:Lp,set_default_value:zp,set_selected:Sc,set_style:Mt,set_text:qe,set_value:Dp,set_xlink_attribute:Hp,setup_stores:C0,sibling:ue,slot:vp,snapshot:vo,snippet:_t,spread_props:mn,state:Pe,stopImmediatePropagation:v0,stopPropagation:p0,store_get:E0,store_mutate:P0,store_set:Oc,store_unsub:k0,strict_equals:Kd,tag:Sd,tag_proxy:al,template_effect:Re,text:pt,tick:Ea,to_array:Fh,trace:kd,track_reactivity_loss:ga,transition:Tp,trusted:d0,untrack:et,update:ln,update_legacy_props:x0,update_pre:Yd,update_pre_prop:O0,update_pre_store:R0,update_prop:M0,update_store:A0,user_effect:st,user_pre_effect:Ml,validate_binding:F0,validate_dynamic_element_tag:Ff,validate_each_keys:N0,validate_snippet_args:cp,validate_store:Bf,validate_void_dynamic_element:Nf,get window(){return _a},with_script:Ef,wrap_snippet:Vf},Symbol.toStringTag,{value:"Module"})),Z0="5";typeof window<"u"&&((hh=window.__svelte??(window.__svelte={})).v??(hh.v=new Set)).add(Z0);const W0=`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-900:oklch(42.1% .095 57.708);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--drop-shadow-md:0 3px 3px #0000001f;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{scrollbar-width:thin;scrollbar-color:var(--fallback-bc,oklch(var(--bc)/.2))transparent}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--fallback-bc,oklch(var(--bc)/.2));border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.4))}::-webkit-scrollbar-corner{background:0 0}:where(:root),:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dark]:checked),[data-theme=dark]{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=cupcake]:checked),[data-theme=cupcake]{color-scheme:light;--color-base-100:oklch(97.788% .004 56.375);--color-base-200:oklch(93.982% .007 61.449);--color-base-300:oklch(91.586% .006 53.44);--color-base-content:oklch(23.574% .066 313.189);--color-primary:oklch(85% .138 181.071);--color-primary-content:oklch(43% .078 188.216);--color-secondary:oklch(89% .061 343.231);--color-secondary-content:oklch(45% .187 3.815);--color-accent:oklch(90% .076 70.697);--color-accent-content:oklch(47% .157 37.304);--color-neutral:oklch(27% .006 286.033);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(68% .169 237.323);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(69% .17 162.48);--color-success-content:oklch(26% .051 172.552);--color-warning:oklch(79% .184 86.047);--color-warning-content:oklch(28% .066 53.813);--color-error:oklch(64% .246 16.439);--color-error-content:oklch(27% .105 12.094);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:root:has(input.theme-controller[value=bumblebee]:checked),[data-theme=bumblebee]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(85% .199 91.936);--color-primary-content:oklch(42% .095 57.708);--color-secondary:oklch(75% .183 55.934);--color-secondary-content:oklch(40% .123 38.172);--color-accent:oklch(0% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(37% .01 67.558);--color-neutral-content:oklch(92% .003 48.717);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(39% .09 240.876);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(39% .141 25.723);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=emerald]:checked),[data-theme=emerald]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(35.519% .032 262.988);--color-primary:oklch(76.662% .135 153.45);--color-primary-content:oklch(33.387% .04 162.24);--color-secondary:oklch(61.302% .202 261.294);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(72.772% .149 33.2);--color-accent-content:oklch(0% 0 0);--color-neutral:oklch(35.519% .032 262.988);--color-neutral-content:oklch(98.462% .001 247.838);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=corporate]:checked),[data-theme=corporate]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(22.389% .031 278.072);--color-primary:oklch(58% .158 241.966);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(55% .046 257.417);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(60% .118 184.704);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(0% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(60% .126 221.723);--color-info-content:oklch(100% 0 0);--color-success:oklch(62% .194 149.214);--color-success-content:oklch(100% 0 0);--color-warning:oklch(85% .199 91.936);--color-warning-content:oklch(0% 0 0);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(0% 0 0);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=synthwave]:checked),[data-theme=synthwave]{color-scheme:dark;--color-base-100:oklch(15% .09 281.288);--color-base-200:oklch(20% .09 281.288);--color-base-300:oklch(25% .09 281.288);--color-base-content:oklch(78% .115 274.713);--color-primary:oklch(71% .202 349.761);--color-primary-content:oklch(28% .109 3.907);--color-secondary:oklch(82% .111 230.318);--color-secondary-content:oklch(29% .066 243.157);--color-accent:oklch(75% .183 55.934);--color-accent-content:oklch(26% .079 36.259);--color-neutral:oklch(45% .24 277.023);--color-neutral-content:oklch(87% .065 274.039);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(77% .152 181.912);--color-success-content:oklch(27% .046 192.524);--color-warning:oklch(90% .182 98.111);--color-warning-content:oklch(42% .095 57.708);--color-error:oklch(73.7% .121 32.639);--color-error-content:oklch(23.501% .096 290.329);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=retro]:checked),[data-theme=retro]{color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]{color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=valentine]:checked),[data-theme=valentine]{color-scheme:light;--color-base-100:oklch(97% .014 343.198);--color-base-200:oklch(94% .028 342.258);--color-base-300:oklch(89% .061 343.231);--color-base-content:oklch(52% .223 3.958);--color-primary:oklch(65% .241 354.308);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(62% .265 303.9);--color-secondary-content:oklch(97% .014 308.299);--color-accent:oklch(82% .111 230.318);--color-accent-content:oklch(39% .09 240.876);--color-neutral:oklch(40% .153 2.432);--color-neutral-content:oklch(89% .061 343.231);--color-info:oklch(86% .127 207.078);--color-info-content:oklch(44% .11 240.79);--color-success:oklch(84% .143 164.978);--color-success-content:oklch(43% .095 166.913);--color-warning:oklch(75% .183 55.934);--color-warning-content:oklch(26% .079 36.259);--color-error:oklch(63% .237 25.331);--color-error-content:oklch(97% .013 17.38);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=halloween]:checked),[data-theme=halloween]{color-scheme:dark;--color-base-100:oklch(21% .006 56.043);--color-base-200:oklch(14% .004 49.25);--color-base-300:oklch(0% 0 0);--color-base-content:oklch(84.955% 0 0);--color-primary:oklch(77.48% .204 60.62);--color-primary-content:oklch(19.693% .004 196.779);--color-secondary:oklch(45.98% .248 305.03);--color-secondary-content:oklch(89.196% .049 305.03);--color-accent:oklch(64.8% .223 136.073);--color-accent-content:oklch(0% 0 0);--color-neutral:oklch(24.371% .046 65.681);--color-neutral-content:oklch(84.874% .009 65.681);--color-info:oklch(54.615% .215 262.88);--color-info-content:oklch(90.923% .043 262.88);--color-success:oklch(62.705% .169 149.213);--color-success-content:oklch(12.541% .033 149.213);--color-warning:oklch(66.584% .157 58.318);--color-warning-content:oklch(13.316% .031 58.318);--color-error:oklch(65.72% .199 27.33);--color-error-content:oklch(13.144% .039 27.33);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=garden]:checked),[data-theme=garden]{color-scheme:light;--color-base-100:oklch(92.951% .002 17.197);--color-base-200:oklch(86.445% .002 17.197);--color-base-300:oklch(79.938% .001 17.197);--color-base-content:oklch(16.961% .001 17.32);--color-primary:oklch(62.45% .278 3.836);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(48.495% .11 355.095);--color-secondary-content:oklch(89.699% .022 355.095);--color-accent:oklch(56.273% .054 154.39);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(24.155% .049 89.07);--color-neutral-content:oklch(92.951% .002 17.197);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=forest]:checked),[data-theme=forest]{color-scheme:dark;--color-base-100:oklch(20.84% .008 17.911);--color-base-200:oklch(18.522% .007 17.911);--color-base-300:oklch(16.203% .007 17.911);--color-base-content:oklch(83.768% .001 17.911);--color-primary:oklch(68.628% .185 148.958);--color-primary-content:oklch(0% 0 0);--color-secondary:oklch(69.776% .135 168.327);--color-secondary-content:oklch(13.955% .027 168.327);--color-accent:oklch(70.628% .119 185.713);--color-accent-content:oklch(14.125% .023 185.713);--color-neutral:oklch(30.698% .039 171.364);--color-neutral-content:oklch(86.139% .007 171.364);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=aqua]:checked),[data-theme=aqua]{color-scheme:dark;--color-base-100:oklch(37% .146 265.522);--color-base-200:oklch(28% .091 267.935);--color-base-300:oklch(22% .091 267.935);--color-base-content:oklch(90% .058 230.902);--color-primary:oklch(85.661% .144 198.645);--color-primary-content:oklch(40.124% .068 197.603);--color-secondary:oklch(60.682% .108 309.782);--color-secondary-content:oklch(96% .016 293.756);--color-accent:oklch(93.426% .102 94.555);--color-accent-content:oklch(18.685% .02 94.555);--color-neutral:oklch(27% .146 265.522);--color-neutral-content:oklch(80% .146 265.522);--color-info:oklch(54.615% .215 262.88);--color-info-content:oklch(90.923% .043 262.88);--color-success:oklch(62.705% .169 149.213);--color-success-content:oklch(12.541% .033 149.213);--color-warning:oklch(66.584% .157 58.318);--color-warning-content:oklch(27% .077 45.635);--color-error:oklch(73.95% .19 27.33);--color-error-content:oklch(14.79% .038 27.33);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=lofi]:checked),[data-theme=lofi]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(0% 0 0);--color-primary:oklch(15.906% 0 0);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(21.455% .001 17.278);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(26.861% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(0% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(79.54% .103 205.9);--color-info-content:oklch(15.908% .02 205.9);--color-success:oklch(90.13% .153 164.14);--color-success-content:oklch(18.026% .03 164.14);--color-warning:oklch(88.37% .135 79.94);--color-warning-content:oklch(17.674% .027 79.94);--color-error:oklch(78.66% .15 28.47);--color-error-content:oklch(15.732% .03 28.47);--radius-selector:2rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=pastel]:checked),[data-theme=pastel]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98.462% .001 247.838);--color-base-300:oklch(92.462% .001 247.838);--color-base-content:oklch(20% 0 0);--color-primary:oklch(90% .063 306.703);--color-primary-content:oklch(49% .265 301.924);--color-secondary:oklch(89% .058 10.001);--color-secondary-content:oklch(51% .222 16.935);--color-accent:oklch(90% .093 164.15);--color-accent-content:oklch(50% .118 165.612);--color-neutral:oklch(55% .046 257.417);--color-neutral-content:oklch(92% .013 255.508);--color-info:oklch(86% .127 207.078);--color-info-content:oklch(52% .105 223.128);--color-success:oklch(87% .15 154.449);--color-success-content:oklch(52% .154 150.069);--color-warning:oklch(83% .128 66.29);--color-warning-content:oklch(55% .195 38.402);--color-error:oklch(80% .114 19.571);--color-error-content:oklch(50% .213 27.518);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:0;--noise:0}:root:has(input.theme-controller[value=fantasy]:checked),[data-theme=fantasy]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(27.807% .029 256.847);--color-primary:oklch(37.45% .189 325.02);--color-primary-content:oklch(87.49% .037 325.02);--color-secondary:oklch(53.92% .162 241.36);--color-secondary-content:oklch(90.784% .032 241.36);--color-accent:oklch(75.98% .204 56.72);--color-accent-content:oklch(15.196% .04 56.72);--color-neutral:oklch(27.807% .029 256.847);--color-neutral-content:oklch(85.561% .005 256.847);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=black]:checked),[data-theme=black]{color-scheme:dark;--color-base-100:oklch(0% 0 0);--color-base-200:oklch(19% 0 0);--color-base-300:oklch(22% 0 0);--color-base-content:oklch(87.609% 0 0);--color-primary:oklch(35% 0 0);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(35% 0 0);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(35% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(35% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(45.201% .313 264.052);--color-info-content:oklch(89.04% .062 264.052);--color-success:oklch(51.975% .176 142.495);--color-success-content:oklch(90.395% .035 142.495);--color-warning:oklch(96.798% .211 109.769);--color-warning-content:oklch(19.359% .042 109.769);--color-error:oklch(62.795% .257 29.233);--color-error-content:oklch(12.559% .051 29.233);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=luxury]:checked),[data-theme=luxury]{color-scheme:dark;--color-base-100:oklch(14.076% .004 285.822);--color-base-200:oklch(20.219% .004 308.229);--color-base-300:oklch(23.219% .004 308.229);--color-base-content:oklch(75.687% .123 76.89);--color-primary:oklch(100% 0 0);--color-primary-content:oklch(20% 0 0);--color-secondary:oklch(27.581% .064 261.069);--color-secondary-content:oklch(85.516% .012 261.069);--color-accent:oklch(36.674% .051 338.825);--color-accent-content:oklch(87.334% .01 338.825);--color-neutral:oklch(24.27% .057 59.825);--color-neutral-content:oklch(93.203% .089 90.861);--color-info:oklch(79.061% .121 237.133);--color-info-content:oklch(15.812% .024 237.133);--color-success:oklch(78.119% .192 132.154);--color-success-content:oklch(15.623% .038 132.154);--color-warning:oklch(86.127% .136 102.891);--color-warning-content:oklch(17.225% .027 102.891);--color-error:oklch(71.753% .176 22.568);--color-error-content:oklch(14.35% .035 22.568);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dracula]:checked),[data-theme=dracula]{color-scheme:dark;--color-base-100:oklch(28.822% .022 277.508);--color-base-200:oklch(26.805% .02 277.508);--color-base-300:oklch(24.787% .019 277.508);--color-base-content:oklch(97.747% .007 106.545);--color-primary:oklch(75.461% .183 346.812);--color-primary-content:oklch(15.092% .036 346.812);--color-secondary:oklch(74.202% .148 301.883);--color-secondary-content:oklch(14.84% .029 301.883);--color-accent:oklch(83.392% .124 66.558);--color-accent-content:oklch(16.678% .024 66.558);--color-neutral:oklch(39.445% .032 275.524);--color-neutral-content:oklch(87.889% .006 275.524);--color-info:oklch(88.263% .093 212.846);--color-info-content:oklch(17.652% .018 212.846);--color-success:oklch(87.099% .219 148.024);--color-success-content:oklch(17.419% .043 148.024);--color-warning:oklch(95.533% .134 112.757);--color-warning-content:oklch(19.106% .026 112.757);--color-error:oklch(68.22% .206 24.43);--color-error-content:oklch(13.644% .041 24.43);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=cmyk]:checked),[data-theme=cmyk]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(95% 0 0);--color-base-300:oklch(90% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(71.772% .133 239.443);--color-primary-content:oklch(14.354% .026 239.443);--color-secondary:oklch(64.476% .202 359.339);--color-secondary-content:oklch(12.895% .04 359.339);--color-accent:oklch(94.228% .189 105.306);--color-accent-content:oklch(18.845% .037 105.306);--color-neutral:oklch(21.778% 0 0);--color-neutral-content:oklch(84.355% 0 0);--color-info:oklch(68.475% .094 217.284);--color-info-content:oklch(13.695% .018 217.284);--color-success:oklch(46.949% .162 321.406);--color-success-content:oklch(89.389% .032 321.406);--color-warning:oklch(71.236% .159 52.023);--color-warning-content:oklch(14.247% .031 52.023);--color-error:oklch(62.013% .208 28.717);--color-error-content:oklch(12.402% .041 28.717);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=autumn]:checked),[data-theme=autumn]{color-scheme:light;--color-base-100:oklch(95.814% 0 0);--color-base-200:oklch(89.107% 0 0);--color-base-300:oklch(82.4% 0 0);--color-base-content:oklch(19.162% 0 0);--color-primary:oklch(40.723% .161 17.53);--color-primary-content:oklch(88.144% .032 17.53);--color-secondary:oklch(61.676% .169 23.865);--color-secondary-content:oklch(12.335% .033 23.865);--color-accent:oklch(73.425% .094 60.729);--color-accent-content:oklch(14.685% .018 60.729);--color-neutral:oklch(54.367% .037 51.902);--color-neutral-content:oklch(90.873% .007 51.902);--color-info:oklch(69.224% .097 207.284);--color-info-content:oklch(13.844% .019 207.284);--color-success:oklch(60.995% .08 174.616);--color-success-content:oklch(12.199% .016 174.616);--color-warning:oklch(70.081% .164 56.844);--color-warning-content:oklch(14.016% .032 56.844);--color-error:oklch(53.07% .241 24.16);--color-error-content:oklch(90.614% .048 24.16);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=business]:checked),[data-theme=business]{color-scheme:dark;--color-base-100:oklch(24.353% 0 0);--color-base-200:oklch(22.648% 0 0);--color-base-300:oklch(20.944% 0 0);--color-base-content:oklch(84.87% 0 0);--color-primary:oklch(41.703% .099 251.473);--color-primary-content:oklch(88.34% .019 251.473);--color-secondary:oklch(64.092% .027 229.389);--color-secondary-content:oklch(12.818% .005 229.389);--color-accent:oklch(67.271% .167 35.791);--color-accent-content:oklch(13.454% .033 35.791);--color-neutral:oklch(27.441% .013 253.041);--color-neutral-content:oklch(85.488% .002 253.041);--color-info:oklch(62.616% .143 240.033);--color-info-content:oklch(12.523% .028 240.033);--color-success:oklch(70.226% .094 156.596);--color-success-content:oklch(14.045% .018 156.596);--color-warning:oklch(77.482% .115 81.519);--color-warning-content:oklch(15.496% .023 81.519);--color-error:oklch(51.61% .146 29.674);--color-error-content:oklch(90.322% .029 29.674);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=acid]:checked),[data-theme=acid]{color-scheme:light;--color-base-100:oklch(98% 0 0);--color-base-200:oklch(95% 0 0);--color-base-300:oklch(91% 0 0);--color-base-content:oklch(0% 0 0);--color-primary:oklch(71.9% .357 330.759);--color-primary-content:oklch(14.38% .071 330.759);--color-secondary:oklch(73.37% .224 48.25);--color-secondary-content:oklch(14.674% .044 48.25);--color-accent:oklch(92.78% .264 122.962);--color-accent-content:oklch(18.556% .052 122.962);--color-neutral:oklch(21.31% .128 278.68);--color-neutral-content:oklch(84.262% .025 278.68);--color-info:oklch(60.72% .227 252.05);--color-info-content:oklch(12.144% .045 252.05);--color-success:oklch(85.72% .266 158.53);--color-success-content:oklch(17.144% .053 158.53);--color-warning:oklch(91.01% .212 100.5);--color-warning-content:oklch(18.202% .042 100.5);--color-error:oklch(64.84% .293 29.349);--color-error-content:oklch(12.968% .058 29.349);--radius-selector:1rem;--radius-field:1rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]{color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=night]:checked),[data-theme=night]{color-scheme:dark;--color-base-100:oklch(20.768% .039 265.754);--color-base-200:oklch(19.314% .037 265.754);--color-base-300:oklch(17.86% .034 265.754);--color-base-content:oklch(84.153% .007 265.754);--color-primary:oklch(75.351% .138 232.661);--color-primary-content:oklch(15.07% .027 232.661);--color-secondary:oklch(68.011% .158 276.934);--color-secondary-content:oklch(13.602% .031 276.934);--color-accent:oklch(72.36% .176 350.048);--color-accent-content:oklch(14.472% .035 350.048);--color-neutral:oklch(27.949% .036 260.03);--color-neutral-content:oklch(85.589% .007 260.03);--color-info:oklch(68.455% .148 237.251);--color-info-content:oklch(0% 0 0);--color-success:oklch(78.452% .132 181.911);--color-success-content:oklch(15.69% .026 181.911);--color-warning:oklch(83.242% .139 82.95);--color-warning-content:oklch(16.648% .027 82.95);--color-error:oklch(71.785% .17 13.118);--color-error-content:oklch(14.357% .034 13.118);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=coffee]:checked),[data-theme=coffee]{color-scheme:dark;--color-base-100:oklch(24% .023 329.708);--color-base-200:oklch(21% .021 329.708);--color-base-300:oklch(16% .019 329.708);--color-base-content:oklch(72.354% .092 79.129);--color-primary:oklch(71.996% .123 62.756);--color-primary-content:oklch(14.399% .024 62.756);--color-secondary:oklch(34.465% .029 199.194);--color-secondary-content:oklch(86.893% .005 199.194);--color-accent:oklch(42.621% .074 224.389);--color-accent-content:oklch(88.524% .014 224.389);--color-neutral:oklch(16.51% .015 326.261);--color-neutral-content:oklch(83.302% .003 326.261);--color-info:oklch(79.49% .063 184.558);--color-info-content:oklch(15.898% .012 184.558);--color-success:oklch(74.722% .072 131.116);--color-success-content:oklch(14.944% .014 131.116);--color-warning:oklch(88.15% .14 87.722);--color-warning-content:oklch(17.63% .028 87.722);--color-error:oklch(77.318% .128 31.871);--color-error-content:oklch(15.463% .025 31.871);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=winter]:checked),[data-theme=winter]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97.466% .011 259.822);--color-base-300:oklch(93.268% .016 262.751);--color-base-content:oklch(41.886% .053 255.824);--color-primary:oklch(56.86% .255 257.57);--color-primary-content:oklch(91.372% .051 257.57);--color-secondary:oklch(42.551% .161 282.339);--color-secondary-content:oklch(88.51% .032 282.339);--color-accent:oklch(59.939% .191 335.171);--color-accent-content:oklch(11.988% .038 335.171);--color-neutral:oklch(19.616% .063 257.651);--color-neutral-content:oklch(83.923% .012 257.651);--color-info:oklch(88.127% .085 214.515);--color-info-content:oklch(17.625% .017 214.515);--color-success:oklch(80.494% .077 197.823);--color-success-content:oklch(16.098% .015 197.823);--color-warning:oklch(89.172% .045 71.47);--color-warning-content:oklch(17.834% .009 71.47);--color-error:oklch(73.092% .11 20.076);--color-error-content:oklch(14.618% .022 20.076);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=dim]:checked),[data-theme=dim]{color-scheme:dark;--color-base-100:oklch(30.857% .023 264.149);--color-base-200:oklch(28.036% .019 264.182);--color-base-300:oklch(26.346% .018 262.177);--color-base-content:oklch(82.901% .031 222.959);--color-primary:oklch(86.133% .141 139.549);--color-primary-content:oklch(17.226% .028 139.549);--color-secondary:oklch(73.375% .165 35.353);--color-secondary-content:oklch(14.675% .033 35.353);--color-accent:oklch(74.229% .133 311.379);--color-accent-content:oklch(14.845% .026 311.379);--color-neutral:oklch(24.731% .02 264.094);--color-neutral-content:oklch(82.901% .031 222.959);--color-info:oklch(86.078% .142 206.182);--color-info-content:oklch(17.215% .028 206.182);--color-success:oklch(86.171% .142 166.534);--color-success-content:oklch(17.234% .028 166.534);--color-warning:oklch(86.163% .142 94.818);--color-warning-content:oklch(17.232% .028 94.818);--color-error:oklch(82.418% .099 33.756);--color-error-content:oklch(16.483% .019 33.756);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=nord]:checked),[data-theme=nord]{color-scheme:light;--color-base-100:oklch(95.127% .007 260.731);--color-base-200:oklch(93.299% .01 261.788);--color-base-300:oklch(89.925% .016 262.749);--color-base-content:oklch(32.437% .022 264.182);--color-primary:oklch(59.435% .077 254.027);--color-primary-content:oklch(11.887% .015 254.027);--color-secondary:oklch(69.651% .059 248.687);--color-secondary-content:oklch(13.93% .011 248.687);--color-accent:oklch(77.464% .062 217.469);--color-accent-content:oklch(15.492% .012 217.469);--color-neutral:oklch(45.229% .035 264.131);--color-neutral-content:oklch(89.925% .016 262.749);--color-info:oklch(69.207% .062 332.664);--color-info-content:oklch(13.841% .012 332.664);--color-success:oklch(76.827% .074 131.063);--color-success-content:oklch(15.365% .014 131.063);--color-warning:oklch(85.486% .089 84.093);--color-warning-content:oklch(17.097% .017 84.093);--color-error:oklch(60.61% .12 15.341);--color-error-content:oklch(12.122% .024 15.341);--radius-selector:1rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=sunset]:checked),[data-theme=sunset]{color-scheme:dark;--color-base-100:oklch(22% .019 237.69);--color-base-200:oklch(20% .019 237.69);--color-base-300:oklch(18% .019 237.69);--color-base-content:oklch(77.383% .043 245.096);--color-primary:oklch(74.703% .158 39.947);--color-primary-content:oklch(14.94% .031 39.947);--color-secondary:oklch(72.537% .177 2.72);--color-secondary-content:oklch(14.507% .035 2.72);--color-accent:oklch(71.294% .166 299.844);--color-accent-content:oklch(14.258% .033 299.844);--color-neutral:oklch(26% .019 237.69);--color-neutral-content:oklch(70% .019 237.69);--color-info:oklch(85.559% .085 206.015);--color-info-content:oklch(17.111% .017 206.015);--color-success:oklch(85.56% .085 144.778);--color-success-content:oklch(17.112% .017 144.778);--color-warning:oklch(85.569% .084 74.427);--color-warning-content:oklch(17.113% .016 74.427);--color-error:oklch(85.511% .078 16.886);--color-error-content:oklch(17.102% .015 16.886);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}@property --radialprogress{syntax: "<percentage>"; inherits: true; initial-value: 0%;}:root:not(span){overflow:var(--page-overflow)}:root{--page-scroll-bg-on:linear-gradient(var(--root-bg),var(--root-bg))var(--root-bg)}@supports (color:color-mix(in lab,red,red)){:root{--page-scroll-bg-on:linear-gradient(var(--root-bg),var(--root-bg))color-mix(in srgb,var(--root-bg),oklch(0% 0 0) calc(var(--page-has-backdrop,0)*40%))}}:root{--page-scroll-transition-on:background-color .3s ease-out;transition:var(--page-scroll-transition);scrollbar-gutter:var(--page-scroll-gutter,unset);scrollbar-gutter:if(style(--page-has-scroll: 1): var(--page-scroll-gutter,unset); else: unset)}:root:root{background:var(--page-scroll-bg,var(--root-bg,var(--color-base-100)))}@keyframes set-page-has-scroll{0%,to{--page-has-scroll:1}}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}:where(:root,[data-theme]){--root-bg:var(--color-base-100)}}@layer components;@layer utilities{@layer daisyui.l1.l2.l3{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-rows:1fr 1.8rem 1fr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:95cqi;max-width:95cqi}.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-1:focus-visible) .diff-resizer{min-width:5cqi;max-width:5cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:5cqi;max-width:5cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:95cqi;max-width:95cqi}}.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;top:0;right:0;bottom:0;left:0;overflow:clip}.modal::backdrop{display:none}.tooltip{--tt-bg:var(--color-neutral);--tt-off: calc(100% + .5rem) ;--tt-tail: calc(100% + 1px + .25rem) ;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);display:block;position:absolute}@media(prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media(prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media(hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field),var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)),var(--tab-border-color)calc(69% - var(--border) + .25px),var(--tab-border-color)69%,var(--tab-bg) calc(69% + .25px) ;order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media(prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px #00000003,inset 0 -1px #ffffff03}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth)*3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li).menu-disabled{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab,red,red)){.dock{border-top:.5px solid color-mix(in oklab,var(--color-base-content)5%,#0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>*{cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media(hover:hover){.dock>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,bottom)var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover],.dropdown .dropdown-content{z-index:999}@media(prefers-reduced-motion:no-preference){.dropdown[popover],.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:95%}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:100%}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:95%}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0/calc(var(--depth)*.15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0/calc(var(--depth)*6%)) inset,var(--btn-shadow);--size:calc(var(--size-field,.25rem)*10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab,red,red)){.btn{--btn-border:color-mix(in oklab,var(--btn-bg),#000 calc(var(--depth)*5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg),0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab,red,red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000),0 4px 3px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000)}}.btn{--btn-noise:var(--fx-noise)}@media(hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:hover{--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}}.btn:focus-visible,.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0),0 0 0 0 oklch(0% 0 0/0)}.btn:is(input[type=checkbox],input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox],input[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0,auto)1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border)solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab,red,red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab,var(--color-base-content)5%,transparent)}}.toggle{border:var(--border)solid currentColor;color:var(--input-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p),var(--radius-selector-max)) + min(var(--border),var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab,red,red)){.toggle{box-shadow:0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab,red,red)){.toggle{--input-color:color-mix(in oklab,var(--color-base-content)50%,#0000)}}.toggle{--toggle-p:calc(var(--size)*.125);--size:calc(var(--size-selector,.25rem)*6);width:calc((var(--size)*2) - (var(--border) + var(--toggle-p))*2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:none}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:none}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);height:100%;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab,red,red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000)}}.toggle:before{background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}@media(forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible,.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border)solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,.875rem),.875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-flex}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}@media(pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.input:has(>input[type=date]) :where(input[type=date]){webkit-appearance:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex}.input:has(>input[type=date]) input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute;inset-inline-end:.75em}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%)var(--indicator-y,-50%);position:absolute}.table{border-collapse:separate;--tw-border-spacing-x: 0rem ;--tw-border-spacing-y: 0rem ;width:100%;border-spacing:var(--tw-border-spacing-x)var(--tw-border-spacing-y);border-radius:var(--radius-box);text-align:left;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media(hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot tr:first-child :is(td,th)){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot tr:first-child :is(td,th)){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr :is(td,th),tbody tr:not(:last-child) :is(td,th)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr :is(td,th),tbody tr:not(:last-child) :is(td,th)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.steps{counter-reset:step;grid-auto-columns:1fr;grid-auto-flow:column;display:inline-grid;overflow:auto hidden}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon,.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:3.40282e38px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.range{-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem)*6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab,red,red)){.range{--range-bg:color-mix(in oklab,currentColor 10%,#0000)}}.range{cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}@media(forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));position:relative;top:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab,red,red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));background-color:currentColor;position:relative;top:50%}@supports (color:color-mix(in lab,red,red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range:disabled{cursor:not-allowed;opacity:.3}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;white-space:nowrap;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:.75rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}[dir=rtl] .select::picker(select){translate:.5rem}[dir=rtl] .select select::picker(select){translate:.5rem}.select[multiple]{background-image:none;height:auto;padding-block:.75rem;padding-inline-end:.75rem;overflow:auto}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:calc(100% + 2.75rem);height:calc(100% - calc(var(--border)*2));background:inherit;border-radius:inherit;border-style:none;align-items:center;margin-inline:-.75rem -1.75rem;padding-inline:.75rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select)::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}@supports (appearance:base-select){.select,.select select{-webkit-appearance:base-select;-moz-appearance:base-select;appearance:base-select}:is(.select,.select select)::picker(select){-webkit-appearance:base-select;-moz-appearance:base-select;appearance:base-select}}:is(.select,.select select)::picker(select){color:inherit;border:var(--border)solid var(--color-base-200);border-radius:var(--radius-box);background-color:inherit;max-height:min(24rem,70dvh);box-shadow:0 2px calc(var(--depth)*3px) -2px #0003;box-shadow:0 20px 25px -5px rgb(0 0 0/calc(var(--depth)*.1)),0 8px 10px -6px rgb(0 0 0/calc(var(--depth)*.1));margin-block:.5rem;margin-inline:.5rem;padding:.5rem;translate:-.5rem}:is(.select,.select select)::picker-icon{display:none}:is(.select,.select select) optgroup{padding-top:.5em}:is(.select,.select select) optgroup option:first-child{margin-top:.5em}:is(.select,.select select) option{border-radius:var(--radius-field);white-space:normal;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{outline-offset:2px;outline:2px solid #0000}}:is(.select,.select select) option:not(:disabled):active{background-color:var(--color-neutral);color:var(--color-neutral-content);box-shadow:0 2px calc(var(--depth)*3px) -2px var(--color-neutral)}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media(forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor}@media(prefers-reduced-motion:no-preference){.radio:checked,.radio[aria-checked=true]{animation:.2s ease-out radio}}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media(forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.drawer{grid-auto-columns:max-content auto;width:100%;display:grid;position:relative}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-box);background-color:currentColor;width:100%;height:.5rem;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.progress{background-color:color-mix(in oklab,currentcolor 20%,transparent)}}.progress{color:var(--color-base-content)}.progress:indeterminate{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%}@media(prefers-reduced-motion:no-preference){.progress:indeterminate{animation:5s ease-in-out infinite progress}}@supports ((-moz-appearance:none)){.progress:indeterminate::-moz-progress-bar{background-color:#0000}@media(prefers-reduced-motion:no-preference){.progress:indeterminate::-moz-progress-bar{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}}.progress::-moz-progress-bar{border-radius:var(--radius-box);background-color:currentColor}}@supports ((-webkit-appearance:none)){.progress::-webkit-progress-bar{border-radius:var(--radius-box);background-color:#0000}.progress::-webkit-progress-value{border-radius:var(--radius-box);background-color:currentColor}}.textarea{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);min-height:5rem;font-size:max(var(--font-size,.875rem),.875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab,red,red)){.textarea{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media(pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.modal-backdrop{color:#0000;z-index:-1;grid-row-start:1;grid-column-start:1;place-self:stretch stretch;display:grid}.modal-backdrop button{cursor:pointer}.modal-box{background-color:var(--color-base-100);border-top-left-radius:var(--modal-tl,var(--radius-box));border-top-right-radius:var(--modal-tr,var(--radius-box));border-bottom-left-radius:var(--modal-bl,var(--radius-box));border-bottom-right-radius:var(--modal-br,var(--radius-box));opacity:0;overscroll-behavior:contain;grid-row-start:1;grid-column-start:1;width:91.6667%;max-width:32rem;max-height:100vh;padding:1.5rem;transition:translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out;overflow-y:auto;scale:95%;box-shadow:0 25px 50px -12px #00000040}.divider{white-space:nowrap;height:1rem;margin:var(--divider-m,1rem 0);--divider-color:var(--color-base-content);flex-direction:row;align-self:stretch;align-items:center;display:flex}@supports (color:color-mix(in lab,red,red)){.divider{--divider-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.divider:before,.divider:after{content:"";background-color:var(--divider-color);flex-grow:1;width:100%;height:.125rem}@media print{.divider:before,.divider:after{border:.5px solid}}.divider:not(:empty){gap:1rem}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset,.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset],.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentcolor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.modal-action{justify-content:flex-end;gap:.5rem;margin-top:1.5rem;display:flex}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab,red,red)){.status{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab,red,red)){.status{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.status{background-image:radial-gradient(circle at 35% 30%,oklch(1 0 0/calc(var(--depth)*.5)),#0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab,red,red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab,currentColor calc(var(--depth)*100%),#0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border)solid var(--badge-color,var(--color-base-200));background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem)*6);width:fit-content;height:var(--size);padding-inline:calc(var(--size)/2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>*{place-items:start;gap:.5rem;display:grid}.footer.footer-center{text-align:center;grid-auto-flow:column dense;place-items:center}.footer.footer-center>*{place-items:center}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.menu-title{color:var(--color-base-content);padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab,red,red)){.menu-title{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}.menu-title{font-size:.875rem;font-weight:600}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.btn-secondary{--btn-color:var(--color-secondary);--btn-fg:var(--color-secondary-content)}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;background-color:#0006}:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:root:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-has-backdrop:1;--page-overflow:hidden;--page-scroll-bg:var(--page-scroll-bg-on);--page-scroll-gutter:stable;--page-scroll-transition:var(--page-scroll-transition-on);animation:forwards set-page-has-scroll;animation-timeline:scroll()}@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off)50%}.tooltip:after{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail)50%}.btn:disabled:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:disabled:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn:disabled:not(.btn-link,.btn-ghost){box-shadow:none}.btn:disabled{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:disabled{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}.btn[disabled]:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn[disabled]:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn[disabled]:not(.btn-link,.btn-ghost){box-shadow:none}.btn[disabled]{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn[disabled]{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}.list .list-row:has(.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row>:not(.list-col-wrap){grid-row-start:1}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after,.steps .step-neutral>.step-icon{--step-bg:var(--color-neutral);--step-fg:var(--color-neutral-content)}.steps .step-primary+.step-primary:before,.steps .step-primary:after,.steps .step-primary>.step-icon{--step-bg:var(--color-primary);--step-fg:var(--color-primary-content)}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after,.steps .step-secondary>.step-icon{--step-bg:var(--color-secondary);--step-fg:var(--color-secondary-content)}.steps .step-accent+.step-accent:before,.steps .step-accent:after,.steps .step-accent>.step-icon{--step-bg:var(--color-accent);--step-fg:var(--color-accent-content)}.steps .step-info+.step-info:before,.steps .step-info:after,.steps .step-info>.step-icon{--step-bg:var(--color-info);--step-fg:var(--color-info-content)}.steps .step-success+.step-success:before,.steps .step-success:after,.steps .step-success>.step-icon{--step-bg:var(--color-success);--step-fg:var(--color-success-content)}.steps .step-warning+.step-warning:before,.steps .step-warning:after,.steps .step-warning>.step-icon{--step-bg:var(--color-warning);--step-fg:var(--color-warning-content)}.steps .step-error+.step-error:before,.steps .step-error:after,.steps .step-error>.step-icon{--step-bg:var(--color-error);--step-fg:var(--color-error-content)}.menu-horizontal{flex-direction:row;display:inline-flex}.menu-horizontal>li:not(.menu-title)>details>ul{transform-origin:top;border-radius:var(--radius-box);background-color:var(--color-base-100);opacity:0;margin-inline-start:0;margin-top:1rem;padding-block:.5rem;padding-inline-end:.5rem;position:absolute;scale:95%;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}@media(prefers-reduced-motion:no-preference){@starting-style{.menu-horizontal>li:not(.menu-title)>details>ul{opacity:0;scale:95%}}.menu-horizontal>li:not(.menu-title)>details>ul{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s menu}}.menu-horizontal>li:not(.menu-title)>details[open]>ul{opacity:1;scale:100%}.menu-horizontal>li>details>ul:before{--tw-content:none;content:var(--tw-content)}.checkbox:disabled,.radio:disabled{cursor:not-allowed;opacity:.2}.tooltip-bottom>.tooltip-content,.tooltip-bottom[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,-.25rem));inset:var(--tt-off)auto auto 50%}.tooltip-bottom:after{transform:translate(-50%)translateY(var(--tt-pos,-.25rem))rotate(180deg);inset:var(--tt-tail)auto auto 50%}.dropdown-right{--anchor-h:right;--anchor-v:span-bottom}.dropdown-right .dropdown-content{transform-origin:0;inset-inline-start:100%;top:0;bottom:auto}.dropdown-left{--anchor-h:left;--anchor-v:span-bottom}.dropdown-left .dropdown-content{transform-origin:100%;inset-inline-end:100%;top:0;bottom:auto}.dropdown-end{--anchor-h:span-left}.dropdown-end :where(.dropdown-content){inset-inline-end:0;translate:0}[dir=rtl] :is(.dropdown-end :where(.dropdown-content)){translate:0}.dropdown-end.dropdown-left{--anchor-h:left;--anchor-v:span-top}.dropdown-end.dropdown-left .dropdown-content{top:auto;bottom:0}.dropdown-end.dropdown-right{--anchor-h:right;--anchor-v:span-top}.dropdown-end.dropdown-right .dropdown-content{top:auto;bottom:0}.dropdown-bottom{--anchor-v:bottom}.dropdown-bottom .dropdown-content{transform-origin:top;top:100%;bottom:auto}.input-xs{--size:calc(var(--size-field,.25rem)*6);font-size:max(var(--font-size,.6875rem),.6875rem)}.input-xs[type=number]::-webkit-inner-spin-button{margin-block:-.25rem;margin-inline-end:-.75rem}.divider-horizontal{--divider-m:0 1rem}.divider-horizontal.divider{flex-direction:column;width:1rem;height:auto}.divider-horizontal.divider:before,.divider-horizontal.divider:after{width:.125rem;height:100%}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.btn-block{width:100%}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.loading-xs{width:calc(var(--size-selector,.25rem)*4)}.menu-md :where(li:not(.menu-title)>:not(ul,details,.menu-title)),.menu-md :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);padding-block:.375rem;padding-inline:.75rem;font-size:.875rem}.menu-md .menu-title{padding-block:.5rem;padding-inline:.75rem}.badge-ghost{border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content);background-image:none}.badge-outline{color:var(--badge-color);--badge-bg:#0000;background-image:none;border-color:currentColor}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.checkbox-sm{--size:calc(var(--size-selector,.25rem)*5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem)*4);padding:.125rem}.select-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.select-sm option{padding-block:.25rem;padding-inline:.625rem}.select-xs{--size:calc(var(--size-field,.25rem)*6);font-size:.6875rem}.select-xs option{padding-block:.25rem;padding-inline:.5rem}.badge-sm{--size:calc(var(--size-selector,.25rem)*5);font-size:.75rem}.textarea-xs{font-size:max(var(--font-size,.6875rem),.6875rem)}.link-primary{color:var(--color-primary)}@media(hover:hover){.link-primary:hover{color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.link-primary:hover{color:color-mix(in oklab,var(--color-primary)80%,#000)}}}.range-accent{color:var(--color-accent);--range-thumb:var(--color-accent-content)}.range-primary{color:var(--color-primary);--range-thumb:var(--color-primary-content)}.range-secondary{color:var(--color-secondary);--range-thumb:var(--color-secondary-content)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem)*8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem)*6)}.badge-primary{--badge-color:var(--color-primary);--badge-fg:var(--color-primary-content)}.range-sm{--range-thumb-size:calc(var(--size-selector,.25rem)*5)}.range-xs{--range-thumb-size:calc(var(--size-selector,.25rem)*4)}.toggle-primary:checked,.toggle-primary[aria-checked=true]{--input-color:var(--color-primary)}.toggle-secondary:checked,.toggle-secondary[aria-checked=true]{--input-color:var(--color-secondary)}.toggle-sm[type=checkbox],.toggle-sm:has([type=checkbox]){--size:calc(var(--size-selector,.25rem)*5)}.toggle-xs[type=checkbox],.toggle-xs:has([type=checkbox]){--size:calc(var(--size-selector,.25rem)*4)}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-px{top:1px}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-100{z-index:100}.z-800{z-index:800}.z-900{z-index:900}.z-999{z-index:999}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0{margin-inline:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.my-0{margin-block:calc(var(--spacing)*0)}.my-1{margin-block:calc(var(--spacing)*1)}.join-item:where(:not(:first-child,:disabled,[disabled],.btn-disabled)){margin-block-start:0;margin-inline-start:calc(var(--border,1px)*-1)}.join-item:where(:is(:disabled,[disabled],.btn-disabled)){border-width:var(--border,1px)0 var(--border,1px)var(--border,1px)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-16{margin-top:calc(var(--spacing)*16)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.ml-1{margin-left:calc(var(--spacing)*1)}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:root .prose{--tw-prose-body:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-body:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose{--tw-prose-headings:var(--color-base-content);--tw-prose-lead:var(--color-base-content);--tw-prose-links:var(--color-base-content);--tw-prose-bold:var(--color-base-content);--tw-prose-counters:var(--color-base-content);--tw-prose-bullets:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-bullets:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-hr:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-hr:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-quotes:var(--color-base-content);--tw-prose-quote-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-quote-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-captions:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-captions:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-code:var(--color-base-content);--tw-prose-pre-code:var(--color-neutral-content);--tw-prose-pre-bg:var(--color-neutral);--tw-prose-th-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-th-borders:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-td-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-td-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-kbd:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-kbd:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose :where(code):not(pre>code){background-color:var(--color-base-200);border-radius:var(--radius-selector);border:var(--border)solid var(--color-base-300);font-weight:inherit;padding-block:.2em;padding-inline:.5em}:root .prose :where(code):not(pre>code):before,:root .prose :where(code):not(pre>code):after{display:none}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.aspect-3\\/2{aspect-ratio:3/2}.aspect-3\\/4{aspect-ratio:3/4}.size-1{width:calc(var(--spacing)*1);height:calc(var(--spacing)*1)}.h-0{height:calc(var(--spacing)*0)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-122{height:calc(var(--spacing)*122)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[calc\\(100vh-8\\.6rem\\)\\]{max-height:calc(100vh - 8.6rem)}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-1\\/2{width:50%}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-11\\/12{width:91.6667%}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-56{width:calc(var(--spacing)*56)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\\[150px\\]{width:150px}.w-\\[200px\\]{width:200px}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[200px\\]{max-width:200px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-left{transform-origin:0}.origin-right{transform-origin:100%}.origin-top{transform-origin:top}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-180{rotate:180deg}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-px{gap:1px}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-base-300>:not(:last-child)){border-color:var(--color-base-300)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-xl{border-top-left-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.rounded-r-xl{border-top-right-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-xl)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-200{border-color:var(--color-base-200)}.border-base-300,.border-base-300\\/50{border-color:var(--color-base-300)}@supports (color:color-mix(in lab,red,red)){.border-base-300\\/50{border-color:color-mix(in oklab,var(--color-base-300)50%,transparent)}}.border-base-content\\/10{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\\/10{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.border-primary\\/40{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/40{border-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-white\\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\\/5{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-yellow-400{border-color:var(--color-yellow-400)}.bg-accent{background-color:var(--color-accent)}.bg-base-100,.bg-base-100\\/50{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\\/50{background-color:color-mix(in oklab,var(--color-base-100)50%,transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\\/95{background-color:color-mix(in oklab,var(--color-base-100)95%,transparent)}}.bg-base-200,.bg-base-200\\/50{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/50{background-color:color-mix(in oklab,var(--color-base-200)50%,transparent)}}.bg-base-200\\/90{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/90{background-color:color-mix(in oklab,var(--color-base-200)90%,transparent)}}.bg-base-200\\/95{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/95{background-color:color-mix(in oklab,var(--color-base-200)95%,transparent)}}.bg-base-300,.bg-base-300\\/30{background-color:var(--color-base-300)}@supports (color:color-mix(in lab,red,red)){.bg-base-300\\/30{background-color:color-mix(in oklab,var(--color-base-300)30%,transparent)}}.bg-base-content,.bg-base-content\\/20{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\\/20{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.bg-primary,.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/20{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/20{background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-400\\/40{background-color:#fac80066}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/40{background-color:color-mix(in oklab,var(--color-yellow-400)40%,transparent)}}.fill-red-500\\/20{fill:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.fill-red-500\\/20{fill:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.fill-yellow-400\\/40{fill:#fac80066}@supports (color:color-mix(in lab,red,red)){.fill-yellow-400\\/40{fill:color-mix(in oklab,var(--color-yellow-400)40%,transparent)}}.stroke-red-500{stroke:var(--color-red-500)}.stroke-yellow-400{stroke:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-center{object-position:center}.object-left{object-position:left}.object-right{object-position:right}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-4{padding-block:calc(var(--spacing)*4)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-12{padding-right:calc(var(--spacing)*12)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\\/50{color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.text-error{color:var(--color-error)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.prose :where(.btn-link):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}@layer daisyui.l1{.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)):not(:disabled,[disabled],.btn-disabled){--btn-fg:var(--btn-color,currentColor);outline-color:currentColor}@media(hover:none){.btn-ghost:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color,currentColor);--btn-border:#0000;--btn-noise:none;outline-color:currentColor}}.btn-outline:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn),:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}@media(hover:none){.btn-outline:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}}}.outline-black\\/5{outline-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.outline-black\\/5{outline-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}.group-open\\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.group-focus-within\\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media(hover:hover){.group-hover\\:border-base-content\\/20:is(:where(.group):hover *){border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-base-content\\/20:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:border-none:last-child{--tw-border-style:none;border-style:none}@media(hover:hover){.hover\\:bg-base-200:hover,.hover\\:bg-base-200\\/30:hover{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-base-200\\/30:hover{background-color:color-mix(in oklab,var(--color-base-200)30%,transparent)}}.hover\\:bg-base-200\\/50:hover{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-base-200\\/50:hover{background-color:color-mix(in oklab,var(--color-base-200)50%,transparent)}}.hover\\:bg-base-300:hover{background-color:var(--color-base-300)}.hover\\:bg-red-500\\/40:hover{background-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/40:hover{background-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.hover\\:bg-yellow-400\\/60:hover{background-color:#fac80099}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-yellow-400\\/60:hover{background-color:color-mix(in oklab,var(--color-yellow-400)60%,transparent)}}.hover\\:fill-red-500\\/40:hover{fill:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.hover\\:fill-red-500\\/40:hover{fill:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.hover\\:fill-yellow-400\\/60:hover{fill:#fac80099}@supports (color:color-mix(in lab,red,red)){.hover\\:fill-yellow-400\\/60:hover{fill:color-mix(in oklab,var(--color-yellow-400)60%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:bg-base-300:focus{background-color:var(--color-base-300)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:bg-base-200:active{background-color:var(--color-base-200)}@media(min-width:64rem){.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\\:pt-8{padding-top:calc(var(--spacing)*8)}.lg\\:pb-16{padding-bottom:calc(var(--spacing)*16)}}}.osd-background,.osd-background .openseadragon-container{background-color:#0000}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items)*100%)}to{translate:0 -100%}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`;var q0=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],X0=["difference","intersection","symmetricDifference","union"],Hc=!1;const $o=class $o extends Set{constructor(e){super();be(this,Ji);be(this,Qi,new Map);be(this,mr,Pe(0));be(this,ni,Pe(0));be(this,Jo,gr||-1);if(e){for(var r of e)super.add(r);R(this,ni).v=super.size}Hc||We(this,Ji,Th).call(this)}has(e){var r=super.has(e),n=R(this,Qi),o=n.get(e);if(o===void 0){if(!r)return p(R(this,mr)),!1;o=We(this,Ji,xh).call(this,!0),n.set(e,o)}return p(o),r}add(e){return super.has(e)||(super.add(e),xe(R(this,ni),super.size),Yt(R(this,mr))),this}delete(e){var r=super.delete(e),n=R(this,Qi),o=n.get(e);return o!==void 0&&(n.delete(e),xe(o,!1)),r&&(xe(R(this,ni),super.size),Yt(R(this,mr))),r}clear(){if(super.size!==0){super.clear();var e=R(this,Qi);for(var r of e.values())xe(r,!1);e.clear(),xe(R(this,ni),0),Yt(R(this,mr))}}keys(){return this.values()}values(){return p(R(this,mr)),super.values()}entries(){return p(R(this,mr)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return p(R(this,ni))}};Qi=new WeakMap,mr=new WeakMap,ni=new WeakMap,Jo=new WeakMap,Ji=new WeakSet,xh=function(e){return gr===R(this,Jo)?Pe(e):Lt(e)},Th=function(){Hc=!0;var e=$o.prototype,r=Set.prototype;for(const n of q0)e[n]=function(...o){return p(R(this,mr)),r[n].apply(this,o)};for(const n of X0)e[n]=function(...o){p(R(this,mr));var a=r[n].apply(this,o);return new $o(a)}};let No=$o;const Is=class Is extends Map{constructor(e){super();be(this,_r);be(this,Lr,new Map);be(this,zr,Pe(0));be(this,Ur,Pe(0));be(this,ea,gr||-1);if(e){for(var[r,n]of e)super.set(r,n);R(this,Ur).v=super.size}}has(e){var r=R(this,Lr),n=r.get(e);if(n===void 0){var o=super.get(e);if(o!==void 0)n=We(this,_r,ro).call(this,0),r.set(e,n);else return p(R(this,zr)),!1}return p(n),!0}forEach(e,r){We(this,_r,ia).call(this),super.forEach(e,r)}get(e){var r=R(this,Lr),n=r.get(e);if(n===void 0){var o=super.get(e);if(o!==void 0)n=We(this,_r,ro).call(this,0),r.set(e,n);else{p(R(this,zr));return}}return p(n),super.get(e)}set(e,r){var h;var n=R(this,Lr),o=n.get(e),a=super.get(e),s=super.set(e,r),c=R(this,zr);if(o===void 0)o=We(this,_r,ro).call(this,0),n.set(e,o),xe(R(this,Ur),super.size),Yt(c);else if(a!==r){Yt(o);var l=c.reactions===null?null:new Set(c.reactions),u=l===null||!((h=o.reactions)!=null&&h.every(f=>l.has(f)));u&&Yt(c)}return s}delete(e){var r=R(this,Lr),n=r.get(e),o=super.delete(e);return n!==void 0&&(r.delete(e),xe(R(this,Ur),super.size),xe(n,-1),Yt(R(this,zr))),o}clear(){if(super.size!==0){super.clear();var e=R(this,Lr);xe(R(this,Ur),0);for(var r of e.values())xe(r,-1);Yt(R(this,zr)),e.clear()}}keys(){return p(R(this,zr)),super.keys()}values(){return We(this,_r,ia).call(this),super.values()}entries(){return We(this,_r,ia).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(R(this,Ur)),super.size}};Lr=new WeakMap,zr=new WeakMap,Ur=new WeakMap,ea=new WeakMap,_r=new WeakSet,ro=function(e){return gr===R(this,ea)?Pe(e):Lt(e)},ia=function(){p(R(this,zr));var e=R(this,Lr);if(R(this,Ur).v!==e.size){for(var r of vh(Is.prototype,this,"keys").call(this))if(!e.has(r)){var n=We(this,_r,ro).call(this,0);e.set(r,n)}}for([,n]of R(this,Lr))p(n)};let _n=Is;var Nc=(function(){function i(t){this.__jsonld=t,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return i.prototype.getProperty=function(t){var e=null;return this.__jsonld&&(e=this.__jsonld[t],e||(e=this.__jsonld["@"+t])),e},i})(),Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ua(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Y0(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var t=i.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var n=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return i[r]}})}),e}var lt={},Fc;function K0(){if(Fc)return lt;Fc=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.ViewingHint=lt.ViewingDirection=lt.ServiceType=lt.ServiceProfile=lt.RenderingFormat=lt.MediaType=lt.IIIFResourceType=lt.ExternalResourceType=lt.Behavior=lt.AnnotationMotivation=void 0;var i;(function(u){u.BOOKMARKING="oa:bookmarking",u.CLASSIFYING="oa:classifying",u.COMMENTING="oa:commenting",u.DESCRIBING="oa:describing",u.EDITING="oa:editing",u.HIGHLIGHTING="oa:highlighting",u.IDENTIFYING="oa:identifying",u.LINKING="oa:linking",u.MODERATING="oa:moderating",u.PAINTING="sc:painting",u.QUESTIONING="oa:questioning",u.REPLYING="oa:replying",u.TAGGING="oa:tagging",u.TRANSCRIBING="oad:transcribing"})(i||(lt.AnnotationMotivation=i={}));var t;(function(u){u.AUTO_ADVANCE="auto-advance",u.CONTINUOUS="continuous",u.FACING_PAGES="facing-pages",u.HIDDEN="hidden",u.INDIVIDUALS="individuals",u.MULTI_PART="multi-part",u.NO_NAV="no-nav",u.NON_PAGED="non-paged",u.PAGED="paged",u.REPEAT="repeat",u.SEQUENCE="sequence",u.THUMBNAIL_NAV="thumbnail-nav",u.TOGETHER="together",u.UNORDERED="unordered"})(t||(lt.Behavior=t={}));var e;(function(u){u.CANVAS="canvas",u.CHOICE="choice",u.OA_CHOICE="oa:choice",u.CONTENT_AS_TEXT="contentastext",u.DATASET="dataset",u.DOCUMENT="document",u.IMAGE="image",u.MODEL="model",u.MOVING_IMAGE="movingimage",u.PDF="pdf",u.PHYSICAL_OBJECT="physicalobject",u.SOUND="sound",u.TEXT="text",u.TEXTUALBODY="textualbody",u.VIDEO="video"})(e||(lt.ExternalResourceType=e={}));var r;(function(u){u.ANNOTATION="annotation",u.ANNOTATION_COLLECTION="annotationcollection",u.ANNOTATION_PAGE="annotationpage",u.CANVAS="canvas",u.COLLECTION="collection",u.MANIFEST="manifest",u.RANGE="range",u.SEQUENCE="sequence"})(r||(lt.IIIFResourceType=r={}));var n;(function(u){u.APNG="image/apng",u.AUDIO_MP4="audio/mp4",u.AUDIO_OGG="audio/ogg",u.AVIF="audio/avif",u.CORTO="application/corto",u.DICOM="application/dicom",u.DRACO="application/draco",u.EPUB="application/epub+zip",u.GIF="image/gif",u.GIRDER="image/vnd.kitware.girder",u.GLB="model/gltf-binary",u.GLTF="model/gltf+json",u.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',u.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',u.JPG="image/jpeg",u.M3U8="application/vnd.apple.mpegurl",u.MP3="audio/mp3",u.MPEG="audio/mpeg",u.MPEG_DASH="application/dash+xml",u.OBJ="model/obj",u.OPF="application/oebps-package+xml",u.PDF="application/pdf",u.PLY="application/ply",u.PNG="image/png",u.SVG="image/svg+xml",u.THREEJS="application/vnd.threejs+json",u.USDZ="model/vnd.usd+zip",u.VIDEO_MP4="video/mp4",u.VIDEO_OGG="video/ogg",u.WAV="audio/wav",u.WEBM="video/webm",u.WEBP="image/webp"})(n||(lt.MediaType=n={}));var o;(function(u){u.DOC="application/msword",u.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",u.ODT="application/vnd.oasis.opendocument.text",u.PDF="application/pdf"})(o||(lt.RenderingFormat=o={}));var a;(function(u){u.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",u.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",u.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",u.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",u.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",u.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",u.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",u.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",u.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",u.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",u.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",u.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",u.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",u.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",u.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",u.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",u.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",u.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",u.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",u.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",u.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",u.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",u.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",u.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",u.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",u.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",u.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",u.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",u.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",u.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",u.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",u.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",u.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",u.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",u.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",u.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",u.SEARCH_0="http://iiif.io/api/search/0/search",u.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",u.SEARCH_1="http://iiif.io/api/search/1/search",u.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",u.SEARCH_2="http://iiif.io/api/search/2/search",u.SEARCH_2_AUTO_COMPLETE="http://iiif.io/api/search/2/autocomplete",u.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",u.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",u.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",u.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",u.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",u.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",u.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"})(a||(lt.ServiceProfile=a={}));var s;(function(u){u.IMAGE_SERVICE_2="ImageService2",u.IMAGE_SERVICE_3="ImageService3",u.SEARCH_SERVICE_2="SearchService2",u.AUTO_COMPLETE_SERVICE_2="AutoCompleteService2"})(s||(lt.ServiceType=s={}));var c;(function(u){u.BOTTOM_TO_TOP="bottom-to-top",u.LEFT_TO_RIGHT="left-to-right",u.RIGHT_TO_LEFT="right-to-left",u.TOP_TO_BOTTOM="top-to-bottom"})(c||(lt.ViewingDirection=c={}));var l;return(function(u){u.CONTINUOUS="continuous",u.INDIVIDUALS="individuals",u.NON_PAGED="non-paged",u.PAGED="paged",u.TOP="top"})(l||(lt.ViewingHint=l={})),lt}var ve=K0(),Q0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Br=(function(i){Q0(t,i);function t(e,r){var n=i.call(this,e)||this;return n.options=r,n}return t.prototype.getIIIFResourceType=function(){return Ge.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var e=this.getProperty("label");return e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getDefaultLabel=function(){return this.getLabel().getValue(this.options.locale)},t.prototype.getMetadata=function(){var e=this.getProperty("metadata"),r=[];if(!e)return r;for(var n=0;n<e.length;n++){var o=e[n],a=new Uo(this.options.locale);a.parse(o),r.push(a)}return r},t.prototype.getRendering=function(e){for(var r=this.getRenderings(),n=0;n<r.length;n++){var o=r[n];if(o.getFormat()===e)return o}return null},t.prototype.getRenderings=function(){var e;this.__jsonld?e=this.__jsonld.rendering:e=this.rendering;var r=[];if(!e)return r;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var o=e[n];r.push(new Mg(o,this.options))}return r},t.prototype.getRequiredStatement=function(){var e=null,r=this.getProperty("requiredStatement");return r&&(e=new Uo(this.options.locale),e.parse(r)),e},t.prototype.getService=function(e){return Ge.getService(this,e)},t.prototype.getServices=function(){return Ge.getServices(this)},t.prototype.getThumbnail=function(){var e=this.getProperty("thumbnail");return Array.isArray(e)&&(e=e[0]),e?new Ng(e,this.options):null},t.prototype.isAnnotation=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.ANNOTATION},t.prototype.isCanvas=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.CANVAS},t.prototype.isCollection=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.MANIFEST},t.prototype.isRange=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.RANGE},t.prototype.isSequence=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.SEQUENCE},t})(Nc),J0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ga=(function(i){J0(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){var e=this.getProperty("format");return e?e.toLowerCase():null},t.prototype.getResources=function(){var e=[];if(!this.__jsonld.resources)return e;for(var r=0;r<this.__jsonld.resources.length;r++){var n=this.__jsonld.resources[r],o=new Bo(n,this.options);e.push(o)}return e},t.prototype.getType=function(){var e=this.getProperty("type");return e?Ge.normaliseType(e):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getMaxWidth=function(){return this.getProperty("maxWidth")},t.prototype.getMaxHeight=function(){var e=this.getProperty("maxHeight");return e?null:this.getMaxWidth()},t})(Br),$0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Bc=(function(i){$0(t,i);function t(e,r){var n=i.call(this,e,r)||this;n.index=-1,n.isLoaded=!1;var o={defaultLabel:"-",locale:"en-GB",resource:n,pessimisticAccessControl:!1};return n.options=Object.assign(o,r),n}return t.prototype.getAttribution=function(){var e=this.getProperty("attribution");return e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getDescription=function(){var e=this.getProperty("description");return e===void 0&&(e=this.getProperty("summary")),e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getSummary=function(){var e=this.getProperty("summary");return e===void 0&&(e=this.getProperty("description")),e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getHomepage=function(){var e=this.getProperty("homepage");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getIIIFResourceType=function(){return Ge.normaliseType(this.getProperty("type"))},t.prototype.getLogo=function(){var e=this.getProperty("logo");if(!e){var r=this.getProperty("provider");if(!r)return null;var n=r.find(function(o){return o.logo!==void 0});n&&n.logo!==void 0?e=n.logo:e=null}return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||(e==null?void 0:e.id)):null},t.prototype.getLicense=function(){return Ge.getLocalisedValue(this.getProperty("license"),this.options.locale)},t.prototype.getRights=function(){var e=this.getProperty("rights");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getNavDate=function(){return new Date(this.getProperty("navDate"))},t.prototype.getRelated=function(){return this.getProperty("related")},t.prototype.getSeeAlso=function(){return this.getProperty("seeAlso")},t.prototype.getTrackingLabel=function(){var e=this.getService(ve.ServiceProfile.TRACKING_EXTENSIONS);return e?e.getProperty("trackingLabel"):""},t.prototype.getDefaultTree=function(){return this.defaultTree=new fs("root"),this.defaultTree.data=this,this.defaultTree},t.prototype.getRequiredStatement=function(){var e=null,r=this.getProperty("requiredStatement");if(r)e=new Uo(this.options.locale),e.parse(r);else{var n=this.getAttribution();n&&n.length&&(e=new Uo(this.options.locale),e.value=n)}return e},t.prototype.isCollection=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===ve.IIIFResourceType.MANIFEST},t.prototype.load=function(){var e=this;return new Promise(function(r){if(e.isLoaded)r(e);else{var n=e.options;n.navDate=e.getNavDate();var o=e.__jsonld.id;o||(o=e.__jsonld["@id"]),Ge.loadManifest(o).then(function(a){e.parentLabel=e.getLabel().getValue(n.locale);var s=uu.parse(a,n);e=Object.assign(e,s),e.index=n.index,r(e)})}})},t})(Br),eg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Bo=(function(i){eg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getBody=function(){var e=[],r=this.getProperty("body");if(r)if(Array.isArray(r))for(var n=0;n<r.length;n++){var o=r[n];if(o.items)for(var a=0;a<o.items.length;a++){var s=o.items[a];e.push(new Vo(s,this.options))}else e.push(new Vo(o,this.options))}else if(r.items)for(var n=0;n<r.items.length;n++){var o=r.items[n];e.push(new Vo(o,this.options))}else e.push(new Vo(r,this.options));return e},t.prototype.getMotivation=function(){var e=this.getProperty("motivation");return e||null},t.prototype.getOn=function(){return this.getProperty("on")},t.prototype.getTarget=function(){return this.getProperty("target")},t.prototype.getResource=function(){return new Ga(this.getProperty("resource"),this.options)},t})(Br),tg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Vo=(function(i){tg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){var e=this.getProperty("format");return e?Ge.getMediaType(e):null},t.prototype.getType=function(){var e=this.getProperty("type");return e?Ge.normaliseType(this.getProperty("type")):null},t.prototype.getValue=function(){return this.getProperty("value")},t.prototype.getLanguage=function(){return this.getProperty("language")},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t})(Br),rg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),ig=(function(i){rg(t,i);function t(e,r,n){var o=i.call(this,r)||this;return o.label=e,o.options=n,o}return t.prototype.getIIIFResourceType=function(){return Ge.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){return this.label},t.prototype.getResources=function(){var e=this,r=this.getProperty("resources");return r.map(function(n){return new Bo(n,e.options)})},t.prototype.load=function(){var e=this;return new Promise(function(r,n){if(e.isLoaded)r(e);else{var o=e.__jsonld.id;o||(o=e.__jsonld["@id"]),Ge.loadManifest(o).then(function(a){e.__jsonld=a,e.context=e.getProperty("context"),e.id=e.getProperty("id"),e.isLoaded=!0,r(e)}).catch(n)}})},t})(Nc),ng=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Vc=(function(i){ng(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getItems=function(){return this.getProperty("items")},t.prototype.getAnnotations=function(){var e=[],r=this.getProperty("items");if(!r||!Array.isArray(r))return e;for(var n=0;n<r.length;n++){var o=new Bo(r[n],this.options);e.push(o)}return e},t})(Br),Za,jc;function og(){if(jc)return Za;jc=1;function i(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}return Za=i,Za}var Wa,Uc;function ag(){if(Uc)return Wa;Uc=1;var i=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo;return Wa=i,Wa}var qa,Gc;function sg(){if(Gc)return qa;Gc=1;var i=ag(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=i||t||Function("return this")();return qa=e,qa}var Xa,Zc;function Ya(){if(Zc)return Xa;Zc=1;var i=sg(),t=i.Symbol;return Xa=t,Xa}var Ka,Wc;function lg(){if(Wc)return Ka;Wc=1;var i=Ya(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,n=i?i.toStringTag:void 0;function o(a){var s=e.call(a,n),c=a[n];try{a[n]=void 0;var l=!0}catch{}var u=r.call(a);return l&&(s?a[n]=c:delete a[n]),u}return Ka=o,Ka}var Qa,qc;function cg(){if(qc)return Qa;qc=1;var i=Object.prototype,t=i.toString;function e(r){return t.call(r)}return Qa=e,Qa}var Ja,Xc;function ug(){if(Xc)return Ja;Xc=1;var i=Ya(),t=lg(),e=cg(),r="[object Null]",n="[object Undefined]",o=i?i.toStringTag:void 0;function a(s){return s==null?s===void 0?n:r:o&&o in Object(s)?t(s):e(s)}return Ja=a,Ja}var $a,Yc;function Kc(){if(Yc)return $a;Yc=1;function i(t){return t!=null&&typeof t=="object"}return $a=i,$a}var es,Qc;function hg(){if(Qc)return es;Qc=1;var i=ug(),t=Kc(),e="[object Arguments]";function r(n){return t(n)&&i(n)==e}return es=r,es}var ts,Jc;function dg(){if(Jc)return ts;Jc=1;var i=hg(),t=Kc(),e=Object.prototype,r=e.hasOwnProperty,n=e.propertyIsEnumerable,o=i((function(){return arguments})())?i:function(a){return t(a)&&r.call(a,"callee")&&!n.call(a,"callee")};return ts=o,ts}var rs,$c;function fg(){if($c)return rs;$c=1;var i=Array.isArray;return rs=i,rs}var is,eu;function pg(){if(eu)return is;eu=1;var i=Ya(),t=dg(),e=fg(),r=i?i.isConcatSpreadable:void 0;function n(o){return e(o)||t(o)||!!(r&&o&&o[r])}return is=n,is}var ns,tu;function ru(){if(tu)return ns;tu=1;var i=og(),t=pg();function e(r,n,o,a,s){var c=-1,l=r.length;for(o||(o=t),s||(s=[]);++c<l;){var u=r[c];n>0&&o(u)?n>1?e(u,n-1,o,a,s):i(s,u):a||(s[s.length]=u)}return s}return ns=e,ns}var os,iu;function gg(){if(iu)return os;iu=1;var i=ru();function t(e){var r=e==null?0:e.length;return r?i(e,1):[]}return os=t,os}var vg=gg();const as=Ua(vg);var ss,nu;function mg(){if(nu)return ss;nu=1;var i=ru(),t=1/0;function e(r){var n=r==null?0:r.length;return n?i(r,t):[]}return ss=e,ss}var _g=mg();const ou=Ua(_g);var wg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),jo=(function(i){wg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getCanonicalImageUri=function(e){var r=null,n="full",o=0,a="default",s=e,c=s+",";if(this.externalResource&&this.externalResource.data&&this.externalResource.data["@id"])r=this.externalResource.data["@id"],s||(s=this.externalResource.data.width),this.externalResource.data["@context"]&&(this.externalResource.data["@context"].indexOf("/1.0/context.json")>-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(a="native");else{var l=void 0;if(l=this.getImages(),l&&l.length){var u=l[0],h=u.getResource(),f=h.getServices();s||(s=h.getWidth());var v=f?f.find(function(S){return Ge.isImageProfile(S.getProfile())||Ge.isImageServiceType(S.getIIIFResourceType())}):null;if(v)r=v.id,a=Ge.getImageQuality(v.getProfile());else if(s===h.getWidth())return h.id}if(l=this.getContent(),l&&l.length){var u=l[0],_=u.getBody(),d=_[0],f=d.getServices();s||(s=d.getWidth());var v=f?f.find(function(A){return Ge.isImageServiceType(A.getIIIFResourceType())}):null;if(v)r=v.id,a=Ge.getImageQuality(v.getProfile());else if(s===d.getWidth())return d.id}if(!r){var g=this.getProperty("thumbnail");if(g){if(typeof g=="string")return g;if(g["@id"])return g["@id"];if(g.length)return g[0].id}}}r&&r.endsWith("/")&&(r=r.substr(0,r.length-1));var y=[r,n,c,o,a+".jpg"].join("/");return y},t.prototype.getMaxDimensions=function(){var e=null,r;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(r=this.externalResource.data.profile,Array.isArray(r)&&(r=r.filter(function(n){var o;return(o=n.maxWidth)!==null&&o!==void 0?o:n.maxwidth})[0],r&&(e=new Lg(r.maxWidth,r.maxHeight?r.maxHeight:r.maxWidth)))),e},t.prototype.getContent=function(){var e=[],r=this.__jsonld.items||this.__jsonld.content;if(!r)return e;var n=null;if(r.length&&(n=new Vc(r[0],this.options)),!n)return e;for(var o=n.getAnnotations(),a=0;a<o.length;a++){var s=o[a];e.push(s)}return e},t.prototype.getAnnotations=function(){var e=[],r=this.__jsonld.annotations;if(!r||!Array.isArray(r))return e;for(var n=0;n<r.length;n++){var o=new Vc(r[n],this.options);e.push(o)}return e},t.prototype.getDuration=function(){return this.getProperty("duration")},t.prototype.getImages=function(){var e=[];if(!this.__jsonld.images)return e;for(var r=0;r<this.__jsonld.images.length;r++){var n=this.__jsonld.images[r],o=new Bo(n,this.options);e.push(o)}return e},t.prototype.getIndex=function(){return this.getProperty("index")},t.prototype.getOtherContent=function(){var e=this,r=Array.isArray(this.getProperty("otherContent"))?this.getProperty("otherContent"):[this.getProperty("otherContent")],n=function(a,s){return typeof a!="string"?!1:a.toLowerCase()===a.toLowerCase()},o=r.filter(function(a){return a&&n(a["@type"])}).map(function(a,s){return new ig(a.label||"Annotation list ".concat(s),a,e.options)}).map(function(a){return a.load()});return Promise.all(o)},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},Object.defineProperty(t.prototype,"imageResources",{get:function(){var e=this,r=ou([this.getImages().map(function(n){return n.getResource()}),this.getContent().map(function(n){return n.getBody()})]);return as(r.map(function(n){switch(n.getProperty("type").toLowerCase()){case ve.ExternalResourceType.CHOICE:case ve.ExternalResourceType.OA_CHOICE:return new t({images:as([n.getProperty("default"),n.getProperty("item")]).map(function(o){return{resource:o}})},e.options).getImages().map(function(o){return o.getResource()});default:return n}}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resourceAnnotations",{get:function(){return ou([this.getImages(),this.getContent()])},enumerable:!1,configurable:!0}),t.prototype.resourceAnnotation=function(e){return this.resourceAnnotations.find(function(r){return r.getResource().id===e||as(new Array(r.getBody())).some(function(n){return n.id===e})})},t.prototype.onFragment=function(e){var r=this.resourceAnnotation(e);if(r){var n=r.getProperty("on"),o=r.getProperty("target");if(!(!n||!o)){var a=(n||o).match(/xywh=(.*)$/);if(a)return a[1].split(",").map(function(s){return parseInt(s,10)})}}},Object.defineProperty(t.prototype,"iiifImageResources",{get:function(){return this.imageResources.filter(function(e){return e&&e.getServices()[0]&&e.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageServiceIds",{get:function(){return this.iiifImageResources.map(function(e){return e.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){return this.getWidth()/this.getHeight()},enumerable:!1,configurable:!0}),t})(Ga),bg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),yg=(function(i){bg(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.items=[],n._collections=null,n._manifests=null,e.__collection=n,n}return t.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.items.filter(function(e){return e.isCollection()})},t.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.items.filter(function(e){return e.isManifest()})},t.prototype.getCollectionByIndex=function(e){for(var r=this.getCollections(),n,o=0;o<r.length;o++){var a=r[o];a.index===e&&(n=a)}if(n)return n.options.index=e,n.load();throw new Error("Collection index not found")},t.prototype.getManifestByIndex=function(e){for(var r=this.getManifests(),n,o=0;o<r.length;o++){var a=r[o];a.index===e&&(n=a)}if(n)return n.options.index=e,n.load();throw new Error("Manifest index not found")},t.prototype.getTotalCollections=function(){return this.getCollections().length},t.prototype.getTotalManifests=function(){return this.getManifests().length},t.prototype.getTotalItems=function(){return this.items.length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):ve.ViewingDirection.LEFT_TO_RIGHT},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){return i.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Ge.normaliseType(Rr.COLLECTION),this._parseManifests(this),this._parseCollections(this),Ge.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._parseManifests=function(e){if(e.getManifests()&&e.getManifests().length)for(var r=0;r<e.getManifests().length;r++){var n=e.getManifests()[r],o=n.getDefaultTree();o.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"manifest "+(r+1),o.navDate=n.getNavDate(),o.data.id=n.id,o.data.type=Ge.normaliseType(Rr.MANIFEST),e.defaultTree.addNode(o)}},t.prototype._parseCollections=function(e){if(e.getCollections()&&e.getCollections().length)for(var r=0;r<e.getCollections().length;r++){var n=e.getCollections()[r],o=n.getDefaultTree();o.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"collection "+(r+1),o.navDate=n.getNavDate(),o.data.id=n.id,o.data.type=Ge.normaliseType(Rr.COLLECTION),e.defaultTree.addNode(o)}},t})(Bc),ls=(function(){function i(t,e){this.start=t,this.end=e}return i.prototype.getLength=function(){return this.end-this.start},i})(),Uo=(function(){function i(t){this.defaultLocale=t}return i.prototype.parse=function(t){this.resource=t,this.label=sr.parse(this.resource.label,this.defaultLocale),this.value=sr.parse(this.resource.value,this.defaultLocale)},i.prototype.getLabel=function(t){return this.label===null?null:(Array.isArray(t)&&!t.length&&(t=void 0),this.label.getValue(t||this.defaultLocale))},i.prototype.setLabel=function(t){this.label===null&&(this.label=new sr([])),this.label.setValue(t,this.defaultLocale)},i.prototype.getValue=function(t,e){return e===void 0&&(e="<br/>"),this.value===null?null:(Array.isArray(t)&&!t.length&&(t=void 0),this.value.getValue(t||this.defaultLocale,e))},i.prototype.getValues=function(t){return this.value===null?[]:(Array.isArray(t)&&!t.length&&(t=void 0),this.value.getValues(t||this.defaultLocale))},i.prototype.setValue=function(t){this.value===null&&(this.value=new sr([])),this.value.setValue(t,this.defaultLocale)},i})(),xg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})();(function(i){xg(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}return t.getValue=function(e,r){return e.getValue(r,"<br/>")},t.getValues=function(e,r){return e.getValues(r)},t})(Array);var Ae={},au;function Tg(){return au||(au=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.CONTINUE=100,Ae.SWITCHING_PROTOCOLS=101,Ae.PROCESSING=102,Ae.OK=200,Ae.CREATED=201,Ae.ACCEPTED=202,Ae.NON_AUTHORITATIVE_INFORMATION=203,Ae.NO_CONTENT=204,Ae.RESET_CONTENT=205,Ae.PARTIAL_CONTENT=206,Ae.MULTI_STATUS=207,Ae.MULTIPLE_CHOICES=300,Ae.MOVED_PERMANENTLY=301,Ae.MOVED_TEMPORARILY=302,Ae.SEE_OTHER=303,Ae.NOT_MODIFIED=304,Ae.USE_PROXY=305,Ae.TEMPORARY_REDIRECT=307,Ae.BAD_REQUEST=400,Ae.UNAUTHORIZED=401,Ae.PAYMENT_REQUIRED=402,Ae.FORBIDDEN=403,Ae.NOT_FOUND=404,Ae.METHOD_NOT_ALLOWED=405,Ae.NOT_ACCEPTABLE=406,Ae.PROXY_AUTHENTICATION_REQUIRED=407,Ae.REQUEST_TIME_OUT=408,Ae.CONFLICT=409,Ae.GONE=410,Ae.LENGTH_REQUIRED=411,Ae.PRECONDITION_FAILED=412,Ae.REQUEST_ENTITY_TOO_LARGE=413,Ae.REQUEST_URI_TOO_LARGE=414,Ae.UNSUPPORTED_MEDIA_TYPE=415,Ae.REQUESTED_RANGE_NOT_SATISFIABLE=416,Ae.EXPECTATION_FAILED=417,Ae.IM_A_TEAPOT=418,Ae.UNPROCESSABLE_ENTITY=422,Ae.LOCKED=423,Ae.FAILED_DEPENDENCY=424,Ae.UNORDERED_COLLECTION=425,Ae.UPGRADE_REQUIRED=426,Ae.PRECONDITION_REQUIRED=428,Ae.TOO_MANY_REQUESTS=429,Ae.REQUEST_HEADER_FIELDS_TOO_LARGE=431,Ae.INTERNAL_SERVER_ERROR=500,Ae.NOT_IMPLEMENTED=501,Ae.BAD_GATEWAY=502,Ae.SERVICE_UNAVAILABLE=503,Ae.GATEWAY_TIME_OUT=504,Ae.HTTP_VERSION_NOT_SUPPORTED=505,Ae.VARIANT_ALSO_NEGOTIATES=506,Ae.INSUFFICIENT_STORAGE=507,Ae.BANDWIDTH_LIMIT_EXCEEDED=509,Ae.NOT_EXTENDED=510,Ae.NETWORK_AUTHENTICATION_REQUIRED=511),Ae}var ar=Tg();function Eg(i,t){return t=t||{},new Promise(function(e,r){var n=new XMLHttpRequest,o=[],a=[],s={},c=function(){return{ok:(n.status/100|0)==2,statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return a},get:function(u){return s[u.toLowerCase()]},has:function(u){return u.toLowerCase()in s}}}};for(var l in n.open(t.method||"get",i,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(u,h,f){o.push(h=h.toLowerCase()),a.push([h,f]),s[h]=s[h]?s[h]+","+f:f}),e(c())},n.onerror=r,n.withCredentials=t.credentials=="include",t.headers)n.setRequestHeader(l,t.headers[l]);n.send(t.body||null)})}const su=Y0(Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"})));var cs,lu;function kg(){return lu||(lu=1,cs=self.fetch||(self.fetch=su.default||su)),cs}kg();var us=function(i,t,e,r){function n(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(h){a(h)}}function c(u){try{l(r.throw(u))}catch(h){a(h)}}function l(u){u.done?o(u.value):n(u.value).then(s,c)}l((r=r.apply(i,t||[])).next())})},hs=function(i,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(e=0)),e;)try{if(r=1,n&&(o=l[0]&2?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,n=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){e.label=l[1];break}if(l[0]===6&&e.label<o[1]){e.label=o[1],o=l;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(l);break}o[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(i,e)}catch(u){l=[6,u],n=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ge=(function(){function i(){}return i.getMediaType=function(t){return t=t.toLowerCase(),t=t.split(";")[0],t.trim()},i.getImageQuality=function(t){return t===ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1||t===ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2||t===ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1||t===ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2||t===ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1||t===ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2||t===ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1||t===ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2||t===ve.ServiceProfile.IMAGE_1_LEVEL_1||t===ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1||t===ve.ServiceProfile.IMAGE_1_LEVEL_2||t===ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2?"native":"default"},i.getInexactLocale=function(t){return t.indexOf("-")!==-1?t.substr(0,t.indexOf("-")):t},i.getLocalisedValue=function(t,e){if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++){var n=t[r],o=n["@language"];if(e===o)return n["@value"]}for(var a=e.substr(0,e.indexOf("-")),r=0;r<t.length;r++){var s=t[r],c=s["@language"];if(c===a)return s["@value"]}return null},i.generateTreeNodeIds=function(t,e){e===void 0&&(e=0);var r;t.parentNode?r=t.parentNode.id+"-"+e:r="0",t.id=r;for(var n=0;n<t.nodes.length;n++){var o=t.nodes[n];i.generateTreeNodeIds(o,n)}},i.normaliseType=function(t){if(t=(t||"").toLowerCase(),t.indexOf(":")!==-1){var e=t.split(":");return e[1]}return t},i.normaliseUrl=function(t){return t=t.substr(t.indexOf("://")),t.indexOf("#")!==-1&&(t=t.split("#")[0]),t},i.normalisedUrlsMatch=function(t,e){return i.normaliseUrl(t)===i.normaliseUrl(e)},i.isImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},i.isImageServiceType=function(t){return t!==null&&t.toLowerCase()===ve.ServiceType.IMAGE_SERVICE_2.toLowerCase()||t===ve.ServiceType.IMAGE_SERVICE_3.toLowerCase()},i.isLevel0ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_0)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0))},i.isLevel1ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_1)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1))},i.isLevel2ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_LEVEL_2)||i.normalisedUrlsMatch(t,ve.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},i.parseManifest=function(t,e){return uu.parse(t,e)},i.checkStatus=function(t){if(t.ok)return t;var e=new Error(t.statusText);return e.response=t,Promise.reject(e)},i.loadManifest=function(t){return new Promise(function(e,r){fetch(t).then(i.checkStatus).then(function(n){return n.json()}).then(function(n){e(n)}).catch(function(n){r()})})},i.loadExternalResourcesAuth1=function(t,e,r,n,o,a,s,c){return new Promise(function(l,u){var h=t.map(function(f){return i.loadExternalResourceAuth1(f,e,r,n,o,a,s,c)});Promise.all(h).then(function(){l(t)}).catch(function(f){u(f)})})},i.loadExternalResourceAuth1=function(t,e,r,n,o,a,s,c){return us(this,void 0,void 0,function(){var l;return hs(this,function(u){switch(u.label){case 0:return[4,n(t)];case 1:return l=u.sent(),l?[4,t.getData(l)]:[3,6];case 2:return u.sent(),t.status!==ar.OK?[3,3]:[2,t];case 3:return[4,i.doAuthChain(t,e,r,o,a,s,c)];case 4:u.sent(),u.label=5;case 5:if(t.status===ar.OK||t.status===ar.MOVED_TEMPORARILY)return[2,t];throw i.createAuthorizationFailedError();case 6:return[4,t.getData()];case 7:return u.sent(),t.status===ar.MOVED_TEMPORARILY||t.status===ar.UNAUTHORIZED?[4,i.doAuthChain(t,e,r,o,a,s,c)]:[3,9];case 8:u.sent(),u.label=9;case 9:if(t.status===ar.OK||t.status===ar.MOVED_TEMPORARILY)return[2,t];throw i.createAuthorizationFailedError()}})})},i.doAuthChain=function(t,e,r,n,o,a,s){return us(this,void 0,void 0,function(){var c,l,u,h,f,v,_,d,d;return hs(this,function(g){switch(g.label){case 0:return t.isAccessControlled()?(c=t.externalService,c&&(c.options=t.options),l=t.kioskService,l&&(l.options=t.options),u=t.clickThroughService,u&&(u.options=t.options),h=t.loginService,h&&(h.options=t.options),!t.isResponseHandled&&t.status===ar.MOVED_TEMPORARILY?[4,a(t)]:[3,2]):[2,t];case 1:return g.sent(),[2,t];case 2:return f=null,v=null,f=c,f?(v=f,[4,i.attemptResourceWithToken(t,r,f)]):[3,4];case 3:return g.sent(),[2,t];case 4:return f=l,f?(v=f,_=e(f),_?[4,n(_)]:[3,7]):[3,7];case 5:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 6:return g.sent(),[2,t];case 7:return f=u,f?(v=f,[4,o(t,f)]):[3,11];case 8:return d=g.sent(),d?[4,n(d)]:[3,11];case 9:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 10:return g.sent(),[2,t];case 11:return f=h,f?(v=f,[4,o(t,f)]):[3,15];case 12:return d=g.sent(),d?[4,n(d)]:[3,15];case 13:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 14:return g.sent(),[2,t];case 15:return v&&s(t,v),[2]}})})},i.attemptResourceWithToken=function(t,e,r){return us(this,void 0,void 0,function(){var n,o;return hs(this,function(a){switch(a.label){case 0:return n=r.getService(ve.ServiceProfile.AUTH_1_TOKEN),n?[4,e(t,n)]:[3,3];case 1:return o=a.sent(),o&&o.accessToken?[4,t.getData(o)]:[3,3];case 2:return a.sent(),[2,t];case 3:return[2]}})})},i.loadExternalResourcesAuth09=function(t,e,r,n,o,a,s,c,l,u){return new Promise(function(h,f){var v=t.map(function(_){return i.loadExternalResourceAuth09(_,e,r,n,o,a,s,c,l,u)});Promise.all(v).then(function(){h(t)}).catch(function(_){f(_)})})},i.loadExternalResourceAuth09=function(t,e,r,n,o,a,s,c,l,u){return new Promise(function(h,f){u&&u.pessimisticAccessControl?t.getData().then(function(){t.isAccessControlled()?t.clickThroughService?(h(r(t)),h(n(t))):o(t).then(function(){a(t,!0).then(function(v){t.getData(v).then(function(){h(l(t))}).catch(function(_){f(i.createInternalServerError(_))})}).catch(function(v){f(i.createInternalServerError(v))})}).catch(function(v){f(i.createInternalServerError(v))}):h(t)}).catch(function(v){f(i.createInternalServerError(v))}):c(t,e).then(function(v){v?t.getData(v).then(function(){t.status===ar.OK?h(l(t)):i.authorize(t,e,r,n,o,a,s,c).then(function(){h(l(t))}).catch(function(_){f(i.createAuthorizationFailedError())})}).catch(function(_){f(i.createAuthorizationFailedError())}):i.authorize(t,e,r,n,o,a,s,c).then(function(){h(l(t))}).catch(function(_){f(i.createAuthorizationFailedError())})}).catch(function(v){f(i.createAuthorizationFailedError())})})},i.createError=function(t,e){var r=new Error;return r.message=e,r.name=String(t),r},i.createAuthorizationFailedError=function(){return i.createError(wn.AUTHORIZATION_FAILED,"Authorization failed")},i.createRestrictedError=function(){return i.createError(wn.RESTRICTED,"Restricted")},i.createInternalServerError=function(t){return i.createError(wn.INTERNAL_SERVER_ERROR,t)},i.authorize=function(t,e,r,n,o,a,s,c){return new Promise(function(l,u){t.getData().then(function(){t.isAccessControlled()?c(t,e).then(function(h){h?t.getData(h).then(function(){t.status===ar.OK?l(t):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)}).catch(function(f){u(i.createInternalServerError(f))}):a(t,!1).then(function(f){f?s(t,f,e).then(function(){t.getData(f).then(function(){t.status===ar.OK?l(t):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)}).catch(function(v){u(i.createInternalServerError(v))})}).catch(function(v){u(i.createInternalServerError(v))}):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)})}).catch(function(h){u(i.createInternalServerError(h))}):l(t)})})},i.showAuthInteraction=function(t,e,r,n,o,a,s,c,l){t.status===ar.MOVED_TEMPORARILY&&!t.isResponseHandled?c(t):t.clickThroughService&&!t.isResponseHandled?r(t).then(function(){a(t,!0).then(function(u){s(t,u,e).then(function(){t.getData(u).then(function(){c(t)}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(u){l(i.createInternalServerError(u))})}):o(t).then(function(){a(t,!0).then(function(u){s(t,u,e).then(function(){t.getData(u).then(function(){c(t)}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(u){l(i.createInternalServerError(u))})})},i.getService=function(t,e){for(var r=this.getServices(t),n=0;n<r.length;n++){var o=r[n];if(o.getProfile()===e)return o}return null},i.getResourceById=function(t,e){return i.traverseAndFind(t.__jsonld,"@id",e)},i.traverseAndFind=function(t,e,r){if(t.hasOwnProperty(e)&&t[e]===r)return t;for(var n=0;n<Object.keys(t).length;n++)if(typeof t[Object.keys(t)[n]]=="object"){var o=i.traverseAndFind(t[Object.keys(t)[n]],e,r);if(o!=null)return o}},i.getServices=function(t,e){var r=e===void 0?{}:e,n=r.onlyService,o=n===void 0?!1:n,a=r.onlyServices,s=a===void 0?!1:a,c=r.skipParentResources,l=c===void 0?!1:c,u=[];!l&&t&&t.options&&t.options.resource&&t.options.resource!==t&&u.push.apply(u,i.getServices(t.options.resource,{onlyServices:!0}));var h=s?[]:(t.__jsonld||t).service||[];if(Array.isArray(h)||(h=[h]),o||h.push.apply(h,(t.__jsonld||t).services||[]),h.length===0)return u;for(var f=0;f<h.length;f++){var v=h[f];if(typeof v=="string"){var _=this.getResourceById(t.options.resource,v);_&&u.push(new hu(_.__jsonld||_,t.options))}else u.push(new hu(v,t.options))}return u},i.getTemporalComponent=function(t){var e=/t=([^&]+)/g.exec(t),r=null;return e&&e[1]&&(r=e[1].split(",")),r},i})(),Sg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ui=(function(){function i(t,e,r){r===void 0&&(r="none"),Array.isArray(t)&&t.length===1?this._value=t[0]:this._value=t,(e==="none"||e==="@none")&&(e=void 0),this._locale=e,this._defaultLocale=r}return i.parseV2Value=function(t,e){return typeof t=="string"?new i(t,void 0,e):t["@value"]?new i(t["@value"],t["@language"],e):null},Object.defineProperty(i.prototype,"value",{get:function(){return Array.isArray(this._value)?this._value.join("<br/>"):this._value},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"locale",{get:function(){return this._locale===void 0?this._defaultLocale:this._locale},enumerable:!1,configurable:!0}),i.prototype.addValue=function(t){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(t)?this._value=this._value.concat(t):this._value.push(t)},i})(),sr=(function(i){Sg(t,i);function t(e,r){e===void 0&&(e=[]);var n=i.apply(this,e)||this;return n.__proto__=t.prototype,n._defaultLocale=r,n}return t.parse=function(e,r){if(!e)return new t([],r);if(Array.isArray(e)){var n=e.map(function(a){return Ui.parseV2Value(a,r)}).filter(function(a){return a!==null}),o=n.reduce(function(a,s){var c=s._locale;return c||(c="none"),a[c]?a[c].addValue(s._value):a[c]=s,a},{});return new t(Object.values(o),r)}else{if(typeof e=="string")return new t([new Ui(e,void 0,r)],r);if(e["@language"]){var n=Ui.parseV2Value(e);return new t(n!==null?[n]:[],r)}else if(e["@value"]){var n=Ui.parseV2Value(e);return new t(n!==null?[n]:[],r)}else return new t(Object.keys(e).map(function(a){var s=e[a];if(!Array.isArray(s))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new Ui(s,a,r)}),r)}},t.prototype.getSuitableLocale=function(e){for(var r=Array.from(this.values()).map(function(v){return v._locale}).filter(function(v){return v!==void 0}),n=function(v){var _=r.find(function(d){return d===v});if(_)return{value:_}},o=0,a=e;o<a.length;o++){var s=a[o],c=n(s);if(typeof c=="object")return c.value}for(var l=function(v){var _=r.find(function(d){return Ge.getInexactLocale(d)===Ge.getInexactLocale(v)});if(_)return{value:_}},u=0,h=e;u<h.length;u++){var s=h[u],f=l(s);if(typeof f=="object")return f.value}},t.prototype.setValue=function(e,r){var n=void 0;if(!r)n=this.find(function(a){return a._locale===void 0});else{var o=this.getSuitableLocale([r]);o&&(n=this.find(function(a){return a._locale===o}))}n?n._value=e:this.push(new Ui(e,r,this._defaultLocale))},t.prototype.getValue=function(e,r){var n=this.getValues(e);return n.length===0?null:r?n.join(r):n[0]},t.prototype.getValues=function(e){if(!this.length)return[];var r;if(e?Array.isArray(e)?r=e:r=[e]:r=[],this.length===1&&this[0]._locale===void 0){var n=this[0]._value;return Array.isArray(n)?n:[n]}var o=this.getSuitableLocale(r);if(o){var n=this.find(function(l){return l._locale===o})._value;return Array.isArray(n)?n:[n]}var a=!this.find(function(c){return c._locale===void 0});if(a){var n=this[0]._value;return Array.isArray(n)?n:[n]}var s=this.find(function(c){return c._locale===void 0});return s?Array.isArray(s._value)?s._value:[s._value]:[]},t})(Array),Cg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Pg=(function(i){Cg(t,i);function t(e,r){var n=i.call(this,e,r)||this;if(n.index=0,n._allRanges=null,n.items=[],n._topRanges=[],n.__jsonld.structures&&n.__jsonld.structures.length)for(var o=n._getTopRanges(),a=0;a<o.length;a++){var s=o[a];n._parseRanges(s,String(a))}return n}return t.prototype.getPosterCanvas=function(){var e=this.getProperty("posterCanvas");return e&&(e=new jo(e,this.options)),e},t.prototype.getAccompanyingCanvas=function(){var e=this.getProperty("accompanyingCanvas");return e&&(e=new jo(e,this.options)),e},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){if(i.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Ge.normaliseType(Rr.MANIFEST),!this.isLoaded)return this.defaultTree;var e=this.getTopRanges();return e.length&&e[0].getTree(this.defaultTree),Ge.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._getTopRanges=function(){var e=[];if(this.__jsonld.structures&&this.__jsonld.structures.length){for(var r=0;r<this.__jsonld.structures.length;r++){var n=this.__jsonld.structures[r];n.viewingHint===ve.ViewingHint.TOP&&e.push(n)}if(!e.length){var o={};o.ranges=this.__jsonld.structures,e.push(o)}}return e},t.prototype.getTopRanges=function(){return this._topRanges},t.prototype._getRangeById=function(e){if(this.__jsonld.structures&&this.__jsonld.structures.length)for(var r=0;r<this.__jsonld.structures.length;r++){var n=this.__jsonld.structures[r];if(n["@id"]===e||n.id===e)return n}return null},t.prototype._parseRanges=function(e,r,n){var o=null;if(typeof e=="string"&&(o=e,e=this._getRangeById(o)),!e){console.warn("Range:",o,"does not exist");return}var a=new Rg(e,this.options);a.parentRange=n,a.path=r,n?n.items.push(a):this._topRanges.push(a);var s=e.items||e.members;if(s)for(var c=0;c<s.length;c++){var l=s[c];if(l["@type"]&&l["@type"].toLowerCase()==="sc:range"||l.type&&l.type.toLowerCase()==="range")this._parseRanges(l,r+"/"+c,a);else if(l["@type"]&&l["@type"].toLowerCase()==="sc:canvas"||l.type&&l.type.toLowerCase()==="canvas"){a.canvases||(a.canvases=[]);var u=l.id||l["@id"];a.canvases.push(u)}}else if(e.ranges)for(var c=0;c<e.ranges.length;c++)this._parseRanges(e.ranges[c],r+"/"+c,a)},t.prototype.getAllRanges=function(){if(this._allRanges!=null)return this._allRanges;this._allRanges=[];for(var e=this.getTopRanges(),r=function(a){var s=e[a];s.id&&n._allRanges.push(s);var c=function(u,h){u.add(h);var f=h.getRanges();return f.length?f.reduce(c,u):u},l=Array.from(s.getRanges().reduce(c,new Set));n._allRanges=n._allRanges.concat(l)},n=this,o=0;o<e.length;o++)r(o);return this._allRanges},t.prototype.getRangeById=function(e){for(var r=this.getAllRanges(),n=0;n<r.length;n++){var o=r[n];if(o.id===e)return o}return null},t.prototype.getRangeByPath=function(e){for(var r=this.getAllRanges(),n=0;n<r.length;n++){var o=r[n];if(o.path===e)return o}return null},t.prototype.getSequences=function(){if(this.items.length)return this.items;var e=this.__jsonld.mediaSequences||this.__jsonld.sequences;if(e)for(var r=0;r<e.length;r++){var n=e[r],o=new cu(n,this.options);this.items.push(o)}else if(this.__jsonld.items){var o=new cu(this.__jsonld.items,this.options);this.items.push(o)}return this.items},t.prototype.getSequenceByIndex=function(e){return this.getSequences()[e]},t.prototype.getTotalSequences=function(){return this.getSequences().length},t.prototype.getManifestType=function(){var e=this.getService(ve.ServiceProfile.UI_EXTENSIONS);return e?e.getProperty("manifestType"):ds.EMPTY},t.prototype.isMultiSequence=function(){return this.getTotalSequences()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===ve.ViewingHint.PAGED;var r=this.getBehavior();return r?r===ve.Behavior.PAGED:!1},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t})(Bc),ds;(function(i){i.EMPTY="",i.MANUSCRIPT="manuscript",i.MONOGRAPH="monograph"})(ds||(ds={}));var Ag=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Rg=(function(i){Ag(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n._ranges=null,n.canvases=null,n.items=[],n}return 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=[],r=[],n=0,o=this.canvases;n<o.length;n++){var a=o[n];if(a){var s=a.match(/(.*)#t=([0-9.]+),?([0-9.]+)?/)||[void 0,a],c=s[1],l=s[2],u=s[3];c&&(e.push(parseFloat(l)),r.push(parseFloat(u)))}}if(e.length&&r.length)return new ls(Math.min.apply(Math,e),Math.max.apply(Math,r))}else{for(var h=this.getRanges(),e=[],r=[],f=0,v=h;f<v.length;f++){var _=v[f],d=_.getDuration();d&&(e.push(d.start),r.push(d.end))}if(e.length&&r.length)return new ls(Math.min.apply(Math,e),Math.max.apply(Math,r))}var g,y;if(this.canvases&&this.canvases.length)for(var S=0;S<this.canvases.length;S++){var a=this.canvases[S],P=Ge.getTemporalComponent(a);P&&P.length>1&&(S===0&&(g=Number(P[0])),S===this.canvases.length-1&&(y=Number(P[1])))}else for(var h=this.getRanges(),S=0;S<h.length;S++){var _=h[S],d=_.getDuration();d&&(S===0&&(g=d.start),S===h.length-1&&(y=d.end))}if(g!==void 0&&y!==void 0)return new ls(g,y)},t.prototype.getRanges=function(){return this._ranges?this._ranges:this._ranges=this.items.filter(function(e){return e.isRange()})},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getTree=function(e){e.data=this,this.treeNode=e;var r=this.getRanges();if(r&&r.length)for(var n=0;n<r.length;n++){var o=r[n],a=new fs;e.addNode(a),this._parseTreeNode(a,o)}return Ge.generateTreeNodeIds(e),e},t.prototype.spansTime=function(e){var r=this.getDuration();return!!(r&&e>=r.start&&e<=r.end)},t.prototype._parseTreeNode=function(e,r){e.label=r.getLabel().getValue(this.options.locale),e.data=r,e.data.type=Ge.normaliseType(Rr.RANGE),r.treeNode=e;var n=r.getRanges();if(n&&n.length)for(var o=0;o<n.length;o++){var a=n[o],s=a.getBehavior();if(s!==ve.Behavior.NO_NAV){var c=new fs;e.addNode(c),this._parseTreeNode(c,a)}}},t})(Br),Ig=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Mg=(function(i){Ig(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){return this.getProperty("format")},t})(Br),Og=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),cu=(function(i){Og(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.items=[],n._thumbnails=null,n}return t.prototype.getCanvases=function(){if(this.items.length)return this.items;var e=this.__jsonld.canvases||this.__jsonld.elements;if(e)for(var r=0;r<e.length;r++){var n=e[r],o=new jo(n,this.options);o.index=r,this.items.push(o)}else if(this.__jsonld)for(var r=0;r<this.__jsonld.length;r++){var n=this.__jsonld[r],o=new jo(n,this.options);o.index=r,this.items.push(o)}return this.items},t.prototype.getCanvasById=function(e){for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r),o=Ge.normaliseUrl(n.id);if(Ge.normaliseUrl(e)===o)return n}return null},t.prototype.getCanvasByIndex=function(e){return this.getCanvases()[e]},t.prototype.getCanvasIndexById=function(e){for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r);if(n.id===e)return r}return null},t.prototype.getCanvasIndexByLabel=function(e,r){e=e.trim(),isNaN(e)||(e=parseInt(e,10).toString(),r&&(e+="r"));for(var n=/(\d*)\D+(\d*)/,o,a,s,c,l,u=0;u<this.getTotalCanvases();u++){var h=this.getCanvasByIndex(u);if(h.getLabel().getValue(this.options.locale)===e)return u;if(o=n.exec(e),!!o&&(c=o[1],l=o[2],!!l&&(s="^"+c+"\\D+"+l+"$",a=new RegExp(s),a.test(h.getLabel().toString()))))return u}return-1},t.prototype.getLastCanvasLabel=function(e){for(var r=this.getTotalCanvases()-1;r>=0;r--){var n=this.getCanvasByIndex(r),o=n.getLabel().getValue(this.options.locale);if(e){var a=/^[a-zA-Z0-9]*$/;if(a.test(o))return o}else if(o)return o}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(e,r){var n;if(r){var o=this.getPagedIndices(e),a=this.getViewingDirection();a&&a===ve.ViewingDirection.RIGHT_TO_LEFT?n=o[0]+1:n=o[o.length-1]+1}else n=e+1;return n>this.getLastPageIndex()?-1:n},t.prototype.getPagedIndices=function(e,r){var n=[];if(!r)n.push(e);else{this.isFirstCanvas(e)||this.isLastCanvas(e)?n=[e]:e%2?n=[e,e+1]:n=[e-1,e];var o=this.getViewingDirection();o&&o===ve.ViewingDirection.RIGHT_TO_LEFT&&(n=n.reverse())}return n},t.prototype.getPrevPageIndex=function(e,r){var n;if(r){var o=this.getPagedIndices(e),a=this.getViewingDirection();a&&a===ve.ViewingDirection.RIGHT_TO_LEFT?n=o[o.length-1]-1:n=o[0]-1}else n=e-1;return n},t.prototype.getStartCanvasIndex=function(){var e=this.getStartCanvas();if(e)for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r);if(n.id===e)return r}return 0},t.prototype.getThumbs=function(e,r){for(var n=[],o=this.getTotalCanvases(),a=0;a<o;a++){var s=this.getCanvasByIndex(a),c=new zg(e,s);n.push(c)}return n},t.prototype.getThumbnails=function(){if(this._thumbnails!=null)return this._thumbnails;this._thumbnails=[];for(var e=this.getCanvases(),r=0;r<e.length;r++){var n=e[r].getThumbnail();n&&this._thumbnails.push(n)}return this._thumbnails},t.prototype.getStartCanvas=function(){return this.getProperty("startCanvas")},t.prototype.getTotalCanvases=function(){return this.getCanvases().length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):this.options.resource.getViewingDirection?this.options.resource.getViewingDirection():null},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.isCanvasIndexOutOfRange=function(e){return e>this.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(e){return e===0},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===ve.ViewingHint.PAGED:!1},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2===0},t})(Br),uu=(function(){function i(){}return i.parse=function(t,e){return typeof t=="string"&&(t=JSON.parse(t)),this.parseJson(t,e)},i.parseJson=function(t,e){var r;if(e&&e.navDate&&!isNaN(e.navDate.getTime())&&(t.navDate=e.navDate.toString()),t["@type"])switch(t["@type"]){case"sc:Collection":r=this.parseCollection(t,e);break;case"sc:Manifest":r=this.parseManifest(t,e);break;default:return null}else switch(t.type){case"Collection":r=this.parseCollection(t,e);break;case"Manifest":r=this.parseManifest(t,e);break;default:return null}return r.isLoaded=!0,r},i.parseCollection=function(t,e){var r=new yg(t,e);return e?(r.index=e.index||0,e.resource&&(r.parentCollection=e.resource.parentCollection)):r.index=0,this.parseCollections(r,e),this.parseManifests(r,e),this.parseItems(r,e),r},i.parseCollections=function(t,e){var r;if(t.__jsonld.collections?r=t.__jsonld.collections:t.__jsonld.items&&(r=t.__jsonld.items.filter(function(a){return a.type.toLowerCase()==="collection"})),r)for(var n=0;n<r.length;n++){e&&(e.index=n);var o=this.parseCollection(r[n],e);o.index=n,o.parentCollection=t,t.items.push(o)}},i.parseManifest=function(t,e){var r=new Pg(t,e);return r},i.parseManifests=function(t,e){var r;if(t.__jsonld.manifests?r=t.__jsonld.manifests:t.__jsonld.items&&(r=t.__jsonld.items.filter(function(a){return a.type.toLowerCase()==="manifest"})),r)for(var n=0;n<r.length;n++){var o=this.parseManifest(r[n],e);o.index=n,o.parentCollection=t,t.items.push(o)}},i.parseItem=function(t,e){if(t["@type"]){if(t["@type"].toLowerCase()==="sc:manifest")return this.parseManifest(t,e);if(t["@type"].toLowerCase()==="sc:collection")return this.parseCollection(t,e)}else if(t.type){if(t.type.toLowerCase()==="manifest")return this.parseManifest(t,e);if(t.type.toLowerCase()==="collection")return this.parseCollection(t,e)}return null},i.parseItems=function(t,e){var r=t.__jsonld.members||t.__jsonld.items;if(r)for(var n=function(c){e&&(e.index=c);var l=o.parseItem(r[c],e);if(!l)return{value:void 0};if(t.items.filter(function(u){return u.id===l.id})[0])return"continue";l.index=c,l.parentCollection=t,t.items.push(l)},o=this,a=0;a<r.length;a++){var s=n(a);if(typeof s=="object")return s.value}},i})(),Dg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),hu=(function(i){Dg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getProfile=function(){var e=this.getProperty("profile");return e||(e=this.getProperty("dcterms:conformsTo")),Array.isArray(e)?e[0]:e},t.prototype.getConfirmLabel=function(){return Ge.getLocalisedValue(this.getProperty("confirmLabel"),this.options.locale)},t.prototype.getDescription=function(){return Ge.getLocalisedValue(this.getProperty("description"),this.options.locale)},t.prototype.getFailureDescription=function(){return Ge.getLocalisedValue(this.getProperty("failureDescription"),this.options.locale)},t.prototype.getFailureHeader=function(){return Ge.getLocalisedValue(this.getProperty("failureHeader"),this.options.locale)},t.prototype.getHeader=function(){return Ge.getLocalisedValue(this.getProperty("header"),this.options.locale)},t.prototype.getServiceLabel=function(){return Ge.getLocalisedValue(this.getProperty("label"),this.options.locale)},t.prototype.getInfoUri=function(){var e=this.id;return e.endsWith("/")||(e+="/"),e+="info.json",e},t})(Br),Lg=(function(){function i(t,e){this.width=t,this.height=e}return i})(),wn;(function(i){i[i.AUTHORIZATION_FAILED=1]="AUTHORIZATION_FAILED",i[i.FORBIDDEN=2]="FORBIDDEN",i[i.INTERNAL_SERVER_ERROR=3]="INTERNAL_SERVER_ERROR",i[i.RESTRICTED=4]="RESTRICTED"})(wn||(wn={}));var zg=(function(){function i(t,e){this.data=e,this.index=e.index,this.width=t;var r=e.getHeight()/e.getWidth();r?this.height=Math.floor(this.width*r):this.height=t,this.uri=e.getCanonicalImageUri(t),this.label=e.getLabel().getValue(),this.viewingHint=e.getViewingHint()}return i})(),Hg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ng=(function(i){Hg(t,i);function t(e,r){return i.call(this,e,r)||this}return t})(Ga),fs=(function(){function i(t,e){this.label=t,this.data=e||{},this.nodes=[]}return i.prototype.addNode=function(t){this.nodes.push(t),t.parentNode=this},i.prototype.isCollection=function(){return this.data.type===Ge.normaliseType(Rr.COLLECTION)},i.prototype.isManifest=function(){return this.data.type===Ge.normaliseType(Rr.MANIFEST)},i.prototype.isRange=function(){return this.data.type===Ge.normaliseType(Rr.RANGE)},i})(),Rr;(function(i){i.COLLECTION="collection",i.MANIFEST="manifest",i.RANGE="range"})(Rr||(Rr={}));var Fg=function(i,t){return Ge.parseManifest(i,t)};class Bg{constructor(){be(this,Cn,Pe(xt({})));nt(this,"userAnnotations",new _n)}get manifests(){return p(R(this,Cn))}set manifests(t){xe(R(this,Cn),t,!0)}userAnnotationKey(t,e){return`${t}::${e}`}setUserAnnotations(t,e,r){const n=this.userAnnotationKey(t,e);this.userAnnotations.set(n,r)}clearUserAnnotations(t,e){const r=this.userAnnotationKey(t,e);this.userAnnotations.has(r)&&this.userAnnotations.delete(r)}getUserAnnotations(t,e){const r=this.userAnnotationKey(t,e);return this.userAnnotations.get(r)??[]}async fetchManifest(t){if(!this.manifests[t]){this.manifests[t]={isFetching:!0};try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=await e.json(),n=Fg(r);this.manifests[t]={json:r,manifesto:n,isFetching:!1}}catch(e){this.manifests[t]={error:e.message,isFetching:!1}}}}getManifest(t){const e=this.manifests[t];return e==null?void 0:e.manifesto}getManifestEntry(t){return this.manifests[t]}async fetchAnnotationList(t){if(!this.manifests[t])try{const e=await fetch(t);if(e.ok){const r=await e.json();this.manifests[t]={json:r}}else console.error(`Failed to fetch annotation list: ${t}`)}catch(e){console.error(`Error fetching annotation list: ${t}`,e)}}getCanvases(t){const e=this.getManifest(t);if(!e)return[];const r=e.getSequences();return!r||!r.length?[]:r[0].getCanvases()}getAnnotations(t,e){const r=this.manualGetAnnotations(t,e),n=this.getUserAnnotations(t,e);return[...r,...n]}manualGetAnnotations(t,e){const r=this.getManifest(t);if(!r)return[];const n=r.getSequences()[0].getCanvasById(e);if(!n)return[];const o=n.__jsonld,a=[],s=c=>c.resources||c.items||[];return o.otherContent&&o.otherContent.forEach(c=>{const l=c["@id"]||c.id;if(l&&!c.resources){const u=this.manifests[l];if(u){if(u.json){const h=s(u.json);a.push(...h)}}else this.fetchAnnotationList(l)}else c.resources&&a.push(...c.resources)}),o.annotations&&o.annotations.forEach(c=>{const l=c.id||c["@id"];if(l&&!c.items){const u=this.manifests[l];if(u){if(u.json){const h=s(u.json);a.push(...h)}}else this.fetchAnnotationList(l)}else c.items&&a.push(...c.items)}),a}}Cn=new WeakMap;const $r=new Bg;class Vg{constructor(t=null,e=null,r=[]){be(this,Pn,Pe(null));be(this,An,Pe(null));be(this,Rn,Pe(!1));be(this,In,Pe(!1));be(this,Mn,Pe(!1));be(this,On,Pe(!1));be(this,Dn,Pe(!1));be(this,Ln,Pe(!1));be(this,zn,Pe(!1));be(this,Hn,Pe("bottom"));nt(this,"visibleAnnotationIds",new No);be(this,Nn,Pe(xt({})));be(this,Fn,Pe("individuals"));be(this,Bn,Pe(1));be(this,Vn,Pe(xt({x:20,y:100})));be(this,jn,Pe(xt({width:300,height:400})));be(this,Un,Pe(!1));be(this,Gn,Pe(xt({x:0,y:0})));be(this,Zn,Pe(null));be(this,Wn,Pe(null));nt(this,"eventTarget",null);nt(this,"viewerElement",null);be(this,qn,Pe(""));be(this,Xn,Pe(null));be(this,Yn,Pe(xt([])));be(this,Kn,Pe(!1));be(this,Qn,Pe(!1));be(this,Jn,Pe(xt([])));be(this,$n,Pe(xt([])));be(this,eo,Pe(xt([])));be(this,to,Pe(null));nt(this,"pluginEventHandlers",new _n);this.manifestId=t||null,this.canvasId=e||null,this.manifestId&&$r.fetchManifest(this.manifestId);for(const n of r)this.registerPlugin(n)}get manifestId(){return p(R(this,Pn))}set manifestId(t){xe(R(this,Pn),t,!0)}get canvasId(){return p(R(this,An))}set canvasId(t){xe(R(this,An),t,!0)}get showAnnotations(){return p(R(this,Rn))}set showAnnotations(t){xe(R(this,Rn),t,!0)}get showThumbnailGallery(){return p(R(this,In))}set showThumbnailGallery(t){xe(R(this,In),t,!0)}get toolbarOpen(){return p(R(this,Mn))}set toolbarOpen(t){xe(R(this,Mn),t,!0)}get isGalleryDockedBottom(){return p(R(this,On))}set isGalleryDockedBottom(t){xe(R(this,On),t,!0)}get isGalleryDockedRight(){return p(R(this,Dn))}set isGalleryDockedRight(t){xe(R(this,Dn),t,!0)}get isFullScreen(){return p(R(this,Ln))}set isFullScreen(t){xe(R(this,Ln),t,!0)}get showMetadataDialog(){return p(R(this,zn))}set showMetadataDialog(t){xe(R(this,zn),t,!0)}get dockSide(){return p(R(this,Hn))}set dockSide(t){xe(R(this,Hn),t,!0)}get config(){return p(R(this,Nn))}set config(t){xe(R(this,Nn),t,!0)}get showToggle(){return this.config.showToggle??!0}get showCanvasNav(){return this.config.showCanvasNav??!0}get showZoomControls(){return this.config.showZoomControls??!0}get galleryFixedHeight(){var t;return((t=this.config.gallery)==null?void 0:t.fixedHeight)??120}get _viewingMode(){return p(R(this,Fn))}set _viewingMode(t){xe(R(this,Fn),t,!0)}get viewingMode(){return this._viewingMode}set viewingMode(t){this._viewingMode=t,this.config.viewingMode=t}get pagedOffset(){return p(R(this,Bn))}set pagedOffset(t){xe(R(this,Bn),t,!0)}get galleryPosition(){return p(R(this,Vn))}set galleryPosition(t){xe(R(this,Vn),t,!0)}get gallerySize(){return p(R(this,jn))}set gallerySize(t){xe(R(this,jn),t,!0)}get isGalleryDragging(){return p(R(this,Un))}set isGalleryDragging(t){xe(R(this,Un),t,!0)}get galleryDragOffset(){return p(R(this,Gn))}set galleryDragOffset(t){xe(R(this,Gn),t,!0)}get dragOverSide(){return p(R(this,Zn))}set dragOverSide(t){xe(R(this,Zn),t,!0)}get galleryCenterPanelRect(){return p(R(this,Wn))}set galleryCenterPanelRect(t){xe(R(this,Wn),t,!0)}setEventTarget(t){this.eventTarget=t}getSnapshot(){let t=-1;return this.manifestId&&this.canvasId&&(t=$r.getCanvases(this.manifestId).findIndex(r=>(r.id||r["@id"]||(r.getCanvasId?r.getCanvasId():null)||(r.getId?r.getId():null))===this.canvasId)),{manifestId:this.manifestId,canvasId:this.canvasId,currentCanvasIndex:t,showAnnotations:this.showAnnotations,showThumbnailGallery:this.showThumbnailGallery,showSearchPanel:this.showSearchPanel,toolbarOpen:this.toolbarOpen,searchQuery:this.searchQuery,isFullScreen:this.isFullScreen,dockSide:this.dockSide,viewingMode:this.viewingMode,galleryPosition:this.galleryPosition,gallerySize:this.gallerySize}}dispatchStateChange(t="statechange"){console.log(`[ViewerState] Dispatching ${t}`,JSON.stringify(this.getSnapshot())),this.eventTarget&&queueMicrotask(()=>{var e;(e=this.eventTarget)==null||e.dispatchEvent(new CustomEvent(t,{detail:this.getSnapshot(),bubbles:!0,composed:!0}))})}get manifest(){return this.manifestId?$r.getManifest(this.manifestId):null}get manifestEntry(){return this.manifestId?$r.getManifestEntry(this.manifestId):null}get canvases(){return this.manifestId?$r.getCanvases(this.manifestId):[]}get currentCanvasIndex(){return this.canvasId?this.canvases.findIndex(t=>(t.id||t["@id"]||(t.getCanvasId?t.getCanvasId():null)||(t.getId?t.getId():null))===this.canvasId):this.canvases.length>0?0:-1}get hasNext(){if(this.viewingMode==="paged"){const t=this.pagedOffset;return this.currentCanvasIndex<t?this.currentCanvasIndex<this.canvases.length-1:this.currentCanvasIndex<this.canvases.length-2}else return this.currentCanvasIndex<this.canvases.length-1}get hasPrevious(){return this.currentCanvasIndex>0}nextCanvas(){if(this.hasNext)if(this.viewingMode==="paged"){const t=this.pagedOffset,e=this.currentCanvasIndex<t?this.currentCanvasIndex+1:this.currentCanvasIndex+2,r=this.canvases[e];this.setCanvas(r.id)}else{const t=this.currentCanvasIndex+1,e=this.canvases[t];this.setCanvas(e.id)}}previousCanvas(){if(this.hasPrevious)if(this.viewingMode==="paged"){const t=this.pagedOffset;let e;this.currentCanvasIndex<=t?e=this.currentCanvasIndex-1:e=Math.max(this.currentCanvasIndex-2,t);const r=this.canvases[e];this.setCanvas(r.id)}else{const t=this.currentCanvasIndex-1,e=this.canvases[t];this.setCanvas(e.id)}}zoomIn(){this.osdViewer&&this.osdViewer.viewport&&(this.osdViewer.viewport.zoomBy(1.2),this.osdViewer.viewport.applyConstraints())}zoomOut(){this.osdViewer&&this.osdViewer.viewport&&(this.osdViewer.viewport.zoomBy(.8),this.osdViewer.viewport.applyConstraints())}setManifest(t){this.manifestId=t,this.canvasId=null,$r.fetchManifest(t),this.dispatchStateChange("manifestchange")}setCanvas(t){this.canvasId=t,this.dispatchStateChange("canvaschange")}updateConfig(t){var r;const e=this.config;if(this.config=t,t.toolbarOpen!==void 0&&(this.toolbarOpen=t.toolbarOpen),t.viewingMode&&(this.viewingMode=t.viewingMode),t.pagedViewOffset!==void 0&&(this.pagedOffset=t.pagedViewOffset?1:0),t.gallery&&(t.gallery.open!==void 0&&(this.showThumbnailGallery=t.gallery.open),t.gallery.dockPosition!==void 0&&(this.dockSide=t.gallery.dockPosition),t.gallery.width!==void 0&&(this.gallerySize.width=t.gallery.width),t.gallery.height!==void 0&&(this.gallerySize.height=t.gallery.height),t.gallery.x!==void 0&&(this.galleryPosition.x=t.gallery.x),t.gallery.y!==void 0&&(this.galleryPosition.y=t.gallery.y)),t.search){t.search.open!==void 0&&(this.showSearchPanel=t.search.open);const n=t.search.query,o=(r=e.search)==null?void 0:r.query;n!==void 0&&n!==o&&n!==this.searchQuery&&this._performSearch(n)}t.annotations&&t.annotations.open!==void 0&&(this.showAnnotations=t.annotations.open)}toggleAnnotations(){this.showAnnotations=!this.showAnnotations,this.dispatchStateChange()}toggleToolbar(){this.toolbarOpen=!this.toolbarOpen,this.dispatchStateChange()}toggleThumbnailGallery(){this.showThumbnailGallery=!this.showThumbnailGallery,this.dispatchStateChange()}setViewerElement(t){this.viewerElement=t}toggleFullScreen(){if(document.fullscreenElement)document.exitFullscreen();else{const t=this.viewerElement||document.getElementById("triiiceratops-viewer");t?t.requestFullscreen().catch(e=>{console.warn("Fullscreen request failed",e)}):console.warn("Cannot toggle fullscreen: Viewer element not found")}}toggleMetadataDialog(){this.showMetadataDialog=!this.showMetadataDialog}setViewingMode(t){if(this.viewingMode=t,t==="paged"){const e=this.pagedOffset;if(this.currentCanvasIndex>=e&&(this.currentCanvasIndex-e)%2===1){const n=this.currentCanvasIndex-1,o=this.canvases[n];this.setCanvas(o.id)}}this.dispatchStateChange()}togglePagedOffset(){this.pagedOffset=this.pagedOffset===0?1:0,this.config.pagedViewOffset=this.pagedOffset===1;const t=this.pagedOffset;if(this.currentCanvasIndex>=t&&(this.currentCanvasIndex-t)%2===1){const r=this.currentCanvasIndex-1,n=this.canvases[r];this.setCanvas(n.id)}this.dispatchStateChange()}get searchQuery(){return p(R(this,qn))}set searchQuery(t){xe(R(this,qn),t,!0)}get pendingSearchQuery(){return p(R(this,Xn))}set pendingSearchQuery(t){xe(R(this,Xn),t,!0)}get searchResults(){return p(R(this,Yn))}set searchResults(t){xe(R(this,Yn),t,!0)}get isSearching(){return p(R(this,Kn))}set isSearching(t){xe(R(this,Kn),t,!0)}get showSearchPanel(){return p(R(this,Qn))}set showSearchPanel(t){xe(R(this,Qn),t,!0)}toggleSearchPanel(){this.showSearchPanel=!this.showSearchPanel,this.showSearchPanel||(this.searchAnnotations=[]),this.dispatchStateChange()}get searchAnnotations(){return p(R(this,Jn))}set searchAnnotations(t){xe(R(this,Jn),t,!0)}get currentCanvasSearchAnnotations(){if(!this.canvasId)return[];if(this.viewingMode==="paged"){let t=this.searchAnnotations.filter(n=>n.canvasId===this.canvasId);const e=this.currentCanvasIndex,r=this.pagedOffset;if(e>=r){const n=e+1;if(n<this.canvases.length){const o=this.canvases[n],a=o.id||o["@id"],c=this.canvases[e].getWidth()*1.025,u=this.searchAnnotations.filter(h=>h.canvasId===a).map(h=>{const f=h.on.split("#xywh="),v=f[1].split(",").map(Number),_=v[0]+c;return{...h,on:`${f[0]}#xywh=${_},${v[1]},${v[2]},${v[3]}`}});t=t.concat(u)}}return t}else return this.searchAnnotations.filter(t=>t.canvasId===this.canvasId)}async search(t){this.dispatchStateChange(),await this._performSearch(t),this.dispatchStateChange()}async _performSearch(t){var e,r;if(t.trim()){this.isSearching=!0,this.searchQuery=t,this.searchResults=[];try{const n=this.manifest;if(!n){console.log("[ViewerState] Manifest not loaded, deferring search:",t),this.pendingSearchQuery=t;return}let o=n.getService("http://iiif.io/api/search/1/search")||n.getService("http://iiif.io/api/search/0/search");if(o||n.__jsonld&&n.__jsonld.service&&(o=(Array.isArray(n.__jsonld.service)?n.__jsonld.service:[n.__jsonld.service]).find(g=>g.profile==="http://iiif.io/api/search/1/search"||g.profile==="http://iiif.io/api/search/0/search")),!o){console.warn("No IIIF search service found in manifest"),this.isSearching=!1;return}const s=`${o.id||o["@id"]}?q=${encodeURIComponent(t)}`,c=await fetch(s);if(!c.ok)throw new Error("Search request failed");const l=await c.json(),u=l.resources||[],h=new _n,f=d=>{const g=typeof d=="string"?d:d["@id"]||d.id;if(!g)return null;const y=g.split("#xywh=");if(y.length<2)return null;const S=y[1].split(",").map(Number);return S.length===4?S:null},v=d=>d?d.replace(/<mark>/g,"<mark>").replace(/<\/mark>/g,"</mark>"):"";if(l.hits)for(const d of l.hits){const g=d.annotations||[];let y=-1,S=null;const P=[];for(const E of g){const A=u.find(B=>B["@id"]===E||B.id===E);if(A&&A.on){const B=typeof A.on=="string"?A.on:A.on["@id"]||A.on.id,q=B.split("#")[0],z=f(B),I=this.canvases.findIndex(M=>M.id===q);I>=0&&(y===-1&&(y=I),z&&(P.push(z),S||(S=z)))}}if(y>=0){if(!h.has(y)){const E=this.canvases[y];let A="Canvas "+(y+1);try{if(E.getLabel){const B=E.getLabel();Array.isArray(B)&&B.length>0?A=B[0].value:typeof B=="string"&&(A=B)}else E.label&&(typeof E.label=="string"?A=E.label:Array.isArray(E.label)&&(A=(e=E.label[0])==null?void 0:e.value))}catch{}h.set(y,{canvasIndex:y,canvasLabel:String(A),hits:[]})}h.get(y).hits.push({type:"hit",before:v(d.before),match:v(d.match),after:v(d.after),bounds:S,allBounds:P})}}else if(u.length>0)for(const d of u){const g=typeof d.on=="string"?d.on:d.on["@id"]||d.on.id,y=g.split("#")[0],S=f(g),P=this.canvases.findIndex(E=>E.id===y);if(P>=0){const E=this.canvases[P];let A="Canvas "+(P+1);try{if(E.getLabel){const B=E.getLabel();Array.isArray(B)&&B.length>0?A=B[0].value:typeof B=="string"&&(A=B)}else E.label&&(typeof E.label=="string"?A=E.label:Array.isArray(E.label)&&(A=(r=E.label[0])==null?void 0:r.value))}catch{}h.has(P)||h.set(P,{canvasIndex:P,canvasLabel:String(A),hits:[]}),h.get(P).hits.push({type:"resource",match:v(d.resource&&d.resource.chars?d.resource.chars:d.chars||""),bounds:S,allBounds:S?[S]:[]})}}this.searchResults=Array.from(h.values()).sort((d,g)=>d.canvasIndex-g.canvasIndex);let _=0;this.searchAnnotations=this.searchResults.flatMap(d=>{const g=this.canvases[d.canvasIndex];return d.hits.flatMap(y=>(y.allBounds&&y.allBounds.length>0?y.allBounds:y.bounds?[y.bounds]:[]).map(P=>{const E=`${g.id}#xywh=${P.join(",")}`;return{"@id":`urn:search-hit:${_++}`,"@type":"oa:Annotation",motivation:"sc:painting",on:E,canvasId:g.id,resource:{"@type":"cnt:ContentAsText",chars:y.match},isSearchHit:!0}}))})}catch(n){console.error("Search error:",n),this.isSearching=!1}finally{this.pendingSearchQuery||(this.isSearching=!1)}}}get pluginMenuButtons(){return p(R(this,$n))}set pluginMenuButtons(t){xe(R(this,$n),t,!0)}get pluginPanels(){return p(R(this,eo))}set pluginPanels(t){xe(R(this,eo),t,!0)}get osdViewer(){return p(R(this,to))}set osdViewer(t){xe(R(this,to),t)}registerPlugin(t){const e=t.id||`plugin-${Math.random().toString(36).substr(2,9)}`;let r=Pe(!1);const n={id:`${e}:toggle`,icon:t.icon,tooltip:t.name,onClick:()=>{xe(r,!p(r))},isActive:()=>p(r),order:200},o={id:`${e}:panel`,component:t.panel,position:t.position||"left",isVisible:()=>p(r),props:{...t.props,close:()=>{xe(r,!1)}}};this.pluginMenuButtons=[...this.pluginMenuButtons,n],this.pluginPanels=[...this.pluginPanels,o],t.onInit&&t.onInit(this)}unregisterPlugin(t){this.pluginMenuButtons=this.pluginMenuButtons.filter(e=>!e.id.startsWith(`${t}:`)),this.pluginPanels=this.pluginPanels.filter(e=>!e.id.startsWith(`${t}:`))}notifyOSDReady(t){this.osdViewer=t}destroyAllPlugins(){this.pluginMenuButtons=[],this.pluginPanels=[],this.pluginEventHandlers.clear()}}Pn=new WeakMap,An=new WeakMap,Rn=new WeakMap,In=new WeakMap,Mn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Ln=new WeakMap,zn=new WeakMap,Hn=new WeakMap,Nn=new WeakMap,Fn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,jn=new WeakMap,Un=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Wn=new WeakMap,qn=new WeakMap,Xn=new WeakMap,Yn=new WeakMap,Kn=new WeakMap,Qn=new WeakMap,Jn=new WeakMap,$n=new WeakMap,eo=new WeakMap,to=new WeakMap;const Gi="triiiceratops:viewerState",jg=["light","dark","cupcake","bumblebee","emerald","corporate","synthwave","retro","cyberpunk","valentine","halloween","garden","forest","aqua","lofi","pastel","fantasy","wireframe","black","luxury","dracula","cmyk","autumn","business","acid","lemonade","night","coffee","winter","dim","nord","sunset","caramellatte","abyss","silk"];function Ug(i){i=i.replace(/^#/,"");let t,e,r;if(i.length===3)t=parseInt(i[0]+i[0],16),e=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16);else if(i.length===6||i.length===8)t=parseInt(i.slice(0,2),16),e=parseInt(i.slice(2,4),16),r=parseInt(i.slice(4,6),16);else return null;return isNaN(t)||isNaN(e)||isNaN(r)?null:{r:t,g:e,b:r}}function Gg(i){const t=i.match(/rgba?\(\s*(\d+(?:\.\d+)?%?)\s*[,\s]\s*(\d+(?:\.\d+)?%?)\s*[,\s]\s*(\d+(?:\.\d+)?%?)(?:\s*[,/]\s*(\d*\.?\d+%?))?\s*\)/i);if(!t)return null;const e=a=>a.endsWith("%")?parseFloat(a)/100*255:parseFloat(a),r=e(t[1]),n=e(t[2]),o=e(t[3]);return isNaN(r)||isNaN(n)||isNaN(o)?null:{r,g:n,b:o}}function ps(i){const t=i/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Zg(i,t,e){return{x:.4124564*i+.3575761*t+.1804375*e,y:.2126729*i+.7151522*t+.072175*e,z:.0193339*i+.119192*t+.9503041*e}}function Wg(i,t,e){const r=.8189330101*i+.3618667424*t-.1288597137*e,n=.0329845436*i+.9293118715*t+.0361456387*e,o=.0482003018*i+.2643662691*t+.633851707*e,a=Math.cbrt(r),s=Math.cbrt(n),c=Math.cbrt(o);return{L:.2104542553*a+.793617785*s-.0040720468*c,a:1.9779984951*a-2.428592205*s+.4505937099*c,b:.0259040371*a+.7827717662*s-.808675766*c}}function qg(i,t,e){const r=Math.sqrt(t*t+e*e);let n=Math.atan2(e,t)*180/Math.PI;return n<0&&(n+=360),{L:i,C:r,h:n}}function du(i,t,e){const r=ps(i),n=ps(t),o=ps(e),{x:a,y:s,z:c}=Zg(r,n,o),{L:l,a:u,b:h}=Wg(a,s,c);return qg(l,u,h)}function fu(i,t,e){const r=(i*100).toFixed(2),n=t.toFixed(4),o=t<1e-4?0:e.toFixed(2);return`oklch(${r}% ${n} ${o})`}function Xg(i){return i.trim().toLowerCase().startsWith("oklch(")}function Yg(i){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(i.trim())}function Kg(i){return/^rgba?\s*\(/i.test(i.trim())}function Qg(i){const t=Ug(i);if(!t)return console.warn(`Invalid hex color: ${i}, returning as-is`),i;const{L:e,C:r,h:n}=du(t.r,t.g,t.b);return fu(e,r,n)}function Jg(i){const t=Gg(i);if(!t)return console.warn(`Invalid rgb color: ${i}, returning as-is`),i;const{L:e,C:r,h:n}=du(t.r,t.g,t.b);return fu(e,r,n)}function $g(i){const t=i.trim();return Xg(t)?t:Yg(t)?Qg(t):Kg(t)?Jg(t):(console.warn(`Unrecognized color format: ${i}, passing through as-is`),i)}const pu={primary:"--color-primary",primaryContent:"--color-primary-content",secondary:"--color-secondary",secondaryContent:"--color-secondary-content",accent:"--color-accent",accentContent:"--color-accent-content",neutral:"--color-neutral",neutralContent:"--color-neutral-content",base100:"--color-base-100",base200:"--color-base-200",base300:"--color-base-300",baseContent:"--color-base-content",info:"--color-info",infoContent:"--color-info-content",success:"--color-success",successContent:"--color-success-content",warning:"--color-warning",warningContent:"--color-warning-content",error:"--color-error",errorContent:"--color-error-content",radiusBox:"--radius-box",radiusField:"--radius-field",radiusSelector:"--radius-selector",sizeSelector:"--size-selector",sizeField:"--size-field",border:"--border",depth:"--depth",noise:"--noise",colorScheme:"color-scheme"},ev=new Set(["primary","primaryContent","secondary","secondaryContent","accent","accentContent","neutral","neutralContent","base100","base200","base300","baseContent","info","infoContent","success","successContent","warning","warningContent","error","errorContent"]);function tv(i){return jg.includes(i)}function rv(i,t){i.setAttribute("data-theme",t)}function iv(i,t){for(const[e,r]of Object.entries(t)){if(r==null)continue;const n=e;if(n==="colorScheme"){i.style.colorScheme=r;continue}const o=pu[n];if(!o)continue;let a=String(r);ev.has(n)&&(a=$g(a)),i.style.setProperty(o,a)}}function nv(i){for(const[t,e]of Object.entries(pu))t==="colorScheme"?i.style.colorScheme="":i.style.removeProperty(e)}function ov(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null?t:null}catch{return null}}function av(i,t,e){t?rv(i,t):i.removeAttribute("data-theme"),e?iv(i,e):nv(i)}function gu(i){return i.id||i["@id"]||(typeof i.getId=="function"?i.getId():"")}function bn(i){if(!i)return null;const t=i.match(/xywh=(?:pixel:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2]),w:parseFloat(t[3]),h:parseFloat(t[4])}:null}function sv(i){const t=lv(i);if(t)return cv(t);const e=fv(i);return e?{type:"RECTANGLE",x:e.x,y:e.y,w:e.w,h:e.h}:null}function lv(i){var e,r;if(typeof i.getTarget=="function"){const n=((e=i.__jsonld)==null?void 0:e.on)||((r=i.__jsonld)==null?void 0:r.target);if(n)return vu(n)}const t=i.target||i.on;return t?vu(t):null}function vu(i){if(!i)return null;if(Array.isArray(i))for(const t of i){const e=mu(t);if(e)return e}else return mu(i);return null}function mu(i){var e;if(!i)return null;const t=i.selector||i;if(Array.isArray(t)){const r=t.find(n=>n.type==="SvgSelector");return r&&r.value?r.value:null}return(t==null?void 0:t.type)==="SvgSelector"&&t.value?t.value:((e=t==null?void 0:t.item)==null?void 0:e.type)==="SvgSelector"&&t.item.value?t.item.value:null}function cv(i){try{const e=new DOMParser().parseFromString(i,"image/svg+xml");if(e.documentElement.nodeName==="parsererror")return console.warn("Failed to parse SVG selector:",i),null;const r=[],n=e.querySelectorAll("polygon");for(const c of n){const l=c.getAttribute("points");if(l){const u=uv(l);r.push(...u)}}const o=e.querySelectorAll("path");for(const c of o){const l=c.getAttribute("d");if(l){const u=hv(l);r.push(...u)}}const a=e.querySelectorAll("circle");for(const c of a){const l=parseFloat(c.getAttribute("cx")||"0"),u=parseFloat(c.getAttribute("cy")||"0"),h=parseFloat(c.getAttribute("r")||"0"),f=dv(l,u,h);r.push(...f)}const s=e.querySelectorAll("rect");for(const c of s){const l=parseFloat(c.getAttribute("x")||"0"),u=parseFloat(c.getAttribute("y")||"0"),h=parseFloat(c.getAttribute("width")||"0"),f=parseFloat(c.getAttribute("height")||"0");r.push([l,u],[l+h,u],[l+h,u+f],[l,u+f])}return r.length===0?null:{type:"POLYGON",points:r}}catch(t){return console.warn("Failed to convert SVG to polygon:",t),null}}function uv(i){const t=[],e=i.trim().split(/\s+/);for(const r of e){const[n,o]=r.split(",").map(a=>parseFloat(a));!isNaN(n)&&!isNaN(o)&&t.push([n,o])}return t}function hv(i){const t=[],e=/[ML]\s*([\d.]+)[,\s]+([\d.]+)/g;let r;for(;(r=e.exec(i))!==null;){const n=parseFloat(r[1]),o=parseFloat(r[2]);!isNaN(n)&&!isNaN(o)&&t.push([n,o])}return t}function dv(i,t,e,r=8){const n=[];for(let o=0;o<r;o++){const a=o/r*Math.PI*2,s=i+e*Math.cos(a),c=t+e*Math.sin(a);n.push([s,c])}return n}function fv(i){var e;if(typeof i.getTarget=="function"){const r=i.getTarget();if(typeof r=="string"&&r.includes("xywh="))return bn(r);const n=(e=i.__jsonld)==null?void 0:e.on;if(n){const o=gs(n);if(o)return o}}const t=i.target||i.on;return t?gs(t):null}function gs(i){if(!i)return null;if(Array.isArray(i))for(const t of i){const e=gs(t);if(e)return e}if(typeof i=="string"&&i.includes("xywh="))return bn(i);if(i.selector){const t=i.selector;if(Array.isArray(t)){const r=t.find(o=>o.type==="FragmentSelector"&&o.value&&o.value.includes("xywh="));if(r)return bn(r.value);const n=t.find(o=>o.value&&o.value.includes("xywh="));return n?bn(n.value):null}const e=t.item||t;if(e.value&&typeof e.value=="string"&&e.value.includes("xywh="))return bn(e.value)}return null}function _u(i){const t=[];if(typeof i.getBody=="function"){const e=i.getBody();if(e){const r=Array.isArray(e)?e:[e];for(const n of r){const o=n.getValue?n.getValue():"";if(o){const a=n.getFormat?n.getFormat():"",s=n.getPurpose?n.getPurpose():void 0;t.push({value:o,isHtml:a==="text/html"||a==="application/html",purpose:s,format:a})}}}}else{const e=r=>{const n=r.chars||r.value||r["cnt:chars"]||"";if(n){const o=r.format==="text/html"||r.type==="TextualBody";t.push({value:n,isHtml:o,purpose:r.purpose,format:r.format})}};i.resource?(Array.isArray(i.resource)?i.resource:[i.resource]).forEach(e):i.body&&(Array.isArray(i.body)?i.body:[i.body]).forEach(e)}if(t.length===0){let e="";typeof i.getLabel=="function"?e=i.getLabel()||"":i.label&&(e=Array.isArray(i.label)?i.label.join(" "):i.label),e&&t.push({value:e,isHtml:!1,purpose:"commenting"})}return t.length===0&&t.push({value:"Annotation",isHtml:!1,purpose:"commenting"}),t}function pv(i,t,e=!1){const r=gu(i)||`anno-${t}`,n=sv(i);if(!n)return null;const o=_u(i);return{id:r,geometry:n,body:o,isSearchHit:e}}function gv(i,t=new Set){return i.map((e,r)=>{const n=t.has(gu(e));return pv(e,r,n)}).filter(e=>e!==null)}var vv=me("<div></div>"),mv=Q('<svg class="absolute pointer-events-auto"><title> </title><polygon stroke-width="2"></polygon></svg>'),_v=me('<div class="w-full h-full relative"><div></div> <!></div>');function wv(i,t){Qe(t,!0);let e=or(t,"viewerState",7),r=Pe(void 0),n=Pe(void 0),o=Pe(void 0),a=Pe(0),s="",c=te(()=>{if(!e().manifestId||!e().canvasId)return[];const d=$r.getAnnotations(e().manifestId,e().canvasId),g=e().currentCanvasSearchAnnotations;return[...d,...g]}),l=te(()=>{const d=new No;return e().currentCanvasSearchAnnotations.forEach(g=>{const y=g.id||g["@id"];y&&d.add(y)}),d}),u=te(()=>gv(p(c),p(l))),h=te(()=>{if(p(a),!p(n)||!p(o)||!p(u).length)return[];const d=p(n).world.getItemAt(0);if(!d)return[];const g=[],y=e().pluginPanels.find(P=>P.id==="annotation-editor:panel"),S=y?y.isVisible():!1;for(const P of p(u)){if(!P.isSearchHit)if(e().showAnnotations){if(!e().visibleAnnotationIds.has(P.id))continue}else continue;if(P.geometry.type==="RECTANGLE"){const E=d.imageToViewportRectangle(P.geometry.x,P.geometry.y,P.geometry.w,P.geometry.h),A=p(n).viewport.viewportToViewerElementRectangle(E);g.push({id:P.id,type:"RECTANGLE",rect:{x:A.x,y:A.y,width:A.width,height:A.height},isSearchHit:P.isSearchHit,tooltip:P.body.map(B=>B.value).join(" "),pointerEvents:S?"none":"auto"})}else if(P.geometry.type==="POLYGON"){const E=P.geometry.points.map(M=>{const J=d.imageToViewportCoordinates(new(p(o)).Point(M[0],M[1])),ee=p(n).viewport.viewportToViewerElementCoordinates(J);return[ee.x,ee.y]});let A=1/0,B=1/0,q=-1/0,z=-1/0;for(const[M,J]of E)A=Math.min(A,M),B=Math.min(B,J),q=Math.max(q,M),z=Math.max(z,J);const I=E.map(([M,J])=>[M-A,J-B]);g.push({id:P.id,type:"POLYGON",bounds:{x:A,y:B,width:q-A,height:z-B},points:I,isSearchHit:P.isSearchHit,tooltip:P.body.map(M=>M.value).join(" "),pointerEvents:S?"none":"auto"})}}return g});Aa(()=>{if(!p(r))return;let d=!0;return(async()=>{const g=await Promise.resolve().then(()=>y4);d&&(xe(o,g.default||g,!0),xe(n,p(o)({element:p(r),tileSources:null,prefixUrl:"",showNavigationControl:!1,showHomeControl:!1,showFullPageControl:!1,showSequenceControl:!1,showZoomControl:!1,showRotationControl:!1,animationTime:.5,springStiffness:7,zoomPerClick:2,gestureSettingsMouse:{clickToZoom:!1,dblClickToZoom:!0}})),e().notifyOSDReady(p(n)))})(),()=>{var g;d=!1,(g=p(n))==null||g.destroy(),e().osdViewer=null}}),st(()=>{if(!p(n))return;const d=()=>{ln(a)};return p(n).addHandler("open",d),p(n).addHandler("animation",d),p(n).addHandler("resize",d),p(n).addHandler("rotate",d),p(n).world.addHandler("add-item",d),p(n).world.addHandler("remove-item",d),()=>{p(n).removeHandler("open",d),p(n).removeHandler("animation",d),p(n).removeHandler("resize",d),p(n).removeHandler("rotate",d),p(n).world.removeHandler("add-item",d),p(n).world.removeHandler("remove-item",d)}}),st(()=>{if(!p(n)||!t.tileSources)return;const d=JSON.stringify(t.tileSources);if(d!==s)if(s=d,e().viewingMode==="paged"&&t.tileSources instanceof Array&&t.tileSources.length===2){const y=[{tileSource:t.tileSources[0],x:0,y:0,width:1},{tileSource:t.tileSources[1],x:1.025,y:0,width:1}];p(n).open(y)}else p(n).open(t.tileSources)});var f=_v(),v=U(f);ji(v,d=>xe(r,d),()=>p(r));var _=ue(v,2);Ut(_,17,()=>p(h),d=>d.id,(d,g)=>{var y=$(),S=Z(y);{var P=A=>{var B=vv();Re(()=>{Ne(B,"id",`annotation-visual-${p(g).id??""}`),He(B,1,`absolute border-2 transition-colors cursor-pointer pointer-events-auto ${p(g).isSearchHit?"border-yellow-400 bg-yellow-400/40 hover:bg-yellow-400/60":"border-red-500 bg-red-500/20 hover:bg-red-500/40"}`),Mt(B,`
|
|
4
|
+
`),r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.replaceAll("\\","/");if(o.trim()!=="Error"){if(o.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||r.push(o)}}return r}let We=null;function Ri(i){We=i}let _o=null;function Ad(i,t,e,r,n,o){const a=_o;_o={type:t,file:e[Zt],line:r,column:n,parent:a,...o};try{return i()}finally{_o=a}}let nn=null;function sl(i){nn=i}function Rd(){const i={};return[()=>(ha(i)||Uh(),Wr(i)),t=>ua(i,t)]}function Wr(i){return wo().get(i)}function ua(i,t){return wo().set(i,t),t}function ha(i){return wo().has(i)}function Id(){return wo()}function Ke(i,t=!1,e){We={p:We,i:!1,c:null,e:null,s:i,x:null,l:null}}function Qe(i){var t=We,e=t.e;if(e!==null){t.e=null;for(var r of e)Il(r)}return i!==void 0&&(t.x=i),t.i=!0,We=t.p,i??{}}function ll(){return!0}function wo(i){return We===null&&Pi(),We.c??(We.c=new Map(Md(We)||void 0))}function Md(i){let t=i.p;for(;t!==null;){const e=t.c;if(e!==null)return e;t=t.p}return null}let di=[];function cl(){var i=di;di=[],sa(i)}function qt(i){if(di.length===0&&!Ii){var t=di;queueMicrotask(()=>{t===di&&cl()})}di.push(i)}function Od(){for(;di.length>0;)cl()}function ul(i){var t=Fe;if(t===null)return Ge.f|=Zr,i;if((t.f&tn)===0){if((t.f&uo)===0)throw i;t.b.error(i)}else Fr(i,t)}function Fr(i,t){for(;t!==null;){if((t.f&uo)!==0)try{t.b.error(i);return}catch(e){i=e}t=t.parent}throw i}const fi=new Set;let Ve=null,on=null,ot=null,ir=[],bo=null,da=!1,Ii=!1;const qo=class qo{constructor(){ve(this,yt);nt(this,"committed",!1);nt(this,"current",new Map);nt(this,"previous",new Map);ve(this,Wi,new Set);ve(this,qi,new Set);ve(this,wi,0);ve(this,bi,0);ve(this,xn,null);ve(this,Xi,[]);ve(this,Yi,[]);nt(this,"skipped_effects",new Set);nt(this,"is_fork",!1)}is_deferred(){return this.is_fork||I(this,bi)>0}process(t){var r;ir=[],on=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)qe(this,yt,Os).call(this,n,e);this.is_fork||qe(this,yt,mh).call(this),this.is_deferred()?(qe(this,yt,ki).call(this,e.effects),qe(this,yt,ki).call(this,e.render_effects),qe(this,yt,ki).call(this,e.block_effects)):(on=this,Ve=null,hl(e.render_effects),hl(e.effects),on=null,(r=I(this,xn))==null||r.resolve()),ot=null}capture(t,e){this.previous.has(t)||this.previous.set(t,e),(t.f&Zr)===0&&(this.current.set(t,t.v),ot==null||ot.set(t,t.v))}activate(){Ve=this,this.apply()}deactivate(){Ve===this&&(Ve=null,ot=null)}flush(){if(this.activate(),ir.length>0){if(fa(),Ve!==null&&Ve!==this)return}else I(this,wi)===0&&this.process([]);this.deactivate()}discard(){for(const t of I(this,qi))t(this);I(this,qi).clear()}increment(t){He(this,wi,I(this,wi)+1),t&&He(this,bi,I(this,bi)+1)}decrement(t){He(this,wi,I(this,wi)-1),t&&He(this,bi,I(this,bi)-1),this.revive()}revive(){for(const t of I(this,Xi))Tt(t,Ot),pi(t);for(const t of I(this,Yi))Tt(t,yr),pi(t);He(this,Xi,[]),He(this,Yi,[]),this.flush()}oncommit(t){I(this,Wi).add(t)}ondiscard(t){I(this,qi).add(t)}settled(){return(I(this,xn)??He(this,xn,Ws())).promise}static ensure(){if(Ve===null){const t=Ve=new qo;fi.add(Ve),Ii||qo.enqueue(()=>{Ve===t&&t.flush()})}return Ve}static enqueue(t){qt(t)}apply(){}};Wi=new WeakMap,qi=new WeakMap,wi=new WeakMap,bi=new WeakMap,xn=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,yt=new WeakSet,Os=function(t,e){var u;t.f^=Ct;for(var r=t.first;r!==null;){var n=r.f,o=(n&(Hr|Gr))!==0,a=o&&(n&Ct)!==0,s=a||(n&Wt)!==0||this.skipped_effects.has(r);if((r.f&uo)!==0&&((u=r.b)!=null&&u.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!s&&r.fn!==null){o?r.f^=Ct:(n&lo)!==0?e.effects.push(r):Oi(r)&&((r.f&br)!==0&&e.block_effects.push(r),Di(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)l===e.effect&&(qe(this,yt,ki).call(this,e.effects),qe(this,yt,ki).call(this,e.render_effects),qe(this,yt,ki).call(this,e.block_effects),e=e.parent),r=l.next,l=l.parent}},ki=function(t){for(const e of t)((e.f&Ot)!==0?I(this,Xi):I(this,Yi)).push(e),qe(this,yt,Ds).call(this,e.deps),Tt(e,Ct)},Ds=function(t){if(t!==null)for(const e of t)(e.f&vt)===0||(e.f&ci)===0||(e.f^=ci,qe(this,yt,Ds).call(this,e.deps))},mh=function(){if(I(this,bi)===0){for(const t of I(this,Wi))t();I(this,Wi).clear()}I(this,wi)===0&&qe(this,yt,_h).call(this)},_h=function(){var o;if(fi.size>1){this.previous.clear();var t=ot,e=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const a of fi){if(a===this){e=!1;continue}const s=[];for(const[l,u]of this.current){if(a.current.has(l))if(e&&u!==a.current.get(l))a.current.set(l,u);else continue;s.push(l)}if(s.length===0)continue;const c=[...a.current.keys()].filter(l=>!this.current.has(l));if(c.length>0){var n=ir;ir=[];const l=new Set,u=new Map;for(const h of s)dl(h,c,l,u);if(ir.length>0){Ve=a,a.apply();for(const h of ir)qe(o=a,yt,Os).call(o,h,r);a.deactivate()}ir=n}}Ve=null,ot=t}this.committed=!0,fi.delete(this)};let Xt=qo;function Ft(i){var t=Ii;Ii=!0;try{var e;for(i&&(Ve!==null&&fa(),e=i());;){if(Od(),ir.length===0&&(Ve==null||Ve.flush(),ir.length===0))return bo=null,e;fa()}}finally{Ii=t}}function fa(){var i=mi;da=!0;var t=null;try{var e=0;for(So(!0);ir.length>0;){var r=Xt.ensure();if(e++>1e3){var n,o;Dd()}r.process(ir),Xr.clear()}}finally{da=!1,So(i),bo=null}}function Dd(){try{td()}catch(i){Fr(i,bo)}}let pr=null;function hl(i){var t=i.length;if(t!==0){for(var e=0;e<t;){var r=i[e++];if((r.f&(xr|Wt))===0&&Oi(r)&&(pr=new Set,Di(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Fl(r):r.fn=null),(pr==null?void 0:pr.size)>0)){Xr.clear();for(const n of pr){if((n.f&(xr|Wt))!==0)continue;const o=[n];let a=n.parent;for(;a!==null;)pr.has(a)&&(pr.delete(a),o.push(a)),a=a.parent;for(let s=o.length-1;s>=0;s--){const c=o[s];(c.f&(xr|Wt))===0&&Di(c)}}pr.clear()}}pr=null}}function dl(i,t,e,r){if(!e.has(i)&&(e.add(i),i.reactions!==null))for(const n of i.reactions){const o=n.f;(o&vt)!==0?dl(n,t,e,r):(o&(fo|br))!==0&&(o&Ot)===0&&pl(n,t,r)&&(Tt(n,Ot),pi(n))}}function fl(i,t){if(i.reactions!==null)for(const e of i.reactions){const r=e.f;(r&vt)!==0?fl(e,t):(r&ho)!==0&&(Tt(e,Ot),t.add(e))}}function pl(i,t,e){const r=e.get(i);if(r!==void 0)return r;if(i.deps!==null)for(const n of i.deps){if(t.includes(n))return!0;if((n.f&vt)!==0&&pl(n,t,e))return e.set(n,!0),!0}return e.set(i,!1),!1}function pi(i){for(var t=bo=i;t.parent!==null;){t=t.parent;var e=t.f;if(da&&t===Fe&&(e&br)!==0&&(e&la)===0)return;if((e&(Gr|Hr))!==0){if((e&Ct)===0)return;t.f^=Ct}}ir.push(t)}let yo=[];function Ld(){try{Ft(()=>{for(const i of yo)ln(i)})}finally{yo=[]}}function zd(i){var t=Lt(0),e=!0,r=void 0;return p(t),Ol(()=>{if(e){var n=ot;try{ot=null,r=i()}finally{ot=n}return}yo.length===0&&qt(Ld),yo.push(t)}),e=!1,r}function Hd(i){Qs(),Ve!==null&&id();var t=Xt.ensure();t.is_fork=!0,ot=new Map;var e=!1,r=t.settled();Ft(i),ot=null;for(var[n,o]of t.previous)n.v=o;return{commit:async()=>{if(e){await r;return}fi.has(t)||rd(),e=!0,t.is_fork=!1;for(var[a,s]of t.current)a.v=s;Ft(()=>{var c=new Set;for(var l of t.current.keys())fl(l,c);qd(c),yl()}),t.revive(),await r},discard:()=>{!e&&fi.has(t)&&(fi.delete(t),t.discard())}}}function Nd(i){let t=0,e=Lt(0),r;return()=>{gi()&&(p(e),ht(()=>(t===0&&(r=et(()=>i(()=>Yt(e)))),t+=1,()=>{qt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Yt(e))})})))}}var Fd=fr|li|uo;function gl(i,t,e){new Bd(i,t,e)}class Bd{constructor(t,e,r){ve(this,gt);nt(this,"parent");ve(this,lr,!1);ve(this,er);ve(this,Tn,me?De:null);ve(this,Ir);ve(this,yi);ve(this,Mr);ve(this,cr,null);ve(this,Gt,null);ve(this,Or,null);ve(this,Vr,null);ve(this,ei,null);ve(this,xi,0);ve(this,ti,0);ve(this,Ti,!1);ve(this,ri,null);ve(this,Xo,Nd(()=>(He(this,ri,Lt(I(this,xi))),()=>{He(this,ri,null)})));He(this,er,t),He(this,Ir,e),He(this,yi,r),this.parent=Fe.b,He(this,lr,!!I(this,Ir).pending),He(this,Mr,kr(()=>{if(Fe.b=this,me){const o=I(this,Tn);Pt(),o.nodeType===Tr&&o.data===Si?qe(this,gt,bh).call(this):qe(this,gt,wh).call(this)}else{var n=qe(this,gt,Ls).call(this);try{He(this,cr,zt(()=>r(n)))}catch(o){this.error(o)}I(this,ti)>0?qe(this,gt,ra).call(this):He(this,lr,!1)}return()=>{var o;(o=I(this,ei))==null||o.remove()}},Fd)),me&&He(this,er,De)}is_pending(){return I(this,lr)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!I(this,Ir).pending}update_pending_count(t){qe(this,gt,zs).call(this,t),He(this,xi,I(this,xi)+t),I(this,ri)&&Er(I(this,ri),I(this,xi))}get_effect_pending(){return I(this,Xo).call(this),p(I(this,ri))}error(t){var e=I(this,Ir).onerror;let r=I(this,Ir).failed;if(I(this,Ti)||!e&&!r)throw t;I(this,cr)&&(mt(I(this,cr)),He(this,cr,null)),I(this,Gt)&&(mt(I(this,Gt)),He(this,Gt,null)),I(this,Or)&&(mt(I(this,Or)),He(this,Or,null)),me&&(it(I(this,Tn)),ft(),it(hi()));var n=!1,o=!1;const a=()=>{if(n){wd();return}n=!0,o&&ud(),Xt.ensure(),He(this,xi,0),I(this,Or)!==null&&vi(I(this,Or),()=>{He(this,Or,null)}),He(this,lr,this.has_pending_snippet()),He(this,cr,qe(this,gt,ta).call(this,()=>(He(this,Ti,!1),zt(()=>I(this,yi).call(this,I(this,er)))))),I(this,ti)>0?qe(this,gt,ra).call(this):He(this,lr,!1)};var s=Ge;try{It(null),o=!0,e==null||e(t,a),o=!1}catch(c){Fr(c,I(this,Mr)&&I(this,Mr).parent)}finally{It(s)}r&&qt(()=>{He(this,Or,qe(this,gt,ta).call(this,()=>{Xt.ensure(),He(this,Ti,!0);try{return zt(()=>{r(I(this,er),()=>t,()=>a)})}catch(c){return Fr(c,I(this,Mr).parent),null}finally{He(this,Ti,!1)}}))})}}lr=new WeakMap,er=new WeakMap,Tn=new WeakMap,Ir=new WeakMap,yi=new WeakMap,Mr=new WeakMap,cr=new WeakMap,Gt=new WeakMap,Or=new WeakMap,Vr=new WeakMap,ei=new WeakMap,xi=new WeakMap,ti=new WeakMap,Ti=new WeakMap,ri=new WeakMap,Xo=new WeakMap,gt=new WeakSet,wh=function(){try{He(this,cr,zt(()=>I(this,yi).call(this,I(this,er))))}catch(t){this.error(t)}He(this,lr,!1)},bh=function(){const t=I(this,Ir).pending;t&&(He(this,Gt,zt(()=>t(I(this,er)))),Xt.enqueue(()=>{var e=qe(this,gt,Ls).call(this);He(this,cr,qe(this,gt,ta).call(this,()=>(Xt.ensure(),zt(()=>I(this,yi).call(this,e))))),I(this,ti)>0?qe(this,gt,ra).call(this):(vi(I(this,Gt),()=>{He(this,Gt,null)}),He(this,lr,!1))}))},Ls=function(){var t=I(this,er);return I(this,lr)&&(He(this,ei,At()),I(this,er).before(I(this,ei)),t=I(this,ei)),t},ta=function(t){var e=Fe,r=Ge,n=We;jt(I(this,Mr)),It(I(this,Mr)),Ri(I(this,Mr).ctx);try{return t()}catch(o){return ul(o),null}finally{jt(e),It(r),Ri(n)}},ra=function(){const t=I(this,Ir).pending;I(this,cr)!==null&&(He(this,Vr,document.createDocumentFragment()),I(this,Vr).append(I(this,ei)),jl(I(this,cr),I(this,Vr))),I(this,Gt)===null&&He(this,Gt,zt(()=>t(I(this,er))))},zs=function(t){var e;if(!this.has_pending_snippet()){this.parent&&qe(e=this.parent,gt,zs).call(e,t);return}He(this,ti,I(this,ti)+t),I(this,ti)===0&&(He(this,lr,!1),I(this,Gt)&&vi(I(this,Gt),()=>{He(this,Gt,null)}),I(this,Vr)&&(I(this,er).before(I(this,Vr)),He(this,Vr,null)))};function pa(){return Fe.b}function Vd(){Fe===null&&ed();var i=Fe.b;return i===null?0:i.get_effect_pending()}function an(i,t,e,r){const n=sn;if(e.length===0&&i.length===0){r(t.map(n));return}var o=Ve,a=Fe,s=xo();function c(){Promise.all(e.map(l=>ml(l))).then(l=>{s();try{r([...t.map(n),...l])}catch(u){(a.f&xr)===0&&Fr(u,a)}o==null||o.deactivate(),qr()}).catch(l=>{Fr(l,a)})}i.length>0?Promise.all(i).then(()=>{s();try{return c()}finally{o==null||o.deactivate(),qr()}}):c()}function vl(i,t){an(i,[],[],t)}function xo(){var i=Fe,t=Ge,e=We,r=Ve;return function(o=!0){jt(i),It(t),Ri(e),o&&(r==null||r.activate())}}async function jd(i){var t=xo(),e=await i;return()=>(t(),e)}async function ga(i){var t=await i;return()=>t}async function*Ud(i){var r,n;const t=((r=i[Symbol.asyncIterator])==null?void 0:r.call(i))??((n=i[Symbol.iterator])==null?void 0:n.call(i));if(t===void 0)throw new TypeError("value is not async iterable");let e=!1;try{for(;;){const{done:o,value:a}=(await ga(t.next()))();if(o){e=!0;break}yield a}}finally{if(e&&t.return!==void 0)return(await ga(t.return()))().value}}function qr(){jt(null),It(null),Ri(null)}async function Gd(i,t){var e=pa(),r=Ve,n=!e.is_pending();e.update_pending_count(1),r.increment(n);var o=Fe,a=me,s=void 0;a&&(Pt(),s=hi(!1));try{var c=t(i)}finally{s&&(it(s),Pt())}try{await c}catch(l){ko(o)||Fr(l,o)}finally{e.update_pending_count(-1),r.decrement(n),qr()}}function Zd(i){const t=xo();var e=pa(),r=Ve,n=!e.is_pending();e.update_pending_count(1),r.increment(n);var o=Fe,a=null;const s=u=>{a={error:u},ko(o)||Fr(u,o)};var c=Promise.resolve(i[0]()).catch(s),l=[c];for(const u of i.slice(1))c=c.then(()=>{if(a)throw a.error;if(ko(o))throw ui;try{return t(),u()}finally{qr()}}).catch(s).finally(()=>{qr()}),l.push(c);return c.then(()=>Promise.resolve()).finally(()=>{e.update_pending_count(-1),r.decrement(n)}),l}function sn(i){var t=vt|Ot,e=Ge!==null&&(Ge.f&vt)!==0?Ge:null;return Fe!==null&&(Fe.f|=li),{ctx:We,deps:null,effects:null,equals:rl,f:t,fn:i,reactions:null,rv:0,v:ct,wv:0,parent:e??Fe,ac:null}}function ml(i,t){let e=Fe;e===null&&qh();var r=e.b,n=void 0,o=Lt(ct),a=!Ge,s=new Map;return lf(()=>{var f;var c=Ws();n=c.promise;try{Promise.resolve(i()).then(c.resolve,c.reject).then(()=>{l===Ve&&l.committed&&l.deactivate(),qr()})}catch(v){c.reject(v),qr()}var l=Ve;if(a){var u=!r.is_pending();r.update_pending_count(1),l.increment(u),(f=s.get(l))==null||f.reject(ui),s.delete(l),s.set(l,c)}const h=(v,_=void 0)=>{if(l.activate(),_)_!==ui&&(o.f|=Zr,Er(o,_));else{(o.f&Zr)!==0&&(o.f^=Zr),Er(o,v);for(const[d,g]of s){if(s.delete(d),d===l)break;g.reject(ui)}}a&&(r.update_pending_count(-1),l.decrement(u))};c.promise.then(h,v=>h(null,v||"unknown"))}),Qt(()=>{for(const c of s.values())c.reject(ui)}),new Promise(c=>{function l(u){function h(){u===n?c(o):l(n)}u.then(h,h)}l(n)})}function te(i){const t=sn(i);return Gl(t),t}function va(i){const t=sn(i);return t.equals=nl,t}function _l(i){var t=i.effects;if(t!==null){i.effects=null;for(var e=0;e<t.length;e+=1)mt(t[e])}}function Wd(i){for(var t=i.parent;t!==null;){if((t.f&vt)===0)return(t.f&xr)===0?t:null;t=t.parent}return null}function ma(i){var t,e=Fe;jt(Wd(i));try{i.f&=~ci,_l(i),t=Yl(i)}finally{jt(e)}return t}function wl(i){var t=ma(i);if(i.equals(t)||(Ve!=null&&Ve.is_fork||(i.v=t),i.wv=ql()),!_i)if(ot!==null)(gi()||Ve!=null&&Ve.is_fork)&&ot.set(i,t);else{var e=(i.f&dr)===0?yr:Ct;Tt(i,e)}}let To=new Set;const Xr=new Map;function qd(i){To=i}let bl=!1;function Lt(i,t){var e={f:0,v:i,reactions:null,equals:rl,rv:0,wv:0};return e}function Pe(i,t){const e=Lt(i);return Gl(e),e}function Eo(i,t=!1,e=!0){const r=Lt(i);return t||(r.equals=nl),r}function Xd(i,t){return _e(i,et(()=>p(i))),t}function _e(i,t,e=!1){Ge!==null&&(!Sr||(Ge.f&ho)!==0)&&ll()&&(Ge.f&(vt|br|fo|ho))!==0&&!(Ht!=null&&Ht.includes(i))&&cd();let r=e?xt(t):t;return Er(i,r)}function Er(i,t){if(!i.equals(t)){var e=i.v;_i?Xr.set(i,t):Xr.set(i,e),i.v=t;var r=Xt.ensure();r.capture(i,e),(i.f&vt)!==0&&((i.f&Ot)!==0&&ma(i),Tt(i,(i.f&dr)!==0?Ct:yr)),i.wv=ql(),xl(i,Ot),Fe!==null&&(Fe.f&Ct)!==0&&(Fe.f&(Hr|Gr))===0&&(nr===null?ff([i]):nr.push(i)),!r.is_fork&&To.size>0&&!bl&&yl()}return t}function yl(){bl=!1;var i=mi;So(!0);const t=Array.from(To);try{for(const e of t)(e.f&Ct)!==0&&Tt(e,yr),Oi(e)&&Di(e)}finally{So(i)}To.clear()}function ln(i,t=1){var e=p(i),r=t===1?e++:e--;return _e(i,e),r}function Yd(i,t=1){var e=p(i);return _e(i,t===1?++e:--e)}function Yt(i){_e(i,i.v+1)}function xl(i,t){var e=i.reactions;if(e!==null)for(var r=e.length,n=0;n<r;n++){var o=e[n],a=o.f,s=(a&Ot)===0;if(s&&Tt(o,t),(a&vt)!==0){var c=o;ot==null||ot.delete(c),(a&ci)===0&&(a&dr&&(o.f|=ci),xl(c,yr))}else s&&((a&br)!==0&&pr!==null&&pr.add(o),pi(o))}}function xt(i){if(typeof i!="object"||i===null||Dt in i)return i;const t=so(i);if(t!==Us&&t!==zh)return i;var e=new Map,r=ai(i),n=Pe(0),o=gr,a=s=>{if(gr===o)return s();var c=Ge,l=gr;It(null),Wl(o);var u=s();return It(c),Wl(l),u};return r&&e.set("length",Pe(i.length)),new Proxy(i,{defineProperty(s,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&sd();var u=e.get(c);return u===void 0?u=a(()=>{var h=Pe(l.value);return e.set(c,h),h}):_e(u,l.value,!0),!0},deleteProperty(s,c){var l=e.get(c);if(l===void 0){if(c in s){const u=a(()=>Pe(ct));e.set(c,u),Yt(n)}}else _e(l,ct),Yt(n);return!0},get(s,c,l){var v;if(c===Dt)return i;var u=e.get(c),h=c in s;if(u===void 0&&(!h||(v=hr(s,c))!=null&&v.writable)&&(u=a(()=>{var _=xt(h?s[c]:ct),d=Pe(_);return d}),e.set(c,u)),u!==void 0){var f=p(u);return f===ct?void 0:f}return Reflect.get(s,c,l)},getOwnPropertyDescriptor(s,c){var l=Reflect.getOwnPropertyDescriptor(s,c);if(l&&"value"in l){var u=e.get(c);u&&(l.value=p(u))}else if(l===void 0){var h=e.get(c),f=h==null?void 0:h.v;if(h!==void 0&&f!==ct)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return l},has(s,c){var f;if(c===Dt)return!0;var l=e.get(c),u=l!==void 0&&l.v!==ct||Reflect.has(s,c);if(l!==void 0||Fe!==null&&(!u||(f=hr(s,c))!=null&&f.writable)){l===void 0&&(l=a(()=>{var v=u?xt(s[c]):ct,_=Pe(v);return _}),e.set(c,l));var h=p(l);if(h===ct)return!1}return u},set(s,c,l,u){var P;var h=e.get(c),f=c in s;if(r&&c==="length")for(var v=l;v<h.v;v+=1){var _=e.get(v+"");_!==void 0?_e(_,ct):v in s&&(_=a(()=>Pe(ct)),e.set(v+"",_))}if(h===void 0)(!f||(P=hr(s,c))!=null&&P.writable)&&(h=a(()=>Pe(void 0)),_e(h,xt(l)),e.set(c,h));else{f=h.v!==ct;var d=a(()=>xt(l));_e(h,d)}var g=Reflect.getOwnPropertyDescriptor(s,c);if(g!=null&&g.set&&g.set.call(u,l),!f){if(r&&typeof c=="string"){var b=e.get("length"),S=Number(c);Number.isInteger(S)&&S>=b.v&&_e(b,S+1)}Yt(n)}return!0},ownKeys(s){p(n);var c=Reflect.ownKeys(s).filter(h=>{var f=e.get(h);return f===void 0||f.v!==ct});for(var[l,u]of e)u.v!==ct&&!(l in s)&&c.push(l);return c},setPrototypeOf(){ld()}})}function Mi(i){try{if(i!==null&&typeof i=="object"&&Dt in i)return i[Dt]}catch{}return i}function Tl(i,t){return Object.is(Mi(i),Mi(t))}function Kd(i,t,e=!0){try{i===t!=(Mi(i)===Mi(t))&&el(e?"===":"!==")}catch{}return i===t===e}function Qd(i,t,e=!0){return i==t!=(Mi(i)==Mi(t))&&el(),i==t===e}var _a,El,wa,kl,Sl;function ba(){if(_a===void 0){_a=window,El=document,wa=/Firefox/.test(navigator.userAgent);var i=Element.prototype,t=Node.prototype,e=Text.prototype;kl=hr(t,"firstChild").get,Sl=hr(t,"nextSibling").get,Gs(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Gs(e)&&(e.__t=void 0)}}function At(i=""){return document.createTextNode(i)}function at(i){return kl.call(i)}function Kt(i){return Sl.call(i)}function G(i,t){if(!me)return at(i);var e=at(De);if(e===null)e=De.appendChild(At());else if(t&&e.nodeType!==go){var r=At();return e==null||e.before(r),it(r),r}return it(e),e}function W(i,t=!1){if(!me){var e=at(i);return e instanceof Comment&&e.data===""?Kt(e):e}if(t&&(De==null?void 0:De.nodeType)!==go){var r=At();return De==null||De.before(r),it(r),r}return De}function se(i,t=1,e=!1){let r=me?De:i;for(var n;t--;)n=r,r=Kt(r);if(!me)return r;if(e&&(r==null?void 0:r.nodeType)!==go){var o=At();return r===null?n==null||n.after(o):r.before(o),it(o),o}return it(r),r}function ya(i){i.textContent=""}function Cl(){return!1}function Jd(i,t,e){let r=e?{is:e}:void 0;return t?document.createElementNS(t,i,r):document.createElement(i,r)}function $d(){return document.createDocumentFragment()}function ef(i=""){return document.createComment(i)}function tf(i,t,e=""){if(t.startsWith("xlink:")){i.setAttributeNS("http://www.w3.org/1999/xlink",t,e);return}return i.setAttribute(t,e)}function Pl(i,t){if(t){const e=document.body;i.autofocus=!0,qt(()=>{document.activeElement===e&&i.focus()})}}function rf(i){me&&at(i)!==null&&ya(i)}let Al=!1;function Rl(){Al||(Al=!0,document.addEventListener("reset",i=>{Promise.resolve().then(()=>{var t;if(!i.defaultPrevented)for(const e of i.target.elements)(t=e.__on_r)==null||t.call(e)})},{capture:!0}))}function Bt(i,t,e,r=!0){r&&e();for(var n of t)i.addEventListener(n,e);Qt(()=>{for(var o of t)i.removeEventListener(o,e)})}function Yr(i){var t=Ge,e=Fe;It(null),jt(null);try{return i()}finally{It(t),jt(e)}}function cn(i,t,e,r=e){i.addEventListener(t,()=>Yr(e));const n=i.__on_r;n?i.__on_r=()=>{n(),r(!0)}:i.__on_r=()=>r(!0),Rl()}function xa(i){Fe===null&&(Ge===null&&$h(),Jh()),_i&&Qh()}function nf(i,t){var e=t.last;e===null?t.last=t.first=i:(e.next=i,i.prev=e,t.last=i)}function Vt(i,t,e){var r=Fe;r!==null&&(r.f&Wt)!==0&&(i|=Wt);var n={ctx:We,deps:null,nodes:null,f:i|Ot|dr,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(e)try{Di(n),n.f|=tn}catch(s){throw mt(n),s}else t!==null&&pi(n);var o=n;if(e&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&li)===0&&(o=o.first,(i&br)!==0&&(i&fr)!==0&&o!==null&&(o.f|=fr)),o!==null&&(o.parent=r,r!==null&&nf(o,r),Ge!==null&&(Ge.f&vt)!==0&&(i&Gr)===0)){var a=Ge;(a.effects??(a.effects=[])).push(o)}return n}function gi(){return Ge!==null&&!Sr}function Qt(i){const t=Vt(co,null,!1);return Tt(t,Ct),t.teardown=i,t}function st(i){xa();var t=Fe.f,e=!Ge&&(t&Hr)!==0&&(t&tn)===0;if(e){var r=We;(r.e??(r.e=[])).push(i)}else return Il(i)}function Il(i){return Vt(lo|Xs,i,!1)}function Ml(i){return xa(),Vt(co|Xs,i,!0)}function Ol(i){return Vt(ho,i,!0)}function Dl(i){Xt.ensure();const t=Vt(Gr|li,i,!0);return()=>{mt(t)}}function of(i){Xt.ensure();const t=Vt(Gr|li,i,!0);return(e={})=>new Promise(r=>{e.outro?vi(t,()=>{mt(t),r(void 0)}):(mt(t),r(void 0))})}function Jt(i){return Vt(lo,i,!1)}function af(i,t){var e=We,r={effect:null,ran:!1,deps:i};e.l.$.push(r),r.effect=ht(()=>{i(),!r.ran&&(r.ran=!0,et(t))})}function sf(){var i=We;ht(()=>{for(var t of i.l.$){t.deps();var e=t.effect;(e.f&Ct)!==0&&Tt(e,yr),Oi(e)&&Di(e),t.ran=!1}})}function lf(i){return Vt(fo|li,i,!0)}function ht(i,t=0){return Vt(co|t,i,!0)}function Re(i,t=[],e=[],r=[]){an(r,t,e,n=>{Vt(co,()=>i(...n.map(p)),!0)})}function cf(i,t=[],e=[],r=[]){var n=Ve,o=e.length>0||r.length>0;o&&n.increment(!0),an(r,t,e,a=>{Vt(lo,()=>i(...a.map(p)),!1),o&&n.decrement(!0)})}function kr(i,t=0){var e=Vt(br|t,i,!0);return e}function Ll(i,t=0){var e=Vt(qs|t,i,!0);return e}function zt(i){return Vt(Hr|li,i,!0)}function zl(i){var t=i.teardown;if(t!==null){const e=_i,r=Ge;Ul(!0),It(null);try{t.call(null)}finally{Ul(e),It(r)}}}function Hl(i,t=!1){var e=i.first;for(i.first=i.last=null;e!==null;){const n=e.ac;n!==null&&Yr(()=>{n.abort(ui)});var r=e.next;(e.f&Gr)!==0?e.parent=null:mt(e,t),e=r}}function uf(i){for(var t=i.first;t!==null;){var e=t.next;(t.f&Hr)===0&&mt(t),t=e}}function mt(i,t=!0){var e=!1;(t||(i.f&la)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(Nl(i.nodes.start,i.nodes.end),e=!0),Hl(i,t&&!e),Co(i,0),Tt(i,xr);var r=i.nodes&&i.nodes.t;if(r!==null)for(const o of r)o.stop();zl(i);var n=i.parent;n!==null&&n.first!==null&&Fl(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=null}function Nl(i,t){for(;i!==null;){var e=i===t?null:Kt(i);i.remove(),i=e}}function Fl(i){var t=i.parent,e=i.prev,r=i.next;e!==null&&(e.next=r),r!==null&&(r.prev=e),t!==null&&(t.first===i&&(t.first=r),t.last===i&&(t.last=e))}function vi(i,t,e=!0){var r=[];Bl(i,r,!0);var n=()=>{e&&mt(i),t&&t()},o=r.length;if(o>0){var a=()=>--o||n();for(var s of r)s.out(a)}else n()}function Bl(i,t,e){if((i.f&Wt)===0){i.f^=Wt;var r=i.nodes&&i.nodes.t;if(r!==null)for(const s of r)(s.is_global||e)&&t.push(s);for(var n=i.first;n!==null;){var o=n.next,a=(n.f&fr)!==0||(n.f&Hr)!==0&&(i.f&br)!==0;Bl(n,t,a?e:!1),n=o}}}function Ta(i){Vl(i,!0)}function Vl(i,t){if((i.f&Wt)!==0){i.f^=Wt,(i.f&Ct)===0&&(Tt(i,Ot),pi(i));for(var e=i.first;e!==null;){var r=e.next,n=(e.f&fr)!==0||(e.f&Hr)!==0;Vl(e,n?t:!1),e=r}var o=i.nodes&&i.nodes.t;if(o!==null)for(const a of o)(a.is_global||t)&&a.in()}}function ko(i=Fe){return(i.f&xr)!==0}function jl(i,t){if(i.nodes)for(var e=i.nodes.start,r=i.nodes.end;e!==null;){var n=e===r?null:Kt(e);t.append(e),e=n}}let Kr=null;function hf(i){var t=Kr;try{if(Kr=new Set,et(i),t!==null)for(var e of Kr)t.add(e);return Kr}finally{Kr=t}}function df(i){for(var t of hf(i))Er(t,t.v)}let mi=!1;function So(i){mi=i}let _i=!1;function Ul(i){_i=i}let Ge=null,Sr=!1;function It(i){Ge=i}let Fe=null;function jt(i){Fe=i}let Ht=null;function Gl(i){Ge!==null&&(Ht===null?Ht=[i]:Ht.push(i))}let Nt=null,$t=0,nr=null;function ff(i){nr=i}let Zl=1,un=0,gr=un;function Wl(i){gr=i}function ql(){return++Zl}function Oi(i){var t=i.f;if((t&Ot)!==0)return!0;if(t&vt&&(i.f&=~ci),(t&yr)!==0){var e=i.deps;if(e!==null)for(var r=e.length,n=0;n<r;n++){var o=e[n];if(Oi(o)&&wl(o),o.wv>i.wv)return!0}(t&dr)!==0&&ot===null&&Tt(i,Ct)}return!1}function Xl(i,t,e=!0){var r=i.reactions;if(r!==null&&!(Ht!=null&&Ht.includes(i)))for(var n=0;n<r.length;n++){var o=r[n];(o.f&vt)!==0?Xl(o,t,!1):t===o&&(e?Tt(o,Ot):(o.f&Ct)!==0&&Tt(o,yr),pi(o))}}function Yl(i){var _;var t=Nt,e=$t,r=nr,n=Ge,o=Ht,a=We,s=Sr,c=gr,l=i.f;Nt=null,$t=0,nr=null,Ge=(l&(Hr|Gr))===0?i:null,Ht=null,Ri(i.ctx),Sr=!1,gr=++un,i.ac!==null&&(Yr(()=>{i.ac.abort(ui)}),i.ac=null);try{i.f|=ca;var u=i.fn,h=u(),f=i.deps;if(Nt!==null){var v;if(Co(i,$t),f!==null&&$t>0)for(f.length=$t+Nt.length,v=0;v<Nt.length;v++)f[$t+v]=Nt[v];else i.deps=f=Nt;if(gi()&&(i.f&dr)!==0)for(v=$t;v<f.length;v++)((_=f[v]).reactions??(_.reactions=[])).push(i)}else f!==null&&$t<f.length&&(Co(i,$t),f.length=$t);if(ll()&&nr!==null&&!Sr&&f!==null&&(i.f&(vt|yr|Ot))===0)for(v=0;v<nr.length;v++)Xl(nr[v],i);return n!==null&&n!==i&&(un++,nr!==null&&(r===null?r=nr:r.push(...nr))),(i.f&Zr)!==0&&(i.f^=Zr),h}catch(d){return ul(d)}finally{i.f^=ca,Nt=t,$t=e,nr=r,Ge=n,Ht=o,Ri(a),Sr=s,gr=c}}function pf(i,t){let e=t.reactions;if(e!==null){var r=Lh.call(e,i);if(r!==-1){var n=e.length-1;n===0?e=t.reactions=null:(e[r]=e[n],e.pop())}}e===null&&(t.f&vt)!==0&&(Nt===null||!Nt.includes(t))&&(Tt(t,yr),(t.f&dr)!==0&&(t.f^=dr,t.f&=~ci),_l(t),Co(t,0))}function Co(i,t){var e=i.deps;if(e!==null)for(var r=t;r<e.length;r++)pf(i,e[r])}function Di(i){var t=i.f;if((t&xr)===0){Tt(i,Ct);var e=Fe,r=mi;Fe=i,mi=!0;try{(t&(br|qs))!==0?uf(i):Hl(i),zl(i);var n=Yl(i);i.teardown=typeof n=="function"?n:null,i.wv=Zl;var o;aa&&yd&&(i.f&Ot)!==0&&i.deps}finally{mi=r,Fe=e}}}async function Ea(){await Promise.resolve(),Ft()}function gf(){return Xt.ensure().settled()}function p(i){var t=i.f,e=(t&vt)!==0;if(Kr==null||Kr.add(i),Ge!==null&&!Sr){var r=Fe!==null&&(Fe.f&xr)!==0;if(!r&&!(Ht!=null&&Ht.includes(i))){var n=Ge.deps;if((Ge.f&ca)!==0)i.rv<un&&(i.rv=un,Nt===null&&n!==null&&n[$t]===i?$t++:Nt===null?Nt=[i]:Nt.includes(i)||Nt.push(i));else{(Ge.deps??(Ge.deps=[])).push(i);var o=i.reactions;o===null?i.reactions=[Ge]:o.includes(Ge)||o.push(Ge)}}}if(_i){if(Xr.has(i))return Xr.get(i);if(e){var a=i,s=a.v;return((a.f&Ct)===0&&a.reactions!==null||Ql(a))&&(s=ma(a)),Xr.set(a,s),s}}else e&&(!(ot!=null&&ot.has(i))||Ve!=null&&Ve.is_fork&&!gi())&&(a=i,Oi(a)&&wl(a),mi&&gi()&&(a.f&dr)===0&&Kl(a));if(ot!=null&&ot.has(i))return ot.get(i);if((i.f&Zr)!==0)throw i.v;return i.v}function Kl(i){if(i.deps!==null){i.f^=dr;for(const t of i.deps)(t.reactions??(t.reactions=[])).push(i),(t.f&vt)!==0&&(t.f&dr)===0&&Kl(t)}}function Ql(i){if(i.v===ct)return!0;if(i.deps===null)return!1;for(const t of i.deps)if(Xr.has(t)||(t.f&vt)!==0&&Ql(t))return!0;return!1}function vf(i){return i&&p(i)}function et(i){var t=Sr;try{return Sr=!0,i()}finally{Sr=t}}const mf=-7169;function Tt(i,t){i.f=i.f&mf|t}function _f(i,t){var e={};for(var r in i)t.includes(r)||(e[r]=i[r]);for(var n of Object.getOwnPropertySymbols(i))Object.propertyIsEnumerable.call(i,n)&&!t.includes(n)&&(e[n]=i[n]);return e}function ka(i){if(!(typeof i!="object"||!i||i instanceof EventTarget)){if(Dt in i)Po(i);else if(!Array.isArray(i))for(let t in i){const e=i[t];typeof e=="object"&&e&&Dt in e&&Po(e)}}}function Po(i,t=new Set){if(typeof i=="object"&&i!==null&&!(i instanceof EventTarget)&&!t.has(i)){t.add(i),i instanceof Date&&i.getTime();for(let r in i)try{Po(i[r],t)}catch{}const e=so(i);if(e!==Object.prototype&&e!==Array.prototype&&e!==Map.prototype&&e!==Set.prototype&&e!==Date.prototype){const r=js(e);for(let n in r){const o=r[n].get;if(o)try{o.call(i)}catch{}}}}}function wf(i,t){var e;if(Qs(),me){const r=(e=window.__svelte)==null?void 0:e.h;if(r!=null&&r.has(i))return r.get(i);gd()}return t()}const Jl=new Set,Sa=new Set;function bf(i){if(!me)return;i.removeAttribute("onload"),i.removeAttribute("onerror");const t=i.__e;t!==void 0&&(i.__e=void 0,queueMicrotask(()=>{i.isConnected&&i.dispatchEvent(t)}))}function $l(i,t,e,r={}){function n(o){if(r.capture||hn.call(t,o),!o.cancelBubble)return Yr(()=>e==null?void 0:e.call(this,o))}return i.startsWith("pointer")||i.startsWith("touch")||i==="wheel"?qt(()=>{t.addEventListener(i,n,r)}):t.addEventListener(i,n,r),n}function Ao(i,t,e,r,n){var o={capture:r,passive:n},a=$l(i,t,e,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Qt(()=>{t.removeEventListener(i,a,o)})}function Qr(i){for(var t=0;t<i.length;t++)Jl.add(i[t]);for(var e of Sa)e(i)}let ec=null;function hn(i){var g;var t=this,e=t.ownerDocument,r=i.type,n=((g=i.composedPath)==null?void 0:g.call(i))||[],o=n[0]||i.target;ec=i;var a=0,s=ec===i&&i.__root;if(s){var c=n.indexOf(s);if(c!==-1&&(t===document||t===window)){i.__root=t;return}var l=n.indexOf(t);if(l===-1)return;c<=l&&(a=c)}if(o=n[a]||i.target,o!==t){si(i,"currentTarget",{configurable:!0,get(){return o||e}});var u=Ge,h=Fe;It(null),jt(null);try{for(var f,v=[];o!==null;){var _=o.assignedSlot||o.parentNode||o.host||null;try{var d=o["__"+r];d!=null&&(!o.disabled||i.target===o)&&d.call(o,i)}catch(b){f?v.push(b):f=b}if(i.cancelBubble||_===t||_===null)break;o=_}if(f){for(let b of v)queueMicrotask(()=>{throw b});throw f}}finally{i.__root=t,delete i.currentTarget,It(u),jt(h)}}}function yf(i,t,e,r,n,o=!1,a=!1){var l,u;let s,c;try{s=i()}catch(h){c=h}if(typeof s!="function"&&(o||s!=null||c)){const h=r==null?void 0:r[Zt];n?`${h}${n[0]}${n[1]}`:`${h}`;const f=((l=e[0])==null?void 0:l.eventPhase)<Event.BUBBLING_PHASE?"capture":"";if(((u=e[0])==null?void 0:u.type)+f,pd(),c)throw c}s==null||s.apply(t,e)}function Ro(i){var t=document.createElement("template");return t.innerHTML=i.replaceAll("<!>","<!---->"),t.content}function Et(i,t){var e=Fe;e.nodes===null&&(e.nodes={start:i,end:t,a:null,t:null})}function ge(i,t){var e=(t&na)!==0,r=(t&Ns)!==0,n,o=!i.startsWith("<!>");return()=>{if(me)return Et(De,null),De;n===void 0&&(n=Ro(o?i:"<!>"+i),e||(n=at(n)));var a=r||wa?document.importNode(n,!0):n.cloneNode(!0);if(e){var s=at(a),c=a.lastChild;Et(s,c)}else Et(a,a);return a}}function tc(i,t,e="svg"){var r=!i.startsWith("<!>"),n=(t&na)!==0,o=`<${e}>${r?i:"<!>"+i}</${e}>`,a;return()=>{if(me)return Et(De,null),De;if(!a){var s=Ro(o),c=at(s);if(n)for(a=document.createDocumentFragment();at(c);)a.appendChild(at(c));else a=at(c)}var l=a.cloneNode(!0);if(n){var u=at(l),h=l.lastChild;Et(u,h)}else Et(l,l);return l}}function Q(i,t){return tc(i,t,"svg")}function xf(i,t){return tc(i,t,"math")}function rc(i,t){var e=$d();for(var r of i){if(typeof r=="string"){e.append(At(r));continue}if(r===void 0||r[0][0]==="/"){e.append(ef(r?r[0].slice(3):""));continue}const[s,c,...l]=r,u=s==="svg"?no:s==="math"?Bs:t;var n=Jd(s,u,c==null?void 0:c.is);for(var o in c)tf(n,o,c[o]);if(l.length>0){var a=n.tagName==="TEMPLATE"?n.content:n;a.append(rc(l,n.tagName==="foreignObject"?void 0:u))}e.append(n)}return e}function Tf(i,t){var e=(t&na)!==0,r=(t&Ns)!==0,n;return()=>{if(me)return Et(De,null),De;if(n===void 0){const c=(t&Mh)!==0?no:(t&Oh)!==0?Bs:void 0;n=rc(i,c),e||(n=at(n))}var o=r||wa?document.importNode(n,!0):n.cloneNode(!0);if(e){var a=at(o),s=o.lastChild;Et(a,s)}else Et(o,o);return o}}function Ef(i){return()=>kf(i())}function kf(i){if(me)return i;const t=i.nodeType===Ks,e=i.tagName==="SCRIPT"?[i]:i.querySelectorAll("script"),r=Fe;for(const o of e){const a=document.createElement("script");for(var n of o.attributes)a.setAttribute(n.name,n.value);a.textContent=o.textContent,(t?i.firstChild===o:i===o)&&(r.nodes.start=a),(t?i.lastChild===o:i===o)&&(r.nodes.end=a),o.replaceWith(a)}return i}function pt(i=""){if(!me){var t=At(i+"");return Et(t,t),t}var e=De;return e.nodeType!==go&&(e.before(e=At()),it(e)),Et(e,e),e}function J(){if(me)return Et(De,null),De;var i=document.createDocumentFragment(),t=document.createComment(""),e=At();return i.append(t,e),Et(t,e),i}function x(i,t){if(me){var e=Fe;((e.f&tn)===0||e.nodes.end===null)&&(e.nodes.end=De),Pt();return}i!==null&&i.before(t)}function Sf(){var i,t;if(me&&De&&De.nodeType===Tr&&((i=De.textContent)!=null&&i.startsWith("$"))){const e=De.textContent.substring(1);return Pt(),e}return(t=window.__svelte??(window.__svelte={})).uid??(t.uid=1),`c${window.__svelte.uid++}`}const Cf=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Pf(i){return Cf.includes(i)||i.toLowerCase()==="!doctype"}function Af(i){return i.endsWith("capture")&&i!=="gotpointercapture"&&i!=="lostpointercapture"}const Rf=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function If(i){return Rf.includes(i)}const Mf={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Of(i){return i=i.toLowerCase(),Mf[i]??i}const Df=["touchstart","touchmove"];function Lf(i){return Df.includes(i)}const zf=["textarea","script","style","title"];function Hf(i){return zf.includes(i)}function ic(i){return i==null?void 0:i.replace(/\//g,"/")}let Io=!0;function Li(i){Io=i}function Xe(i,t){var e=t==null?"":typeof t=="object"?t+"":t;e!==(i.__t??(i.__t=i.nodeValue))&&(i.__t=e,i.nodeValue=e+"")}function Ca(i,t){return oc(i,t)}function nc(i,t){ba(),t.intro=t.intro??!1;const e=t.target,r=me,n=De;try{for(var o=at(e);o&&(o.nodeType!==Tr||o.data!==oa);)o=Kt(o);if(!o)throw oi;ut(!0),it(o);const a=oc(i,{...t,anchor:o});return ut(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
5
|
+
`).some(s=>s.startsWith("https://svelte.dev/e/")))throw a;return a!==oi&&console.warn("Failed to hydrate: ",a),t.recover===!1&&od(),ba(),ya(e),ut(!1),Ca(i,t)}finally{ut(r),it(n)}}const zi=new Map;function oc(i,{target:t,anchor:e,props:r={},events:n,context:o,intro:a=!0}){ba();var s=new Set,c=h=>{for(var f=0;f<h.length;f++){var v=h[f];if(!s.has(v)){s.add(v);var _=Lf(v);t.addEventListener(v,hn,{passive:_});var d=zi.get(v);d===void 0?(document.addEventListener(v,hn,{passive:_}),zi.set(v,1)):zi.set(v,d+1)}}};c(oo(Jl)),Sa.add(c);var l=void 0,u=of(()=>{var h=e??t.appendChild(At());return gl(h,{pending:()=>{}},f=>{if(o){Ke({});var v=We;v.c=o}if(n&&(r.$$events=n),me&&Et(f,null),Io=a,l=i(f,r)||{},Io=!0,me&&(Fe.nodes.end=De,De===null||De.nodeType!==Tr||De.data!==io))throw rn(),oi;o&&Qe()}),()=>{var _;for(var f of s){t.removeEventListener(f,hn);var v=zi.get(f);--v===0?(document.removeEventListener(f,hn),zi.delete(f)):zi.set(f,v)}Sa.delete(c),h!==e&&((_=h.parentNode)==null||_.removeChild(h))}});return Pa.set(l,u),l}let Pa=new WeakMap;function ac(i,t){const e=Pa.get(i);return e?(Pa.delete(i),e(t)):Promise.resolve()}function Nf(i){const t=i();t&&Pf(t)&&xd()}function Ff(i){const t=i();t&&!(typeof t=="string")&&Wh()}function Bf(i,t){i!=null&&typeof i.subscribe!="function"&&Zh()}function sc(i){return i.toString=()=>(Gh(),""),i}class Hi{constructor(t,e=!0){nt(this,"anchor");ve(this,vr,new Map);ve(this,Dr,new Map);ve(this,tr,new Map);ve(this,Ei,new Set);ve(this,En,!0);ve(this,kn,()=>{var t=Ve;if(I(this,vr).has(t)){var e=I(this,vr).get(t),r=I(this,Dr).get(e);if(r)Ta(r),I(this,Ei).delete(e);else{var n=I(this,tr).get(e);n&&(I(this,Dr).set(e,n.effect),I(this,tr).delete(e),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[o,a]of I(this,vr)){if(I(this,vr).delete(o),o===t)break;const s=I(this,tr).get(a);s&&(mt(s.effect),I(this,tr).delete(a))}for(const[o,a]of I(this,Dr)){if(o===e||I(this,Ei).has(o))continue;const s=()=>{if(Array.from(I(this,vr).values()).includes(o)){var l=document.createDocumentFragment();jl(a,l),l.append(At()),I(this,tr).set(o,{effect:a,fragment:l})}else mt(a);I(this,Ei).delete(o),I(this,Dr).delete(o)};I(this,En)||!r?(I(this,Ei).add(o),vi(a,s,!1)):s()}}});ve(this,Yo,t=>{I(this,vr).delete(t);const e=Array.from(I(this,vr).values());for(const[r,n]of I(this,tr))e.includes(r)||(mt(n.effect),I(this,tr).delete(r))});this.anchor=t,He(this,En,e)}ensure(t,e){var r=Ve,n=Cl();if(e&&!I(this,Dr).has(t)&&!I(this,tr).has(t))if(n){var o=document.createDocumentFragment(),a=At();o.append(a),I(this,tr).set(t,{effect:zt(()=>e(a)),fragment:o})}else I(this,Dr).set(t,zt(()=>e(this.anchor)));if(I(this,vr).set(r,t),n){for(const[s,c]of I(this,Dr))s===t?r.skipped_effects.delete(c):r.skipped_effects.add(c);for(const[s,c]of I(this,tr))s===t?r.skipped_effects.delete(c.effect):r.skipped_effects.add(c.effect);r.oncommit(I(this,kn)),r.ondiscard(I(this,Yo))}else me&&(this.anchor=De),I(this,kn).call(this)}}vr=new WeakMap,Dr=new WeakMap,tr=new WeakMap,Ei=new WeakMap,En=new WeakMap,kn=new WeakMap,Yo=new WeakMap;function _t(i,t,...e){var r=new Hi(i);kr(()=>{const n=t()??null;r.ensure(n,n&&(o=>n(o,...e)))},fr)}function Vf(i,t){const e=(r,...n)=>{var o=nn;sl(i);try{return t(r,...n)}finally{sl(o)}};return sc(e),e}function jf(i){return(t,...e)=>{var c;var r=i(...e),n;if(me)n=De,Pt();else{var o=r.render().trim(),a=Ro(o);n=at(a),t.before(n)}const s=(c=r.setup)==null?void 0:c.call(r,n);Et(n,n),typeof s=="function"&&Qt(s)}}function Uf(){return Ge===null&&nd(),(Ge.ac??(Ge.ac=new AbortController)).signal}function Aa(i){We===null&&Pi(),st(()=>{const t=et(i);if(typeof t=="function")return t})}function Ra(i){We===null&&Pi(),Aa(()=>()=>et(i))}function Gf(i,t,{bubbles:e=!1,cancelable:r=!1}={}){return new CustomEvent(i,{detail:t,bubbles:e,cancelable:r})}function Zf(){const i=We;return i===null&&Pi(),(t,e,r)=>{var o;const n=(o=i.s.$$events)==null?void 0:o[t];if(n){const a=ai(n)?n.slice():[n],s=Gf(t,e,r);for(const c of a)c.call(i.x,s);return!s.defaultPrevented}return!0}}function Wf(i){We===null&&Pi(),We.l===null&&$s(),lc(We).b.push(i)}function qf(i){We===null&&Pi(),We.l===null&&$s(),lc(We).a.push(i)}function lc(i){var t=i.l;return t.u??(t.u={a:[],b:[],m:[]})}const Xf=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:qf,beforeUpdate:Wf,createContext:Rd,createEventDispatcher:Zf,createRawSnippet:jf,flushSync:Ft,fork:Hd,getAbortSignal:Uf,getAllContexts:Id,getContext:Wr,hasContext:ha,hydratable:wf,hydrate:nc,mount:Ca,onDestroy:Ra,onMount:Aa,setContext:ua,settled:gf,tick:Ea,unmount:ac,untrack:et},Symbol.toStringTag,{value:"Module"}));function Yf(){return Symbol(Vs)}function Mo(i,t,e,r){return i!==t&&hd(e,ic(r)),i}function Kf(i,t,e,r){return Mo(i[t]=e,et(()=>i[t]),t,r)}function Qf(i,t,e,r){return Mo(i[t]&&(i[t]=e),et(()=>i[t]),t,r)}function Jf(i,t,e,r){return Mo(i[t]||(i[t]=e),et(()=>i[t]),t,r)}function $f(i,t,e,r){return Mo(i[t]??(i[t]=e),et(()=>i[t]),t,r)}var cc=new Map;function ep(i){var t=cc.get(i);if(t){for(const e of t)e.remove();cc.delete(i)}}function tp(i,t,e){return(...r)=>{const n=i(...r);var o=me?n:n.nodeType===Ks?n.firstChild:n;return uc(o,t,e),n}}function rp(i,t,e){i.__svelte_meta={parent:_o,loc:{file:t,line:e[0],column:e[1]}},e[2]&&uc(i.firstChild,t,e[2])}function uc(i,t,e){for(var r=0,n=0;i&&r<e.length;){if(me&&i.nodeType===Tr){var o=i;o.data===oa||o.data===Si?n+=1:o.data[0]===io&&(n-=1)}n===0&&i.nodeType===Ys&&rp(i,t,e[r++]),i=i.nextSibling}}function ip(i,t){function e(r,n){let o={},a,s=!1;return kr(()=>{const c=t(),l=p(c);if(a){for(var u in o)delete o[u];mt(a)}a=zt(()=>{s&&Li(!1),Object.defineProperties(o,Object.getOwnPropertyDescriptors(new.target?new l(r,n):l(r,n))),s&&Li(!0)})},fr),s=!0,me&&(r=De),o}return e[Zt]=i[Zt],e[Fs]={original:i,source:Lt(i)},e}function np(i){var r;const t=We==null?void 0:We.function,e=(r=We==null?void 0:We.p)==null?void 0:r.function;return{mutation:(n,o,a,s,c)=>{const l=o[0];if(hc(i,l)||!e)return a;let u=i;for(let f=0;f<o.length-1;f++)if(u=u[o[f]],!(u!=null&&u[Dt]))return a;const h=ic(`${t[Zt]}:${s}:${c}`);return md(l,h,n,e[Zt]),a},binding:(n,o,a)=>{var s;!hc(i,n)&&e&&((s=a())!=null&&s[Dt])&&vd(t[Zt],n,o[Zt],e[Zt])}}}function hc(i,t){var r;const e=Dt in i||po in i;return!!((r=hr(i,t))!=null&&r.set)||e&&t in i||!(t in i)}function op(i){i&&Yh(i[Zt]??"a component",i.name)}function ap(){const i=We==null?void 0:We.function;function t(e){Xh(e,i[Zt])}return{$destroy:()=>t("$destroy()"),$on:()=>t("$on(...)"),$set:()=>t("$set(...)")}}function sp(i,t,e=!1){xa();let r=!0,n=ct;Ol(()=>{try{var o=i()}catch(s){n=s;return}var a=vo(o,!0,!0);et(()=>{if(e){if(t(...a),!r){const s=Cd("$inspect(...)");s&&(console.groupCollapsed("stack trace"),console.log(s),console.groupEnd())}}else t(r?"init":"update",...a)}),r=!1}),ht(()=>{try{i()}catch{}n!==ct&&(console.error(n),n=ct)})}function lp(i,t=[],e=[],r){var n=pa(),o=Ve,a=!n.is_pending();n.update_pending_count(1),o.increment(a);var s=me;if(s){Pt();var c=De,l=hi(!1);it(l)}an(t,[],e,u=>{s&&(ut(!0),it(c));try{for(const h of u)p(h);r(i,...u)}finally{s&&ut(!1),n.update_pending_count(-1),o.decrement(a)}})}function cp(i,...t){(typeof i!="object"||!(i instanceof Node))&&Js();for(let e of t)typeof e!="function"&&Js()}const dc=0,Ia=1;function up(i,t,e,r,n){me&&Pt();var o=ct,a=Lt(o),s=Lt(o),c=new Hi(i);kr(()=>{var l=t(),u=!1;let h=me&&Zs(l)===(i.data===Si);if(h&&(it(hi()),ut(!1)),Zs(l)){var f=xo(),v=!1;const _=d=>{if(!u){v=!0,f(!1),Xt.ensure(),me&&ut(!1);try{d()}finally{qr(),Ii||Ft()}}};l.then(d=>{_(()=>{Er(a,d),c.ensure(Ia,r&&(g=>r(g,a)))})},d=>{_(()=>{if(Er(s,d),c.ensure(Ia,n&&(g=>n(g,s))),!n)throw s.v})}),me?c.ensure(dc,e):qt(()=>{v||_(()=>{c.ensure(dc,e)})})}else Er(a,l),c.ensure(Ia,r&&(_=>r(_,a)));return h&&ut(!0),()=>{u=!0}})}function D(i,t,e=!1){me&&Pt();var r=new Hi(i),n=e?fr:0;function o(a,s){if(me){const l=tl(i)===Si;if(a===l){var c=hi();it(c),r.anchor=c,ut(!1),r.ensure(a,s),ut(!0);return}}r.ensure(a,s)}kr(()=>{var a=!1;t((s,c=!0)=>{a=!0,o(c,s)}),a||o(!1,null)},n)}function hp(i,t,e){me&&Pt();var r=new Hi(i);kr(()=>{var n=t();r.ensure(n,e)})}function dp(i,t){me&&it(at(i)),ht(()=>{var e=t();for(var r in e){var n=e[r];n?i.style.setProperty(r,n):i.style.removeProperty(r)}})}function Ni(i,t){return t}function fp(i,t,e){for(var r=[],n=t.length,o,a=t.length,s=0;s<n;s++){let h=t[s];vi(h,()=>{if(o){if(o.pending.delete(h),o.done.add(h),o.pending.size===0){var f=i.outrogroups;Ma(oo(o.done)),f.delete(o),f.size===0&&(i.outrogroups=null)}}else a-=1},!1)}if(a===0){var c=r.length===0&&e!==null;if(c){var l=e,u=l.parentNode;ya(u),u.append(l),i.items.clear()}Ma(t,!c)}else o={pending:new Set(t),done:new Set},(i.outrogroups??(i.outrogroups=new Set)).add(o)}function Ma(i,t=!0){for(var e=0;e<i.length;e++)mt(i[e],t)}var fc;function Ut(i,t,e,r,n,o=null){var a=i,s=new Map,c=(t&en)!==0;if(c){var l=i;a=me?it(at(l)):l.appendChild(At())}me&&Pt();var u=null,h=va(()=>{var b=e();return ai(b)?b:b==null?[]:oo(b)}),f,v=!0;function _(){g.fallback=u,pp(g,f,a,t,r),u!==null&&(f.length===0?(u.f&Nr)===0?Ta(u):(u.f^=Nr,dn(u,null,a)):vi(u,()=>{u=null}))}var d=kr(()=>{f=p(h);var b=f.length;let S=!1;if(me){var P=tl(a)===Si;P!==(b===0)&&(a=hi(),it(a),ut(!1),S=!0)}for(var E=new Set,R=Ve,F=Cl(),Z=0;Z<b;Z+=1){me&&De.nodeType===Tr&&De.data===io&&(a=De,S=!0,ut(!1));var z=f[Z],M=r(z,Z),O=v?null:s.get(M);O?(O.v&&Er(O.v,z),O.i&&Er(O.i,Z),F&&R.skipped_effects.delete(O.e)):(O=gp(s,v?a:fc??(fc=At()),z,M,Z,n,t,e),v||(O.e.f|=Nr),s.set(M,O)),E.add(M)}if(b===0&&o&&!u&&(v?u=zt(()=>o(a)):(u=zt(()=>o(fc??(fc=At()))),u.f|=Nr)),me&&b>0&&it(hi()),!v)if(F){for(const[$,ee]of s)E.has($)||R.skipped_effects.add(ee.e);R.oncommit(_),R.ondiscard(()=>{})}else _();S&&ut(!0),p(h)}),g={effect:d,items:s,outrogroups:null,fallback:u};v=!1,me&&(a=De)}function pp(i,t,e,r,n){var O,$,ee,ie,L,B,X,ae,oe;var o=(r&Eh)!==0,a=t.length,s=i.items,c=i.effect.first,l,u=null,h,f=[],v=[],_,d,g,b;if(o)for(b=0;b<a;b+=1)_=t[b],d=n(_,b),g=s.get(d).e,(g.f&Nr)===0&&(($=(O=g.nodes)==null?void 0:O.a)==null||$.measure(),(h??(h=new Set)).add(g));for(b=0;b<a;b+=1){if(_=t[b],d=n(_,b),g=s.get(d).e,i.outrogroups!==null)for(const N of i.outrogroups)N.pending.delete(g),N.done.delete(g);if((g.f&Nr)!==0)if(g.f^=Nr,g===c)dn(g,null,e);else{var S=u?u.next:c;g===i.effect.last&&(i.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Jr(i,u,g),Jr(i,g,S),dn(g,S,e),u=g,f=[],v=[],c=u.next;continue}if((g.f&Wt)!==0&&(Ta(g),o&&((ie=(ee=g.nodes)==null?void 0:ee.a)==null||ie.unfix(),(h??(h=new Set)).delete(g))),g!==c){if(l!==void 0&&l.has(g)){if(f.length<v.length){var P=v[0],E;u=P.prev;var R=f[0],F=f[f.length-1];for(E=0;E<f.length;E+=1)dn(f[E],P,e);for(E=0;E<v.length;E+=1)l.delete(v[E]);Jr(i,R.prev,F.next),Jr(i,u,R),Jr(i,F,P),c=P,u=F,b-=1,f=[],v=[]}else l.delete(g),dn(g,c,e),Jr(i,g.prev,g.next),Jr(i,g,u===null?i.effect.first:u.next),Jr(i,u,g),u=g;continue}for(f=[],v=[];c!==null&&c!==g;)(l??(l=new Set)).add(c),v.push(c),c=c.next;if(c===null)continue}(g.f&Nr)===0&&f.push(g),u=g,c=g.next}if(i.outrogroups!==null){for(const N of i.outrogroups)N.pending.size===0&&(Ma(oo(N.done)),(L=i.outrogroups)==null||L.delete(N));i.outrogroups.size===0&&(i.outrogroups=null)}if(c!==null||l!==void 0){var Z=[];if(l!==void 0)for(g of l)(g.f&Wt)===0&&Z.push(g);for(;c!==null;)(c.f&Wt)===0&&c!==i.fallback&&Z.push(c),c=c.next;var z=Z.length;if(z>0){var M=(r&en)!==0&&a===0?e:null;if(o){for(b=0;b<z;b+=1)(X=(B=Z[b].nodes)==null?void 0:B.a)==null||X.measure();for(b=0;b<z;b+=1)(oe=(ae=Z[b].nodes)==null?void 0:ae.a)==null||oe.fix()}fp(i,Z,M)}}o&&qt(()=>{var N,Y;if(h!==void 0)for(g of h)(Y=(N=g.nodes)==null?void 0:N.a)==null||Y.apply()})}function gp(i,t,e,r,n,o,a,s){var c=(a&rt)!==0?(a&kh)===0?Eo(e,!1,!1):Lt(e):null,l=(a&dt)!==0?Lt(n):null;return{v:c,i:l,e:zt(()=>(o(t,c??e,l??n,s),()=>{i.delete(r)}))}}function dn(i,t,e){if(i.nodes)for(var r=i.nodes.start,n=i.nodes.end,o=t&&(t.f&Nr)===0?t.nodes.start:e;r!==null;){var a=Kt(r);if(o.before(r),r===n)return;r=a}}function Jr(i,t,e){t===null?i.effect.first=e:t.next=e,e===null?i.effect.last=t:e.prev=t}function Cr(i,t,e=!1,r=!1,n=!1){var o=i,a="";Re(()=>{var s=Fe;if(a===(a=t()??"")){me&&Pt();return}if(s.nodes!==null&&(Nl(s.nodes.start,s.nodes.end),s.nodes=null),a!==""){if(me){De.data;for(var c=Pt(),l=c;c!==null&&(c.nodeType!==Tr||c.data!=="");)l=c,c=Kt(c);if(c===null)throw rn(),oi;Et(De,l),o=it(c);return}var u=a+"";e?u=`<svg>${u}</svg>`:r&&(u=`<math>${u}</math>`);var h=Ro(u);if((e||r)&&(h=at(h)),Et(at(h),h.lastChild),e||r)for(;at(h);)o.before(at(h));else o.before(h)}})}function vp(i,t,e,r,n){var s;me&&Pt();var o=(s=t.$$slots)==null?void 0:s[e],a=!1;o===!0&&(o=t[e==="default"?"children":e],a=!0),o===void 0?n!==null&&n(i):o(i,a?()=>r:r)}function mp(i){const t={};i.children&&(t.default=!0);for(const e in i.$$slots)t[e]=!0;return t}function Fi(i,t,e){me&&Pt();var r=new Hi(i);kr(()=>{var n=t()??null;r.ensure(n,n&&(o=>e(o,n)))},fr)}const _p=()=>performance.now(),Pr={tick:i=>requestAnimationFrame(i),now:()=>_p(),tasks:new Set};function pc(){const i=Pr.now();Pr.tasks.forEach(t=>{t.c(i)||(Pr.tasks.delete(t),t.f())}),Pr.tasks.size!==0&&Pr.tick(pc)}function wp(i){let t;return Pr.tasks.size===0&&Pr.tick(pc),{promise:new Promise(e=>{Pr.tasks.add(t={c:i,f:e})}),abort(){Pr.tasks.delete(t)}}}function Oo(i,t){Yr(()=>{i.dispatchEvent(new CustomEvent(t))})}function bp(i){if(i==="float")return"cssFloat";if(i==="offset")return"cssOffset";if(i.startsWith("--"))return i;const t=i.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}function gc(i){const t={},e=i.split(";");for(const r of e){const[n,o]=r.split(":");if(!n||o===void 0)break;const a=bp(n.trim());t[a]=o.trim()}return t}const yp=i=>i;let vc=null;function mc(i){vc=i}function xp(i,t,e){var r=vc??Fe,n=r.nodes,o,a,s,c=null;n.a??(n.a={element:i,measure(){o=this.element.getBoundingClientRect()},apply(){if(s==null||s.abort(),a=this.element.getBoundingClientRect(),o.left!==a.left||o.right!==a.right||o.top!==a.top||o.bottom!==a.bottom){const l=t()(this.element,{from:o,to:a},e==null?void 0:e());s=Do(this.element,l,void 0,1,()=>{s==null||s.abort(),s=void 0})}},fix(){if(!i.getAnimations().length){var{position:l,width:u,height:h}=getComputedStyle(i);if(l!=="absolute"&&l!=="fixed"){var f=i.style;c={position:f.position,width:f.width,height:f.height,transform:f.transform},f.position="absolute",f.width=u,f.height=h;var v=i.getBoundingClientRect();if(o.left!==v.left||o.top!==v.top){var _=`translate(${o.left-v.left}px, ${o.top-v.top}px)`;f.transform=f.transform?`${f.transform} ${_}`:_}}}},unfix(){if(c){var l=i.style;l.position=c.position,l.width=c.width,l.height=c.height,l.transform=c.transform}}}),n.a.element=i}function Tp(i,t,e,r){var P;var n=(i&Ah)!==0,o=(i&Rh)!==0,a=n&&o,s=(i&Ih)!==0,c=a?"both":n?"in":"out",l,u=t.inert,h=t.style.overflow,f,v;function _(){return Yr(()=>l??(l=e()(t,(r==null?void 0:r())??{},{direction:c})))}var d={is_global:s,in(){var E;if(t.inert=u,!n){v==null||v.abort(),(E=v==null?void 0:v.reset)==null||E.call(v);return}o||f==null||f.abort(),Oo(t,"introstart"),f=Do(t,_(),v,1,()=>{Oo(t,"introend"),f==null||f.abort(),f=l=void 0,t.style.overflow=h})},out(E){if(!o){E==null||E(),l=void 0;return}t.inert=!0,Oo(t,"outrostart"),v=Do(t,_(),f,0,()=>{Oo(t,"outroend"),E==null||E()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},g=Fe;if(((P=g.nodes).t??(P.t=[])).push(d),n&&Io){var b=s;if(!b){for(var S=g.parent;S&&(S.f&fr)!==0;)for(;(S=S.parent)&&(S.f&br)===0;);b=!S||(S.f&tn)!==0}b&&Jt(()=>{et(()=>d.in())})}}function Do(i,t,e,r,n){var o=r===1;if(Ci(t)){var a,s=!1;return qt(()=>{if(!s){var g=t({direction:o?"in":"out"});a=Do(i,g,e,r,n)}}),{abort:()=>{s=!0,a==null||a.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(e==null||e.deactivate(),!(t!=null&&t.duration))return n(),{abort:wr,deactivate:wr,reset:wr,t:()=>r};const{delay:c=0,css:l,tick:u,easing:h=yp}=t;var f=[];if(o&&e===void 0&&(u&&u(0,1),l)){var v=gc(l(0,1));f.push(v,v)}var _=()=>1-r,d=i.animate(f,{duration:c,fill:"forwards"});return d.onfinish=()=>{d.cancel();var g=(e==null?void 0:e.t())??1-r;e==null||e.abort();var b=r-g,S=t.duration*Math.abs(b),P=[];if(S>0){var E=!1;if(l)for(var R=Math.ceil(S/16.666666666666668),F=0;F<=R;F+=1){var Z=g+b*h(F/R),z=gc(l(Z,1-Z));P.push(z),E||(E=z.overflow==="hidden")}E&&(i.style.overflow="hidden"),_=()=>{var M=d.currentTime;return g+b*h(M/S)},u&&wp(()=>{if(d.playState!=="running")return!1;var M=_();return u(M,1-M),!0})}d=i.animate(P,{duration:S,fill:"forwards"}),d.onfinish=()=>{_=()=>r,u==null||u(r,1-r),n()}},{abort:()=>{d&&(d.cancel(),d.effect=null,d.onfinish=wr)},deactivate:()=>{n=wr},reset:()=>{r===0&&(u==null||u(1,0))},t:()=>_()}}function Ep(i,t,e,r,n,o){let a=me;me&&Pt();var s=null;me&&De.nodeType===Ys&&(s=De,Pt());var c=me?De:i,l=Fe,u=new Hi(c,!1);kr(()=>{const h=t()||null;var f=n?n():e||h==="svg"?no:null;if(h===null){u.ensure(null,null),Li(!0);return}return u.ensure(h,v=>{if(h){if(s=me?s:f?document.createElementNS(f,h):document.createElement(h),Et(s,s),r){me&&Hf(h)&&s.append(document.createComment(""));var _=me?at(s):s.appendChild(At());me&&(_===null?ut(!1):it(_)),mc(l),r(s,_),mc(null)}Fe.nodes.end=s,v.before(s)}me&&it(v)}),Li(!0),()=>{h&&Li(!1)}},fr),Qt(()=>{Li(!0)}),a&&(ut(!0),it(c))}function kp(i,t){let e=null,r=me;var n;if(me){e=De;for(var o=at(document.head);o!==null&&(o.nodeType!==Tr||o.data!==i);)o=Kt(o);if(o===null)ut(!1);else{var a=Kt(o);o.remove(),it(a)}}me||(n=document.head.appendChild(At()));try{kr(()=>t(n),la)}finally{r&&(ut(!0),it(e))}}function Sp(i,t){Jt(()=>{var e=i.getRootNode(),r=e.host?e:e.head??e.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const n=document.createElement("style");n.id=t.hash,n.textContent=t.code,r.appendChild(n)}})}function Ar(i,t,e){Jt(()=>{var r=et(()=>t(i,e==null?void 0:e())||{});if(e&&(r!=null&&r.update)){var n=!1,o={};ht(()=>{var a=e();ka(a),n&&il(o,a)&&(o=a,r.update(a))}),n=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}function _c(i,t){var e=void 0,r;Ll(()=>{e!==(e=t())&&(r&&(mt(r),r=null),e&&(r=zt(()=>{Jt(()=>e(i))})))})}const Cp=/[&"<]/g;function Pp(i,t){const e=String(i??""),r=Cp;r.lastIndex=0;let n="",o=0;for(;r.test(e);){const a=r.lastIndex-1,s=e[a];n+=e.substring(o,a)+(s==="&"?"&":s==='"'?""":"<"),o=a+1}return n+e.substring(o)}function wc(i){var t,e,r="";if(typeof i=="string"||typeof i=="number")r+=i;else if(typeof i=="object")if(Array.isArray(i)){var n=i.length;for(t=0;t<n;t++)i[t]&&(e=wc(i[t]))&&(r&&(r+=" "),r+=e)}else for(e in i)i[e]&&(r&&(r+=" "),r+=e);return r}function Ap(){for(var i,t,e=0,r="",n=arguments.length;e<n;e++)(i=arguments[e])&&(t=wc(i))&&(r&&(r+=" "),r+=t);return r}const bc={translate:new Map([[!0,"yes"],[!1,"no"]])};function Rp(i,t,e=!1){if(i==="hidden"&&t!=="until-found"&&(e=!0),t==null||!t&&e)return"";const r=i in bc&&bc[i].get(t)||t,n=e?"":`="${Pp(r)}"`;return` ${i}${n}`}function Rt(i){return typeof i=="object"?Ap(i):i??""}const yc=[...`
|
|
6
|
+
\r\f \v\uFEFF`];function Ip(i,t,e){var r=i==null?"":""+i;if(t&&(r=r?r+" "+t:t),e){for(var n in e)if(e[n])r=r?r+" "+n:n;else if(r.length)for(var o=n.length,a=0;(a=r.indexOf(n,a))>=0;){var s=a+o;(a===0||yc.includes(r[a-1]))&&(s===r.length||yc.includes(r[s]))?r=(a===0?"":r.substring(0,a))+r.substring(s+1):a=s}}return r===""?null:r}function xc(i,t=!1){var e=t?" !important;":";",r="";for(var n in i){var o=i[n];o!=null&&o!==""&&(r+=" "+n+": "+o+e)}return r}function Oa(i){return i[0]!=="-"||i[1]!=="-"?i.toLowerCase():i}function Mp(i,t){if(t){var e="",r,n;if(Array.isArray(t)?(r=t[0],n=t[1]):r=t,i){i=String(i).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Oa)),n&&c.push(...Object.keys(n).map(Oa));var l=0,u=-1;const d=i.length;for(var h=0;h<d;h++){var f=i[h];if(s?f==="/"&&i[h-1]==="*"&&(s=!1):o?o===f&&(o=!1):f==="/"&&i[h+1]==="*"?s=!0:f==='"'||f==="'"?o=f:f==="("?a++:f===")"&&a--,!s&&o===!1&&a===0){if(f===":"&&u===-1)u=h;else if(f===";"||h===d-1){if(u!==-1){var v=Oa(i.substring(l,u).trim());if(!c.includes(v)){f!==";"&&h++;var _=i.substring(l,h).trim();e+=" "+_+";"}}l=h+1,u=-1}}}}return r&&(e+=xc(r)),n&&(e+=xc(n,!0)),e=e.trim(),e===""?null:e}return i==null?null:String(i)}function Be(i,t,e,r,n,o){var a=i.__className;if(me||a!==e||a===void 0){var s=Ip(e,r,o);(!me||s!==i.getAttribute("class"))&&(s==null?i.removeAttribute("class"):t?i.className=s:i.setAttribute("class",s)),i.__className=e}else if(o&&n!==o)for(var c in o){var l=!!o[c];(n==null||l!==!!n[c])&&i.classList.toggle(c,l)}return o}function Da(i,t={},e,r){for(var n in e){var o=e[n];t[n]!==o&&(e[n]==null?i.style.removeProperty(n):i.style.setProperty(n,o,r))}}function Mt(i,t,e,r){var n=i.__style;if(me||n!==t){var o=Mp(t,r);(!me||o!==i.getAttribute("style"))&&(o==null?i.removeAttribute("style"):i.style.cssText=o),i.__style=t}else r&&(Array.isArray(r)?(Da(i,e==null?void 0:e[0],r[0]),Da(i,e==null?void 0:e[1],r[1],"important")):Da(i,e,r));return r}function fn(i,t,e=!1){if(i.multiple){if(t==null)return;if(!ai(t))return _d();for(var r of i.options)r.selected=t.includes(pn(r));return}for(r of i.options){var n=pn(r);if(Tl(n,t)){r.selected=!0;return}}(!e||t!==void 0)&&(i.selectedIndex=-1)}function La(i){var t=new MutationObserver(()=>{fn(i,i.__value)});t.observe(i,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Qt(()=>{t.disconnect()})}function Op(i,t,e=t){var r=new WeakSet,n=!0;cn(i,"change",o=>{var a=o?"[selected]":":checked",s;if(i.multiple)s=[].map.call(i.querySelectorAll(a),pn);else{var c=i.querySelector(a)??i.querySelector("option:not([disabled])");s=c&&pn(c)}e(s),Ve!==null&&r.add(Ve)}),Jt(()=>{var o=t();if(i===document.activeElement){var a=on??Ve;if(r.has(a))return}if(fn(i,o,n),n&&o===void 0){var s=i.querySelector(":checked");s!==null&&(o=pn(s),e(o))}i.__value=o,n=!1}),La(i)}function pn(i){return"__value"in i?i.__value:i.value}const Bi=Symbol("class"),Vi=Symbol("style"),Tc=Symbol("is custom element"),Ec=Symbol("is html");function Lo(i){if(me){var t=!1,e=()=>{if(!t){if(t=!0,i.hasAttribute("value")){var r=i.value;Ne(i,"value",null),i.value=r}if(i.hasAttribute("checked")){var n=i.checked;Ne(i,"checked",null),i.checked=n}}};i.__on_r=e,qt(e),Rl()}}function Dp(i,t){var e=zo(i);e.value===(e.value=t??void 0)||i.value===t&&(t!==0||i.nodeName!=="PROGRESS")||(i.value=t??"")}function kc(i,t){var e=zo(i);e.checked!==(e.checked=t??void 0)&&(i.checked=t)}function Sc(i,t){t?i.hasAttribute("selected")||i.setAttribute("selected",""):i.removeAttribute("selected")}function Lp(i,t){const e=i.checked;i.defaultChecked=t,i.checked=e}function zp(i,t){const e=i.value;i.defaultValue=t,i.value=e}function Ne(i,t,e,r){var n=zo(i);me&&(n[t]=i.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&i.nodeName==="LINK")||n[t]!==(n[t]=e)&&(t==="loading"&&(i[Bh]=e),e==null?i.removeAttribute(t):typeof e!="string"&&Ha(i).includes(t)?i[t]=e:i.setAttribute(t,e))}function Hp(i,t,e){i.setAttributeNS("http://www.w3.org/1999/xlink",t,e)}function Np(i,t,e){var r=Ge,n=Fe;let o=me;me&&ut(!1),It(null),jt(null);try{t!=="style"&&(za.has(i.getAttribute("is")||i.nodeName)||!customElements||customElements.get(i.getAttribute("is")||i.tagName.toLowerCase())?Ha(i).includes(t):e&&typeof e=="object")?i[t]=e:Ne(i,t,e==null?e:String(e))}finally{It(r),jt(n),o&&ut(!0)}}function Fp(i,t,e,r,n=!1,o=!1){if(me&&n&&i.tagName==="INPUT"){var a=i,s=a.type==="checkbox"?"defaultChecked":"defaultValue";s in e||Lo(a)}var c=zo(i),l=c[Tc],u=!c[Ec];let h=me&&l;h&&ut(!1);var f=t||{},v=i.tagName==="OPTION";for(var _ in t)_ in e||(e[_]=null);e.class?e.class=Rt(e.class):(r||e[Bi])&&(e.class=null),e[Vi]&&(e.style??(e.style=null));var d=Ha(i);for(const F in e){let Z=e[F];if(v&&F==="value"&&Z==null){i.value=i.__value="",f[F]=Z;continue}if(F==="class"){var g=i.namespaceURI==="http://www.w3.org/1999/xhtml";Be(i,g,Z,r,t==null?void 0:t[Bi],e[Bi]),f[F]=Z,f[Bi]=e[Bi];continue}if(F==="style"){Mt(i,Z,t==null?void 0:t[Vi],e[Vi]),f[F]=Z,f[Vi]=e[Vi];continue}var b=f[F];if(!(Z===b&&!(Z===void 0&&i.hasAttribute(F)))){f[F]=Z;var S=F[0]+F[1];if(S!=="$$")if(S==="on"){const z={},M="$$"+F;let O=F.slice(2);var P=If(O);if(Af(O)&&(O=O.slice(0,-7),z.capture=!0),!P&&b){if(Z!=null)continue;i.removeEventListener(O,f[M],z),f[M]=null}if(Z!=null)if(P)i[`__${O}`]=Z,Qr([O]);else{let $=function(ee){f[F].call(this,ee)};f[M]=$l(O,i,$,z)}else P&&(i[`__${O}`]=void 0)}else if(F==="style")Ne(i,F,Z);else if(F==="autofocus")Pl(i,!!Z);else if(!l&&(F==="__value"||F==="value"&&Z!=null))i.value=i.__value=Z;else if(F==="selected"&&v)Sc(i,Z);else{var E=F;u||(E=Of(E));var R=E==="defaultValue"||E==="defaultChecked";if(Z==null&&!l&&!R)if(c[F]=null,E==="value"||E==="checked"){let z=i;const M=t===void 0;if(E==="value"){let O=z.defaultValue;z.removeAttribute(E),z.defaultValue=O,z.value=z.__value=M?O:null}else{let O=z.defaultChecked;z.removeAttribute(E),z.defaultChecked=O,z.checked=M?O:!1}}else i.removeAttribute(F);else R||d.includes(E)&&(l||typeof Z!="string")?(i[E]=Z,E in c&&(c[E]=ct)):typeof Z!="function"&&Ne(i,E,Z)}}}return h&&ut(!0),f}function wt(i,t,e=[],r=[],n=[],o,a=!1,s=!1){an(n,e,r,c=>{var l=void 0,u={},h=i.nodeName==="SELECT",f=!1;if(Ll(()=>{var _=t(...c.map(p)),d=Fp(i,l,_,o,a,s);f&&h&&"value"in _&&fn(i,_.value);for(let b of Object.getOwnPropertySymbols(u))_[b]||mt(u[b]);for(let b of Object.getOwnPropertySymbols(_)){var g=_[b];b.description===Vs&&(!l||g!==l[b])&&(u[b]&&mt(u[b]),u[b]=zt(()=>_c(i,()=>g))),d[b]=g}l=d}),h){var v=i;Jt(()=>{fn(v,l.value,!0),La(v)})}f=!0})}function zo(i){return i.__attributes??(i.__attributes={[Tc]:i.nodeName.includes("-"),[Ec]:i.namespaceURI===Dh})}var za=new Map;function Ha(i){var t=i.getAttribute("is")||i.nodeName,e=za.get(t);if(e)return e;za.set(t,e=[]);for(var r,n=i,o=Element.prototype;o!==n;){r=js(n);for(var a in r)r[a].set&&e.push(a);n=so(n)}return e}function Bp(i){Bt(document,["focusin","focusout"],t=>{t&&t.type==="focusout"&&t.relatedTarget||i(document.activeElement)})}function Cc(i,t,e=t){var r=new WeakSet;cn(i,"input",async n=>{var o=n?i.defaultValue:i.value;if(o=Fa(i)?Ba(o):o,e(o),Ve!==null&&r.add(Ve),await Ea(),o!==(o=t())){var a=i.selectionStart,s=i.selectionEnd,c=i.value.length;if(i.value=o??"",s!==null){var l=i.value.length;a===s&&s===c&&l>c?(i.selectionStart=l,i.selectionEnd=l):(i.selectionStart=a,i.selectionEnd=Math.min(s,l))}}}),(me&&i.defaultValue!==i.value||et(t)==null&&i.value)&&(e(Fa(i)?Ba(i.value):i.value),Ve!==null&&r.add(Ve)),ht(()=>{var n=t();if(i===document.activeElement){var o=on??Ve;if(r.has(o))return}Fa(i)&&n===Ba(i.value)||i.type==="date"&&!n&&!i.value||n!==i.value&&(i.value=n??"")})}const Na=new Set;function Vp(i,t,e,r,n=r){var o=e.getAttribute("type")==="checkbox",a=i;let s=!1;if(t!==null)for(var c of t)a=a[c]??(a[c]=[]);a.push(e),cn(e,"change",()=>{var l=e.__value;o&&(l=Pc(a,l,e.checked)),n(l)},()=>n(o?[]:null)),ht(()=>{var l=r();if(me&&e.defaultChecked!==e.checked){s=!0;return}o?(l=l||[],e.checked=l.includes(e.__value)):e.checked=Tl(e.__value,l)}),Qt(()=>{var l=a.indexOf(e);l!==-1&&a.splice(l,1)}),Na.has(a)||(Na.add(a),qt(()=>{a.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),Na.delete(a)})),qt(()=>{if(s){var l;if(o)l=Pc(a,l,e.checked);else{var u=a.find(h=>h.checked);l=u==null?void 0:u.__value}n(l)}})}function jp(i,t,e=t){cn(i,"change",r=>{var n=r?i.defaultChecked:i.checked;e(n)}),(me&&i.defaultChecked!==i.checked||et(t)==null)&&e(i.checked),ht(()=>{var r=t();i.checked=!!r})}function Pc(i,t,e){for(var r=new Set,n=0;n<i.length;n+=1)i[n].checked&&r.add(i[n].__value);return e||r.delete(t),Array.from(r)}function Fa(i){var t=i.type;return t==="number"||t==="range"}function Ba(i){return i===""?null:+i}function Up(i,t,e=t){cn(i,"change",()=>{e(i.files)}),me&&i.files&&e(i.files),ht(()=>{i.files=t()})}function Va(i){for(var t=[],e=0;e<i.length;e+=1)t.push({start:i.start(e),end:i.end(e)});return t}function Gp(i,t,e=t){var r,n,o=()=>{cancelAnimationFrame(r),i.paused||(r=requestAnimationFrame(o));var a=i.currentTime;n!==a&&e(n=a)};r=requestAnimationFrame(o),i.addEventListener("timeupdate",o),ht(()=>{var a=Number(t());n!==a&&!isNaN(a)&&(i.currentTime=n=a)}),Qt(()=>{cancelAnimationFrame(r),i.removeEventListener("timeupdate",o)})}function Zp(i,t){var e;Bt(i,["loadedmetadata","progress","timeupdate","seeking"],()=>{var r=i.buffered;(!e||e.length!==r.length||e.some((n,o)=>r.start(o)!==n.start||r.end(o)!==n.end))&&(e=Va(r),t(e))})}function Wp(i,t){Bt(i,["loadedmetadata"],()=>t(Va(i.seekable)))}function qp(i,t){Bt(i,["timeupdate"],()=>t(Va(i.played)))}function Xp(i,t){Bt(i,["seeking","seeked"],()=>t(i.seeking))}function Yp(i,t){Bt(i,["timeupdate","ended"],()=>t(i.ended))}function Kp(i,t){Bt(i,["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","emptied"],()=>t(i.readyState))}function Qp(i,t,e=t){Jt(()=>{var r=Number(t());r!==i.playbackRate&&!isNaN(r)&&(i.playbackRate=r)}),Jt(()=>{Bt(i,["ratechange"],()=>{e(i.playbackRate)})})}function Jp(i,t,e=t){var r=t(),n=()=>{r!==i.paused&&e(r=i.paused)};Bt(i,["play","pause","canplay"],n,r==null),Jt(()=>{(r=!!t())!==i.paused&&(r?i.pause():i.play().catch(()=>{e(r=!0)}))})}function $p(i,t,e=t){var r=()=>{e(i.volume)};t()==null&&r(),Bt(i,["volumechange"],r,!1),ht(()=>{var n=Number(t());n!==i.volume&&!isNaN(n)&&(i.volume=n)})}function e0(i,t,e=t){var r=()=>{e(i.muted)};t()==null&&r(),Bt(i,["volumechange"],r,!1),ht(()=>{var n=!!t();i.muted!==n&&(i.muted=n)})}function t0(i){Bt(window,["online","offline"],()=>{i(navigator.onLine)})}function r0(i,t,e){var r=hr(i,t);r&&r.set&&(i[t]=e,Qt(()=>{i[t]=null}))}const Qo=class Qo{constructor(t){ve(this,Ko);ve(this,ii,new WeakMap);ve(this,Ki);ve(this,Sn);He(this,Sn,t)}observe(t,e){var r=I(this,ii).get(t)||new Set;return r.add(e),I(this,ii).set(t,r),qe(this,Ko,yh).call(this).observe(t,I(this,Sn)),()=>{var n=I(this,ii).get(t);n.delete(e),n.size===0&&(I(this,ii).delete(t),I(this,Ki).unobserve(t))}}};ii=new WeakMap,Ki=new WeakMap,Sn=new WeakMap,Ko=new WeakSet,yh=function(){return I(this,Ki)??He(this,Ki,new ResizeObserver(t=>{for(var e of t){Qo.entries.set(e.target,e);for(var r of I(this,ii).get(e.target)||[])r(e)}}))},nt(Qo,"entries",new WeakMap);let gn=Qo;var i0=new gn({box:"content-box"}),Ac=new gn({box:"border-box"}),n0=new gn({box:"device-pixel-content-box"});function o0(i,t,e){var r=t==="contentRect"||t==="contentBoxSize"?i0:t==="borderBoxSize"?Ac:n0,n=r.observe(i,o=>e(o[t]));Qt(n)}function a0(i,t,e){var r=Ac.observe(i,()=>e(i[t]));Jt(()=>(et(()=>e(i[t])),r))}function Rc(i,t){return i===t||(i==null?void 0:i[Dt])===t}function ji(i={},t,e,r){return Jt(()=>{var n,o;return ht(()=>{n=o,o=(r==null?void 0:r())||[],et(()=>{i!==e(...o)&&(t(i,...o),n&&Rc(e(...n),i)&&t(null,...n))})}),()=>{qt(()=>{o&&Rc(e(...o),i)&&t(null,...o)})}}),i}function s0(i,t,e,r=e){t.addEventListener("input",()=>{r(t[i])}),ht(()=>{var n=e();if(t[i]!==n)if(n==null){var o=t[i];r(o)}else t[i]=n+""})}function l0(i,t,e,r,n){var o=()=>{r(e[i])};e.addEventListener(t,o),n?ht(()=>{e[i]=n()}):o(),(e===document.body||e===window||e===document)&&Qt(()=>{e.removeEventListener(t,o)})}function c0(i,t){Bt(i,["focus","blur"],()=>{t(i===document.activeElement)})}function u0(i,t,e=t){var r=i==="x",n=()=>Yr(()=>{o=!0,clearTimeout(a),a=setTimeout(s,100),e(window[r?"scrollX":"scrollY"])});addEventListener("scroll",n,{passive:!0});var o=!1,a,s=()=>{o=!1},c=!0;ht(()=>{var l=t();c?c=!1:!o&&l!=null&&(o=!0,clearTimeout(a),r?scrollTo(l,window.scrollY):scrollTo(window.scrollX,l),a=setTimeout(s,100))}),Jt(n),Qt(()=>{removeEventListener("scroll",n)})}function h0(i,t){Bt(window,["resize"],()=>Yr(()=>t(window[i])))}function d0(i){return function(...t){var e=t[0];e.isTrusted&&(i==null||i.apply(this,t))}}function f0(i){return function(...t){var e=t[0];e.target===this&&(i==null||i.apply(this,t))}}function p0(i){return function(...t){var e=t[0];return e.stopPropagation(),i==null?void 0:i.apply(this,t)}}function g0(i){var t=!1;return function(...e){if(!t)return t=!0,i==null?void 0:i.apply(this,e)}}function v0(i){return function(...t){var e=t[0];return e.stopImmediatePropagation(),i==null?void 0:i.apply(this,t)}}function m0(i){return function(...t){var e=t[0];return e.preventDefault(),i==null?void 0:i.apply(this,t)}}function _0(i=!1){const t=We,e=t.l.u;if(!e)return;let r=()=>ka(t.s);if(i){let n=0,o={};const a=sn(()=>{let s=!1;const c=t.s;for(const l in c)c[l]!==o[l]&&(o[l]=c[l],s=!0);return s&&n++,n});r=()=>p(a)}e.b.length&&Ml(()=>{Ic(t,r),sa(e.b)}),st(()=>{const n=et(()=>e.m.map(Hh));return()=>{for(const o of n)typeof o=="function"&&o()}}),e.a.length&&st(()=>{Ic(t,r),sa(e.a)})}function Ic(i,t){if(i.l.s)for(const e of i.l.s)p(e);t()}function w0(i){var t=Lt(0);return function(){return arguments.length===1?(_e(t,p(t)+1),arguments[0]):(p(t),i())}}function b0(i,t){var o;var e=(o=i.$$events)==null?void 0:o[t.type],r=ai(e)?e.slice():e==null?[]:[e];for(var n of r)n.call(this,t)}function y0(i,t,e){var r;i.$$events||(i.$$events={}),(r=i.$$events)[t]||(r[t]=[]),i.$$events[t].push(e)}function x0(i){for(var t in i)t in this&&(this[t]=i[t])}function Mc(i,t,e){if(i==null)return t(void 0),wr;const r=et(()=>i.subscribe(t,e));return r.unsubscribe?()=>r.unsubscribe():r}function T0(i){let t;return Mc(i,e=>t=e)(),t}let vn=!1,ja=Symbol();function E0(i,t,e){const r=e[t]??(e[t]={store:null,source:Eo(void 0),unsubscribe:wr});if(r.store!==i&&!(ja in e))if(r.unsubscribe(),r.store=i??null,i==null)r.source.v=void 0,r.unsubscribe=wr;else{var n=!0;r.unsubscribe=Mc(i,o=>{n?r.source.v=o:_e(r.source,o)}),n=!1}return i&&ja in e?T0(i):p(r.source)}function k0(i,t,e){let r=e[t];return r&&r.store!==i&&(r.unsubscribe(),r.unsubscribe=wr),i}function Oc(i,t){return i.set(t),t}function S0(i,t){var e=i[t];e.store!==null&&Oc(e.store,e.source.v)}function C0(){const i={};function t(){Qt(()=>{for(var e in i)i[e].unsubscribe();si(i,ja,{enumerable:!1,value:!0})})}return[i,t]}function P0(i,t,e){return i.set(e),t}function A0(i,t,e=1){return i.set(t+e),t}function R0(i,t,e=1){const r=t+e;return i.set(r),r}function I0(){vn=!0}function Dc(i){var t=vn;try{return vn=!1,[i(),vn]}finally{vn=t}}function M0(i,t=1){const e=i();return i(e+t),e}function O0(i,t=1){const e=i()+t;return i(e),e}const D0={get(i,t){if(!i.exclude.includes(t))return i.props[t]},set(i,t){return!1},getOwnPropertyDescriptor(i,t){if(!i.exclude.includes(t)&&t in i.props)return{enumerable:!0,configurable:!0,value:i.props[t]}},has(i,t){return i.exclude.includes(t)?!1:t in i.props},ownKeys(i){return Reflect.ownKeys(i.props).filter(t=>!i.exclude.includes(t))}};function bt(i,t,e){return new Proxy({props:i,exclude:t},D0)}const L0={get(i,t){if(!i.exclude.includes(t))return p(i.version),t in i.special?i.special[t]():i.props[t]},set(i,t,e){if(!(t in i.special)){var r=Fe;try{jt(i.parent_effect),i.special[t]=or({get[t](){return i.props[t]}},t,Hs)}finally{jt(r)}}return i.special[t](e),ln(i.version),!0},getOwnPropertyDescriptor(i,t){if(!i.exclude.includes(t)&&t in i.props)return{enumerable:!0,configurable:!0,value:i.props[t]}},deleteProperty(i,t){return i.exclude.includes(t)||(i.exclude.push(t),ln(i.version)),!0},has(i,t){return i.exclude.includes(t)?!1:t in i.props},ownKeys(i){return Reflect.ownKeys(i.props).filter(t=>!i.exclude.includes(t))}};function z0(i,t){return new Proxy({props:i,exclude:t,special:{},version:Lt(0),parent_effect:Fe},L0)}const H0={get(i,t){let e=i.props.length;for(;e--;){let r=i.props[e];if(Ci(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(i,t,e){let r=i.props.length;for(;r--;){let n=i.props[r];Ci(n)&&(n=n());const o=hr(n,t);if(o&&o.set)return o.set(e),!0}return!1},getOwnPropertyDescriptor(i,t){let e=i.props.length;for(;e--;){let r=i.props[e];if(Ci(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const n=hr(r,t);return n&&!n.configurable&&(n.configurable=!0),n}}},has(i,t){if(t===Dt||t===po)return!1;for(let e of i.props)if(Ci(e)&&(e=e()),e!=null&&t in e)return!0;return!1},ownKeys(i){const t=[];for(let e of i.props)if(Ci(e)&&(e=e()),!!e){for(const r in e)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(e))t.includes(r)||t.push(r)}return t}};function mn(...i){return new Proxy({props:i},H0)}function or(i,t,e,r){var S;var n=(e&Ch)!==0,o=(e&Ph)!==0,a=r,s=!0,c=()=>(s&&(s=!1,a=o?et(r):r),a),l;if(n){var u=Dt in i||po in i;l=((S=hr(i,t))==null?void 0:S.set)??(u&&t in i?P=>i[t]=P:void 0)}var h,f=!1;n?[h,f]=Dc(()=>i[t]):h=i[t],h===void 0&&r!==void 0&&(h=c(),l&&(ad(),l(h)));var v;if(v=()=>{var P=i[t];return P===void 0?c():(s=!0,P)},(e&Hs)===0)return v;if(l){var _=i.$$legacy;return(function(P,E){return arguments.length>0?((!E||_||f)&&l(E?v():P),P):v()})}var d=!1,g=((e&Sh)!==0?sn:va)(()=>(d=!1,v()));n&&p(g);var b=Fe;return(function(P,E){if(arguments.length>0){const R=E?p(g):n?xt(P):P;return _e(g,R),d=!0,a!==void 0&&(a=R),P}return _i&&d||(b.f&xr)!==0?g.v:p(g)})}function N0(i,t){ht(()=>{const e=new Map,r=i(),n=ai(r)?r:r==null?[]:Array.from(r),o=n.length;for(let a=0;a<o;a++){const s=t(n[a],a);if(e.has(s)){String(e.get(s));let c=String(s);c.startsWith("[object ")&&(c=null),Kh()}e.set(s,a)}})}function F0(i,t,e,r,n,o){vl(t,()=>{var a=!1;nn==null||nn[Zt],ht(()=>{if(!a){var[s,c]=Dc(e);if(!c){var l=r(),u=!1,h=ht(()=>{u||s[l]});u=!0,h.deps===null&&(dd(),a=!0)}}})})}function B0(i){return new V0(i)}class V0{constructor(t){ve(this,jr);ve(this,ur);var o;var e=new Map,r=(a,s)=>{var c=Eo(s,!1,!1);return e.set(a,c),c};const n=new Proxy({...t.props||{},$$events:{}},{get(a,s){return p(e.get(s)??r(s,Reflect.get(a,s)))},has(a,s){return s===po?!0:(p(e.get(s)??r(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,c){return _e(e.get(s)??r(s,c),c),Reflect.set(a,s,c)}});He(this,ur,(t.hydrate?nc:Ca)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&Ft(),He(this,jr,n.$$events);for(const a of Object.keys(I(this,ur)))a==="$set"||a==="$destroy"||a==="$on"||si(this,a,{get(){return I(this,ur)[a]},set(s){I(this,ur)[a]=s},enumerable:!0});I(this,ur).$set=a=>{Object.assign(n,a)},I(this,ur).$destroy=()=>{ac(I(this,ur))}}$set(t){I(this,ur).$set(t)}$on(t,e){I(this,jr)[t]=I(this,jr)[t]||[];const r=(...n)=>e.call(this,...n);return I(this,jr)[t].push(r),()=>{I(this,jr)[t]=I(this,jr)[t].filter(n=>n!==r)}}$destroy(){I(this,ur).$destroy()}}jr=new WeakMap,ur=new WeakMap;let Lc;typeof HTMLElement=="function"&&(Lc=class extends HTMLElement{constructor(t,e,r){super();nt(this,"$$ctor");nt(this,"$$s");nt(this,"$$c");nt(this,"$$cn",!1);nt(this,"$$d",{});nt(this,"$$r",!1);nt(this,"$$p_d",{});nt(this,"$$l",{});nt(this,"$$l_u",new Map);nt(this,"$$me");this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return o=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),x(o,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=j0(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=Ho(o,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=B0({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Dl(()=>{ht(()=>{var n;this.$$r=!0;for(const o of ao(this.$$c)){if(!((n=this.$$p_d[o])!=null&&n.reflect))continue;this.$$d[o]=this.$$c[o];const a=Ho(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1})});for(const n in this.$$l)for(const o of this.$$l[n]){const a=this.$$c.$on(n,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(t,e,r){var n;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ho(t,r,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return ao(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ho(i,t,e,r){var o;const n=(o=e[i])==null?void 0:o.type;if(t=n==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!e[i])return t;if(r==="toAttribute")switch(n){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(n){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function j0(i){const t={};return i.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}function zc(i,t,e,r,n,o){let a=class extends Lc{constructor(){super(i,e,n),this.$$p_d=t}static get observedAttributes(){return ao(t).map(s=>(t[s].attribute||s).toLowerCase())}};return ao(t).forEach(s=>{si(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=Ho(s,c,t),this.$$d[s]=c;var l=this.$$c;if(l){var u=(h=hr(l,s))==null?void 0:h.get;u?l[s]=c:l.$set({[s]:c})}}})}),r.forEach(s=>{si(a.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),o&&(a=o(a)),i.element=a,a}function U0(i,...t){return et(()=>{try{let e=!1;const r=[];for(const n of t)n&&typeof n=="object"&&Dt in n?(r.push(vo(n,!0)),e=!0):r.push(n);e&&(fd(i),console.log("%c[snapshot]","color: grey",...r))}catch{}}),t}const G0=Object.freeze(Object.defineProperty({__proto__:null,CLASS:Bi,FILENAME:Zt,HMR:Fs,NAMESPACE_SVG:no,STYLE:Vi,aborted:ko,action:Ar,get active_effect(){return Fe},add_legacy_event_listener:y0,add_locations:tp,add_svelte_meta:Ad,animation:xp,append:x,append_styles:Sp,apply:yf,assign:Kf,assign_and:Qf,assign_nullish:$f,assign_or:Jf,async:lp,async_body:Gd,async_derived:ml,attach:_c,attachment:Yf,attr:Rp,attribute_effect:wt,autofocus:Pl,await:up,bind_active_element:Bp,bind_buffered:Zp,bind_checked:jp,bind_content_editable:s0,bind_current_time:Gp,bind_element_size:a0,bind_ended:Yp,bind_files:Up,bind_focused:c0,bind_group:Vp,bind_muted:e0,bind_online:t0,bind_paused:Jp,bind_playback_rate:Qp,bind_played:qp,bind_prop:r0,bind_property:l0,bind_ready_state:Kp,bind_resize_observer:o0,bind_seekable:Wp,bind_seeking:Xp,bind_select_value:Op,bind_this:ji,bind_value:Cc,bind_volume:$p,bind_window_scroll:u0,bind_window_size:h0,boundary:gl,bubble_event:b0,check_target:op,child:G,cleanup_styles:ep,clsx:Rt,comment:J,component:Fi,create_custom_element:zc,create_ownership_validator:np,css_props:dp,deep_read:Po,deep_read_state:ka,deferred_template_effect:cf,delegate:Qr,derived:te,derived_safe_equal:va,get document(){return El},each:Ut,eager:zd,effect:Jt,effect_root:Dl,effect_tracking:gi,element:Ep,equals:Qd,event:Ao,exclude_from_object:_f,fallback:Nh,first_child:W,flush:Ft,for_await_track_reactivity_loss:Ud,from_html:ge,from_mathml:xf,from_svg:Q,from_tree:Tf,get:p,head:kp,hmr:ip,html:Cr,hydrate_template:bd,if:D,index:Ni,init:_0,init_select:La,inspect:sp,invalid_default_snippet:jh,invalidate_inner_signals:df,invalidate_store:S0,invoke_error_boundary:Fr,key:hp,legacy_api:ap,legacy_pre_effect:af,legacy_pre_effect_reset:sf,legacy_rest_props:z0,log_if_contains_state:U0,mark_store_binding:I0,mutable_source:Eo,mutate:Xd,next:ft,noop:wr,once:g0,pending:Vd,pop:Qe,preventDefault:m0,prevent_snippet_stringification:sc,prop:or,props_id:Sf,proxy:xt,push:Ke,raf:Pr,reactive_import:w0,remove_input_defaults:Lo,remove_textarea_child:rf,render_effect:ht,replay_events:bf,reset:j,rest_props:bt,run:Zd,run_after_blockers:vl,safe_get:vf,sanitize_slots:mp,save:jd,select_option:fn,self:f0,set:_e,set_attribute:Ne,set_checked:kc,set_class:Be,set_custom_element_data:Np,set_default_checked:Lp,set_default_value:zp,set_selected:Sc,set_style:Mt,set_text:Xe,set_value:Dp,set_xlink_attribute:Hp,setup_stores:C0,sibling:se,slot:vp,snapshot:vo,snippet:_t,spread_props:mn,state:Pe,stopImmediatePropagation:v0,stopPropagation:p0,store_get:E0,store_mutate:P0,store_set:Oc,store_unsub:k0,strict_equals:Kd,tag:Sd,tag_proxy:al,template_effect:Re,text:pt,tick:Ea,to_array:Fh,trace:kd,track_reactivity_loss:ga,transition:Tp,trusted:d0,untrack:et,update:ln,update_legacy_props:x0,update_pre:Yd,update_pre_prop:O0,update_pre_store:R0,update_prop:M0,update_store:A0,user_effect:st,user_pre_effect:Ml,validate_binding:F0,validate_dynamic_element_tag:Ff,validate_each_keys:N0,validate_snippet_args:cp,validate_store:Bf,validate_void_dynamic_element:Nf,get window(){return _a},with_script:Ef,wrap_snippet:Vf},Symbol.toStringTag,{value:"Module"})),Z0="5";typeof window<"u"&&((hh=window.__svelte??(window.__svelte={})).v??(hh.v=new Set)).add(Z0);const W0=`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-900:oklch(42.1% .095 57.708);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--drop-shadow-md:0 3px 3px #0000001f;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{scrollbar-width:thin;scrollbar-color:var(--fallback-bc,oklch(var(--bc)/.2))transparent}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--fallback-bc,oklch(var(--bc)/.2));border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.4))}::-webkit-scrollbar-corner{background:0 0}:where(:root),:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dark]:checked),[data-theme=dark]{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=cupcake]:checked),[data-theme=cupcake]{color-scheme:light;--color-base-100:oklch(97.788% .004 56.375);--color-base-200:oklch(93.982% .007 61.449);--color-base-300:oklch(91.586% .006 53.44);--color-base-content:oklch(23.574% .066 313.189);--color-primary:oklch(85% .138 181.071);--color-primary-content:oklch(43% .078 188.216);--color-secondary:oklch(89% .061 343.231);--color-secondary-content:oklch(45% .187 3.815);--color-accent:oklch(90% .076 70.697);--color-accent-content:oklch(47% .157 37.304);--color-neutral:oklch(27% .006 286.033);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(68% .169 237.323);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(69% .17 162.48);--color-success-content:oklch(26% .051 172.552);--color-warning:oklch(79% .184 86.047);--color-warning-content:oklch(28% .066 53.813);--color-error:oklch(64% .246 16.439);--color-error-content:oklch(27% .105 12.094);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:root:has(input.theme-controller[value=bumblebee]:checked),[data-theme=bumblebee]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(85% .199 91.936);--color-primary-content:oklch(42% .095 57.708);--color-secondary:oklch(75% .183 55.934);--color-secondary-content:oklch(40% .123 38.172);--color-accent:oklch(0% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(37% .01 67.558);--color-neutral-content:oklch(92% .003 48.717);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(39% .09 240.876);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(39% .141 25.723);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=emerald]:checked),[data-theme=emerald]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(35.519% .032 262.988);--color-primary:oklch(76.662% .135 153.45);--color-primary-content:oklch(33.387% .04 162.24);--color-secondary:oklch(61.302% .202 261.294);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(72.772% .149 33.2);--color-accent-content:oklch(0% 0 0);--color-neutral:oklch(35.519% .032 262.988);--color-neutral-content:oklch(98.462% .001 247.838);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=corporate]:checked),[data-theme=corporate]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(22.389% .031 278.072);--color-primary:oklch(58% .158 241.966);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(55% .046 257.417);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(60% .118 184.704);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(0% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(60% .126 221.723);--color-info-content:oklch(100% 0 0);--color-success:oklch(62% .194 149.214);--color-success-content:oklch(100% 0 0);--color-warning:oklch(85% .199 91.936);--color-warning-content:oklch(0% 0 0);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(0% 0 0);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=synthwave]:checked),[data-theme=synthwave]{color-scheme:dark;--color-base-100:oklch(15% .09 281.288);--color-base-200:oklch(20% .09 281.288);--color-base-300:oklch(25% .09 281.288);--color-base-content:oklch(78% .115 274.713);--color-primary:oklch(71% .202 349.761);--color-primary-content:oklch(28% .109 3.907);--color-secondary:oklch(82% .111 230.318);--color-secondary-content:oklch(29% .066 243.157);--color-accent:oklch(75% .183 55.934);--color-accent-content:oklch(26% .079 36.259);--color-neutral:oklch(45% .24 277.023);--color-neutral-content:oklch(87% .065 274.039);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(77% .152 181.912);--color-success-content:oklch(27% .046 192.524);--color-warning:oklch(90% .182 98.111);--color-warning-content:oklch(42% .095 57.708);--color-error:oklch(73.7% .121 32.639);--color-error-content:oklch(23.501% .096 290.329);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=retro]:checked),[data-theme=retro]{color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]{color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=valentine]:checked),[data-theme=valentine]{color-scheme:light;--color-base-100:oklch(97% .014 343.198);--color-base-200:oklch(94% .028 342.258);--color-base-300:oklch(89% .061 343.231);--color-base-content:oklch(52% .223 3.958);--color-primary:oklch(65% .241 354.308);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(62% .265 303.9);--color-secondary-content:oklch(97% .014 308.299);--color-accent:oklch(82% .111 230.318);--color-accent-content:oklch(39% .09 240.876);--color-neutral:oklch(40% .153 2.432);--color-neutral-content:oklch(89% .061 343.231);--color-info:oklch(86% .127 207.078);--color-info-content:oklch(44% .11 240.79);--color-success:oklch(84% .143 164.978);--color-success-content:oklch(43% .095 166.913);--color-warning:oklch(75% .183 55.934);--color-warning-content:oklch(26% .079 36.259);--color-error:oklch(63% .237 25.331);--color-error-content:oklch(97% .013 17.38);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=halloween]:checked),[data-theme=halloween]{color-scheme:dark;--color-base-100:oklch(21% .006 56.043);--color-base-200:oklch(14% .004 49.25);--color-base-300:oklch(0% 0 0);--color-base-content:oklch(84.955% 0 0);--color-primary:oklch(77.48% .204 60.62);--color-primary-content:oklch(19.693% .004 196.779);--color-secondary:oklch(45.98% .248 305.03);--color-secondary-content:oklch(89.196% .049 305.03);--color-accent:oklch(64.8% .223 136.073);--color-accent-content:oklch(0% 0 0);--color-neutral:oklch(24.371% .046 65.681);--color-neutral-content:oklch(84.874% .009 65.681);--color-info:oklch(54.615% .215 262.88);--color-info-content:oklch(90.923% .043 262.88);--color-success:oklch(62.705% .169 149.213);--color-success-content:oklch(12.541% .033 149.213);--color-warning:oklch(66.584% .157 58.318);--color-warning-content:oklch(13.316% .031 58.318);--color-error:oklch(65.72% .199 27.33);--color-error-content:oklch(13.144% .039 27.33);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=garden]:checked),[data-theme=garden]{color-scheme:light;--color-base-100:oklch(92.951% .002 17.197);--color-base-200:oklch(86.445% .002 17.197);--color-base-300:oklch(79.938% .001 17.197);--color-base-content:oklch(16.961% .001 17.32);--color-primary:oklch(62.45% .278 3.836);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(48.495% .11 355.095);--color-secondary-content:oklch(89.699% .022 355.095);--color-accent:oklch(56.273% .054 154.39);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(24.155% .049 89.07);--color-neutral-content:oklch(92.951% .002 17.197);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=forest]:checked),[data-theme=forest]{color-scheme:dark;--color-base-100:oklch(20.84% .008 17.911);--color-base-200:oklch(18.522% .007 17.911);--color-base-300:oklch(16.203% .007 17.911);--color-base-content:oklch(83.768% .001 17.911);--color-primary:oklch(68.628% .185 148.958);--color-primary-content:oklch(0% 0 0);--color-secondary:oklch(69.776% .135 168.327);--color-secondary-content:oklch(13.955% .027 168.327);--color-accent:oklch(70.628% .119 185.713);--color-accent-content:oklch(14.125% .023 185.713);--color-neutral:oklch(30.698% .039 171.364);--color-neutral-content:oklch(86.139% .007 171.364);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=aqua]:checked),[data-theme=aqua]{color-scheme:dark;--color-base-100:oklch(37% .146 265.522);--color-base-200:oklch(28% .091 267.935);--color-base-300:oklch(22% .091 267.935);--color-base-content:oklch(90% .058 230.902);--color-primary:oklch(85.661% .144 198.645);--color-primary-content:oklch(40.124% .068 197.603);--color-secondary:oklch(60.682% .108 309.782);--color-secondary-content:oklch(96% .016 293.756);--color-accent:oklch(93.426% .102 94.555);--color-accent-content:oklch(18.685% .02 94.555);--color-neutral:oklch(27% .146 265.522);--color-neutral-content:oklch(80% .146 265.522);--color-info:oklch(54.615% .215 262.88);--color-info-content:oklch(90.923% .043 262.88);--color-success:oklch(62.705% .169 149.213);--color-success-content:oklch(12.541% .033 149.213);--color-warning:oklch(66.584% .157 58.318);--color-warning-content:oklch(27% .077 45.635);--color-error:oklch(73.95% .19 27.33);--color-error-content:oklch(14.79% .038 27.33);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=lofi]:checked),[data-theme=lofi]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(0% 0 0);--color-primary:oklch(15.906% 0 0);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(21.455% .001 17.278);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(26.861% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(0% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(79.54% .103 205.9);--color-info-content:oklch(15.908% .02 205.9);--color-success:oklch(90.13% .153 164.14);--color-success-content:oklch(18.026% .03 164.14);--color-warning:oklch(88.37% .135 79.94);--color-warning-content:oklch(17.674% .027 79.94);--color-error:oklch(78.66% .15 28.47);--color-error-content:oklch(15.732% .03 28.47);--radius-selector:2rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=pastel]:checked),[data-theme=pastel]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98.462% .001 247.838);--color-base-300:oklch(92.462% .001 247.838);--color-base-content:oklch(20% 0 0);--color-primary:oklch(90% .063 306.703);--color-primary-content:oklch(49% .265 301.924);--color-secondary:oklch(89% .058 10.001);--color-secondary-content:oklch(51% .222 16.935);--color-accent:oklch(90% .093 164.15);--color-accent-content:oklch(50% .118 165.612);--color-neutral:oklch(55% .046 257.417);--color-neutral-content:oklch(92% .013 255.508);--color-info:oklch(86% .127 207.078);--color-info-content:oklch(52% .105 223.128);--color-success:oklch(87% .15 154.449);--color-success-content:oklch(52% .154 150.069);--color-warning:oklch(83% .128 66.29);--color-warning-content:oklch(55% .195 38.402);--color-error:oklch(80% .114 19.571);--color-error-content:oklch(50% .213 27.518);--radius-selector:1rem;--radius-field:2rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:0;--noise:0}:root:has(input.theme-controller[value=fantasy]:checked),[data-theme=fantasy]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(93% 0 0);--color-base-300:oklch(86% 0 0);--color-base-content:oklch(27.807% .029 256.847);--color-primary:oklch(37.45% .189 325.02);--color-primary-content:oklch(87.49% .037 325.02);--color-secondary:oklch(53.92% .162 241.36);--color-secondary-content:oklch(90.784% .032 241.36);--color-accent:oklch(75.98% .204 56.72);--color-accent-content:oklch(15.196% .04 56.72);--color-neutral:oklch(27.807% .029 256.847);--color-neutral-content:oklch(85.561% .005 256.847);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=black]:checked),[data-theme=black]{color-scheme:dark;--color-base-100:oklch(0% 0 0);--color-base-200:oklch(19% 0 0);--color-base-300:oklch(22% 0 0);--color-base-content:oklch(87.609% 0 0);--color-primary:oklch(35% 0 0);--color-primary-content:oklch(100% 0 0);--color-secondary:oklch(35% 0 0);--color-secondary-content:oklch(100% 0 0);--color-accent:oklch(35% 0 0);--color-accent-content:oklch(100% 0 0);--color-neutral:oklch(35% 0 0);--color-neutral-content:oklch(100% 0 0);--color-info:oklch(45.201% .313 264.052);--color-info-content:oklch(89.04% .062 264.052);--color-success:oklch(51.975% .176 142.495);--color-success-content:oklch(90.395% .035 142.495);--color-warning:oklch(96.798% .211 109.769);--color-warning-content:oklch(19.359% .042 109.769);--color-error:oklch(62.795% .257 29.233);--color-error-content:oklch(12.559% .051 29.233);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=luxury]:checked),[data-theme=luxury]{color-scheme:dark;--color-base-100:oklch(14.076% .004 285.822);--color-base-200:oklch(20.219% .004 308.229);--color-base-300:oklch(23.219% .004 308.229);--color-base-content:oklch(75.687% .123 76.89);--color-primary:oklch(100% 0 0);--color-primary-content:oklch(20% 0 0);--color-secondary:oklch(27.581% .064 261.069);--color-secondary-content:oklch(85.516% .012 261.069);--color-accent:oklch(36.674% .051 338.825);--color-accent-content:oklch(87.334% .01 338.825);--color-neutral:oklch(24.27% .057 59.825);--color-neutral-content:oklch(93.203% .089 90.861);--color-info:oklch(79.061% .121 237.133);--color-info-content:oklch(15.812% .024 237.133);--color-success:oklch(78.119% .192 132.154);--color-success-content:oklch(15.623% .038 132.154);--color-warning:oklch(86.127% .136 102.891);--color-warning-content:oklch(17.225% .027 102.891);--color-error:oklch(71.753% .176 22.568);--color-error-content:oklch(14.35% .035 22.568);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dracula]:checked),[data-theme=dracula]{color-scheme:dark;--color-base-100:oklch(28.822% .022 277.508);--color-base-200:oklch(26.805% .02 277.508);--color-base-300:oklch(24.787% .019 277.508);--color-base-content:oklch(97.747% .007 106.545);--color-primary:oklch(75.461% .183 346.812);--color-primary-content:oklch(15.092% .036 346.812);--color-secondary:oklch(74.202% .148 301.883);--color-secondary-content:oklch(14.84% .029 301.883);--color-accent:oklch(83.392% .124 66.558);--color-accent-content:oklch(16.678% .024 66.558);--color-neutral:oklch(39.445% .032 275.524);--color-neutral-content:oklch(87.889% .006 275.524);--color-info:oklch(88.263% .093 212.846);--color-info-content:oklch(17.652% .018 212.846);--color-success:oklch(87.099% .219 148.024);--color-success-content:oklch(17.419% .043 148.024);--color-warning:oklch(95.533% .134 112.757);--color-warning-content:oklch(19.106% .026 112.757);--color-error:oklch(68.22% .206 24.43);--color-error-content:oklch(13.644% .041 24.43);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=cmyk]:checked),[data-theme=cmyk]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(95% 0 0);--color-base-300:oklch(90% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(71.772% .133 239.443);--color-primary-content:oklch(14.354% .026 239.443);--color-secondary:oklch(64.476% .202 359.339);--color-secondary-content:oklch(12.895% .04 359.339);--color-accent:oklch(94.228% .189 105.306);--color-accent-content:oklch(18.845% .037 105.306);--color-neutral:oklch(21.778% 0 0);--color-neutral-content:oklch(84.355% 0 0);--color-info:oklch(68.475% .094 217.284);--color-info-content:oklch(13.695% .018 217.284);--color-success:oklch(46.949% .162 321.406);--color-success-content:oklch(89.389% .032 321.406);--color-warning:oklch(71.236% .159 52.023);--color-warning-content:oklch(14.247% .031 52.023);--color-error:oklch(62.013% .208 28.717);--color-error-content:oklch(12.402% .041 28.717);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=autumn]:checked),[data-theme=autumn]{color-scheme:light;--color-base-100:oklch(95.814% 0 0);--color-base-200:oklch(89.107% 0 0);--color-base-300:oklch(82.4% 0 0);--color-base-content:oklch(19.162% 0 0);--color-primary:oklch(40.723% .161 17.53);--color-primary-content:oklch(88.144% .032 17.53);--color-secondary:oklch(61.676% .169 23.865);--color-secondary-content:oklch(12.335% .033 23.865);--color-accent:oklch(73.425% .094 60.729);--color-accent-content:oklch(14.685% .018 60.729);--color-neutral:oklch(54.367% .037 51.902);--color-neutral-content:oklch(90.873% .007 51.902);--color-info:oklch(69.224% .097 207.284);--color-info-content:oklch(13.844% .019 207.284);--color-success:oklch(60.995% .08 174.616);--color-success-content:oklch(12.199% .016 174.616);--color-warning:oklch(70.081% .164 56.844);--color-warning-content:oklch(14.016% .032 56.844);--color-error:oklch(53.07% .241 24.16);--color-error-content:oklch(90.614% .048 24.16);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=business]:checked),[data-theme=business]{color-scheme:dark;--color-base-100:oklch(24.353% 0 0);--color-base-200:oklch(22.648% 0 0);--color-base-300:oklch(20.944% 0 0);--color-base-content:oklch(84.87% 0 0);--color-primary:oklch(41.703% .099 251.473);--color-primary-content:oklch(88.34% .019 251.473);--color-secondary:oklch(64.092% .027 229.389);--color-secondary-content:oklch(12.818% .005 229.389);--color-accent:oklch(67.271% .167 35.791);--color-accent-content:oklch(13.454% .033 35.791);--color-neutral:oklch(27.441% .013 253.041);--color-neutral-content:oklch(85.488% .002 253.041);--color-info:oklch(62.616% .143 240.033);--color-info-content:oklch(12.523% .028 240.033);--color-success:oklch(70.226% .094 156.596);--color-success-content:oklch(14.045% .018 156.596);--color-warning:oklch(77.482% .115 81.519);--color-warning-content:oklch(15.496% .023 81.519);--color-error:oklch(51.61% .146 29.674);--color-error-content:oklch(90.322% .029 29.674);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=acid]:checked),[data-theme=acid]{color-scheme:light;--color-base-100:oklch(98% 0 0);--color-base-200:oklch(95% 0 0);--color-base-300:oklch(91% 0 0);--color-base-content:oklch(0% 0 0);--color-primary:oklch(71.9% .357 330.759);--color-primary-content:oklch(14.38% .071 330.759);--color-secondary:oklch(73.37% .224 48.25);--color-secondary-content:oklch(14.674% .044 48.25);--color-accent:oklch(92.78% .264 122.962);--color-accent-content:oklch(18.556% .052 122.962);--color-neutral:oklch(21.31% .128 278.68);--color-neutral-content:oklch(84.262% .025 278.68);--color-info:oklch(60.72% .227 252.05);--color-info-content:oklch(12.144% .045 252.05);--color-success:oklch(85.72% .266 158.53);--color-success-content:oklch(17.144% .053 158.53);--color-warning:oklch(91.01% .212 100.5);--color-warning-content:oklch(18.202% .042 100.5);--color-error:oklch(64.84% .293 29.349);--color-error-content:oklch(12.968% .058 29.349);--radius-selector:1rem;--radius-field:1rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]{color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=night]:checked),[data-theme=night]{color-scheme:dark;--color-base-100:oklch(20.768% .039 265.754);--color-base-200:oklch(19.314% .037 265.754);--color-base-300:oklch(17.86% .034 265.754);--color-base-content:oklch(84.153% .007 265.754);--color-primary:oklch(75.351% .138 232.661);--color-primary-content:oklch(15.07% .027 232.661);--color-secondary:oklch(68.011% .158 276.934);--color-secondary-content:oklch(13.602% .031 276.934);--color-accent:oklch(72.36% .176 350.048);--color-accent-content:oklch(14.472% .035 350.048);--color-neutral:oklch(27.949% .036 260.03);--color-neutral-content:oklch(85.589% .007 260.03);--color-info:oklch(68.455% .148 237.251);--color-info-content:oklch(0% 0 0);--color-success:oklch(78.452% .132 181.911);--color-success-content:oklch(15.69% .026 181.911);--color-warning:oklch(83.242% .139 82.95);--color-warning-content:oklch(16.648% .027 82.95);--color-error:oklch(71.785% .17 13.118);--color-error-content:oklch(14.357% .034 13.118);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=coffee]:checked),[data-theme=coffee]{color-scheme:dark;--color-base-100:oklch(24% .023 329.708);--color-base-200:oklch(21% .021 329.708);--color-base-300:oklch(16% .019 329.708);--color-base-content:oklch(72.354% .092 79.129);--color-primary:oklch(71.996% .123 62.756);--color-primary-content:oklch(14.399% .024 62.756);--color-secondary:oklch(34.465% .029 199.194);--color-secondary-content:oklch(86.893% .005 199.194);--color-accent:oklch(42.621% .074 224.389);--color-accent-content:oklch(88.524% .014 224.389);--color-neutral:oklch(16.51% .015 326.261);--color-neutral-content:oklch(83.302% .003 326.261);--color-info:oklch(79.49% .063 184.558);--color-info-content:oklch(15.898% .012 184.558);--color-success:oklch(74.722% .072 131.116);--color-success-content:oklch(14.944% .014 131.116);--color-warning:oklch(88.15% .14 87.722);--color-warning-content:oklch(17.63% .028 87.722);--color-error:oklch(77.318% .128 31.871);--color-error-content:oklch(15.463% .025 31.871);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=winter]:checked),[data-theme=winter]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97.466% .011 259.822);--color-base-300:oklch(93.268% .016 262.751);--color-base-content:oklch(41.886% .053 255.824);--color-primary:oklch(56.86% .255 257.57);--color-primary-content:oklch(91.372% .051 257.57);--color-secondary:oklch(42.551% .161 282.339);--color-secondary-content:oklch(88.51% .032 282.339);--color-accent:oklch(59.939% .191 335.171);--color-accent-content:oklch(11.988% .038 335.171);--color-neutral:oklch(19.616% .063 257.651);--color-neutral-content:oklch(83.923% .012 257.651);--color-info:oklch(88.127% .085 214.515);--color-info-content:oklch(17.625% .017 214.515);--color-success:oklch(80.494% .077 197.823);--color-success-content:oklch(16.098% .015 197.823);--color-warning:oklch(89.172% .045 71.47);--color-warning-content:oklch(17.834% .009 71.47);--color-error:oklch(73.092% .11 20.076);--color-error-content:oklch(14.618% .022 20.076);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=dim]:checked),[data-theme=dim]{color-scheme:dark;--color-base-100:oklch(30.857% .023 264.149);--color-base-200:oklch(28.036% .019 264.182);--color-base-300:oklch(26.346% .018 262.177);--color-base-content:oklch(82.901% .031 222.959);--color-primary:oklch(86.133% .141 139.549);--color-primary-content:oklch(17.226% .028 139.549);--color-secondary:oklch(73.375% .165 35.353);--color-secondary-content:oklch(14.675% .033 35.353);--color-accent:oklch(74.229% .133 311.379);--color-accent-content:oklch(14.845% .026 311.379);--color-neutral:oklch(24.731% .02 264.094);--color-neutral-content:oklch(82.901% .031 222.959);--color-info:oklch(86.078% .142 206.182);--color-info-content:oklch(17.215% .028 206.182);--color-success:oklch(86.171% .142 166.534);--color-success-content:oklch(17.234% .028 166.534);--color-warning:oklch(86.163% .142 94.818);--color-warning-content:oklch(17.232% .028 94.818);--color-error:oklch(82.418% .099 33.756);--color-error-content:oklch(16.483% .019 33.756);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=nord]:checked),[data-theme=nord]{color-scheme:light;--color-base-100:oklch(95.127% .007 260.731);--color-base-200:oklch(93.299% .01 261.788);--color-base-300:oklch(89.925% .016 262.749);--color-base-content:oklch(32.437% .022 264.182);--color-primary:oklch(59.435% .077 254.027);--color-primary-content:oklch(11.887% .015 254.027);--color-secondary:oklch(69.651% .059 248.687);--color-secondary-content:oklch(13.93% .011 248.687);--color-accent:oklch(77.464% .062 217.469);--color-accent-content:oklch(15.492% .012 217.469);--color-neutral:oklch(45.229% .035 264.131);--color-neutral-content:oklch(89.925% .016 262.749);--color-info:oklch(69.207% .062 332.664);--color-info-content:oklch(13.841% .012 332.664);--color-success:oklch(76.827% .074 131.063);--color-success-content:oklch(15.365% .014 131.063);--color-warning:oklch(85.486% .089 84.093);--color-warning-content:oklch(17.097% .017 84.093);--color-error:oklch(60.61% .12 15.341);--color-error-content:oklch(12.122% .024 15.341);--radius-selector:1rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root:has(input.theme-controller[value=sunset]:checked),[data-theme=sunset]{color-scheme:dark;--color-base-100:oklch(22% .019 237.69);--color-base-200:oklch(20% .019 237.69);--color-base-300:oklch(18% .019 237.69);--color-base-content:oklch(77.383% .043 245.096);--color-primary:oklch(74.703% .158 39.947);--color-primary-content:oklch(14.94% .031 39.947);--color-secondary:oklch(72.537% .177 2.72);--color-secondary-content:oklch(14.507% .035 2.72);--color-accent:oklch(71.294% .166 299.844);--color-accent-content:oklch(14.258% .033 299.844);--color-neutral:oklch(26% .019 237.69);--color-neutral-content:oklch(70% .019 237.69);--color-info:oklch(85.559% .085 206.015);--color-info-content:oklch(17.111% .017 206.015);--color-success:oklch(85.56% .085 144.778);--color-success-content:oklch(17.112% .017 144.778);--color-warning:oklch(85.569% .084 74.427);--color-warning-content:oklch(17.113% .016 74.427);--color-error:oklch(85.511% .078 16.886);--color-error-content:oklch(17.102% .015 16.886);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}@property --radialprogress{syntax: "<percentage>"; inherits: true; initial-value: 0%;}:root:not(span){overflow:var(--page-overflow)}:root{--page-scroll-bg-on:linear-gradient(var(--root-bg),var(--root-bg))var(--root-bg)}@supports (color:color-mix(in lab,red,red)){:root{--page-scroll-bg-on:linear-gradient(var(--root-bg),var(--root-bg))color-mix(in srgb,var(--root-bg),oklch(0% 0 0) calc(var(--page-has-backdrop,0)*40%))}}:root{--page-scroll-transition-on:background-color .3s ease-out;transition:var(--page-scroll-transition);scrollbar-gutter:var(--page-scroll-gutter,unset);scrollbar-gutter:if(style(--page-has-scroll: 1): var(--page-scroll-gutter,unset); else: unset)}:root:root{background:var(--page-scroll-bg,var(--root-bg,var(--color-base-100)))}@keyframes set-page-has-scroll{0%,to{--page-has-scroll:1}}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}:where(:root,[data-theme]){--root-bg:var(--color-base-100)}}@layer components;@layer utilities{@layer daisyui.l1.l2.l3{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-rows:1fr 1.8rem 1fr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:95cqi;max-width:95cqi}.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-1:focus-visible) .diff-resizer{min-width:5cqi;max-width:5cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:5cqi;max-width:5cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:95cqi;max-width:95cqi}}.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;top:0;right:0;bottom:0;left:0;overflow:clip}.modal::backdrop{display:none}.tooltip{--tt-bg:var(--color-neutral);--tt-off: calc(100% + .5rem) ;--tt-tail: calc(100% + 1px + .25rem) ;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);display:block;position:absolute}@media(prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media(prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media(hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field),var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)),var(--tab-border-color)calc(69% - var(--border) + .25px),var(--tab-border-color)69%,var(--tab-bg) calc(69% + .25px) ;order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media(prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px #00000003,inset 0 -1px #ffffff03}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth)*3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li).menu-disabled{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab,red,red)){.dock{border-top:.5px solid color-mix(in oklab,var(--color-base-content)5%,#0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>*{cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media(hover:hover){.dock>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,bottom)var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover],.dropdown .dropdown-content{z-index:999}@media(prefers-reduced-motion:no-preference){.dropdown[popover],.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:95%}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:100%}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:95%}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0/calc(var(--depth)*.15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0/calc(var(--depth)*6%)) inset,var(--btn-shadow);--size:calc(var(--size-field,.25rem)*10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab,red,red)){.btn{--btn-border:color-mix(in oklab,var(--btn-bg),#000 calc(var(--depth)*5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg),0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab,red,red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000),0 4px 3px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000)}}.btn{--btn-noise:var(--fx-noise)}@media(hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:hover{--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}}.btn:focus-visible,.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0),0 0 0 0 oklch(0% 0 0/0)}.btn:is(input[type=checkbox],input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox],input[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0,auto)1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border)solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab,red,red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab,var(--color-base-content)5%,transparent)}}.toggle{border:var(--border)solid currentColor;color:var(--input-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p),var(--radius-selector-max)) + min(var(--border),var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab,red,red)){.toggle{box-shadow:0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab,red,red)){.toggle{--input-color:color-mix(in oklab,var(--color-base-content)50%,#0000)}}.toggle{--toggle-p:calc(var(--size)*.125);--size:calc(var(--size-selector,.25rem)*6);width:calc((var(--size)*2) - (var(--border) + var(--toggle-p))*2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:none}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:none}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);height:100%;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab,red,red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000)}}.toggle:before{background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}@media(forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible,.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border)solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,.875rem),.875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-flex}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}@media(pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.input:has(>input[type=date]) :where(input[type=date]){webkit-appearance:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex}.input:has(>input[type=date]) input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute;inset-inline-end:.75em}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%)var(--indicator-y,-50%);position:absolute}.table{border-collapse:separate;--tw-border-spacing-x: 0rem ;--tw-border-spacing-y: 0rem ;width:100%;border-spacing:var(--tw-border-spacing-x)var(--tw-border-spacing-y);border-radius:var(--radius-box);text-align:left;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media(hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot tr:first-child :is(td,th)){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot tr:first-child :is(td,th)){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr :is(td,th),tbody tr:not(:last-child) :is(td,th)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr :is(td,th),tbody tr:not(:last-child) :is(td,th)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.steps{counter-reset:step;grid-auto-columns:1fr;grid-auto-flow:column;display:inline-grid;overflow:auto hidden}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon,.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:3.40282e38px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.range{-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem)*6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab,red,red)){.range{--range-bg:color-mix(in oklab,currentColor 10%,#0000)}}.range{cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}@media(forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));position:relative;top:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab,red,red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));background-color:currentColor;position:relative;top:50%}@supports (color:color-mix(in lab,red,red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range:disabled{cursor:not-allowed;opacity:.3}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;white-space:nowrap;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:.75rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}[dir=rtl] .select::picker(select){translate:.5rem}[dir=rtl] .select select::picker(select){translate:.5rem}.select[multiple]{background-image:none;height:auto;padding-block:.75rem;padding-inline-end:.75rem;overflow:auto}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:calc(100% + 2.75rem);height:calc(100% - calc(var(--border)*2));background:inherit;border-radius:inherit;border-style:none;align-items:center;margin-inline:-.75rem -1.75rem;padding-inline:.75rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]),fieldset:disabled .select)::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}@supports (appearance:base-select){.select,.select select{-webkit-appearance:base-select;-moz-appearance:base-select;appearance:base-select}:is(.select,.select select)::picker(select){-webkit-appearance:base-select;-moz-appearance:base-select;appearance:base-select}}:is(.select,.select select)::picker(select){color:inherit;border:var(--border)solid var(--color-base-200);border-radius:var(--radius-box);background-color:inherit;max-height:min(24rem,70dvh);box-shadow:0 2px calc(var(--depth)*3px) -2px #0003;box-shadow:0 20px 25px -5px rgb(0 0 0/calc(var(--depth)*.1)),0 8px 10px -6px rgb(0 0 0/calc(var(--depth)*.1));margin-block:.5rem;margin-inline:.5rem;padding:.5rem;translate:-.5rem}:is(.select,.select select)::picker-icon{display:none}:is(.select,.select select) optgroup{padding-top:.5em}:is(.select,.select select) optgroup option:first-child{margin-top:.5em}:is(.select,.select select) option{border-radius:var(--radius-field);white-space:normal;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){:is(.select,.select select) option:not(:disabled):hover,:is(.select,.select select) option:not(:disabled):focus-visible{outline-offset:2px;outline:2px solid #0000}}:is(.select,.select select) option:not(:disabled):active{background-color:var(--color-neutral);color:var(--color-neutral-content);box-shadow:0 2px calc(var(--depth)*3px) -2px var(--color-neutral)}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media(forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor}@media(prefers-reduced-motion:no-preference){.radio:checked,.radio[aria-checked=true]{animation:.2s ease-out radio}}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media(forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.drawer{grid-auto-columns:max-content auto;width:100%;display:grid;position:relative}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-box);background-color:currentColor;width:100%;height:.5rem;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.progress{background-color:color-mix(in oklab,currentcolor 20%,transparent)}}.progress{color:var(--color-base-content)}.progress:indeterminate{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%}@media(prefers-reduced-motion:no-preference){.progress:indeterminate{animation:5s ease-in-out infinite progress}}@supports ((-moz-appearance:none)){.progress:indeterminate::-moz-progress-bar{background-color:#0000}@media(prefers-reduced-motion:no-preference){.progress:indeterminate::-moz-progress-bar{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}}.progress::-moz-progress-bar{border-radius:var(--radius-box);background-color:currentColor}}@supports ((-webkit-appearance:none)){.progress::-webkit-progress-bar{border-radius:var(--radius-box);background-color:#0000}.progress::-webkit-progress-value{border-radius:var(--radius-box);background-color:currentColor}}.textarea{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);min-height:5rem;font-size:max(var(--font-size,.875rem),.875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab,red,red)){.textarea{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media(pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.modal-backdrop{color:#0000;z-index:-1;grid-row-start:1;grid-column-start:1;place-self:stretch stretch;display:grid}.modal-backdrop button{cursor:pointer}.modal-box{background-color:var(--color-base-100);border-top-left-radius:var(--modal-tl,var(--radius-box));border-top-right-radius:var(--modal-tr,var(--radius-box));border-bottom-left-radius:var(--modal-bl,var(--radius-box));border-bottom-right-radius:var(--modal-br,var(--radius-box));opacity:0;overscroll-behavior:contain;grid-row-start:1;grid-column-start:1;width:91.6667%;max-width:32rem;max-height:100vh;padding:1.5rem;transition:translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out;overflow-y:auto;scale:95%;box-shadow:0 25px 50px -12px #00000040}.divider{white-space:nowrap;height:1rem;margin:var(--divider-m,1rem 0);--divider-color:var(--color-base-content);flex-direction:row;align-self:stretch;align-items:center;display:flex}@supports (color:color-mix(in lab,red,red)){.divider{--divider-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.divider:before,.divider:after{content:"";background-color:var(--divider-color);flex-grow:1;width:100%;height:.125rem}@media print{.divider:before,.divider:after{border:.5px solid}}.divider:not(:empty){gap:1rem}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset,.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset],.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentcolor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.modal-action{justify-content:flex-end;gap:.5rem;margin-top:1.5rem;display:flex}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab,red,red)){.status{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab,red,red)){.status{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.status{background-image:radial-gradient(circle at 35% 30%,oklch(1 0 0/calc(var(--depth)*.5)),#0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab,red,red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab,currentColor calc(var(--depth)*100%),#0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border)solid var(--badge-color,var(--color-base-200));background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem)*6);width:fit-content;height:var(--size);padding-inline:calc(var(--size)/2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>*{place-items:start;gap:.5rem;display:grid}.footer.footer-center{text-align:center;grid-auto-flow:column dense;place-items:center}.footer.footer-center>*{place-items:center}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.menu-title{color:var(--color-base-content);padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab,red,red)){.menu-title{color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}.menu-title{font-size:.875rem;font-weight:600}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.btn-secondary{--btn-color:var(--color-secondary);--btn-fg:var(--color-secondary-content)}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;background-color:#0006}:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:root:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-has-backdrop:1;--page-overflow:hidden;--page-scroll-bg:var(--page-scroll-bg-on);--page-scroll-gutter:stable;--page-scroll-transition:var(--page-scroll-transition-on);animation:forwards set-page-has-scroll;animation-timeline:scroll()}@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off)50%}.tooltip:after{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail)50%}.btn:disabled:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:disabled:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn:disabled:not(.btn-link,.btn-ghost){box-shadow:none}.btn:disabled{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:disabled{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}.btn[disabled]:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn[disabled]:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn[disabled]:not(.btn-link,.btn-ghost){box-shadow:none}.btn[disabled]{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn[disabled]{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}.list .list-row:has(.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row:has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list .list-row>:not(.list-col-wrap){grid-row-start:1}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after,.steps .step-neutral>.step-icon{--step-bg:var(--color-neutral);--step-fg:var(--color-neutral-content)}.steps .step-primary+.step-primary:before,.steps .step-primary:after,.steps .step-primary>.step-icon{--step-bg:var(--color-primary);--step-fg:var(--color-primary-content)}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after,.steps .step-secondary>.step-icon{--step-bg:var(--color-secondary);--step-fg:var(--color-secondary-content)}.steps .step-accent+.step-accent:before,.steps .step-accent:after,.steps .step-accent>.step-icon{--step-bg:var(--color-accent);--step-fg:var(--color-accent-content)}.steps .step-info+.step-info:before,.steps .step-info:after,.steps .step-info>.step-icon{--step-bg:var(--color-info);--step-fg:var(--color-info-content)}.steps .step-success+.step-success:before,.steps .step-success:after,.steps .step-success>.step-icon{--step-bg:var(--color-success);--step-fg:var(--color-success-content)}.steps .step-warning+.step-warning:before,.steps .step-warning:after,.steps .step-warning>.step-icon{--step-bg:var(--color-warning);--step-fg:var(--color-warning-content)}.steps .step-error+.step-error:before,.steps .step-error:after,.steps .step-error>.step-icon{--step-bg:var(--color-error);--step-fg:var(--color-error-content)}.menu-horizontal{flex-direction:row;display:inline-flex}.menu-horizontal>li:not(.menu-title)>details>ul{transform-origin:top;border-radius:var(--radius-box);background-color:var(--color-base-100);opacity:0;margin-inline-start:0;margin-top:1rem;padding-block:.5rem;padding-inline-end:.5rem;position:absolute;scale:95%;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}@media(prefers-reduced-motion:no-preference){@starting-style{.menu-horizontal>li:not(.menu-title)>details>ul{opacity:0;scale:95%}}.menu-horizontal>li:not(.menu-title)>details>ul{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s menu}}.menu-horizontal>li:not(.menu-title)>details[open]>ul{opacity:1;scale:100%}.menu-horizontal>li>details>ul:before{--tw-content:none;content:var(--tw-content)}.checkbox:disabled,.radio:disabled{cursor:not-allowed;opacity:.2}.tooltip-bottom>.tooltip-content,.tooltip-bottom[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,-.25rem));inset:var(--tt-off)auto auto 50%}.tooltip-bottom:after{transform:translate(-50%)translateY(var(--tt-pos,-.25rem))rotate(180deg);inset:var(--tt-tail)auto auto 50%}.dropdown-right{--anchor-h:right;--anchor-v:span-bottom}.dropdown-right .dropdown-content{transform-origin:0;inset-inline-start:100%;top:0;bottom:auto}.dropdown-left{--anchor-h:left;--anchor-v:span-bottom}.dropdown-left .dropdown-content{transform-origin:100%;inset-inline-end:100%;top:0;bottom:auto}.dropdown-end{--anchor-h:span-left}.dropdown-end :where(.dropdown-content){inset-inline-end:0;translate:0}[dir=rtl] :is(.dropdown-end :where(.dropdown-content)){translate:0}.dropdown-end.dropdown-left{--anchor-h:left;--anchor-v:span-top}.dropdown-end.dropdown-left .dropdown-content{top:auto;bottom:0}.dropdown-end.dropdown-right{--anchor-h:right;--anchor-v:span-top}.dropdown-end.dropdown-right .dropdown-content{top:auto;bottom:0}.dropdown-bottom{--anchor-v:bottom}.dropdown-bottom .dropdown-content{transform-origin:top;top:100%;bottom:auto}.input-xs{--size:calc(var(--size-field,.25rem)*6);font-size:max(var(--font-size,.6875rem),.6875rem)}.input-xs[type=number]::-webkit-inner-spin-button{margin-block:-.25rem;margin-inline-end:-.75rem}.divider-horizontal{--divider-m:0 1rem}.divider-horizontal.divider{flex-direction:column;width:1rem;height:auto}.divider-horizontal.divider:before,.divider-horizontal.divider:after{width:.125rem;height:100%}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.btn-block{width:100%}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.loading-xs{width:calc(var(--size-selector,.25rem)*4)}.menu-md :where(li:not(.menu-title)>:not(ul,details,.menu-title)),.menu-md :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);padding-block:.375rem;padding-inline:.75rem;font-size:.875rem}.menu-md .menu-title{padding-block:.5rem;padding-inline:.75rem}.badge-ghost{border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content);background-image:none}.badge-outline{color:var(--badge-color);--badge-bg:#0000;background-image:none;border-color:currentColor}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.checkbox-sm{--size:calc(var(--size-selector,.25rem)*5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem)*4);padding:.125rem}.select-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.select-sm option{padding-block:.25rem;padding-inline:.625rem}.select-xs{--size:calc(var(--size-field,.25rem)*6);font-size:.6875rem}.select-xs option{padding-block:.25rem;padding-inline:.5rem}.badge-sm{--size:calc(var(--size-selector,.25rem)*5);font-size:.75rem}.textarea-xs{font-size:max(var(--font-size,.6875rem),.6875rem)}.link-primary{color:var(--color-primary)}@media(hover:hover){.link-primary:hover{color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.link-primary:hover{color:color-mix(in oklab,var(--color-primary)80%,#000)}}}.range-accent{color:var(--color-accent);--range-thumb:var(--color-accent-content)}.range-primary{color:var(--color-primary);--range-thumb:var(--color-primary-content)}.range-secondary{color:var(--color-secondary);--range-thumb:var(--color-secondary-content)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem)*8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem)*6)}.badge-primary{--badge-color:var(--color-primary);--badge-fg:var(--color-primary-content)}.range-sm{--range-thumb-size:calc(var(--size-selector,.25rem)*5)}.range-xs{--range-thumb-size:calc(var(--size-selector,.25rem)*4)}.toggle-primary:checked,.toggle-primary[aria-checked=true]{--input-color:var(--color-primary)}.toggle-secondary:checked,.toggle-secondary[aria-checked=true]{--input-color:var(--color-secondary)}.toggle-sm[type=checkbox],.toggle-sm:has([type=checkbox]){--size:calc(var(--size-selector,.25rem)*5)}.toggle-xs[type=checkbox],.toggle-xs:has([type=checkbox]){--size:calc(var(--size-selector,.25rem)*4)}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-px{top:1px}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-100{z-index:100}.z-800{z-index:800}.z-900{z-index:900}.z-999{z-index:999}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0{margin-inline:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.my-0{margin-block:calc(var(--spacing)*0)}.my-1{margin-block:calc(var(--spacing)*1)}.join-item:where(:not(:first-child,:disabled,[disabled],.btn-disabled)){margin-block-start:0;margin-inline-start:calc(var(--border,1px)*-1)}.join-item:where(:is(:disabled,[disabled],.btn-disabled)){border-width:var(--border,1px)0 var(--border,1px)var(--border,1px)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-16{margin-top:calc(var(--spacing)*16)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.ml-1{margin-left:calc(var(--spacing)*1)}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:root .prose{--tw-prose-body:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-body:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose{--tw-prose-headings:var(--color-base-content);--tw-prose-lead:var(--color-base-content);--tw-prose-links:var(--color-base-content);--tw-prose-bold:var(--color-base-content);--tw-prose-counters:var(--color-base-content);--tw-prose-bullets:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-bullets:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-hr:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-hr:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-quotes:var(--color-base-content);--tw-prose-quote-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-quote-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-captions:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-captions:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-code:var(--color-base-content);--tw-prose-pre-code:var(--color-neutral-content);--tw-prose-pre-bg:var(--color-neutral);--tw-prose-th-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-th-borders:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-td-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-td-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-kbd:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-kbd:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose :where(code):not(pre>code){background-color:var(--color-base-200);border-radius:var(--radius-selector);border:var(--border)solid var(--color-base-300);font-weight:inherit;padding-block:.2em;padding-inline:.5em}:root .prose :where(code):not(pre>code):before,:root .prose :where(code):not(pre>code):after{display:none}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.aspect-3\\/2{aspect-ratio:3/2}.aspect-3\\/4{aspect-ratio:3/4}.aspect-square{aspect-ratio:1}.size-1{width:calc(var(--spacing)*1);height:calc(var(--spacing)*1)}.h-0{height:calc(var(--spacing)*0)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-122{height:calc(var(--spacing)*122)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[calc\\(100vh-8\\.6rem\\)\\]{max-height:calc(100vh - 8.6rem)}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-1\\/2{width:50%}.w-3{width:calc(var(--spacing)*3)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-11\\/12{width:91.6667%}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-56{width:calc(var(--spacing)*56)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\\[150px\\]{width:150px}.w-\\[200px\\]{width:200px}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[200px\\]{max-width:200px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-left{transform-origin:0}.origin-right{transform-origin:100%}.origin-top{transform-origin:top}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-180{rotate:180deg}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-px{gap:1px}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-base-300>:not(:last-child)){border-color:var(--color-base-300)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-xl{border-top-left-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.rounded-r-xl{border-top-right-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-xl)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-200{border-color:var(--color-base-200)}.border-base-300,.border-base-300\\/50{border-color:var(--color-base-300)}@supports (color:color-mix(in lab,red,red)){.border-base-300\\/50{border-color:color-mix(in oklab,var(--color-base-300)50%,transparent)}}.border-base-content\\/10{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\\/10{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.border-primary\\/40{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/40{border-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-white\\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\\/5{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-yellow-400{border-color:var(--color-yellow-400)}.bg-accent{background-color:var(--color-accent)}.bg-base-100,.bg-base-100\\/50{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\\/50{background-color:color-mix(in oklab,var(--color-base-100)50%,transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\\/95{background-color:color-mix(in oklab,var(--color-base-100)95%,transparent)}}.bg-base-200,.bg-base-200\\/50{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/50{background-color:color-mix(in oklab,var(--color-base-200)50%,transparent)}}.bg-base-200\\/90{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/90{background-color:color-mix(in oklab,var(--color-base-200)90%,transparent)}}.bg-base-200\\/95{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.bg-base-200\\/95{background-color:color-mix(in oklab,var(--color-base-200)95%,transparent)}}.bg-base-300,.bg-base-300\\/30{background-color:var(--color-base-300)}@supports (color:color-mix(in lab,red,red)){.bg-base-300\\/30{background-color:color-mix(in oklab,var(--color-base-300)30%,transparent)}}.bg-base-content,.bg-base-content\\/20{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\\/20{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.bg-primary,.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/20{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/20{background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-400\\/40{background-color:#fac80066}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/40{background-color:color-mix(in oklab,var(--color-yellow-400)40%,transparent)}}.fill-red-500\\/20{fill:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.fill-red-500\\/20{fill:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.fill-yellow-400\\/40{fill:#fac80066}@supports (color:color-mix(in lab,red,red)){.fill-yellow-400\\/40{fill:color-mix(in oklab,var(--color-yellow-400)40%,transparent)}}.stroke-red-500{stroke:var(--color-red-500)}.stroke-yellow-400{stroke:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-center{object-position:center}.object-left{object-position:left}.object-right{object-position:right}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-4{padding-block:calc(var(--spacing)*4)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-12{padding-right:calc(var(--spacing)*12)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-nowrap{text-wrap:nowrap}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\\/50{color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.text-error{color:var(--color-error)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.prose :where(.btn-link):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}@layer daisyui.l1{.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)):not(:disabled,[disabled],.btn-disabled){--btn-fg:var(--btn-color,currentColor);outline-color:currentColor}@media(hover:none){.btn-ghost:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color,currentColor);--btn-border:#0000;--btn-noise:none;outline-color:currentColor}}.btn-outline:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn),:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}@media(hover:none){.btn-outline:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}}}.outline-black\\/5{outline-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.outline-black\\/5{outline-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}.group-open\\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.group-focus-within\\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media(hover:hover){.group-hover\\:border-base-content\\/20:is(:where(.group):hover *){border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-base-content\\/20:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:border-none:last-child{--tw-border-style:none;border-style:none}@media(hover:hover){.hover\\:bg-base-200:hover,.hover\\:bg-base-200\\/30:hover{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-base-200\\/30:hover{background-color:color-mix(in oklab,var(--color-base-200)30%,transparent)}}.hover\\:bg-base-200\\/50:hover{background-color:var(--color-base-200)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-base-200\\/50:hover{background-color:color-mix(in oklab,var(--color-base-200)50%,transparent)}}.hover\\:bg-base-300:hover{background-color:var(--color-base-300)}.hover\\:bg-red-500\\/40:hover{background-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/40:hover{background-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.hover\\:bg-yellow-400\\/60:hover{background-color:#fac80099}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-yellow-400\\/60:hover{background-color:color-mix(in oklab,var(--color-yellow-400)60%,transparent)}}.hover\\:fill-red-500\\/40:hover{fill:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.hover\\:fill-red-500\\/40:hover{fill:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.hover\\:fill-yellow-400\\/60:hover{fill:#fac80099}@supports (color:color-mix(in lab,red,red)){.hover\\:fill-yellow-400\\/60:hover{fill:color-mix(in oklab,var(--color-yellow-400)60%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:bg-base-300:focus{background-color:var(--color-base-300)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:bg-base-200:active{background-color:var(--color-base-200)}@media(min-width:64rem){.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\\:pt-8{padding-top:calc(var(--spacing)*8)}.lg\\:pb-16{padding-bottom:calc(var(--spacing)*16)}}}.osd-background,.osd-background .openseadragon-container{background-color:#0000}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items)*100%)}to{translate:0 -100%}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`;var q0=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],X0=["difference","intersection","symmetricDifference","union"],Hc=!1;const $o=class $o extends Set{constructor(e){super();ve(this,Ji);ve(this,Qi,new Map);ve(this,mr,Pe(0));ve(this,ni,Pe(0));ve(this,Jo,gr||-1);if(e){for(var r of e)super.add(r);I(this,ni).v=super.size}Hc||qe(this,Ji,Th).call(this)}has(e){var r=super.has(e),n=I(this,Qi),o=n.get(e);if(o===void 0){if(!r)return p(I(this,mr)),!1;o=qe(this,Ji,xh).call(this,!0),n.set(e,o)}return p(o),r}add(e){return super.has(e)||(super.add(e),_e(I(this,ni),super.size),Yt(I(this,mr))),this}delete(e){var r=super.delete(e),n=I(this,Qi),o=n.get(e);return o!==void 0&&(n.delete(e),_e(o,!1)),r&&(_e(I(this,ni),super.size),Yt(I(this,mr))),r}clear(){if(super.size!==0){super.clear();var e=I(this,Qi);for(var r of e.values())_e(r,!1);e.clear(),_e(I(this,ni),0),Yt(I(this,mr))}}keys(){return this.values()}values(){return p(I(this,mr)),super.values()}entries(){return p(I(this,mr)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return p(I(this,ni))}};Qi=new WeakMap,mr=new WeakMap,ni=new WeakMap,Jo=new WeakMap,Ji=new WeakSet,xh=function(e){return gr===I(this,Jo)?Pe(e):Lt(e)},Th=function(){Hc=!0;var e=$o.prototype,r=Set.prototype;for(const n of q0)e[n]=function(...o){return p(I(this,mr)),r[n].apply(this,o)};for(const n of X0)e[n]=function(...o){p(I(this,mr));var a=r[n].apply(this,o);return new $o(a)}};let No=$o;const Is=class Is extends Map{constructor(e){super();ve(this,_r);ve(this,Lr,new Map);ve(this,zr,Pe(0));ve(this,Ur,Pe(0));ve(this,ea,gr||-1);if(e){for(var[r,n]of e)super.set(r,n);I(this,Ur).v=super.size}}has(e){var r=I(this,Lr),n=r.get(e);if(n===void 0){var o=super.get(e);if(o!==void 0)n=qe(this,_r,ro).call(this,0),r.set(e,n);else return p(I(this,zr)),!1}return p(n),!0}forEach(e,r){qe(this,_r,ia).call(this),super.forEach(e,r)}get(e){var r=I(this,Lr),n=r.get(e);if(n===void 0){var o=super.get(e);if(o!==void 0)n=qe(this,_r,ro).call(this,0),r.set(e,n);else{p(I(this,zr));return}}return p(n),super.get(e)}set(e,r){var h;var n=I(this,Lr),o=n.get(e),a=super.get(e),s=super.set(e,r),c=I(this,zr);if(o===void 0)o=qe(this,_r,ro).call(this,0),n.set(e,o),_e(I(this,Ur),super.size),Yt(c);else if(a!==r){Yt(o);var l=c.reactions===null?null:new Set(c.reactions),u=l===null||!((h=o.reactions)!=null&&h.every(f=>l.has(f)));u&&Yt(c)}return s}delete(e){var r=I(this,Lr),n=r.get(e),o=super.delete(e);return n!==void 0&&(r.delete(e),_e(I(this,Ur),super.size),_e(n,-1),Yt(I(this,zr))),o}clear(){if(super.size!==0){super.clear();var e=I(this,Lr);_e(I(this,Ur),0);for(var r of e.values())_e(r,-1);Yt(I(this,zr)),e.clear()}}keys(){return p(I(this,zr)),super.keys()}values(){return qe(this,_r,ia).call(this),super.values()}entries(){return qe(this,_r,ia).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(I(this,Ur)),super.size}};Lr=new WeakMap,zr=new WeakMap,Ur=new WeakMap,ea=new WeakMap,_r=new WeakSet,ro=function(e){return gr===I(this,ea)?Pe(e):Lt(e)},ia=function(){p(I(this,zr));var e=I(this,Lr);if(I(this,Ur).v!==e.size){for(var r of vh(Is.prototype,this,"keys").call(this))if(!e.has(r)){var n=qe(this,_r,ro).call(this,0);e.set(r,n)}}for([,n]of I(this,Lr))p(n)};let _n=Is;var Nc=(function(){function i(t){this.__jsonld=t,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return i.prototype.getProperty=function(t){var e=null;return this.__jsonld&&(e=this.__jsonld[t],e||(e=this.__jsonld["@"+t])),e},i})(),Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ua(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Y0(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var t=i.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var n=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return i[r]}})}),e}var lt={},Fc;function K0(){if(Fc)return lt;Fc=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.ViewingHint=lt.ViewingDirection=lt.ServiceType=lt.ServiceProfile=lt.RenderingFormat=lt.MediaType=lt.IIIFResourceType=lt.ExternalResourceType=lt.Behavior=lt.AnnotationMotivation=void 0;var i;(function(u){u.BOOKMARKING="oa:bookmarking",u.CLASSIFYING="oa:classifying",u.COMMENTING="oa:commenting",u.DESCRIBING="oa:describing",u.EDITING="oa:editing",u.HIGHLIGHTING="oa:highlighting",u.IDENTIFYING="oa:identifying",u.LINKING="oa:linking",u.MODERATING="oa:moderating",u.PAINTING="sc:painting",u.QUESTIONING="oa:questioning",u.REPLYING="oa:replying",u.TAGGING="oa:tagging",u.TRANSCRIBING="oad:transcribing"})(i||(lt.AnnotationMotivation=i={}));var t;(function(u){u.AUTO_ADVANCE="auto-advance",u.CONTINUOUS="continuous",u.FACING_PAGES="facing-pages",u.HIDDEN="hidden",u.INDIVIDUALS="individuals",u.MULTI_PART="multi-part",u.NO_NAV="no-nav",u.NON_PAGED="non-paged",u.PAGED="paged",u.REPEAT="repeat",u.SEQUENCE="sequence",u.THUMBNAIL_NAV="thumbnail-nav",u.TOGETHER="together",u.UNORDERED="unordered"})(t||(lt.Behavior=t={}));var e;(function(u){u.CANVAS="canvas",u.CHOICE="choice",u.OA_CHOICE="oa:choice",u.CONTENT_AS_TEXT="contentastext",u.DATASET="dataset",u.DOCUMENT="document",u.IMAGE="image",u.MODEL="model",u.MOVING_IMAGE="movingimage",u.PDF="pdf",u.PHYSICAL_OBJECT="physicalobject",u.SOUND="sound",u.TEXT="text",u.TEXTUALBODY="textualbody",u.VIDEO="video"})(e||(lt.ExternalResourceType=e={}));var r;(function(u){u.ANNOTATION="annotation",u.ANNOTATION_COLLECTION="annotationcollection",u.ANNOTATION_PAGE="annotationpage",u.CANVAS="canvas",u.COLLECTION="collection",u.MANIFEST="manifest",u.RANGE="range",u.SEQUENCE="sequence"})(r||(lt.IIIFResourceType=r={}));var n;(function(u){u.APNG="image/apng",u.AUDIO_MP4="audio/mp4",u.AUDIO_OGG="audio/ogg",u.AVIF="audio/avif",u.CORTO="application/corto",u.DICOM="application/dicom",u.DRACO="application/draco",u.EPUB="application/epub+zip",u.GIF="image/gif",u.GIRDER="image/vnd.kitware.girder",u.GLB="model/gltf-binary",u.GLTF="model/gltf+json",u.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',u.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',u.JPG="image/jpeg",u.M3U8="application/vnd.apple.mpegurl",u.MP3="audio/mp3",u.MPEG="audio/mpeg",u.MPEG_DASH="application/dash+xml",u.OBJ="model/obj",u.OPF="application/oebps-package+xml",u.PDF="application/pdf",u.PLY="application/ply",u.PNG="image/png",u.SVG="image/svg+xml",u.THREEJS="application/vnd.threejs+json",u.USDZ="model/vnd.usd+zip",u.VIDEO_MP4="video/mp4",u.VIDEO_OGG="video/ogg",u.WAV="audio/wav",u.WEBM="video/webm",u.WEBP="image/webp"})(n||(lt.MediaType=n={}));var o;(function(u){u.DOC="application/msword",u.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",u.ODT="application/vnd.oasis.opendocument.text",u.PDF="application/pdf"})(o||(lt.RenderingFormat=o={}));var a;(function(u){u.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",u.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",u.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",u.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",u.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",u.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",u.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",u.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",u.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",u.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",u.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",u.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",u.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",u.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",u.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",u.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",u.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",u.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",u.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",u.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",u.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",u.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",u.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",u.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",u.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",u.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",u.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",u.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",u.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",u.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",u.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",u.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",u.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",u.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",u.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",u.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",u.SEARCH_0="http://iiif.io/api/search/0/search",u.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",u.SEARCH_1="http://iiif.io/api/search/1/search",u.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",u.SEARCH_2="http://iiif.io/api/search/2/search",u.SEARCH_2_AUTO_COMPLETE="http://iiif.io/api/search/2/autocomplete",u.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",u.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",u.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",u.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",u.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",u.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",u.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"})(a||(lt.ServiceProfile=a={}));var s;(function(u){u.IMAGE_SERVICE_2="ImageService2",u.IMAGE_SERVICE_3="ImageService3",u.SEARCH_SERVICE_2="SearchService2",u.AUTO_COMPLETE_SERVICE_2="AutoCompleteService2"})(s||(lt.ServiceType=s={}));var c;(function(u){u.BOTTOM_TO_TOP="bottom-to-top",u.LEFT_TO_RIGHT="left-to-right",u.RIGHT_TO_LEFT="right-to-left",u.TOP_TO_BOTTOM="top-to-bottom"})(c||(lt.ViewingDirection=c={}));var l;return(function(u){u.CONTINUOUS="continuous",u.INDIVIDUALS="individuals",u.NON_PAGED="non-paged",u.PAGED="paged",u.TOP="top"})(l||(lt.ViewingHint=l={})),lt}var fe=K0(),Q0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Br=(function(i){Q0(t,i);function t(e,r){var n=i.call(this,e)||this;return n.options=r,n}return t.prototype.getIIIFResourceType=function(){return Ze.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var e=this.getProperty("label");return e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getDefaultLabel=function(){return this.getLabel().getValue(this.options.locale)},t.prototype.getMetadata=function(){var e=this.getProperty("metadata"),r=[];if(!e)return r;for(var n=0;n<e.length;n++){var o=e[n],a=new Uo(this.options.locale);a.parse(o),r.push(a)}return r},t.prototype.getRendering=function(e){for(var r=this.getRenderings(),n=0;n<r.length;n++){var o=r[n];if(o.getFormat()===e)return o}return null},t.prototype.getRenderings=function(){var e;this.__jsonld?e=this.__jsonld.rendering:e=this.rendering;var r=[];if(!e)return r;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var o=e[n];r.push(new Mg(o,this.options))}return r},t.prototype.getRequiredStatement=function(){var e=null,r=this.getProperty("requiredStatement");return r&&(e=new Uo(this.options.locale),e.parse(r)),e},t.prototype.getService=function(e){return Ze.getService(this,e)},t.prototype.getServices=function(){return Ze.getServices(this)},t.prototype.getThumbnail=function(){var e=this.getProperty("thumbnail");return Array.isArray(e)&&(e=e[0]),e?new Ng(e,this.options):null},t.prototype.isAnnotation=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.ANNOTATION},t.prototype.isCanvas=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.CANVAS},t.prototype.isCollection=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.MANIFEST},t.prototype.isRange=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.RANGE},t.prototype.isSequence=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.SEQUENCE},t})(Nc),J0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ga=(function(i){J0(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){var e=this.getProperty("format");return e?e.toLowerCase():null},t.prototype.getResources=function(){var e=[];if(!this.__jsonld.resources)return e;for(var r=0;r<this.__jsonld.resources.length;r++){var n=this.__jsonld.resources[r],o=new Bo(n,this.options);e.push(o)}return e},t.prototype.getType=function(){var e=this.getProperty("type");return e?Ze.normaliseType(e):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getMaxWidth=function(){return this.getProperty("maxWidth")},t.prototype.getMaxHeight=function(){var e=this.getProperty("maxHeight");return e?null:this.getMaxWidth()},t})(Br),$0=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Bc=(function(i){$0(t,i);function t(e,r){var n=i.call(this,e,r)||this;n.index=-1,n.isLoaded=!1;var o={defaultLabel:"-",locale:"en-GB",resource:n,pessimisticAccessControl:!1};return n.options=Object.assign(o,r),n}return t.prototype.getAttribution=function(){var e=this.getProperty("attribution");return e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getDescription=function(){var e=this.getProperty("description");return e===void 0&&(e=this.getProperty("summary")),e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getSummary=function(){var e=this.getProperty("summary");return e===void 0&&(e=this.getProperty("description")),e?sr.parse(e,this.options.locale):new sr([],this.options.locale)},t.prototype.getHomepage=function(){var e=this.getProperty("homepage");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getIIIFResourceType=function(){return Ze.normaliseType(this.getProperty("type"))},t.prototype.getLogo=function(){var e=this.getProperty("logo");if(!e){var r=this.getProperty("provider");if(!r)return null;var n=r.find(function(o){return o.logo!==void 0});n&&n.logo!==void 0?e=n.logo:e=null}return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||(e==null?void 0:e.id)):null},t.prototype.getLicense=function(){return Ze.getLocalisedValue(this.getProperty("license"),this.options.locale)},t.prototype.getRights=function(){var e=this.getProperty("rights");return e?typeof e=="string"?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getNavDate=function(){return new Date(this.getProperty("navDate"))},t.prototype.getRelated=function(){return this.getProperty("related")},t.prototype.getSeeAlso=function(){return this.getProperty("seeAlso")},t.prototype.getTrackingLabel=function(){var e=this.getService(fe.ServiceProfile.TRACKING_EXTENSIONS);return e?e.getProperty("trackingLabel"):""},t.prototype.getDefaultTree=function(){return this.defaultTree=new fs("root"),this.defaultTree.data=this,this.defaultTree},t.prototype.getRequiredStatement=function(){var e=null,r=this.getProperty("requiredStatement");if(r)e=new Uo(this.options.locale),e.parse(r);else{var n=this.getAttribution();n&&n.length&&(e=new Uo(this.options.locale),e.value=n)}return e},t.prototype.isCollection=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===fe.IIIFResourceType.MANIFEST},t.prototype.load=function(){var e=this;return new Promise(function(r){if(e.isLoaded)r(e);else{var n=e.options;n.navDate=e.getNavDate();var o=e.__jsonld.id;o||(o=e.__jsonld["@id"]),Ze.loadManifest(o).then(function(a){e.parentLabel=e.getLabel().getValue(n.locale);var s=uu.parse(a,n);e=Object.assign(e,s),e.index=n.index,r(e)})}})},t})(Br),eg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Bo=(function(i){eg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getBody=function(){var e=[],r=this.getProperty("body");if(r)if(Array.isArray(r))for(var n=0;n<r.length;n++){var o=r[n];if(o.items)for(var a=0;a<o.items.length;a++){var s=o.items[a];e.push(new Vo(s,this.options))}else e.push(new Vo(o,this.options))}else if(r.items)for(var n=0;n<r.items.length;n++){var o=r.items[n];e.push(new Vo(o,this.options))}else e.push(new Vo(r,this.options));return e},t.prototype.getMotivation=function(){var e=this.getProperty("motivation");return e||null},t.prototype.getOn=function(){return this.getProperty("on")},t.prototype.getTarget=function(){return this.getProperty("target")},t.prototype.getResource=function(){return new Ga(this.getProperty("resource"),this.options)},t})(Br),tg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Vo=(function(i){tg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){var e=this.getProperty("format");return e?Ze.getMediaType(e):null},t.prototype.getType=function(){var e=this.getProperty("type");return e?Ze.normaliseType(this.getProperty("type")):null},t.prototype.getValue=function(){return this.getProperty("value")},t.prototype.getLanguage=function(){return this.getProperty("language")},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t})(Br),rg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),ig=(function(i){rg(t,i);function t(e,r,n){var o=i.call(this,r)||this;return o.label=e,o.options=n,o}return t.prototype.getIIIFResourceType=function(){return Ze.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){return this.label},t.prototype.getResources=function(){var e=this,r=this.getProperty("resources");return r.map(function(n){return new Bo(n,e.options)})},t.prototype.load=function(){var e=this;return new Promise(function(r,n){if(e.isLoaded)r(e);else{var o=e.__jsonld.id;o||(o=e.__jsonld["@id"]),Ze.loadManifest(o).then(function(a){e.__jsonld=a,e.context=e.getProperty("context"),e.id=e.getProperty("id"),e.isLoaded=!0,r(e)}).catch(n)}})},t})(Nc),ng=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Vc=(function(i){ng(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getItems=function(){return this.getProperty("items")},t.prototype.getAnnotations=function(){var e=[],r=this.getProperty("items");if(!r||!Array.isArray(r))return e;for(var n=0;n<r.length;n++){var o=new Bo(r[n],this.options);e.push(o)}return e},t})(Br),Za,jc;function og(){if(jc)return Za;jc=1;function i(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}return Za=i,Za}var Wa,Uc;function ag(){if(Uc)return Wa;Uc=1;var i=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo;return Wa=i,Wa}var qa,Gc;function sg(){if(Gc)return qa;Gc=1;var i=ag(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=i||t||Function("return this")();return qa=e,qa}var Xa,Zc;function Ya(){if(Zc)return Xa;Zc=1;var i=sg(),t=i.Symbol;return Xa=t,Xa}var Ka,Wc;function lg(){if(Wc)return Ka;Wc=1;var i=Ya(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,n=i?i.toStringTag:void 0;function o(a){var s=e.call(a,n),c=a[n];try{a[n]=void 0;var l=!0}catch{}var u=r.call(a);return l&&(s?a[n]=c:delete a[n]),u}return Ka=o,Ka}var Qa,qc;function cg(){if(qc)return Qa;qc=1;var i=Object.prototype,t=i.toString;function e(r){return t.call(r)}return Qa=e,Qa}var Ja,Xc;function ug(){if(Xc)return Ja;Xc=1;var i=Ya(),t=lg(),e=cg(),r="[object Null]",n="[object Undefined]",o=i?i.toStringTag:void 0;function a(s){return s==null?s===void 0?n:r:o&&o in Object(s)?t(s):e(s)}return Ja=a,Ja}var $a,Yc;function Kc(){if(Yc)return $a;Yc=1;function i(t){return t!=null&&typeof t=="object"}return $a=i,$a}var es,Qc;function hg(){if(Qc)return es;Qc=1;var i=ug(),t=Kc(),e="[object Arguments]";function r(n){return t(n)&&i(n)==e}return es=r,es}var ts,Jc;function dg(){if(Jc)return ts;Jc=1;var i=hg(),t=Kc(),e=Object.prototype,r=e.hasOwnProperty,n=e.propertyIsEnumerable,o=i((function(){return arguments})())?i:function(a){return t(a)&&r.call(a,"callee")&&!n.call(a,"callee")};return ts=o,ts}var rs,$c;function fg(){if($c)return rs;$c=1;var i=Array.isArray;return rs=i,rs}var is,eu;function pg(){if(eu)return is;eu=1;var i=Ya(),t=dg(),e=fg(),r=i?i.isConcatSpreadable:void 0;function n(o){return e(o)||t(o)||!!(r&&o&&o[r])}return is=n,is}var ns,tu;function ru(){if(tu)return ns;tu=1;var i=og(),t=pg();function e(r,n,o,a,s){var c=-1,l=r.length;for(o||(o=t),s||(s=[]);++c<l;){var u=r[c];n>0&&o(u)?n>1?e(u,n-1,o,a,s):i(s,u):a||(s[s.length]=u)}return s}return ns=e,ns}var os,iu;function gg(){if(iu)return os;iu=1;var i=ru();function t(e){var r=e==null?0:e.length;return r?i(e,1):[]}return os=t,os}var vg=gg();const as=Ua(vg);var ss,nu;function mg(){if(nu)return ss;nu=1;var i=ru(),t=1/0;function e(r){var n=r==null?0:r.length;return n?i(r,t):[]}return ss=e,ss}var _g=mg();const ou=Ua(_g);var wg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),jo=(function(i){wg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getCanonicalImageUri=function(e){var r=null,n="full",o=0,a="default",s=e,c=s+",";if(this.externalResource&&this.externalResource.data&&this.externalResource.data["@id"])r=this.externalResource.data["@id"],s||(s=this.externalResource.data.width),this.externalResource.data["@context"]&&(this.externalResource.data["@context"].indexOf("/1.0/context.json")>-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(a="native");else{var l=void 0;if(l=this.getImages(),l&&l.length){var u=l[0],h=u.getResource(),f=h.getServices();s||(s=h.getWidth());var v=f?f.find(function(S){return Ze.isImageProfile(S.getProfile())||Ze.isImageServiceType(S.getIIIFResourceType())}):null;if(v)r=v.id,a=Ze.getImageQuality(v.getProfile());else if(s===h.getWidth())return h.id}if(l=this.getContent(),l&&l.length){var u=l[0],_=u.getBody(),d=_[0],f=d.getServices();s||(s=d.getWidth());var v=f?f.find(function(R){return Ze.isImageServiceType(R.getIIIFResourceType())}):null;if(v)r=v.id,a=Ze.getImageQuality(v.getProfile());else if(s===d.getWidth())return d.id}if(!r){var g=this.getProperty("thumbnail");if(g){if(typeof g=="string")return g;if(g["@id"])return g["@id"];if(g.length)return g[0].id}}}r&&r.endsWith("/")&&(r=r.substr(0,r.length-1));var b=[r,n,c,o,a+".jpg"].join("/");return b},t.prototype.getMaxDimensions=function(){var e=null,r;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(r=this.externalResource.data.profile,Array.isArray(r)&&(r=r.filter(function(n){var o;return(o=n.maxWidth)!==null&&o!==void 0?o:n.maxwidth})[0],r&&(e=new Lg(r.maxWidth,r.maxHeight?r.maxHeight:r.maxWidth)))),e},t.prototype.getContent=function(){var e=[],r=this.__jsonld.items||this.__jsonld.content;if(!r)return e;var n=null;if(r.length&&(n=new Vc(r[0],this.options)),!n)return e;for(var o=n.getAnnotations(),a=0;a<o.length;a++){var s=o[a];e.push(s)}return e},t.prototype.getAnnotations=function(){var e=[],r=this.__jsonld.annotations;if(!r||!Array.isArray(r))return e;for(var n=0;n<r.length;n++){var o=new Vc(r[n],this.options);e.push(o)}return e},t.prototype.getDuration=function(){return this.getProperty("duration")},t.prototype.getImages=function(){var e=[];if(!this.__jsonld.images)return e;for(var r=0;r<this.__jsonld.images.length;r++){var n=this.__jsonld.images[r],o=new Bo(n,this.options);e.push(o)}return e},t.prototype.getIndex=function(){return this.getProperty("index")},t.prototype.getOtherContent=function(){var e=this,r=Array.isArray(this.getProperty("otherContent"))?this.getProperty("otherContent"):[this.getProperty("otherContent")],n=function(a,s){return typeof a!="string"?!1:a.toLowerCase()===a.toLowerCase()},o=r.filter(function(a){return a&&n(a["@type"])}).map(function(a,s){return new ig(a.label||"Annotation list ".concat(s),a,e.options)}).map(function(a){return a.load()});return Promise.all(o)},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},Object.defineProperty(t.prototype,"imageResources",{get:function(){var e=this,r=ou([this.getImages().map(function(n){return n.getResource()}),this.getContent().map(function(n){return n.getBody()})]);return as(r.map(function(n){switch(n.getProperty("type").toLowerCase()){case fe.ExternalResourceType.CHOICE:case fe.ExternalResourceType.OA_CHOICE:return new t({images:as([n.getProperty("default"),n.getProperty("item")]).map(function(o){return{resource:o}})},e.options).getImages().map(function(o){return o.getResource()});default:return n}}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resourceAnnotations",{get:function(){return ou([this.getImages(),this.getContent()])},enumerable:!1,configurable:!0}),t.prototype.resourceAnnotation=function(e){return this.resourceAnnotations.find(function(r){return r.getResource().id===e||as(new Array(r.getBody())).some(function(n){return n.id===e})})},t.prototype.onFragment=function(e){var r=this.resourceAnnotation(e);if(r){var n=r.getProperty("on"),o=r.getProperty("target");if(!(!n||!o)){var a=(n||o).match(/xywh=(.*)$/);if(a)return a[1].split(",").map(function(s){return parseInt(s,10)})}}},Object.defineProperty(t.prototype,"iiifImageResources",{get:function(){return this.imageResources.filter(function(e){return e&&e.getServices()[0]&&e.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageServiceIds",{get:function(){return this.iiifImageResources.map(function(e){return e.getServices()[0].id})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){return this.getWidth()/this.getHeight()},enumerable:!1,configurable:!0}),t})(Ga),bg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),yg=(function(i){bg(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.items=[],n._collections=null,n._manifests=null,e.__collection=n,n}return t.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.items.filter(function(e){return e.isCollection()})},t.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.items.filter(function(e){return e.isManifest()})},t.prototype.getCollectionByIndex=function(e){for(var r=this.getCollections(),n,o=0;o<r.length;o++){var a=r[o];a.index===e&&(n=a)}if(n)return n.options.index=e,n.load();throw new Error("Collection index not found")},t.prototype.getManifestByIndex=function(e){for(var r=this.getManifests(),n,o=0;o<r.length;o++){var a=r[o];a.index===e&&(n=a)}if(n)return n.options.index=e,n.load();throw new Error("Manifest index not found")},t.prototype.getTotalCollections=function(){return this.getCollections().length},t.prototype.getTotalManifests=function(){return this.getManifests().length},t.prototype.getTotalItems=function(){return this.items.length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):fe.ViewingDirection.LEFT_TO_RIGHT},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){return i.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Ze.normaliseType(Rr.COLLECTION),this._parseManifests(this),this._parseCollections(this),Ze.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._parseManifests=function(e){if(e.getManifests()&&e.getManifests().length)for(var r=0;r<e.getManifests().length;r++){var n=e.getManifests()[r],o=n.getDefaultTree();o.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"manifest "+(r+1),o.navDate=n.getNavDate(),o.data.id=n.id,o.data.type=Ze.normaliseType(Rr.MANIFEST),e.defaultTree.addNode(o)}},t.prototype._parseCollections=function(e){if(e.getCollections()&&e.getCollections().length)for(var r=0;r<e.getCollections().length;r++){var n=e.getCollections()[r],o=n.getDefaultTree();o.label=n.parentLabel||n.getLabel().getValue(this.options.locale)||"collection "+(r+1),o.navDate=n.getNavDate(),o.data.id=n.id,o.data.type=Ze.normaliseType(Rr.COLLECTION),e.defaultTree.addNode(o)}},t})(Bc),ls=(function(){function i(t,e){this.start=t,this.end=e}return i.prototype.getLength=function(){return this.end-this.start},i})(),Uo=(function(){function i(t){this.defaultLocale=t}return i.prototype.parse=function(t){this.resource=t,this.label=sr.parse(this.resource.label,this.defaultLocale),this.value=sr.parse(this.resource.value,this.defaultLocale)},i.prototype.getLabel=function(t){return this.label===null?null:(Array.isArray(t)&&!t.length&&(t=void 0),this.label.getValue(t||this.defaultLocale))},i.prototype.setLabel=function(t){this.label===null&&(this.label=new sr([])),this.label.setValue(t,this.defaultLocale)},i.prototype.getValue=function(t,e){return e===void 0&&(e="<br/>"),this.value===null?null:(Array.isArray(t)&&!t.length&&(t=void 0),this.value.getValue(t||this.defaultLocale,e))},i.prototype.getValues=function(t){return this.value===null?[]:(Array.isArray(t)&&!t.length&&(t=void 0),this.value.getValues(t||this.defaultLocale))},i.prototype.setValue=function(t){this.value===null&&(this.value=new sr([])),this.value.setValue(t,this.defaultLocale)},i})(),xg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})();(function(i){xg(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}return t.getValue=function(e,r){return e.getValue(r,"<br/>")},t.getValues=function(e,r){return e.getValues(r)},t})(Array);var Ae={},au;function Tg(){return au||(au=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.CONTINUE=100,Ae.SWITCHING_PROTOCOLS=101,Ae.PROCESSING=102,Ae.OK=200,Ae.CREATED=201,Ae.ACCEPTED=202,Ae.NON_AUTHORITATIVE_INFORMATION=203,Ae.NO_CONTENT=204,Ae.RESET_CONTENT=205,Ae.PARTIAL_CONTENT=206,Ae.MULTI_STATUS=207,Ae.MULTIPLE_CHOICES=300,Ae.MOVED_PERMANENTLY=301,Ae.MOVED_TEMPORARILY=302,Ae.SEE_OTHER=303,Ae.NOT_MODIFIED=304,Ae.USE_PROXY=305,Ae.TEMPORARY_REDIRECT=307,Ae.BAD_REQUEST=400,Ae.UNAUTHORIZED=401,Ae.PAYMENT_REQUIRED=402,Ae.FORBIDDEN=403,Ae.NOT_FOUND=404,Ae.METHOD_NOT_ALLOWED=405,Ae.NOT_ACCEPTABLE=406,Ae.PROXY_AUTHENTICATION_REQUIRED=407,Ae.REQUEST_TIME_OUT=408,Ae.CONFLICT=409,Ae.GONE=410,Ae.LENGTH_REQUIRED=411,Ae.PRECONDITION_FAILED=412,Ae.REQUEST_ENTITY_TOO_LARGE=413,Ae.REQUEST_URI_TOO_LARGE=414,Ae.UNSUPPORTED_MEDIA_TYPE=415,Ae.REQUESTED_RANGE_NOT_SATISFIABLE=416,Ae.EXPECTATION_FAILED=417,Ae.IM_A_TEAPOT=418,Ae.UNPROCESSABLE_ENTITY=422,Ae.LOCKED=423,Ae.FAILED_DEPENDENCY=424,Ae.UNORDERED_COLLECTION=425,Ae.UPGRADE_REQUIRED=426,Ae.PRECONDITION_REQUIRED=428,Ae.TOO_MANY_REQUESTS=429,Ae.REQUEST_HEADER_FIELDS_TOO_LARGE=431,Ae.INTERNAL_SERVER_ERROR=500,Ae.NOT_IMPLEMENTED=501,Ae.BAD_GATEWAY=502,Ae.SERVICE_UNAVAILABLE=503,Ae.GATEWAY_TIME_OUT=504,Ae.HTTP_VERSION_NOT_SUPPORTED=505,Ae.VARIANT_ALSO_NEGOTIATES=506,Ae.INSUFFICIENT_STORAGE=507,Ae.BANDWIDTH_LIMIT_EXCEEDED=509,Ae.NOT_EXTENDED=510,Ae.NETWORK_AUTHENTICATION_REQUIRED=511),Ae}var ar=Tg();function Eg(i,t){return t=t||{},new Promise(function(e,r){var n=new XMLHttpRequest,o=[],a=[],s={},c=function(){return{ok:(n.status/100|0)==2,statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return a},get:function(u){return s[u.toLowerCase()]},has:function(u){return u.toLowerCase()in s}}}};for(var l in n.open(t.method||"get",i,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(u,h,f){o.push(h=h.toLowerCase()),a.push([h,f]),s[h]=s[h]?s[h]+","+f:f}),e(c())},n.onerror=r,n.withCredentials=t.credentials=="include",t.headers)n.setRequestHeader(l,t.headers[l]);n.send(t.body||null)})}const su=Y0(Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"})));var cs,lu;function kg(){return lu||(lu=1,cs=self.fetch||(self.fetch=su.default||su)),cs}kg();var us=function(i,t,e,r){function n(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(h){a(h)}}function c(u){try{l(r.throw(u))}catch(h){a(h)}}function l(u){u.done?o(u.value):n(u.value).then(s,c)}l((r=r.apply(i,t||[])).next())})},hs=function(i,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(e=0)),e;)try{if(r=1,n&&(o=l[0]&2?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,n=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){e.label=l[1];break}if(l[0]===6&&e.label<o[1]){e.label=o[1],o=l;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(l);break}o[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(i,e)}catch(u){l=[6,u],n=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ze=(function(){function i(){}return i.getMediaType=function(t){return t=t.toLowerCase(),t=t.split(";")[0],t.trim()},i.getImageQuality=function(t){return t===fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1||t===fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2||t===fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1||t===fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2||t===fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1||t===fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2||t===fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1||t===fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2||t===fe.ServiceProfile.IMAGE_1_LEVEL_1||t===fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1||t===fe.ServiceProfile.IMAGE_1_LEVEL_2||t===fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2?"native":"default"},i.getInexactLocale=function(t){return t.indexOf("-")!==-1?t.substr(0,t.indexOf("-")):t},i.getLocalisedValue=function(t,e){if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++){var n=t[r],o=n["@language"];if(e===o)return n["@value"]}for(var a=e.substr(0,e.indexOf("-")),r=0;r<t.length;r++){var s=t[r],c=s["@language"];if(c===a)return s["@value"]}return null},i.generateTreeNodeIds=function(t,e){e===void 0&&(e=0);var r;t.parentNode?r=t.parentNode.id+"-"+e:r="0",t.id=r;for(var n=0;n<t.nodes.length;n++){var o=t.nodes[n];i.generateTreeNodeIds(o,n)}},i.normaliseType=function(t){if(t=(t||"").toLowerCase(),t.indexOf(":")!==-1){var e=t.split(":");return e[1]}return t},i.normaliseUrl=function(t){return t=t.substr(t.indexOf("://")),t.indexOf("#")!==-1&&(t=t.split("#")[0]),t},i.normalisedUrlsMatch=function(t,e){return i.normaliseUrl(t)===i.normaliseUrl(e)},i.isImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},i.isImageServiceType=function(t){return t!==null&&t.toLowerCase()===fe.ServiceType.IMAGE_SERVICE_2.toLowerCase()||t===fe.ServiceType.IMAGE_SERVICE_3.toLowerCase()},i.isLevel0ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_0)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0))},i.isLevel1ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_1)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1))},i.isLevel2ImageProfile=function(t){return!!(i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_LEVEL_2)||i.normalisedUrlsMatch(t,fe.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},i.parseManifest=function(t,e){return uu.parse(t,e)},i.checkStatus=function(t){if(t.ok)return t;var e=new Error(t.statusText);return e.response=t,Promise.reject(e)},i.loadManifest=function(t){return new Promise(function(e,r){fetch(t).then(i.checkStatus).then(function(n){return n.json()}).then(function(n){e(n)}).catch(function(n){r()})})},i.loadExternalResourcesAuth1=function(t,e,r,n,o,a,s,c){return new Promise(function(l,u){var h=t.map(function(f){return i.loadExternalResourceAuth1(f,e,r,n,o,a,s,c)});Promise.all(h).then(function(){l(t)}).catch(function(f){u(f)})})},i.loadExternalResourceAuth1=function(t,e,r,n,o,a,s,c){return us(this,void 0,void 0,function(){var l;return hs(this,function(u){switch(u.label){case 0:return[4,n(t)];case 1:return l=u.sent(),l?[4,t.getData(l)]:[3,6];case 2:return u.sent(),t.status!==ar.OK?[3,3]:[2,t];case 3:return[4,i.doAuthChain(t,e,r,o,a,s,c)];case 4:u.sent(),u.label=5;case 5:if(t.status===ar.OK||t.status===ar.MOVED_TEMPORARILY)return[2,t];throw i.createAuthorizationFailedError();case 6:return[4,t.getData()];case 7:return u.sent(),t.status===ar.MOVED_TEMPORARILY||t.status===ar.UNAUTHORIZED?[4,i.doAuthChain(t,e,r,o,a,s,c)]:[3,9];case 8:u.sent(),u.label=9;case 9:if(t.status===ar.OK||t.status===ar.MOVED_TEMPORARILY)return[2,t];throw i.createAuthorizationFailedError()}})})},i.doAuthChain=function(t,e,r,n,o,a,s){return us(this,void 0,void 0,function(){var c,l,u,h,f,v,_,d,d;return hs(this,function(g){switch(g.label){case 0:return t.isAccessControlled()?(c=t.externalService,c&&(c.options=t.options),l=t.kioskService,l&&(l.options=t.options),u=t.clickThroughService,u&&(u.options=t.options),h=t.loginService,h&&(h.options=t.options),!t.isResponseHandled&&t.status===ar.MOVED_TEMPORARILY?[4,a(t)]:[3,2]):[2,t];case 1:return g.sent(),[2,t];case 2:return f=null,v=null,f=c,f?(v=f,[4,i.attemptResourceWithToken(t,r,f)]):[3,4];case 3:return g.sent(),[2,t];case 4:return f=l,f?(v=f,_=e(f),_?[4,n(_)]:[3,7]):[3,7];case 5:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 6:return g.sent(),[2,t];case 7:return f=u,f?(v=f,[4,o(t,f)]):[3,11];case 8:return d=g.sent(),d?[4,n(d)]:[3,11];case 9:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 10:return g.sent(),[2,t];case 11:return f=h,f?(v=f,[4,o(t,f)]):[3,15];case 12:return d=g.sent(),d?[4,n(d)]:[3,15];case 13:return g.sent(),[4,i.attemptResourceWithToken(t,r,f)];case 14:return g.sent(),[2,t];case 15:return v&&s(t,v),[2]}})})},i.attemptResourceWithToken=function(t,e,r){return us(this,void 0,void 0,function(){var n,o;return hs(this,function(a){switch(a.label){case 0:return n=r.getService(fe.ServiceProfile.AUTH_1_TOKEN),n?[4,e(t,n)]:[3,3];case 1:return o=a.sent(),o&&o.accessToken?[4,t.getData(o)]:[3,3];case 2:return a.sent(),[2,t];case 3:return[2]}})})},i.loadExternalResourcesAuth09=function(t,e,r,n,o,a,s,c,l,u){return new Promise(function(h,f){var v=t.map(function(_){return i.loadExternalResourceAuth09(_,e,r,n,o,a,s,c,l,u)});Promise.all(v).then(function(){h(t)}).catch(function(_){f(_)})})},i.loadExternalResourceAuth09=function(t,e,r,n,o,a,s,c,l,u){return new Promise(function(h,f){u&&u.pessimisticAccessControl?t.getData().then(function(){t.isAccessControlled()?t.clickThroughService?(h(r(t)),h(n(t))):o(t).then(function(){a(t,!0).then(function(v){t.getData(v).then(function(){h(l(t))}).catch(function(_){f(i.createInternalServerError(_))})}).catch(function(v){f(i.createInternalServerError(v))})}).catch(function(v){f(i.createInternalServerError(v))}):h(t)}).catch(function(v){f(i.createInternalServerError(v))}):c(t,e).then(function(v){v?t.getData(v).then(function(){t.status===ar.OK?h(l(t)):i.authorize(t,e,r,n,o,a,s,c).then(function(){h(l(t))}).catch(function(_){f(i.createAuthorizationFailedError())})}).catch(function(_){f(i.createAuthorizationFailedError())}):i.authorize(t,e,r,n,o,a,s,c).then(function(){h(l(t))}).catch(function(_){f(i.createAuthorizationFailedError())})}).catch(function(v){f(i.createAuthorizationFailedError())})})},i.createError=function(t,e){var r=new Error;return r.message=e,r.name=String(t),r},i.createAuthorizationFailedError=function(){return i.createError(wn.AUTHORIZATION_FAILED,"Authorization failed")},i.createRestrictedError=function(){return i.createError(wn.RESTRICTED,"Restricted")},i.createInternalServerError=function(t){return i.createError(wn.INTERNAL_SERVER_ERROR,t)},i.authorize=function(t,e,r,n,o,a,s,c){return new Promise(function(l,u){t.getData().then(function(){t.isAccessControlled()?c(t,e).then(function(h){h?t.getData(h).then(function(){t.status===ar.OK?l(t):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)}).catch(function(f){u(i.createInternalServerError(f))}):a(t,!1).then(function(f){f?s(t,f,e).then(function(){t.getData(f).then(function(){t.status===ar.OK?l(t):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)}).catch(function(v){u(i.createInternalServerError(v))})}).catch(function(v){u(i.createInternalServerError(v))}):i.showAuthInteraction(t,e,r,n,o,a,s,l,u)})}).catch(function(h){u(i.createInternalServerError(h))}):l(t)})})},i.showAuthInteraction=function(t,e,r,n,o,a,s,c,l){t.status===ar.MOVED_TEMPORARILY&&!t.isResponseHandled?c(t):t.clickThroughService&&!t.isResponseHandled?r(t).then(function(){a(t,!0).then(function(u){s(t,u,e).then(function(){t.getData(u).then(function(){c(t)}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(u){l(i.createInternalServerError(u))})}):o(t).then(function(){a(t,!0).then(function(u){s(t,u,e).then(function(){t.getData(u).then(function(){c(t)}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(h){l(i.createInternalServerError(h))})}).catch(function(u){l(i.createInternalServerError(u))})})},i.getService=function(t,e){for(var r=this.getServices(t),n=0;n<r.length;n++){var o=r[n];if(o.getProfile()===e)return o}return null},i.getResourceById=function(t,e){return i.traverseAndFind(t.__jsonld,"@id",e)},i.traverseAndFind=function(t,e,r){if(t.hasOwnProperty(e)&&t[e]===r)return t;for(var n=0;n<Object.keys(t).length;n++)if(typeof t[Object.keys(t)[n]]=="object"){var o=i.traverseAndFind(t[Object.keys(t)[n]],e,r);if(o!=null)return o}},i.getServices=function(t,e){var r=e===void 0?{}:e,n=r.onlyService,o=n===void 0?!1:n,a=r.onlyServices,s=a===void 0?!1:a,c=r.skipParentResources,l=c===void 0?!1:c,u=[];!l&&t&&t.options&&t.options.resource&&t.options.resource!==t&&u.push.apply(u,i.getServices(t.options.resource,{onlyServices:!0}));var h=s?[]:(t.__jsonld||t).service||[];if(Array.isArray(h)||(h=[h]),o||h.push.apply(h,(t.__jsonld||t).services||[]),h.length===0)return u;for(var f=0;f<h.length;f++){var v=h[f];if(typeof v=="string"){var _=this.getResourceById(t.options.resource,v);_&&u.push(new hu(_.__jsonld||_,t.options))}else u.push(new hu(v,t.options))}return u},i.getTemporalComponent=function(t){var e=/t=([^&]+)/g.exec(t),r=null;return e&&e[1]&&(r=e[1].split(",")),r},i})(),Sg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ui=(function(){function i(t,e,r){r===void 0&&(r="none"),Array.isArray(t)&&t.length===1?this._value=t[0]:this._value=t,(e==="none"||e==="@none")&&(e=void 0),this._locale=e,this._defaultLocale=r}return i.parseV2Value=function(t,e){return typeof t=="string"?new i(t,void 0,e):t["@value"]?new i(t["@value"],t["@language"],e):null},Object.defineProperty(i.prototype,"value",{get:function(){return Array.isArray(this._value)?this._value.join("<br/>"):this._value},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"locale",{get:function(){return this._locale===void 0?this._defaultLocale:this._locale},enumerable:!1,configurable:!0}),i.prototype.addValue=function(t){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(t)?this._value=this._value.concat(t):this._value.push(t)},i})(),sr=(function(i){Sg(t,i);function t(e,r){e===void 0&&(e=[]);var n=i.apply(this,e)||this;return n.__proto__=t.prototype,n._defaultLocale=r,n}return t.parse=function(e,r){if(!e)return new t([],r);if(Array.isArray(e)){var n=e.map(function(a){return Ui.parseV2Value(a,r)}).filter(function(a){return a!==null}),o=n.reduce(function(a,s){var c=s._locale;return c||(c="none"),a[c]?a[c].addValue(s._value):a[c]=s,a},{});return new t(Object.values(o),r)}else{if(typeof e=="string")return new t([new Ui(e,void 0,r)],r);if(e["@language"]){var n=Ui.parseV2Value(e);return new t(n!==null?[n]:[],r)}else if(e["@value"]){var n=Ui.parseV2Value(e);return new t(n!==null?[n]:[],r)}else return new t(Object.keys(e).map(function(a){var s=e[a];if(!Array.isArray(s))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new Ui(s,a,r)}),r)}},t.prototype.getSuitableLocale=function(e){for(var r=Array.from(this.values()).map(function(v){return v._locale}).filter(function(v){return v!==void 0}),n=function(v){var _=r.find(function(d){return d===v});if(_)return{value:_}},o=0,a=e;o<a.length;o++){var s=a[o],c=n(s);if(typeof c=="object")return c.value}for(var l=function(v){var _=r.find(function(d){return Ze.getInexactLocale(d)===Ze.getInexactLocale(v)});if(_)return{value:_}},u=0,h=e;u<h.length;u++){var s=h[u],f=l(s);if(typeof f=="object")return f.value}},t.prototype.setValue=function(e,r){var n=void 0;if(!r)n=this.find(function(a){return a._locale===void 0});else{var o=this.getSuitableLocale([r]);o&&(n=this.find(function(a){return a._locale===o}))}n?n._value=e:this.push(new Ui(e,r,this._defaultLocale))},t.prototype.getValue=function(e,r){var n=this.getValues(e);return n.length===0?null:r?n.join(r):n[0]},t.prototype.getValues=function(e){if(!this.length)return[];var r;if(e?Array.isArray(e)?r=e:r=[e]:r=[],this.length===1&&this[0]._locale===void 0){var n=this[0]._value;return Array.isArray(n)?n:[n]}var o=this.getSuitableLocale(r);if(o){var n=this.find(function(l){return l._locale===o})._value;return Array.isArray(n)?n:[n]}var a=!this.find(function(c){return c._locale===void 0});if(a){var n=this[0]._value;return Array.isArray(n)?n:[n]}var s=this.find(function(c){return c._locale===void 0});return s?Array.isArray(s._value)?s._value:[s._value]:[]},t})(Array),Cg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Pg=(function(i){Cg(t,i);function t(e,r){var n=i.call(this,e,r)||this;if(n.index=0,n._allRanges=null,n.items=[],n._topRanges=[],n.__jsonld.structures&&n.__jsonld.structures.length)for(var o=n._getTopRanges(),a=0;a<o.length;a++){var s=o[a];n._parseRanges(s,String(a))}return n}return t.prototype.getPosterCanvas=function(){var e=this.getProperty("posterCanvas");return e&&(e=new jo(e,this.options)),e},t.prototype.getAccompanyingCanvas=function(){var e=this.getProperty("accompanyingCanvas");return e&&(e=new jo(e,this.options)),e},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){if(i.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Ze.normaliseType(Rr.MANIFEST),!this.isLoaded)return this.defaultTree;var e=this.getTopRanges();return e.length&&e[0].getTree(this.defaultTree),Ze.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._getTopRanges=function(){var e=[];if(this.__jsonld.structures&&this.__jsonld.structures.length){for(var r=0;r<this.__jsonld.structures.length;r++){var n=this.__jsonld.structures[r];n.viewingHint===fe.ViewingHint.TOP&&e.push(n)}if(!e.length){var o={};o.ranges=this.__jsonld.structures,e.push(o)}}return e},t.prototype.getTopRanges=function(){return this._topRanges},t.prototype._getRangeById=function(e){if(this.__jsonld.structures&&this.__jsonld.structures.length)for(var r=0;r<this.__jsonld.structures.length;r++){var n=this.__jsonld.structures[r];if(n["@id"]===e||n.id===e)return n}return null},t.prototype._parseRanges=function(e,r,n){var o=null;if(typeof e=="string"&&(o=e,e=this._getRangeById(o)),!e){console.warn("Range:",o,"does not exist");return}var a=new Rg(e,this.options);a.parentRange=n,a.path=r,n?n.items.push(a):this._topRanges.push(a);var s=e.items||e.members;if(s)for(var c=0;c<s.length;c++){var l=s[c];if(l["@type"]&&l["@type"].toLowerCase()==="sc:range"||l.type&&l.type.toLowerCase()==="range")this._parseRanges(l,r+"/"+c,a);else if(l["@type"]&&l["@type"].toLowerCase()==="sc:canvas"||l.type&&l.type.toLowerCase()==="canvas"){a.canvases||(a.canvases=[]);var u=l.id||l["@id"];a.canvases.push(u)}}else if(e.ranges)for(var c=0;c<e.ranges.length;c++)this._parseRanges(e.ranges[c],r+"/"+c,a)},t.prototype.getAllRanges=function(){if(this._allRanges!=null)return this._allRanges;this._allRanges=[];for(var e=this.getTopRanges(),r=function(a){var s=e[a];s.id&&n._allRanges.push(s);var c=function(u,h){u.add(h);var f=h.getRanges();return f.length?f.reduce(c,u):u},l=Array.from(s.getRanges().reduce(c,new Set));n._allRanges=n._allRanges.concat(l)},n=this,o=0;o<e.length;o++)r(o);return this._allRanges},t.prototype.getRangeById=function(e){for(var r=this.getAllRanges(),n=0;n<r.length;n++){var o=r[n];if(o.id===e)return o}return null},t.prototype.getRangeByPath=function(e){for(var r=this.getAllRanges(),n=0;n<r.length;n++){var o=r[n];if(o.path===e)return o}return null},t.prototype.getSequences=function(){if(this.items.length)return this.items;var e=this.__jsonld.mediaSequences||this.__jsonld.sequences;if(e)for(var r=0;r<e.length;r++){var n=e[r],o=new cu(n,this.options);this.items.push(o)}else if(this.__jsonld.items){var o=new cu(this.__jsonld.items,this.options);this.items.push(o)}return this.items},t.prototype.getSequenceByIndex=function(e){return this.getSequences()[e]},t.prototype.getTotalSequences=function(){return this.getSequences().length},t.prototype.getManifestType=function(){var e=this.getService(fe.ServiceProfile.UI_EXTENSIONS);return e?e.getProperty("manifestType"):ds.EMPTY},t.prototype.isMultiSequence=function(){return this.getTotalSequences()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===fe.ViewingHint.PAGED;var r=this.getBehavior();return r?r===fe.Behavior.PAGED:!1},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t})(Bc),ds;(function(i){i.EMPTY="",i.MANUSCRIPT="manuscript",i.MONOGRAPH="monograph"})(ds||(ds={}));var Ag=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Rg=(function(i){Ag(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n._ranges=null,n.canvases=null,n.items=[],n}return 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=[],r=[],n=0,o=this.canvases;n<o.length;n++){var a=o[n];if(a){var s=a.match(/(.*)#t=([0-9.]+),?([0-9.]+)?/)||[void 0,a],c=s[1],l=s[2],u=s[3];c&&(e.push(parseFloat(l)),r.push(parseFloat(u)))}}if(e.length&&r.length)return new ls(Math.min.apply(Math,e),Math.max.apply(Math,r))}else{for(var h=this.getRanges(),e=[],r=[],f=0,v=h;f<v.length;f++){var _=v[f],d=_.getDuration();d&&(e.push(d.start),r.push(d.end))}if(e.length&&r.length)return new ls(Math.min.apply(Math,e),Math.max.apply(Math,r))}var g,b;if(this.canvases&&this.canvases.length)for(var S=0;S<this.canvases.length;S++){var a=this.canvases[S],P=Ze.getTemporalComponent(a);P&&P.length>1&&(S===0&&(g=Number(P[0])),S===this.canvases.length-1&&(b=Number(P[1])))}else for(var h=this.getRanges(),S=0;S<h.length;S++){var _=h[S],d=_.getDuration();d&&(S===0&&(g=d.start),S===h.length-1&&(b=d.end))}if(g!==void 0&&b!==void 0)return new ls(g,b)},t.prototype.getRanges=function(){return this._ranges?this._ranges:this._ranges=this.items.filter(function(e){return e.isRange()})},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getTree=function(e){e.data=this,this.treeNode=e;var r=this.getRanges();if(r&&r.length)for(var n=0;n<r.length;n++){var o=r[n],a=new fs;e.addNode(a),this._parseTreeNode(a,o)}return Ze.generateTreeNodeIds(e),e},t.prototype.spansTime=function(e){var r=this.getDuration();return!!(r&&e>=r.start&&e<=r.end)},t.prototype._parseTreeNode=function(e,r){e.label=r.getLabel().getValue(this.options.locale),e.data=r,e.data.type=Ze.normaliseType(Rr.RANGE),r.treeNode=e;var n=r.getRanges();if(n&&n.length)for(var o=0;o<n.length;o++){var a=n[o],s=a.getBehavior();if(s!==fe.Behavior.NO_NAV){var c=new fs;e.addNode(c),this._parseTreeNode(c,a)}}},t})(Br),Ig=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Mg=(function(i){Ig(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getFormat=function(){return this.getProperty("format")},t})(Br),Og=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),cu=(function(i){Og(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.items=[],n._thumbnails=null,n}return t.prototype.getCanvases=function(){if(this.items.length)return this.items;var e=this.__jsonld.canvases||this.__jsonld.elements;if(e)for(var r=0;r<e.length;r++){var n=e[r],o=new jo(n,this.options);o.index=r,this.items.push(o)}else if(this.__jsonld)for(var r=0;r<this.__jsonld.length;r++){var n=this.__jsonld[r],o=new jo(n,this.options);o.index=r,this.items.push(o)}return this.items},t.prototype.getCanvasById=function(e){for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r),o=Ze.normaliseUrl(n.id);if(Ze.normaliseUrl(e)===o)return n}return null},t.prototype.getCanvasByIndex=function(e){return this.getCanvases()[e]},t.prototype.getCanvasIndexById=function(e){for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r);if(n.id===e)return r}return null},t.prototype.getCanvasIndexByLabel=function(e,r){e=e.trim(),isNaN(e)||(e=parseInt(e,10).toString(),r&&(e+="r"));for(var n=/(\d*)\D+(\d*)/,o,a,s,c,l,u=0;u<this.getTotalCanvases();u++){var h=this.getCanvasByIndex(u);if(h.getLabel().getValue(this.options.locale)===e)return u;if(o=n.exec(e),!!o&&(c=o[1],l=o[2],!!l&&(s="^"+c+"\\D+"+l+"$",a=new RegExp(s),a.test(h.getLabel().toString()))))return u}return-1},t.prototype.getLastCanvasLabel=function(e){for(var r=this.getTotalCanvases()-1;r>=0;r--){var n=this.getCanvasByIndex(r),o=n.getLabel().getValue(this.options.locale);if(e){var a=/^[a-zA-Z0-9]*$/;if(a.test(o))return o}else if(o)return o}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(e,r){var n;if(r){var o=this.getPagedIndices(e),a=this.getViewingDirection();a&&a===fe.ViewingDirection.RIGHT_TO_LEFT?n=o[0]+1:n=o[o.length-1]+1}else n=e+1;return n>this.getLastPageIndex()?-1:n},t.prototype.getPagedIndices=function(e,r){var n=[];if(!r)n.push(e);else{this.isFirstCanvas(e)||this.isLastCanvas(e)?n=[e]:e%2?n=[e,e+1]:n=[e-1,e];var o=this.getViewingDirection();o&&o===fe.ViewingDirection.RIGHT_TO_LEFT&&(n=n.reverse())}return n},t.prototype.getPrevPageIndex=function(e,r){var n;if(r){var o=this.getPagedIndices(e),a=this.getViewingDirection();a&&a===fe.ViewingDirection.RIGHT_TO_LEFT?n=o[o.length-1]-1:n=o[0]-1}else n=e-1;return n},t.prototype.getStartCanvasIndex=function(){var e=this.getStartCanvas();if(e)for(var r=0;r<this.getTotalCanvases();r++){var n=this.getCanvasByIndex(r);if(n.id===e)return r}return 0},t.prototype.getThumbs=function(e,r){for(var n=[],o=this.getTotalCanvases(),a=0;a<o;a++){var s=this.getCanvasByIndex(a),c=new zg(e,s);n.push(c)}return n},t.prototype.getThumbnails=function(){if(this._thumbnails!=null)return this._thumbnails;this._thumbnails=[];for(var e=this.getCanvases(),r=0;r<e.length;r++){var n=e[r].getThumbnail();n&&this._thumbnails.push(n)}return this._thumbnails},t.prototype.getStartCanvas=function(){return this.getProperty("startCanvas")},t.prototype.getTotalCanvases=function(){return this.getCanvases().length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):this.options.resource.getViewingDirection?this.options.resource.getViewingDirection():null},t.prototype.getViewingHint=function(){var e=this.getProperty("viewingHint");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.isCanvasIndexOutOfRange=function(e){return e>this.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(e){return e===0},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===fe.ViewingHint.PAGED:!1},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2===0},t})(Br),uu=(function(){function i(){}return i.parse=function(t,e){return typeof t=="string"&&(t=JSON.parse(t)),this.parseJson(t,e)},i.parseJson=function(t,e){var r;if(e&&e.navDate&&!isNaN(e.navDate.getTime())&&(t.navDate=e.navDate.toString()),t["@type"])switch(t["@type"]){case"sc:Collection":r=this.parseCollection(t,e);break;case"sc:Manifest":r=this.parseManifest(t,e);break;default:return null}else switch(t.type){case"Collection":r=this.parseCollection(t,e);break;case"Manifest":r=this.parseManifest(t,e);break;default:return null}return r.isLoaded=!0,r},i.parseCollection=function(t,e){var r=new yg(t,e);return e?(r.index=e.index||0,e.resource&&(r.parentCollection=e.resource.parentCollection)):r.index=0,this.parseCollections(r,e),this.parseManifests(r,e),this.parseItems(r,e),r},i.parseCollections=function(t,e){var r;if(t.__jsonld.collections?r=t.__jsonld.collections:t.__jsonld.items&&(r=t.__jsonld.items.filter(function(a){return a.type.toLowerCase()==="collection"})),r)for(var n=0;n<r.length;n++){e&&(e.index=n);var o=this.parseCollection(r[n],e);o.index=n,o.parentCollection=t,t.items.push(o)}},i.parseManifest=function(t,e){var r=new Pg(t,e);return r},i.parseManifests=function(t,e){var r;if(t.__jsonld.manifests?r=t.__jsonld.manifests:t.__jsonld.items&&(r=t.__jsonld.items.filter(function(a){return a.type.toLowerCase()==="manifest"})),r)for(var n=0;n<r.length;n++){var o=this.parseManifest(r[n],e);o.index=n,o.parentCollection=t,t.items.push(o)}},i.parseItem=function(t,e){if(t["@type"]){if(t["@type"].toLowerCase()==="sc:manifest")return this.parseManifest(t,e);if(t["@type"].toLowerCase()==="sc:collection")return this.parseCollection(t,e)}else if(t.type){if(t.type.toLowerCase()==="manifest")return this.parseManifest(t,e);if(t.type.toLowerCase()==="collection")return this.parseCollection(t,e)}return null},i.parseItems=function(t,e){var r=t.__jsonld.members||t.__jsonld.items;if(r)for(var n=function(c){e&&(e.index=c);var l=o.parseItem(r[c],e);if(!l)return{value:void 0};if(t.items.filter(function(u){return u.id===l.id})[0])return"continue";l.index=c,l.parentCollection=t,t.items.push(l)},o=this,a=0;a<r.length;a++){var s=n(a);if(typeof s=="object")return s.value}},i})(),Dg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),hu=(function(i){Dg(t,i);function t(e,r){return i.call(this,e,r)||this}return t.prototype.getProfile=function(){var e=this.getProperty("profile");return e||(e=this.getProperty("dcterms:conformsTo")),Array.isArray(e)?e[0]:e},t.prototype.getConfirmLabel=function(){return Ze.getLocalisedValue(this.getProperty("confirmLabel"),this.options.locale)},t.prototype.getDescription=function(){return Ze.getLocalisedValue(this.getProperty("description"),this.options.locale)},t.prototype.getFailureDescription=function(){return Ze.getLocalisedValue(this.getProperty("failureDescription"),this.options.locale)},t.prototype.getFailureHeader=function(){return Ze.getLocalisedValue(this.getProperty("failureHeader"),this.options.locale)},t.prototype.getHeader=function(){return Ze.getLocalisedValue(this.getProperty("header"),this.options.locale)},t.prototype.getServiceLabel=function(){return Ze.getLocalisedValue(this.getProperty("label"),this.options.locale)},t.prototype.getInfoUri=function(){var e=this.id;return e.endsWith("/")||(e+="/"),e+="info.json",e},t})(Br),Lg=(function(){function i(t,e){this.width=t,this.height=e}return i})(),wn;(function(i){i[i.AUTHORIZATION_FAILED=1]="AUTHORIZATION_FAILED",i[i.FORBIDDEN=2]="FORBIDDEN",i[i.INTERNAL_SERVER_ERROR=3]="INTERNAL_SERVER_ERROR",i[i.RESTRICTED=4]="RESTRICTED"})(wn||(wn={}));var zg=(function(){function i(t,e){this.data=e,this.index=e.index,this.width=t;var r=e.getHeight()/e.getWidth();r?this.height=Math.floor(this.width*r):this.height=t,this.uri=e.getCanonicalImageUri(t),this.label=e.getLabel().getValue(),this.viewingHint=e.getViewingHint()}return i})(),Hg=(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),Ng=(function(i){Hg(t,i);function t(e,r){return i.call(this,e,r)||this}return t})(Ga),fs=(function(){function i(t,e){this.label=t,this.data=e||{},this.nodes=[]}return i.prototype.addNode=function(t){this.nodes.push(t),t.parentNode=this},i.prototype.isCollection=function(){return this.data.type===Ze.normaliseType(Rr.COLLECTION)},i.prototype.isManifest=function(){return this.data.type===Ze.normaliseType(Rr.MANIFEST)},i.prototype.isRange=function(){return this.data.type===Ze.normaliseType(Rr.RANGE)},i})(),Rr;(function(i){i.COLLECTION="collection",i.MANIFEST="manifest",i.RANGE="range"})(Rr||(Rr={}));var Fg=function(i,t){return Ze.parseManifest(i,t)};class Bg{constructor(){ve(this,Cn,Pe(xt({})));nt(this,"userAnnotations",new _n)}get manifests(){return p(I(this,Cn))}set manifests(t){_e(I(this,Cn),t,!0)}userAnnotationKey(t,e){return`${t}::${e}`}setUserAnnotations(t,e,r){const n=this.userAnnotationKey(t,e);this.userAnnotations.set(n,r)}clearUserAnnotations(t,e){const r=this.userAnnotationKey(t,e);this.userAnnotations.has(r)&&this.userAnnotations.delete(r)}getUserAnnotations(t,e){const r=this.userAnnotationKey(t,e);return this.userAnnotations.get(r)??[]}async fetchManifest(t){if(!this.manifests[t]){this.manifests[t]={isFetching:!0};try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=await e.json(),n=Fg(r);this.manifests[t]={json:r,manifesto:n,isFetching:!1}}catch(e){this.manifests[t]={error:e.message,isFetching:!1}}}}getManifest(t){const e=this.manifests[t];return e==null?void 0:e.manifesto}getManifestEntry(t){return this.manifests[t]}async fetchAnnotationList(t){if(!this.manifests[t])try{const e=await fetch(t);if(e.ok){const r=await e.json();this.manifests[t]={json:r}}else console.error(`Failed to fetch annotation list: ${t}`)}catch(e){console.error(`Error fetching annotation list: ${t}`,e)}}getCanvases(t){const e=this.getManifest(t);if(!e)return[];const r=e.getSequences();return!r||!r.length?[]:r[0].getCanvases()}getAnnotations(t,e){const r=this.manualGetAnnotations(t,e),n=this.getUserAnnotations(t,e);return[...r,...n]}manualGetAnnotations(t,e){const r=this.getManifest(t);if(!r)return[];const n=r.getSequences()[0].getCanvasById(e);if(!n)return[];const o=n.__jsonld,a=[],s=c=>c.resources||c.items||[];return o.otherContent&&o.otherContent.forEach(c=>{const l=c["@id"]||c.id;if(l&&!c.resources){const u=this.manifests[l];if(u){if(u.json){const h=s(u.json);a.push(...h)}}else this.fetchAnnotationList(l)}else c.resources&&a.push(...c.resources)}),o.annotations&&o.annotations.forEach(c=>{const l=c.id||c["@id"];if(l&&!c.items){const u=this.manifests[l];if(u){if(u.json){const h=s(u.json);a.push(...h)}}else this.fetchAnnotationList(l)}else c.items&&a.push(...c.items)}),a}}Cn=new WeakMap;const $r=new Bg;class Vg{constructor(t=null,e=null,r=[]){ve(this,Pn,Pe(null));ve(this,An,Pe(null));ve(this,Rn,Pe(!1));ve(this,In,Pe(!1));ve(this,Mn,Pe(!1));ve(this,On,Pe(!1));ve(this,Dn,Pe(!1));ve(this,Ln,Pe(!1));ve(this,zn,Pe(!1));ve(this,Hn,Pe("bottom"));nt(this,"visibleAnnotationIds",new No);ve(this,Nn,Pe(xt({})));ve(this,Fn,Pe("individuals"));ve(this,Bn,Pe(1));ve(this,Vn,Pe(xt({x:20,y:100})));ve(this,jn,Pe(xt({width:300,height:400})));ve(this,Un,Pe(!1));ve(this,Gn,Pe(xt({x:0,y:0})));ve(this,Zn,Pe(null));ve(this,Wn,Pe(null));nt(this,"eventTarget",null);nt(this,"viewerElement",null);ve(this,qn,Pe(""));ve(this,Xn,Pe(null));ve(this,Yn,Pe(xt([])));ve(this,Kn,Pe(!1));ve(this,Qn,Pe(!1));ve(this,Jn,Pe(xt([])));ve(this,$n,Pe(xt([])));ve(this,eo,Pe(xt([])));ve(this,to,Pe(null));nt(this,"pluginEventHandlers",new _n);this.manifestId=t||null,this.canvasId=e||null,this.manifestId&&$r.fetchManifest(this.manifestId);for(const n of r)this.registerPlugin(n)}get manifestId(){return p(I(this,Pn))}set manifestId(t){_e(I(this,Pn),t,!0)}get canvasId(){return p(I(this,An))}set canvasId(t){_e(I(this,An),t,!0)}get showAnnotations(){return p(I(this,Rn))}set showAnnotations(t){_e(I(this,Rn),t,!0)}get showThumbnailGallery(){return p(I(this,In))}set showThumbnailGallery(t){_e(I(this,In),t,!0)}get toolbarOpen(){return p(I(this,Mn))}set toolbarOpen(t){_e(I(this,Mn),t,!0)}get isGalleryDockedBottom(){return p(I(this,On))}set isGalleryDockedBottom(t){_e(I(this,On),t,!0)}get isGalleryDockedRight(){return p(I(this,Dn))}set isGalleryDockedRight(t){_e(I(this,Dn),t,!0)}get isFullScreen(){return p(I(this,Ln))}set isFullScreen(t){_e(I(this,Ln),t,!0)}get showMetadataDialog(){return p(I(this,zn))}set showMetadataDialog(t){_e(I(this,zn),t,!0)}get dockSide(){return p(I(this,Hn))}set dockSide(t){_e(I(this,Hn),t,!0)}get config(){return p(I(this,Nn))}set config(t){_e(I(this,Nn),t,!0)}get showToggle(){return this.config.showToggle??!0}get showCanvasNav(){return this.config.showCanvasNav??!0}get showZoomControls(){return this.config.showZoomControls??!0}get galleryFixedHeight(){var t;return((t=this.config.gallery)==null?void 0:t.fixedHeight)??120}get _viewingMode(){return p(I(this,Fn))}set _viewingMode(t){_e(I(this,Fn),t,!0)}get viewingMode(){return this._viewingMode}set viewingMode(t){this._viewingMode=t,this.config.viewingMode=t}get pagedOffset(){return p(I(this,Bn))}set pagedOffset(t){_e(I(this,Bn),t,!0)}get galleryPosition(){return p(I(this,Vn))}set galleryPosition(t){_e(I(this,Vn),t,!0)}get gallerySize(){return p(I(this,jn))}set gallerySize(t){_e(I(this,jn),t,!0)}get isGalleryDragging(){return p(I(this,Un))}set isGalleryDragging(t){_e(I(this,Un),t,!0)}get galleryDragOffset(){return p(I(this,Gn))}set galleryDragOffset(t){_e(I(this,Gn),t,!0)}get dragOverSide(){return p(I(this,Zn))}set dragOverSide(t){_e(I(this,Zn),t,!0)}get galleryCenterPanelRect(){return p(I(this,Wn))}set galleryCenterPanelRect(t){_e(I(this,Wn),t,!0)}setEventTarget(t){this.eventTarget=t}getSnapshot(){let t=-1;return this.manifestId&&this.canvasId&&(t=$r.getCanvases(this.manifestId).findIndex(r=>(r.id||r["@id"]||(r.getCanvasId?r.getCanvasId():null)||(r.getId?r.getId():null))===this.canvasId)),{manifestId:this.manifestId,canvasId:this.canvasId,currentCanvasIndex:t,showAnnotations:this.showAnnotations,showThumbnailGallery:this.showThumbnailGallery,showSearchPanel:this.showSearchPanel,toolbarOpen:this.toolbarOpen,searchQuery:this.searchQuery,isFullScreen:this.isFullScreen,dockSide:this.dockSide,viewingMode:this.viewingMode,galleryPosition:this.galleryPosition,gallerySize:this.gallerySize}}dispatchStateChange(t="statechange"){console.log(`[ViewerState] Dispatching ${t}`,JSON.stringify(this.getSnapshot())),this.eventTarget&&queueMicrotask(()=>{var e;(e=this.eventTarget)==null||e.dispatchEvent(new CustomEvent(t,{detail:this.getSnapshot(),bubbles:!0,composed:!0}))})}get manifest(){return this.manifestId?$r.getManifest(this.manifestId):null}get manifestEntry(){return this.manifestId?$r.getManifestEntry(this.manifestId):null}get canvases(){return this.manifestId?$r.getCanvases(this.manifestId):[]}get currentCanvasIndex(){return this.canvasId?this.canvases.findIndex(t=>(t.id||t["@id"]||(t.getCanvasId?t.getCanvasId():null)||(t.getId?t.getId():null))===this.canvasId):this.canvases.length>0?0:-1}get hasNext(){if(this.viewingMode==="paged"){const t=this.pagedOffset;return this.currentCanvasIndex<t?this.currentCanvasIndex<this.canvases.length-1:this.currentCanvasIndex<this.canvases.length-2}else return this.currentCanvasIndex<this.canvases.length-1}get hasPrevious(){return this.currentCanvasIndex>0}nextCanvas(){if(this.hasNext)if(this.viewingMode==="paged"){const t=this.pagedOffset,e=this.currentCanvasIndex<t?this.currentCanvasIndex+1:this.currentCanvasIndex+2,r=this.canvases[e];this.setCanvas(r.id)}else{const t=this.currentCanvasIndex+1,e=this.canvases[t];this.setCanvas(e.id)}}previousCanvas(){if(this.hasPrevious)if(this.viewingMode==="paged"){const t=this.pagedOffset;let e;this.currentCanvasIndex<=t?e=this.currentCanvasIndex-1:e=Math.max(this.currentCanvasIndex-2,t);const r=this.canvases[e];this.setCanvas(r.id)}else{const t=this.currentCanvasIndex-1,e=this.canvases[t];this.setCanvas(e.id)}}zoomIn(){this.osdViewer&&this.osdViewer.viewport&&(this.osdViewer.viewport.zoomBy(1.2),this.osdViewer.viewport.applyConstraints())}zoomOut(){this.osdViewer&&this.osdViewer.viewport&&(this.osdViewer.viewport.zoomBy(.8),this.osdViewer.viewport.applyConstraints())}setManifest(t){this.manifestId=t,this.canvasId=null,$r.fetchManifest(t),this.dispatchStateChange("manifestchange")}setCanvas(t){this.canvasId=t,this.dispatchStateChange("canvaschange")}updateConfig(t){var r;const e=this.config;if(this.config=t,t.toolbarOpen!==void 0&&(this.toolbarOpen=t.toolbarOpen),t.viewingMode&&(this.viewingMode=t.viewingMode),t.pagedViewOffset!==void 0&&(this.pagedOffset=t.pagedViewOffset?1:0),t.gallery&&(t.gallery.open!==void 0&&(this.showThumbnailGallery=t.gallery.open),t.gallery.dockPosition!==void 0&&(this.dockSide=t.gallery.dockPosition),t.gallery.width!==void 0&&(this.gallerySize.width=t.gallery.width),t.gallery.height!==void 0&&(this.gallerySize.height=t.gallery.height),t.gallery.x!==void 0&&(this.galleryPosition.x=t.gallery.x),t.gallery.y!==void 0&&(this.galleryPosition.y=t.gallery.y)),t.search){t.search.open!==void 0&&(this.showSearchPanel=t.search.open);const n=t.search.query,o=(r=e.search)==null?void 0:r.query;n!==void 0&&n!==o&&n!==this.searchQuery&&this._performSearch(n)}t.annotations&&t.annotations.open!==void 0&&(this.showAnnotations=t.annotations.open)}toggleAnnotations(){this.showAnnotations=!this.showAnnotations,this.dispatchStateChange()}toggleToolbar(){this.toolbarOpen=!this.toolbarOpen,this.dispatchStateChange()}toggleThumbnailGallery(){this.showThumbnailGallery=!this.showThumbnailGallery,this.dispatchStateChange()}setViewerElement(t){this.viewerElement=t}toggleFullScreen(){if(document.fullscreenElement)document.exitFullscreen();else{const t=this.viewerElement||document.getElementById("triiiceratops-viewer");t?t.requestFullscreen().catch(e=>{console.warn("Fullscreen request failed",e)}):console.warn("Cannot toggle fullscreen: Viewer element not found")}}toggleMetadataDialog(){this.showMetadataDialog=!this.showMetadataDialog}setViewingMode(t){if(this.viewingMode=t,t==="paged"){const e=this.pagedOffset;if(this.currentCanvasIndex>=e&&(this.currentCanvasIndex-e)%2===1){const n=this.currentCanvasIndex-1,o=this.canvases[n];this.setCanvas(o.id)}}this.dispatchStateChange()}togglePagedOffset(){this.pagedOffset=this.pagedOffset===0?1:0,this.config.pagedViewOffset=this.pagedOffset===1;const t=this.pagedOffset;if(this.currentCanvasIndex>=t&&(this.currentCanvasIndex-t)%2===1){const r=this.currentCanvasIndex-1,n=this.canvases[r];this.setCanvas(n.id)}this.dispatchStateChange()}get searchQuery(){return p(I(this,qn))}set searchQuery(t){_e(I(this,qn),t,!0)}get pendingSearchQuery(){return p(I(this,Xn))}set pendingSearchQuery(t){_e(I(this,Xn),t,!0)}get searchResults(){return p(I(this,Yn))}set searchResults(t){_e(I(this,Yn),t,!0)}get isSearching(){return p(I(this,Kn))}set isSearching(t){_e(I(this,Kn),t,!0)}get showSearchPanel(){return p(I(this,Qn))}set showSearchPanel(t){_e(I(this,Qn),t,!0)}toggleSearchPanel(){this.showSearchPanel=!this.showSearchPanel,this.showSearchPanel||(this.searchAnnotations=[]),this.dispatchStateChange()}get searchAnnotations(){return p(I(this,Jn))}set searchAnnotations(t){_e(I(this,Jn),t,!0)}get currentCanvasSearchAnnotations(){if(!this.canvasId)return[];if(this.viewingMode==="paged"){let t=this.searchAnnotations.filter(n=>n.canvasId===this.canvasId);const e=this.currentCanvasIndex,r=this.pagedOffset;if(e>=r){const n=e+1;if(n<this.canvases.length){const o=this.canvases[n],a=o.id||o["@id"],c=this.canvases[e].getWidth()*1.025,u=this.searchAnnotations.filter(h=>h.canvasId===a).map(h=>{const f=h.on.split("#xywh="),v=f[1].split(",").map(Number),_=v[0]+c;return{...h,on:`${f[0]}#xywh=${_},${v[1]},${v[2]},${v[3]}`}});t=t.concat(u)}}return t}else return this.searchAnnotations.filter(t=>t.canvasId===this.canvasId)}async search(t){this.dispatchStateChange(),await this._performSearch(t),this.dispatchStateChange()}async _performSearch(t){var e,r;if(t.trim()){this.isSearching=!0,this.searchQuery=t,this.searchResults=[];try{const n=this.manifest;if(!n){console.log("[ViewerState] Manifest not loaded, deferring search:",t),this.pendingSearchQuery=t;return}let o=n.getService("http://iiif.io/api/search/1/search")||n.getService("http://iiif.io/api/search/0/search");if(o||n.__jsonld&&n.__jsonld.service&&(o=(Array.isArray(n.__jsonld.service)?n.__jsonld.service:[n.__jsonld.service]).find(g=>g.profile==="http://iiif.io/api/search/1/search"||g.profile==="http://iiif.io/api/search/0/search")),!o){console.warn("No IIIF search service found in manifest"),this.isSearching=!1;return}const s=`${o.id||o["@id"]}?q=${encodeURIComponent(t)}`,c=await fetch(s);if(!c.ok)throw new Error("Search request failed");const l=await c.json(),u=l.resources||[],h=new _n,f=d=>{const g=typeof d=="string"?d:d["@id"]||d.id;if(!g)return null;const b=g.split("#xywh=");if(b.length<2)return null;const S=b[1].split(",").map(Number);return S.length===4?S:null},v=d=>d?d.replace(/<mark>/g,"<mark>").replace(/<\/mark>/g,"</mark>"):"";if(l.hits)for(const d of l.hits){const g=d.annotations||[];let b=-1,S=null;const P=[];for(const E of g){const R=u.find(F=>F["@id"]===E||F.id===E);if(R&&R.on){const F=typeof R.on=="string"?R.on:R.on["@id"]||R.on.id,Z=F.split("#")[0],z=f(F),M=this.canvases.findIndex(O=>O.id===Z);M>=0&&(b===-1&&(b=M),z&&(P.push(z),S||(S=z)))}}if(b>=0){if(!h.has(b)){const E=this.canvases[b];let R="Canvas "+(b+1);try{if(E.getLabel){const F=E.getLabel();Array.isArray(F)&&F.length>0?R=F[0].value:typeof F=="string"&&(R=F)}else E.label&&(typeof E.label=="string"?R=E.label:Array.isArray(E.label)&&(R=(e=E.label[0])==null?void 0:e.value))}catch{}h.set(b,{canvasIndex:b,canvasLabel:String(R),hits:[]})}h.get(b).hits.push({type:"hit",before:v(d.before),match:v(d.match),after:v(d.after),bounds:S,allBounds:P})}}else if(u.length>0)for(const d of u){const g=typeof d.on=="string"?d.on:d.on["@id"]||d.on.id,b=g.split("#")[0],S=f(g),P=this.canvases.findIndex(E=>E.id===b);if(P>=0){const E=this.canvases[P];let R="Canvas "+(P+1);try{if(E.getLabel){const F=E.getLabel();Array.isArray(F)&&F.length>0?R=F[0].value:typeof F=="string"&&(R=F)}else E.label&&(typeof E.label=="string"?R=E.label:Array.isArray(E.label)&&(R=(r=E.label[0])==null?void 0:r.value))}catch{}h.has(P)||h.set(P,{canvasIndex:P,canvasLabel:String(R),hits:[]}),h.get(P).hits.push({type:"resource",match:v(d.resource&&d.resource.chars?d.resource.chars:d.chars||""),bounds:S,allBounds:S?[S]:[]})}}this.searchResults=Array.from(h.values()).sort((d,g)=>d.canvasIndex-g.canvasIndex);let _=0;this.searchAnnotations=this.searchResults.flatMap(d=>{const g=this.canvases[d.canvasIndex];return d.hits.flatMap(b=>(b.allBounds&&b.allBounds.length>0?b.allBounds:b.bounds?[b.bounds]:[]).map(P=>{const E=`${g.id}#xywh=${P.join(",")}`;return{"@id":`urn:search-hit:${_++}`,"@type":"oa:Annotation",motivation:"sc:painting",on:E,canvasId:g.id,resource:{"@type":"cnt:ContentAsText",chars:b.match},isSearchHit:!0}}))})}catch(n){console.error("Search error:",n),this.isSearching=!1}finally{this.pendingSearchQuery||(this.isSearching=!1)}}}get pluginMenuButtons(){return p(I(this,$n))}set pluginMenuButtons(t){_e(I(this,$n),t,!0)}get pluginPanels(){return p(I(this,eo))}set pluginPanels(t){_e(I(this,eo),t,!0)}get osdViewer(){return p(I(this,to))}set osdViewer(t){_e(I(this,to),t)}registerPlugin(t){const e=t.id||`plugin-${Math.random().toString(36).substr(2,9)}`;let r=Pe(!1);const n={id:`${e}:toggle`,icon:t.icon,tooltip:t.name,onClick:()=>{_e(r,!p(r))},isActive:()=>p(r),order:200},o={id:`${e}:panel`,component:t.panel,position:t.position||"left",isVisible:()=>p(r),props:{...t.props,close:()=>{_e(r,!1)}}};this.pluginMenuButtons=[...this.pluginMenuButtons,n],this.pluginPanels=[...this.pluginPanels,o],t.onInit&&t.onInit(this)}unregisterPlugin(t){this.pluginMenuButtons=this.pluginMenuButtons.filter(e=>!e.id.startsWith(`${t}:`)),this.pluginPanels=this.pluginPanels.filter(e=>!e.id.startsWith(`${t}:`))}notifyOSDReady(t){this.osdViewer=t}destroyAllPlugins(){this.pluginMenuButtons=[],this.pluginPanels=[],this.pluginEventHandlers.clear()}}Pn=new WeakMap,An=new WeakMap,Rn=new WeakMap,In=new WeakMap,Mn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Ln=new WeakMap,zn=new WeakMap,Hn=new WeakMap,Nn=new WeakMap,Fn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,jn=new WeakMap,Un=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Wn=new WeakMap,qn=new WeakMap,Xn=new WeakMap,Yn=new WeakMap,Kn=new WeakMap,Qn=new WeakMap,Jn=new WeakMap,$n=new WeakMap,eo=new WeakMap,to=new WeakMap;const Gi="triiiceratops:viewerState",jg=["light","dark","cupcake","bumblebee","emerald","corporate","synthwave","retro","cyberpunk","valentine","halloween","garden","forest","aqua","lofi","pastel","fantasy","wireframe","black","luxury","dracula","cmyk","autumn","business","acid","lemonade","night","coffee","winter","dim","nord","sunset","caramellatte","abyss","silk"];function Ug(i){i=i.replace(/^#/,"");let t,e,r;if(i.length===3)t=parseInt(i[0]+i[0],16),e=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16);else if(i.length===6||i.length===8)t=parseInt(i.slice(0,2),16),e=parseInt(i.slice(2,4),16),r=parseInt(i.slice(4,6),16);else return null;return isNaN(t)||isNaN(e)||isNaN(r)?null:{r:t,g:e,b:r}}function Gg(i){const t=i.match(/rgba?\(\s*(\d+(?:\.\d+)?%?)\s*[,\s]\s*(\d+(?:\.\d+)?%?)\s*[,\s]\s*(\d+(?:\.\d+)?%?)(?:\s*[,/]\s*(\d*\.?\d+%?))?\s*\)/i);if(!t)return null;const e=a=>a.endsWith("%")?parseFloat(a)/100*255:parseFloat(a),r=e(t[1]),n=e(t[2]),o=e(t[3]);return isNaN(r)||isNaN(n)||isNaN(o)?null:{r,g:n,b:o}}function ps(i){const t=i/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Zg(i,t,e){return{x:.4124564*i+.3575761*t+.1804375*e,y:.2126729*i+.7151522*t+.072175*e,z:.0193339*i+.119192*t+.9503041*e}}function Wg(i,t,e){const r=.8189330101*i+.3618667424*t-.1288597137*e,n=.0329845436*i+.9293118715*t+.0361456387*e,o=.0482003018*i+.2643662691*t+.633851707*e,a=Math.cbrt(r),s=Math.cbrt(n),c=Math.cbrt(o);return{L:.2104542553*a+.793617785*s-.0040720468*c,a:1.9779984951*a-2.428592205*s+.4505937099*c,b:.0259040371*a+.7827717662*s-.808675766*c}}function qg(i,t,e){const r=Math.sqrt(t*t+e*e);let n=Math.atan2(e,t)*180/Math.PI;return n<0&&(n+=360),{L:i,C:r,h:n}}function du(i,t,e){const r=ps(i),n=ps(t),o=ps(e),{x:a,y:s,z:c}=Zg(r,n,o),{L:l,a:u,b:h}=Wg(a,s,c);return qg(l,u,h)}function fu(i,t,e){const r=(i*100).toFixed(2),n=t.toFixed(4),o=t<1e-4?0:e.toFixed(2);return`oklch(${r}% ${n} ${o})`}function Xg(i){return i.trim().toLowerCase().startsWith("oklch(")}function Yg(i){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(i.trim())}function Kg(i){return/^rgba?\s*\(/i.test(i.trim())}function Qg(i){const t=Ug(i);if(!t)return console.warn(`Invalid hex color: ${i}, returning as-is`),i;const{L:e,C:r,h:n}=du(t.r,t.g,t.b);return fu(e,r,n)}function Jg(i){const t=Gg(i);if(!t)return console.warn(`Invalid rgb color: ${i}, returning as-is`),i;const{L:e,C:r,h:n}=du(t.r,t.g,t.b);return fu(e,r,n)}function $g(i){const t=i.trim();return Xg(t)?t:Yg(t)?Qg(t):Kg(t)?Jg(t):(console.warn(`Unrecognized color format: ${i}, passing through as-is`),i)}const pu={primary:"--color-primary",primaryContent:"--color-primary-content",secondary:"--color-secondary",secondaryContent:"--color-secondary-content",accent:"--color-accent",accentContent:"--color-accent-content",neutral:"--color-neutral",neutralContent:"--color-neutral-content",base100:"--color-base-100",base200:"--color-base-200",base300:"--color-base-300",baseContent:"--color-base-content",info:"--color-info",infoContent:"--color-info-content",success:"--color-success",successContent:"--color-success-content",warning:"--color-warning",warningContent:"--color-warning-content",error:"--color-error",errorContent:"--color-error-content",radiusBox:"--radius-box",radiusField:"--radius-field",radiusSelector:"--radius-selector",sizeSelector:"--size-selector",sizeField:"--size-field",border:"--border",depth:"--depth",noise:"--noise",colorScheme:"color-scheme"},ev=new Set(["primary","primaryContent","secondary","secondaryContent","accent","accentContent","neutral","neutralContent","base100","base200","base300","baseContent","info","infoContent","success","successContent","warning","warningContent","error","errorContent"]);function tv(i){return jg.includes(i)}function rv(i,t){i.setAttribute("data-theme",t)}function iv(i,t){for(const[e,r]of Object.entries(t)){if(r==null)continue;const n=e;if(n==="colorScheme"){i.style.colorScheme=r;continue}const o=pu[n];if(!o)continue;let a=String(r);ev.has(n)&&(a=$g(a)),i.style.setProperty(o,a)}}function nv(i){for(const[t,e]of Object.entries(pu))t==="colorScheme"?i.style.colorScheme="":i.style.removeProperty(e)}function ov(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null?t:null}catch{return null}}function av(i,t,e){t?rv(i,t):i.removeAttribute("data-theme"),e?iv(i,e):nv(i)}function gu(i){return i.id||i["@id"]||(typeof i.getId=="function"?i.getId():"")}function bn(i){if(!i)return null;const t=i.match(/xywh=(?:pixel:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2]),w:parseFloat(t[3]),h:parseFloat(t[4])}:null}function sv(i){const t=lv(i);if(t)return cv(t);const e=fv(i);return e?{type:"RECTANGLE",x:e.x,y:e.y,w:e.w,h:e.h}:null}function lv(i){var e,r;if(typeof i.getTarget=="function"){const n=((e=i.__jsonld)==null?void 0:e.on)||((r=i.__jsonld)==null?void 0:r.target);if(n)return vu(n)}const t=i.target||i.on;return t?vu(t):null}function vu(i){if(!i)return null;if(Array.isArray(i))for(const t of i){const e=mu(t);if(e)return e}else return mu(i);return null}function mu(i){var e;if(!i)return null;const t=i.selector||i;if(Array.isArray(t)){const r=t.find(n=>n.type==="SvgSelector");return r&&r.value?r.value:null}return(t==null?void 0:t.type)==="SvgSelector"&&t.value?t.value:((e=t==null?void 0:t.item)==null?void 0:e.type)==="SvgSelector"&&t.item.value?t.item.value:null}function cv(i){try{const e=new DOMParser().parseFromString(i,"image/svg+xml");if(e.documentElement.nodeName==="parsererror")return console.warn("Failed to parse SVG selector:",i),null;const r=[],n=e.querySelectorAll("polygon");for(const c of n){const l=c.getAttribute("points");if(l){const u=uv(l);r.push(...u)}}const o=e.querySelectorAll("path");for(const c of o){const l=c.getAttribute("d");if(l){const u=hv(l);r.push(...u)}}const a=e.querySelectorAll("circle");for(const c of a){const l=parseFloat(c.getAttribute("cx")||"0"),u=parseFloat(c.getAttribute("cy")||"0"),h=parseFloat(c.getAttribute("r")||"0"),f=dv(l,u,h);r.push(...f)}const s=e.querySelectorAll("rect");for(const c of s){const l=parseFloat(c.getAttribute("x")||"0"),u=parseFloat(c.getAttribute("y")||"0"),h=parseFloat(c.getAttribute("width")||"0"),f=parseFloat(c.getAttribute("height")||"0");r.push([l,u],[l+h,u],[l+h,u+f],[l,u+f])}return r.length===0?null:{type:"POLYGON",points:r}}catch(t){return console.warn("Failed to convert SVG to polygon:",t),null}}function uv(i){const t=[],e=i.trim().split(/\s+/);for(const r of e){const[n,o]=r.split(",").map(a=>parseFloat(a));!isNaN(n)&&!isNaN(o)&&t.push([n,o])}return t}function hv(i){const t=[],e=/[ML]\s*([\d.]+)[,\s]+([\d.]+)/g;let r;for(;(r=e.exec(i))!==null;){const n=parseFloat(r[1]),o=parseFloat(r[2]);!isNaN(n)&&!isNaN(o)&&t.push([n,o])}return t}function dv(i,t,e,r=8){const n=[];for(let o=0;o<r;o++){const a=o/r*Math.PI*2,s=i+e*Math.cos(a),c=t+e*Math.sin(a);n.push([s,c])}return n}function fv(i){var e;if(typeof i.getTarget=="function"){const r=i.getTarget();if(typeof r=="string"&&r.includes("xywh="))return bn(r);const n=(e=i.__jsonld)==null?void 0:e.on;if(n){const o=gs(n);if(o)return o}}const t=i.target||i.on;return t?gs(t):null}function gs(i){if(!i)return null;if(Array.isArray(i))for(const t of i){const e=gs(t);if(e)return e}if(typeof i=="string"&&i.includes("xywh="))return bn(i);if(i.selector){const t=i.selector;if(Array.isArray(t)){const r=t.find(o=>o.type==="FragmentSelector"&&o.value&&o.value.includes("xywh="));if(r)return bn(r.value);const n=t.find(o=>o.value&&o.value.includes("xywh="));return n?bn(n.value):null}const e=t.item||t;if(e.value&&typeof e.value=="string"&&e.value.includes("xywh="))return bn(e.value)}return null}function _u(i){const t=[];if(typeof i.getBody=="function"){const e=i.getBody();if(e){const r=Array.isArray(e)?e:[e];for(const n of r){const o=n.getValue?n.getValue():"";if(o){const a=n.getFormat?n.getFormat():"",s=n.getPurpose?n.getPurpose():void 0;t.push({value:o,isHtml:a==="text/html"||a==="application/html",purpose:s,format:a})}}}}else{const e=r=>{const n=r.chars||r.value||r["cnt:chars"]||"";if(n){const o=r.format==="text/html"||r.type==="TextualBody";t.push({value:n,isHtml:o,purpose:r.purpose,format:r.format})}};i.resource?(Array.isArray(i.resource)?i.resource:[i.resource]).forEach(e):i.body&&(Array.isArray(i.body)?i.body:[i.body]).forEach(e)}if(t.length===0){let e="";typeof i.getLabel=="function"?e=i.getLabel()||"":i.label&&(e=Array.isArray(i.label)?i.label.join(" "):i.label),e&&t.push({value:e,isHtml:!1,purpose:"commenting"})}return t.length===0&&t.push({value:"Annotation",isHtml:!1,purpose:"commenting"}),t}function pv(i,t,e=!1){const r=gu(i)||`anno-${t}`,n=sv(i);if(!n)return null;const o=_u(i);return{id:r,geometry:n,body:o,isSearchHit:e}}function gv(i,t=new Set){return i.map((e,r)=>{const n=t.has(gu(e));return pv(e,r,n)}).filter(e=>e!==null)}var vv=ge("<div></div>"),mv=Q('<svg class="absolute pointer-events-auto"><title> </title><polygon stroke-width="2"></polygon></svg>'),_v=ge('<div class="w-full h-full relative"><div></div> <!></div>');function wv(i,t){Ke(t,!0);let e=or(t,"viewerState",7),r=Pe(void 0),n=Pe(void 0),o=Pe(void 0),a=Pe(0),s="",c=te(()=>{if(!e().manifestId||!e().canvasId)return[];const d=$r.getAnnotations(e().manifestId,e().canvasId),g=e().currentCanvasSearchAnnotations;return[...d,...g]}),l=te(()=>{const d=new No;return e().currentCanvasSearchAnnotations.forEach(g=>{const b=g.id||g["@id"];b&&d.add(b)}),d}),u=te(()=>gv(p(c),p(l))),h=te(()=>{if(p(a),!p(n)||!p(o)||!p(u).length)return[];const d=p(n).world.getItemAt(0);if(!d)return[];const g=[],b=e().pluginPanels.find(P=>P.id==="annotation-editor:panel"),S=b?b.isVisible():!1;for(const P of p(u)){if(!P.isSearchHit)if(e().showAnnotations){if(!e().visibleAnnotationIds.has(P.id))continue}else continue;if(P.geometry.type==="RECTANGLE"){const E=d.imageToViewportRectangle(P.geometry.x,P.geometry.y,P.geometry.w,P.geometry.h),R=p(n).viewport.viewportToViewerElementRectangle(E);g.push({id:P.id,type:"RECTANGLE",rect:{x:R.x,y:R.y,width:R.width,height:R.height},isSearchHit:P.isSearchHit,tooltip:P.body.map(F=>F.value).join(" "),pointerEvents:S?"none":"auto"})}else if(P.geometry.type==="POLYGON"){const E=P.geometry.points.map(O=>{const $=d.imageToViewportCoordinates(new(p(o)).Point(O[0],O[1])),ee=p(n).viewport.viewportToViewerElementCoordinates($);return[ee.x,ee.y]});let R=1/0,F=1/0,Z=-1/0,z=-1/0;for(const[O,$]of E)R=Math.min(R,O),F=Math.min(F,$),Z=Math.max(Z,O),z=Math.max(z,$);const M=E.map(([O,$])=>[O-R,$-F]);g.push({id:P.id,type:"POLYGON",bounds:{x:R,y:F,width:Z-R,height:z-F},points:M,isSearchHit:P.isSearchHit,tooltip:P.body.map(O=>O.value).join(" "),pointerEvents:S?"none":"auto"})}}return g});Aa(()=>{if(!p(r))return;let d=!0;return(async()=>{const g=await Promise.resolve().then(()=>b4);d&&(_e(o,g.default||g,!0),_e(n,p(o)({element:p(r),tileSources:null,prefixUrl:"",showNavigationControl:!1,showHomeControl:!1,showFullPageControl:!1,showSequenceControl:!1,showZoomControl:!1,showRotationControl:!1,animationTime:.5,springStiffness:7,zoomPerClick:2,gestureSettingsMouse:{clickToZoom:!1,dblClickToZoom:!0}})),e().notifyOSDReady(p(n)))})(),()=>{var g;d=!1,(g=p(n))==null||g.destroy(),e().osdViewer=null}}),st(()=>{if(!p(n))return;const d=()=>{ln(a)};return p(n).addHandler("open",d),p(n).addHandler("animation",d),p(n).addHandler("resize",d),p(n).addHandler("rotate",d),p(n).world.addHandler("add-item",d),p(n).world.addHandler("remove-item",d),()=>{p(n).removeHandler("open",d),p(n).removeHandler("animation",d),p(n).removeHandler("resize",d),p(n).removeHandler("rotate",d),p(n).world.removeHandler("add-item",d),p(n).world.removeHandler("remove-item",d)}}),st(()=>{if(!p(n)||!t.tileSources)return;const d=JSON.stringify(t.tileSources);if(d!==s)if(s=d,e().viewingMode==="paged"&&t.tileSources instanceof Array&&t.tileSources.length===2){const b=[{tileSource:t.tileSources[0],x:0,y:0,width:1},{tileSource:t.tileSources[1],x:1.025,y:0,width:1}];p(n).open(b)}else p(n).open(t.tileSources)});var f=_v(),v=G(f);ji(v,d=>_e(r,d),()=>p(r));var _=se(v,2);Ut(_,17,()=>p(h),d=>d.id,(d,g)=>{var b=J(),S=W(b);{var P=R=>{var F=vv();Re(()=>{Ne(F,"id",`annotation-visual-${p(g).id??""}`),Be(F,1,`absolute border-2 transition-colors cursor-pointer pointer-events-auto ${p(g).isSearchHit?"border-yellow-400 bg-yellow-400/40 hover:bg-yellow-400/60":"border-red-500 bg-red-500/20 hover:bg-red-500/40"}`),Mt(F,`
|
|
7
7
|
left: ${p(g).rect.x??""}px;
|
|
8
8
|
top: ${p(g).rect.y??""}px;
|
|
9
9
|
width: ${p(g).rect.width??""}px;
|
|
10
10
|
height: ${p(g).rect.height??""}px;
|
|
11
11
|
pointer-events: ${p(g).pointerEvents??""};
|
|
12
|
-
`),Ne(
|
|
12
|
+
`),Ne(F,"title",p(g).tooltip)}),x(R,F)},E=R=>{var F=J(),Z=W(F);{var z=M=>{var O=mv(),$=G(O),ee=G($,!0);j($);var ie=se($);j(O),Re(L=>{Mt(O,`
|
|
13
13
|
left: ${p(g).bounds.x??""}px;
|
|
14
14
|
top: ${p(g).bounds.y??""}px;
|
|
15
15
|
width: ${p(g).bounds.width??""}px;
|
|
16
16
|
height: ${p(g).bounds.height??""}px;
|
|
17
17
|
pointer-events: ${p(g).pointerEvents??""};
|
|
18
|
-
`),qe(ee,p(g).tooltip),Ne(ie,"id",`annotation-visual-${p(g).id??""}`),Ne(ie,"points",L),He(ie,0,`cursor-pointer transition-colors ${p(g).isSearchHit?"fill-yellow-400/40 stroke-yellow-400 hover:fill-yellow-400/60":"fill-red-500/20 stroke-red-500 hover:fill-red-500/40"}`)},[()=>p(g).points.map(L=>L.join(",")).join(" ")]),x(I,M)};D(q,I=>{p(g).type==="POLYGON"&&I(z)},!0)}x(A,B)};D(S,A=>{p(g).type==="RECTANGLE"?A(P):A(E,!1)})}x(d,y)}),j(f),Re(()=>He(v,1,`w-full h-full osd-background ${e().config.transparentBackground?"":"bg-base-100"}`)),x(i,f),Je()}let wu=Symbol("phosphor-svelte");function St(){return ha(wu)?Wr(wu):{}}var bv=Q('<path d="M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"></path>'),yv=Q('<path d="M160,48V208L80,128Z" opacity="0.2"></path><path d="M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"></path>',1),xv=Q('<path d="M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"></path>'),Tv=Q('<path d="M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"></path>'),Ev=Q('<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"></path>'),kv=Q('<path d="M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"></path>'),Sv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Cv(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=Sv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=bv();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=yv();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=xv();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=Tv();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Ev();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=kv();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var Pv=Q('<path d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"></path>'),Av=Q('<path d="M176,128,96,208V48Z" opacity="0.2"></path><path d="M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"></path>',1),Rv=Q('<path d="M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"></path>'),Iv=Q('<path d="M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"></path>'),Mv=Q('<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path>'),Ov=Q('<path d="M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"></path>'),Dv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Lv(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=Dv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=Pv();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=Av();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=Rv();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=Iv();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Mv();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=Ov();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var zv=Q('<path d="M156,112a12,12,0,0,1-12,12H124v20a12,12,0,0,1-24,0V124H80a12,12,0,0,1,0-24h20V80a12,12,0,0,1,24,0v20h20A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"></path>'),Hv=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Z"></path>',1),Nv=Q('<path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24a8,8,0,0,1,0,16Z"></path>'),Fv=Q('<path d="M150,112a6,6,0,0,1-6,6H118v26a6,6,0,0,1-12,0V118H80a6,6,0,0,1,0-12h26V80a6,6,0,0,1,12,0v26h26A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"></path>'),Bv=Q('<path d="M152,112a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),Vv=Q('<path d="M148,112a4,4,0,0,1-4,4H116v28a4,4,0,0,1-8,0V116H80a4,4,0,0,1,0-8h28V80a4,4,0,0,1,8,0v28h28A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"></path>'),jv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Uv(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=jv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=zv();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=Hv();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=Nv();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=Fv();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Bv();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=Vv();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var Gv=Q('<path d="M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"></path>'),Zv=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z"></path>',1),Wv=Q('<path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"></path>'),qv=Q('<path d="M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"></path>'),Xv=Q('<path d="M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),Yv=Q('<path d="M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"></path>'),Kv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Qv(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=Kv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=Gv();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=Zv();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=Wv();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=qv();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Xv();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=Yv();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}const Jv="en",vs=["en","de"],bu="PARAGLIDE_LOCALE",$v=3456e4,yu=["cookie","globalVariable","baseLocale"];globalThis.__paraglide={};let Go,xu=!1,W=()=>{let i;for(const t of yu){if(t==="cookie")i=nm();else if(t==="baseLocale")i=Jv;else if(t==="globalVariable"&&Go!==void 0)i=Go;else if(Tu(t)&&Zo.has(t)){const e=Zo.get(t);if(e){const r=e.getLocale();if(r instanceof Promise)continue;i=r}}if(i!==void 0){const e=im(i);return xu||(Go=e,xu=!0,ms(e,{reload:!1})),e}}throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found")};const em=i=>{window.location.reload()};let ms=(i,t)=>{const e={reload:!0,...t};let r;try{r=W()}catch{}const n=[];for(const a of yu)if(a==="globalVariable")Go=i;else if(a==="cookie"){if(typeof document>"u"||typeof window>"u")continue;const s=`${bu}=${i}; path=/; max-age=${$v}`;document.cookie=s}else{if(a==="baseLocale")continue;if(Tu(a)&&Zo.has(a)){const s=Zo.get(a);if(s){let c=s.setLocale(i);c instanceof Promise&&(c=c.catch(l=>{throw new Error(`Custom strategy "${a}" setLocale failed.`,{cause:l})}),n.push(c))}}}const o=()=>{e.reload&&window.location&&i!==r&&em()};if(n.length)return Promise.all(n).then(()=>{o()});o()};const tm=i=>{ms=i};function rm(i){return typeof i!="string"?!1:i?vs.some(t=>t.toLowerCase()===i.toLowerCase()):!1}function im(i){if(typeof i!="string")throw new Error(`Invalid locale: ${i}. Expected a string.`);const t=i.toLowerCase(),e=vs.find(r=>r.toLowerCase()===t);if(!e)throw new Error(`Invalid locale: ${i}. Expected one of: ${vs.join(", ")}`);return e}function nm(){if(typeof document>"u"||!document.cookie)return;const i=document.cookie.match(new RegExp(`(^| )${bu}=([^;]+)`)),t=i==null?void 0:i[2];if(rm(t))return t}const Zo=new Map;function Tu(i){return typeof i=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(i)}const om=()=>"Hello World",am=()=>"Hallo Welt",sm=(i={},t={})=>(t.locale??W())==="en"?om():am(),lm=()=>"Search",cm=()=>"Suche",_s=(i={},t={})=>(t.locale??W())==="en"?lm():cm(),um=()=>"Close Search",hm=()=>"Suche schließen",dm=(i={},t={})=>(t.locale??W())==="en"?um():hm(),fm=()=>"Search content...",pm=()=>"Inhalt durchsuchen...",Eu=(i={},t={})=>(t.locale??W())==="en"?fm():pm(),gm=i=>`No results found for "${i==null?void 0:i.query}"`,vm=i=>`Keine Ergebnisse für "${i==null?void 0:i.query}" gefunden`,ku=(i,t={})=>(t.locale??W())==="en"?gm(i):vm(i),mm=()=>"Enter a search term to find occurrences within this manifest.",_m=()=>"Geben Sie einen Suchbegriff ein, um Vorkommen in diesem Manifest zu finden.",Su=(i={},t={})=>(t.locale??W())==="en"?mm():_m(),wm=i=>`${i==null?void 0:i.count} Results`,bm=i=>`${i==null?void 0:i.count} Ergebnisse`,Cu=(i,t={})=>(t.locale??W())==="en"?wm(i):bm(i),ym=()=>"Manifest Metadata",xm=()=>"Manifest-Metadaten",Pu=(i={},t={})=>(t.locale??W())==="en"?ym():xm(),Tm=()=>"Loading...",Em=()=>"Lädt...",Au=(i={},t={})=>(t.locale??W())==="en"?Tm():Em(),km=()=>"Attribution",Sm=()=>"Quellenangabe",Ru=(i={},t={})=>(t.locale??W())==="en"?km():Sm(),Cm=()=>"License",Pm=()=>"Lizenz",Iu=(i={},t={})=>(t.locale??W())==="en"?Cm():Pm(),Am=()=>"Close",Rm=()=>"Schließen",ws=(i={},t={})=>(t.locale??W())==="en"?Am():Rm(),Im=()=>"Menu",Mm=()=>"Menü",Om=(i={},t={})=>(t.locale??W())==="en"?Im():Mm(),Dm=()=>"Search",Lm=()=>"Suche",bs=(i={},t={})=>(t.locale??W())==="en"?Dm():Lm(),zm=()=>"Toggle Search",Hm=()=>"Suche umschalten",Mu=(i={},t={})=>(t.locale??W())==="en"?zm():Hm(),Nm=()=>"Hide Gallery",Fm=()=>"Galerie ausblenden",ys=(i={},t={})=>(t.locale??W())==="en"?Nm():Fm(),Bm=()=>"Show Gallery",Vm=()=>"Galerie einblenden",xs=(i={},t={})=>(t.locale??W())==="en"?Bm():Vm(),jm=()=>"Exit Full Screen",Um=()=>"Vollbildmodus beenden",Ts=(i={},t={})=>(t.locale??W())==="en"?jm():Um(),Gm=()=>"Enter Full Screen",Zm=()=>"Vollbildmodus",Es=(i={},t={})=>(t.locale??W())==="en"?Gm():Zm(),Wm=()=>"Hide Annotations",qm=()=>"Annotationen ausblenden",ks=(i={},t={})=>(t.locale??W())==="en"?Wm():qm(),Xm=()=>"Show Annotations",Ym=()=>"Annotationen einblenden",Ss=(i={},t={})=>(t.locale??W())==="en"?Xm():Ym(),Km=()=>"Toggle Annotations",Qm=()=>"Annotationen umschalten",Jm=(i={},t={})=>(t.locale??W())==="en"?Km():Qm(),$m=()=>"Metadata",e1=()=>"Metadaten",Ou=(i={},t={})=>(t.locale??W())==="en"?$m():e1(),t1=()=>"Toggle Metadata",r1=()=>"Metadaten umschalten",Du=(i={},t={})=>(t.locale??W())==="en"?t1():r1(),i1=()=>"Hide All Annotations",n1=()=>"Alle Annotationen ausblenden",Lu=(i={},t={})=>(t.locale??W())==="en"?i1():n1(),o1=()=>"Show All Annotations",a1=()=>"Alle Annotationen einblenden",zu=(i={},t={})=>(t.locale??W())==="en"?o1():a1(),s1=i=>`${i==null?void 0:i.count} Annotations`,l1=i=>`${i==null?void 0:i.count} Annotationen`,Hu=(i,t={})=>(t.locale??W())==="en"?s1(i):l1(i),c1=i=>`(${i==null?void 0:i.count} visible)`,u1=i=>`(${i==null?void 0:i.count} sichtbar)`,Nu=(i,t={})=>(t.locale??W())==="en"?c1(i):u1(i),h1=()=>"(No content)",d1=()=>"(Kein Inhalt)",f1=(i={},t={})=>(t.locale??W())==="en"?h1():d1(),p1=()=>"No annotations available.",g1=()=>"Keine Annotationen verfügbar.",v1=(i={},t={})=>(t.locale??W())==="en"?p1():g1(),m1=()=>"Previous Canvas",_1=()=>"Vorheriges Canvas",Fu=(i={},t={})=>(t.locale??W())==="en"?m1():_1(),w1=()=>"Next Canvas",b1=()=>"Nächstes Canvas",Bu=(i={},t={})=>(t.locale??W())==="en"?w1():b1(),y1=()=>"Docs",x1=()=>"Doku",T1=(i={},t={})=>(t.locale??W())==="en"?y1():x1(),E1=()=>"IIIF Manifest:",k1=()=>"IIIF-Manifest:",Vu=(i={},t={})=>(t.locale??W())==="en"?E1():k1(),S1=()=>"Enter IIIF manifest URL",C1=()=>"IIIF-Manifest-URL eingeben",P1=(i={},t={})=>(t.locale??W())==="en"?S1():C1(),A1=()=>"Load",R1=()=>"Laden",I1=(i={},t={})=>(t.locale??W())==="en"?A1():R1(),M1=()=>"GitHub",O1=()=>"GitHub",D1=(i={},t={})=>(t.locale??W())==="en"?M1():O1(),L1=()=>"Core",z1=()=>"Basis",H1=(i={},t={})=>(t.locale??W())==="en"?L1():z1(),N1=()=>"Full",F1=()=>"Vollständig",B1=(i={},t={})=>(t.locale??W())==="en"?N1():F1(),V1=()=>"Custom Theme",j1=()=>"Benutzerdefiniertes Thema",U1=(i={},t={})=>(t.locale??W())==="en"?V1():j1(),G1=()=>"Example without plugins",Z1=()=>"Beispiel ohne Plugins",W1=(i={},t={})=>(t.locale??W())==="en"?G1():Z1(),q1=()=>"Example with plugins",X1=()=>"Beispiel mit Plugins",Y1=(i={},t={})=>(t.locale??W())==="en"?q1():X1(),K1=()=>"Example with custom theme override",Q1=()=>"Beispiel mit benutzerdefiniertem Thema",J1=(i={},t={})=>(t.locale??W())==="en"?K1():Q1(),$1=()=>"Plugins",e_=()=>"Erweiterungen",t_=(i={},t={})=>(t.locale??W())==="en"?$1():e_(),r_=()=>"External Controls:",i_=()=>"Externe Steuerelemente:",n_=(i={},t={})=>(t.locale??W())==="en"?r_():i_(),o_=()=>"Active Canvas",a_=()=>"Aktives Canvas",s_=(i={},t={})=>(t.locale??W())==="en"?o_():a_(),l_=()=>"Image Adjustments",c_=()=>"Bildanpassungen",u_=(i={},t={})=>(t.locale??W())==="en"?l_():c_(),ju=()=>"Open Menu",h_=ju,Cs=(i={},t={})=>(t.locale??W())==="en"?ju():h_(),d_=()=>"Close Menu",f_=()=>"Menü schließen",Ps=(i={},t={})=>(t.locale??W())==="en"?d_():f_(),p_=()=>"Gallery",g_=()=>"Galerie",v_=(i={},t={})=>(t.locale??W())==="en"?p_():g_(),m_=()=>"Close Gallery",__=()=>"Galerie schließen",w_=(i={},t={})=>(t.locale??W())==="en"?m_():__(),b_=()=>"Close Search",y_=()=>"Suche schließen",Uu=(i={},t={})=>(t.locale??W())==="en"?b_():y_(),x_=()=>"Settings",T_=()=>"Einstellungen",E_=(i={},t={})=>(t.locale??W())==="en"?x_():T_(),k_=()=>"General",S_=()=>"Allgemein",C_=(i={},t={})=>(t.locale??W())==="en"?k_():S_(),P_=()=>"Show Open/Close",A_=()=>"Auf/Zu-Button",R_=(i={},t={})=>(t.locale??W())==="en"?P_():A_(),I_=()=>"Toolbar Open",M_=()=>"Werkzeugleiste geöffnet",O_=(i={},t={})=>(t.locale??W())==="en"?I_():M_(),D_=()=>"Toolbar Position",L_=()=>"Werkzeugleisten-Position",z_=(i={},t={})=>(t.locale??W())==="en"?D_():L_(),H_=()=>"Canvas Nav",N_=()=>"Canvas-Navigation",F_=(i={},t={})=>(t.locale??W())==="en"?H_():N_(),B_=()=>"Zoom Controls",V_=()=>"Zoom-Steuerelemente",j_=(i={},t={})=>(t.locale??W())==="en"?B_():V_(),U_=()=>"Configuration",G_=()=>"Konfiguration",Z_=(i={},t={})=>(t.locale??W())==="en"?U_():G_(),W_=()=>"Toolbar",q_=()=>"Werkzeugleiste",X_=(i={},t={})=>(t.locale??W())==="en"?W_():q_(),Y_=()=>"Show Search",K_=()=>"Suche anzeigen",Q_=(i={},t={})=>(t.locale??W())==="en"?Y_():K_(),J_=()=>"Show Gallery",$_=()=>"Galerie anzeigen",ew=(i={},t={})=>(t.locale??W())==="en"?J_():$_(),tw=()=>"Show Annotations",rw=()=>"Annotationen anzeigen",iw=(i={},t={})=>(t.locale??W())==="en"?tw():rw(),nw=()=>"Show Fullscreen",ow=()=>"Vollbild anzeigen",aw=(i={},t={})=>(t.locale??W())==="en"?nw():ow(),sw=()=>"Show Info",lw=()=>"Info anzeigen",cw=(i={},t={})=>(t.locale??W())==="en"?sw():lw(),uw=()=>"Gallery",hw=()=>"Galerie",dw=(i={},t={})=>(t.locale??W())==="en"?uw():hw(),fw=()=>"Open",pw=()=>"Öffnen",gw=(i={},t={})=>(t.locale??W())==="en"?fw():pw(),vw=()=>"Draggable",mw=()=>"Verschiebbar",_w=(i={},t={})=>(t.locale??W())==="en"?vw():mw(),ww=()=>"Close Button",bw=()=>"Schließen-Button",yw=(i={},t={})=>(t.locale??W())==="en"?ww():bw(),xw=()=>"Dock Position",Tw=()=>"Andockposition",Ew=(i={},t={})=>(t.locale??W())==="en"?xw():Tw(),kw=()=>"Bottom",Sw=()=>"Unten",Cw=(i={},t={})=>(t.locale??W())==="en"?kw():Sw(),Pw=()=>"Top",Aw=()=>"Oben",Rw=(i={},t={})=>(t.locale??W())==="en"?Pw():Aw(),Iw=()=>"Left",Mw=()=>"Links",Ow=(i={},t={})=>(t.locale??W())==="en"?Iw():Mw(),Dw=()=>"Right",Lw=()=>"Rechts",zw=(i={},t={})=>(t.locale??W())==="en"?Dw():Lw(),Hw=()=>"Floating",Nw=()=>"Schwebend",Fw=(i={},t={})=>(t.locale??W())==="en"?Hw():Nw(),Bw=()=>"Search",Vw=()=>"Suche",jw=(i={},t={})=>(t.locale??W())==="en"?Bw():Vw(),Uw=()=>"Annotations",Gw=()=>"Annotationen",Zw=(i={},t={})=>(t.locale??W())==="en"?Uw():Gw(),Ww=()=>"Panel Open",qw=()=>"Panel geöffnet",Xw=(i={},t={})=>(t.locale??W())==="en"?Ww():qw(),Yw=()=>"Visible by Default",Kw=()=>"Standardmäßig sichtbar",Qw=(i={},t={})=>(t.locale??W())==="en"?Yw():Kw(),Jw=()=>"Copy Config",$w=()=>"Konfiguration kopieren",e2=(i={},t={})=>(t.locale??W())==="en"?Jw():$w(),t2=()=>"Copied!",r2=()=>"Kopiert!",i2=(i={},t={})=>(t.locale??W())==="en"?t2():r2(),n2=()=>"Svelte component (not web component)",o2=()=>"Svelte-Komponente (keine Web-Komponente)",a2=(i={},t={})=>(t.locale??W())==="en"?n2():o2(),s2=()=>"Svelte",l2=()=>"Svelte",c2=(i={},t={})=>(t.locale??W())==="en"?s2():l2(),u2=()=>"Select language",h2=()=>"Sprache wählen",d2=(i={},t={})=>(t.locale??W())==="en"?u2():h2(),f2=()=>"No canvases loaded",p2=()=>"Keine Canvases geladen",g2=(i={},t={})=>(t.locale??W())==="en"?f2():p2(),v2=()=>"Try your own...",m2=()=>"Eigenes ausprobieren...",_2=(i={},t={})=>(t.locale??W())==="en"?v2():m2(),w2=()=>"Transparent Background",b2=()=>"Transparenter Hintergrund",y2=(i={},t={})=>(t.locale??W())==="en"?w2():b2(),x2=()=>"Change Theme",T2=()=>"Design ändern",E2=(i={},t={})=>(t.locale??W())==="en"?x2():T2(),k2=()=>"Theme",S2=()=>"Design",C2=(i={},t={})=>(t.locale??W())==="en"?k2():S2(),P2=()=>"Error: ",A2=()=>"Fehler: ",Gu=(i={},t={})=>(t.locale??W())==="en"?P2():A2(),R2=()=>"No image found",I2=()=>"Kein Bild gefunden",Zu=(i={},t={})=>(t.locale??W())==="en"?R2():I2(),M2=()=>"Panel Width",O2=()=>"Panelbreite",D2=(i={},t={})=>(t.locale??W())==="en"?M2():O2(),L2=()=>"Annotation Editor",z2=()=>"Anmerkungs-Editor",H2=(i={},t={})=>(t.locale??W())==="en"?L2():z2(),N2=()=>"Edit",F2=()=>"Bearbeiten",B2=(i={},t={})=>(t.locale??W())==="en"?N2():F2(),V2=()=>"Create",j2=()=>"Erstellen",U2=(i={},t={})=>(t.locale??W())==="en"?V2():j2(),G2=()=>"Click to start annotating, click again to set shape",Z2=()=>"Klicken zum Annotieren, erneut klicken zum Abschließen",W2=(i={},t={})=>(t.locale??W())==="en"?G2():Z2(),q2=()=>"Click on an annotation to select and edit it",X2=()=>"Anmerkung klicken zum Bearbeiten",Y2=(i={},t={})=>(t.locale??W())==="en"?q2():X2(),K2=()=>"Drawing Tool",Q2=()=>"Zeichenwerkzeug",J2=(i={},t={})=>(t.locale??W())==="en"?K2():Q2(),$2=()=>"Undo",eb=()=>"Rückgängig",tb=(i={},t={})=>(t.locale??W())==="en"?$2():eb(),rb=()=>"Redo",ib=()=>"Wiederholen",nb=(i={},t={})=>(t.locale??W())==="en"?rb():ib(),ob=()=>"Edit Annotation",ab=()=>"Anmerkung bearbeiten",sb=(i={},t={})=>(t.locale??W())==="en"?ob():ab(),lb=()=>"Delete annotation",cb=()=>"Anmerkung löschen",ub=(i={},t={})=>(t.locale??W())==="en"?lb():cb(),hb=()=>"Tag value...",db=()=>"Tag eingeben...",fb=(i={},t={})=>(t.locale??W())==="en"?hb():db(),pb=()=>"https://...",gb=()=>"https://...",vb=(i={},t={})=>(t.locale??W())==="en"?pb():gb(),mb=()=>"Enter text...",_b=()=>"Text eingeben...",wb=(i={},t={})=>(t.locale??W())==="en"?mb():_b(),bb=()=>"Add Content",yb=()=>"Inhalt hinzufügen",xb=(i={},t={})=>(t.locale??W())==="en"?bb():yb(),Tb=()=>"Save Changes",Eb=()=>"Speichern",kb=(i={},t={})=>(t.locale??W())==="en"?Tb():Eb(),Sb=()=>"Delete Annotation?",Cb=()=>"Anmerkung löschen?",Pb=(i={},t={})=>(t.locale??W())==="en"?Sb():Cb(),Ab=()=>"Are you sure you want to delete this annotation? This action cannot be undone.",Rb=()=>"Anmerkung wirklich löschen? Dies kann nicht rückgängig gemacht werden.",Ib=(i={},t={})=>(t.locale??W())==="en"?Ab():Rb(),Mb=()=>"Cancel",Ob=()=>"Abbrechen",Db=(i={},t={})=>(t.locale??W())==="en"?Mb():Ob(),Lb=()=>"Delete",zb=()=>"Löschen",Hb=(i={},t={})=>(t.locale??W())==="en"?Lb():zb(),Nb=()=>"Image Adjustments",Fb=()=>"Bildanpassungen",Bb=(i={},t={})=>(t.locale??W())==="en"?Nb():Fb(),Vb=()=>"Brightness",jb=()=>"Helligkeit",Ub=(i={},t={})=>(t.locale??W())==="en"?Vb():jb(),Gb=()=>"Contrast",Zb=()=>"Kontrast",Wb=(i={},t={})=>(t.locale??W())==="en"?Gb():Zb(),qb=()=>"Saturation",Xb=()=>"Sättigung",Yb=(i={},t={})=>(t.locale??W())==="en"?qb():Xb(),Kb=()=>"Effects",Qb=()=>"Effekte",Jb=(i={},t={})=>(t.locale??W())==="en"?Kb():Qb(),$b=()=>"Invert Colors",ey=()=>"Farben umkehren",ty=(i={},t={})=>(t.locale??W())==="en"?$b():ey(),ry=()=>"Grayscale",iy=()=>"Graustufen",ny=(i={},t={})=>(t.locale??W())==="en"?ry():iy(),oy=()=>"Reset to Default",ay=()=>"Zurücksetzen",sy=(i={},t={})=>(t.locale??W())==="en"?oy():ay(),ly=()=>"Rectangle",cy=()=>"Rechteck",uy=(i={},t={})=>(t.locale??W())==="en"?ly():cy(),hy=()=>"Polygon",dy=()=>"Polygon",fy=(i={},t={})=>(t.locale??W())==="en"?hy():dy(),py=()=>"Point",gy=()=>"Punkt",vy=(i={},t={})=>(t.locale??W())==="en"?py():gy(),Wu=()=>"Viewing Mode",my=Wu,As=(i={},t={})=>(t.locale??W())==="en"?Wu():my(),qu=()=>"Individuals",_y=qu,Xu=(i={},t={})=>(t.locale??W())==="en"?qu():_y(),Yu=()=>"Paged",wy=Yu,Ku=(i={},t={})=>(t.locale??W())==="en"?Yu():wy(),Qu=()=>"Shift Page Pairing",by=Qu,Ju=(i={},t={})=>(t.locale??W())==="en"?Qu():by(),yy=()=>"Show Viewing Mode",xy=()=>"Ansichtsmodus anzeigen",Ty=(i={},t={})=>(t.locale??W())==="en"?yy():xy(),Ey=()=>"Triiiceratops IIIF Viewer Demo",ky=()=>"Triiiceratops IIIF-Viewer-Demo",Sy=(i={},t={})=>(t.locale??W())==="en"?Ey():ky(),Cy=()=>"Viewer Configuration",Py=()=>"Viewer-Konfiguration",Ay=(i={},t={})=>(t.locale??W())==="en"?Cy():Py(),$u=()=>"Paged View Offset",Ry=$u,Iy=(i={},t={})=>(t.locale??W())==="en"?$u():Ry(),My=()=>"Thumbnail Height",Oy=()=>"Thumbnail-Höhe",Dy=(i={},t={})=>(t.locale??W())==="en"?My():Oy(),Ly=()=>"Wechseln Sie in den Zwei-Seiten-Modus",zy=()=>"toggle_two_page_mode",Hy=(i={},t={})=>(t.locale??W())==="en"?zy():Ly(),Ny=()=>"Wechseln Sie in den Einzelseitenmodus",Fy=()=>"toggle_single_page_mode",By=(i={},t={})=>(t.locale??W())==="en"?Fy():Ny(),Vy=()=>"Modus-Umschalter anzeigen",jy=()=>"show_mode_toggle",Uy=(i={},t={})=>(t.locale??W())==="en"?jy():Vy(),Gy=()=>"Zwei-Seiten-Modus",Zy=()=>"two_page_mode",eh=Object.freeze(Object.defineProperty({__proto__:null,annotation_editor_add_content:xb,annotation_editor_cancel:Db,annotation_editor_create_mode:U2,annotation_editor_delete:Hb,annotation_editor_delete_message:Ib,annotation_editor_delete_title:Pb,annotation_editor_delete_tooltip:ub,annotation_editor_edit_mode:B2,annotation_editor_edit_section:sb,annotation_editor_instruction_create:W2,annotation_editor_instruction_edit:Y2,annotation_editor_link_placeholder:vb,annotation_editor_redo:nb,annotation_editor_save:kb,annotation_editor_tag_placeholder:fb,annotation_editor_text_placeholder:wb,annotation_editor_title:H2,annotation_editor_tool_label:J2,annotation_editor_undo:tb,annotation_tool_point:vy,annotation_tool_polygon:fy,annotation_tool_rectangle:uy,annotations_count:Hu,attribution:Ru,change_theme_label:E2,close:ws,close_gallery:w_,close_menu:Ps,close_search:Uu,copied:i2,copy_config:e2,demo_header_active_canvas:s_,demo_header_external_controls:n_,demo_title:Sy,docs:T1,enter_full_screen:Es,error_prefix:Gu,exit_full_screen:Ts,gallery:v_,github:D1,hello_world:sm,hide_all_annotations:Lu,hide_annotations:ks,hide_gallery:ys,iiif_manifest_label:Vu,image_adjustments:u_,image_adjustments_title:Bb,image_filters_brightness:Ub,image_filters_contrast:Wb,image_filters_effects:Jb,image_filters_grayscale:ny,image_filters_invert:ty,image_filters_reset:sy,image_filters_saturation:Yb,language_select_label:d2,license:Iu,load:I1,loading:Au,manifest_placeholder:P1,menu:Om,metadata:Ou,metadata_label_fallback:Pu,next_canvas:Bu,no_annotations_available:v1,no_canvases_loaded:g2,no_content:f1,no_image_found:Zu,open_menu:Cs,plugins_tooltip:t_,previous_canvas:Fu,search:bs,search_panel_close:dm,search_panel_instruction:Su,search_panel_no_results:ku,search_panel_placeholder:Eu,search_panel_results_count:Cu,search_panel_title:_s,settings_category_configuration:Z_,settings_category_general:C_,settings_label:E_,settings_paged_view_offset:Iy,settings_panel_width:D2,settings_position_bottom:Cw,settings_position_floating:Fw,settings_position_left:Ow,settings_position_right:zw,settings_position_top:Rw,settings_select_dock_position:Ew,settings_submenu_annotations:Zw,settings_submenu_gallery:dw,settings_submenu_search:jw,settings_submenu_toolbar:X_,settings_thumbnail_height:Dy,settings_toggle_canvas_nav:F_,settings_toggle_close_button:yw,settings_toggle_draggable:_w,settings_toggle_open:gw,settings_toggle_panel_open:Xw,settings_toggle_show_annotations:iw,settings_toggle_show_fullscreen:aw,settings_toggle_show_gallery:ew,settings_toggle_show_info:cw,settings_toggle_show_search:Q_,settings_toggle_show_toggle:R_,settings_toggle_show_viewing_mode:Ty,settings_toggle_visible_by_default:Qw,settings_toggle_zoom_controls:j_,settings_toolbar_open:O_,settings_toolbar_position:z_,settings_transparent_background:y2,settings_view_configuration:Ay,show_all_annotations:zu,show_annotations:Ss,show_gallery:xs,show_mode_toggle:Uy,theme_menu_title:C2,toggle_annotations:Jm,toggle_metadata:Du,toggle_search:Mu,toggle_single_page_mode:By,toggle_two_page_mode:Hy,try_your_own:_2,two_page_mode:(i={},t={})=>(t.locale??W())==="en"?Zy():Gy(),viewer_variant_core:H1,viewer_variant_custom_theme:U1,viewer_variant_full:B1,viewer_variant_svelte:c2,viewer_variant_svelte_component_tooltip:a2,viewer_variant_tooltip_core:W1,viewer_variant_tooltip_custom_theme:J1,viewer_variant_tooltip_full:Y1,viewing_mode_individuals:Xu,viewing_mode_label:As,viewing_mode_paged:Ku,viewing_mode_shift_pairing:Ju,visible_count:Nu},Symbol.toStringTag,{value:"Module"}));let th=Pe(xt(W()));const Wy=ms;tm((i,t)=>{Wy(i,t),xe(th,W(),!0)});const Zi={get current(){return p(th)}};var qy=me('<button class="btn btn-circle btn-sm btn-ghost"><!></button>'),Xy=me('<div class="h-4 w-px bg-base-content/20 mx-1"></div>'),Yy=me('<div class="h-4 w-px bg-base-content/20 mx-1"></div>'),Ky=me('<!> <button class="btn btn-circle btn-sm btn-ghost" aria-label="Zoom Out"><!></button> <button class="btn btn-circle btn-sm btn-ghost" aria-label="Zoom In"><!></button> <!>',1),Qy=me('<span class="text-sm font-mono tabular-nums text-nowrap"> </span> <button class="btn btn-circle btn-sm btn-ghost"><!></button>',1),Jy=me('<div class="select-none absolute left-1/2 -translate-x-1/2 bg-base-200/90 backdrop-blur rounded-full shadow-lg flex items-center gap-4 z-10 border border-base-300 transition-all duration-200 bottom-4"><!> <!> <!></div>');function $y(i,t){Qe(t,!0);let e=te(()=>t.viewerState.showCanvasNav&&t.viewerState.canvases.length>1);var r=Jy(),n=U(r);{var o=u=>{var h=qy();h.__click=()=>t.viewerState.previousCanvas();var f=U(h);Cv(f,{size:20,weight:"bold"}),j(h),Re(v=>{h.disabled=!t.viewerState.hasPrevious,Ne(h,"aria-label",v)},[()=>Fu()]),x(u,h)};D(n,u=>{p(e)&&u(o)})}var a=ue(n,2);{var s=u=>{var h=Ky(),f=Z(h);{var v=E=>{var A=Xy();x(E,A)};D(f,E=>{p(e)&&E(v)})}var _=ue(f,2);_.__click=()=>t.viewerState.zoomOut();var d=U(_);Qv(d,{size:20,weight:"bold"}),j(_);var g=ue(_,2);g.__click=()=>t.viewerState.zoomIn();var y=U(g);Uv(y,{size:20,weight:"bold"}),j(g);var S=ue(g,2);{var P=E=>{var A=Yy();x(E,A)};D(S,E=>{p(e)&&E(P)})}x(u,h)};D(a,u=>{t.viewerState.showZoomControls&&u(s)})}var c=ue(a,2);{var l=u=>{var h=Qy(),f=Z(h),v=U(f);j(f);var _=ue(f,2);_.__click=()=>t.viewerState.nextCanvas();var d=U(_);Lv(d,{size:20,weight:"bold"}),j(_),Re(g=>{qe(v,`${t.viewerState.currentCanvasIndex+1} / ${t.viewerState.canvases.length??""}`),_.disabled=!t.viewerState.hasNext,Ne(_,"aria-label",g)},[()=>Bu()]),x(u,h)};D(c,u=>{p(e)&&u(l)})}j(r),x(i,r),Je()}Qr(["click"]);var ex=Q('<path d="M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"></path>'),tx=Q('<path d="M208,96l-80,80L48,96Z" opacity="0.2"></path><path d="M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"></path>',1),rx=Q('<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"></path>'),ix=Q('<path d="M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"></path>'),nx=Q('<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path>'),ox=Q('<path d="M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"></path>'),ax=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function sx(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=ax();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=ex();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=tx();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=rx();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=ix();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=nx();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=ox();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var lx=Q('<path d="M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"></path>'),cx=Q('<path d="M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"></path><path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"></path>',1),ux=Q('<path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"></path>'),hx=Q('<path d="M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"></path>'),dx=Q('<path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"></path>'),fx=Q('<path d="M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"></path>'),px=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function rh(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=px();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=lx();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=cx();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=ux();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=hx();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=dx();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=fx();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var gx=Q('<path d="M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"></path>'),vx=Q('<path d="M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"></path><path d="M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"></path>',1),mx=Q('<path d="M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"></path>'),_x=Q('<path d="M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"></path>'),wx=Q('<path d="M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"></path>'),bx=Q('<path d="M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"></path>'),yx=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function ih(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=yx();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=gx();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=vx();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=mx();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=_x();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=wx();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=bx();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var xx=Q('<svg class="fixed inset-0 z-50 pointer-events-none drop-shadow-md text-primary" style="width: 100vw; height: 100vh;"><line stroke="currentColor" stroke-width="2"></line><circle r="3" fill="currentColor"></circle><circle r="3" fill="currentColor"></circle></svg>'),Tx=me('<span class="text-xs opacity-50 truncate max-w-[150px]"> </span>'),Ex=me('<span class="badge badge-primary badge-outline badge-sm"> </span>'),kx=me('<a target="_blank" rel="noopener noreferrer" class="flex items-center gap-1 text-primary hover:underline hover:text-primary-focus p-1 rounded hover:bg-base-200 -ml-1 transition-colors"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" viewBox="0 0 256 256"><path d="M136.37,187.53a12,12,0,0,1,0,17l-5.94,5.94a60,60,0,0,1-84.88-84.88l24.12-24.12A60,60,0,0,1,152.06,99,12,12,0,1,1,135,116a36,36,0,0,0-50.93,1.57L60,141.66a36,36,0,0,0,50.93,50.93l5.94-5.94A12,12,0,0,1,136.37,187.53Zm81.51-149.41a60,60,0,0,0-84.88,0l-5.94,5.94a12,12,0,0,0,17,17l5.94-5.94a36,36,0,0,1,50.93,50.93l-24.11,24.12A36,36,0,0,1,121,140a12,12,0,1,0-17.08,17,60,60,0,0,0,82.39,2.46l24.12-24.12A60,60,0,0,0,217.88,38.12Z"></path></svg> <span class="truncate max-w-[200px]"> </span></a>'),Sx=me('<div class="flex flex-wrap gap-2 pointer-events-auto"><!></div>'),Cx=me('<span class="opacity-50 italic text-xs">(No content)</span>'),Px=me('<div class="w-full text-left p-3 hover:bg-base-300 transition-colors cursor-pointer flex gap-3 group/item items-start focus:outline-none focus:bg-base-300 relative" role="button" tabindex="0"><button class="btn btn-xs btn-circle btn-ghost mt-0.5 shrink-0"><!></button> <div class="flex-1 min-w-0 pointer-events-none"><div class="flex items-start justify-between"><span class="font-bold text-sm text-primary"> </span> <!></div> <div><!> <!></div></div></div>'),Ax=me('<div class="p-4 text-center opacity-50 text-sm">No annotations available.</div>'),Rx=me('<div class="absolute top-4 right-4 z-40 pointer-events-auto transition-all duration-300"><details class="group relative"><summary class="flex items-center gap-2 bg-base-200/90 backdrop-blur shadow-lg rounded-full px-4 py-2 cursor-pointer list-none hover:bg-base-200 transition-all select-none border border-base-300 pointer-events-auto"><button class="btn btn-xs btn-circle btn-ghost"><!></button> <span class="text-sm font-medium"> <span class="opacity-50 text-xs font-normal ml-1"> </span></span> <!></summary> <div class="absolute right-0 mt-2 w-96 bg-base-200/95 backdrop-blur shadow-xl rounded-box p-0 max-h-[60vh] overflow-y-auto border border-base-300 flex flex-col divide-y divide-base-300"></div></details></div>'),Ix=me("<!> <!>",1);function Mx(i,t){Qe(t,!0);const e=Wr(Gi);let r=te(()=>{if(!e.manifestId||!e.canvasId)return[];const y=$r.getAnnotations(e.manifestId,e.canvasId),S=e.currentCanvasSearchAnnotations;return[...y,...S]});function n(y){return y.id||y["@id"]||(typeof y.getId=="function"?y.getId():"")||""}st(()=>{var y;if(p(r).length>0){const S=((y=e.config.annotations)==null?void 0:y.visible)??!0;e.visibleAnnotationIds.clear(),S&&p(r).forEach(P=>{const E=n(P);E&&e.visibleAnnotationIds.add(E)})}else e.visibleAnnotationIds.clear()});let o=te(()=>p(r).length===0?!1:p(r).every(y=>{const S=n(y);return!S||e.visibleAnnotationIds.has(S)}));function a(y){e.visibleAnnotationIds.has(y)?e.visibleAnnotationIds.delete(y):e.visibleAnnotationIds.add(y)}function s(){p(o)?e.visibleAnnotationIds.clear():(e.visibleAnnotationIds.clear(),p(r).forEach(y=>{const S=n(y);S&&e.visibleAnnotationIds.add(S)}))}let c=Pe(null),l=Pe(void 0),u=Pe(null);st(()=>{if(!p(c)){xe(u,null);return}const y=()=>{let P=document;if(p(l)){const B=p(l).getRootNode();(B instanceof Document||B instanceof ShadowRoot)&&(P=B)}const E=P.getElementById(`annotation-list-item-${p(c)}`),A=P.getElementById(`annotation-visual-${p(c)}`);if(E&&A){const B=E.getBoundingClientRect(),q=A.getBoundingClientRect(),z=B.left,I=B.top+B.height/2,M=q.left+q.width/2,J=q.top+q.height/2;xe(u,{x1:z,y1:I,x2:M,y2:J},!0)}else xe(u,null)};y();const S=setInterval(y,16);return()=>clearInterval(S)});let h=te(()=>p(r).length?p(r).map(y=>{const S=_u(y);return{id:n(y),bodies:S,label:(typeof y.getLabel=="function"?y.getLabel():y.label)||""}}):[]);var f=Ix(),v=Z(f);{var _=y=>{var S=xx(),P=U(S),E=ue(P),A=ue(E);j(S),Re(()=>{Ne(P,"x1",p(u).x1),Ne(P,"y1",p(u).y1),Ne(P,"x2",p(u).x2),Ne(P,"y2",p(u).y2),Ne(E,"cx",p(u).x1),Ne(E,"cy",p(u).y1),Ne(A,"cx",p(u).x2),Ne(A,"cy",p(u).y2)}),x(y,S)};D(v,y=>{p(u)&&y(_)})}var d=ue(v,2);{var g=y=>{var S=Rx(),P=U(S),E=U(P),A=U(E);A.__click=F=>{F.preventDefault(),s()};var B=U(A);{var q=F=>{rh(F,{size:16,weight:"bold"})},z=F=>{ih(F,{size:16,weight:"bold"})};D(B,F=>{p(o)?F(q):F(z,!1)})}j(A);var I=ue(A,2),M=U(I),J=ue(M),ee=U(J,!0);j(J),j(I);var ie=ue(I,2);sx(ie,{size:16,weight:"bold",class:"group-open:rotate-180 transition-transform opacity-80"}),j(E);var L=ue(E,2);Ut(L,23,()=>p(h),F=>F.id,(F,X,ae)=>{const oe=te(()=>e.visibleAnnotationIds.has(p(X).id));var H=Px();H.__click=fe=>{fe.preventDefault(),a(p(X).id)};var Y=U(H);Y.__click=fe=>{fe.stopPropagation(),a(p(X).id)};var we=U(Y);{var ke=fe=>{rh(fe,{size:16,weight:"bold"})},he=fe=>{ih(fe,{size:16,weight:"bold"})};D(we,fe=>{p(oe)?fe(ke):fe(he,!1)})}j(Y);var V=ue(Y,2),O=U(V),G=U(O),se=U(G);j(G);var le=ue(G,2);{var Se=fe=>{var De=Tx(),Xe=U(De,!0);j(De),Re(()=>qe(Xe,p(X).label)),x(fe,De)};D(le,fe=>{p(X).label&&!p(X).bodies.some(De=>De.value===p(X).label)&&fe(Se)})}j(O);var pe=ue(O,2),_e=U(pe);Ut(_e,17,()=>p(X).bodies,Ni,(fe,De,Xe,m)=>{var T=Sx(),N=U(T);{var re=ge=>{var ne=Ex(),Me=U(ne,!0);j(ne),Re(()=>qe(Me,p(De).value)),x(ge,ne)},ce=ge=>{var ne=$(),Me=Z(ne);{var je=Ce=>{var Ye=kx();Ye.__click=k=>k.stopPropagation();var w=ue(U(Ye),2),b=U(w,!0);j(w),j(Ye),Re(()=>{Ne(Ye,"href",p(De).value),qe(b,p(De).value)}),x(Ce,Ye)},Ve=Ce=>{var Ye=$(),w=Z(Ye);{var b=C=>{var K=$(),de=Z(K);Cr(de,()=>p(De).value),x(C,K)},k=C=>{var K=pt();Re(()=>qe(K,p(De).value||"(No content)")),x(C,K)};D(w,C=>{p(De).isHtml?C(b):C(k,!1)})}x(Ce,Ye)};D(Me,Ce=>{p(De).purpose==="linking"?Ce(je):Ce(Ve,!1)},!0)}x(ge,ne)};D(N,ge=>{p(De).purpose==="tagging"?ge(re):ge(ce,!1)})}j(T),x(fe,T)});var Te=ue(_e,2);{var Ee=fe=>{var De=Cx();x(fe,De)};D(Te,fe=>{p(X).bodies.length===0&&fe(Ee)})}j(pe),j(V),j(H),Re(()=>{Ne(H,"id",`annotation-list-item-${p(X).id??""}`),qe(se,`#${p(ae)+1}`),He(pe,1,`text-sm prose prose-sm max-w-none prose-p:my-0 prose-a:text-blue-500 wrap-break-word text-left ${p(oe)?"":"opacity-50"} space-y-2`)}),Ao("mouseenter",H,()=>xe(c,p(X).id,!0)),Ao("mouseleave",H,()=>xe(c,null)),Ao("keypress",H,fe=>{(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),a(p(X).id))}),x(F,H)},F=>{var X=Ax();x(F,X)}),j(L),j(P),j(S),ji(S,F=>xe(l,F),()=>p(l)),Re((F,X,ae)=>{Ne(A,"title",F),qe(M,`${X??""} `),qe(ee,ae)},[()=>p(o)?Lu():zu(),()=>Hu({count:p(r).length}),()=>Nu({count:e.visibleAnnotationIds.size})]),x(y,S)};D(d,y=>{e.showAnnotations&&y(g)})}x(i,f),Je()}Qr(["click"]);var Ox=Q('<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path>'),Dx=Q('<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"></path><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>',1),Lx=Q('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'),zx=Q('<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"></path>'),Hx=Q('<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'),Nx=Q('<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"></path>'),Fx=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Rs(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=Fx();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=Ox();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=Dx();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=Lx();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=zx();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Hx();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=Nx();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var Bx=me('<button class="absolute top-1 right-1 btn btn-error btn-xs btn-circle z-20" aria-label="Close Gallery"><!></button>'),Vx=me('<div><div role="button" tabindex="0" aria-label="Drag Gallery"><div></div></div></div>'),jx=me('<img loading="lazy" draggable="false"/>'),Ux=me('<span class="opacity-20 text-4xl">?</span>'),Gx=me('<img loading="lazy" draggable="false"/>'),Zx=me('<span class="opacity-20 text-4xl">?</span>'),Wx=me("<div><!></div>"),qx=me('<button><div><div><!></div> <!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'),Xx=me('<img loading="lazy" draggable="false"/>'),Yx=me('<span class="opacity-20 text-4xl">?</span>'),Kx=me('<button><div><!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'),Qx=me('<div class="absolute bottom-0 right-0 w-6 h-6 cursor-se-resize resize-handle bg-accent hover:bg-accent-focus transition-colors z-50" style="clip-path: polygon(100% 0, 0 100%, 100% 100%);" role="button" tabindex="0" aria-label="Resize"></div>'),Jx=me('<div role="group"><span class="font-bold text-primary opacity-50">Dock Top</span></div> <div role="group"><span class="font-bold text-primary opacity-50">Dock Bottom</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Left</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Right</span></div>',1),$x=me("<div><!> <!> <div><div><!></div></div> <!></div> <!>",1);function yn(i,t){Qe(t,!0);const e=Wr(Gi);let r=te(()=>{var z;return((z=e.config.gallery)==null?void 0:z.draggable)??!0}),n=te(()=>{var z;return((z=e.config.gallery)==null?void 0:z.showCloseButton)??!0}),o=Pe(!1),a={x:0,y:0,w:0,h:0},s=Pe(null);st(()=>{var z,I,M,J;(z=e.config.gallery)!=null&&z.width&&((I=e.config.gallery)!=null&&I.height)&&(e.gallerySize={width:e.config.gallery.width,height:e.config.gallery.height}),((M=e.config.gallery)==null?void 0:M.x)!==void 0&&((J=e.config.gallery)==null?void 0:J.y)!==void 0&&(e.galleryPosition={x:e.config.gallery.x,y:e.config.gallery.y})});let c=te(()=>!t.canvases||!Array.isArray(t.canvases)?[]:t.canvases.map((z,I)=>{let M="";try{if(z.getThumbnail){const J=z.getThumbnail();J&&(M=typeof J=="string"?J:J.id||J["@id"])}}catch{console.warn("Error getting thumbnail")}if(!M){let J=z.getImages();if((!J||!J.length)&&z.getContent&&(J=z.getContent()),J&&J.length>0){const ee=J[0];let ie=ee.getResource?ee.getResource():null;if(!ie&&ee.getBody){const L=ee.getBody();Array.isArray(L)&&L.length>0?ie=L[0]:L&&(ie=L)}if(ie&&!ie.id&&!ie.__jsonld&&(!ie.getServices||ie.getServices().length===0)&&(ie=null),!ie){const L=ee.__jsonld||ee;L.body&&(ie=Array.isArray(L.body)?L.body[0]:L.body)}if(ie){const F=(()=>{let ae=[];if(ie.getServices&&(ae=ie.getServices()),!ae||ae.length===0){const oe=ie.__jsonld||ie;oe.service&&(ae=Array.isArray(oe.service)?oe.service:[oe.service])}return ae})();let X=!1;if(F.length>0){const ae=F[0];let oe="";try{if(oe=ae.getProfile?ae.getProfile():ae.profile||"",typeof oe=="object"&&oe){const we=oe;oe=we.value||we.id||we["@id"]||JSON.stringify(we)}}catch{}const H=String(oe??"").toLowerCase();(H.includes("level0")||H.includes("level-0"))&&(X=!0);const Y=ae.id||ae["@id"];X||(M=`${Y}/full/200,/0/default.jpg`)}if(!M&&(M=ie.id||ie["@id"],!M)){let ae=null;if(ee.__jsonld&&ee.__jsonld.body?ae=ee.__jsonld.body:ee.body&&(ae=ee.body),ae){const oe=Array.isArray(ae)?ae[0]:ae;M=oe.id||oe["@id"]}}}}}return{id:z.id,label:z.getLabel().length?z.getLabel()[0].value:`Canvas ${I+1}`,src:M,index:I}}));function l(z){if(!e.isGalleryDragging)return;let I=z.clientX-e.galleryDragOffset.x,M=z.clientY-e.galleryDragOffset.y;const J=Math.max(0,window.innerWidth-e.gallerySize.width),ee=Math.max(0,window.innerHeight-e.gallerySize.height);I=Math.max(0,Math.min(I,J)),M=Math.max(0,Math.min(M,ee)),e.galleryPosition={x:I,y:M};const ie=e.galleryCenterPanelRect;if(!ie){console.warn("[Gallery] No center panel rect available");return}const L=z.clientX,F=z.clientY,X=60;e.dragOverSide=null,L>=ie.left&&L<=ie.left+X?e.dragOverSide="left":L<=ie.right&&L>=ie.right-X?e.dragOverSide="right":F>=ie.top&&F<=ie.top+X?e.dragOverSide="top":F<=ie.bottom&&F>=ie.bottom-X&&(e.dragOverSide="bottom")}function u(){const z=e.dragOverSide;console.log("[Gallery] stopDrag. dropTarget:",z),e.isGalleryDragging=!1,e.dragOverSide=null,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",u),z&&(e.dockSide=z)}function h(z){z.stopPropagation(),xe(o,!0),a={x:z.clientX,y:z.clientY,w:e.gallerySize.width,h:e.gallerySize.height},window.addEventListener("mousemove",f),window.addEventListener("mouseup",v)}function f(z){if(!p(o))return;const I=z.clientX-a.x,M=z.clientY-a.y;e.gallerySize={width:Math.max(200,a.w+I),height:Math.max(200,a.h+M)}}function v(){xe(o,!1),window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",v)}function _(z){if(e.viewingMode==="paged"){const I=p(c).findIndex(J=>J.id===z),M=e.pagedOffset;if(I<M)e.setCanvas(z);else if((I-M)%2===0)e.setCanvas(z);else{const ee=p(c)[I-1];e.setCanvas(ee.id)}}else e.setCanvas(z)}let d=Pe(xt(e.dockSide));st(()=>{const z=e.dockSide;xe(d,z==="none"||z==="top"||z==="bottom"||z==="left"||z==="right"?z:"none",!0)}),st(()=>{e.dockSide!==p(d)&&(e.dockSide=p(d),e.isGalleryDockedBottom=p(d)==="bottom",e.isGalleryDockedRight=p(d)==="right")}),st(()=>{if(!p(s)||!e.canvasId)return;const z=e.canvasId,I=p(s).querySelector(`[data-id="${CSS.escape(z)}"]`);I&&I.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})});let g=te(()=>p(d)==="top"||p(d)==="bottom"||p(d)==="none"&&e.gallerySize.height<320),y=te(()=>e.galleryFixedHeight);function S(z){var ee,ie;if(!p(r)||z.target.closest(".resize-handle"))return;const I=p(d)!=="none";if(I){let L=Math.max(0,z.clientX-150),F=Math.max(0,z.clientY-20);const X=Math.max(0,window.innerWidth-300),ae=Math.max(0,window.innerHeight-400);L=Math.min(L,X),F=Math.min(F,ae),e.galleryPosition={x:L,y:F},e.galleryDragOffset={x:z.clientX-L,y:z.clientY-F}}else e.galleryDragOffset={x:z.clientX-e.galleryPosition.x,y:z.clientY-e.galleryPosition.y};const M=(ee=p(s))==null?void 0:ee.getRootNode(),J=((ie=M==null?void 0:M.getElementById)==null?void 0:ie.call(M,"triiiceratops-center-panel"))??document.getElementById("triiiceratops-center-panel");J?(e.galleryCenterPanelRect=J.getBoundingClientRect(),console.log("[Gallery] Captured center panel rect:",e.galleryCenterPanelRect)):console.warn("[Gallery] Could not find center panel in startDrag"),e.isGalleryDragging=!0,window.addEventListener("mousemove",l),window.addEventListener("mouseup",u),I&&xe(d,"none")}const P=te(()=>{const z=[];if(e.viewingMode==="paged"&&t.canvases){const I=e.pagedOffset;for(let M=0;M<I&&M<t.canvases.length;M++)z.push(M);for(let M=I;M<t.canvases.length;M+=2)z.push(M)}return z}),E=te(()=>{const z=[],I=p(c),M=e.pagedOffset;for(const J of p(P)){const ee=I[J],ie=J<M?null:I[J+1],L=ee.id,F=ee.label,X=[ee.src];ie&&X.push(ie.src),z.push({id:L,label:F,srcs:X,index:J})}return z});var A=$(),B=Z(A);{var q=z=>{var I=$x(),M=Z(I),J=U(M);{var ee=V=>{var O=Bx();O.__click=()=>e.toggleThumbnailGallery();var G=U(O);Rs(G,{size:16,weight:"bold"}),j(O),x(V,O)};D(J,V=>{p(n)&&V(ee)})}var ie=ue(J,2);{var L=V=>{var O=Vx(),G=U(O);G.__mousedown=S;var se=U(G);j(G),j(O),Re(()=>{He(O,1,"bg-base-100 flex shrink-0 select-none relative "+(p(d)==="bottom"||p(d)==="top"?"flex-row h-full items-center border-r border-base-200":"flex-col w-full border-b border-base-200")),He(G,1,"cursor-move flex items-center justify-center hover:bg-base-200/50 active:bg-base-200 transition-colors "+(p(d)==="bottom"||p(d)==="top"?"w-8 h-full":"h-6 w-full")),He(se,1,"bg-base-300 rounded-full "+(p(d)==="bottom"||p(d)==="top"?"w-1.5 h-12":"w-12 h-1.5"))}),x(V,O)};D(ie,V=>{(p(r)||p(d)==="none")&&V(L)})}var F=ue(ie,2),X=U(F),ae=U(X);{var oe=V=>{var O=$(),G=Z(O);Ut(G,17,()=>p(E),Ni,(se,le)=>{var Se=qx();Se.__click=()=>_(p(le).id);var pe=U(Se),_e=U(pe),Te=U(_e);{var Ee=ce=>{var ge=jx();Re(()=>{Ne(ge,"src",p(le).srcs[0]),Ne(ge,"alt",p(le).label),He(ge,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"} ${p(le).srcs.length>1?"object-right":"object-center"}`)}),x(ce,ge)},fe=ce=>{var ge=Ux();x(ce,ge)};D(Te,ce=>{p(le).srcs[0]?ce(Ee):ce(fe,!1)})}j(_e);var De=ue(_e,2);{var Xe=ce=>{var ge=Wx(),ne=U(ge);{var Me=Ve=>{var Ce=Gx();Re(()=>{Ne(Ce,"src",p(le).srcs[1]),Ne(Ce,"alt",p(le).label),He(Ce,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"} object-left`)}),x(Ve,Ce)},je=Ve=>{var Ce=Zx();x(Ve,Ce)};D(ne,Ve=>{p(le).srcs[1]?Ve(Me):Ve(je,!1)})}j(ge),Re(()=>He(ge,1,`flex items-center justify-center overflow-hidden ${p(g)?"h-full w-auto":"h-full w-1/2"}`)),x(ce,ge)};D(De,ce=>{p(le).srcs.length>1&&ce(Xe)})}j(pe);var m=ue(pe,2),T=U(m),N=U(T);j(T);var re=ue(T);j(m),j(Se),Re(()=>{He(Se,1,`group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${p(g)?"w-auto":p(le).srcs.length>1?"col-span-2":""} ${e.canvasId===p(le).id?"ring-2 ring-primary bg-primary/5":""}`),Mt(Se,p(g)?`height: ${p(y)+24}px`:""),Ne(Se,"data-id",p(le).id),Ne(Se,"aria-label",`Select canvas ${p(le).label??""}`),He(pe,1,`${p(g)?"h-full w-auto flex-row":p(le).srcs.length>1?"aspect-3/2 w-full":"aspect-3/4 w-full"} bg-base-300 rounded overflow-hidden relative flex items-center justify-center gap-px`),Mt(pe,p(g)?`height: ${p(y)}px`:""),He(_e,1,`flex items-center justify-center overflow-hidden ${p(g)?"h-full w-auto":"h-full "+(p(le).srcs.length>1?"w-1/2":"w-full")}`),qe(N,`${p(le).index+1}.`),qe(re,` ${p(le).label??""}`)}),x(se,Se)}),x(V,O)},H=V=>{var O=$(),G=Z(O);Ut(G,17,()=>p(c),Ni,(se,le)=>{var Se=Kx();Se.__click=()=>_(p(le).id);var pe=U(Se),_e=U(pe);{var Te=T=>{var N=Xx();Re(()=>{Ne(N,"src",p(le).src),Ne(N,"alt",p(le).label),He(N,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"}`)}),x(T,N)},Ee=T=>{var N=Yx();x(T,N)};D(_e,T=>{p(le).src?T(Te):T(Ee,!1)})}j(pe);var fe=ue(pe,2),De=U(fe),Xe=U(De);j(De);var m=ue(De);j(fe),j(Se),Re(()=>{He(Se,1,`group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${p(g)?"w-auto":""} ${e.canvasId===p(le).id?"ring-2 ring-primary bg-primary/5":""}`),Mt(Se,p(g)?`height: ${p(y)+24}px`:""),Ne(Se,"data-id",p(le).id),Ne(Se,"aria-label",`Select canvas ${p(le).label??""}`),He(pe,1,`${p(g)?"h-full w-auto":"aspect-3/4 w-full"} bg-base-300 rounded overflow-hidden relative flex items-center justify-center`),Mt(pe,p(g)?`height: ${p(y)}px`:""),qe(Xe,`${p(le).index+1}.`),qe(m,` ${p(le).label??""}`)}),x(se,Se)}),x(V,O)};D(ae,V=>{e.viewingMode==="paged"?V(oe):V(H,!1)})}j(X),j(F);var Y=ue(F,2);{var we=V=>{var O=Qx();O.__mousedown=h,x(V,O)};D(Y,V=>{p(d)==="none"&&V(we)})}j(M),ji(M,V=>xe(s,V),()=>p(s));var ke=ue(M,2);{var he=V=>{var O=Jx(),G=Z(O),se=ue(G,2),le=ue(se,2),Se=ue(le,2);Re(()=>{He(G,1,`absolute top-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="top"?"bg-primary/20 scale-105":"bg-base-100/50"}`),He(se,1,`absolute bottom-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="bottom"?"bg-primary/20 scale-105":"bg-base-100/50"}`),He(le,1,`absolute top-2 bottom-2 left-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="left"?"bg-primary/20 scale-105":"bg-base-100/50"}`),He(Se,1,`absolute top-2 bottom-2 right-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-300 ${e.dragOverSide==="right"?"bg-primary/20 scale-105":"bg-base-100/50"}`)}),x(V,O)};D(ke,V=>{e.isGalleryDragging&&V(he)})}Re(()=>{He(M,1,(p(d)!=="none"?`relative z-50 bg-base-100 shadow-xl border-base-300 flex transition-all duration-200 select-none w-full h-full
|
|
18
|
+
`),Xe(ee,p(g).tooltip),Ne(ie,"id",`annotation-visual-${p(g).id??""}`),Ne(ie,"points",L),Be(ie,0,`cursor-pointer transition-colors ${p(g).isSearchHit?"fill-yellow-400/40 stroke-yellow-400 hover:fill-yellow-400/60":"fill-red-500/20 stroke-red-500 hover:fill-red-500/40"}`)},[()=>p(g).points.map(L=>L.join(",")).join(" ")]),x(M,O)};D(Z,M=>{p(g).type==="POLYGON"&&M(z)},!0)}x(R,F)};D(S,R=>{p(g).type==="RECTANGLE"?R(P):R(E,!1)})}x(d,b)}),j(f),Re(()=>Be(v,1,`w-full h-full osd-background ${e().config.transparentBackground?"":"bg-base-100"}`)),x(i,f),Qe()}let wu=Symbol("phosphor-svelte");function kt(){return ha(wu)?Wr(wu):{}}var bv=Q('<path d="M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"></path>'),yv=Q('<path d="M160,48V208L80,128Z" opacity="0.2"></path><path d="M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"></path>',1),xv=Q('<path d="M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"></path>'),Tv=Q('<path d="M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"></path>'),Ev=Q('<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"></path>'),kv=Q('<path d="M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"></path>'),Sv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Cv(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=Sv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=bv();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=yv();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=xv();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=Tv();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Ev();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=kv();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var Pv=Q('<path d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"></path>'),Av=Q('<path d="M176,128,96,208V48Z" opacity="0.2"></path><path d="M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"></path>',1),Rv=Q('<path d="M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"></path>'),Iv=Q('<path d="M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"></path>'),Mv=Q('<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path>'),Ov=Q('<path d="M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"></path>'),Dv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Lv(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=Dv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=Pv();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=Av();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=Rv();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=Iv();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Mv();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=Ov();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var zv=Q('<path d="M156,112a12,12,0,0,1-12,12H124v20a12,12,0,0,1-24,0V124H80a12,12,0,0,1,0-24h20V80a12,12,0,0,1,24,0v20h20A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"></path>'),Hv=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Z"></path>',1),Nv=Q('<path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24a8,8,0,0,1,0,16Z"></path>'),Fv=Q('<path d="M150,112a6,6,0,0,1-6,6H118v26a6,6,0,0,1-12,0V118H80a6,6,0,0,1,0-12h26V80a6,6,0,0,1,12,0v26h26A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"></path>'),Bv=Q('<path d="M152,112a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),Vv=Q('<path d="M148,112a4,4,0,0,1-4,4H116v28a4,4,0,0,1-8,0V116H80a4,4,0,0,1,0-8h28V80a4,4,0,0,1,8,0v28h28A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"></path>'),jv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Uv(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=jv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=zv();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=Hv();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=Nv();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=Fv();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Bv();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=Vv();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var Gv=Q('<path d="M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"></path>'),Zv=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z"></path>',1),Wv=Q('<path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"></path>'),qv=Q('<path d="M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"></path>'),Xv=Q('<path d="M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),Yv=Q('<path d="M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"></path>'),Kv=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Qv(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=Kv();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=Gv();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=Zv();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=Wv();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=qv();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Xv();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=Yv();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}const Jv="en",vs=["en","de"],bu="PARAGLIDE_LOCALE",$v=3456e4,yu=["cookie","globalVariable","baseLocale"];globalThis.__paraglide={};let Go,xu=!1,q=()=>{let i;for(const t of yu){if(t==="cookie")i=nm();else if(t==="baseLocale")i=Jv;else if(t==="globalVariable"&&Go!==void 0)i=Go;else if(Tu(t)&&Zo.has(t)){const e=Zo.get(t);if(e){const r=e.getLocale();if(r instanceof Promise)continue;i=r}}if(i!==void 0){const e=im(i);return xu||(Go=e,xu=!0,ms(e,{reload:!1})),e}}throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found")};const em=i=>{window.location.reload()};let ms=(i,t)=>{const e={reload:!0,...t};let r;try{r=q()}catch{}const n=[];for(const a of yu)if(a==="globalVariable")Go=i;else if(a==="cookie"){if(typeof document>"u"||typeof window>"u")continue;const s=`${bu}=${i}; path=/; max-age=${$v}`;document.cookie=s}else{if(a==="baseLocale")continue;if(Tu(a)&&Zo.has(a)){const s=Zo.get(a);if(s){let c=s.setLocale(i);c instanceof Promise&&(c=c.catch(l=>{throw new Error(`Custom strategy "${a}" setLocale failed.`,{cause:l})}),n.push(c))}}}const o=()=>{e.reload&&window.location&&i!==r&&em()};if(n.length)return Promise.all(n).then(()=>{o()});o()};const tm=i=>{ms=i};function rm(i){return typeof i!="string"?!1:i?vs.some(t=>t.toLowerCase()===i.toLowerCase()):!1}function im(i){if(typeof i!="string")throw new Error(`Invalid locale: ${i}. Expected a string.`);const t=i.toLowerCase(),e=vs.find(r=>r.toLowerCase()===t);if(!e)throw new Error(`Invalid locale: ${i}. Expected one of: ${vs.join(", ")}`);return e}function nm(){if(typeof document>"u"||!document.cookie)return;const i=document.cookie.match(new RegExp(`(^| )${bu}=([^;]+)`)),t=i==null?void 0:i[2];if(rm(t))return t}const Zo=new Map;function Tu(i){return typeof i=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(i)}const om=()=>"Hello World",am=()=>"Hallo Welt",sm=(i={},t={})=>(t.locale??q())==="en"?om():am(),lm=()=>"Search",cm=()=>"Suche",_s=(i={},t={})=>(t.locale??q())==="en"?lm():cm(),um=()=>"Close Search",hm=()=>"Suche schließen",dm=(i={},t={})=>(t.locale??q())==="en"?um():hm(),fm=()=>"Search content...",pm=()=>"Inhalt durchsuchen...",Eu=(i={},t={})=>(t.locale??q())==="en"?fm():pm(),gm=i=>`No results found for "${i==null?void 0:i.query}"`,vm=i=>`Keine Ergebnisse für "${i==null?void 0:i.query}" gefunden`,ku=(i,t={})=>(t.locale??q())==="en"?gm(i):vm(i),mm=()=>"Enter a search term to find occurrences within this manifest.",_m=()=>"Geben Sie einen Suchbegriff ein, um Vorkommen in diesem Manifest zu finden.",Su=(i={},t={})=>(t.locale??q())==="en"?mm():_m(),wm=i=>`${i==null?void 0:i.count} Results`,bm=i=>`${i==null?void 0:i.count} Ergebnisse`,Cu=(i,t={})=>(t.locale??q())==="en"?wm(i):bm(i),ym=()=>"Manifest Metadata",xm=()=>"Manifest-Metadaten",Pu=(i={},t={})=>(t.locale??q())==="en"?ym():xm(),Tm=()=>"Loading...",Em=()=>"Lädt...",Au=(i={},t={})=>(t.locale??q())==="en"?Tm():Em(),km=()=>"Attribution",Sm=()=>"Quellenangabe",Ru=(i={},t={})=>(t.locale??q())==="en"?km():Sm(),Cm=()=>"License",Pm=()=>"Lizenz",Iu=(i={},t={})=>(t.locale??q())==="en"?Cm():Pm(),Am=()=>"Close",Rm=()=>"Schließen",ws=(i={},t={})=>(t.locale??q())==="en"?Am():Rm(),Im=()=>"Menu",Mm=()=>"Menü",Om=(i={},t={})=>(t.locale??q())==="en"?Im():Mm(),Dm=()=>"Search",Lm=()=>"Suche",bs=(i={},t={})=>(t.locale??q())==="en"?Dm():Lm(),zm=()=>"Toggle Search",Hm=()=>"Suche umschalten",Mu=(i={},t={})=>(t.locale??q())==="en"?zm():Hm(),Nm=()=>"Hide Gallery",Fm=()=>"Galerie ausblenden",ys=(i={},t={})=>(t.locale??q())==="en"?Nm():Fm(),Bm=()=>"Show Gallery",Vm=()=>"Galerie einblenden",xs=(i={},t={})=>(t.locale??q())==="en"?Bm():Vm(),jm=()=>"Exit Full Screen",Um=()=>"Vollbildmodus beenden",Ts=(i={},t={})=>(t.locale??q())==="en"?jm():Um(),Gm=()=>"Enter Full Screen",Zm=()=>"Vollbildmodus",Es=(i={},t={})=>(t.locale??q())==="en"?Gm():Zm(),Wm=()=>"Hide Annotations",qm=()=>"Annotationen ausblenden",ks=(i={},t={})=>(t.locale??q())==="en"?Wm():qm(),Xm=()=>"Show Annotations",Ym=()=>"Annotationen einblenden",Ss=(i={},t={})=>(t.locale??q())==="en"?Xm():Ym(),Km=()=>"Toggle Annotations",Qm=()=>"Annotationen umschalten",Jm=(i={},t={})=>(t.locale??q())==="en"?Km():Qm(),$m=()=>"Metadata",e1=()=>"Metadaten",Ou=(i={},t={})=>(t.locale??q())==="en"?$m():e1(),t1=()=>"Toggle Metadata",r1=()=>"Metadaten umschalten",Du=(i={},t={})=>(t.locale??q())==="en"?t1():r1(),i1=()=>"Hide All Annotations",n1=()=>"Alle Annotationen ausblenden",Lu=(i={},t={})=>(t.locale??q())==="en"?i1():n1(),o1=()=>"Show All Annotations",a1=()=>"Alle Annotationen einblenden",zu=(i={},t={})=>(t.locale??q())==="en"?o1():a1(),s1=i=>`${i==null?void 0:i.count} Annotations`,l1=i=>`${i==null?void 0:i.count} Annotationen`,Hu=(i,t={})=>(t.locale??q())==="en"?s1(i):l1(i),c1=i=>`(${i==null?void 0:i.count} visible)`,u1=i=>`(${i==null?void 0:i.count} sichtbar)`,Nu=(i,t={})=>(t.locale??q())==="en"?c1(i):u1(i),h1=()=>"(No content)",d1=()=>"(Kein Inhalt)",f1=(i={},t={})=>(t.locale??q())==="en"?h1():d1(),p1=()=>"No annotations available.",g1=()=>"Keine Annotationen verfügbar.",v1=(i={},t={})=>(t.locale??q())==="en"?p1():g1(),m1=()=>"Previous Canvas",_1=()=>"Vorheriges Canvas",Fu=(i={},t={})=>(t.locale??q())==="en"?m1():_1(),w1=()=>"Next Canvas",b1=()=>"Nächstes Canvas",Bu=(i={},t={})=>(t.locale??q())==="en"?w1():b1(),y1=()=>"Docs",x1=()=>"Doku",T1=(i={},t={})=>(t.locale??q())==="en"?y1():x1(),E1=()=>"IIIF Manifest:",k1=()=>"IIIF-Manifest:",Vu=(i={},t={})=>(t.locale??q())==="en"?E1():k1(),S1=()=>"Enter IIIF manifest URL",C1=()=>"IIIF-Manifest-URL eingeben",P1=(i={},t={})=>(t.locale??q())==="en"?S1():C1(),A1=()=>"Load",R1=()=>"Laden",I1=(i={},t={})=>(t.locale??q())==="en"?A1():R1(),M1=()=>"GitHub",O1=()=>"GitHub",D1=(i={},t={})=>(t.locale??q())==="en"?M1():O1(),L1=()=>"Core",z1=()=>"Basis",H1=(i={},t={})=>(t.locale??q())==="en"?L1():z1(),N1=()=>"Full",F1=()=>"Vollständig",B1=(i={},t={})=>(t.locale??q())==="en"?N1():F1(),V1=()=>"Custom Theme",j1=()=>"Benutzerdefiniertes Thema",U1=(i={},t={})=>(t.locale??q())==="en"?V1():j1(),G1=()=>"Example without plugins",Z1=()=>"Beispiel ohne Plugins",W1=(i={},t={})=>(t.locale??q())==="en"?G1():Z1(),q1=()=>"Example with plugins",X1=()=>"Beispiel mit Plugins",Y1=(i={},t={})=>(t.locale??q())==="en"?q1():X1(),K1=()=>"Example with custom theme override",Q1=()=>"Beispiel mit benutzerdefiniertem Thema",J1=(i={},t={})=>(t.locale??q())==="en"?K1():Q1(),$1=()=>"Plugins",e_=()=>"Erweiterungen",t_=(i={},t={})=>(t.locale??q())==="en"?$1():e_(),r_=()=>"External Controls:",i_=()=>"Externe Steuerelemente:",n_=(i={},t={})=>(t.locale??q())==="en"?r_():i_(),o_=()=>"Active Canvas",a_=()=>"Aktives Canvas",s_=(i={},t={})=>(t.locale??q())==="en"?o_():a_(),l_=()=>"Image Adjustments",c_=()=>"Bildanpassungen",u_=(i={},t={})=>(t.locale??q())==="en"?l_():c_(),ju=()=>"Open Menu",h_=ju,Cs=(i={},t={})=>(t.locale??q())==="en"?ju():h_(),d_=()=>"Close Menu",f_=()=>"Menü schließen",Ps=(i={},t={})=>(t.locale??q())==="en"?d_():f_(),p_=()=>"Gallery",g_=()=>"Galerie",v_=(i={},t={})=>(t.locale??q())==="en"?p_():g_(),m_=()=>"Close Gallery",__=()=>"Galerie schließen",w_=(i={},t={})=>(t.locale??q())==="en"?m_():__(),b_=()=>"Close Search",y_=()=>"Suche schließen",Uu=(i={},t={})=>(t.locale??q())==="en"?b_():y_(),x_=()=>"Settings",T_=()=>"Einstellungen",E_=(i={},t={})=>(t.locale??q())==="en"?x_():T_(),k_=()=>"General",S_=()=>"Allgemein",C_=(i={},t={})=>(t.locale??q())==="en"?k_():S_(),P_=()=>"Show Open/Close",A_=()=>"Auf/Zu-Button",R_=(i={},t={})=>(t.locale??q())==="en"?P_():A_(),I_=()=>"Toolbar Open",M_=()=>"Werkzeugleiste geöffnet",O_=(i={},t={})=>(t.locale??q())==="en"?I_():M_(),D_=()=>"Toolbar Position",L_=()=>"Werkzeugleisten-Position",z_=(i={},t={})=>(t.locale??q())==="en"?D_():L_(),H_=()=>"Canvas Nav",N_=()=>"Canvas-Navigation",F_=(i={},t={})=>(t.locale??q())==="en"?H_():N_(),B_=()=>"Zoom Controls",V_=()=>"Zoom-Steuerelemente",j_=(i={},t={})=>(t.locale??q())==="en"?B_():V_(),U_=()=>"Configuration",G_=()=>"Konfiguration",Z_=(i={},t={})=>(t.locale??q())==="en"?U_():G_(),W_=()=>"Toolbar",q_=()=>"Werkzeugleiste",X_=(i={},t={})=>(t.locale??q())==="en"?W_():q_(),Y_=()=>"Show Search",K_=()=>"Suche anzeigen",Q_=(i={},t={})=>(t.locale??q())==="en"?Y_():K_(),J_=()=>"Show Gallery",$_=()=>"Galerie anzeigen",ew=(i={},t={})=>(t.locale??q())==="en"?J_():$_(),tw=()=>"Show Annotations",rw=()=>"Annotationen anzeigen",iw=(i={},t={})=>(t.locale??q())==="en"?tw():rw(),nw=()=>"Show Fullscreen",ow=()=>"Vollbild anzeigen",aw=(i={},t={})=>(t.locale??q())==="en"?nw():ow(),sw=()=>"Show Info",lw=()=>"Info anzeigen",cw=(i={},t={})=>(t.locale??q())==="en"?sw():lw(),uw=()=>"Gallery",hw=()=>"Galerie",dw=(i={},t={})=>(t.locale??q())==="en"?uw():hw(),fw=()=>"Open",pw=()=>"Öffnen",gw=(i={},t={})=>(t.locale??q())==="en"?fw():pw(),vw=()=>"Draggable",mw=()=>"Verschiebbar",_w=(i={},t={})=>(t.locale??q())==="en"?vw():mw(),ww=()=>"Close Button",bw=()=>"Schließen-Button",yw=(i={},t={})=>(t.locale??q())==="en"?ww():bw(),xw=()=>"Dock Position",Tw=()=>"Andockposition",Ew=(i={},t={})=>(t.locale??q())==="en"?xw():Tw(),kw=()=>"Bottom",Sw=()=>"Unten",Cw=(i={},t={})=>(t.locale??q())==="en"?kw():Sw(),Pw=()=>"Top",Aw=()=>"Oben",Rw=(i={},t={})=>(t.locale??q())==="en"?Pw():Aw(),Iw=()=>"Left",Mw=()=>"Links",Ow=(i={},t={})=>(t.locale??q())==="en"?Iw():Mw(),Dw=()=>"Right",Lw=()=>"Rechts",zw=(i={},t={})=>(t.locale??q())==="en"?Dw():Lw(),Hw=()=>"Floating",Nw=()=>"Schwebend",Fw=(i={},t={})=>(t.locale??q())==="en"?Hw():Nw(),Bw=()=>"Search",Vw=()=>"Suche",jw=(i={},t={})=>(t.locale??q())==="en"?Bw():Vw(),Uw=()=>"Annotations",Gw=()=>"Annotationen",Zw=(i={},t={})=>(t.locale??q())==="en"?Uw():Gw(),Ww=()=>"Panel Open",qw=()=>"Panel geöffnet",Xw=(i={},t={})=>(t.locale??q())==="en"?Ww():qw(),Yw=()=>"Visible by Default",Kw=()=>"Standardmäßig sichtbar",Qw=(i={},t={})=>(t.locale??q())==="en"?Yw():Kw(),Jw=()=>"Copy Config",$w=()=>"Konfiguration kopieren",e2=(i={},t={})=>(t.locale??q())==="en"?Jw():$w(),t2=()=>"Copied!",r2=()=>"Kopiert!",i2=(i={},t={})=>(t.locale??q())==="en"?t2():r2(),n2=()=>"Svelte component (not web component)",o2=()=>"Svelte-Komponente (keine Web-Komponente)",a2=(i={},t={})=>(t.locale??q())==="en"?n2():o2(),s2=()=>"Svelte",l2=()=>"Svelte",c2=(i={},t={})=>(t.locale??q())==="en"?s2():l2(),u2=()=>"Select language",h2=()=>"Sprache wählen",d2=(i={},t={})=>(t.locale??q())==="en"?u2():h2(),f2=()=>"No canvases loaded",p2=()=>"Keine Canvases geladen",g2=(i={},t={})=>(t.locale??q())==="en"?f2():p2(),v2=()=>"Try your own...",m2=()=>"Eigenes ausprobieren...",_2=(i={},t={})=>(t.locale??q())==="en"?v2():m2(),w2=()=>"Transparent Background",b2=()=>"Transparenter Hintergrund",y2=(i={},t={})=>(t.locale??q())==="en"?w2():b2(),x2=()=>"Change Theme",T2=()=>"Design ändern",E2=(i={},t={})=>(t.locale??q())==="en"?x2():T2(),k2=()=>"Theme",S2=()=>"Design",C2=(i={},t={})=>(t.locale??q())==="en"?k2():S2(),P2=()=>"Error: ",A2=()=>"Fehler: ",Gu=(i={},t={})=>(t.locale??q())==="en"?P2():A2(),R2=()=>"No image found",I2=()=>"Kein Bild gefunden",Zu=(i={},t={})=>(t.locale??q())==="en"?R2():I2(),M2=()=>"Panel Width",O2=()=>"Panelbreite",D2=(i={},t={})=>(t.locale??q())==="en"?M2():O2(),L2=()=>"Annotation Editor",z2=()=>"Anmerkungs-Editor",H2=(i={},t={})=>(t.locale??q())==="en"?L2():z2(),N2=()=>"Edit",F2=()=>"Bearbeiten",B2=(i={},t={})=>(t.locale??q())==="en"?N2():F2(),V2=()=>"Create",j2=()=>"Erstellen",U2=(i={},t={})=>(t.locale??q())==="en"?V2():j2(),G2=()=>"Click to start annotating, click again to set shape",Z2=()=>"Klicken zum Annotieren, erneut klicken zum Abschließen",W2=(i={},t={})=>(t.locale??q())==="en"?G2():Z2(),q2=()=>"Click on an annotation to select and edit it",X2=()=>"Anmerkung klicken zum Bearbeiten",Y2=(i={},t={})=>(t.locale??q())==="en"?q2():X2(),K2=()=>"Drawing Tool",Q2=()=>"Zeichenwerkzeug",J2=(i={},t={})=>(t.locale??q())==="en"?K2():Q2(),$2=()=>"Undo",eb=()=>"Rückgängig",tb=(i={},t={})=>(t.locale??q())==="en"?$2():eb(),rb=()=>"Redo",ib=()=>"Wiederholen",nb=(i={},t={})=>(t.locale??q())==="en"?rb():ib(),ob=()=>"Edit Annotation",ab=()=>"Anmerkung bearbeiten",sb=(i={},t={})=>(t.locale??q())==="en"?ob():ab(),lb=()=>"Delete annotation",cb=()=>"Anmerkung löschen",ub=(i={},t={})=>(t.locale??q())==="en"?lb():cb(),hb=()=>"Tag value...",db=()=>"Tag eingeben...",fb=(i={},t={})=>(t.locale??q())==="en"?hb():db(),pb=()=>"https://...",gb=()=>"https://...",vb=(i={},t={})=>(t.locale??q())==="en"?pb():gb(),mb=()=>"Enter text...",_b=()=>"Text eingeben...",wb=(i={},t={})=>(t.locale??q())==="en"?mb():_b(),bb=()=>"Add Content",yb=()=>"Inhalt hinzufügen",xb=(i={},t={})=>(t.locale??q())==="en"?bb():yb(),Tb=()=>"Save Changes",Eb=()=>"Speichern",kb=(i={},t={})=>(t.locale??q())==="en"?Tb():Eb(),Sb=()=>"Delete Annotation?",Cb=()=>"Anmerkung löschen?",Pb=(i={},t={})=>(t.locale??q())==="en"?Sb():Cb(),Ab=()=>"Are you sure you want to delete this annotation? This action cannot be undone.",Rb=()=>"Anmerkung wirklich löschen? Dies kann nicht rückgängig gemacht werden.",Ib=(i={},t={})=>(t.locale??q())==="en"?Ab():Rb(),Mb=()=>"Cancel",Ob=()=>"Abbrechen",Db=(i={},t={})=>(t.locale??q())==="en"?Mb():Ob(),Lb=()=>"Delete",zb=()=>"Löschen",Hb=(i={},t={})=>(t.locale??q())==="en"?Lb():zb(),Nb=()=>"Image Adjustments",Fb=()=>"Bildanpassungen",Bb=(i={},t={})=>(t.locale??q())==="en"?Nb():Fb(),Vb=()=>"Brightness",jb=()=>"Helligkeit",Ub=(i={},t={})=>(t.locale??q())==="en"?Vb():jb(),Gb=()=>"Contrast",Zb=()=>"Kontrast",Wb=(i={},t={})=>(t.locale??q())==="en"?Gb():Zb(),qb=()=>"Saturation",Xb=()=>"Sättigung",Yb=(i={},t={})=>(t.locale??q())==="en"?qb():Xb(),Kb=()=>"Effects",Qb=()=>"Effekte",Jb=(i={},t={})=>(t.locale??q())==="en"?Kb():Qb(),$b=()=>"Invert Colors",ey=()=>"Farben umkehren",ty=(i={},t={})=>(t.locale??q())==="en"?$b():ey(),ry=()=>"Grayscale",iy=()=>"Graustufen",ny=(i={},t={})=>(t.locale??q())==="en"?ry():iy(),oy=()=>"Reset to Default",ay=()=>"Zurücksetzen",sy=(i={},t={})=>(t.locale??q())==="en"?oy():ay(),ly=()=>"Rectangle",cy=()=>"Rechteck",uy=(i={},t={})=>(t.locale??q())==="en"?ly():cy(),hy=()=>"Polygon",dy=()=>"Polygon",fy=(i={},t={})=>(t.locale??q())==="en"?hy():dy(),py=()=>"Point",gy=()=>"Punkt",vy=(i={},t={})=>(t.locale??q())==="en"?py():gy(),Wu=()=>"Viewing Mode",my=Wu,As=(i={},t={})=>(t.locale??q())==="en"?Wu():my(),qu=()=>"Individuals",_y=qu,Xu=(i={},t={})=>(t.locale??q())==="en"?qu():_y(),Yu=()=>"Paged",wy=Yu,Ku=(i={},t={})=>(t.locale??q())==="en"?Yu():wy(),Qu=()=>"Shift Page Pairing",by=Qu,Ju=(i={},t={})=>(t.locale??q())==="en"?Qu():by(),yy=()=>"Show Viewing Mode",xy=()=>"Ansichtsmodus anzeigen",Ty=(i={},t={})=>(t.locale??q())==="en"?yy():xy(),Ey=()=>"Triiiceratops IIIF Viewer Demo",ky=()=>"Triiiceratops IIIF-Viewer-Demo",Sy=(i={},t={})=>(t.locale??q())==="en"?Ey():ky(),Cy=()=>"Viewer Configuration",Py=()=>"Viewer-Konfiguration",Ay=(i={},t={})=>(t.locale??q())==="en"?Cy():Py(),$u=()=>"Paged View Offset",Ry=$u,Iy=(i={},t={})=>(t.locale??q())==="en"?$u():Ry(),My=()=>"Thumbnail Height",Oy=()=>"Thumbnail-Höhe",Dy=(i={},t={})=>(t.locale??q())==="en"?My():Oy(),Ly=()=>"Wechseln Sie in den Zwei-Seiten-Modus",zy=()=>"toggle_two_page_mode",Hy=(i={},t={})=>(t.locale??q())==="en"?zy():Ly(),Ny=()=>"Wechseln Sie in den Einzelseitenmodus",Fy=()=>"toggle_single_page_mode",By=(i={},t={})=>(t.locale??q())==="en"?Fy():Ny(),Vy=()=>"Modus-Umschalter anzeigen",jy=()=>"show_mode_toggle",Uy=(i={},t={})=>(t.locale??q())==="en"?jy():Vy(),Gy=()=>"Zwei-Seiten-Modus",Zy=()=>"two_page_mode",eh=Object.freeze(Object.defineProperty({__proto__:null,annotation_editor_add_content:xb,annotation_editor_cancel:Db,annotation_editor_create_mode:U2,annotation_editor_delete:Hb,annotation_editor_delete_message:Ib,annotation_editor_delete_title:Pb,annotation_editor_delete_tooltip:ub,annotation_editor_edit_mode:B2,annotation_editor_edit_section:sb,annotation_editor_instruction_create:W2,annotation_editor_instruction_edit:Y2,annotation_editor_link_placeholder:vb,annotation_editor_redo:nb,annotation_editor_save:kb,annotation_editor_tag_placeholder:fb,annotation_editor_text_placeholder:wb,annotation_editor_title:H2,annotation_editor_tool_label:J2,annotation_editor_undo:tb,annotation_tool_point:vy,annotation_tool_polygon:fy,annotation_tool_rectangle:uy,annotations_count:Hu,attribution:Ru,change_theme_label:E2,close:ws,close_gallery:w_,close_menu:Ps,close_search:Uu,copied:i2,copy_config:e2,demo_header_active_canvas:s_,demo_header_external_controls:n_,demo_title:Sy,docs:T1,enter_full_screen:Es,error_prefix:Gu,exit_full_screen:Ts,gallery:v_,github:D1,hello_world:sm,hide_all_annotations:Lu,hide_annotations:ks,hide_gallery:ys,iiif_manifest_label:Vu,image_adjustments:u_,image_adjustments_title:Bb,image_filters_brightness:Ub,image_filters_contrast:Wb,image_filters_effects:Jb,image_filters_grayscale:ny,image_filters_invert:ty,image_filters_reset:sy,image_filters_saturation:Yb,language_select_label:d2,license:Iu,load:I1,loading:Au,manifest_placeholder:P1,menu:Om,metadata:Ou,metadata_label_fallback:Pu,next_canvas:Bu,no_annotations_available:v1,no_canvases_loaded:g2,no_content:f1,no_image_found:Zu,open_menu:Cs,plugins_tooltip:t_,previous_canvas:Fu,search:bs,search_panel_close:dm,search_panel_instruction:Su,search_panel_no_results:ku,search_panel_placeholder:Eu,search_panel_results_count:Cu,search_panel_title:_s,settings_category_configuration:Z_,settings_category_general:C_,settings_label:E_,settings_paged_view_offset:Iy,settings_panel_width:D2,settings_position_bottom:Cw,settings_position_floating:Fw,settings_position_left:Ow,settings_position_right:zw,settings_position_top:Rw,settings_select_dock_position:Ew,settings_submenu_annotations:Zw,settings_submenu_gallery:dw,settings_submenu_search:jw,settings_submenu_toolbar:X_,settings_thumbnail_height:Dy,settings_toggle_canvas_nav:F_,settings_toggle_close_button:yw,settings_toggle_draggable:_w,settings_toggle_open:gw,settings_toggle_panel_open:Xw,settings_toggle_show_annotations:iw,settings_toggle_show_fullscreen:aw,settings_toggle_show_gallery:ew,settings_toggle_show_info:cw,settings_toggle_show_search:Q_,settings_toggle_show_toggle:R_,settings_toggle_show_viewing_mode:Ty,settings_toggle_visible_by_default:Qw,settings_toggle_zoom_controls:j_,settings_toolbar_open:O_,settings_toolbar_position:z_,settings_transparent_background:y2,settings_view_configuration:Ay,show_all_annotations:zu,show_annotations:Ss,show_gallery:xs,show_mode_toggle:Uy,theme_menu_title:C2,toggle_annotations:Jm,toggle_metadata:Du,toggle_search:Mu,toggle_single_page_mode:By,toggle_two_page_mode:Hy,try_your_own:_2,two_page_mode:(i={},t={})=>(t.locale??q())==="en"?Zy():Gy(),viewer_variant_core:H1,viewer_variant_custom_theme:U1,viewer_variant_full:B1,viewer_variant_svelte:c2,viewer_variant_svelte_component_tooltip:a2,viewer_variant_tooltip_core:W1,viewer_variant_tooltip_custom_theme:J1,viewer_variant_tooltip_full:Y1,viewing_mode_individuals:Xu,viewing_mode_label:As,viewing_mode_paged:Ku,viewing_mode_shift_pairing:Ju,visible_count:Nu},Symbol.toStringTag,{value:"Module"}));let th=Pe(xt(q()));const Wy=ms;tm((i,t)=>{Wy(i,t),_e(th,q(),!0)});const Zi={get current(){return p(th)}};var qy=ge('<button class="btn btn-circle btn-sm btn-ghost"><!></button>'),Xy=ge('<div class="h-4 w-px bg-base-content/20 mx-1"></div>'),Yy=ge('<div class="h-4 w-px bg-base-content/20 mx-1"></div>'),Ky=ge('<!> <button class="btn btn-circle btn-sm btn-ghost" aria-label="Zoom Out"><!></button> <button class="btn btn-circle btn-sm btn-ghost" aria-label="Zoom In"><!></button> <!>',1),Qy=ge('<span class="text-sm font-mono tabular-nums text-nowrap"> </span> <button class="btn btn-circle btn-sm btn-ghost"><!></button>',1),Jy=ge('<div class="select-none absolute left-1/2 -translate-x-1/2 bg-base-200/90 backdrop-blur rounded-full shadow-lg flex items-center gap-4 z-10 border border-base-300 transition-all duration-200 bottom-4"><!> <!> <!></div>');function $y(i,t){Ke(t,!0);let e=te(()=>t.viewerState.showCanvasNav&&t.viewerState.canvases.length>1);var r=Jy(),n=G(r);{var o=u=>{var h=qy();h.__click=()=>t.viewerState.previousCanvas();var f=G(h);Cv(f,{size:20,weight:"bold"}),j(h),Re(v=>{h.disabled=!t.viewerState.hasPrevious,Ne(h,"aria-label",v)},[()=>Fu()]),x(u,h)};D(n,u=>{p(e)&&u(o)})}var a=se(n,2);{var s=u=>{var h=Ky(),f=W(h);{var v=E=>{var R=Xy();x(E,R)};D(f,E=>{p(e)&&E(v)})}var _=se(f,2);_.__click=()=>t.viewerState.zoomOut();var d=G(_);Qv(d,{size:20,weight:"bold"}),j(_);var g=se(_,2);g.__click=()=>t.viewerState.zoomIn();var b=G(g);Uv(b,{size:20,weight:"bold"}),j(g);var S=se(g,2);{var P=E=>{var R=Yy();x(E,R)};D(S,E=>{p(e)&&E(P)})}x(u,h)};D(a,u=>{t.viewerState.showZoomControls&&u(s)})}var c=se(a,2);{var l=u=>{var h=Qy(),f=W(h),v=G(f);j(f);var _=se(f,2);_.__click=()=>t.viewerState.nextCanvas();var d=G(_);Lv(d,{size:20,weight:"bold"}),j(_),Re(g=>{Xe(v,`${t.viewerState.currentCanvasIndex+1} / ${t.viewerState.canvases.length??""}`),_.disabled=!t.viewerState.hasNext,Ne(_,"aria-label",g)},[()=>Bu()]),x(u,h)};D(c,u=>{p(e)&&u(l)})}j(r),x(i,r),Qe()}Qr(["click"]);var ex=Q('<path d="M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"></path>'),tx=Q('<path d="M208,96l-80,80L48,96Z" opacity="0.2"></path><path d="M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"></path>',1),rx=Q('<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"></path>'),ix=Q('<path d="M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"></path>'),nx=Q('<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path>'),ox=Q('<path d="M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"></path>'),ax=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function sx(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=ax();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=ex();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=tx();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=rx();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=ix();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=nx();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=ox();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var lx=Q('<path d="M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"></path>'),cx=Q('<path d="M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"></path><path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"></path>',1),ux=Q('<path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"></path>'),hx=Q('<path d="M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"></path>'),dx=Q('<path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"></path>'),fx=Q('<path d="M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"></path>'),px=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function rh(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=px();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=lx();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=cx();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=ux();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=hx();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=dx();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=fx();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var gx=Q('<path d="M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"></path>'),vx=Q('<path d="M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"></path><path d="M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"></path>',1),mx=Q('<path d="M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"></path>'),_x=Q('<path d="M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"></path>'),wx=Q('<path d="M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"></path>'),bx=Q('<path d="M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"></path>'),yx=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function ih(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=yx();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=gx();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=vx();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=mx();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=_x();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=wx();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=bx();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var xx=Q('<svg class="fixed inset-0 z-50 pointer-events-none drop-shadow-md text-primary" style="width: 100vw; height: 100vh;"><line stroke="currentColor" stroke-width="2"></line><circle r="3" fill="currentColor"></circle><circle r="3" fill="currentColor"></circle></svg>'),Tx=ge('<span class="text-xs opacity-50 truncate max-w-[150px]"> </span>'),Ex=ge('<span class="badge badge-primary badge-outline badge-sm"> </span>'),kx=ge('<a target="_blank" rel="noopener noreferrer" class="flex items-center gap-1 text-primary hover:underline hover:text-primary-focus p-1 rounded hover:bg-base-200 -ml-1 transition-colors"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" viewBox="0 0 256 256"><path d="M136.37,187.53a12,12,0,0,1,0,17l-5.94,5.94a60,60,0,0,1-84.88-84.88l24.12-24.12A60,60,0,0,1,152.06,99,12,12,0,1,1,135,116a36,36,0,0,0-50.93,1.57L60,141.66a36,36,0,0,0,50.93,50.93l5.94-5.94A12,12,0,0,1,136.37,187.53Zm81.51-149.41a60,60,0,0,0-84.88,0l-5.94,5.94a12,12,0,0,0,17,17l5.94-5.94a36,36,0,0,1,50.93,50.93l-24.11,24.12A36,36,0,0,1,121,140a12,12,0,1,0-17.08,17,60,60,0,0,0,82.39,2.46l24.12-24.12A60,60,0,0,0,217.88,38.12Z"></path></svg> <span class="truncate max-w-[200px]"> </span></a>'),Sx=ge('<div class="flex flex-wrap gap-2 pointer-events-auto"><!></div>'),Cx=ge('<span class="opacity-50 italic text-xs">(No content)</span>'),Px=ge('<div class="w-full text-left p-3 hover:bg-base-300 transition-colors cursor-pointer flex gap-3 group/item items-start focus:outline-none focus:bg-base-300 relative" role="button" tabindex="0"><button class="btn btn-xs btn-circle btn-ghost mt-0.5 shrink-0"><!></button> <div class="flex-1 min-w-0 pointer-events-none"><div class="flex items-start justify-between"><span class="font-bold text-sm text-primary"> </span> <!></div> <div><!> <!></div></div></div>'),Ax=ge('<div class="p-4 text-center opacity-50 text-sm">No annotations available.</div>'),Rx=ge('<div class="absolute top-4 right-4 z-40 pointer-events-auto transition-all duration-300"><details class="group relative"><summary class="flex items-center gap-2 bg-base-200/90 backdrop-blur shadow-lg rounded-full px-4 py-2 cursor-pointer list-none hover:bg-base-200 transition-all select-none border border-base-300 pointer-events-auto"><button class="btn btn-xs btn-circle btn-ghost"><!></button> <span class="text-sm font-medium"> <span class="opacity-50 text-xs font-normal ml-1"> </span></span> <!></summary> <div class="absolute right-0 mt-2 w-96 bg-base-200/95 backdrop-blur shadow-xl rounded-box p-0 max-h-[60vh] overflow-y-auto border border-base-300 flex flex-col divide-y divide-base-300"></div></details></div>'),Ix=ge("<!> <!>",1);function Mx(i,t){Ke(t,!0);const e=Wr(Gi);let r=te(()=>{if(!e.manifestId||!e.canvasId)return[];const b=$r.getAnnotations(e.manifestId,e.canvasId),S=e.currentCanvasSearchAnnotations;return[...b,...S]});function n(b){return b.id||b["@id"]||(typeof b.getId=="function"?b.getId():"")||""}st(()=>{var b;if(p(r).length>0){const S=((b=e.config.annotations)==null?void 0:b.visible)??!0;e.visibleAnnotationIds.clear(),S&&p(r).forEach(P=>{const E=n(P);E&&e.visibleAnnotationIds.add(E)})}else e.visibleAnnotationIds.clear()});let o=te(()=>p(r).length===0?!1:p(r).every(b=>{const S=n(b);return!S||e.visibleAnnotationIds.has(S)}));function a(b){e.visibleAnnotationIds.has(b)?e.visibleAnnotationIds.delete(b):e.visibleAnnotationIds.add(b)}function s(){p(o)?e.visibleAnnotationIds.clear():(e.visibleAnnotationIds.clear(),p(r).forEach(b=>{const S=n(b);S&&e.visibleAnnotationIds.add(S)}))}let c=Pe(null),l=Pe(void 0),u=Pe(null);st(()=>{if(!p(c)){_e(u,null);return}const b=()=>{let P=document;if(p(l)){const F=p(l).getRootNode();(F instanceof Document||F instanceof ShadowRoot)&&(P=F)}const E=P.getElementById(`annotation-list-item-${p(c)}`),R=P.getElementById(`annotation-visual-${p(c)}`);if(E&&R){const F=E.getBoundingClientRect(),Z=R.getBoundingClientRect(),z=F.left,M=F.top+F.height/2,O=Z.left+Z.width/2,$=Z.top+Z.height/2;_e(u,{x1:z,y1:M,x2:O,y2:$},!0)}else _e(u,null)};b();const S=setInterval(b,16);return()=>clearInterval(S)});let h=te(()=>p(r).length?p(r).map(b=>{const S=_u(b);return{id:n(b),bodies:S,label:(typeof b.getLabel=="function"?b.getLabel():b.label)||""}}):[]);var f=Ix(),v=W(f);{var _=b=>{var S=xx(),P=G(S),E=se(P),R=se(E);j(S),Re(()=>{Ne(P,"x1",p(u).x1),Ne(P,"y1",p(u).y1),Ne(P,"x2",p(u).x2),Ne(P,"y2",p(u).y2),Ne(E,"cx",p(u).x1),Ne(E,"cy",p(u).y1),Ne(R,"cx",p(u).x2),Ne(R,"cy",p(u).y2)}),x(b,S)};D(v,b=>{p(u)&&b(_)})}var d=se(v,2);{var g=b=>{var S=Rx(),P=G(S),E=G(P),R=G(E);R.__click=B=>{B.preventDefault(),s()};var F=G(R);{var Z=B=>{rh(B,{size:16,weight:"bold"})},z=B=>{ih(B,{size:16,weight:"bold"})};D(F,B=>{p(o)?B(Z):B(z,!1)})}j(R);var M=se(R,2),O=G(M),$=se(O),ee=G($,!0);j($),j(M);var ie=se(M,2);sx(ie,{size:16,weight:"bold",class:"group-open:rotate-180 transition-transform opacity-80"}),j(E);var L=se(E,2);Ut(L,23,()=>p(h),B=>B.id,(B,X,ae)=>{const oe=te(()=>e.visibleAnnotationIds.has(p(X).id));var N=Px();N.__click=pe=>{pe.preventDefault(),a(p(X).id)};var Y=G(N);Y.__click=pe=>{pe.stopPropagation(),a(p(X).id)};var we=G(Y);{var Se=pe=>{rh(pe,{size:16,weight:"bold"})},ue=pe=>{ih(pe,{size:16,weight:"bold"})};D(we,pe=>{p(oe)?pe(Se):pe(ue,!1)})}j(Y);var V=se(Y,2),A=G(V),U=G(A),le=G(U);j(U);var be=se(U,2);{var ye=pe=>{var Le=Tx(),Ye=G(Le,!0);j(Le),Re(()=>Xe(Ye,p(X).label)),x(pe,Le)};D(be,pe=>{p(X).label&&!p(X).bodies.some(Le=>Le.value===p(X).label)&&pe(ye)})}j(A);var xe=se(A,2),Te=G(xe);Ut(Te,17,()=>p(X).bodies,Ni,(pe,Le,Ye,m)=>{var T=Sx(),H=G(T);{var re=de=>{var ne=Ex(),Me=G(ne,!0);j(ne),Re(()=>Xe(Me,p(Le).value)),x(de,ne)},ce=de=>{var ne=J(),Me=W(ne);{var Ue=Ce=>{var Ie=kx();Ie.__click=k=>k.stopPropagation();var y=se(G(Ie),2),w=G(y,!0);j(y),j(Ie),Re(()=>{Ne(Ie,"href",p(Le).value),Xe(w,p(Le).value)}),x(Ce,Ie)},je=Ce=>{var Ie=J(),y=W(Ie);{var w=C=>{var K=J(),he=W(K);Cr(he,()=>p(Le).value),x(C,K)},k=C=>{var K=pt();Re(()=>Xe(K,p(Le).value||"(No content)")),x(C,K)};D(y,C=>{p(Le).isHtml?C(w):C(k,!1)})}x(Ce,Ie)};D(Me,Ce=>{p(Le).purpose==="linking"?Ce(Ue):Ce(je,!1)},!0)}x(de,ne)};D(H,de=>{p(Le).purpose==="tagging"?de(re):de(ce,!1)})}j(T),x(pe,T)});var Ee=se(Te,2);{var ke=pe=>{var Le=Cx();x(pe,Le)};D(Ee,pe=>{p(X).bodies.length===0&&pe(ke)})}j(xe),j(V),j(N),Re(()=>{Ne(N,"id",`annotation-list-item-${p(X).id??""}`),Xe(le,`#${p(ae)+1}`),Be(xe,1,`text-sm prose prose-sm max-w-none prose-p:my-0 prose-a:text-blue-500 wrap-break-word text-left ${p(oe)?"":"opacity-50"} space-y-2`)}),Ao("mouseenter",N,()=>_e(c,p(X).id,!0)),Ao("mouseleave",N,()=>_e(c,null)),Ao("keypress",N,pe=>{(pe.key==="Enter"||pe.key===" ")&&(pe.preventDefault(),a(p(X).id))}),x(B,N)},B=>{var X=Ax();x(B,X)}),j(L),j(P),j(S),ji(S,B=>_e(l,B),()=>p(l)),Re((B,X,ae)=>{Ne(R,"title",B),Xe(O,`${X??""} `),Xe(ee,ae)},[()=>p(o)?Lu():zu(),()=>Hu({count:p(r).length}),()=>Nu({count:e.visibleAnnotationIds.size})]),x(b,S)};D(d,b=>{e.showAnnotations&&b(g)})}x(i,f),Qe()}Qr(["click"]);var Ox=Q('<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path>'),Dx=Q('<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"></path><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>',1),Lx=Q('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'),zx=Q('<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"></path>'),Hx=Q('<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'),Nx=Q('<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"></path>'),Fx=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function Rs(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=Fx();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=Ox();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=Dx();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=Lx();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=zx();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Hx();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=Nx();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var Bx=ge('<button class="absolute top-1 right-1 btn btn-error btn-xs btn-circle z-20" aria-label="Close Gallery"><!></button>'),Vx=ge('<div><div role="button" tabindex="0" aria-label="Drag Gallery"><div></div></div></div>'),jx=ge('<img loading="lazy" draggable="false"/>'),Ux=ge('<span class="opacity-20 text-4xl">?</span>'),Gx=ge('<img loading="lazy" draggable="false"/>'),Zx=ge('<span class="opacity-20 text-4xl">?</span>'),Wx=ge("<div><!></div>"),qx=ge('<button><div><div><!></div> <!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'),Xx=ge('<img loading="lazy" draggable="false"/>'),Yx=ge('<span class="opacity-20 text-4xl">?</span>'),Kx=ge('<button><div><!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'),Qx=ge('<div class="absolute bottom-0 right-0 w-6 h-6 cursor-se-resize resize-handle bg-accent hover:bg-accent-focus transition-colors z-50" style="clip-path: polygon(100% 0, 0 100%, 100% 100%);" role="button" tabindex="0" aria-label="Resize"></div>'),Jx=ge('<div role="group"><span class="font-bold text-primary opacity-50">Dock Top</span></div> <div role="group"><span class="font-bold text-primary opacity-50">Dock Bottom</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Left</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Right</span></div>',1),$x=ge("<div><!> <!> <div><div><!></div></div> <!></div> <!>",1);function yn(i,t){Ke(t,!0);const e=Wr(Gi);let r=te(()=>{var z;return((z=e.config.gallery)==null?void 0:z.draggable)??!0}),n=te(()=>{var z;return((z=e.config.gallery)==null?void 0:z.showCloseButton)??!0}),o=Pe(!1),a={x:0,y:0,w:0,h:0},s=Pe(null);st(()=>{var z,M,O,$;(z=e.config.gallery)!=null&&z.width&&((M=e.config.gallery)!=null&&M.height)&&(e.gallerySize={width:e.config.gallery.width,height:e.config.gallery.height}),((O=e.config.gallery)==null?void 0:O.x)!==void 0&&(($=e.config.gallery)==null?void 0:$.y)!==void 0&&(e.galleryPosition={x:e.config.gallery.x,y:e.config.gallery.y})});let c=te(()=>!t.canvases||!Array.isArray(t.canvases)?[]:t.canvases.map((z,M)=>{let O="";try{if(z.getThumbnail){const $=z.getThumbnail();$&&(O=typeof $=="string"?$:$.id||$["@id"])}}catch{console.warn("Error getting thumbnail")}if(!O){let $=z.getImages();if((!$||!$.length)&&z.getContent&&($=z.getContent()),$&&$.length>0){const ee=$[0];let ie=ee.getResource?ee.getResource():null;if(!ie&&ee.getBody){const L=ee.getBody();Array.isArray(L)&&L.length>0?ie=L[0]:L&&(ie=L)}if(ie&&!ie.id&&!ie.__jsonld&&(!ie.getServices||ie.getServices().length===0)&&(ie=null),!ie){const L=ee.__jsonld||ee;L.body&&(ie=Array.isArray(L.body)?L.body[0]:L.body)}if(ie){const B=(()=>{let ae=[];if(ie.getServices&&(ae=ie.getServices()),!ae||ae.length===0){const oe=ie.__jsonld||ie;oe.service&&(ae=Array.isArray(oe.service)?oe.service:[oe.service])}return ae})();let X=!1;if(B.length>0){const ae=B[0];let oe="";try{if(oe=ae.getProfile?ae.getProfile():ae.profile||"",typeof oe=="object"&&oe){const we=oe;oe=we.value||we.id||we["@id"]||JSON.stringify(we)}}catch{}const N=String(oe??"").toLowerCase();(N.includes("level0")||N.includes("level-0"))&&(X=!0);const Y=ae.id||ae["@id"];X||(O=`${Y}/full/200,/0/default.jpg`)}if(!O&&(O=ie.id||ie["@id"],!O)){let ae=null;if(ee.__jsonld&&ee.__jsonld.body?ae=ee.__jsonld.body:ee.body&&(ae=ee.body),ae){const oe=Array.isArray(ae)?ae[0]:ae;O=oe.id||oe["@id"]}}}}}return{id:z.id,label:z.getLabel().length?z.getLabel()[0].value:`Canvas ${M+1}`,src:O,index:M}}));function l(z){if(!e.isGalleryDragging)return;let M=z.clientX-e.galleryDragOffset.x,O=z.clientY-e.galleryDragOffset.y;const $=Math.max(0,window.innerWidth-e.gallerySize.width),ee=Math.max(0,window.innerHeight-e.gallerySize.height);M=Math.max(0,Math.min(M,$)),O=Math.max(0,Math.min(O,ee)),e.galleryPosition={x:M,y:O};const ie=e.galleryCenterPanelRect;if(!ie){console.warn("[Gallery] No center panel rect available");return}const L=z.clientX,B=z.clientY,X=60;e.dragOverSide=null,L>=ie.left&&L<=ie.left+X?e.dragOverSide="left":L<=ie.right&&L>=ie.right-X?e.dragOverSide="right":B>=ie.top&&B<=ie.top+X?e.dragOverSide="top":B<=ie.bottom&&B>=ie.bottom-X&&(e.dragOverSide="bottom")}function u(){const z=e.dragOverSide;console.log("[Gallery] stopDrag. dropTarget:",z),e.isGalleryDragging=!1,e.dragOverSide=null,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",u),z&&(e.dockSide=z)}function h(z){z.stopPropagation(),_e(o,!0),a={x:z.clientX,y:z.clientY,w:e.gallerySize.width,h:e.gallerySize.height},window.addEventListener("mousemove",f),window.addEventListener("mouseup",v)}function f(z){if(!p(o))return;const M=z.clientX-a.x,O=z.clientY-a.y;e.gallerySize={width:Math.max(200,a.w+M),height:Math.max(200,a.h+O)}}function v(){_e(o,!1),window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",v)}function _(z){if(e.viewingMode==="paged"){const M=p(c).findIndex($=>$.id===z),O=e.pagedOffset;if(M<O)e.setCanvas(z);else if((M-O)%2===0)e.setCanvas(z);else{const ee=p(c)[M-1];e.setCanvas(ee.id)}}else e.setCanvas(z)}let d=Pe(xt(e.dockSide));st(()=>{const z=e.dockSide;_e(d,z==="none"||z==="top"||z==="bottom"||z==="left"||z==="right"?z:"none",!0)}),st(()=>{e.dockSide!==p(d)&&(e.dockSide=p(d),e.isGalleryDockedBottom=p(d)==="bottom",e.isGalleryDockedRight=p(d)==="right")}),st(()=>{if(!p(s)||!e.canvasId)return;const z=e.canvasId,M=p(s).querySelector(`[data-id="${CSS.escape(z)}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})});let g=te(()=>p(d)==="top"||p(d)==="bottom"||p(d)==="none"&&e.gallerySize.height<320),b=te(()=>e.galleryFixedHeight);function S(z){var ee,ie;if(!p(r)||z.target.closest(".resize-handle"))return;const M=p(d)!=="none";if(M){let L=Math.max(0,z.clientX-150),B=Math.max(0,z.clientY-20);const X=Math.max(0,window.innerWidth-300),ae=Math.max(0,window.innerHeight-400);L=Math.min(L,X),B=Math.min(B,ae),e.galleryPosition={x:L,y:B},e.galleryDragOffset={x:z.clientX-L,y:z.clientY-B}}else e.galleryDragOffset={x:z.clientX-e.galleryPosition.x,y:z.clientY-e.galleryPosition.y};const O=(ee=p(s))==null?void 0:ee.getRootNode(),$=((ie=O==null?void 0:O.getElementById)==null?void 0:ie.call(O,"triiiceratops-center-panel"))??document.getElementById("triiiceratops-center-panel");$?(e.galleryCenterPanelRect=$.getBoundingClientRect(),console.log("[Gallery] Captured center panel rect:",e.galleryCenterPanelRect)):console.warn("[Gallery] Could not find center panel in startDrag"),e.isGalleryDragging=!0,window.addEventListener("mousemove",l),window.addEventListener("mouseup",u),M&&_e(d,"none")}const P=te(()=>{const z=[];if(e.viewingMode==="paged"&&t.canvases){const M=e.pagedOffset;for(let O=0;O<M&&O<t.canvases.length;O++)z.push(O);for(let O=M;O<t.canvases.length;O+=2)z.push(O)}return z}),E=te(()=>{const z=[],M=p(c),O=e.pagedOffset;for(const $ of p(P)){const ee=M[$],ie=$<O?null:M[$+1],L=ee.id,B=ee.label,X=[ee.src];ie&&X.push(ie.src),z.push({id:L,label:B,srcs:X,index:$})}return z});var R=J(),F=W(R);{var Z=z=>{var M=$x(),O=W(M),$=G(O);{var ee=V=>{var A=Bx();A.__click=()=>e.toggleThumbnailGallery();var U=G(A);Rs(U,{size:16,weight:"bold"}),j(A),x(V,A)};D($,V=>{p(n)&&V(ee)})}var ie=se($,2);{var L=V=>{var A=Vx(),U=G(A);U.__mousedown=S;var le=G(U);j(U),j(A),Re(()=>{Be(A,1,"bg-base-100 flex shrink-0 select-none relative "+(p(d)==="bottom"||p(d)==="top"?"flex-row h-full items-center border-r border-base-200":"flex-col w-full border-b border-base-200")),Be(U,1,"cursor-move flex items-center justify-center hover:bg-base-200/50 active:bg-base-200 transition-colors "+(p(d)==="bottom"||p(d)==="top"?"w-8 h-full":"h-6 w-full")),Be(le,1,"bg-base-300 rounded-full "+(p(d)==="bottom"||p(d)==="top"?"w-1.5 h-12":"w-12 h-1.5"))}),x(V,A)};D(ie,V=>{(p(r)||p(d)==="none")&&V(L)})}var B=se(ie,2),X=G(B),ae=G(X);{var oe=V=>{var A=J(),U=W(A);Ut(U,17,()=>p(E),Ni,(le,be)=>{var ye=qx();ye.__click=()=>_(p(be).id);var xe=G(ye),Te=G(xe),Ee=G(Te);{var ke=ce=>{var de=jx();Re(()=>{Ne(de,"src",p(be).srcs[0]),Ne(de,"alt",p(be).label),Be(de,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"} ${p(be).srcs.length>1?"object-right":"object-center"}`)}),x(ce,de)},pe=ce=>{var de=Ux();x(ce,de)};D(Ee,ce=>{p(be).srcs[0]?ce(ke):ce(pe,!1)})}j(Te);var Le=se(Te,2);{var Ye=ce=>{var de=Wx(),ne=G(de);{var Me=je=>{var Ce=Gx();Re(()=>{Ne(Ce,"src",p(be).srcs[1]),Ne(Ce,"alt",p(be).label),Be(Ce,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"} object-left`)}),x(je,Ce)},Ue=je=>{var Ce=Zx();x(je,Ce)};D(ne,je=>{p(be).srcs[1]?je(Me):je(Ue,!1)})}j(de),Re(()=>Be(de,1,`flex items-center justify-center overflow-hidden ${p(g)?"h-full w-auto":"h-full w-1/2"}`)),x(ce,de)};D(Le,ce=>{p(be).srcs.length>1&&ce(Ye)})}j(xe);var m=se(xe,2),T=G(m),H=G(T);j(T);var re=se(T);j(m),j(ye),Re(()=>{Be(ye,1,`group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${p(g)?"w-auto":p(be).srcs.length>1?"col-span-2":""} ${e.canvasId===p(be).id?"ring-2 ring-primary bg-primary/5":""}`),Mt(ye,p(g)?`height: ${p(b)+24}px`:""),Ne(ye,"data-id",p(be).id),Ne(ye,"aria-label",`Select canvas ${p(be).label??""}`),Be(xe,1,`${p(g)?"h-full w-auto flex-row":p(be).srcs.length>1?"aspect-3/2 w-full":"aspect-3/4 w-full"} bg-base-300 rounded overflow-hidden relative flex items-center justify-center gap-px`),Mt(xe,p(g)?`height: ${p(b)}px`:""),Be(Te,1,`flex items-center justify-center overflow-hidden ${p(g)?"h-full w-auto":"h-full "+(p(be).srcs.length>1?"w-1/2":"w-full")}`),Xe(H,`${p(be).index+1}.`),Xe(re,` ${p(be).label??""}`)}),x(le,ye)}),x(V,A)},N=V=>{var A=J(),U=W(A);Ut(U,17,()=>p(c),Ni,(le,be)=>{var ye=Kx();ye.__click=()=>_(p(be).id);var xe=G(ye),Te=G(xe);{var Ee=T=>{var H=Xx();Re(()=>{Ne(H,"src",p(be).src),Ne(H,"alt",p(be).label),Be(H,1,`object-contain ${p(g)?"h-full w-auto":"w-full h-full"}`)}),x(T,H)},ke=T=>{var H=Yx();x(T,H)};D(Te,T=>{p(be).src?T(Ee):T(ke,!1)})}j(xe);var pe=se(xe,2),Le=G(pe),Ye=G(Le);j(Le);var m=se(Le);j(pe),j(ye),Re(()=>{Be(ye,1,`group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${p(g)?"w-auto":""} ${e.canvasId===p(be).id?"ring-2 ring-primary bg-primary/5":""}`),Mt(ye,p(g)?`height: ${p(b)+24}px`:""),Ne(ye,"data-id",p(be).id),Ne(ye,"aria-label",`Select canvas ${p(be).label??""}`),Be(xe,1,`${p(g)?"h-full w-auto":"aspect-3/4 w-full"} bg-base-300 rounded overflow-hidden relative flex items-center justify-center`),Mt(xe,p(g)?`height: ${p(b)}px`:""),Xe(Ye,`${p(be).index+1}.`),Xe(m,` ${p(be).label??""}`)}),x(le,ye)}),x(V,A)};D(ae,V=>{e.viewingMode==="paged"?V(oe):V(N,!1)})}j(X),j(B);var Y=se(B,2);{var we=V=>{var A=Qx();A.__mousedown=h,x(V,A)};D(Y,V=>{p(d)==="none"&&V(we)})}j(O),ji(O,V=>_e(s,V),()=>p(s));var Se=se(O,2);{var ue=V=>{var A=Jx(),U=W(A),le=se(U,2),be=se(le,2),ye=se(be,2);Re(()=>{Be(U,1,`absolute top-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="top"?"bg-primary/20 scale-105":"bg-base-100/50"}`),Be(le,1,`absolute bottom-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="bottom"?"bg-primary/20 scale-105":"bg-base-100/50"}`),Be(be,1,`absolute top-2 bottom-2 left-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-200 ${e.dragOverSide==="left"?"bg-primary/20 scale-105":"bg-base-100/50"}`),Be(ye,1,`absolute top-2 bottom-2 right-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-999 pointer-events-none flex items-center justify-center transition-all duration-300 ${e.dragOverSide==="right"?"bg-primary/20 scale-105":"bg-base-100/50"}`)}),x(V,A)};D(Se,V=>{e.isGalleryDragging&&V(ue)})}Re(()=>{Be(O,1,(p(d)!=="none"?`relative z-50 bg-base-100 shadow-xl border-base-300 flex transition-all duration-200 select-none w-full h-full
|
|
19
19
|
${p(d)==="bottom"||p(d)==="top"?"flex-row border-t":""}
|
|
20
|
-
${p(d)==="left"||p(d)==="right"?"flex-col border-x":""}`:"fixed z-900 bg-base-100 shadow-2xl rounded-lg flex flex-col border border-base-300 overflow-hidden select-none")+(e.isGalleryDragging?" pointer-events-none opacity-80":"")),Mt(M,p(d)!=="none"?"":`left: ${e.galleryPosition.x}px; top: ${e.galleryPosition.y}px; width: ${e.gallerySize.width}px; height: ${e.gallerySize.height}px;`),He(F,1,`flex-1 p-1 bg-base-100 ${p(g)?"overflow-x-auto overflow-y-hidden h-full":"overflow-y-auto overflow-x-hidden"}`),He(X,1,kt(p(g)?"flex flex-row gap-2 h-full items-center":"grid gap-2")),Mt(X,p(g)?"":`grid-template-columns: repeat(auto-fill, minmax(${p(y)}px, 1fr));`)}),x(z,I)};D(B,z=>{e.showThumbnailGallery&&z(q)})}x(i,A),Je()}Qr(["click","mousedown"]);var e8=Q('<path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"></path>'),t8=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>',1),r8=Q('<path d="M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),i8=Q('<path d="M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"></path>'),n8=Q('<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>'),o8=Q('<path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"></path>'),a8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function nh(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=a8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=e8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=t8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=r8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=i8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=n8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=o8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var s8=Q('<path d="M184,44H72A20,20,0,0,0,52,64V192a20,20,0,0,0,20,20H184a20,20,0,0,0,20-20V64A20,20,0,0,0,184,44Zm-4,144H76V68H180ZM244,56V200a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0ZM36,56V200a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0Z"></path>'),l8=Q('<path d="M200,64V192a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H192A8,8,0,0,1,200,64Z" opacity="0.2"></path><path d="M192,48H64A16,16,0,0,0,48,64V192a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64A16,16,0,0,0,192,48Zm0,144H64V64H192V192ZM240,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0ZM32,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0Z"></path>',1),c8=Q('<path d="M208,64V192a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64A16,16,0,0,1,64,48H192A16,16,0,0,1,208,64Zm24-16a8,8,0,0,0-8,8V200a8,8,0,0,0,16,0V56A8,8,0,0,0,232,48ZM24,48a8,8,0,0,0-8,8V200a8,8,0,0,0,16,0V56A8,8,0,0,0,24,48Z"></path>'),u8=Q('<path d="M192,50H64A14,14,0,0,0,50,64V192a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V64A14,14,0,0,0,192,50Zm2,142a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2ZM238,56V200a6,6,0,0,1-12,0V56a6,6,0,0,1,12,0ZM30,56V200a6,6,0,0,1-12,0V56a6,6,0,0,1,12,0Z"></path>'),h8=Q('<path d="M192,48H64A16,16,0,0,0,48,64V192a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64A16,16,0,0,0,192,48Zm0,144H64V64H192V192ZM240,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0ZM32,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0Z"></path>'),d8=Q('<path d="M192,52H64A12,12,0,0,0,52,64V192a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V64A12,12,0,0,0,192,52Zm4,140a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4ZM236,56V200a4,4,0,0,1-8,0V56a4,4,0,0,1,8,0ZM28,56V200a4,4,0,0,1-8,0V56a4,4,0,0,1,8,0Z"></path>'),f8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function p8(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=f8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=s8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=l8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=c8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=u8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=h8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=d8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var g8=Q('<path d="M148,96V48a12,12,0,0,1,24,0V84h36a12,12,0,0,1,0,24H160A12,12,0,0,1,148,96ZM96,148H48a12,12,0,0,0,0,24H84v36a12,12,0,0,0,24,0V160A12,12,0,0,0,96,148Zm112,0H160a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V172h36a12,12,0,0,0,0-24ZM96,36A12,12,0,0,0,84,48V84H48a12,12,0,0,0,0,24H96a12,12,0,0,0,12-12V48A12,12,0,0,0,96,36Z"></path>'),v8=Q('<path d="M208,64V192a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64A16,16,0,0,1,64,48H192A16,16,0,0,1,208,64Z" opacity="0.2"></path><path d="M152,96V48a8,8,0,0,1,16,0V88h40a8,8,0,0,1,0,16H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0,0,16H88v40a8,8,0,0,0,16,0V160A8,8,0,0,0,96,152Zm112,0H160a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V168h40a8,8,0,0,0,0-16ZM96,40a8,8,0,0,0-8,8V88H48a8,8,0,0,0,0,16H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z"></path>',1),m8=Q('<path d="M152,96V48a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,208,104H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0-5.66,13.66l48,48A8,8,0,0,0,104,208V160A8,8,0,0,0,96,152ZM99.06,40.61a8,8,0,0,0-8.72,1.73l-48,48A8,8,0,0,0,48,104H96a8,8,0,0,0,8-8V48A8,8,0,0,0,99.06,40.61ZM208,152H160a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66l48-48A8,8,0,0,0,208,152Z"></path>'),_8=Q('<path d="M154,96V48a6,6,0,0,1,12,0V90h42a6,6,0,0,1,0,12H160A6,6,0,0,1,154,96ZM96,154H48a6,6,0,0,0,0,12H90v42a6,6,0,0,0,12,0V160A6,6,0,0,0,96,154Zm112,0H160a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V166h42a6,6,0,0,0,0-12ZM96,42a6,6,0,0,0-6,6V90H48a6,6,0,0,0,0,12H96a6,6,0,0,0,6-6V48A6,6,0,0,0,96,42Z"></path>'),w8=Q('<path d="M152,96V48a8,8,0,0,1,16,0V88h40a8,8,0,0,1,0,16H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0,0,16H88v40a8,8,0,0,0,16,0V160A8,8,0,0,0,96,152Zm112,0H160a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V168h40a8,8,0,0,0,0-16ZM96,40a8,8,0,0,0-8,8V88H48a8,8,0,0,0,0,16H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z"></path>'),b8=Q('<path d="M156,96V48a4,4,0,0,1,8,0V92h44a4,4,0,0,1,0,8H160A4,4,0,0,1,156,96ZM96,156H48a4,4,0,0,0,0,8H92v44a4,4,0,0,0,8,0V160A4,4,0,0,0,96,156Zm112,0H160a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V164h44a4,4,0,0,0,0-8ZM96,44a4,4,0,0,0-4,4V92H48a4,4,0,0,0,0,8H96a4,4,0,0,0,4-4V48A4,4,0,0,0,96,44Z"></path>'),y8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function x8(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=y8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=g8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=v8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=m8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=_8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=w8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=b8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var T8=Q('<path d="M220,48V88a12,12,0,0,1-24,0V60H168a12,12,0,0,1,0-24h40A12,12,0,0,1,220,48ZM88,196H60V168a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H88a12,12,0,0,0,0-24Zm120-40a12,12,0,0,0-12,12v28H168a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V168A12,12,0,0,0,208,156ZM88,36H48A12,12,0,0,0,36,48V88a12,12,0,0,0,24,0V60H88a12,12,0,0,0,0-24Z"></path>'),E8=Q('<path d="M208,48V208H48V48Z" opacity="0.2"></path><path d="M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"></path>',1),k8=Q('<path d="M93.66,202.34A8,8,0,0,1,88,216H48a8,8,0,0,1-8-8V168a8,8,0,0,1,13.66-5.66ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,88,40ZM211.06,160.61a8,8,0,0,0-8.72,1.73l-40,40A8,8,0,0,0,168,216h40a8,8,0,0,0,8-8V168A8,8,0,0,0,211.06,160.61ZM208,40H168a8,8,0,0,0-5.66,13.66l40,40A8,8,0,0,0,216,88V48A8,8,0,0,0,208,40Z"></path>'),S8=Q('<path d="M214,48V88a6,6,0,0,1-12,0V54H168a6,6,0,0,1,0-12h40A6,6,0,0,1,214,48ZM88,202H54V168a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H88a6,6,0,0,0,0-12Zm120-40a6,6,0,0,0-6,6v34H168a6,6,0,0,0,0,12h40a6,6,0,0,0,6-6V168A6,6,0,0,0,208,162ZM88,42H48a6,6,0,0,0-6,6V88a6,6,0,0,0,12,0V54H88a6,6,0,0,0,0-12Z"></path>'),C8=Q('<path d="M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"></path>'),P8=Q('<path d="M212,48V88a4,4,0,0,1-8,0V52H168a4,4,0,0,1,0-8h40A4,4,0,0,1,212,48ZM88,204H52V168a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H88a4,4,0,0,0,0-8Zm120-40a4,4,0,0,0-4,4v36H168a4,4,0,0,0,0,8h40a4,4,0,0,0,4-4V168A4,4,0,0,0,208,164ZM88,44H48a4,4,0,0,0-4,4V88a4,4,0,0,0,8,0V52H88a4,4,0,0,0,0-8Z"></path>'),A8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function R8(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=A8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=T8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=E8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=k8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=S8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=C8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=P8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var I8=Q('<path d="M84,100A12,12,0,0,1,96,88h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,100Zm12,52h64a12,12,0,0,0,0-24H96a12,12,0,0,0,0,24ZM236,56V184a20,20,0,0,1-20,20H157.89l-12.52,21.92a20,20,0,0,1-34.74,0L98.11,204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V180h61.07a12,12,0,0,1,10.42,6.05L128,207.94l12.51-21.89A12,12,0,0,1,150.93,180H212Z"></path>'),M8=Q('<path d="M224,56V184a8,8,0,0,1-8,8H150.93l-16,28a8,8,0,0,1-13.9,0l-16-28H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"></path><path d="M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"></path>',1),O8=Q('<path d="M216,40H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16h60.43l13.68,23.94a16,16,0,0,0,27.78,0L155.57,200H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM160,144H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"></path>'),D8=Q('<path d="M166,104a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,104Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-74V184a14,14,0,0,1-14,14H154.41L140.16,223a14,14,0,0,1-24.32,0L101.59,198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2h65.07a6,6,0,0,1,5.21,3l16,28a2,2,0,0,0,3.48,0l16-28a6,6,0,0,1,5.21-3H216a2,2,0,0,0,2-2Z"></path>'),L8=Q('<path d="M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"></path>'),z8=Q('<path d="M164,104a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,104Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-76V184a12,12,0,0,1-12,12H153.25L138.42,222a12,12,0,0,1-20.84,0L102.75,196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4h65.07a4,4,0,0,1,3.47,2l16,28a4,4,0,0,0,6.94,0l16-28a4,4,0,0,1,3.47-2H216a4,4,0,0,0,4-4Z"></path>'),H8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function N8(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=H8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=I8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=M8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=O8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=D8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=L8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=z8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var F8=Q('<path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"></path>'),B8=Q('<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"></path>',1),V8=Q('<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"></path>'),j8=Q('<path d="M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"></path>'),U8=Q('<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path>'),G8=Q('<path d="M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"></path>'),Z8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function W8(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=Z8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=F8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=B8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=V8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=j8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=U8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=G8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var q8=Q('<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"></path>'),X8=Q('<path d="M216,64V192H40V64Z" opacity="0.2"></path><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path>',1),Y8=Q('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"></path>'),K8=Q('<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"></path>'),Q8=Q('<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path>'),J8=Q('<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"></path>'),$8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function e6(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=$8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=q8();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=X8();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=Y8();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=K8();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=Q8();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=J8();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var t6=Q('<path d="M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z"></path>'),r6=Q('<path d="M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z" opacity="0.2"></path><path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"></path>',1),i6=Q('<path d="M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z"></path>'),n6=Q('<path d="M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z"></path>'),o6=Q('<path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"></path>'),a6=Q('<path d="M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z"></path>'),s6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function oh(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=s6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=t6();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=r6();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=i6();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=n6();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=o6();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=a6();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var l6=Q('<path d="M92,92a12,12,0,0,1,12-12h60a12,12,0,0,1,0,24H104A12,12,0,0,1,92,92Zm12,52h60a12,12,0,0,0,0-24H104a12,12,0,0,0,0,24Zm132,48a36,36,0,0,1-36,36H88a36,36,0,0,1-36-36V64a12,12,0,0,0-24,0c0,3.73,3.35,6.51,3.38,6.54l-.18-.14h0A12,12,0,1,1,16.81,89.59h0C15.49,88.62,4,79.55,4,64A36,36,0,0,1,40,28H176a36,36,0,0,1,36,36V164h4a12,12,0,0,1,7.2,2.4C224.51,167.38,236,176.45,236,192ZM92.62,172.2A12,12,0,0,1,104,164h84V64a12,12,0,0,0-12-12H73.94A35.88,35.88,0,0,1,76,64V192a12,12,0,0,0,24,0c0-3.58-3.17-6.38-3.2-6.4A12,12,0,0,1,92.62,172.2ZM212,192a7.69,7.69,0,0,0-1.24-4h-87a30.32,30.32,0,0,1,.26,4,35.84,35.84,0,0,1-2.06,12H200A12,12,0,0,0,212,192Z"></path>'),c6=Q('<path d="M200,176H104s8,6,8,16a24,24,0,0,1-48,0V64A24,24,0,0,0,40,40H176a24,24,0,0,1,24,24Z" opacity="0.2"></path><path d="M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"></path>',1),u6=Q('<path d="M220.8,169.6A8,8,0,0,0,216,168h-8V64a32,32,0,0,0-32-32H40A32,32,0,0,0,8,64C8,77.61,18.05,85.54,19.2,86.4h0A7.89,7.89,0,0,0,24,88a8,8,0,0,0,4.87-14.33h0C28.83,73.62,24,69.74,24,64a16,16,0,0,1,32,0V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32C232,178.39,222,170.46,220.8,169.6ZM104,96h64a8,8,0,0,1,0,16H104a8,8,0,0,1,0-16Zm-8,40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Zm104,72H107.71A31.82,31.82,0,0,0,112,192a26.92,26.92,0,0,0-1.21-8h102a12.58,12.58,0,0,1,3.23,8A16,16,0,0,1,200,208Z"></path>'),h6=Q('<path d="M98,136a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Zm6-26h64a6,6,0,0,0,0-12H104a6,6,0,0,0,0,12Zm126,82a30,30,0,0,1-30,30H88a30,30,0,0,1-30-30V64a18,18,0,0,0-36,0c0,6.76,5.58,11.19,5.64,11.23A6,6,0,1,1,20.4,84.8C20,84.48,10,76.85,10,64A30,30,0,0,1,40,34H176a30,30,0,0,1,30,30V170h10a6,6,0,0,1,3.6,1.2C220,171.52,230,179.15,230,192Zm-124,0c0-6.76-5.59-11.19-5.64-11.23A6,6,0,0,1,104,170h90V64a18,18,0,0,0-18-18H64a29.82,29.82,0,0,1,6,18V192a18,18,0,0,0,36,0Zm112,0a14.94,14.94,0,0,0-4.34-10H115.88A24.83,24.83,0,0,1,118,192a29.87,29.87,0,0,1-6,18h88A18,18,0,0,0,218,192Z"></path>'),d6=Q('<path d="M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"></path>'),f6=Q('<path d="M100,104a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H104A4,4,0,0,1,100,104Zm4,36h64a4,4,0,0,0,0-8H104a4,4,0,0,0,0,8Zm124,52a28,28,0,0,1-28,28H88a28,28,0,0,1-28-28V64a20,20,0,0,0-40,0c0,7.78,6.34,12.75,6.4,12.8a4,4,0,1,1-4.8,6.4C21.21,82.91,12,75.86,12,64A28,28,0,0,1,40,36H176a28,28,0,0,1,28,28V172h12a4,4,0,0,1,2.4.8C218.79,173.09,228,180.14,228,192Zm-120,0c0-7.78-6.34-12.75-6.4-12.8A4,4,0,0,1,104,172h92V64a20,20,0,0,0-20-20H59.57A27.9,27.9,0,0,1,68,64V192a20,20,0,0,0,40,0Zm112,0c0-6-3.74-10.3-5.5-12H112.61A23.31,23.31,0,0,1,116,192a27.94,27.94,0,0,1-8.42,20H200A20,20,0,0,0,220,192Z"></path>'),p6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function ah(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=p6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=l6();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=c6();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=u6();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=h6();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=d6();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=f6();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}var g6=Q('<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"></path>'),v6=Q('<path d="M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z" opacity="0.2"></path><path d="M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"></path>',1),m6=Q('<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"></path>'),_6=Q('<path d="M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"></path>'),w6=Q('<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"></path>'),b6=Q('<path d="M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"></path>'),y6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function sh(i,t){Qe(t,!0);const e=St();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:y,size:S,mirrored:P,...E}=d;return E}var l=y6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=U(l);{var h=d=>{var g=$(),y=Z(g);_t(y,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=ue(u,2);{var v=d=>{var g=g6();x(d,g)},_=d=>{var g=$(),y=Z(g);{var S=E=>{var A=v6();ft(),x(E,A)},P=E=>{var A=$(),B=Z(A);{var q=I=>{var M=m6();x(I,M)},z=I=>{var M=$(),J=Z(M);{var ee=L=>{var F=_6();x(L,F)},ie=L=>{var F=$(),X=Z(F);{var ae=H=>{var Y=w6();x(H,Y)},oe=H=>{var Y=$(),we=Z(Y);{var ke=V=>{var O=b6();x(V,O)},he=V=>{var O=pt();O.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,O)};D(we,V=>{p(n)==="thin"?V(ke):V(he,!1)},!0)}x(H,Y)};D(X,H=>{p(n)==="regular"?H(ae):H(oe,!1)},!0)}x(L,F)};D(J,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(I,M)};D(B,I=>{p(n)==="fill"?I(q):I(z,!1)},!0)}x(E,A)};D(y,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Je()}function tt(i,t){let e=null;function r(){if(e)return;e=document.createElement("div"),e.className="fixed z-[9999] px-2 py-1 text-xs rounded shadow-sm pointer-events-none opacity-0 transition-opacity duration-150 whitespace-nowrap max-w-xs",e.textContent=t.content;const l=document.createElement("div");l.className="bg-base-200 text-base-content",l.style.position="absolute",l.style.visibility="hidden",i.appendChild(l);const u=getComputedStyle(l),h=u.backgroundColor,f=u.color;i.removeChild(l),e.style.backgroundColor=h,e.style.color=f,document.body.appendChild(e),o(),requestAnimationFrame(()=>{e&&(e.style.opacity="1")})}function n(){e&&(e.style.opacity="0",setTimeout(()=>{e&&e.parentNode&&e.remove()},150),e=null)}function o(){if(!e)return;const l=i.getBoundingClientRect(),u=e.getBoundingClientRect(),h=t.position||"top",f=6;let v=0,_=0;switch(h){case"top":v=l.top-u.height-f,_=l.left+(l.width-u.width)/2;break;case"bottom":v=l.bottom+f,_=l.left+(l.width-u.width)/2;break;case"left":v=l.top+(l.height-u.height)/2,_=l.left-u.width-f;break;case"right":v=l.top+(l.height-u.height)/2,_=l.right+f;break}_<0&&(_=0),v<0&&(v=0),_+u.width>window.innerWidth&&(_=window.innerWidth-u.width),v+u.height>window.innerHeight&&(v=window.innerHeight-u.height),e.style.top=`${v}px`,e.style.left=`${_}px`}function a(){r()}function s(){n()}function c(){e&&n()}return i.addEventListener("mouseenter",a),i.addEventListener("mouseleave",s),i.addEventListener("focus",a),i.addEventListener("blur",s),window.addEventListener("scroll",c,!0),{update(l){t=l,e&&(e.textContent=t.content,o())},destroy(){n(),i.removeEventListener("mouseenter",a),i.removeEventListener("mouseleave",s),i.removeEventListener("focus",a),i.removeEventListener("blur",s),window.removeEventListener("scroll",c,!0)}}}var x6=me('<div><button class="btn btn-ghost btn-circle btn-sm"><!></button></div>'),T6=me("<div></div>"),E6=me("<li><button><!></button></li>"),k6=me("<li><button><!></button></li>"),S6=me('<div class="divider my-1"></div> <li><label class="label cursor-pointer py-1 gap-2"><span class="label-text text-sm"> </span> <input type="checkbox" class="checkbox checkbox-sm"/></label></li>',1),C6=me('<li><div tabindex="0" role="button" class="flex items-center justify-center"><!></div> <ul tabindex="-1"><li><button><!> <span class="flex-1"> </span> <!></button></li> <li><button><!> <span class="flex-1"> </span> <!></button></li> <!></ul></li>'),P6=me("<li><button><!></button></li>"),A6=me("<li><button><!></button></li>"),R6=me("<li><button><!></button></li>"),I6=me("<div></div>"),M6=me("<li><button><!></button></li>"),O6=me("<button><!></button>"),D6=me("<div><div><!> <ul><!> <!> <!> <!> <!> <!> <!> <!></ul></div> <!></div>");function L6(i,t){Qe(t,!0);const e=Wr(Gi),r=te(()=>e.toolbarOpen),n=te(()=>e.config.toolbarPosition||"left"),o=te(()=>p(n)==="left"),a=te(()=>p(n)==="top"),s=te(()=>p(a)?"bottom":p(o)?"right":"left"),c=te(()=>e.config.showToggle!==!1),l=te(()=>e.config.toolbar||{}),u=te(()=>p(l).showSearch!==!1),h=te(()=>p(l).showGallery!==!1),f=te(()=>p(l).showFullscreen!==!1),v=te(()=>p(l).showAnnotations!==!1),_=te(()=>p(l).showInfo!==!1),d=te(()=>p(l).showViewingMode!==!1);let g=te(()=>(Zi.current,[...e.pluginMenuButtons].sort((G,se)=>(G.order??100)-(se.order??100))));function y(){e.toggleToolbar()}let S=Pe(!1);st(()=>{if(p(r)){const G=setTimeout(()=>{xe(S,!0)},320);return()=>clearTimeout(G)}else xe(S,!1)});var P=D6(),E=U(P),A=U(E);{var B=G=>{var se=x6(),le=U(se);le.__click=y;var Se=U(le);Rs(Se,{size:20,weight:"bold"}),j(le),Ar(le,(pe,_e)=>tt==null?void 0:tt(pe,_e),()=>({content:Ps(),position:p(s)})),j(se),Re(pe=>{He(se,1,kt(["shrink-0",p(a)&&"h-full flex items-center px-2",!p(a)&&"w-full flex justify-center py-2"])),Ne(le,"aria-label",pe)},[()=>Ps()]),x(G,se)},q=G=>{var se=T6();Re(()=>He(se,1,kt(p(a)?"w-2":"h-2"))),x(G,se)};D(A,G=>{p(c)?G(B):G(q,!1)})}var z=ue(A,2),I=U(z);{var M=G=>{var se=E6(),le=U(se);le.__click=()=>e.toggleSearchPanel();var Se=U(le);nh(Se,{size:24,weight:"bold"}),j(le),Ar(le,(pe,_e)=>tt==null?void 0:tt(pe,_e),()=>({content:bs(),position:p(s)})),j(se),Re(pe=>{He(le,1,kt(["flex items-center justify-center",e.showSearchPanel&&"active"])),Ne(le,"aria-label",pe)},[()=>Mu()]),x(G,se)};D(I,G=>{p(u)&&G(M)})}var J=ue(I,2);{var ee=G=>{var se=k6(),le=U(se);le.__click=()=>e.toggleThumbnailGallery();var Se=U(le);p8(Se,{size:24,weight:"bold"}),j(le),Ar(le,(pe,_e)=>tt==null?void 0:tt(pe,_e),()=>({content:e.showThumbnailGallery?ys():xs(),position:p(s)})),j(se),Re(pe=>{He(le,1,kt(["flex items-center justify-center",e.showThumbnailGallery&&"active"])),Ne(le,"aria-label",pe)},[()=>e.showThumbnailGallery?ys():xs()]),x(G,se)};D(J,G=>{p(h)&&G(ee)})}var ie=ue(J,2);{var L=G=>{var se=C6(),le=U(se),Se=U(le);{var pe=w=>{oh(w,{size:24,weight:"bold"})},_e=w=>{ah(w,{size:24,weight:"bold"})};D(Se,w=>{e.viewingMode==="paged"?w(pe):w(_e,!1)})}j(le),Ar(le,(w,b)=>tt==null?void 0:tt(w,b),()=>({content:As(),position:p(s)}));var Te=ue(le,2),Ee=U(Te),fe=U(Ee);fe.__click=()=>e.setViewingMode("individuals");var De=U(fe);ah(De,{size:16});var Xe=ue(De,2),m=U(Xe,!0);j(Xe);var T=ue(Xe,2);{var N=w=>{sh(w,{size:16,weight:"bold"})};D(T,w=>{e.viewingMode==="individuals"&&w(N)})}j(fe),j(Ee);var re=ue(Ee,2),ce=U(re);ce.__click=()=>e.setViewingMode("paged");var ge=U(ce);oh(ge,{size:16});var ne=ue(ge,2),Me=U(ne,!0);j(ne);var je=ue(ne,2);{var Ve=w=>{sh(w,{size:16,weight:"bold"})};D(je,w=>{e.viewingMode==="paged"&&w(Ve)})}j(ce),j(re);var Ce=ue(re,2);{var Ye=w=>{var b=S6(),k=ue(Z(b),2),C=U(k),K=U(C),de=U(K,!0);j(K);var Ie=ue(K,2);Lo(Ie),Ie.__change=()=>e.togglePagedOffset(),j(C),j(k),Re(Ke=>{qe(de,Ke),kc(Ie,e.pagedOffset===1)},[()=>Ju()]),x(w,b)};D(Ce,w=>{e.viewingMode==="paged"&&w(Ye)})}j(Te),j(se),Re((w,b,k)=>{He(se,1,`dropdown ${p(a)?"dropdown-bottom":p(o)?"dropdown-right":"dropdown-left"}`),Ne(le,"aria-label",w),He(Te,1,`dropdown-content z-50 menu p-2 shadow bg-base-100 rounded-box w-48 border border-base-200 font-normal ${p(a)?"left-1/2 -translate-x-1/2":""}`),He(fe,1,kt(e.viewingMode==="individuals"?"active":"")),qe(m,b),He(ce,1,kt(e.viewingMode==="paged"?"active":"")),qe(Me,k)},[()=>As(),()=>Xu(),()=>Ku()]),x(G,se)};D(ie,G=>{p(d)&&G(L)})}var F=ue(ie,2);{var X=G=>{var se=P6(),le=U(se);le.__click=()=>e.toggleFullScreen();var Se=U(le);{var pe=Te=>{x8(Te,{size:24,weight:"bold"})},_e=Te=>{R8(Te,{size:24,weight:"bold"})};D(Se,Te=>{e.isFullScreen?Te(pe):Te(_e,!1)})}j(le),Ar(le,(Te,Ee)=>tt==null?void 0:tt(Te,Ee),()=>({content:e.isFullScreen?Ts():Es(),position:p(s)})),j(se),Re(Te=>{He(le,1,kt(["flex items-center justify-center",e.isFullScreen&&"active"])),Ne(le,"aria-label",Te)},[()=>e.isFullScreen?Ts():Es()]),x(G,se)};D(F,G=>{p(f)&&G(X)})}var ae=ue(F,2);{var oe=G=>{var se=A6(),le=U(se);le.__click=()=>e.toggleAnnotations();var Se=U(le);N8(Se,{size:24,weight:"bold"}),j(le),Ar(le,(pe,_e)=>tt==null?void 0:tt(pe,_e),()=>({content:e.showAnnotations?ks():Ss(),position:p(s)})),j(se),Re(pe=>{He(le,1,kt(["flex items-center justify-center",e.showAnnotations&&"active"])),Ne(le,"aria-label",pe)},[()=>e.showAnnotations?ks():Ss()]),x(G,se)};D(ae,G=>{p(v)&&G(oe)})}var H=ue(ae,2);{var Y=G=>{var se=R6(),le=U(se);le.__click=()=>e.toggleMetadataDialog();var Se=U(le);W8(Se,{size:24,weight:"bold"}),j(le),Ar(le,(pe,_e)=>tt==null?void 0:tt(pe,_e),()=>({content:Ou(),position:p(s)})),j(se),Re(pe=>{He(le,1,kt(["flex items-center justify-center",e.showMetadataDialog&&"active"])),Ne(le,"aria-label",pe)},[()=>Du()]),x(G,se)};D(H,G=>{p(_)&&G(Y)})}var we=ue(H,2);{var ke=G=>{var se=I6();Re(()=>He(se,1,kt(["divider",p(a)&&"divider-horizontal mx-0",!p(a)&&"my-0"]))),x(G,se)};D(we,G=>{(p(u)||p(h)||p(f)||p(v)||p(_)||p(d))&&p(g).length>0&&G(ke)})}var he=ue(we,2);Ut(he,17,()=>p(g),G=>G.id,(G,se)=>{const le=te(()=>p(se).icon),Se=te(()=>typeof eh[p(se).tooltip]=="function"?eh[p(se).tooltip]():p(se).tooltip);var pe=M6(),_e=U(pe);_e.__click=()=>{p(se).onClick()};var Te=U(_e);Fi(Te,()=>p(le),(Ee,fe)=>{fe(Ee,{size:24,weight:"bold"})}),j(_e),Ar(_e,(Ee,fe)=>tt==null?void 0:tt(Ee,fe),()=>({content:p(Se),position:p(s)})),j(pe),Re(Ee=>{He(_e,1,Ee),Ne(_e,"aria-label",p(Se))},[()=>{var Ee,fe;return kt(["flex items-center justify-center",((fe=(Ee=p(se)).isActive)==null?void 0:fe.call(Ee))&&"active"])}]),x(G,pe)}),j(z),j(E);var V=ue(E,2);{var O=G=>{var se=O6();se.__click=y;var le=U(se);e6(le,{size:20,weight:"bold"}),j(se),Ar(se,(Se,pe)=>tt==null?void 0:tt(Se,pe),()=>({content:Cs(),position:p(s)})),Re(Se=>{He(se,1,kt(["pointer-events-auto btn btn-circle btn-sm shadow-md z-40 transition-opacity duration-300 absolute mt-2","bg-base-200/90 backdrop-blur border border-base-300 hover:bg-base-300 text-base-content",p(r)&&"opacity-0 pointer-events-none",!p(r)&&"opacity-100"])),Mt(se,p(a)?"right: 0.5rem;":p(o)?"left: 0.5rem;":"right: 0.5rem;"),Ne(se,"aria-label",Se)},[()=>Cs()]),x(G,se)};D(V,G=>{p(c)&&G(O)})}j(P),Re(()=>{He(P,1,kt(["absolute z-50 pointer-events-none flex",p(a)&&"top-0 w-full items-end flex-col pt-0 pr-2",!p(a)&&"top-0 h-full items-start pt-4 pb-4",!p(a)&&p(o)&&"left-0 flex-row",!p(a)&&!p(o)&&"right-0 flex-row-reverse"])),He(E,1,kt(["pointer-events-auto bg-base-100/95 backdrop-blur shadow-xl transition-all duration-300 ease-in-out flex",p(a)&&"flex-row-reverse h-12 w-auto max-w-full rounded-b-xl border-x border-b border-base-200 origin-top",!p(a)&&"flex-col h-auto max-h-full border-y border-base-200 w-12",!p(a)&&p(o)&&"rounded-r-xl border-r origin-left",!p(a)&&!p(o)&&"rounded-l-xl border-l origin-right",p(r)&&p(a)&&"opacity-100 translate-y-0",p(r)&&!p(a)&&"w-12 opacity-100 translate-x-0",!p(r)&&p(a)&&"h-0 opacity-0 -translate-y-full",!p(r)&&!p(a)&&"w-0 opacity-0",!p(r)&&!p(a)&&p(o)&&"-translate-x-full",!p(r)&&!p(a)&&!p(o)&&"translate-x-full",p(S)?"overflow-visible":"overflow-hidden"])),He(z,1,kt(["menu menu-md gap-2 flex-nowrap items-center min-h-0",p(a)&&"px-2 py-1 menu-horizontal w-auto flex-row-reverse",p(a)&&!p(S)&&"overflow-x-auto overflow-y-hidden",p(a)&&p(S)&&"overflow-visible",!p(a)&&!p(S)&&"py-2 px-1 flex-1 overflow-y-auto overflow-x-hidden w-12",!p(a)&&p(S)&&"py-2 px-1 flex-1 w-12"]))}),x(i,P),Je()}Qr(["click","change"]);var z6=me('<div class="mb-6 prose"><p><!></p></div>'),H6=me('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><!></dd>',1),N6=me('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>',1),F6=me('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><!></dd>',1),B6=me('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>',1),V6=me('<dialog class="modal"><div class="modal-box w-11/12 max-w-5xl"><form method="dialog"><button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button></form> <h3 class="font-bold text-lg mb-4"> </h3> <div class="py-4 overflow-y-auto max-h-[70vh]"><!> <dl><!> <!> <!> <!></dl></div> <div class="modal-action"><form method="dialog"><button class="btn"> </button></form></div></div> <form method="dialog" class="modal-backdrop"><button> </button></form></dialog>');function j6(i,t){Qe(t,!0);const e=Wr(Gi);let r=te(()=>e.manifest),n=te(()=>{const X=Zi.current;if(!p(r))return[];const ae=p(r).getMetadata();return ae?ae.map(oe=>{let H="",Y="";const we=ke=>{if(typeof ke=="string")return ke;if(Array.isArray(ke)){let he=ke.find(V=>V.locale===X||V.language===X);return he||(he=ke.find(V=>V.locale==="en"||V.language==="en")),he||(he=ke.find(V=>!V.locale&&!V.language)),he||(he=ke[0]),he?he.value:""}return String(ke)};return oe.getLabel?H=we(oe.getLabel()):oe.label&&(H=we(oe.label)),oe.getValue?Y=we(oe.getValue()):oe.value&&(Y=we(oe.value)),{label:H,value:Y}}):[]}),o=te(()=>p(r)?p(r).getDescription():""),a=te(()=>{var X;return p(r)?(X=p(r).getRequiredStatement())==null?void 0:X.getValue():""}),s=te(()=>p(r)?p(r).getLicense():"");var c=V6(),l=U(c),u=U(l),h=U(u);h.__click=()=>e.toggleMetadataDialog(),j(u);var f=ue(u,2),v=U(f,!0);j(f);var _=ue(f,2),d=U(_);{var g=X=>{var ae=z6(),oe=U(ae),H=U(oe);Cr(H,()=>p(o)),j(oe),j(ae),x(X,ae)};D(d,X=>{p(o)&&X(g)})}var y=ue(d,2),S=U(y);{var P=X=>{var ae=H6(),oe=Z(ae),H=U(oe,!0);j(oe);var Y=ue(oe,2),we=U(Y);Cr(we,()=>p(a)),j(Y),Re(ke=>qe(H,ke),[()=>Ru()]),x(X,ae)};D(S,X=>{p(a)&&X(P)})}var E=ue(S,2);{var A=X=>{var ae=N6(),oe=Z(ae),H=U(oe,!0);j(oe);var Y=ue(oe,2),we=U(Y),ke=U(we,!0);j(we),j(Y),Re(he=>{qe(H,he),Ne(we,"href",p(s)),qe(ke,p(s))},[()=>Iu()]),x(X,ae)};D(E,X=>{p(s)&&X(A)})}var B=ue(E,2);Ut(B,17,()=>p(n),Ni,(X,ae)=>{var oe=F6(),H=Z(oe),Y=U(H,!0);j(H);var we=ue(H,2),ke=U(we);Cr(ke,()=>p(ae).value),j(we),Re(()=>qe(Y,p(ae).label)),x(X,oe)});var q=ue(B,2);{var z=X=>{var ae=B6(),oe=Z(ae),H=U(oe,!0);j(oe);var Y=ue(oe,2),we=U(Y),ke=U(we,!0);j(we),j(Y),Re(he=>{qe(H,he),Ne(we,"href",e.manifestId),qe(ke,e.manifestId)},[()=>Vu()]),x(X,ae)};D(q,X=>{e.manifestId&&X(z)})}j(y),j(_);var I=ue(_,2),M=U(I),J=U(M);J.__click=()=>e.toggleMetadataDialog();var ee=U(J,!0);j(J),j(M),j(I),j(l);var ie=ue(l,2),L=U(ie);L.__click=()=>e.toggleMetadataDialog();var F=U(L,!0);j(L),j(ie),j(c),Re((X,ae,oe)=>{c.open=e.showMetadataDialog,qe(v,X),qe(ee,ae),qe(F,oe)},[()=>p(r)?p(r).getLabel().length&&p(r).getLabel()[0]?p(r).getLabel()[0].value:Pu():Au(),()=>ws(),()=>ws()]),x(i,c),Je()}Qr(["click"]);var U6=me('<button class="btn btn-sm btn-circle btn-ghost"><!></button>'),G6=me('<span class="loading loading-spinner loading-xs"></span>'),Z6=me('<div class="flex justify-center p-8"><span class="loading loading-spinner loading-lg text-primary"></span></div>'),W6=me('<div class="text-center opacity-50 p-4"> </div>'),q6=me('<div class="text-center opacity-50 p-4 text-sm"> </div>'),X6=me('<div class="leading-relaxed"><span><!></span> <span class="bg-yellow-200 text-yellow-900 font-bold px-0.5 rounded"><!></span> <span><!></span></div>'),Y6=me('<div class="leading-relaxed"><!></div>'),K6=me('<div class="p-3 text-sm border-b border-base-200 last:border-none hover:bg-base-200/30 transition-colors"><!></div>'),Q6=me('<button><div class="text-sm font-bold opacity-80 bg-base-200/50 flex items-center justify-between py-2 px-3 border-b border-base-200"><span> </span> <span class="badge badge-sm badge-ghost"> </span></div> <div class="p-0"></div></button>'),J6=me('<div class="text-xs font-bold opacity-50 uppercase tracking-wider pb-2"> </div> <!>',1),$6=me('<div role="dialog"><div class="flex items-center justify-between p-4 border-b border-base-300"><h2 class="font-bold text-lg"> </h2> <!></div> <div class="p-4 border-b border-base-300 shrink-0"><div class="relative w-full"><input type="text" class="input input-bordered w-full pr-12"/> <button class="btn btn-primary absolute right-0 top-0 h-full rounded-l-none"><!></button></div></div> <div class="flex-1 overflow-y-auto p-4 space-y-4"><!></div></div>');function lh(i,t){Qe(t,!0);const e=Wr(Gi);let r=Pe(""),n=te(()=>{var v;return((v=e.config.search)==null?void 0:v.showCloseButton)??!0});st(()=>{e.searchQuery!==et(()=>p(r))&&xe(r,e.searchQuery,!0)});function o(){e.search(p(r))}function a(v){v.key==="Enter"&&o()}function s(v){const _=e.canvases[v];_&&e.setCanvas(_.id)}let c=te(()=>{var v;return((v=e.config.search)==null?void 0:v.width)??"320px"}),l=te(()=>{var v;return((v=e.config.search)==null?void 0:v.position)??"right"});var u=$(),h=Z(u);{var f=v=>{var _=$6(),d=U(_),g=U(d),y=U(g,!0);j(g);var S=ue(g,2);{var P=F=>{var X=U6();X.__click=()=>e.toggleSearchPanel();var ae=U(X);Rs(ae,{size:20,weight:"bold"}),j(X),Re(oe=>Ne(X,"aria-label",oe),[()=>Uu()]),x(F,X)};D(S,F=>{p(n)&&F(P)})}j(d);var E=ue(d,2),A=U(E),B=U(A);Lo(B),B.__keydown=a;var q=ue(B,2);q.__click=o;var z=U(q);{var I=F=>{var X=G6();x(F,X)},M=F=>{nh(F,{size:20,weight:"bold"})};D(z,F=>{e.isSearching?F(I):F(M,!1)})}j(q),j(A),j(E);var J=ue(E,2),ee=U(J);{var ie=F=>{var X=Z6();x(F,X)},L=F=>{var X=$(),ae=Z(X);{var oe=Y=>{var we=W6(),ke=U(we,!0);j(we),Re(he=>qe(ke,he),[()=>ku({query:e.searchQuery})]),x(Y,we)},H=Y=>{var we=$(),ke=Z(we);{var he=O=>{var G=q6(),se=U(G,!0);j(G),Re(le=>qe(se,le),[()=>Su()]),x(O,G)},V=O=>{var G=J6(),se=Z(G),le=U(se,!0);j(se);var Se=ue(se,2);Ut(Se,17,()=>e.searchResults,pe=>pe.canvasIndex,(pe,_e)=>{var Te=Q6();Te.__click=()=>s(p(_e).canvasIndex);var Ee=U(Te),fe=U(Ee),De=U(fe,!0);j(fe);var Xe=ue(fe,2),m=U(Xe);j(Xe),j(Ee);var T=ue(Ee,2);Ut(T,21,()=>p(_e).hits.slice(0,1),Ni,(N,re)=>{var ce=K6(),ge=U(ce);{var ne=je=>{var Ve=X6(),Ce=U(Ve),Ye=U(Ce);Cr(Ye,()=>p(re).before),j(Ce);var w=ue(Ce,2),b=U(w);Cr(b,()=>p(re).match),j(w);var k=ue(w,2),C=U(k);Cr(C,()=>p(re).after),j(k),j(Ve),x(je,Ve)},Me=je=>{var Ve=Y6(),Ce=U(Ve);Cr(Ce,()=>p(re).match),j(Ve),x(je,Ve)};D(ge,je=>{p(re).type==="hit"?je(ne):je(Me,!1)})}j(ce),x(N,ce)}),j(T),j(Te),Re(()=>{He(Te,1,`w-full text-left bg-base-100 shadow-sm border border-base-200 rounded-box cursor-pointer hover:shadow-md transition-all block p-0 select-none ${e.currentCanvasIndex===p(_e).canvasIndex?"ring-2 ring-primary bg-primary/5":""}`),qe(De,p(_e).canvasLabel),qe(m,`${p(_e).hits.length??""}
|
|
21
|
-
${p(
|
|
22
|
-
${p(v).error??""}`),[()=>Gu()]),x(
|
|
20
|
+
${p(d)==="left"||p(d)==="right"?"flex-col border-x":""}`:"fixed z-900 bg-base-100 shadow-2xl rounded-lg flex flex-col border border-base-300 overflow-hidden select-none")+(e.isGalleryDragging?" pointer-events-none opacity-80":"")),Mt(O,p(d)!=="none"?"":`left: ${e.galleryPosition.x}px; top: ${e.galleryPosition.y}px; width: ${e.gallerySize.width}px; height: ${e.gallerySize.height}px;`),Be(B,1,`flex-1 p-1 bg-base-100 ${p(g)?"overflow-x-auto overflow-y-hidden h-full":"overflow-y-auto overflow-x-hidden"}`),Be(X,1,Rt(p(g)?"flex flex-row gap-2 h-full items-center":"grid gap-2")),Mt(X,p(g)?"":`grid-template-columns: repeat(auto-fill, minmax(${p(b)}px, 1fr));`)}),x(z,M)};D(F,z=>{e.showThumbnailGallery&&z(Z)})}x(i,R),Qe()}Qr(["click","mousedown"]);var e8=Q('<path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"></path>'),t8=Q('<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"></path><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>',1),r8=Q('<path d="M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"></path>'),i8=Q('<path d="M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"></path>'),n8=Q('<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>'),o8=Q('<path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"></path>'),a8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function nh(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=a8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=e8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=t8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=r8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=i8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=n8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=o8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var s8=Q('<path d="M184,44H72A20,20,0,0,0,52,64V192a20,20,0,0,0,20,20H184a20,20,0,0,0,20-20V64A20,20,0,0,0,184,44Zm-4,144H76V68H180ZM244,56V200a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0ZM36,56V200a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0Z"></path>'),l8=Q('<path d="M200,64V192a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H192A8,8,0,0,1,200,64Z" opacity="0.2"></path><path d="M192,48H64A16,16,0,0,0,48,64V192a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64A16,16,0,0,0,192,48Zm0,144H64V64H192V192ZM240,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0ZM32,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0Z"></path>',1),c8=Q('<path d="M208,64V192a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64A16,16,0,0,1,64,48H192A16,16,0,0,1,208,64Zm24-16a8,8,0,0,0-8,8V200a8,8,0,0,0,16,0V56A8,8,0,0,0,232,48ZM24,48a8,8,0,0,0-8,8V200a8,8,0,0,0,16,0V56A8,8,0,0,0,24,48Z"></path>'),u8=Q('<path d="M192,50H64A14,14,0,0,0,50,64V192a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V64A14,14,0,0,0,192,50Zm2,142a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2ZM238,56V200a6,6,0,0,1-12,0V56a6,6,0,0,1,12,0ZM30,56V200a6,6,0,0,1-12,0V56a6,6,0,0,1,12,0Z"></path>'),h8=Q('<path d="M192,48H64A16,16,0,0,0,48,64V192a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64A16,16,0,0,0,192,48Zm0,144H64V64H192V192ZM240,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0ZM32,56V200a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0Z"></path>'),d8=Q('<path d="M192,52H64A12,12,0,0,0,52,64V192a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V64A12,12,0,0,0,192,52Zm4,140a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4ZM236,56V200a4,4,0,0,1-8,0V56a4,4,0,0,1,8,0ZM28,56V200a4,4,0,0,1-8,0V56a4,4,0,0,1,8,0Z"></path>'),f8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function p8(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=f8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=s8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=l8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=c8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=u8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=h8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=d8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var g8=Q('<path d="M148,96V48a12,12,0,0,1,24,0V84h36a12,12,0,0,1,0,24H160A12,12,0,0,1,148,96ZM96,148H48a12,12,0,0,0,0,24H84v36a12,12,0,0,0,24,0V160A12,12,0,0,0,96,148Zm112,0H160a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V172h36a12,12,0,0,0,0-24ZM96,36A12,12,0,0,0,84,48V84H48a12,12,0,0,0,0,24H96a12,12,0,0,0,12-12V48A12,12,0,0,0,96,36Z"></path>'),v8=Q('<path d="M208,64V192a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64A16,16,0,0,1,64,48H192A16,16,0,0,1,208,64Z" opacity="0.2"></path><path d="M152,96V48a8,8,0,0,1,16,0V88h40a8,8,0,0,1,0,16H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0,0,16H88v40a8,8,0,0,0,16,0V160A8,8,0,0,0,96,152Zm112,0H160a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V168h40a8,8,0,0,0,0-16ZM96,40a8,8,0,0,0-8,8V88H48a8,8,0,0,0,0,16H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z"></path>',1),m8=Q('<path d="M152,96V48a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,208,104H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0-5.66,13.66l48,48A8,8,0,0,0,104,208V160A8,8,0,0,0,96,152ZM99.06,40.61a8,8,0,0,0-8.72,1.73l-48,48A8,8,0,0,0,48,104H96a8,8,0,0,0,8-8V48A8,8,0,0,0,99.06,40.61ZM208,152H160a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66l48-48A8,8,0,0,0,208,152Z"></path>'),_8=Q('<path d="M154,96V48a6,6,0,0,1,12,0V90h42a6,6,0,0,1,0,12H160A6,6,0,0,1,154,96ZM96,154H48a6,6,0,0,0,0,12H90v42a6,6,0,0,0,12,0V160A6,6,0,0,0,96,154Zm112,0H160a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V166h42a6,6,0,0,0,0-12ZM96,42a6,6,0,0,0-6,6V90H48a6,6,0,0,0,0,12H96a6,6,0,0,0,6-6V48A6,6,0,0,0,96,42Z"></path>'),w8=Q('<path d="M152,96V48a8,8,0,0,1,16,0V88h40a8,8,0,0,1,0,16H160A8,8,0,0,1,152,96ZM96,152H48a8,8,0,0,0,0,16H88v40a8,8,0,0,0,16,0V160A8,8,0,0,0,96,152Zm112,0H160a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V168h40a8,8,0,0,0,0-16ZM96,40a8,8,0,0,0-8,8V88H48a8,8,0,0,0,0,16H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z"></path>'),b8=Q('<path d="M156,96V48a4,4,0,0,1,8,0V92h44a4,4,0,0,1,0,8H160A4,4,0,0,1,156,96ZM96,156H48a4,4,0,0,0,0,8H92v44a4,4,0,0,0,8,0V160A4,4,0,0,0,96,156Zm112,0H160a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V164h44a4,4,0,0,0,0-8ZM96,44a4,4,0,0,0-4,4V92H48a4,4,0,0,0,0,8H96a4,4,0,0,0,4-4V48A4,4,0,0,0,96,44Z"></path>'),y8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function x8(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=y8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=g8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=v8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=m8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=_8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=w8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=b8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var T8=Q('<path d="M220,48V88a12,12,0,0,1-24,0V60H168a12,12,0,0,1,0-24h40A12,12,0,0,1,220,48ZM88,196H60V168a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H88a12,12,0,0,0,0-24Zm120-40a12,12,0,0,0-12,12v28H168a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V168A12,12,0,0,0,208,156ZM88,36H48A12,12,0,0,0,36,48V88a12,12,0,0,0,24,0V60H88a12,12,0,0,0,0-24Z"></path>'),E8=Q('<path d="M208,48V208H48V48Z" opacity="0.2"></path><path d="M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"></path>',1),k8=Q('<path d="M93.66,202.34A8,8,0,0,1,88,216H48a8,8,0,0,1-8-8V168a8,8,0,0,1,13.66-5.66ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,88,40ZM211.06,160.61a8,8,0,0,0-8.72,1.73l-40,40A8,8,0,0,0,168,216h40a8,8,0,0,0,8-8V168A8,8,0,0,0,211.06,160.61ZM208,40H168a8,8,0,0,0-5.66,13.66l40,40A8,8,0,0,0,216,88V48A8,8,0,0,0,208,40Z"></path>'),S8=Q('<path d="M214,48V88a6,6,0,0,1-12,0V54H168a6,6,0,0,1,0-12h40A6,6,0,0,1,214,48ZM88,202H54V168a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H88a6,6,0,0,0,0-12Zm120-40a6,6,0,0,0-6,6v34H168a6,6,0,0,0,0,12h40a6,6,0,0,0,6-6V168A6,6,0,0,0,208,162ZM88,42H48a6,6,0,0,0-6,6V88a6,6,0,0,0,12,0V54H88a6,6,0,0,0,0-12Z"></path>'),C8=Q('<path d="M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"></path>'),P8=Q('<path d="M212,48V88a4,4,0,0,1-8,0V52H168a4,4,0,0,1,0-8h40A4,4,0,0,1,212,48ZM88,204H52V168a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H88a4,4,0,0,0,0-8Zm120-40a4,4,0,0,0-4,4v36H168a4,4,0,0,0,0,8h40a4,4,0,0,0,4-4V168A4,4,0,0,0,208,164ZM88,44H48a4,4,0,0,0-4,4V88a4,4,0,0,0,8,0V52H88a4,4,0,0,0,0-8Z"></path>'),A8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function R8(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=A8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=T8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=E8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=k8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=S8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=C8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=P8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var I8=Q('<path d="M84,100A12,12,0,0,1,96,88h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,100Zm12,52h64a12,12,0,0,0,0-24H96a12,12,0,0,0,0,24ZM236,56V184a20,20,0,0,1-20,20H157.89l-12.52,21.92a20,20,0,0,1-34.74,0L98.11,204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V180h61.07a12,12,0,0,1,10.42,6.05L128,207.94l12.51-21.89A12,12,0,0,1,150.93,180H212Z"></path>'),M8=Q('<path d="M224,56V184a8,8,0,0,1-8,8H150.93l-16,28a8,8,0,0,1-13.9,0l-16-28H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"></path><path d="M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"></path>',1),O8=Q('<path d="M216,40H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16h60.43l13.68,23.94a16,16,0,0,0,27.78,0L155.57,200H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM160,144H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"></path>'),D8=Q('<path d="M166,104a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,104Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-74V184a14,14,0,0,1-14,14H154.41L140.16,223a14,14,0,0,1-24.32,0L101.59,198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2h65.07a6,6,0,0,1,5.21,3l16,28a2,2,0,0,0,3.48,0l16-28a6,6,0,0,1,5.21-3H216a2,2,0,0,0,2-2Z"></path>'),L8=Q('<path d="M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"></path>'),z8=Q('<path d="M164,104a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,104Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-76V184a12,12,0,0,1-12,12H153.25L138.42,222a12,12,0,0,1-20.84,0L102.75,196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4h65.07a4,4,0,0,1,3.47,2l16,28a4,4,0,0,0,6.94,0l16-28a4,4,0,0,1,3.47-2H216a4,4,0,0,0,4-4Z"></path>'),H8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function N8(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=H8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=I8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=M8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=O8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=D8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=L8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=z8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var F8=Q('<path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"></path>'),B8=Q('<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"></path>',1),V8=Q('<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"></path>'),j8=Q('<path d="M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"></path>'),U8=Q('<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path>'),G8=Q('<path d="M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"></path>'),Z8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function W8(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=Z8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=F8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=B8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=V8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=j8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=U8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=G8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var q8=Q('<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"></path>'),X8=Q('<path d="M216,64V192H40V64Z" opacity="0.2"></path><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path>',1),Y8=Q('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"></path>'),K8=Q('<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"></path>'),Q8=Q('<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path>'),J8=Q('<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"></path>'),$8=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function e6(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=$8();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=q8();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=X8();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=Y8();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=K8();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=Q8();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=J8();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var t6=Q('<path d="M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z"></path>'),r6=Q('<path d="M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z" opacity="0.2"></path><path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"></path>',1),i6=Q('<path d="M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z"></path>'),n6=Q('<path d="M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z"></path>'),o6=Q('<path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"></path>'),a6=Q('<path d="M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z"></path>'),s6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function oh(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=s6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=t6();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=r6();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=i6();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=n6();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=o6();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=a6();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var l6=Q('<path d="M92,92a12,12,0,0,1,12-12h60a12,12,0,0,1,0,24H104A12,12,0,0,1,92,92Zm12,52h60a12,12,0,0,0,0-24H104a12,12,0,0,0,0,24Zm132,48a36,36,0,0,1-36,36H88a36,36,0,0,1-36-36V64a12,12,0,0,0-24,0c0,3.73,3.35,6.51,3.38,6.54l-.18-.14h0A12,12,0,1,1,16.81,89.59h0C15.49,88.62,4,79.55,4,64A36,36,0,0,1,40,28H176a36,36,0,0,1,36,36V164h4a12,12,0,0,1,7.2,2.4C224.51,167.38,236,176.45,236,192ZM92.62,172.2A12,12,0,0,1,104,164h84V64a12,12,0,0,0-12-12H73.94A35.88,35.88,0,0,1,76,64V192a12,12,0,0,0,24,0c0-3.58-3.17-6.38-3.2-6.4A12,12,0,0,1,92.62,172.2ZM212,192a7.69,7.69,0,0,0-1.24-4h-87a30.32,30.32,0,0,1,.26,4,35.84,35.84,0,0,1-2.06,12H200A12,12,0,0,0,212,192Z"></path>'),c6=Q('<path d="M200,176H104s8,6,8,16a24,24,0,0,1-48,0V64A24,24,0,0,0,40,40H176a24,24,0,0,1,24,24Z" opacity="0.2"></path><path d="M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"></path>',1),u6=Q('<path d="M220.8,169.6A8,8,0,0,0,216,168h-8V64a32,32,0,0,0-32-32H40A32,32,0,0,0,8,64C8,77.61,18.05,85.54,19.2,86.4h0A7.89,7.89,0,0,0,24,88a8,8,0,0,0,4.87-14.33h0C28.83,73.62,24,69.74,24,64a16,16,0,0,1,32,0V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32C232,178.39,222,170.46,220.8,169.6ZM104,96h64a8,8,0,0,1,0,16H104a8,8,0,0,1,0-16Zm-8,40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Zm104,72H107.71A31.82,31.82,0,0,0,112,192a26.92,26.92,0,0,0-1.21-8h102a12.58,12.58,0,0,1,3.23,8A16,16,0,0,1,200,208Z"></path>'),h6=Q('<path d="M98,136a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Zm6-26h64a6,6,0,0,0,0-12H104a6,6,0,0,0,0,12Zm126,82a30,30,0,0,1-30,30H88a30,30,0,0,1-30-30V64a18,18,0,0,0-36,0c0,6.76,5.58,11.19,5.64,11.23A6,6,0,1,1,20.4,84.8C20,84.48,10,76.85,10,64A30,30,0,0,1,40,34H176a30,30,0,0,1,30,30V170h10a6,6,0,0,1,3.6,1.2C220,171.52,230,179.15,230,192Zm-124,0c0-6.76-5.59-11.19-5.64-11.23A6,6,0,0,1,104,170h90V64a18,18,0,0,0-18-18H64a29.82,29.82,0,0,1,6,18V192a18,18,0,0,0,36,0Zm112,0a14.94,14.94,0,0,0-4.34-10H115.88A24.83,24.83,0,0,1,118,192a29.87,29.87,0,0,1-6,18h88A18,18,0,0,0,218,192Z"></path>'),d6=Q('<path d="M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"></path>'),f6=Q('<path d="M100,104a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H104A4,4,0,0,1,100,104Zm4,36h64a4,4,0,0,0,0-8H104a4,4,0,0,0,0,8Zm124,52a28,28,0,0,1-28,28H88a28,28,0,0,1-28-28V64a20,20,0,0,0-40,0c0,7.78,6.34,12.75,6.4,12.8a4,4,0,1,1-4.8,6.4C21.21,82.91,12,75.86,12,64A28,28,0,0,1,40,36H176a28,28,0,0,1,28,28V172h12a4,4,0,0,1,2.4.8C218.79,173.09,228,180.14,228,192Zm-120,0c0-7.78-6.34-12.75-6.4-12.8A4,4,0,0,1,104,172h92V64a20,20,0,0,0-20-20H59.57A27.9,27.9,0,0,1,68,64V192a20,20,0,0,0,40,0Zm112,0c0-6-3.74-10.3-5.5-12H112.61A23.31,23.31,0,0,1,116,192a27.94,27.94,0,0,1-8.42,20H200A20,20,0,0,0,220,192Z"></path>'),p6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function ah(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=p6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=l6();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=c6();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=u6();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=h6();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=d6();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=f6();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}var g6=Q('<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"></path>'),v6=Q('<path d="M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z" opacity="0.2"></path><path d="M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"></path>',1),m6=Q('<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"></path>'),_6=Q('<path d="M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"></path>'),w6=Q('<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"></path>'),b6=Q('<path d="M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"></path>'),y6=Q('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');function sh(i,t){Ke(t,!0);const e=kt();let r=bt(t,["$$slots","$$events","$$legacy","children"]),n=te(()=>t.weight??e.weight??"regular"),o=te(()=>t.color??e.color??"currentColor"),a=te(()=>t.size??e.size??"1em"),s=te(()=>t.mirrored??e.mirrored??!1);function c(d){let{weight:g,color:b,size:S,mirrored:P,...E}=d;return E}var l=y6();wt(l,(d,g)=>({xmlns:"http://www.w3.org/2000/svg",role:"img",width:p(a),height:p(a),fill:p(o),transform:p(s)?"scale(-1, 1)":void 0,viewBox:"0 0 256 256",...d,...g}),[()=>c(e),()=>c(r)]);var u=G(l);{var h=d=>{var g=J(),b=W(g);_t(b,()=>t.children),x(d,g)};D(u,d=>{t.children&&d(h)})}var f=se(u,2);{var v=d=>{var g=g6();x(d,g)},_=d=>{var g=J(),b=W(g);{var S=E=>{var R=v6();ft(),x(E,R)},P=E=>{var R=J(),F=W(R);{var Z=M=>{var O=m6();x(M,O)},z=M=>{var O=J(),$=W(O);{var ee=L=>{var B=_6();x(L,B)},ie=L=>{var B=J(),X=W(B);{var ae=N=>{var Y=w6();x(N,Y)},oe=N=>{var Y=J(),we=W(Y);{var Se=V=>{var A=b6();x(V,A)},ue=V=>{var A=pt();A.nodeValue=(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),""),x(V,A)};D(we,V=>{p(n)==="thin"?V(Se):V(ue,!1)},!0)}x(N,Y)};D(X,N=>{p(n)==="regular"?N(ae):N(oe,!1)},!0)}x(L,B)};D($,L=>{p(n)==="light"?L(ee):L(ie,!1)},!0)}x(M,O)};D(F,M=>{p(n)==="fill"?M(Z):M(z,!1)},!0)}x(E,R)};D(b,E=>{p(n)==="duotone"?E(S):E(P,!1)},!0)}x(d,g)};D(f,d=>{p(n)==="bold"?d(v):d(_,!1)})}j(l),x(i,l),Qe()}function tt(i,t){let e=null;function r(){if(e)return;e=document.createElement("div"),e.className="fixed z-[9999] px-2 py-1 text-xs rounded shadow-sm pointer-events-none opacity-0 transition-opacity duration-150 whitespace-nowrap max-w-xs",e.textContent=t.content;const l=document.createElement("div");l.className="bg-base-200 text-base-content",l.style.position="absolute",l.style.visibility="hidden",i.appendChild(l);const u=getComputedStyle(l),h=u.backgroundColor,f=u.color;i.removeChild(l),e.style.backgroundColor=h,e.style.color=f,document.body.appendChild(e),o(),requestAnimationFrame(()=>{e&&(e.style.opacity="1")})}function n(){e&&(e.style.opacity="0",setTimeout(()=>{e&&e.parentNode&&e.remove()},150),e=null)}function o(){if(!e)return;const l=i.getBoundingClientRect(),u=e.getBoundingClientRect(),h=t.position||"top",f=6;let v=0,_=0;switch(h){case"top":v=l.top-u.height-f,_=l.left+(l.width-u.width)/2;break;case"bottom":v=l.bottom+f,_=l.left+(l.width-u.width)/2;break;case"left":v=l.top+(l.height-u.height)/2,_=l.left-u.width-f;break;case"right":v=l.top+(l.height-u.height)/2,_=l.right+f;break}_<0&&(_=0),v<0&&(v=0),_+u.width>window.innerWidth&&(_=window.innerWidth-u.width),v+u.height>window.innerHeight&&(v=window.innerHeight-u.height),e.style.top=`${v}px`,e.style.left=`${_}px`}function a(){r()}function s(){n()}function c(){e&&n()}return i.addEventListener("mouseenter",a),i.addEventListener("mouseleave",s),i.addEventListener("focus",a),i.addEventListener("blur",s),window.addEventListener("scroll",c,!0),{update(l){t=l,e&&(e.textContent=t.content,o())},destroy(){n(),i.removeEventListener("mouseenter",a),i.removeEventListener("mouseleave",s),i.removeEventListener("focus",a),i.removeEventListener("blur",s),window.removeEventListener("scroll",c,!0)}}}var x6=ge('<div><button class="btn btn-ghost btn-circle btn-sm"><!></button></div>'),T6=ge("<li><button><!></button></li>"),E6=ge("<li><button><!></button></li>"),k6=ge('<div class="divider my-1"></div> <li><label class="label cursor-pointer py-1 gap-2"><span class="label-text text-sm"> </span> <input type="checkbox" class="checkbox checkbox-sm"/></label></li>',1),S6=ge('<li><div tabindex="0" role="button" class="flex items-center justify-center aspect-square rounded-full"><!></div> <ul tabindex="-1"><li><button><!> <span class="flex-1"> </span> <!></button></li> <li><button><!> <span class="flex-1"> </span> <!></button></li> <!></ul></li>'),C6=ge("<li><button><!></button></li>"),P6=ge("<li><button><!></button></li>"),A6=ge("<li><button><!></button></li>"),R6=ge("<div></div>"),I6=ge("<li><button><!></button></li>"),M6=ge("<button><!></button>"),O6=ge("<div><div><!> <ul><!> <!> <!> <!> <!> <!> <!> <!></ul></div> <!></div>");function D6(i,t){Ke(t,!0);const e=Wr(Gi),r=te(()=>e.toolbarOpen),n=te(()=>e.config.toolbarPosition||"left"),o=te(()=>p(n)==="left"),a=te(()=>p(n)==="top"),s=te(()=>p(a)?"bottom":p(o)?"right":"left"),c=te(()=>e.config.showToggle!==!1),l=te(()=>e.config.toolbar||{}),u=te(()=>p(l).showSearch!==!1),h=te(()=>p(l).showGallery!==!1),f=te(()=>p(l).showFullscreen!==!1),v=te(()=>p(l).showAnnotations!==!1),_=te(()=>p(l).showInfo!==!1),d=te(()=>p(l).showViewingMode!==!1);let g=te(()=>(Zi.current,[...e.pluginMenuButtons].sort((A,U)=>(A.order??100)-(U.order??100))));function b(){e.toggleToolbar()}let S=Pe(!1);st(()=>{if(p(r)){const A=setTimeout(()=>{_e(S,!0)},320);return()=>clearTimeout(A)}else _e(S,!1)});var P=O6(),E=G(P),R=G(E);{var F=A=>{var U=x6(),le=G(U);le.__click=b;var be=G(le);Rs(be,{size:20,weight:"bold"}),j(le),Ar(le,(ye,xe)=>tt==null?void 0:tt(ye,xe),()=>({content:Ps(),position:p(s)})),j(U),Re(ye=>{Be(U,1,Rt(["shrink-0",p(a)&&"h-full flex items-center px-2",!p(a)&&"w-full flex justify-center py-2"])),Ne(le,"aria-label",ye)},[()=>Ps()]),x(A,U)};D(R,A=>{p(c)&&A(F)})}var Z=se(R,2),z=G(Z);{var M=A=>{var U=T6(),le=G(U);le.__click=()=>e.toggleSearchPanel();var be=G(le);nh(be,{size:24,weight:"bold"}),j(le),Ar(le,(ye,xe)=>tt==null?void 0:tt(ye,xe),()=>({content:bs(),position:p(s)})),j(U),Re(ye=>{Be(le,1,Rt(["flex items-center justify-center aspect-square rounded-full",e.showSearchPanel&&"active"])),Ne(le,"aria-label",ye)},[()=>Mu()]),x(A,U)};D(z,A=>{p(u)&&A(M)})}var O=se(z,2);{var $=A=>{var U=E6(),le=G(U);le.__click=()=>e.toggleThumbnailGallery();var be=G(le);p8(be,{size:24,weight:"bold"}),j(le),Ar(le,(ye,xe)=>tt==null?void 0:tt(ye,xe),()=>({content:e.showThumbnailGallery?ys():xs(),position:p(s)})),j(U),Re(ye=>{Be(le,1,Rt(["flex items-center justify-center aspect-square rounded-full",e.showThumbnailGallery&&"active"])),Ne(le,"aria-label",ye)},[()=>e.showThumbnailGallery?ys():xs()]),x(A,U)};D(O,A=>{p(h)&&A($)})}var ee=se(O,2);{var ie=A=>{var U=S6(),le=G(U),be=G(le);{var ye=Ie=>{oh(Ie,{size:24,weight:"bold"})},xe=Ie=>{ah(Ie,{size:24,weight:"bold"})};D(be,Ie=>{e.viewingMode==="paged"?Ie(ye):Ie(xe,!1)})}j(le),Ar(le,(Ie,y)=>tt==null?void 0:tt(Ie,y),()=>({content:As(),position:p(s)}));var Te=se(le,2),Ee=G(Te),ke=G(Ee);ke.__click=()=>e.setViewingMode("individuals");var pe=G(ke);ah(pe,{size:16});var Le=se(pe,2),Ye=G(Le,!0);j(Le);var m=se(Le,2);{var T=Ie=>{sh(Ie,{size:16,weight:"bold"})};D(m,Ie=>{e.viewingMode==="individuals"&&Ie(T)})}j(ke),j(Ee);var H=se(Ee,2),re=G(H);re.__click=()=>e.setViewingMode("paged");var ce=G(re);oh(ce,{size:16});var de=se(ce,2),ne=G(de,!0);j(de);var Me=se(de,2);{var Ue=Ie=>{sh(Ie,{size:16,weight:"bold"})};D(Me,Ie=>{e.viewingMode==="paged"&&Ie(Ue)})}j(re),j(H);var je=se(H,2);{var Ce=Ie=>{var y=k6(),w=se(W(y),2),k=G(w),C=G(k),K=G(C,!0);j(C);var he=se(C,2);Lo(he),he.__change=()=>e.togglePagedOffset(),j(k),j(w),Re(Oe=>{Xe(K,Oe),kc(he,e.pagedOffset===1)},[()=>Ju()]),x(Ie,y)};D(je,Ie=>{e.viewingMode==="paged"&&Ie(Ce)})}j(Te),j(U),Re((Ie,y,w)=>{Be(U,1,`dropdown ${p(a)?"dropdown-bottom":p(o)?"dropdown-right":"dropdown-left"}`),Ne(le,"aria-label",Ie),Be(Te,1,`dropdown-content z-50 menu p-2 shadow bg-base-100 rounded-box w-48 border border-base-200 font-normal ${p(a)?"left-1/2 -translate-x-1/2":""}`),Be(ke,1,Rt(e.viewingMode==="individuals"?"active":"")),Xe(Ye,y),Be(re,1,Rt(e.viewingMode==="paged"?"active":"")),Xe(ne,w)},[()=>As(),()=>Xu(),()=>Ku()]),x(A,U)};D(ee,A=>{p(d)&&A(ie)})}var L=se(ee,2);{var B=A=>{var U=C6(),le=G(U);le.__click=()=>e.toggleFullScreen();var be=G(le);{var ye=Te=>{x8(Te,{size:24,weight:"bold"})},xe=Te=>{R8(Te,{size:24,weight:"bold"})};D(be,Te=>{e.isFullScreen?Te(ye):Te(xe,!1)})}j(le),Ar(le,(Te,Ee)=>tt==null?void 0:tt(Te,Ee),()=>({content:e.isFullScreen?Ts():Es(),position:p(s)})),j(U),Re(Te=>{Be(le,1,Rt(["flex items-center justify-center aspect-square rounded-full",e.isFullScreen&&"active"])),Ne(le,"aria-label",Te)},[()=>e.isFullScreen?Ts():Es()]),x(A,U)};D(L,A=>{p(f)&&A(B)})}var X=se(L,2);{var ae=A=>{var U=P6(),le=G(U);le.__click=()=>e.toggleAnnotations();var be=G(le);N8(be,{size:24,weight:"bold"}),j(le),Ar(le,(ye,xe)=>tt==null?void 0:tt(ye,xe),()=>({content:e.showAnnotations?ks():Ss(),position:p(s)})),j(U),Re(ye=>{Be(le,1,Rt(["flex items-center justify-center aspect-square rounded-full",e.showAnnotations&&"active"])),Ne(le,"aria-label",ye)},[()=>e.showAnnotations?ks():Ss()]),x(A,U)};D(X,A=>{p(v)&&A(ae)})}var oe=se(X,2);{var N=A=>{var U=A6(),le=G(U);le.__click=()=>e.toggleMetadataDialog();var be=G(le);W8(be,{size:24,weight:"bold"}),j(le),Ar(le,(ye,xe)=>tt==null?void 0:tt(ye,xe),()=>({content:Ou(),position:p(s)})),j(U),Re(ye=>{Be(le,1,Rt(["flex items-center justify-center aspect-square rounded-full",e.showMetadataDialog&&"active"])),Ne(le,"aria-label",ye)},[()=>Du()]),x(A,U)};D(oe,A=>{p(_)&&A(N)})}var Y=se(oe,2);{var we=A=>{var U=R6();Re(()=>Be(U,1,Rt(["divider",p(a)&&"divider-horizontal mx-0",!p(a)&&"my-0"]))),x(A,U)};D(Y,A=>{(p(u)||p(h)||p(f)||p(v)||p(_)||p(d))&&p(g).length>0&&A(we)})}var Se=se(Y,2);Ut(Se,17,()=>p(g),A=>A.id,(A,U)=>{const le=te(()=>p(U).icon),be=te(()=>typeof eh[p(U).tooltip]=="function"?eh[p(U).tooltip]():p(U).tooltip);var ye=I6(),xe=G(ye);xe.__click=()=>{p(U).onClick()};var Te=G(xe);Fi(Te,()=>p(le),(Ee,ke)=>{ke(Ee,{size:24,weight:"bold"})}),j(xe),Ar(xe,(Ee,ke)=>tt==null?void 0:tt(Ee,ke),()=>({content:p(be),position:p(s)})),j(ye),Re(Ee=>{Be(xe,1,Ee),Ne(xe,"aria-label",p(be))},[()=>{var Ee,ke;return Rt(["flex items-center justify-center aspect-square rounded-full",((ke=(Ee=p(U)).isActive)==null?void 0:ke.call(Ee))&&"active"])}]),x(A,ye)}),j(Z),j(E);var ue=se(E,2);{var V=A=>{var U=M6();U.__click=b;var le=G(U);e6(le,{size:20,weight:"bold"}),j(U),Ar(U,(be,ye)=>tt==null?void 0:tt(be,ye),()=>({content:Cs(),position:p(s)})),Re(be=>{Be(U,1,Rt(["pointer-events-auto btn btn-circle btn-sm shadow-md z-40 transition-opacity duration-300 absolute mt-2","bg-base-200/90 backdrop-blur border border-base-300 hover:bg-base-300 text-base-content",p(r)&&"opacity-0 pointer-events-none",!p(r)&&"opacity-100"])),Mt(U,p(a)?"right: 0.5rem;":p(o)?"left: 0.5rem;":"right: 0.5rem;"),Ne(U,"aria-label",be)},[()=>Cs()]),x(A,U)};D(ue,A=>{p(c)&&A(V)})}j(P),Re(()=>{Be(P,1,Rt(["absolute z-50 pointer-events-none flex",p(a)&&"top-0 w-full items-end flex-col pt-0 pr-2",!p(a)&&"top-0 h-full items-start pt-4 pb-4",!p(a)&&p(o)&&"left-0 flex-row",!p(a)&&!p(o)&&"right-0 flex-row-reverse"])),Be(E,1,Rt(["pointer-events-auto bg-base-100/95 backdrop-blur shadow-xl transition-all duration-300 ease-in-out flex",p(a)&&"flex-row-reverse h-12 w-auto max-w-full rounded-b-xl border-x border-b border-base-200 origin-top",!p(a)&&"flex-col h-auto max-h-full border-y border-base-200 w-12",!p(a)&&p(o)&&"rounded-r-xl border-r origin-left",!p(a)&&!p(o)&&"rounded-l-xl border-l origin-right",p(r)&&p(a)&&"opacity-100 translate-y-0",p(r)&&!p(a)&&"w-12 opacity-100 translate-x-0",!p(r)&&p(a)&&"h-0 opacity-0 -translate-y-full",!p(r)&&!p(a)&&"w-0 opacity-0",!p(r)&&!p(a)&&p(o)&&"-translate-x-full",!p(r)&&!p(a)&&!p(o)&&"translate-x-full",p(S)?"overflow-visible":"overflow-hidden"])),Be(Z,1,Rt(["menu menu-md gap-2 flex-nowrap items-center min-h-0",p(a)&&"px-2 py-1 menu-horizontal w-auto flex-row-reverse",p(a)&&!p(S)&&"overflow-x-auto overflow-y-hidden",p(a)&&p(S)&&"overflow-visible",!p(a)&&!p(S)&&"py-2 px-0 flex-1 overflow-y-auto overflow-x-hidden w-12",!p(a)&&p(S)&&"py-2 px-0 flex-1 w-12"]))}),x(i,P),Qe()}Qr(["click","change"]);var L6=ge('<div class="mb-6 prose"><p><!></p></div>'),z6=ge('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><!></dd>',1),H6=ge('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>',1),N6=ge('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><!></dd>',1),F6=ge('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-4"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>',1),B6=ge('<dialog class="modal"><div class="modal-box w-11/12 max-w-5xl"><form method="dialog"><button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button></form> <h3 class="font-bold text-lg mb-4"> </h3> <div class="py-4 overflow-y-auto max-h-[70vh]"><!> <dl><!> <!> <!> <!></dl></div> <div class="modal-action"><form method="dialog"><button class="btn"> </button></form></div></div> <form method="dialog" class="modal-backdrop"><button> </button></form></dialog>');function V6(i,t){Ke(t,!0);const e=Wr(Gi);let r=te(()=>e.manifest),n=te(()=>{const X=Zi.current;if(!p(r))return[];const ae=p(r).getMetadata();return ae?ae.map(oe=>{let N="",Y="";const we=Se=>{if(typeof Se=="string")return Se;if(Array.isArray(Se)){let ue=Se.find(V=>V.locale===X||V.language===X);return ue||(ue=Se.find(V=>V.locale==="en"||V.language==="en")),ue||(ue=Se.find(V=>!V.locale&&!V.language)),ue||(ue=Se[0]),ue?ue.value:""}return String(Se)};return oe.getLabel?N=we(oe.getLabel()):oe.label&&(N=we(oe.label)),oe.getValue?Y=we(oe.getValue()):oe.value&&(Y=we(oe.value)),{label:N,value:Y}}):[]}),o=te(()=>p(r)?p(r).getDescription():""),a=te(()=>{var X;return p(r)?(X=p(r).getRequiredStatement())==null?void 0:X.getValue():""}),s=te(()=>p(r)?p(r).getLicense():"");var c=B6(),l=G(c),u=G(l),h=G(u);h.__click=()=>e.toggleMetadataDialog(),j(u);var f=se(u,2),v=G(f,!0);j(f);var _=se(f,2),d=G(_);{var g=X=>{var ae=L6(),oe=G(ae),N=G(oe);Cr(N,()=>p(o)),j(oe),j(ae),x(X,ae)};D(d,X=>{p(o)&&X(g)})}var b=se(d,2),S=G(b);{var P=X=>{var ae=z6(),oe=W(ae),N=G(oe,!0);j(oe);var Y=se(oe,2),we=G(Y);Cr(we,()=>p(a)),j(Y),Re(Se=>Xe(N,Se),[()=>Ru()]),x(X,ae)};D(S,X=>{p(a)&&X(P)})}var E=se(S,2);{var R=X=>{var ae=H6(),oe=W(ae),N=G(oe,!0);j(oe);var Y=se(oe,2),we=G(Y),Se=G(we,!0);j(we),j(Y),Re(ue=>{Xe(N,ue),Ne(we,"href",p(s)),Xe(Se,p(s))},[()=>Iu()]),x(X,ae)};D(E,X=>{p(s)&&X(R)})}var F=se(E,2);Ut(F,17,()=>p(n),Ni,(X,ae)=>{var oe=N6(),N=W(oe),Y=G(N,!0);j(N);var we=se(N,2),Se=G(we);Cr(Se,()=>p(ae).value),j(we),Re(()=>Xe(Y,p(ae).label)),x(X,oe)});var Z=se(F,2);{var z=X=>{var ae=F6(),oe=W(ae),N=G(oe,!0);j(oe);var Y=se(oe,2),we=G(Y),Se=G(we,!0);j(we),j(Y),Re(ue=>{Xe(N,ue),Ne(we,"href",e.manifestId),Xe(Se,e.manifestId)},[()=>Vu()]),x(X,ae)};D(Z,X=>{e.manifestId&&X(z)})}j(b),j(_);var M=se(_,2),O=G(M),$=G(O);$.__click=()=>e.toggleMetadataDialog();var ee=G($,!0);j($),j(O),j(M),j(l);var ie=se(l,2),L=G(ie);L.__click=()=>e.toggleMetadataDialog();var B=G(L,!0);j(L),j(ie),j(c),Re((X,ae,oe)=>{c.open=e.showMetadataDialog,Xe(v,X),Xe(ee,ae),Xe(B,oe)},[()=>p(r)?p(r).getLabel().length&&p(r).getLabel()[0]?p(r).getLabel()[0].value:Pu():Au(),()=>ws(),()=>ws()]),x(i,c),Qe()}Qr(["click"]);var j6=ge('<button class="btn btn-sm btn-circle btn-ghost"><!></button>'),U6=ge('<span class="loading loading-spinner loading-xs"></span>'),G6=ge('<div class="flex justify-center p-8"><span class="loading loading-spinner loading-lg text-primary"></span></div>'),Z6=ge('<div class="text-center opacity-50 p-4"> </div>'),W6=ge('<div class="text-center opacity-50 p-4 text-sm"> </div>'),q6=ge('<div class="leading-relaxed"><span><!></span> <span class="bg-yellow-200 text-yellow-900 font-bold px-0.5 rounded"><!></span> <span><!></span></div>'),X6=ge('<div class="leading-relaxed"><!></div>'),Y6=ge('<div class="p-3 text-sm border-b border-base-200 last:border-none hover:bg-base-200/30 transition-colors"><!></div>'),K6=ge('<button><div class="text-sm font-bold opacity-80 bg-base-200/50 flex items-center justify-between py-2 px-3 border-b border-base-200"><span> </span> <span class="badge badge-sm badge-ghost"> </span></div> <div class="p-0"></div></button>'),Q6=ge('<div class="text-xs font-bold opacity-50 uppercase tracking-wider pb-2"> </div> <!>',1),J6=ge('<div role="dialog"><div class="flex items-center justify-between p-4 border-b border-base-300"><h2 class="font-bold text-lg"> </h2> <!></div> <div class="p-4 border-b border-base-300 shrink-0"><div class="relative w-full"><input type="text" class="input input-bordered w-full pr-12"/> <button class="btn btn-primary absolute right-0 top-0 h-full rounded-l-none"><!></button></div></div> <div class="flex-1 overflow-y-auto p-4 space-y-4"><!></div></div>');function lh(i,t){Ke(t,!0);const e=Wr(Gi);let r=Pe(""),n=te(()=>{var v;return((v=e.config.search)==null?void 0:v.showCloseButton)??!0});st(()=>{e.searchQuery!==et(()=>p(r))&&_e(r,e.searchQuery,!0)});function o(){e.search(p(r))}function a(v){v.key==="Enter"&&o()}function s(v){const _=e.canvases[v];_&&e.setCanvas(_.id)}let c=te(()=>{var v;return((v=e.config.search)==null?void 0:v.width)??"320px"}),l=te(()=>{var v;return((v=e.config.search)==null?void 0:v.position)??"right"});var u=J(),h=W(u);{var f=v=>{var _=J6(),d=G(_),g=G(d),b=G(g,!0);j(g);var S=se(g,2);{var P=B=>{var X=j6();X.__click=()=>e.toggleSearchPanel();var ae=G(X);Rs(ae,{size:20,weight:"bold"}),j(X),Re(oe=>Ne(X,"aria-label",oe),[()=>Uu()]),x(B,X)};D(S,B=>{p(n)&&B(P)})}j(d);var E=se(d,2),R=G(E),F=G(R);Lo(F),F.__keydown=a;var Z=se(F,2);Z.__click=o;var z=G(Z);{var M=B=>{var X=U6();x(B,X)},O=B=>{nh(B,{size:20,weight:"bold"})};D(z,B=>{e.isSearching?B(M):B(O,!1)})}j(Z),j(R),j(E);var $=se(E,2),ee=G($);{var ie=B=>{var X=G6();x(B,X)},L=B=>{var X=J(),ae=W(X);{var oe=Y=>{var we=Z6(),Se=G(we,!0);j(we),Re(ue=>Xe(Se,ue),[()=>ku({query:e.searchQuery})]),x(Y,we)},N=Y=>{var we=J(),Se=W(we);{var ue=A=>{var U=W6(),le=G(U,!0);j(U),Re(be=>Xe(le,be),[()=>Su()]),x(A,U)},V=A=>{var U=Q6(),le=W(U),be=G(le,!0);j(le);var ye=se(le,2);Ut(ye,17,()=>e.searchResults,xe=>xe.canvasIndex,(xe,Te)=>{var Ee=K6();Ee.__click=()=>s(p(Te).canvasIndex);var ke=G(Ee),pe=G(ke),Le=G(pe,!0);j(pe);var Ye=se(pe,2),m=G(Ye);j(Ye),j(ke);var T=se(ke,2);Ut(T,21,()=>p(Te).hits.slice(0,1),Ni,(H,re)=>{var ce=Y6(),de=G(ce);{var ne=Ue=>{var je=q6(),Ce=G(je),Ie=G(Ce);Cr(Ie,()=>p(re).before),j(Ce);var y=se(Ce,2),w=G(y);Cr(w,()=>p(re).match),j(y);var k=se(y,2),C=G(k);Cr(C,()=>p(re).after),j(k),j(je),x(Ue,je)},Me=Ue=>{var je=X6(),Ce=G(je);Cr(Ce,()=>p(re).match),j(je),x(Ue,je)};D(de,Ue=>{p(re).type==="hit"?Ue(ne):Ue(Me,!1)})}j(ce),x(H,ce)}),j(T),j(Ee),Re(()=>{Be(Ee,1,`w-full text-left bg-base-100 shadow-sm border border-base-200 rounded-box cursor-pointer hover:shadow-md transition-all block p-0 select-none ${e.currentCanvasIndex===p(Te).canvasIndex?"ring-2 ring-primary bg-primary/5":""}`),Xe(Le,p(Te).canvasLabel),Xe(m,`${p(Te).hits.length??""}
|
|
21
|
+
${p(Te).hits.length===1?"match":"matches"}`)}),x(xe,Ee)}),Re(xe=>Xe(be,xe),[()=>Cu({count:e.searchResults.length})]),x(A,U)};D(Se,A=>{e.searchResults.length===0&&!e.searchQuery?A(ue):A(V,!1)},!0)}x(Y,we)};D(ae,Y=>{e.searchResults.length===0&&e.searchQuery?Y(oe):Y(N,!1)},!0)}x(B,X)};D(ee,B=>{e.isSearching?B(ie):B(L,!1)})}j($),j(_),Re((B,X,ae,oe)=>{Be(_,1,`h-full bg-base-200 shadow-2xl z-100 flex flex-col transition-[width] duration-200 ${e.config.transparentBackground?"":p(l)==="left"?"border-r border-base-300":"border-l border-base-300"}`),Mt(_,`width: ${p(c)??""}`),Ne(_,"aria-label",B),Xe(b,X),Ne(F,"placeholder",ae),Ne(Z,"aria-label",oe)},[()=>_s(),()=>bs(),()=>Eu(),()=>_s()]),Cc(F,()=>p(r),B=>_e(r,B)),x(v,_)};D(h,v=>{e.showSearchPanel&&v(f)})}x(i,u),Qe()}Qr(["click","keydown"]);var $6=ge('<div class="h-full relative pointer-events-auto"><!></div>'),e4=ge('<div class="h-full pointer-events-auto relative"><!></div>'),t4=ge('<div class="h-full relative pointer-events-auto"><!></div>'),r4=ge("<div><!> <!> <!></div>"),i4=ge('<div class="flex-none w-full pointer-events-auto relative z-20"><!></div>'),n4=ge('<div class="w-full h-full flex items-center justify-center"><span class="loading loading-spinner loading-lg text-primary"></span></div>'),o4=ge('<div class="w-full h-full flex items-center justify-center text-error"> </div>'),a4=ge('<div class="w-full h-full flex items-center justify-center text-base-content/50"> </div>'),s4=ge('<div class="absolute inset-0 z-40 pointer-events-none"><!></div>'),l4=ge('<div class="flex-none w-full pointer-events-auto relative z-20"><!></div>'),c4=ge('<div class="relative w-full z-40 pointer-events-auto"><!></div>'),u4=ge('<div class="h-full relative pointer-events-auto"><!></div>'),h4=ge('<div class="h-full pointer-events-auto relative"><!></div>'),d4=ge('<div class="h-full relative pointer-events-auto"><!></div>'),f4=ge("<div><!> <!> <!></div>"),p4=ge('<div id="triiiceratops-viewer"><!> <div id="triiiceratops-center-panel" class="flex-1 relative min-w-0 flex flex-col"><!> <div><!> <!> <!> <!> <!> <!> <!></div> <!> <!></div> <!></div>');function g4(i,t){Ke(t,!0);const e=typeof window<"u";let r=or(t,"plugins",19,()=>[]),n=or(t,"config",19,()=>({})),o=or(t,"viewerState",15),a=Pe(void 0);st(()=>{p(a)&&(av(p(a),t.theme,t.themeConfig),s.setViewerElement(p(a)))});const s=new Vg(null,void 0,[]);o(s),ua(Gi,s),Ra(()=>{s.destroyAllPlugins()}),st(()=>{t.manifestId&&t.manifestId!==s.manifestId&&s.setManifest(t.manifestId)});let c="";st(()=>{t.canvasId&&t.canvasId!==c&&(c=t.canvasId,t.canvasId!==s.canvasId&&s.setCanvas(t.canvasId))});let l="";st(()=>{if(n()){const A=JSON.stringify(n());A!==l&&(l=A,console.log("[Viewer] updateConfig called with new config:",n()),s.updateConfig(n()))}});let u=[];st(()=>{const A=r();return et(()=>{for(const U of u)s.unregisterPlugin(U);u=[];for(const U of A){const le=U.id||`plugin-${Math.random().toString(36).substr(2,9)}`,be={...U,id:le};s.registerPlugin(be),u.push(le)}}),()=>{for(const U of u)s.unregisterPlugin(U);u=[]}}),Ra(()=>{s.destroyAllPlugins()}),st(()=>{if(!e)return;const A=()=>{s.isFullScreen=!!document.fullscreenElement};return document.addEventListener("fullscreenchange",A),()=>{document.removeEventListener("fullscreenchange",A)}});let h=te(()=>{var A;return s.showThumbnailGallery&&s.dockSide==="left"||s.showSearchPanel&&((A=s.config.search)==null?void 0:A.position)==="left"||s.pluginPanels.some(U=>U.position==="left"&&U.isVisible())}),f=te(()=>{var A;return s.showSearchPanel&&((A=s.config.search)==null?void 0:A.position)!=="left"||s.showThumbnailGallery&&s.dockSide==="right"||s.pluginPanels.some(U=>U.position==="right"&&U.isVisible())}),v=te(()=>s.manifestEntry),_=te(()=>s.canvases),d=te(()=>s.currentCanvasIndex);st(()=>{if(s.pendingSearchQuery&&p(v)&&!p(v).isFetching&&!p(v).error&&p(v).manifesto){const A=s.pendingSearchQuery;s.pendingSearchQuery=null,console.log("[Viewer] Manifest loaded, triggering deferred search:",A),s.search(A)}}),st(()=>{var A;p(_)&&p(_).length>0&&!s.canvasId&&!((A=p(v))!=null&&A.isFetching)&&(console.log("[Viewer] Auto-selecting first canvas:",p(_)[0].id),s.setCanvas(p(_)[0].id))});let g=te(()=>{var ye,xe;if(!p(_)||p(d)===-1||!p(_)[p(d)])return(ye=p(v))!=null&&ye.isFetching||console.log("TriiiceratopsViewer: No canvas found"),null;const A=p(_)[p(d)],U=Te=>{var ke;let Ee=((ke=Te.getImages)==null?void 0:ke.call(Te))||[];return(!Ee||!Ee.length)&&Te.getContent&&(Ee=Te.getContent()),Ee||[]};let le=U(A);if(s.viewingMode==="paged"){const Te=s.pagedOffset;if(p(d)>=Te){const Ee=p(d)+1;if(Ee<p(_).length){const ke=p(_)[Ee],pe=U(ke);le=le.concat(pe)}}}return!le||!le.length?(A.__jsonld&&A.__jsonld.items,(xe=p(v))!=null&&xe.isFetching||console.log("TriiiceratopsViewer: No images/content in canvas"),null):le.map(Te=>b(Te))});function b(A){let U=A.getResource?A.getResource():null;if(!U&&A.getBody){const pe=A.getBody();Array.isArray(pe)&&pe.length>0?U=pe[0]:pe&&(U=pe)}const le=(U==null?void 0:U.__jsonld)||U,be=U&&(U.id||U["@id"]||le&&(le.service||le.id||le["@id"]));if(U&&!be&&(U=null),!U){const pe=A.__jsonld||A;pe.body&&(U=Array.isArray(pe.body)?pe.body[0]:pe.body)}if(!U)return null;const ye=pe=>pe.id||pe["@id"];let xe=[];const Te=U.__jsonld||U;if(Te.service&&(xe=Array.isArray(Te.service)?Te.service:[Te.service]),!xe.length&&U.getServices&&(xe=U.getServices()),xe.length>0){const pe=/^https?:\/\/iiif\.io\/api\/image\//,Le=m=>typeof m=="string"?pe.test(m)||m==="level0"||m==="level1"||m==="level2":Array.isArray(m)?m.some(T=>typeof T=="string"&&Le(T)):!1,Ye=xe.find(m=>{const T=m.getType?m.getType():m.type||m["@type"]||"",H=m.getProfile?m.getProfile():m.profile||"";return T==="ImageService1"||T==="ImageService2"||T==="ImageService3"||Le(H)});if(Ye){let m=ye(Ye);return m&&!m.endsWith("/info.json")&&(m=`${m}/info.json`),m}}const Ee=ye(U);if(Ee&&Ee.includes("/iiif/")){const pe=Ee.split("/"),Le=pe.findIndex(Ye=>Ye==="full"||Ye.match(/^\d+,\d+,\d+,\d+$/));if(Le>0)return`${pe.slice(0,Le).join("/")}/info.json`}return console.log("TriiiceratopsViewer: No service or ID found, returning raw URL"),{type:"image",url:Ee}}var S=p4(),P=G(S);{var E=A=>{var U=r4(),le=G(U);{var be=Ee=>{var ke=$6(),pe=G(ke);lh(pe,{}),j(ke),x(Ee,ke)};D(le,Ee=>{var ke;s.showSearchPanel&&((ke=s.config.search)==null?void 0:ke.position)==="left"&&Ee(be)})}var ye=se(le,2);{var xe=Ee=>{var ke=e4(),pe=G(ke);yn(pe,{get canvases(){return p(_)}}),j(ke),Re(()=>Mt(ke,`width: ${s.galleryFixedHeight+40}px`)),x(Ee,ke)};D(ye,Ee=>{s.showThumbnailGallery&&s.dockSide==="left"&&Ee(xe)})}var Te=se(ye,2);Ut(Te,17,()=>s.pluginPanels,Ee=>Ee.id,(Ee,ke)=>{var pe=J(),Le=W(pe);{var Ye=m=>{var T=t4(),H=G(T);Fi(H,()=>p(ke).component,(re,ce)=>{ce(re,mn(()=>p(ke).props??{},{get locale(){return Zi.current}}))}),j(T),x(m,T)};D(Le,m=>{p(ke).isVisible()&&p(ke).position==="left"&&m(Ye)})}x(Ee,pe)}),j(U),Re(()=>Be(U,1,`flex-none flex flex-row z-20 transition-all ${s.config.transparentBackground?"":"bg-base-200 border-r border-base-300"}`)),x(A,U)};D(P,A=>{p(h)&&A(E)})}var R=se(P,2),F=G(R);{var Z=A=>{var U=i4(),le=G(U);yn(le,{get canvases(){return p(_)}}),j(U),Re(()=>Mt(U,`height: ${s.galleryFixedHeight+50}px`)),x(A,U)};D(F,A=>{s.showThumbnailGallery&&s.dockSide==="top"&&A(Z)})}var z=se(F,2),M=G(z);{var O=A=>{var U=n4();x(A,U)},$=A=>{var U=J(),le=W(U);{var be=xe=>{var Te=o4(),Ee=G(Te);j(Te),Re(ke=>Xe(Ee,`${ke??""}
|
|
22
|
+
${p(v).error??""}`),[()=>Gu()]),x(xe,Te)},ye=xe=>{var Te=J(),Ee=W(Te);{var ke=Le=>{wv(Le,{get tileSources(){return p(g)},get viewerState(){return s}})},pe=Le=>{var Ye=J(),m=W(Ye);{var T=H=>{var re=a4(),ce=G(re,!0);j(re),Re(de=>Xe(ce,de),[()=>Zu()]),x(H,re)};D(m,H=>{p(v)&&!p(v).isFetching&&!p(g)&&H(T)},!0)}x(Le,Ye)};D(Ee,Le=>{p(g)?Le(ke):Le(pe,!1)},!0)}x(xe,Te)};D(le,xe=>{var Te;(Te=p(v))!=null&&Te.error?xe(be):xe(ye,!1)},!0)}x(A,U)};D(M,A=>{var U;(U=p(v))!=null&&U.isFetching?A(O):A($,!1)})}var ee=se(M,2);Mx(ee,{});var ie=se(ee,2);V6(ie,{});var L=se(ie,2);D6(L,{});var B=se(L,2);Ut(B,17,()=>s.pluginPanels,A=>A.id,(A,U)=>{var le=J(),be=W(le);{var ye=xe=>{var Te=s4(),Ee=G(Te);Fi(Ee,()=>p(U).component,(ke,pe)=>{pe(ke,mn(()=>p(U).props??{},{get locale(){return Zi.current}}))}),j(Te),x(xe,Te)};D(be,xe=>{p(U).isVisible()&&p(U).position==="overlay"&&xe(ye)})}x(A,le)});var X=se(B,2);{var ae=A=>{$y(A,{get viewerState(){return s}})};D(X,A=>{(p(_).length>1&&s.showCanvasNav||(s.config.showZoomControls??!0))&&A(ae)})}var oe=se(X,2);{var N=A=>{yn(A,{get canvases(){return p(_)}})};D(oe,A=>{s.showThumbnailGallery&&s.dockSide==="none"&&A(N)})}j(z);var Y=se(z,2);{var we=A=>{var U=l4(),le=G(U);yn(le,{get canvases(){return p(_)}}),j(U),Re(()=>Mt(U,`height: ${s.galleryFixedHeight+50}px`)),x(A,U)};D(Y,A=>{s.showThumbnailGallery&&s.dockSide==="bottom"&&A(we)})}var Se=se(Y,2);Ut(Se,17,()=>s.pluginPanels,A=>A.id,(A,U)=>{var le=J(),be=W(le);{var ye=xe=>{var Te=c4(),Ee=G(Te);Fi(Ee,()=>p(U).component,(ke,pe)=>{pe(ke,mn(()=>p(U).props??{},{get locale(){return Zi.current}}))}),j(Te),x(xe,Te)};D(be,xe=>{p(U).isVisible()&&p(U).position==="bottom"&&xe(ye)})}x(A,le)}),j(R);var ue=se(R,2);{var V=A=>{var U=f4(),le=G(U);{var be=Ee=>{var ke=u4(),pe=G(ke);lh(pe,{}),j(ke),x(Ee,ke)};D(le,Ee=>{var ke;s.showSearchPanel&&((ke=s.config.search)==null?void 0:ke.position)!=="left"&&Ee(be)})}var ye=se(le,2);{var xe=Ee=>{var ke=h4(),pe=G(ke);yn(pe,{get canvases(){return p(_)}}),j(ke),Re(()=>Mt(ke,`width: ${s.galleryFixedHeight+40}px`)),x(Ee,ke)};D(ye,Ee=>{s.showThumbnailGallery&&s.dockSide==="right"&&Ee(xe)})}var Te=se(ye,2);Ut(Te,17,()=>s.pluginPanels,Ee=>Ee.id,(Ee,ke)=>{var pe=J(),Le=W(pe);{var Ye=m=>{var T=d4(),H=G(T);Fi(H,()=>p(ke).component,(re,ce)=>{ce(re,mn(()=>p(ke).props??{},{get locale(){return Zi.current}}))}),j(T),x(m,T)};D(Le,m=>{p(ke).isVisible()&&p(ke).position==="right"&&m(Ye)})}x(Ee,pe)}),j(U),Re(()=>Be(U,1,`flex-none flex flex-row z-20 transition-all ${s.config.transparentBackground?"":"bg-base-100"}`)),x(A,U)};D(ue,A=>{p(f)&&A(V)})}j(S),ji(S,A=>_e(a,A),()=>p(a)),Re(()=>{Be(S,1,`flex w-full h-full relative overflow-hidden ${s.config.transparentBackground?"":"bg-base-100"}`),Be(z,1,`flex-1 relative min-h-0 w-full h-full ${s.config.transparentBackground?"":"bg-base-100"}`)}),x(i,S),Qe()}var v4=ge('<!> <div class="w-full h-full"><!></div>',1);function m4(i,t){Ke(t,!0);let e=or(t,"manifestId",7,""),r=or(t,"canvasId",7,""),n=or(t,"plugins",23,()=>[]),o=or(t,"theme",7,void 0),a=or(t,"themeConfig",7,void 0),s=or(t,"config",7,void 0),c,l=Pe(void 0),u=!1;st(()=>{p(l)&&c&&!u&&(u=!0,p(l).setEventTarget(c))});let h=te(()=>{if(o()){if(tv(o()))return o();console.warn(`Invalid theme "${o()}". Using inherited theme.`)}}),f=te(()=>{if(a()){if(typeof a()=="string"){const P=ov(a());return P||console.warn(`Invalid theme-config JSON: "${a()}". Ignoring.`),P??void 0}return a()}}),v=te(()=>{if(s()){if(typeof s()=="string")try{return JSON.parse(s())}catch{console.warn(`Invalid config JSON: "${s()}". Ignoring.`);return}return s()}});var _={get manifestId(){return e()},set manifestId(P=""){e(P),Ft()},get canvasId(){return r()},set canvasId(P=""){r(P),Ft()},get plugins(){return n()},set plugins(P=[]){n(P),Ft()},get theme(){return o()},set theme(P=void 0){o(P),Ft()},get themeConfig(){return a()},set themeConfig(P=void 0){a(P),Ft()},get config(){return s()},set config(P=void 0){s(P),Ft()}},d=v4(),g=W(d);Cr(g,()=>`<style>${W0}</style>`);var b=se(g,2),S=G(b);return g4(S,{get manifestId(){return e()},get canvasId(){return r()},get plugins(){return n()},get theme(){return p(h)},get themeConfig(){return p(f)},get config(){return p(v)},get viewerState(){return p(l)},set viewerState(P){_e(l,P,!0)}}),j(b),ji(b,P=>c=P,()=>c),x(i,d),Qe(_)}customElements.define("triiiceratops-viewer",zc(m4,{manifestId:{attribute:"manifest-id",reflect:!0,type:"String"},canvasId:{attribute:"canvas-id",reflect:!0,type:"String"},theme:{attribute:"theme",reflect:!0,type:"String"},themeConfig:{attribute:"theme-config",type:"String"},config:{attribute:"config",type:"String"},plugins:{}},[],[],!0)),window.__TriiiceratopsSvelteRuntime={svelte:Xf,internal:G0},window.TriiiceratopsPlugins=window.TriiiceratopsPlugins||{};var Wo={exports:{}},_4=Wo.exports,ch;function w4(){return ch||(ch=1,(function(i){//! openseadragon 5.0.1
|
|
23
23
|
//! Built on 2024-12-09
|
|
24
24
|
//! Git commit: v5.0.1-0-480de92d
|
|
25
25
|
//! http://openseadragon.github.io
|
|
26
26
|
//! License: http://openseadragon.github.io/license/
|
|
27
|
-
function t(e){return new t.Viewer(e)}(function(e){e.version={versionStr:"5.0.1",major:parseInt("5",10),minor:parseInt("0",10),revision:parseInt("1",10)};var r={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},n=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.isFunction=function(a){return e.type(a)==="function"},e.isArray=Array.isArray||function(a){return e.type(a)==="array"},e.isWindow=function(a){return a&&typeof a=="object"&&"setInterval"in a},e.type=function(a){return a==null?String(a):r[n.call(a)]||"object"},e.isPlainObject=function(a){if(!a||t.type(a)!=="object"||a.nodeType||e.isWindow(a)||a.constructor&&!o.call(a,"constructor")&&!o.call(a.constructor.prototype,"isPrototypeOf"))return!1;var s;for(var c in a)s=c;return s===void 0||o.call(a,s)},e.isEmptyObject=function(a){for(var s in a)return!1;return!0},e.freezeObject=function(a){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(s){return s},e.freezeObject(a)},e.supportsCanvas=(function(){var a=document.createElement("canvas");return!!(e.isFunction(a.getContext)&&a.getContext("2d"))})(),e.isCanvasTainted=function(a){var s=!1;try{a.getContext("2d").getImageData(0,0,1,1)}catch{s=!0}return s},e.supportsAddEventListener=(function(){return!!(document.documentElement.addEventListener&&document.addEventListener)})(),e.supportsRemoveEventListener=(function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)})(),e.supportsEventListenerOptions=(function(){var a=0;if(e.supportsAddEventListener)try{var s={get capture(){return a++,!1},get once(){return a++,!1},get passive(){return a++,!1}};window.addEventListener("test",null,s),window.removeEventListener("test",null,s)}catch{a=0}return a>=3})(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var a=document.createElement("canvas").getContext("2d"),s=window.devicePixelRatio||1,c=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1;return Math.max(s,1)/c}else return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(t),(function(e){e.extend=function(){var c,l,u,h,f,v,_=arguments[0]||{},d=arguments.length,g=!1,y=1;for(typeof _=="boolean"&&(g=_,_=arguments[1]||{},y=2),typeof _!="object"&&!t.isFunction(_)&&(_={}),d===y&&(_=this,--y);y<d;y++)if(c=arguments[y],c!==null||c!==void 0)for(l in c){var S=Object.getOwnPropertyDescriptor(c,l);if(S!==void 0){if(S.get||S.set){Object.defineProperty(_,l,S);continue}h=S.value}else{e.console.warn('Could not copy inherited property "'+l+'".');continue}_!==h&&(g&&h&&(t.isPlainObject(h)||(f=t.isArray(h)))?(u=_[l],f?(f=!1,v=u&&t.isArray(u)?u:[]):v=u&&t.isPlainObject(u)?u:{},_[l]=t.extend(g,v,h)):h!==void 0&&(_[l]=h))}return _};var r=function(){if(typeof navigator!="object")return!1;var c=navigator.userAgent;return typeof c!="string"?!1:c.indexOf("iPhone")!==-1||c.indexOf("iPad")!==-1||c.indexOf("iPod")!==-1};e.extend(e,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!1,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerDblClickDrag:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:r(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,maxTilesPerFrame:1,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorElement:null,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,overlayPreserveContentDirection:!0,opacity:1,compositeOperation:null,drawer:["webgl","canvas","html"],drawerOptions:{webgl:{},canvas:{},html:{},custom:{}},preload:!1,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,tileRetryMax:0,tileRetryDelay:2500,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},delegate:function(c,l){return function(){var u=arguments;return u===void 0&&(u=[]),l.apply(c,u)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(c){return e._viewers.get(this.getElement(c))},getElement:function(c){return typeof c=="string"&&(c=document.getElementById(c)),c},getElementPosition:function(c){var l=new e.Point,u,h;for(c=e.getElement(c),u=e.getElementStyle(c).position==="fixed",h=s(c,u);h;)l.x+=c.offsetLeft,l.y+=c.offsetTop,u&&(l=l.plus(e.getPageScroll())),c=h,u=e.getElementStyle(c).position==="fixed",h=s(c,u);return l},getElementOffset:function(c){c=e.getElement(c);var l=c&&c.ownerDocument,u,h,f={top:0,left:0};return l?(u=l.documentElement,typeof c.getBoundingClientRect<"u"&&(f=c.getBoundingClientRect()),h=l===l.window?l:l.nodeType===9?l.defaultView||l.parentWindow:!1,new e.Point(f.left+(h.pageXOffset||u.scrollLeft)-(u.clientLeft||0),f.top+(h.pageYOffset||u.scrollTop)-(u.clientTop||0))):new e.Point},getElementSize:function(c){return c=e.getElement(c),new e.Point(c.clientWidth,c.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(c){return c=e.getElement(c),c.currentStyle}:function(c){return c=e.getElement(c),window.getComputedStyle(c,"")},getCssPropertyWithVendorPrefix:function(c){var l={};return e.getCssPropertyWithVendorPrefix=function(u){if(l[u]!==void 0)return l[u];var h=document.createElement("div").style,f=null;if(h[u]!==void 0)f=u;else for(var v=["Webkit","Moz","MS","O","webkit","moz","ms","o"],_=e.capitalizeFirstLetter(u),d=0;d<v.length;d++){var g=v[d]+_;if(h[g]!==void 0){f=g;break}}return l[u]=f,f},e.getCssPropertyWithVendorPrefix(c)},capitalizeFirstLetter:function(c){return c.charAt(0).toUpperCase()+c.slice(1)},positiveModulo:function(c,l){var u=c%l;return u<0&&(u+=l),u},pointInElement:function(c,l){c=e.getElement(c);var u=e.getElementOffset(c),h=e.getElementSize(c);return l.x>=u.x&&l.x<u.x+h.x&&l.y<u.y+h.y&&l.y>=u.y},getMousePosition:function(c){if(typeof c.pageX=="number")e.getMousePosition=function(l){var u=new e.Point;return u.x=l.pageX,u.y=l.pageY,u};else if(typeof c.clientX=="number")e.getMousePosition=function(l){var u=new e.Point;return u.x=l.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,u.y=l.clientY+document.body.scrollTop+document.documentElement.scrollTop,u};else throw new Error("Unknown event mouse position, no known technique.");return e.getMousePosition(c)},getPageScroll:function(){var c=document.documentElement||{},l=document.body||{};if(typeof window.pageXOffset=="number")e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(l.scrollLeft||l.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else if(c.scrollLeft||c.scrollTop)e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new e.Point(0,0);return e.getPageScroll()},setPageScroll:function(c){if(typeof window.scrollTo<"u")e.setPageScroll=function(h){window.scrollTo(h.x,h.y)};else{var l=e.getPageScroll();if(l.x===c.x&&l.y===c.y)return;document.body.scrollLeft=c.x,document.body.scrollTop=c.y;var u=e.getPageScroll();if(u.x!==l.x&&u.y!==l.y){e.setPageScroll=function(h){document.body.scrollLeft=h.x,document.body.scrollTop=h.y};return}if(document.documentElement.scrollLeft=c.x,document.documentElement.scrollTop=c.y,u=e.getPageScroll(),u.x!==l.x&&u.y!==l.y){e.setPageScroll=function(h){document.documentElement.scrollLeft=h.x,document.documentElement.scrollTop=h.y};return}e.setPageScroll=function(h){}}e.setPageScroll(c)},getWindowSize:function(){var c=document.documentElement||{},l=document.body||{};if(typeof window.innerWidth=="number")e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(c.clientWidth||c.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(l.clientWidth||l.clientHeight)e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return e.getWindowSize()},makeCenteredNode:function(c){c=e.getElement(c);var l=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(l[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(l[1].style,{display:"table-row"}),e.extend(l[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),l[0].appendChild(l[1]),l[1].appendChild(l[2]),l[2].appendChild(c),l[0]},makeNeutralElement:function(c){var l=document.createElement(c),u=l.style;return u.background="transparent none",u.border="none",u.margin="0px",u.padding="0px",u.position="static",l},now:function(){return Date.now?e.now=Date.now:e.now=function(){return new Date().getTime()},e.now()},makeTransparentImage:function(c){var l=e.makeNeutralElement("img");return l.src=c,l},setElementOpacity:function(c,l,u){var h,f;c=e.getElement(c),u&&!e.Browser.alpha&&(l=Math.round(l)),e.Browser.opacity?c.style.opacity=l<1?l:"":l<1?(h=Math.round(100*l),f="alpha(opacity="+h+")",c.style.filter=f):c.style.filter=""},setElementTouchActionNone:function(c){c=e.getElement(c),typeof c.style.touchAction<"u"?c.style.touchAction="none":typeof c.style.msTouchAction<"u"&&(c.style.msTouchAction="none")},setElementPointerEvents:function(c,l){c=e.getElement(c),typeof c.style<"u"&&typeof c.style.pointerEvents<"u"&&(c.style.pointerEvents=l)},setElementPointerEventsNone:function(c){e.setElementPointerEvents(c,"none")},addClass:function(c,l){c=e.getElement(c),c.className?(" "+c.className+" ").indexOf(" "+l+" ")===-1&&(c.className+=" "+l):c.className=l},indexOf:function(c,l,u){return Array.prototype.indexOf?this.indexOf=function(h,f,v){return h.indexOf(f,v)}:this.indexOf=function(h,f,v){var _,d=v||0,g;if(!h)throw new TypeError;if(g=h.length,g===0||d>=g)return-1;for(d<0&&(d=g-Math.abs(d)),_=d;_<g;_++)if(h[_]===f)return _;return-1},this.indexOf(c,l,u)},removeClass:function(c,l){var u,h=[],f;for(c=e.getElement(c),u=c.className.split(/\s+/),f=0;f<u.length;f++)u[f]&&u[f]!==l&&h.push(u[f]);c.className=h.join(" ")},normalizeEventListenerOptions:function(c){var l;return typeof c<"u"?typeof c=="boolean"?l=e.supportsEventListenerOptions?{capture:c}:c:l=e.supportsEventListenerOptions?c:typeof c.capture<"u"?c.capture:!1:l=e.supportsEventListenerOptions?{capture:!1}:!1,l},addEvent:(function(){if(e.supportsAddEventListener)return function(c,l,u,h){h=e.normalizeEventListenerOptions(h),c=e.getElement(c),c.addEventListener(l,u,h)};if(document.documentElement.attachEvent&&document.attachEvent)return function(c,l,u){c=e.getElement(c),c.attachEvent("on"+l,u)};throw new Error("No known event model.")})(),removeEvent:(function(){if(e.supportsRemoveEventListener)return function(c,l,u,h){h=e.normalizeEventListenerOptions(h),c=e.getElement(c),c.removeEventListener(l,u,h)};if(document.documentElement.detachEvent&&document.detachEvent)return function(c,l,u){c=e.getElement(c),c.detachEvent("on"+l,u)};throw new Error("No known event model.")})(),cancelEvent:function(c){c.preventDefault()},eventIsCanceled:function(c){return c.defaultPrevented},stopEvent:function(c){c.stopPropagation()},createCallback:function(c,l){console.error("The createCallback function is deprecated and will be removed in future versions. Please use alternativeFunction instead.");var u=[],h;for(h=2;h<arguments.length;h++)u.push(arguments[h]);return function(){var f=u.concat([]),v;for(v=0;v<arguments.length;v++)f.push(arguments[v]);return l.apply(c,f)}},getUrlParameter:function(c){var l=a[c];return l||null},getUrlProtocol:function(c){var l=c.match(/^([a-z]+:)\/\//i);return l===null?window.location.protocol:l[1].toLowerCase()},createAjaxRequest:function(){if(window.XMLHttpRequest)return e.createAjaxRequest=function(){return new XMLHttpRequest},new XMLHttpRequest;throw new Error("Browser doesn't support XMLHttpRequest.")},makeAjaxRequest:function(c,l,u){var h,f,v,_;e.isPlainObject(c)&&(l=c.success,u=c.error,h=c.withCredentials,f=c.headers,v=c.responseType||null,_=c.postData||null,c=c.url);var d=e.getUrlProtocol(c),g=e.createAjaxRequest();if(!e.isFunction(l))throw new Error("makeAjaxRequest requires a success callback");g.onreadystatechange=function(){g.readyState===4&&(g.onreadystatechange=function(){},g.status>=200&&g.status<300||g.status===0&&d!=="http:"&&d!=="https:"?l(g):e.isFunction(u)?u(g):e.console.error("AJAX request returned %d: %s",g.status,c))};var y=_?"POST":"GET";try{if(g.open(y,c,!0),v&&(g.responseType=v),f)for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&f[S]&&g.setRequestHeader(S,f[S]);h&&(g.withCredentials=!0),g.send(_)}catch(P){e.console.error("%s while making AJAX request: %s",P.name,P.message),g.onreadystatechange=function(){},e.isFunction(u)&&u(g,P)}return g},jsonp:function(c){var l,u=c.url,h=document.head||document.getElementsByTagName("head")[0]||document.documentElement,f=c.callbackName||"openseadragon"+e.now(),v=window[f],_="$1"+f+"$2",d=c.param||"callback",g=c.callback;u=u.replace(/(=)\?(&|$)|\?\?/i,_),u+=(/\?/.test(u)?"&":"?")+d+"="+f,window[f]=function(y){if(v)window[f]=v;else try{delete window[f]}catch{}g&&e.isFunction(g)&&g(y)},l=document.createElement("script"),(c.async!==void 0||c.async!==!1)&&(l.async="async"),c.scriptCharset&&(l.charset=c.scriptCharset),l.src=u,l.onload=l.onreadystatechange=function(y,S){(S||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,h&&l.parentNode&&h.removeChild(l),l=void 0)},h.insertBefore(l,h.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(c){if(window.DOMParser)e.parseXml=function(l){var u=null,h;return h=new DOMParser,u=h.parseFromString(l,"text/xml"),u};else throw new Error("Browser doesn't support XML DOM.");return e.parseXml(c)},parseJSON:function(c){return e.parseJSON=window.JSON.parse,e.parseJSON(c)},imageFormatSupported:function(c){return c=c||"",!!o[c.toLowerCase()]},setImageFormatsSupported:function(c){e.extend(o,c)}});var n=function(c){};e.console=window.console||{log:n,debug:n,info:n,warn:n,error:n,assert:n},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var o={avif:!0,bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1,webp:!0},a={};(function(){var c=navigator.appVersion,l=navigator.userAgent,u;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(l.substring(l.indexOf("MSIE")+5,l.indexOf(";",l.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(l.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(l.substring(l.indexOf("Edge")+5))):l.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(l.substring(l.indexOf("Edg")+4))):l.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(l.substring(l.indexOf("Firefox")+8))):l.indexOf("Safari")>=0?(e.Browser.vendor=l.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(l.substring(l.substring(0,l.indexOf("Safari")).lastIndexOf("/")+1,l.indexOf("Safari")))):(u=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),u.exec(l)!==null&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(c);break}var h=window.location.search.substring(1),f=h.split("&"),v,_,d;for(d=0;d<f.length;d++)if(v=f[d],_=v.indexOf("="),_>0){var g=v.substring(0,_),y=v.substring(_+1);try{a[g]=decodeURIComponent(y)}catch{e.console.error("Ignoring malformed URL parameter: %s=%s",g,y)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.console.error("Internet Explorer is not supported by OpenSeadragon")})(),(function(c){var l=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,u=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame;if(l&&u)e.requestAnimationFrame=function(){return l.apply(c,arguments)},e.cancelAnimationFrame=function(){return u.apply(c,arguments)};else{var h=[],f=[],v=0,_;e.requestAnimationFrame=function(d){return h.push([++v,d]),_||(_=setInterval(function(){if(h.length){var g=e.now(),y=f;for(f=h,h=y;f.length;)f.shift()[1](g)}else clearInterval(_),_=void 0},1e3/50)),v},e.cancelAnimationFrame=function(d){var g,y;for(g=0,y=h.length;g<y;g+=1)if(h[g][0]===d){h.splice(g,1);return}for(g=0,y=f.length;g<y;g+=1)if(f[g][0]===d){f.splice(g,1);return}}}})(window);function s(c,l){return l&&c!==document.body?document.body:c.offsetParent}})(t),(function(e,r){i.exports?i.exports=r():e.OpenSeadragon=r()})(w4,function(){return t}),(function(e){class r{constructor(o){o||(o=[0,0,0,0,0,0,0,0,0]),this.values=o}static makeIdentity(){return new r([1,0,0,0,1,0,0,0,1])}static makeTranslation(o,a){return new r([1,0,0,0,1,0,o,a,1])}static makeRotation(o){var a=Math.cos(o),s=Math.sin(o);return new r([a,-s,0,s,a,0,0,0,1])}static makeScaling(o,a){return new r([o,0,0,0,a,0,0,0,1])}multiply(o){let a=this.values,s=o.values;var c=a[0],l=a[1],u=a[2],h=a[3],f=a[4],v=a[5],_=a[6],d=a[7],g=a[8],y=s[0],S=s[1],P=s[2],E=s[3],A=s[4],B=s[5],q=s[6],z=s[7],I=s[8];return new r([y*c+S*h+P*_,y*l+S*f+P*d,y*u+S*v+P*g,E*c+A*h+B*_,E*l+A*f+B*d,E*u+A*v+B*g,q*c+z*h+I*_,q*l+z*f+I*d,q*u+z*v+I*g])}}e.Mat3=r})(t),(function(e){var r={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.fullscreenElement},r.requestFullScreen=function(n){return n.requestFullscreen().catch(function(o){e.console.error("Fullscreen request failed: ",o)})},r.exitFullScreen=function(){document.exitFullscreen().catch(function(n){e.console.error("Error while exiting fullscreen: ",n)})},r.fullScreenEventName="fullscreenchange",r.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.msFullscreenElement},r.requestFullScreen=function(n){return n.msRequestFullscreen()},r.exitFullScreen=function(){document.msExitFullscreen()},r.fullScreenEventName="MSFullscreenChange",r.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitFullscreenElement},r.requestFullScreen=function(n){return n.webkitRequestFullscreen()},r.exitFullScreen=function(){document.webkitExitFullscreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},r.requestFullScreen=function(n){return n.webkitRequestFullScreen()},r.exitFullScreen=function(){document.webkitCancelFullScreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.mozFullScreenElement},r.requestFullScreen=function(n){return n.mozRequestFullScreen()},r.exitFullScreen=function(){document.mozCancelFullScreen()},r.fullScreenEventName="mozfullscreenchange",r.fullScreenErrorEventName="mozfullscreenerror"),r.isFullScreen=function(){return r.getFullScreenElement()!==null},r.cancelFullScreen=function(){e.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),r.exitFullScreen()},e.extend(e,r)})(t),(function(e){e.EventSource=function(){this.events={},this._rejectedEventList={}},e.EventSource.prototype={addOnceHandler:function(r,n,o,a,s){var c=this;a=a||1;var l=0,u=function(h){return l++,l===a&&c.removeHandler(r,u),n(h)};return this.addHandler(r,u,o,s)},addHandler:function(r,n,o,a){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return e.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var s=this.events[r];if(s||(this.events[r]=s=[]),n&&e.isFunction(n)){var c=s.length,l={handler:n,userData:o||null,priority:a||0};for(s[c]=l;c>0&&s[c-1].priority<s[c].priority;)s[c]=s[c-1],s[c-1]=l,c--}return!0},removeHandler:function(r,n){var o=this.events[r],a=[],s;if(o&&e.isArray(o)){for(s=0;s<o.length;s++)o[s].handler!==n&&a.push(o[s]);this.events[r]=a}},numberOfHandlers:function(r){var n=this.events[r];return n?n.length:0},removeAllHandlers:function(r){if(r)this.events[r]=[];else for(var n in this.events)this.events[n]=[]},getHandler:function(r){var n=this.events[r];return!n||!n.length?null:(n=n.length===1?[n[0]]:Array.apply(null,n),function(o,a){var s,c=n.length;for(s=0;s<c;s++)n[s]&&(a.eventSource=o,a.userData=n[s].userData,n[s].handler(a))})},raiseEvent:function(r,n){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return e.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var o=this.getHandler(r);return o&&o(this,n||{}),!0},rejectEventHandler(r,n=""){this._rejectedEventList[r]=n},allowEventHandler(r){delete this._rejectedEventList[r]}}})(t),(function(e){var r={};e.MouseTracker=function(w){var b=arguments;e.isPlainObject(w)||(w={element:b[0],clickTimeThreshold:b[1],clickDistThreshold:b[2]}),this.hash=Math.random(),this.element=e.getElement(w.element),this.clickTimeThreshold=w.clickTimeThreshold||e.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=w.clickDistThreshold||e.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=w.dblClickTimeThreshold||e.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=w.dblClickDistThreshold||e.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=w.userData||null,this.stopDelay=w.stopDelay||50,this.preProcessEventHandler=w.preProcessEventHandler||null,this.contextMenuHandler=w.contextMenuHandler||null,this.enterHandler=w.enterHandler||null,this.leaveHandler=w.leaveHandler||null,this.exitHandler=w.exitHandler||null,this.overHandler=w.overHandler||null,this.outHandler=w.outHandler||null,this.pressHandler=w.pressHandler||null,this.nonPrimaryPressHandler=w.nonPrimaryPressHandler||null,this.releaseHandler=w.releaseHandler||null,this.nonPrimaryReleaseHandler=w.nonPrimaryReleaseHandler||null,this.moveHandler=w.moveHandler||null,this.scrollHandler=w.scrollHandler||null,this.clickHandler=w.clickHandler||null,this.dblClickHandler=w.dblClickHandler||null,this.dragHandler=w.dragHandler||null,this.dragEndHandler=w.dragEndHandler||null,this.pinchHandler=w.pinchHandler||null,this.stopHandler=w.stopHandler||null,this.keyDownHandler=w.keyDownHandler||null,this.keyUpHandler=w.keyUpHandler||null,this.keyHandler=w.keyHandler||null,this.focusHandler=w.focusHandler||null,this.blurHandler=w.blurHandler||null;var k=this;r[this.hash]={click:function(C){P(k,C)},dblclick:function(C){E(k,C)},keydown:function(C){A(k,C)},keyup:function(C){B(k,C)},keypress:function(C){q(k,C)},focus:function(C){z(k,C)},blur:function(C){I(k,C)},contextmenu:function(C){M(k,C)},wheel:function(C){J(k,C)},mousewheel:function(C){ee(k,C)},DOMMouseScroll:function(C){ee(k,C)},MozMousePixelScroll:function(C){ee(k,C)},losecapture:function(C){L(k,C)},mouseenter:function(C){he(k,C)},mouseleave:function(C){V(k,C)},mouseover:function(C){O(k,C)},mouseout:function(C){G(k,C)},mousedown:function(C){se(k,C)},mouseup:function(C){le(k,C)},mousemove:function(C){_e(k,C)},touchstart:function(C){F(k,C)},touchend:function(C){X(k,C)},touchmove:function(C){ae(k,C)},touchcancel:function(C){oe(k,C)},gesturestart:function(C){H(k,C)},gesturechange:function(C){Y(k,C)},gotpointercapture:function(C){we(k,C)},lostpointercapture:function(C){ke(k,C)},pointerenter:function(C){he(k,C)},pointerleave:function(C){V(k,C)},pointerover:function(C){O(k,C)},pointerout:function(C){G(k,C)},pointerdown:function(C){se(k,C)},pointerup:function(C){le(k,C)},pointermove:function(C){_e(k,C)},pointercancel:function(C){fe(k,C)},pointerupcaptured:function(C){Se(k,C)},pointermovecaptured:function(C){Te(k,C)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,e.MouseTracker.havePointerEvents&&e.setElementPointerEvents(this.element,"auto"),this.exitHandler&&e.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),w.startDisabled||this.setTracking(!0)},e.MouseTracker.prototype={destroy:function(){c(this),this.element=null,r[this.hash]=null,delete r[this.hash]},isTracking:function(){return r[this.hash].tracking},setTracking:function(w){return w?s(this):c(this),this},getActivePointersListByType:function(w){var b=r[this.hash],k,C=b?b.activePointersLists.length:0,K;for(k=0;k<C;k++)if(b.activePointersLists[k].type===w)return b.activePointersLists[k];return K=new e.MouseTracker.GesturePointList(w),b&&b.activePointersLists.push(K),K},getActivePointerCount:function(){var w=r[this.hash],b,k=w.activePointersLists.length,C=0;for(b=0;b<k;b++)C+=w.activePointersLists[b].getLength();return C},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var n=(function(){try{return window.self!==window.top}catch{return!0}})();function o(w){try{return w.addEventListener&&w.removeEventListener}catch{return!1}}e.MouseTracker.gesturePointVelocityTracker=(function(){var w=[],b=0,k=0,C=function(Ke,Le){return Ke.hash.toString()+Le.type+Le.id.toString()},K=function(){var Ke,Le=w.length,rr,Ct,$i=e.now(),dh,fh,ph;for(dh=$i-k,k=$i,Ke=0;Ke<Le;Ke++)rr=w[Ke],Ct=rr.gPoint,Ct.direction=Math.atan2(Ct.currentPos.y-rr.lastPos.y,Ct.currentPos.x-rr.lastPos.x),fh=rr.lastPos.distanceTo(Ct.currentPos),rr.lastPos=Ct.currentPos,ph=1e3*fh/(dh+1),Ct.speed=.75*ph+.25*Ct.speed},de=function(Ke,Le){var rr=C(Ke,Le);w.push({guid:rr,gPoint:Le,lastPos:Le.currentPos}),w.length===1&&(k=e.now(),b=window.setInterval(K,50))},Ie=function(Ke,Le){var rr=C(Ke,Le),Ct,$i=w.length;for(Ct=0;Ct<$i;Ct++)if(w[Ct].guid===rr){w.splice(Ct,1),$i--,$i===0&&window.clearInterval(b);break}};return{addPoint:de,removePoint:Ie}})(),e.MouseTracker.captureElement=document,e.MouseTracker.wheelEventName="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],e.MouseTracker.wheelEventName==="DOMMouseScroll"&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=(function(){var w=document.createElement("div");return e.isFunction(w.setPointerCapture)&&e.isFunction(w.releasePointerCapture)})(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=(function(){var w=document.createElement("div");return e.isFunction(w.setCapture)&&e.isFunction(w.releaseCapture)})(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(w){this._gPoints=[],this.type=w,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(w){return this._gPoints.push(w)},removeById:function(w){var b,k=this._gPoints.length;for(b=0;b<k;b++)if(this._gPoints[b].id===w){this._gPoints.splice(b,1);break}return this._gPoints.length},getByIndex:function(w){return w<this._gPoints.length?this._gPoints[w]:null},getById:function(w){var b,k=this._gPoints.length;for(b=0;b<k;b++)if(this._gPoints[b].id===w)return this._gPoints[b];return null},getPrimary:function(w){var b,k=this._gPoints.length;for(b=0;b<k;b++)if(this._gPoints[b].isPrimary)return this._gPoints[b];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function a(w){var b=r[w.hash],k,C,K,de,Ie,Ke=b.activePointersLists.length;for(k=0;k<Ke;k++)if(K=b.activePointersLists[k],K.getLength()>0){for(Ie=[],de=K.asArray(),C=0;C<de.length;C++)Ie.push(de[C]);for(C=0;C<Ie.length;C++)Xe(w,K,Ie[C])}for(k=0;k<Ke;k++)b.activePointersLists.pop();b.sentDragEvent=!1}function s(w){var b=r[w.hash],k,C;if(!b.tracking){for(C=0;C<e.MouseTracker.subscribeEvents.length;C++)k=e.MouseTracker.subscribeEvents[C],e.addEvent(w.element,k,b[k],k===e.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);a(w),b.tracking=!0}}function c(w){var b=r[w.hash],k,C;if(b.tracking){for(C=0;C<e.MouseTracker.subscribeEvents.length;C++)k=e.MouseTracker.subscribeEvents[C],e.removeEvent(w.element,k,b[k],!1);a(w),b.tracking=!1}}function l(w,b){var k=r[w.hash];if(b==="pointerevent")return{upName:"pointerup",upHandler:k.pointerupcaptured,moveName:"pointermove",moveHandler:k.pointermovecaptured};if(b==="mouse")return{upName:"pointerup",upHandler:k.pointerupcaptured,moveName:"pointermove",moveHandler:k.pointermovecaptured};if(b==="touch")return{upName:"touchend",upHandler:k.touchendcaptured,moveName:"touchmove",moveHandler:k.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function u(w,b){var k;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents)try{w.element.setPointerCapture(b.id)}catch{e.console.warn("setPointerCapture() called on invalid pointer ID");return}else w.element.setCapture(!0);else k=l(w,e.MouseTracker.havePointerEvents?"pointerevent":b.type),n&&o(window.top)&&e.addEvent(window.top,k.upName,k.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,k.upName,k.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,k.moveName,k.moveHandler,!0);N(w,b,!0)}function h(w,b){var k,C,K;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents){if(C=w.getActivePointersListByType(b.type),K=C.getById(b.id),!K||!K.captured)return;try{w.element.releasePointerCapture(b.id)}catch{}}else w.element.releaseCapture();else k=l(w,e.MouseTracker.havePointerEvents?"pointerevent":b.type),n&&o(window.top)&&e.removeEvent(window.top,k.upName,k.upHandler,!0),e.removeEvent(e.MouseTracker.captureElement,k.moveName,k.moveHandler,!0),e.removeEvent(e.MouseTracker.captureElement,k.upName,k.upHandler,!0);N(w,b,!1)}function f(w){return e.MouseTracker.havePointerEvents?w.pointerId:e.MouseTracker.mousePointerId}function v(w){return e.MouseTracker.havePointerEvents&&w.pointerType?w.pointerType:"mouse"}function _(w){return e.MouseTracker.havePointerEvents?w.isPrimary:!0}function d(w){return e.getMousePosition(w)}function g(w,b){return y(d(w),b)}function y(w,b){var k=e.getElementOffset(b);return w.minus(k)}function S(w,b){return new e.Point((w.x+b.x)/2,(w.y+b.y)/2)}function P(w,b){var k={originalEvent:b,eventType:"click",pointerType:"mouse",isEmulated:!1};T(w,k),k.preventDefault&&!k.defaultPrevented&&e.cancelEvent(b),k.stopPropagation&&e.stopEvent(b)}function E(w,b){var k={originalEvent:b,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};T(w,k),k.preventDefault&&!k.defaultPrevented&&e.cancelEvent(b),k.stopPropagation&&e.stopEvent(b)}function A(w,b){var k=null,C={originalEvent:b,eventType:"keydown",pointerType:"",isEmulated:!1};T(w,C),w.keyDownHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:w,keyCode:b.keyCode?b.keyCode:b.charCode,ctrl:b.ctrlKey,shift:b.shiftKey,alt:b.altKey,meta:b.metaKey,originalEvent:b,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyDownHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function B(w,b){var k=null,C={originalEvent:b,eventType:"keyup",pointerType:"",isEmulated:!1};T(w,C),w.keyUpHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:w,keyCode:b.keyCode?b.keyCode:b.charCode,ctrl:b.ctrlKey,shift:b.shiftKey,alt:b.altKey,meta:b.metaKey,originalEvent:b,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyUpHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function q(w,b){var k=null,C={originalEvent:b,eventType:"keypress",pointerType:"",isEmulated:!1};T(w,C),w.keyHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:w,keyCode:b.keyCode?b.keyCode:b.charCode,ctrl:b.ctrlKey,shift:b.shiftKey,alt:b.altKey,meta:b.metaKey,originalEvent:b,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function z(w,b){var k={originalEvent:b,eventType:"focus",pointerType:"",isEmulated:!1};T(w,k),w.focusHandler&&!k.preventGesture&&w.focusHandler({eventSource:w,originalEvent:b,userData:w.userData})}function I(w,b){var k={originalEvent:b,eventType:"blur",pointerType:"",isEmulated:!1};T(w,k),w.blurHandler&&!k.preventGesture&&w.blurHandler({eventSource:w,originalEvent:b,userData:w.userData})}function M(w,b){var k=null,C={originalEvent:b,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};T(w,C),w.contextMenuHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:w,position:y(d(b),w.element),originalEvent:C.originalEvent,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.contextMenuHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function J(w,b){ie(w,b,b)}function ee(w,b){var k={target:b.target||b.srcElement,type:"wheel",shiftKey:b.shiftKey||!1,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX?b.pageX:b.clientX,pageY:b.pageY?b.pageY:b.clientY,deltaMode:b.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};e.MouseTracker.wheelEventName==="mousewheel"?k.deltaY=-b.wheelDelta/e.DEFAULT_SETTINGS.pixelsPerWheelLine:k.deltaY=b.detail,ie(w,k,b)}function ie(w,b,k){var C=0,K,de=null;C=b.deltaY?b.deltaY<0?1:-1:0,K={originalEvent:b,eventType:"wheel",pointerType:"mouse",isEmulated:b!==k},T(w,K),w.scrollHandler&&!K.preventGesture&&!K.defaultPrevented&&(de={eventSource:w,pointerType:"mouse",position:g(b,w.element),scroll:C,shift:b.shiftKey,isTouchEvent:!1,originalEvent:k,preventDefault:K.preventDefault||K.defaultPrevented,userData:w.userData},w.scrollHandler(de)),K.stopPropagation&&e.stopEvent(k),(de&&de.preventDefault||K.preventDefault&&!K.defaultPrevented)&&e.cancelEvent(k)}function L(w,b){var k={id:e.MouseTracker.mousePointerId,type:"mouse"},C={originalEvent:b,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};T(w,C),b.target===w.element&&N(w,k,!1),C.stopPropagation&&e.stopEvent(b)}function F(w,b){var k,C,K=b.changedTouches.length,de,Ie=w.getActivePointersListByType("touch");k=e.now(),Ie.getLength()>b.touches.length-K&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var Ke={originalEvent:b,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(T(w,Ke),C=0;C<K;C++)de={id:b.changedTouches[C].identifier,type:"touch",isPrimary:Ie.getLength()===0,currentPos:d(b.changedTouches[C]),currentTime:k},re(w,Ke,de),Me(w,Ke,de,0),N(w,de,!0);Ke.preventDefault&&!Ke.defaultPrevented&&e.cancelEvent(b),Ke.stopPropagation&&e.stopEvent(b)}function X(w,b){var k,C,K=b.changedTouches.length,de;k=e.now();var Ie={originalEvent:b,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(T(w,Ie),C=0;C<K;C++)de={id:b.changedTouches[C].identifier,type:"touch",currentPos:d(b.changedTouches[C]),currentTime:k},je(w,Ie,de,0),N(w,de,!1),ce(w,Ie,de);Ie.preventDefault&&!Ie.defaultPrevented&&e.cancelEvent(b),Ie.stopPropagation&&e.stopEvent(b)}function ae(w,b){var k,C,K=b.changedTouches.length,de;k=e.now();var Ie={originalEvent:b,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(T(w,Ie),C=0;C<K;C++)de={id:b.changedTouches[C].identifier,type:"touch",currentPos:d(b.changedTouches[C]),currentTime:k},Ve(w,Ie,de);Ie.preventDefault&&!Ie.defaultPrevented&&e.cancelEvent(b),Ie.stopPropagation&&e.stopEvent(b)}function oe(w,b){var k=b.changedTouches.length,C,K,de={originalEvent:b,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(T(w,de),C=0;C<k;C++)K={id:b.changedTouches[C].identifier,type:"touch"},Ce(w,de,K);de.stopPropagation&&e.stopEvent(b)}function H(w,b){return e.eventIsCanceled(b)||b.preventDefault(),!1}function Y(w,b){return e.eventIsCanceled(b)||b.preventDefault(),!1}function we(w,b){var k={originalEvent:b,eventType:"gotpointercapture",pointerType:v(b),isEmulated:!1};T(w,k),b.target===w.element&&N(w,{id:b.pointerId,type:v(b)},!0),k.stopPropagation&&e.stopEvent(b)}function ke(w,b){var k={originalEvent:b,eventType:"lostpointercapture",pointerType:v(b),isEmulated:!1};T(w,k),b.target===w.element&&N(w,{id:b.pointerId,type:v(b)},!1),k.stopPropagation&&e.stopEvent(b)}function he(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C={originalEvent:b,eventType:"pointerenter",pointerType:k.type,isEmulated:!1};T(w,C),re(w,C,k)}function V(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C={originalEvent:b,eventType:"pointerleave",pointerType:k.type,isEmulated:!1};T(w,C),ce(w,C,k)}function O(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C={originalEvent:b,eventType:"pointerover",pointerType:k.type,isEmulated:!1};T(w,C),ge(w,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function G(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C={originalEvent:b,eventType:"pointerout",pointerType:k.type,isEmulated:!1};T(w,C),ne(w,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function se(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C=e.MouseTracker.havePointerEvents&&k.type==="touch",K={originalEvent:b,eventType:"pointerdown",pointerType:k.type,isEmulated:!1};T(w,K),Me(w,K,k,b.button),K.preventDefault&&!K.defaultPrevented&&e.cancelEvent(b),K.stopPropagation&&e.stopEvent(b),K.shouldCapture&&(C?N(w,k,!0):u(w,k))}function le(w,b){pe(w,b)}function Se(w,b){var k=w.getActivePointersListByType(v(b));k.getById(b.pointerId)&&pe(w,b),e.stopEvent(b)}function pe(w,b){var k;k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()};var C={originalEvent:b,eventType:"pointerup",pointerType:k.type,isEmulated:!1};T(w,C),je(w,C,k,b.button),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b),C.shouldReleaseCapture&&(b.target===w.element?h(w,k):N(w,k,!1))}function _e(w,b){Ee(w,b)}function Te(w,b){var k=w.getActivePointersListByType(v(b));k.getById(b.pointerId)&&Ee(w,b),e.stopEvent(b)}function Ee(w,b){var k={id:f(b),type:v(b),isPrimary:_(b),currentPos:d(b),currentTime:e.now()},C={originalEvent:b,eventType:"pointermove",pointerType:k.type,isEmulated:!1};T(w,C),Ve(w,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(b),C.stopPropagation&&e.stopEvent(b)}function fe(w,b){var k={id:b.pointerId,type:v(b)},C={originalEvent:b,eventType:"pointercancel",pointerType:k.type,isEmulated:!1};T(w,C),Ce(w,C,k),C.stopPropagation&&e.stopEvent(b)}function De(w,b){return b.speed=0,b.direction=0,b.contactPos=b.currentPos,b.contactTime=b.currentTime,b.lastPos=b.currentPos,b.lastTime=b.currentTime,w.add(b)}function Xe(w,b,k){var C,K=b.getById(k.id);return K?(K.captured&&(e.console.warn("stopTrackingPointer() called on captured pointer"),h(w,K)),b.removeContact(),C=b.removeById(k.id)):C=b.getLength(),C}function m(w,b){switch(b.eventType){case"pointermove":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!1,b.preventGesture=!w.hasGestureHandlers,b.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!1,b.preventGesture=!1,b.stopPropagation=!1;break;case"pointerdown":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!1,b.preventGesture=!w.hasGestureHandlers,b.stopPropagation=!1;break;case"pointerup":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!1,b.preventGesture=!w.hasGestureHandlers,b.stopPropagation=!1;break;case"wheel":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!1,b.preventGesture=!w.hasScrollHandler,b.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":b.isStoppable=!0,b.isCancelable=!1,b.preventDefault=!1,b.preventGesture=!1,b.stopPropagation=!1;break;case"click":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!!w.clickHandler,b.preventGesture=!1,b.stopPropagation=!1;break;case"dblclick":b.isStoppable=!0,b.isCancelable=!0,b.preventDefault=!!w.dblClickHandler,b.preventGesture=!1,b.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:b.isStoppable=!1,b.isCancelable=!1,b.preventDefault=!1,b.preventGesture=!1,b.stopPropagation=!1;break}}function T(w,b){b.eventSource=w,b.eventPhase=b.originalEvent&&typeof b.originalEvent.eventPhase<"u"?b.originalEvent.eventPhase:0,b.defaultPrevented=e.eventIsCanceled(b.originalEvent),b.shouldCapture=!1,b.shouldReleaseCapture=!1,b.userData=w.userData,m(w,b),w.preProcessEventHandler&&w.preProcessEventHandler(b)}function N(w,b,k){var C=w.getActivePointersListByType(b.type),K=C.getById(b.id);K?k&&!K.captured?(K.captured=!0,C.captureCount++):!k&&K.captured&&(K.captured=!1,C.captureCount--,C.captureCount<0&&(C.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function re(w,b,k){var C=w.getActivePointersListByType(k.type),K;K=C.getById(k.id),K?(K.insideElement=!0,K.lastPos=K.currentPos,K.lastTime=K.currentTime,K.currentPos=k.currentPos,K.currentTime=k.currentTime,k=K):(k.captured=!1,k.insideElementPressed=!1,k.insideElement=!0,De(C,k)),w.enterHandler&&w.enterHandler({eventSource:w,pointerType:k.type,position:y(k.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData})}function ce(w,b,k){var C=w.getActivePointersListByType(k.type),K,de;K=C.getById(k.id),K?(K.captured?(K.insideElement=!1,K.lastPos=K.currentPos,K.lastTime=K.currentTime,K.currentPos=k.currentPos,K.currentTime=k.currentTime):Xe(w,C,K),k=K):(k.captured=!1,k.insideElementPressed=!1),(w.leaveHandler||w.exitHandler)&&(de={eventSource:w,pointerType:k.type,position:k.currentPos&&y(k.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData},w.leaveHandler&&w.leaveHandler(de),w.exitHandler&&w.exitHandler(de))}function ge(w,b,k){var C,K;C=w.getActivePointersListByType(k.type),K=C.getById(k.id),K?k=K:(k.captured=!1,k.insideElementPressed=!1),w.overHandler&&w.overHandler({eventSource:w,pointerType:k.type,position:y(k.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData})}function ne(w,b,k){var C,K;C=w.getActivePointersListByType(k.type),K=C.getById(k.id),K?k=K:(k.captured=!1,k.insideElementPressed=!1),w.outHandler&&w.outHandler({eventSource:w,pointerType:k.type,position:k.currentPos&&y(k.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData})}function Me(w,b,k,C){var K=r[w.hash],de=w.getActivePointersListByType(k.type),Ie;if(typeof b.originalEvent.buttons<"u"?de.buttons=b.originalEvent.buttons:C===0?de.buttons|=1:C===1?de.buttons|=4:C===2?de.buttons|=2:C===3?de.buttons|=8:C===4?de.buttons|=16:C===5&&(de.buttons|=32),C!==0){b.shouldCapture=!1,b.shouldReleaseCapture=!1,w.nonPrimaryPressHandler&&!b.preventGesture&&!b.defaultPrevented&&(b.preventDefault=!0,w.nonPrimaryPressHandler({eventSource:w,pointerType:k.type,position:y(k.currentPos,w.element),button:C,buttons:de.buttons,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData}));return}Ie=de.getById(k.id),Ie?(Ie.insideElementPressed=!0,Ie.insideElement=!0,Ie.originalTarget=b.originalEvent.target,Ie.contactPos=k.currentPos,Ie.contactTime=k.currentTime,Ie.lastPos=Ie.currentPos,Ie.lastTime=Ie.currentTime,Ie.currentPos=k.currentPos,Ie.currentTime=k.currentTime,k=Ie):(k.captured=!1,k.insideElementPressed=!0,k.insideElement=!0,k.originalTarget=b.originalEvent.target,De(de,k)),de.addContact(),!b.preventGesture&&!b.defaultPrevented?(b.shouldCapture=!0,b.shouldReleaseCapture=!1,b.preventDefault=!0,(w.dragHandler||w.dragEndHandler||w.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(w,k),de.contacts===1?w.pressHandler&&!b.preventGesture&&w.pressHandler({eventSource:w,pointerType:k.type,position:y(k.contactPos,w.element),buttons:de.buttons,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData}):de.contacts===2&&w.pinchHandler&&k.type==="touch"&&(K.pinchGPoints=de.asArray(),K.lastPinchDist=K.currentPinchDist=K.pinchGPoints[0].currentPos.distanceTo(K.pinchGPoints[1].currentPos),K.lastPinchCenter=K.currentPinchCenter=S(K.pinchGPoints[0].currentPos,K.pinchGPoints[1].currentPos))):(b.shouldCapture=!1,b.shouldReleaseCapture=!1)}function je(w,b,k,C){var K=r[w.hash],de=w.getActivePointersListByType(k.type),Ie,Ke,Le,rr=!1,Ct;if(typeof b.originalEvent.buttons<"u"?de.buttons=b.originalEvent.buttons:C===0?de.buttons^=-2:C===1?de.buttons^=-5:C===2?de.buttons^=-3:C===3?de.buttons^=-9:C===4?de.buttons^=-17:C===5&&(de.buttons^=-33),b.shouldCapture=!1,C!==0){b.shouldReleaseCapture=!1,w.nonPrimaryReleaseHandler&&!b.preventGesture&&!b.defaultPrevented&&(b.preventDefault=!0,w.nonPrimaryReleaseHandler({eventSource:w,pointerType:k.type,position:y(k.currentPos,w.element),button:C,buttons:de.buttons,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData}));return}Le=de.getById(k.id),Le?(de.removeContact(),Le.captured&&(rr=!0),Le.lastPos=Le.currentPos,Le.lastTime=Le.currentTime,Le.currentPos=k.currentPos,Le.currentTime=k.currentTime,Le.insideElement||Xe(w,de,Le),Ie=Le.currentPos,Ke=Le.currentTime):(k.captured=!1,k.insideElementPressed=!1,k.insideElement=!0,De(de,k),Le=k),!b.preventGesture&&!b.defaultPrevented&&(rr?(b.shouldReleaseCapture=!0,b.preventDefault=!0,(w.dragHandler||w.dragEndHandler||w.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(w,Le),de.contacts===0?(w.releaseHandler&&Ie&&w.releaseHandler({eventSource:w,pointerType:Le.type,position:y(Ie,w.element),buttons:de.buttons,insideElementPressed:Le.insideElementPressed,insideElementReleased:Le.insideElement,isTouchEvent:Le.type==="touch",originalEvent:b.originalEvent,userData:w.userData}),w.dragEndHandler&&K.sentDragEvent&&w.dragEndHandler({eventSource:w,pointerType:Le.type,position:y(Le.currentPos,w.element),speed:Le.speed,direction:Le.direction,shift:b.originalEvent.shiftKey,isTouchEvent:Le.type==="touch",originalEvent:b.originalEvent,userData:w.userData}),K.sentDragEvent=!1,(w.clickHandler||w.dblClickHandler)&&Le.insideElement&&(Ct=Ke-Le.contactTime<=w.clickTimeThreshold&&Le.contactPos.distanceTo(Ie)<=w.clickDistThreshold,w.clickHandler&&w.clickHandler({eventSource:w,pointerType:Le.type,position:y(Le.currentPos,w.element),quick:Ct,shift:b.originalEvent.shiftKey,isTouchEvent:Le.type==="touch",originalEvent:b.originalEvent,originalTarget:Le.originalTarget,userData:w.userData}),w.dblClickHandler&&Ct&&(de.clicks++,de.clicks===1?(K.lastClickPos=Ie,K.dblClickTimeOut=setTimeout(function(){de.clicks=0},w.dblClickTimeThreshold)):de.clicks===2&&(clearTimeout(K.dblClickTimeOut),de.clicks=0,K.lastClickPos.distanceTo(Ie)<=w.dblClickDistThreshold&&w.dblClickHandler({eventSource:w,pointerType:Le.type,position:y(Le.currentPos,w.element),shift:b.originalEvent.shiftKey,isTouchEvent:Le.type==="touch",originalEvent:b.originalEvent,userData:w.userData}),K.lastClickPos=null)))):de.contacts===2&&w.pinchHandler&&Le.type==="touch"&&(K.pinchGPoints=de.asArray(),K.lastPinchDist=K.currentPinchDist=K.pinchGPoints[0].currentPos.distanceTo(K.pinchGPoints[1].currentPos),K.lastPinchCenter=K.currentPinchCenter=S(K.pinchGPoints[0].currentPos,K.pinchGPoints[1].currentPos))):(b.shouldReleaseCapture=!1,w.releaseHandler&&Ie&&(w.releaseHandler({eventSource:w,pointerType:Le.type,position:y(Ie,w.element),buttons:de.buttons,insideElementPressed:Le.insideElementPressed,insideElementReleased:Le.insideElement,isTouchEvent:Le.type==="touch",originalEvent:b.originalEvent,userData:w.userData}),b.preventDefault=!0)))}function Ve(w,b,k){var C=r[w.hash],K=w.getActivePointersListByType(k.type),de,Ie,Ke;if(typeof b.originalEvent.buttons<"u"&&(K.buttons=b.originalEvent.buttons),de=K.getById(k.id),de)de.lastPos=de.currentPos,de.lastTime=de.currentTime,de.currentPos=k.currentPos,de.currentTime=k.currentTime;else return;b.shouldCapture=!1,b.shouldReleaseCapture=!1,w.stopHandler&&k.type==="mouse"&&(clearTimeout(w.stopTimeOut),w.stopTimeOut=setTimeout(function(){Ye(w,b.originalEvent,k.type)},w.stopDelay)),K.contacts===0?w.moveHandler&&w.moveHandler({eventSource:w,pointerType:k.type,position:y(k.currentPos,w.element),buttons:K.buttons,isTouchEvent:k.type==="touch",originalEvent:b.originalEvent,userData:w.userData}):K.contacts===1?(w.moveHandler&&(de=K.asArray()[0],w.moveHandler({eventSource:w,pointerType:de.type,position:y(de.currentPos,w.element),buttons:K.buttons,isTouchEvent:de.type==="touch",originalEvent:b.originalEvent,userData:w.userData})),w.dragHandler&&!b.preventGesture&&!b.defaultPrevented&&(de=K.asArray()[0],Ke=de.currentPos.minus(de.lastPos),w.dragHandler({eventSource:w,pointerType:de.type,position:y(de.currentPos,w.element),buttons:K.buttons,delta:Ke,speed:de.speed,direction:de.direction,shift:b.originalEvent.shiftKey,isTouchEvent:de.type==="touch",originalEvent:b.originalEvent,userData:w.userData}),b.preventDefault=!0,C.sentDragEvent=!0)):K.contacts===2&&(w.moveHandler&&(Ie=K.asArray(),w.moveHandler({eventSource:w,pointerType:Ie[0].type,position:y(S(Ie[0].currentPos,Ie[1].currentPos),w.element),buttons:K.buttons,isTouchEvent:Ie[0].type==="touch",originalEvent:b.originalEvent,userData:w.userData})),w.pinchHandler&&k.type==="touch"&&!b.preventGesture&&!b.defaultPrevented&&(Ke=C.pinchGPoints[0].currentPos.distanceTo(C.pinchGPoints[1].currentPos),Ke!==C.currentPinchDist&&(C.lastPinchDist=C.currentPinchDist,C.currentPinchDist=Ke,C.lastPinchCenter=C.currentPinchCenter,C.currentPinchCenter=S(C.pinchGPoints[0].currentPos,C.pinchGPoints[1].currentPos),w.pinchHandler({eventSource:w,pointerType:"touch",gesturePoints:C.pinchGPoints,lastCenter:y(C.lastPinchCenter,w.element),center:y(C.currentPinchCenter,w.element),lastDistance:C.lastPinchDist,distance:C.currentPinchDist,shift:b.originalEvent.shiftKey,originalEvent:b.originalEvent,userData:w.userData}),b.preventDefault=!0)))}function Ce(w,b,k){var C=w.getActivePointersListByType(k.type),K;K=C.getById(k.id),K&&Xe(w,C,K)}function Ye(w,b,k){w.stopHandler&&w.stopHandler({eventSource:w,pointerType:k,position:g(b,w.element),buttons:w.getActivePointersListByType(k).buttons,isTouchEvent:k==="touch",originalEvent:b,userData:w.userData})}})(t),(function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(r,n,o){var a=r.parentNode;typeof n=="number"&&(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"),n={anchor:n}),n.attachToViewer=typeof n.attachToViewer>"u"?!0:n.attachToViewer,this.autoFade=typeof n.autoFade>"u"?!0:n.autoFade,this.element=r,this.anchor=n.anchor,this.container=o,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof n.top=="number"?n.top+"px":n.top,this.wrapper.style.left=typeof n.left=="number"?n.left+"px":n.left,this.wrapper.style.height=typeof n.height=="number"?n.height+"px":n.height,this.wrapper.style.width=typeof n.width=="number"?n.width+"px":n.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),n.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):a.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(r){this.wrapper.style.display=r?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(r){e.setElementOpacity(this.wrapper,r,!0)}}})(t),(function(e){e.ControlDock=function(n){var o=["topleft","topright","bottomright","bottomleft"],a,s;for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(Math.random()*1e6),container:e.makeNeutralElement("div"),controls:[]},n),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),e.getElementStyle(this.element).position==="static"&&(this.element.style.position="relative"),this.container.style.width="100%",this.container.style.height="100%"),s=0;s<o.length;s++)a=o[s],this.controls[a]=e.makeNeutralElement("div"),this.controls[a].style.position="absolute",a.match("left")&&(this.controls[a].style.left="0px"),a.match("right")&&(this.controls[a].style.right="0px"),a.match("top")&&(this.controls[a].style.top="0px"),a.match("bottom")&&(this.controls[a].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},e.ControlDock.prototype={addControl:function(n,o){n=e.getElement(n);var a=null;if(!(r(this,n)>=0)){switch(o.anchor){case e.ControlAnchor.TOP_RIGHT:a=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:a=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:a=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:a=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:a=this.container,n.style.margin="0px",n.style.padding="0px";break;default:case e.ControlAnchor.NONE:a=this.container,n.style.margin="0px",n.style.padding="0px";break}this.controls.push(new e.Control(n,o,a)),n.style.display="inline-block"}},removeControl:function(n){n=e.getElement(n);var o=r(this,n);return o>=0&&(this.controls[o].destroy(),this.controls.splice(o,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var n;for(n=this.controls.length-1;n>=0;n--)if(this.controls[n].isVisible())return!0;return!1},setControlsEnabled:function(n){var o;for(o=this.controls.length-1;o>=0;o--)this.controls[o].setVisible(n);return this}};function r(n,o){var a=n.controls,s;for(s=a.length-1;s>=0;s--)if(a[s].element===o)return s;return-1}})(t),(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}}})})(t),(function(e){var r={},n=1;e.Viewer=function(m){var T=arguments,N=this,re;e.isPlainObject(m)||(m={id:T[0],xmlPath:T.length>1?T[1]:void 0,prefixUrl:T.length>2?T[2]:void 0,controls:T.length>3?T[3]:void 0,overlays:T.length>4?T[4]:void 0}),m.config&&(e.extend(!0,m,m.config),delete m.config);let ce=["useCanvas"];if(m.drawerOptions=Object.assign({},ce.reduce((ne,Me)=>(ne[Me]=m[Me],delete m[Me],ne),{}),m.drawerOptions),e.extend(!0,this,{id:m.id,hash:m.hash||n++,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,buttonGroup:null,profiler:null},e.DEFAULT_SETTINGS,m),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");typeof r[this.hash]<"u"&&e.console.warn("Hash "+this.hash+" has already been used."),r[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(ne){var Me=e.getString("Errors.OpenFailed",ne.eventSource,ne.message);N._showMessage(Me)}),e.ControlDock.call(this,m),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(function(ne){ne.width="100%",ne.height="100%",ne.overflow="hidden",ne.position="absolute",ne.top="0px",ne.left="0px"})(this.canvas.style),e.setElementTouchActionNone(this.canvas),m.tabIndex!==""&&(this.canvas.tabIndex=m.tabIndex===void 0?0:m.tabIndex),this.container.className="openseadragon-container",(function(ne){ne.width="100%",ne.height="100%",ne.position="relative",ne.overflow="hidden",ne.left="0px",ne.top="0px",ne.textAlign="left"})(this.container.style),e.setElementTouchActionNone(this.container),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({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,g),keyDownHandler:e.delegate(this,y),keyHandler:e.delegate(this,S),clickHandler:e.delegate(this,P),dblClickHandler:e.delegate(this,E),dragHandler:e.delegate(this,A),dragEndHandler:e.delegate(this,B),enterHandler:e.delegate(this,q),leaveHandler:e.delegate(this,z),pressHandler:e.delegate(this,I),releaseHandler:e.delegate(this,M),nonPrimaryPressHandler:e.delegate(this,J),nonPrimaryReleaseHandler:e.delegate(this,ee),scrollHandler:e.delegate(this,X),pinchHandler:e.delegate(this,ie),focusHandler:e.delegate(this,L),blurHandler:e.delegate(this,F)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,ae),leaveHandler:e.delegate(this,oe)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),r[this.hash].prevContainerSize=o(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver(function(){r[N.hash].needsResize=!0}),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(ne){N.source=N.world.getItemAt(0).source,r[N.hash].forceRedraw=!0,N._updateRequestId||(N._updateRequestId=l(N,H))}),this.world.addHandler("remove-item",function(ne){N.world.getItemCount()?N.source=N.world.getItemAt(0).source:N.source=null,r[N.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(ne){N.viewport&&N.viewport._setContentBounds(N.world.getHomeBounds(),N.world.getContentFactor())}),this.world.addHandler("item-index-change",function(ne){N.source=N.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:r[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,flipped:this.flipped,overlayPreserveContentDirection:this.overlayPreserveContentDirection,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:m.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),Object.prototype.hasOwnProperty.call(this.drawerOptions,"useCanvas")&&(e.console.error('useCanvas is deprecated, use the "drawer" option to indicate preferred drawer(s)'),this.drawerOptions.useCanvas||(this.drawer=e.HTMLDrawer),delete this.drawerOptions.useCanvas);let ge=Array.isArray(this.drawer)?this.drawer:[this.drawer];ge.length===0&&(ge=[e.DEFAULT_SETTINGS.drawer].flat(),e.console.warn("No valid drawers were selected. Using the default value.")),this.drawer=null;for(const ne of ge)if(this.requestDrawer(ne,{mainDrawer:!0,redrawImmediately:!1}))break;if(!this.drawer)throw e.console.error("No drawer could be created!"),"Error with creating the selected drawer(s)";for(this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(re=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(re,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(re=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(re,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({element:this.navigatorElement,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,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime,drawer:this.drawer.getType(),loadTilesWithAjax:this.loadTilesWithAjax,ajaxHeaders:this.ajaxHeaders,ajaxWithCredentials:this.ajaxWithCredentials})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),re=0;re<this.customControls.length;re++)this.addControl(this.customControls[re].id,{anchor:this.customControls[re].anchor});e.requestAnimationFrame(function(){h(N)}),e._viewers.set(this.element,this)},e.extend(e.Viewer.prototype,e.EventSource.prototype,e.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(m){return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(m)},openTileSource:function(m){return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(m)},get buttons(){return e.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(m,T){var N=this;if(this.close(),!m)return this;if(this.sequenceMode&&e.isArray(m))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof T<"u"&&!isNaN(T)&&(this.initialPage=T),this.tileSources=m,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(e.isArray(m)||(m=[m]),!m.length)return this;this._opening=!0;for(var re=m.length,ce=0,ge=0,ne,Me=function(){if(ce+ge===re)if(ce){(N._firstOpen||!N.preserveViewport)&&(N.viewport.goHome(!0),N.viewport.update()),N._firstOpen=!1;var Ce=m[0];if(Ce.tileSource&&(Ce=Ce.tileSource),N.overlays&&!N.preserveOverlays)for(var Ye=0;Ye<N.overlays.length;Ye++)N.currentOverlays[Ye]=s(N,N.overlays[Ye]);N._drawOverlays(),N._opening=!1,N.raiseEvent("open",{source:Ce})}else N._opening=!1,N.raiseEvent("open-failed",ne)},je=function(Ce){(!e.isPlainObject(Ce)||!Ce.tileSource)&&(Ce={tileSource:Ce}),Ce.index!==void 0&&(e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete Ce.index),Ce.collectionImmediately===void 0&&(Ce.collectionImmediately=!0);var Ye=Ce.success;Ce.success=function(b){if(ce++,Ce.tileSource.overlays)for(var k=0;k<Ce.tileSource.overlays.length;k++)N.addOverlay(Ce.tileSource.overlays[k]);Ye&&Ye(b),Me()};var w=Ce.error;Ce.error=function(b){ge++,ne||(ne=b),w&&w(b),Me()},N.addTiledImage(Ce)},Ve=0;Ve<m.length;Ve++)je(m[Ve]);return this},close:function(){return r[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),r[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(r[this.hash]){if(this.raiseEvent("before-destroy"),this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this._resizeObserver&&this._resizeObserver.disconnect(),this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),this._updateRequestId!==null&&(e.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),r[this.navigator.hash]=null,delete r[this.navigator.hash],this.navigator=null),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),r[this.hash]=null,delete r[this.hash],this.canvas=null,this.container=null,e._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},requestDrawer(m,T){const N={mainDrawer:!0,redrawImmediately:!0,drawerOptions:null};T=e.extend(!0,N,T);const re=T.mainDrawer,ce=T.redrawImmediately,ge=T.drawerOptions,ne=this.drawer;let Me=null;if(m&&m.prototype instanceof e.DrawerBase?(Me=m,m="custom"):typeof m=="string"&&(Me=e.determineDrawer(m)),Me||e.console.warn("Unsupported drawer! Drawer must be an existing string type, or a class that extends OpenSeadragon.DrawerBase."),Me&&Me.isSupported()){ne&&re&&ne.destroy();const je=new Me({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor,options:ge||this.drawerOptions[m]});return re&&(this.drawer=je,ce&&this.forceRedraw()),je}return!1},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(m){return this.innerTracker.setTracking(m),this.outerTracker.setTracking(m),this.raiseEvent("mouse-enabled",{enabled:m}),this},areControlsEnabled:function(){var m=this.controls.length,T;for(T=0;T<this.controls.length;T++)m=m&&this.controls[T].isVisible();return m},setControlsEnabled:function(m){return m?v(this):h(this),this.raiseEvent("controls-enabled",{enabled:m}),this},setDebugMode:function(m){for(var T=0;T<this.world.getItemCount();T++)this.world.getItemAt(T).debugMode=m;this.debugMode=m,this.forceRedraw()},setAjaxHeaders:function(m,T){if(m===null&&(m={}),!e.isPlainObject(m)){console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}if(T===void 0&&(T=!0),this.ajaxHeaders=m,T){for(var N=0;N<this.world.getItemCount();N++)this.world.getItemAt(N)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var re in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[re].setAjaxHeaders(this.ajaxHeaders,!0)}},addButton:function(m){this.buttonGroup.addButton(m)},isFullPage:function(){return r[this.hash]&&r[this.hash].fullPage},setFullPage:function(m){var T=document.body,N=T.style,re=document.documentElement.style,ce=this,ge,ne;if(m===this.isFullPage())return this;var Me={fullPage:m,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",Me),Me.preventDefaultAction)return this;if(m&&this.element){for(this.elementSize=e.getElementSize(this.element),this.pageScroll=e.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=N.margin,this.docMargin=re.margin,N.margin="0",re.margin="0",this.bodyPadding=N.padding,this.docPadding=re.padding,N.padding="0",re.padding="0",this.bodyWidth=N.width,this.docWidth=re.width,N.width="100%",re.width="100%",this.bodyHeight=N.height,this.docHeight=re.height,N.height="100%",re.height="100%",this.bodyDisplay=N.display,N.display="block",this.previousBody=[],r[this.hash].prevElementParent=this.element.parentNode,r[this.hash].prevNextSibling=this.element.nextSibling,r[this.hash].prevElementWidth=this.element.style.width,r[this.hash].prevElementHeight=this.element.style.height,ge=T.childNodes.length,ne=0;ne<ge;ne++)this.previousBody.push(T.childNodes[0]),T.removeChild(T.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,T.appendChild(this.toolbar.element),e.addClass(this.toolbar.element,"fullpage")),e.addClass(this.element,"fullpage"),T.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=e.getElementSize(this.element).y-e.getElementSize(this.toolbar.element).y+"px"),r[this.hash].fullPage=!0,e.delegate(this,ae)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,N.margin=this.bodyMargin,re.margin=this.docMargin,N.padding=this.bodyPadding,re.padding=this.docPadding,N.width=this.bodyWidth,re.width=this.docWidth,N.height=this.bodyHeight,re.height=this.docHeight,N.display=this.bodyDisplay,T.removeChild(this.element),ge=this.previousBody.length,ne=0;ne<ge;ne++)T.appendChild(this.previousBody.shift());e.removeClass(this.element,"fullpage"),r[this.hash].prevElementParent.insertBefore(this.element,r[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(T.removeChild(this.toolbar.element),e.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=r[this.hash].prevElementWidth,this.element.style.height=r[this.hash].prevElementHeight;var je=0,Ve=function(){e.setPageScroll(ce.pageScroll);var Ce=e.getPageScroll();je++,je<10&&(Ce.x!==ce.pageScroll.x||Ce.y!==ce.pageScroll.y)&&e.requestAnimationFrame(Ve)};e.requestAnimationFrame(Ve),r[this.hash].fullPage=!1,e.delegate(this,oe)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:m}),this},setFullScreen:function(m){var T=this;if(!e.supportsFullScreen)return this.setFullPage(m);if(e.isFullScreen()===m)return this;var N={fullScreen:m,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",N),N.preventDefaultAction)return this;if(m){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var re=function(){var ce=e.isFullScreen();ce||(e.removeEvent(document,e.fullScreenEventName,re),e.removeEvent(document,e.fullScreenErrorEventName,re),T.setFullPage(!1),T.isFullPage()&&(T.element.style.width=T.fullPageStyleWidth,T.element.style.height=T.fullPageStyleHeight)),T.navigator&&T.viewport&&setTimeout(function(){T.navigator.update(T.viewport)}),T.raiseEvent("full-screen",{fullScreen:ce})};e.addEvent(document,e.fullScreenEventName,re),e.addEvent(document,e.fullScreenErrorEventName,re),e.requestFullScreen(document.body)}else e.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},isFullScreen:function(){return e.isFullScreen()&&this.isFullPage()},setVisible:function(m){return this.container.style.visibility=m?"":"hidden",this.raiseEvent("visible",{visible:m}),this},addTiledImage:function(m){e.console.assert(m,"[Viewer.addTiledImage] options is required"),e.console.assert(m.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),e.console.assert(!m.replace||m.index>-1&&m.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var T=this;m.replace&&(m.replaceItem=T.world.getItemAt(m.index)),this._hideMessage(),m.placeholderFillStyle===void 0&&(m.placeholderFillStyle=this.placeholderFillStyle),m.opacity===void 0&&(m.opacity=this.opacity),m.preload===void 0&&(m.preload=this.preload),m.compositeOperation===void 0&&(m.compositeOperation=this.compositeOperation),m.crossOriginPolicy===void 0&&(m.crossOriginPolicy=m.tileSource.crossOriginPolicy!==void 0?m.tileSource.crossOriginPolicy:this.crossOriginPolicy),m.ajaxWithCredentials===void 0&&(m.ajaxWithCredentials=this.ajaxWithCredentials),m.loadTilesWithAjax===void 0&&(m.loadTilesWithAjax=this.loadTilesWithAjax),e.isPlainObject(m.ajaxHeaders)||(m.ajaxHeaders={});var N={options:m};function re(ne){for(var Me=0;Me<T._loadQueue.length;Me++)if(T._loadQueue[Me]===N){T._loadQueue.splice(Me,1);break}T._loadQueue.length===0&&ce(N),T.raiseEvent("add-item-failed",ne),m.error&&m.error(ne)}function ce(ne){T.collectionMode&&(T.world.arrange({immediately:ne.options.collectionImmediately,rows:T.collectionRows,columns:T.collectionColumns,layout:T.collectionLayout,tileSize:T.collectionTileSize,tileMargin:T.collectionTileMargin}),T.world.setAutoRefigureSizes(!0))}if(e.isArray(m.tileSource)){setTimeout(function(){re({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:m.tileSource,options:m})});return}this._loadQueue.push(N);function ge(){for(var ne,Me,je;T._loadQueue.length&&(ne=T._loadQueue[0],!!ne.tileSource);){if(T._loadQueue.splice(0,1),ne.options.replace){var Ve=T.world.getIndexOfItem(ne.options.replaceItem);Ve!==-1&&(ne.options.index=Ve),T.world.removeItem(ne.options.replaceItem)}Me=new e.TiledImage({viewer:T,source:ne.tileSource,viewport:T.viewport,drawer:T.drawer,tileCache:T.tileCache,imageLoader:T.imageLoader,x:ne.options.x,y:ne.options.y,width:ne.options.width,height:ne.options.height,fitBounds:ne.options.fitBounds,fitBoundsPlacement:ne.options.fitBoundsPlacement,clip:ne.options.clip,placeholderFillStyle:ne.options.placeholderFillStyle,opacity:ne.options.opacity,preload:ne.options.preload,degrees:ne.options.degrees,flipped:ne.options.flipped,compositeOperation:ne.options.compositeOperation,springStiffness:T.springStiffness,animationTime:T.animationTime,minZoomImageRatio:T.minZoomImageRatio,wrapHorizontal:T.wrapHorizontal,wrapVertical:T.wrapVertical,maxTilesPerFrame:T.maxTilesPerFrame,immediateRender:T.immediateRender,blendTime:T.blendTime,alwaysBlend:T.alwaysBlend,minPixelRatio:T.minPixelRatio,smoothTileEdgesMinZoom:T.smoothTileEdgesMinZoom,iOSDevice:T.iOSDevice,crossOriginPolicy:ne.options.crossOriginPolicy,ajaxWithCredentials:ne.options.ajaxWithCredentials,loadTilesWithAjax:ne.options.loadTilesWithAjax,ajaxHeaders:ne.options.ajaxHeaders,debugMode:T.debugMode,subPixelRoundingForTransparency:T.subPixelRoundingForTransparency}),T.collectionMode&&T.world.setAutoRefigureSizes(!1),T.navigator&&(je=e.extend({},ne.options,{replace:!1,originalTiledImage:Me,tileSource:ne.tileSource}),T.navigator.addTiledImage(je)),T.world.addItem(Me,{index:ne.options.index}),T._loadQueue.length===0&&ce(ne),T.world.getItemCount()===1&&!T.preserveViewport&&T.viewport.goHome(!0),ne.options.success&&ne.options.success({item:Me})}}a(this,m.tileSource,m,function(ne){N.tileSource=ne,ge()},function(ne){ne.options=m,re(ne),ge()})},addSimpleImage:function(m){e.console.assert(m,"[Viewer.addSimpleImage] options is required"),e.console.assert(m.url,"[Viewer.addSimpleImage] options.url is required");var T=e.extend({},m,{tileSource:{type:"image",url:m.url}});delete T.url,this.addTiledImage(T)},addLayer:function(m){var T=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var N=e.extend({},m,{success:function(re){T.raiseEvent("add-layer",{options:m,drawer:re.item})},error:function(re){T.raiseEvent("add-layer-failed",re)}});return this.addTiledImage(N),this},getLayerAtLevel:function(m){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(m)},getLevelOfLayer:function(m){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(m)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(m,T){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(m,T)},removeLayer:function(m){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(m)},forceRedraw:function(){return r[this.hash].forceRedraw=!0,this},forceResize:function(){r[this.hash].needsResize=!0,r[this.hash].forceResize=!0},bindSequenceControls:function(){var m=e.delegate(this,_),T=e.delegate(this,d),N=e.delegate(this,this.goToNextPage),re=e.delegate(this,this.goToPreviousPage),ce=this.navImages,ge=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(ge=!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:he(this.prefixUrl,ce.previous.REST),srcGroup:he(this.prefixUrl,ce.previous.GROUP),srcHover:he(this.prefixUrl,ce.previous.HOVER),srcDown:he(this.prefixUrl,ce.previous.DOWN),onRelease:re,onFocus:m,onBlur:T}),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:he(this.prefixUrl,ce.next.REST),srcGroup:he(this.prefixUrl,ce.next.GROUP),srcHover:he(this.prefixUrl,ce.next.HOVER),srcDown:he(this.prefixUrl,ce.next.DOWN),onRelease:N,onFocus:m,onBlur:T}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),ge&&(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 m=e.delegate(this,V),T=e.delegate(this,G),N=e.delegate(this,Se),re=e.delegate(this,O),ce=e.delegate(this,pe),ge=e.delegate(this,Te),ne=e.delegate(this,Ee),Me=e.delegate(this,fe),je=e.delegate(this,De),Ve=e.delegate(this,Xe),Ce=e.delegate(this,_),Ye=e.delegate(this,d),w=this.navImages,b=[],k=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(k=!1),this.showZoomControl&&(b.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:he(this.prefixUrl,w.zoomIn.REST),srcGroup:he(this.prefixUrl,w.zoomIn.GROUP),srcHover:he(this.prefixUrl,w.zoomIn.HOVER),srcDown:he(this.prefixUrl,w.zoomIn.DOWN),onPress:m,onRelease:T,onClick:N,onEnter:m,onExit:T,onFocus:Ce,onBlur:Ye})),b.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:he(this.prefixUrl,w.zoomOut.REST),srcGroup:he(this.prefixUrl,w.zoomOut.GROUP),srcHover:he(this.prefixUrl,w.zoomOut.HOVER),srcDown:he(this.prefixUrl,w.zoomOut.DOWN),onPress:re,onRelease:T,onClick:ce,onEnter:re,onExit:T,onFocus:Ce,onBlur:Ye}))),this.showHomeControl&&b.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:he(this.prefixUrl,w.home.REST),srcGroup:he(this.prefixUrl,w.home.GROUP),srcHover:he(this.prefixUrl,w.home.HOVER),srcDown:he(this.prefixUrl,w.home.DOWN),onRelease:ge,onFocus:Ce,onBlur:Ye})),this.showFullPageControl&&b.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:he(this.prefixUrl,w.fullpage.REST),srcGroup:he(this.prefixUrl,w.fullpage.GROUP),srcHover:he(this.prefixUrl,w.fullpage.HOVER),srcDown:he(this.prefixUrl,w.fullpage.DOWN),onRelease:ne,onFocus:Ce,onBlur:Ye})),this.showRotationControl&&(b.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:he(this.prefixUrl,w.rotateleft.REST),srcGroup:he(this.prefixUrl,w.rotateleft.GROUP),srcHover:he(this.prefixUrl,w.rotateleft.HOVER),srcDown:he(this.prefixUrl,w.rotateleft.DOWN),onRelease:Me,onFocus:Ce,onBlur:Ye})),b.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:he(this.prefixUrl,w.rotateright.REST),srcGroup:he(this.prefixUrl,w.rotateright.GROUP),srcHover:he(this.prefixUrl,w.rotateright.HOVER),srcDown:he(this.prefixUrl,w.rotateright.DOWN),onRelease:je,onFocus:Ce,onBlur:Ye}))),this.showFlipControl&&b.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:he(this.prefixUrl,w.flip.REST),srcGroup:he(this.prefixUrl,w.flip.GROUP),srcHover:he(this.prefixUrl,w.flip.HOVER),srcDown:he(this.prefixUrl,w.flip.DOWN),onRelease:Ve,onFocus:Ce,onBlur:Ye})),k?(this.buttonGroup=new e.ButtonGroup({buttons:b,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",e.delegate(this,_e)),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.customButtons=b),this},currentPage:function(){return this._sequenceIndex},goToPage:function(m){return this.tileSources&&m>=0&&m<this.tileSources.length&&(this._sequenceIndex=m,this._updateSequenceButtons(m),this.open(this.tileSources[m]),this.referenceStrip&&this.referenceStrip.setFocus(m),this.raiseEvent("page",{page:m})),this},addOverlay:function(m,T,N,re){var ce;if(e.isPlainObject(m)?ce=m:ce={element:m,location:T,placement:N,onDraw:re},m=e.getElement(ce.element),c(this.currentOverlays,m)>=0)return this;var ge=s(this,ce);return this.currentOverlays.push(ge),ge.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:m,location:ce.location,placement:ce.placement}),this},updateOverlay:function(m,T,N){var re;return m=e.getElement(m),re=c(this.currentOverlays,m),re>=0&&(this.currentOverlays[re].update(T,N),r[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:m,location:T,placement:N})),this},removeOverlay:function(m){var T;return m=e.getElement(m),T=c(this.currentOverlays,m),T>=0&&(this.currentOverlays[T].destroy(),this.currentOverlays.splice(T,1),r[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:m})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return r[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(m){var T;return m=e.getElement(m),T=c(this.currentOverlays,m),T>=0?this.currentOverlays[T]:null},_updateSequenceButtons:function(m){this.nextButton&&(!this.tileSources||this.tileSources.length-1===m?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(m>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(m){this._hideMessage();var T=e.makeNeutralElement("div");T.appendChild(document.createTextNode(m)),this.messageDiv=e.makeCenteredNode(T),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var m=this.messageDiv;m&&(m.parentNode.removeChild(m),delete this.messageDiv)},gestureSettingsByDeviceType:function(m){switch(m){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var m,T=this.currentOverlays.length;for(m=0;m<T;m++)this.currentOverlays[m].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(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.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var m=e.pixelDensityRatio,T=e.getCurrentPixelDensityRatio();m!==T&&(e.pixelDensityRatio=T,this.forceResize())},goToPreviousPage:function(){var m=this._sequenceIndex-1;this.navPrevNextWrap&&m<0&&(m+=this.tileSources.length),this.goToPage(m)},goToNextPage:function(){var m=this._sequenceIndex+1;this.navPrevNextWrap&&m>=this.tileSources.length&&(m=0),this.goToPage(m)},isAnimating:function(){return r[this.hash].animating}});function o(m){return m=e.getElement(m),new e.Point(m.clientWidth===0?1:m.clientWidth,m.clientHeight===0?1:m.clientHeight)}function a(m,T,N,re,ce){var ge=m;if(e.type(T)==="string"){if(T.match(/^\s*<.*>\s*$/))T=e.parseXml(T);else if(T.match(/^\s*[{[].*[}\]]\s*$/))try{var ne=e.parseJSON(T);T=ne}catch{}}function Me(je,Ve){je.ready?re(je):(je.addHandler("ready",function(){re(je)}),je.addHandler("open-failed",function(Ce){ce({message:Ce.message,source:Ve})}))}setTimeout(function(){if(e.type(T)==="string")T=new e.TileSource({url:T,crossOriginPolicy:N.crossOriginPolicy!==void 0?N.crossOriginPolicy:m.crossOriginPolicy,ajaxWithCredentials:m.ajaxWithCredentials,ajaxHeaders:N.ajaxHeaders?N.ajaxHeaders:m.ajaxHeaders,splitHashDataForPost:m.splitHashDataForPost,success:function(Ye){re(Ye.tileSource)}}),T.addHandler("open-failed",function(Ye){ce(Ye)});else if(e.isPlainObject(T)||T.nodeType)if(T.crossOriginPolicy===void 0&&(N.crossOriginPolicy!==void 0||m.crossOriginPolicy!==void 0)&&(T.crossOriginPolicy=N.crossOriginPolicy!==void 0?N.crossOriginPolicy:m.crossOriginPolicy),T.ajaxWithCredentials===void 0&&(T.ajaxWithCredentials=m.ajaxWithCredentials),e.isFunction(T.getTileUrl)){var je=new e.TileSource(T);je.getTileUrl=T.getTileUrl,re(je)}else{var Ve=e.TileSource.determineType(ge,T);if(!Ve){ce({message:"Unable to load TileSource",source:T});return}var Ce=Ve.prototype.configure.apply(ge,[T]);Me(new Ve(Ce),T)}else Me(T,T)})}function s(m,T){if(T instanceof e.Overlay)return T;var N=null;if(T.element)N=e.getElement(T.element);else{var re=T.id?T.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);N=e.getElement(T.id),N||(N=document.createElement("a"),N.href="#/overlay/"+re),N.id=re,e.addClass(N,T.className?T.className:"openseadragon-overlay")}var ce=T.location,ge=T.width,ne=T.height;if(!ce){var Me=T.x,je=T.y;if(T.px!==void 0){var Ve=m.viewport.imageToViewportRectangle(new e.Rect(T.px,T.py,ge||0,ne||0));Me=Ve.x,je=Ve.y,ge=ge!==void 0?Ve.width:void 0,ne=ne!==void 0?Ve.height:void 0}ce=new e.Point(Me,je)}var Ce=T.placement;return Ce&&e.type(Ce)==="string"&&(Ce=e.Placement[T.placement.toUpperCase()]),new e.Overlay({element:N,location:ce,placement:Ce,onDraw:T.onDraw,checkResize:T.checkResize,width:ge,height:ne,rotationMode:T.rotationMode})}function c(m,T){var N;for(N=m.length-1;N>=0;N--)if(m[N].element===T)return N;return-1}function l(m,T){return e.requestAnimationFrame(function(){T(m)})}function u(m){e.requestAnimationFrame(function(){f(m)})}function h(m){m.autoHideControls&&(m.controlsShouldFade=!0,m.controlsFadeBeginTime=e.now()+m.controlsFadeDelay,window.setTimeout(function(){u(m)},m.controlsFadeDelay))}function f(m){var T,N,re,ce;if(m.controlsShouldFade){for(T=e.now(),N=T-m.controlsFadeBeginTime,re=1-N/m.controlsFadeLength,re=Math.min(1,re),re=Math.max(0,re),ce=m.controls.length-1;ce>=0;ce--)m.controls[ce].autoFade&&m.controls[ce].setOpacity(re);re>0&&u(m)}}function v(m){var T;for(m.controlsShouldFade=!1,T=m.controls.length-1;T>=0;T--)m.controls[T].setOpacity(1)}function _(){v(this)}function d(){h(this)}function g(m){var T={tracker:m.eventSource,position:m.position,originalEvent:m.originalEvent,preventDefault:m.preventDefault};this.raiseEvent("canvas-contextmenu",T),m.preventDefault=T.preventDefault}function y(m){var T={originalEvent:m.originalEvent,preventDefaultAction:!1,preventVerticalPan:m.preventVerticalPan||!this.panVertical,preventHorizontalPan:m.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",T),!T.preventDefaultAction&&!m.ctrl&&!m.alt&&!m.meta)switch(m.keyCode){case 38:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 40:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 37:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 39:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 87:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 83:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 65:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 68:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 82:m.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),m.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:m.preventDefault=!1;break}else m.preventDefault=!1}function S(m){var T={originalEvent:m.originalEvent};this.raiseEvent("canvas-key-press",T)}function P(m){var T,N=document.activeElement===this.canvas;N||this.canvas.focus(),this.viewport.flipped&&(m.position.x=this.viewport.getContainerSize().x-m.position.x);var re={tracker:m.eventSource,position:m.position,quick:m.quick,shift:m.shift,originalEvent:m.originalEvent,originalTarget:m.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",re),!re.preventDefaultAction&&this.viewport&&m.quick&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.clickToZoom===!0&&(this.viewport.zoomBy(m.shift?1/this.zoomPerClick:this.zoomPerClick,T.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints()),T.dblClickDragToZoom&&(r[this.hash].draggingToZoom===!0?(r[this.hash].lastClickTime=null,r[this.hash].draggingToZoom=!1):r[this.hash].lastClickTime=e.now()))}function E(m){var T,N={tracker:m.eventSource,position:m.position,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",N),!N.preventDefaultAction&&this.viewport&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.dblClickToZoom&&(this.viewport.zoomBy(m.shift?1/this.zoomPerClick:this.zoomPerClick,T.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints()))}function A(m){var T,N={tracker:m.eventSource,pointerType:m.pointerType,position:m.position,delta:m.delta,speed:m.speed,direction:m.direction,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",N),T=this.gestureSettingsByDeviceType(m.pointerType),!N.preventDefaultAction&&this.viewport){if(T.dblClickDragToZoom&&r[this.hash].draggingToZoom){var re=Math.pow(this.zoomPerDblClickDrag,m.delta.y/50);this.viewport.zoomBy(re)}else if(T.dragToPan&&!r[this.hash].draggingToZoom){if(this.panHorizontal||(m.delta.x=0),this.panVertical||(m.delta.y=0),this.viewport.flipped&&(m.delta.x=-m.delta.x),this.constrainDuringPan){var ce=this.viewport.deltaPointsFromPixels(m.delta.negate());this.viewport.centerSpringX.target.value+=ce.x,this.viewport.centerSpringY.target.value+=ce.y;var ge=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=ce.x,this.viewport.centerSpringY.target.value-=ce.y,ge.xConstrained&&(m.delta.x=0),ge.yConstrained&&(m.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(m.delta.negate()),T.flickEnabled&&!this.constrainDuringPan)}}}function B(m){var T,N={tracker:m.eventSource,pointerType:m.pointerType,position:m.position,speed:m.speed,direction:m.direction,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",N),T=this.gestureSettingsByDeviceType(m.pointerType),!N.preventDefaultAction&&this.viewport){if(!r[this.hash].draggingToZoom&&T.dragToPan&&T.flickEnabled&&m.speed>=T.flickMinSpeed){var re=0;this.panHorizontal&&(re=T.flickMomentum*m.speed*Math.cos(m.direction));var ce=0;this.panVertical&&(ce=T.flickMomentum*m.speed*Math.sin(m.direction));var ge=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),ne=this.viewport.pointFromPixel(new e.Point(ge.x-re,ge.y-ce));this.viewport.panTo(ne,!1)}this.viewport.applyConstraints()}T.dblClickDragToZoom&&r[this.hash].draggingToZoom===!0&&(r[this.hash].draggingToZoom=!1)}function q(m){this.raiseEvent("canvas-enter",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function z(m){this.raiseEvent("canvas-exit",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function I(m){var T;if(this.raiseEvent("canvas-press",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,insideElementPressed:m.insideElementPressed,insideElementReleased:m.insideElementReleased,originalEvent:m.originalEvent}),T=this.gestureSettingsByDeviceType(m.pointerType),T.dblClickDragToZoom){var N=r[this.hash].lastClickTime,re=e.now();if(N===null)return;re-N<this.dblClickTimeThreshold&&(r[this.hash].draggingToZoom=!0),r[this.hash].lastClickTime=null}}function M(m){this.raiseEvent("canvas-release",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,insideElementPressed:m.insideElementPressed,insideElementReleased:m.insideElementReleased,originalEvent:m.originalEvent})}function J(m){this.raiseEvent("canvas-nonprimary-press",{tracker:m.eventSource,position:m.position,pointerType:m.pointerType,button:m.button,buttons:m.buttons,originalEvent:m.originalEvent})}function ee(m){this.raiseEvent("canvas-nonprimary-release",{tracker:m.eventSource,position:m.position,pointerType:m.pointerType,button:m.button,buttons:m.buttons,originalEvent:m.originalEvent})}function ie(m){var T,N,re,ce,ge={tracker:m.eventSource,pointerType:m.pointerType,gesturePoints:m.gesturePoints,lastCenter:m.lastCenter,center:m.center,lastDistance:m.lastDistance,distance:m.distance,shift:m.shift,originalEvent:m.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",ge),this.viewport&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.pinchToZoom&&(!ge.preventDefaultPanAction||!ge.preventDefaultZoomAction)&&(N=this.viewport.pointFromPixel(m.center,!0),T.zoomToRefPoint&&!ge.preventDefaultPanAction&&(re=this.viewport.pointFromPixel(m.lastCenter,!0),ce=re.minus(N),this.panHorizontal||(ce.x=0),this.panVertical||(ce.y=0),this.viewport.panBy(ce,!0)),ge.preventDefaultZoomAction||this.viewport.zoomBy(m.distance/m.lastDistance,N,!0),this.viewport.applyConstraints()),T.pinchRotate&&!ge.preventDefaultRotateAction)){var ne=Math.atan2(m.gesturePoints[0].currentPos.y-m.gesturePoints[1].currentPos.y,m.gesturePoints[0].currentPos.x-m.gesturePoints[1].currentPos.x),Me=Math.atan2(m.gesturePoints[0].lastPos.y-m.gesturePoints[1].lastPos.y,m.gesturePoints[0].lastPos.x-m.gesturePoints[1].lastPos.x);N=this.viewport.pointFromPixel(m.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(ne-Me)*(180/Math.PI),N,!0)}}function L(m){this.raiseEvent("canvas-focus",{tracker:m.eventSource,originalEvent:m.originalEvent})}function F(m){this.raiseEvent("canvas-blur",{tracker:m.eventSource,originalEvent:m.originalEvent})}function X(m){var T,N,re,ce,ge;ce=e.now(),ge=ce-this._lastScrollTime,ge>this.minScrollDeltaTime?(this._lastScrollTime=ce,T={tracker:m.eventSource,position:m.position,scroll:m.scroll,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",T),!T.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(m.position.x=this.viewport.getContainerSize().x-m.position.x),N=this.gestureSettingsByDeviceType(m.pointerType),N.scrollToZoom&&(re=Math.pow(this.zoomPerScroll,m.scroll),this.viewport.zoomBy(re,N.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints())),m.preventDefault=T.preventDefault):m.preventDefault=!0}function ae(m){r[this.hash].mouseInside=!0,v(this),this.raiseEvent("container-enter",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function oe(m){m.pointers<1&&(r[this.hash].mouseInside=!1,r[this.hash].animating||h(this)),this.raiseEvent("container-exit",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function H(m){we(m),m.isOpen()?m._updateRequestId=l(m,H):m._updateRequestId=!1}function Y(m,T){var N=m.viewport,re=N.getZoom(),ce=N.getCenter();N.resize(T,m.preserveImageSizeOnResize),N.panTo(ce,!0);var ge;if(m.preserveImageSizeOnResize)ge=r[m.hash].prevContainerSize.x/T.x;else{var ne=new e.Point(0,0),Me=new e.Point(r[m.hash].prevContainerSize.x,r[m.hash].prevContainerSize.y).distanceTo(ne),je=new e.Point(T.x,T.y).distanceTo(ne);ge=je/Me*r[m.hash].prevContainerSize.x/T.x}N.zoomTo(re*ge,null,!0),r[m.hash].prevContainerSize=T,r[m.hash].forceRedraw=!0,r[m.hash].needsResize=!1,r[m.hash].forceResize=!1}function we(m){if(!(m._opening||!r[m.hash])){if(m.autoResize||r[m.hash].forceResize){var T;if(m._autoResizePolling){T=o(m.container);var N=r[m.hash].prevContainerSize;T.equals(N)||(r[m.hash].needsResize=!0)}r[m.hash].needsResize&&Y(m,T||o(m.container))}var re=m.viewport.update(),ce=m.world.update(re)||re;re&&m.raiseEvent("viewport-change"),m.referenceStrip&&(ce=m.referenceStrip.update(m.viewport)||ce);var ge=r[m.hash].animating;!ge&&ce&&(m.raiseEvent("animation-start"),v(m));var ne=ge&&!ce;ne&&(r[m.hash].animating=!1),(ce||ne||r[m.hash].forceRedraw||m.world.needsDraw())&&(ke(m),m._drawOverlays(),m.navigator&&m.navigator.update(m.viewport),r[m.hash].forceRedraw=!1,ce&&m.raiseEvent("animation")),ne&&(m.raiseEvent("animation-finish"),r[m.hash].mouseInside||h(m)),r[m.hash].animating=ce}}function ke(m){m.imageLoader.clear(),m.world.draw(),m.raiseEvent("update-viewport",{})}function he(m,T){return m?m+T:T}function V(){r[this.hash].lastZoomTime=e.now(),r[this.hash].zoomFactor=this.zoomPerSecond,r[this.hash].zooming=!0,se(this)}function O(){r[this.hash].lastZoomTime=e.now(),r[this.hash].zoomFactor=1/this.zoomPerSecond,r[this.hash].zooming=!0,se(this)}function G(){r[this.hash].zooming=!1}function se(m){e.requestAnimationFrame(e.delegate(m,le))}function le(){var m,T,N;r[this.hash].zooming&&this.viewport&&(m=e.now(),T=m-r[this.hash].lastZoomTime,N=Math.pow(r[this.hash].zoomFactor,T/1e3),this.viewport.zoomBy(N),this.viewport.applyConstraints(),r[this.hash].lastZoomTime=m,se(this))}function Se(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function pe(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function _e(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function Te(){this.viewport&&this.viewport.goHome()}function Ee(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function fe(){if(this.viewport){var m=this.viewport.getRotation();this.viewport.flipped?m+=this.rotationIncrement:m-=this.rotationIncrement,this.viewport.setRotation(m)}}function De(){if(this.viewport){var m=this.viewport.getRotation();this.viewport.flipped?m-=this.rotationIncrement:m+=this.rotationIncrement,this.viewport.setRotation(m)}}function Xe(){this.viewport.toggleFlip()}e.determineDrawer=function(m){for(let T in t){const N=t[T],re=N.prototype;if(re&&re instanceof t.DrawerBase&&e.isFunction(re.getType)&&re.getType.call(N)===m)return N}return null}})(t),(function(e){e.Navigator=function(l){var u=l.viewer,h=this,f,v;l.element||l.id?(l.element?(l.id&&e.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),l.element.id?l.id=l.element.id:l.id="navigator-"+e.now(),this.element=l.element):this.element=document.getElementById(l.id),l.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(l.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),l.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:l.autoFade},l.position&&(l.position==="BOTTOM_RIGHT"?l.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:l.position==="BOTTOM_LEFT"?l.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:l.position==="TOP_RIGHT"?l.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:l.position==="TOP_LEFT"?l.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:l.position==="ABSOLUTE"&&(l.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,l.controlOptions.top=l.top,l.controlOptions.left=l.left,l.controlOptions.height=l.height,l.controlOptions.width=l.width))),this.element.id=l.id,this.element.className+=" navigator",l=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},l,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:l.animationTime,autoResize:!1,minZoomImageRatio:1,background:l.background,opacity:l.opacity,borderColor:l.borderColor,displayRegionColor:l.displayRegionColor}),l.minPixelRatio=this.minPixelRatio=u.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),l.controlOptions.anchor!==e.ControlAnchor.NONE&&(function(g,y){g.margin="0px",g.border=y+"px solid "+l.borderColor,g.padding="0px",g.background=l.background,g.opacity=l.opacity,g.overflow="hidden"})(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",(function(g,y){g.position="relative",g.top="0px",g.left="0px",g.fontSize="0px",g.overflow="hidden",g.border=y+"px solid "+l.displayRegionColor,g.margin="0px",g.padding="0px",g.background="transparent",g.float="left",g.cssFloat="left",g.zIndex=999999999,g.cursor="default",g.boxSizing="content-box"})(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),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%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),u.addControl(this.element,l.controlOptions),this._resizeWithViewer=l.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&l.controlOptions.anchor!==e.ControlAnchor.NONE,l.width&&l.height?(this.setWidth(l.width),this.setHeight(l.height)):this._resizeWithViewer&&(f=e.getElementSize(u.element),this.element.style.height=Math.round(f.y*l.sizeRatio)+"px",this.element.style.width=Math.round(f.x*l.sizeRatio)+"px",this.oldViewerSize=f,v=e.getElementSize(this.element),this.elementArea=v.x*v.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[l]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function _(g,y){s(h.displayRegionContainer,g),s(h.displayRegion,-g),h.viewport.setRotation(g,y)}if(l.navigatorRotate){var d=l.viewer.viewport?l.viewer.viewport.getRotation():l.viewer.degrees||0;_(d,!0),l.viewer.addHandler("rotate",function(g){_(g.degrees,g.immediately)})}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,r),releaseHandler:e.delegate(this,o),scrollHandler:e.delegate(this,a),preProcessEventHandler:function(g){g.eventType==="wheel"&&(g.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){h.viewport&&h.viewport.goHome(!0)}),u.world.addHandler("item-index-change",function(g){window.setTimeout(function(){var y=h.world.getItemAt(g.previousIndex);h.world.setItemIndex(y,g.newIndex)},1)}),u.world.addHandler("remove-item",function(g){var y=g.item,S=h._getMatchingItem(y);S&&h.world.removeItem(S)}),this.update(u.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var l=new e.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);l.equals(this.oldContainerSize)||(this.viewport.resize(l,!0),this.viewport.goHome(!0),this.oldContainerSize=l,this.world.update(),this.world.draw(),this.update(this.viewer.viewport))}},setWidth:function(l){this.width=l,this.element.style.width=typeof l=="number"?l+"px":l,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(l){this.height=l,this.element.style.height=typeof l=="number"?l+"px":l,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(l){return this.viewport.setFlip(l),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(l){c(this.canvas,l),c(this.element,l)},update:function(l){var u,h,f,v,_,d;if(l||(l=this.viewer.viewport),u=e.getElementSize(this.viewer.element),this._resizeWithViewer&&u.x&&u.y&&!u.equals(this.oldViewerSize)&&(this.oldViewerSize=u,this.maintainSizeRatio||!this.elementArea?(h=u.x*this.sizeRatio,f=u.y*this.sizeRatio):(h=Math.sqrt(this.elementArea*(u.x/u.y)),f=this.elementArea/h),this.element.style.width=Math.round(h)+"px",this.element.style.height=Math.round(f)+"px",this.elementArea||(this.elementArea=h*f),this.updateSize()),l&&this.viewport){if(v=l.getBoundsNoRotate(!0),_=this.viewport.pixelFromPointNoRotate(v.getTopLeft(),!1),d=this.viewport.pixelFromPointNoRotate(v.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var g=l.getRotation(!0);s(this.displayRegion,-g)}var y=this.displayRegion.style;y.display=this.world.getItemCount()?"block":"none",y.top=_.y.toFixed(2)+"px",y.left=_.x.toFixed(2)+"px";var S=d.x-_.x,P=d.y-_.y;y.width=Math.round(Math.max(S,0))+"px",y.height=Math.round(Math.max(P,0))+"px"}},addTiledImage:function(l){var u=this,h=l.originalTiledImage;delete l.original;var f=e.extend({},l,{success:function(v){var _=v.item;_._originalForNavigator=h,u._matchBounds(_,h,!0),u._matchOpacity(_,h),u._matchCompositeOperation(_,h);function d(){u._matchBounds(_,h)}function g(){u._matchOpacity(_,h)}function y(){u._matchCompositeOperation(_,h)}h.addHandler("bounds-change",d),h.addHandler("clip-change",d),h.addHandler("opacity-change",g),h.addHandler("composite-operation-change",y)}});return e.Viewer.prototype.addTiledImage.apply(this,[f])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(l){for(var u=this.world.getItemCount(),h,f=0;f<u;f++)if(h=this.world.getItemAt(f),h._originalForNavigator===l)return h;return null},_matchBounds:function(l,u,h){var f=u.getBoundsNoRotate();l.setPosition(f.getTopLeft(),h),l.setWidth(f.width,h),l.setRotation(u.getRotation(),h),l.setClip(u.getClip()),l.setFlip(u.getFlip())},_matchOpacity:function(l,u){l.setOpacity(u.opacity)},_matchCompositeOperation:function(l,u){l.setCompositeOperation(u.compositeOperation)}});function r(l){var u={tracker:l.eventSource,position:l.position,quick:l.quick,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",u),!u.preventDefaultAction&&l.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(l.position.x=this.viewport.getContainerSize().x-l.position.x);var h=this.viewport.pointFromPixel(l.position);this.panVertical?this.panHorizontal||(h.x=this.viewer.viewport.getCenter(!0).x):h.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(h),this.viewer.viewport.applyConstraints()}}function n(l){var u={tracker:l.eventSource,position:l.position,delta:l.delta,speed:l.speed,direction:l.direction,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",u),!u.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(l.delta.x=0),this.panVertical||(l.delta.y=0),this.viewer.viewport.flipped&&(l.delta.x=-l.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(l.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function o(l){l.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function a(l){var u={tracker:l.eventSource,position:l.position,scroll:l.scroll,shift:l.shift,originalEvent:l.originalEvent,preventDefault:l.preventDefault};this.viewer.raiseEvent("navigator-scroll",u),l.preventDefault=u.preventDefault}function s(l,u){c(l,"rotate("+u+"deg)")}function c(l,u){l.style.webkitTransform=u,l.style.mozTransform=u,l.style.msTransform=u,l.style.oTransform=u,l.style.transform=u}})(t),(function(e){var r={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};e.extend(e,{getString:function(n){var o=n.split("."),a=null,s=arguments,c=r,l;for(l=0;l<o.length-1;l++)c=c[o[l]]||{};return a=c[o[l]],typeof a!="string"&&(e.console.error("Untranslated source string:",n),a=""),a.replace(/\{\d+\}/g,function(u){var h=parseInt(u.match(/\d+/),10)+1;return h<s.length?s[h]:""})},setString:function(n,o){var a=n.split("."),s=r,c;for(c=0;c<a.length-1;c++)s[a[c]]||(s[a[c]]={}),s=s[a[c]];s[a[c]]=o}})})(t),(function(e){e.Point=function(r,n){this.x=typeof r=="number"?r:0,this.y=typeof n=="number"?n:0},e.Point.prototype={clone:function(){return new e.Point(this.x,this.y)},plus:function(r){return new e.Point(this.x+r.x,this.y+r.y)},minus:function(r){return new e.Point(this.x-r.x,this.y-r.y)},times:function(r){return new e.Point(this.x*r,this.y*r)},divide:function(r){return new e.Point(this.x/r,this.y/r)},negate:function(){return new e.Point(-this.x,-this.y)},distanceTo:function(r){return Math.sqrt(Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2))},squaredDistanceTo:function(r){return Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2)},apply:function(r){return new e.Point(r(this.x),r(this.y))},equals:function(r){return r instanceof e.Point&&this.x===r.x&&this.y===r.y},rotate:function(r,n){n=n||new e.Point(0,0);var o,a;if(r%90===0){var s=e.positiveModulo(r,360);switch(s){case 0:o=1,a=0;break;case 90:o=0,a=1;break;case 180:o=-1,a=0;break;case 270:o=0,a=-1;break}}else{var c=r*Math.PI/180;o=Math.cos(c),a=Math.sin(c)}var l=o*(this.x-n.x)-a*(this.y-n.y)+n.x,u=a*(this.x-n.x)+o*(this.y-n.y)+n.y;return new e.Point(l,u)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}})(t),(function(e){e.TileSource=function(n,o,a,s,c,l){var u=this,h=arguments,f,v;if(e.isPlainObject(n)?f=n:f={width:h[0],height:h[1],tileSize:h[2],tileOverlap:h[3],minLevel:h[4],maxLevel:h[5]},e.EventSource.call(this),e.extend(!0,this,f),!this.success){for(v=0;v<arguments.length;v++)if(e.isFunction(arguments[v])){this.success=arguments[v];break}}this.success&&this.addHandler("ready",function(_){u.success(_)}),e.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new e.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=f.width&&f.height?f.width/f.height:1,this.dimensions=new e.Point(f.width,f.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=f.tileOverlap?f.tileOverlap:0,this.minLevel=f.minLevel?f.minLevel:0,this.maxLevel=f.maxLevel!==void 0&&f.maxLevel!==null?f.maxLevel:f.width&&f.height?Math.ceil(Math.log(Math.max(f.width,f.height))/Math.log(2)):0,this.success&&e.isFunction(this.success)&&this.success(this))},e.TileSource.prototype={getTileSize:function(n){return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(n){return this._tileWidth?this._tileWidth:this.getTileSize(n)},getTileHeight:function(n){return this._tileHeight?this._tileHeight:this.getTileSize(n)},setMaxLevel:function(n){this.maxLevel=n,this._memoizeLevelScale()},getLevelScale:function(n){return this._memoizeLevelScale(),this.getLevelScale(n)},_memoizeLevelScale:function(){var n={},o;for(o=0;o<=this.maxLevel;o++)n[o]=1/Math.pow(2,this.maxLevel-o);this.getLevelScale=function(a){return n[a]}},getNumTiles:function(n){var o=this.getLevelScale(n),a=Math.ceil(o*this.dimensions.x/this.getTileWidth(n)),s=Math.ceil(o*this.dimensions.y/this.getTileHeight(n));return new e.Point(a,s)},getPixelRatio:function(n){var o=this.dimensions.times(this.getLevelScale(n)),a=1/o.x*e.pixelDensityRatio,s=1/o.y*e.pixelDensityRatio;return new e.Point(a,s)},getClosestLevel:function(){var n,o;for(n=this.minLevel+1;n<=this.maxLevel&&(o=this.getNumTiles(n),!(o.x>1||o.y>1));n++);return n-1},getTileAtPoint:function(n,o){var a=o.x>=0&&o.x<=1&&o.y>=0&&o.y<=1/this.aspectRatio;e.console.assert(a,"[TileSource.getTileAtPoint] must be called with a valid point.");var s=this.dimensions.x*this.getLevelScale(n),c=o.x*s,l=o.y*s,u=Math.floor(c/this.getTileWidth(n)),h=Math.floor(l/this.getTileHeight(n));o.x>=1&&(u=this.getNumTiles(n).x-1);var f=1e-15;return o.y>=1/this.aspectRatio-f&&(h=this.getNumTiles(n).y-1),new e.Point(u,h)},getTileBounds:function(n,o,a,s){var c=this.dimensions.times(this.getLevelScale(n)),l=this.getTileWidth(n),u=this.getTileHeight(n),h=o===0?0:l*o-this.tileOverlap,f=a===0?0:u*a-this.tileOverlap,v=l+(o===0?1:2)*this.tileOverlap,_=u+(a===0?1:2)*this.tileOverlap,d=1/c.x;return v=Math.min(v,c.x-h),_=Math.min(_,c.y-f),s?new e.Rect(0,0,v,_):new e.Rect(h*d,f*d,v*d,_*d)},getImageInfo:function(n){var o=this,a,s,c,l,u,h,f;n&&(u=n.split("/"),h=u[u.length-1],f=h.lastIndexOf("."),f>-1&&(u[u.length-1]=h.slice(0,f)));var v=null;if(this.splitHashDataForPost){var _=n.indexOf("#");_!==-1&&(v=n.substring(_+1),n=n.substr(0,_))}s=function(d){typeof d=="string"&&(d=e.parseXml(d));var g=e.TileSource.determineType(o,d,n);if(!g){o.raiseEvent("open-failed",{message:"Unable to load TileSource",source:n});return}l=g.prototype.configure.apply(o,[d,n,v]),l.ajaxWithCredentials===void 0&&(l.ajaxWithCredentials=o.ajaxWithCredentials),c=new g(l),o.ready=!0,o.raiseEvent("ready",{tileSource:c})},n.match(/\.js$/)?(a=n.split("/").pop().replace(".js",""),e.jsonp({url:n,async:!1,callbackName:a,callback:s})):e.makeAjaxRequest({url:n,postData:v,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(d){var g=r(d);s(g)},error:function(d,g){var y;try{y="HTTP "+d.status+" attempting to load TileSource: "+n}catch{var S;typeof g>"u"||!g.toString?S="Unknown error":S=g.toString(),y=S+" attempting to load TileSource: "+n}e.console.error(y),o.raiseEvent("open-failed",{message:y,source:n,postData:v})}})},supports:function(n,o){return!1},configure:function(n,o,a){throw new Error("Method not implemented.")},getTileUrl:function(n,o,a){throw new Error("Method not implemented.")},getTilePostData:function(n,o,a){return null},getTileAjaxHeaders:function(n,o,a){return{}},getTileHashKey:function(n,o,a,s,c,l){function u(h){return c?h+"+"+JSON.stringify(c):h}return u(typeof s!="string"?n+"/"+o+"_"+a:s)},tileExists:function(n,o,a){var s=this.getNumTiles(n);return n>=this.minLevel&&n<=this.maxLevel&&o>=0&&a>=0&&o<s.x&&a<s.y},hasTransparency:function(n,o,a,s){return!!n||o.match(".png")},downloadTileStart:function(n){var o=n.userData,a=new Image;o.image=a,o.request=null;var s=function(c){if(!a){n.finish(null,o.request,"Image load failed: undefined Image instance.");return}a.onload=a.onerror=a.onabort=null,n.finish(c?null:a,o.request,c)};a.onload=function(){s()},a.onabort=a.onerror=function(){s("Image load aborted.")},n.loadWithAjax?o.request=e.makeAjaxRequest({url:n.src,withCredentials:n.ajaxWithCredentials,headers:n.ajaxHeaders,responseType:"arraybuffer",postData:n.postData,success:function(c){var l;try{l=new window.Blob([c.response])}catch(f){var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(f.name==="TypeError"&&u){var h=new u;h.append(c.response),l=h.getBlob()}}l.size===0?s("Empty image response."):a.src=(window.URL||window.webkitURL).createObjectURL(l)},error:function(c){s("Image load aborted - XHR error")}}):(n.crossOriginPolicy!==!1&&(a.crossOrigin=n.crossOriginPolicy),a.src=n.src)},downloadTileAbort:function(n){n.userData.request&&n.userData.request.abort();var o=n.userData.image;n.userData.image&&(o.onload=o.onerror=o.onabort=null)},createTileCache:function(n,o,a){n._data=o},destroyTileCache:function(n){n._data=null,n._renderedContext=null},getTileCacheData:function(n){return n._data},getTileCacheDataAsImage:function(n){return n._data},getTileCacheDataAsContext2D:function(n){if(!n._renderedContext){var o=document.createElement("canvas");o.width=n._data.width,o.height=n._data.height,n._renderedContext=o.getContext("2d"),n._renderedContext.drawImage(n._data,0,0),n._data=null}return n._renderedContext}},e.extend(!0,e.TileSource.prototype,e.EventSource.prototype);function r(n){var o=n.responseText,a=n.status,s,c;if(n){if(n.status!==200&&n.status!==0)throw a=n.status,s=a===404?"Not Found":n.statusText,new Error(e.getString("Errors.Status",a,s))}else throw new Error(e.getString("Errors.Security"));if(o.match(/^\s*<.*/))try{c=n.responseXML&&n.responseXML.documentElement?n.responseXML:e.parseXml(o)}catch{c=n.responseText}else if(o.match(/\s*[{[].*/))try{c=e.parseJSON(o)}catch{c=o}else c=o;return c}e.TileSource.determineType=function(n,o,a){var s;for(s in t)if(s.match(/.+TileSource$/)&&e.isFunction(t[s])&&e.isFunction(t[s].prototype.supports)&&t[s].prototype.supports.call(n,o,a))return t[s];return e.console.error("No TileSource was able to open %s %s",a,o),null}})(t),(function(e){e.DziTileSource=function(o,a,s,c,l,u,h,f,v){var _,d,g,y;if(e.isPlainObject(o)?y=o:y={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=y.tilesUrl,this.fileFormat=y.fileFormat,this.displayRects=y.displayRects,this.displayRects)for(_=this.displayRects.length-1;_>=0;_--)for(d=this.displayRects[_],g=d.minLevel;g<=d.maxLevel;g++)this._levelRects[g]||(this._levelRects[g]=[]),this._levelRects[g].push(d);e.TileSource.apply(this,[y])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(o,a){var s;return o.Image?s=o.Image.xmlns:o.documentElement&&(o.documentElement.localName==="Image"||o.documentElement.tagName==="Image")&&(s=o.documentElement.namespaceURI),s=(s||"").toLowerCase(),s.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||s.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(o,a,s){var c;return e.isPlainObject(o)?c=n(this,o):c=r(this,o),a&&!c.tilesUrl&&(c.tilesUrl=a.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),a.search(/\.(dzi|xml|js)\?/)!==-1?c.queryParams=a.match(/\?.*/):c.queryParams=""),c},getTileUrl:function(o,a,s){return[this.tilesUrl,o,"/",a,"_",s,".",this.fileFormat,this.queryParams].join("")},tileExists:function(o,a,s){var c=this._levelRects[o],l,u,h,f,v,_,d;if(this.minLevel&&o<this.minLevel||this.maxLevel&&o>this.maxLevel)return!1;if(!c||!c.length)return!0;for(d=c.length-1;d>=0;d--)if(l=c[d],!(o<l.minLevel||o>l.maxLevel)&&(u=this.getLevelScale(o),h=l.x*u,f=l.y*u,v=h+l.width*u,_=f+l.height*u,h=Math.floor(h/this._tileWidth),f=Math.floor(f/this._tileWidth),v=Math.ceil(v/this._tileWidth),_=Math.ceil(_/this._tileWidth),h<=a&&a<v&&f<=s&&s<_))return!0;return!1}});function r(o,a){if(!a||!a.documentElement)throw new Error(e.getString("Errors.Xml"));var s=a.documentElement,c=s.localName||s.tagName,l=a.documentElement.namespaceURI,u=null,h=[],f,v,_,d,g;if(c==="Image")try{if(d=s.getElementsByTagName("Size")[0],d===void 0&&(d=s.getElementsByTagNameNS(l,"Size")[0]),u={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:s.getAttribute("Url"),Format:s.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(s.getAttribute("Overlap"),10),TileSize:parseInt(s.getAttribute("TileSize"),10),Size:{Height:parseInt(d.getAttribute("Height"),10),Width:parseInt(d.getAttribute("Width"),10)}}},!e.imageFormatSupported(u.Image.Format))throw new Error(e.getString("Errors.ImageFormat",u.Image.Format.toUpperCase()));for(f=s.getElementsByTagName("DisplayRect"),f===void 0&&(f=s.getElementsByTagNameNS(l,"DisplayRect")[0]),g=0;g<f.length;g++)v=f[g],_=v.getElementsByTagName("Rect")[0],_===void 0&&(_=v.getElementsByTagNameNS(l,"Rect")[0]),h.push({Rect:{X:parseInt(_.getAttribute("X"),10),Y:parseInt(_.getAttribute("Y"),10),Width:parseInt(_.getAttribute("Width"),10),Height:parseInt(_.getAttribute("Height"),10),MinLevel:parseInt(v.getAttribute("MinLevel"),10),MaxLevel:parseInt(v.getAttribute("MaxLevel"),10)}});return h.length&&(u.Image.DisplayRect=h),n(o,u)}catch(P){throw P instanceof Error?P:new Error(e.getString("Errors.Dzi"))}else{if(c==="Collection")throw new Error(e.getString("Errors.Dzc"));if(c==="Error"){var y=s.getElementsByTagName("Message")[0],S=y.firstChild.nodeValue;throw new Error(S)}}throw new Error(e.getString("Errors.Dzi"))}function n(o,a){var s=a.Image,c=s.Url,l=s.Format,u=s.Size,h=s.DisplayRect||[],f=parseInt(u.Width,10),v=parseInt(u.Height,10),_=parseInt(s.TileSize,10),d=parseInt(s.Overlap,10),g=[],y,S;for(S=0;S<h.length;S++)y=h[S].Rect,g.push(new e.DisplayRect(parseInt(y.X,10),parseInt(y.Y,10),parseInt(y.Width,10),parseInt(y.Height,10),parseInt(y.MinLevel,10),parseInt(y.MaxLevel,10)));return e.extend(!0,{width:f,height:v,tileSize:_,tileOverlap:d,minLevel:null,maxLevel:null,tilesUrl:c,fileFormat:l,displayRects:g},a)}})(t),(function(e){e.IIIFTileSource=function(s){if(e.extend(!0,this,s),this._id=this["@id"]||this.id||this.identifier||null,!(this.height&&this.width&&this._id))throw new Error("IIIF required parameters (width, height, or id) not provided.");if(s.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=s.version,this.tile_width&&this.tile_height)s.tileWidth=this.tile_width,s.tileHeight=this.tile_height;else if(this.tile_width)s.tileSize=this.tile_width;else if(this.tile_height)s.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)s.tileWidth=this.tiles[0].width,s.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var c=0;c<this.tiles.length;c++)for(var l=0;l<this.tiles[c].scaleFactors.length;l++){var u=this.tiles[c].scaleFactors[l];this.scale_factors.push(u),s.tileSizePerScaleFactor[u]={width:this.tiles[c].width,height:this.tiles[c].height||this.tiles[c].width}}}else if(r(s)){for(var h=Math.min(this.height,this.width),f=[256,512,1024],v=[],_=0;_<f.length;_++)f[_]<=h&&v.push(f[_]);v.length>0?s.tileSize=Math.max.apply(null,v):s.tileSize=h}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,s.levels=n(this),e.extend(!0,s,{width:s.levels[s.levels.length-1].width,height:s.levels[s.levels.length-1].height,tileSize:Math.max(s.height,s.width),tileOverlap:0,minLevel:0,maxLevel:s.levels.length-1}),this.levels=s.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!s.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)s.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));else{var d=Math.max.apply(null,this.scale_factors);s.maxLevel=Math.round(Math.log(d)*Math.LOG2E)}if(this.sizes){var g=this.sizes.length;(g===s.maxLevel||g===s.maxLevel+1)&&(this.levelSizes=this.sizes.slice().sort((y,S)=>y.width-S.width),g===s.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}e.TileSource.apply(this,[s])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(s,c){return s.protocol&&s.protocol==="http://iiif.io/api/image"||s["@context"]&&(s["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||s["@context"]==="http://iiif.io/api/image/1/context.json")||s.profile&&s.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||s.identifier&&s.width&&s.height?!0:!!(s.documentElement&&s.documentElement.tagName==="info"&&s.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(s,c,l){if(e.isPlainObject(s)){if(!s["@context"])s["@context"]="http://iiif.io/api/image/1.0/context.json",s["@id"]=c.replace("/info.json",""),s.version=1;else{var h=s["@context"];if(Array.isArray(h)){for(var f=0;f<h.length;f++)if(typeof h[f]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(h[f])||h[f]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){h=h[f];break}}switch(h){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":s.version=1;break;case"http://iiif.io/api/image/2/context.json":s.version=2;break;case"http://iiif.io/api/image/3/context.json":s.version=3;break;default:e.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(s.preferredFormats){for(var v=0;v<s.preferredFormats.length;v++)if(t.imageFormatSupported(s.preferredFormats[v])){s.tileFormat=s.preferredFormats[v];break}}return s}else{var u=o(s);return u["@context"]="http://iiif.io/api/image/1.0/context.json",u["@id"]=c.replace("/info.xml",""),u.version=1,u}},getTileWidth:function(s){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileWidth.call(this,s);var c=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[c]?this.tileSizePerScaleFactor[c].width:this._tileWidth},getTileHeight:function(s){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileHeight.call(this,s);var c=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[c]?this.tileSizePerScaleFactor[c].height:this._tileHeight},getLevelScale:function(s){if(this.emulateLegacyImagePyramid){var c=NaN;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(c=this.levels[s].width/this.levels[this.maxLevel].width),c}return e.TileSource.prototype.getLevelScale.call(this,s)},getNumTiles:function(s){if(this.emulateLegacyImagePyramid){var c=this.getLevelScale(s);return c?new e.Point(1,1):new e.Point(0,0)}if(this.levelSizes){var l=this.levelSizes[s],u=Math.ceil(l.width/this.getTileWidth(s)),h=Math.ceil(l.height/this.getTileHeight(s));return new e.Point(u,h)}else return e.TileSource.prototype.getNumTiles.call(this,s)},getTileAtPoint:function(s,c){if(this.emulateLegacyImagePyramid)return new e.Point(0,0);if(this.levelSizes){var l=c.x>=0&&c.x<=1&&c.y>=0&&c.y<=1/this.aspectRatio;e.console.assert(l,"[TileSource.getTileAtPoint] must be called with a valid point.");var u=this.levelSizes[s].width,h=c.x*u,f=c.y*u,v=Math.floor(h/this.getTileWidth(s)),_=Math.floor(f/this.getTileHeight(s));c.x>=1&&(v=this.getNumTiles(s).x-1);var d=1e-15;return c.y>=1/this.aspectRatio-d&&(_=this.getNumTiles(s).y-1),new e.Point(v,_)}return e.TileSource.prototype.getTileAtPoint.call(this,s,c)},getTileUrl:function(s,c,l){if(this.emulateLegacyImagePyramid){var u=null;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(u=this.levels[s].url),u}var h="0",f=Math.pow(.5,this.maxLevel-s),v,_,d,g,y,S,P,E,A,B,q,z,I,M,J,ee;return this.levelSizes?(v=this.levelSizes[s].width,_=this.levelSizes[s].height):(v=Math.ceil(this.width*f),_=Math.ceil(this.height*f)),d=this.getTileWidth(s),g=this.getTileHeight(s),y=Math.round(d/f),S=Math.round(g/f),this.version===1?J="native."+this.tileFormat:J="default."+this.tileFormat,v<d&&_<g?(this.version===2&&v===this.width?z="full":this.version===3&&v===this.width&&_===this.height?z="max":this.version===3?z=v+","+_:z=v+",",P="full"):(E=c*y,A=l*S,B=Math.min(y,this.width-E),q=Math.min(S,this.height-A),c===0&&l===0&&B===this.width&&q===this.height?P="full":P=[E,A,B,q].join(","),I=Math.min(d,v-c*d),M=Math.min(g,_-l*g),this.version===2&&I===this.width?z="full":this.version===3&&I===this.width&&M===this.height?z="max":this.version===3?z=I+","+M:z=I+","),ee=[this._id,P,z,h,J].join("/"),ee},__testonly__:{canBeTiled:r,constructLevels:n}});function r(s){var c=["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"],l=Array.isArray(s.profile)?s.profile[0]:s.profile,u=c.indexOf(l)!==-1,h=!1;return s.version===2&&s.profile.length>1&&s.profile[1].supports&&(h=s.profile[1].supports.indexOf("sizeByW")!==-1),s.version===3&&s.extraFeatures&&(h=s.extraFeatures.indexOf("sizeByWh")!==-1),!u||h}function n(s){for(var c=[],l=0;l<s.sizes.length;l++)c.push({url:s._id+"/full/"+s.sizes[l].width+","+(s.version===3?s.sizes[l].height:"")+"/0/default."+s.tileFormat,width:s.sizes[l].width,height:s.sizes[l].height});return c.sort(function(u,h){return u.width-h.width})}function o(s){if(!s||!s.documentElement)throw new Error(e.getString("Errors.Xml"));var c=s.documentElement,l=c.tagName,u=null;if(l==="info")try{return u={},a(c,u),u}catch(h){throw h instanceof Error?h:new Error(e.getString("Errors.IIIF"))}throw new Error(e.getString("Errors.IIIF"))}function a(s,c,l){var u,h;if(s.nodeType===3&&l)h=s.nodeValue.trim(),h.match(/^\d*$/)&&(h=Number(h)),c[l]?(e.isArray(c[l])||(c[l]=[c[l]]),c[l].push(h)):c[l]=h;else if(s.nodeType===1)for(u=0;u<s.childNodes.length;u++)a(s.childNodes[u],c,s.nodeName)}})(t),(function(e){e.OsmTileSource=function(r,n,o,a,s){var c;e.isPlainObject(r)?c=r:c={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!c.width||!c.height)&&(c.width=65572864,c.height=65572864),c.tileSize||(c.tileSize=256,c.tileOverlap=0),c.tilesUrl||(c.tilesUrl="http://tile.openstreetmap.org/"),c.minLevel=8,e.TileSource.apply(this,[c])},e.extend(e.OsmTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="openstreetmaps"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){return this.tilesUrl+(r-8)+"/"+n+"/"+o+".png"}})})(t),(function(e){e.TmsTileSource=function(r,n,o,a,s){var c;e.isPlainObject(r)?c=r:c={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var l=Math.ceil(c.width/256)*256,u=Math.ceil(c.height/256)*256,h;l>u?h=l/256:h=u/256,c.maxLevel=Math.ceil(Math.log(h)/Math.log(2))-1,c.tileSize=256,c.width=l,c.height=u,e.TileSource.apply(this,[c])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="tiledmapservice"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){var a=this.getNumTiles(r).y-1;return this.tilesUrl+r+"/"+n+"/"+(a-o)+".png"}})})(t),(function(e){e.ZoomifyTileSource=function(r){typeof r.tileSize>"u"&&(r.tileSize=256),typeof r.fileFormat>"u"&&(r.fileFormat="jpg",this.fileFormat=r.fileFormat);var n={x:r.width,y:r.height};for(r.imageSizes=[{x:r.width,y:r.height}],r.gridSize=[this._getGridSize(r.width,r.height,r.tileSize)];parseInt(n.x,10)>r.tileSize||parseInt(n.y,10)>r.tileSize;)n.x=Math.floor(n.x/2),n.y=Math.floor(n.y/2),r.imageSizes.push({x:n.x,y:n.y}),r.gridSize.push(this._getGridSize(n.x,n.y,r.tileSize));r.imageSizes.reverse(),r.gridSize.reverse(),r.minLevel=0,r.maxLevel=r.gridSize.length-1,t.TileSource.apply(this,[r])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(r,n,o){return{x:Math.ceil(r/o),y:Math.ceil(n/o)}},_calculateAbsoluteTileNumber:function(r,n,o){for(var a=0,s={},c=0;c<r;c++)s=this.gridSize[c],a+=s.x*s.y;return s=this.gridSize[r],a+=s.x*o+n,a},supports:function(r,n){return r.type&&r.type==="zoomifytileservice"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){var a=0,s=this._calculateAbsoluteTileNumber(r,n,o);return a=Math.floor(s/256),this.tilesUrl+"TileGroup"+a+"/"+r+"-"+n+"-"+o+"."+this.fileFormat}})})(t),(function(e){e.LegacyTileSource=function(a){var s,c,l;e.isArray(a)&&(s={type:"legacy-image-pyramid",levels:a}),s.levels=r(s.levels),s.levels.length>0?(c=s.levels[s.levels.length-1].width,l=s.levels[s.levels.length-1].height):(c=0,l=0,e.console.error("No supported image formats found")),e.extend(!0,s,{width:c,height:l,tileSize:Math.max(l,c),tileOverlap:0,minLevel:0,maxLevel:s.levels.length>0?s.levels.length-1:0}),e.TileSource.apply(this,[s]),this.levels=s.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(a,s){return a.type&&a.type==="legacy-image-pyramid"||a.documentElement&&a.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(a,s,c){var l;return e.isPlainObject(a)?l=o(this,a):l=n(this,a),l},getLevelScale:function(a){var s=NaN;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(s=this.levels[a].width/this.levels[this.maxLevel].width),s},getNumTiles:function(a){var s=this.getLevelScale(a);return s?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(a,s,c){var l=null;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(l=this.levels[a].url),l}});function r(a){var s=[],c,l;for(l=0;l<a.length;l++)c=a[l],c.height&&c.width&&c.url?s.push({url:c.url,width:Number(c.width),height:Number(c.height)}):e.console.error("Unsupported image format: %s",c.url?c.url:"<no URL>");return s.sort(function(u,h){return u.height-h.height})}function n(a,s){if(!s||!s.documentElement)throw new Error(e.getString("Errors.Xml"));var c=s.documentElement,l=c.tagName,u=null,h=[],f,v;if(l==="image")try{for(u={type:c.getAttribute("type"),levels:[]},h=c.getElementsByTagName("level"),v=0;v<h.length;v++)f=h[v],u.levels.push({url:f.getAttribute("url"),width:parseInt(f.getAttribute("width"),10),height:parseInt(f.getAttribute("height"),10)});return o(a,u)}catch(_){throw _ instanceof Error?_:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(l==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(l==="error")throw new Error("Error: "+s)}throw new Error("Unknown element "+l)}function o(a,s){return s.levels}})(t),(function(e){e.ImageTileSource=function(r){r=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1},r),e.TileSource.apply(this,[r])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="image"},configure:function(r,n,o){return r},getImageInfo:function(r){var n=this._image=new Image,o=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",function(){o.width=n.naturalWidth,o.height=n.naturalHeight,o.aspectRatio=o.width/o.height,o.dimensions=new e.Point(o.width,o.height),o._tileWidth=o.width,o._tileHeight=o.height,o.tileOverlap=0,o.minLevel=0,o.levels=o._buildLevels(),o.maxLevel=o.levels.length-1,o.ready=!0,o.raiseEvent("ready",{tileSource:o})}),e.addEvent(n,"error",function(){o.raiseEvent("open-failed",{message:"Error loading image at "+r,source:r})}),n.src=r},getLevelScale:function(r){var n=NaN;return r>=this.minLevel&&r<=this.maxLevel&&(n=this.levels[r].width/this.levels[this.maxLevel].width),n},getNumTiles:function(r){var n=this.getLevelScale(r);return n?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(r,n,o){var a=null;return r>=this.minLevel&&r<=this.maxLevel&&(a=this.levels[r].url),a},getContext2D:function(r,n,o){var a=null;return r>=this.minLevel&&r<=this.maxLevel&&(a=this.levels[r].context2D),a},destroy:function(r){this._freeupCanvasMemory(r)},_buildLevels:function(){var r=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas)return delete this._image,r;var n=this._image.naturalWidth,o=this._image.naturalHeight,a=document.createElement("canvas"),s=a.getContext("2d");if(a.width=n,a.height=o,s.drawImage(this._image,0,0,n,o),r[0].context2D=s,delete this._image,e.isCanvasTainted(a))return r;for(;n>=2&&o>=2;){n=Math.floor(n/2),o=Math.floor(o/2);var c=document.createElement("canvas"),l=c.getContext("2d");c.width=n,c.height=o,l.drawImage(a,0,0,n,o),r.splice(0,0,{context2D:l,width:n,height:o}),a=c,s=l}return r},_freeupCanvasMemory:function(r){for(var n=0;n<this.levels.length;n++)this.levels[n].context2D&&(this.levels[n].context2D.canvas.height=0,this.levels[n].context2D.canvas.width=0,r&&r.raiseEvent("image-unloaded",{context2D:this.levels[n].context2D}))}})})(t),(function(e){e.TileSourceCollection=function(r,n,o,a){e.console.error("TileSourceCollection is deprecated; use World instead")}})(t),(function(e){e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(l){var u=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,userData:null},l),this.element=l.element||e.makeNeutralElement("div"),l.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,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),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",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({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(h){h.insideElementPressed?(s(u,e.ButtonState.DOWN),u.raiseEvent("enter",{originalEvent:h.originalEvent})):h.buttonDownAny||s(u,e.ButtonState.HOVER)},focusHandler:function(h){u.tracker.enterHandler(h),u.raiseEvent("focus",{originalEvent:h.originalEvent})},leaveHandler:function(h){c(u,e.ButtonState.GROUP),h.insideElementPressed&&u.raiseEvent("exit",{originalEvent:h.originalEvent})},blurHandler:function(h){u.tracker.leaveHandler(h),u.raiseEvent("blur",{originalEvent:h.originalEvent})},pressHandler:function(h){s(u,e.ButtonState.DOWN),u.raiseEvent("press",{originalEvent:h.originalEvent})},releaseHandler:function(h){h.insideElementPressed&&h.insideElementReleased?(c(u,e.ButtonState.HOVER),u.raiseEvent("release",{originalEvent:h.originalEvent})):h.insideElementPressed?c(u,e.ButtonState.GROUP):s(u,e.ButtonState.HOVER)},clickHandler:function(h){h.quick&&u.raiseEvent("click",{originalEvent:h.originalEvent})},keyHandler:function(h){h.keyCode===13?(u.raiseEvent("click",{originalEvent:h.originalEvent}),u.raiseEvent("release",{originalEvent:h.originalEvent}),h.preventDefault=!0):h.preventDefault=!1}}),c(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){s(this,e.ButtonState.GROUP)},notifyGroupExit:function(){c(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}});function r(l){e.requestAnimationFrame(function(){n(l)})}function n(l){var u,h,f;l.shouldFade&&(u=e.now(),h=u-l.fadeBeginTime,f=1-h/l.fadeLength,f=Math.min(1,f),f=Math.max(0,f),l.imgGroup&&e.setElementOpacity(l.imgGroup,f,!0),f>0&&r(l))}function o(l){l.shouldFade=!0,l.fadeBeginTime=e.now()+l.fadeDelay,window.setTimeout(function(){r(l)},l.fadeDelay)}function a(l){l.shouldFade=!1,l.imgGroup&&e.setElementOpacity(l.imgGroup,1,!0)}function s(l,u){l.element.disabled||(u>=e.ButtonState.GROUP&&l.currentState===e.ButtonState.REST&&(a(l),l.currentState=e.ButtonState.GROUP),u>=e.ButtonState.HOVER&&l.currentState===e.ButtonState.GROUP&&(l.imgHover&&(l.imgHover.style.visibility=""),l.currentState=e.ButtonState.HOVER),u>=e.ButtonState.DOWN&&l.currentState===e.ButtonState.HOVER&&(l.imgDown&&(l.imgDown.style.visibility=""),l.currentState=e.ButtonState.DOWN))}function c(l,u){l.element.disabled||(u<=e.ButtonState.HOVER&&l.currentState===e.ButtonState.DOWN&&(l.imgDown&&(l.imgDown.style.visibility="hidden"),l.currentState=e.ButtonState.HOVER),u<=e.ButtonState.GROUP&&l.currentState===e.ButtonState.HOVER&&(l.imgHover&&(l.imgHover.style.visibility="hidden"),l.currentState=e.ButtonState.GROUP),u<=e.ButtonState.REST&&l.currentState===e.ButtonState.GROUP&&(o(l),l.currentState=e.ButtonState.REST))}})(t),(function(e){e.ButtonGroup=function(r){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},r);var n=this.buttons.concat([]),o=this,a;if(this.element=r.element||e.makeNeutralElement("div"),!r.group)for(this.element.style.display="inline-block",a=0;a<n.length;a++)this.element.appendChild(n[a].element);e.setElementTouchActionNone(this.element),this.tracker=new e.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(s){var c;for(c=0;c<o.buttons.length;c++)o.buttons[c].notifyGroupEnter()},leaveHandler:function(s){var c;if(!s.insideElementPressed)for(c=0;c<o.buttons.length;c++)o.buttons[c].notifyGroupExit()}})},e.ButtonGroup.prototype={addButton:function(r){this.buttons.push(r),this.element.appendChild(r.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var r=this.buttons.pop();this.element.removeChild(r.element),r.destroy()}this.tracker.destroy(),this.element=null}}})(t),(function(e){e.Rect=function(r,n,o,a,s){this.x=typeof r=="number"?r:0,this.y=typeof n=="number"?n:0,this.width=typeof o=="number"?o:0,this.height=typeof a=="number"?a:0,this.degrees=typeof s=="number"?s:0,this.degrees=e.positiveModulo(this.degrees,360);var c,l;this.degrees>=270?(c=this.getTopRight(),this.x=c.x,this.y=c.y,l=this.height,this.height=this.width,this.width=l,this.degrees-=270):this.degrees>=180?(c=this.getBottomRight(),this.x=c.x,this.y=c.y,this.degrees-=180):this.degrees>=90&&(c=this.getBottomLeft(),this.x=c.x,this.y=c.y,l=this.height,this.height=this.width,this.width=l,this.degrees-=90)},e.Rect.fromSummits=function(r,n,o){var a=r.distanceTo(n),s=r.distanceTo(o),c=n.minus(r),l=Math.atan(c.y/c.x);return c.x<0?l+=Math.PI:c.y<0&&(l+=2*Math.PI),new e.Rect(r.x,r.y,a,s,l/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(r){return r instanceof e.Rect&&this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height&&this.degrees===r.degrees},times:function(r){return new e.Rect(this.x*r,this.y*r,this.width*r,this.height*r,this.degrees)},translate:function(r){return new e.Rect(this.x+r.x,this.y+r.y,this.width,this.height,this.degrees)},union:function(r){var n=this.getBoundingBox(),o=r.getBoundingBox(),a=Math.min(n.x,o.x),s=Math.min(n.y,o.y),c=Math.max(n.x+n.width,o.x+o.width),l=Math.max(n.y+n.height,o.y+o.height);return new e.Rect(a,s,c-a,l-s)},intersection:function(r){var n=1e-10,o=[],a=this.getTopLeft();r.containsPoint(a,n)&&o.push(a);var s=this.getTopRight();r.containsPoint(s,n)&&o.push(s);var c=this.getBottomLeft();r.containsPoint(c,n)&&o.push(c);var l=this.getBottomRight();r.containsPoint(l,n)&&o.push(l);var u=r.getTopLeft();this.containsPoint(u,n)&&o.push(u);var h=r.getTopRight();this.containsPoint(h,n)&&o.push(h);var f=r.getBottomLeft();this.containsPoint(f,n)&&o.push(f);var v=r.getBottomRight();this.containsPoint(v,n)&&o.push(v);for(var _=this._getSegments(),d=r._getSegments(),g=0;g<_.length;g++)for(var y=_[g],S=0;S<d.length;S++){var P=d[S],E=A(y[0],y[1],P[0],P[1]);E&&o.push(E)}function A(ee,ie,L,F){var X=ie.minus(ee),ae=F.minus(L),oe=-ae.x*X.y+X.x*ae.y;if(oe===0)return null;var H=(X.x*(ee.y-L.y)-X.y*(ee.x-L.x))/oe,Y=(ae.x*(ee.y-L.y)-ae.y*(ee.x-L.x))/oe;return-n<=H&&H<=1-n&&-n<=Y&&Y<=1-n?new e.Point(ee.x+Y*X.x,ee.y+Y*X.y):null}if(o.length===0)return null;for(var B=o[0].x,q=o[0].x,z=o[0].y,I=o[0].y,M=1;M<o.length;M++){var J=o[M];J.x<B&&(B=J.x),J.x>q&&(q=J.x),J.y<z&&(z=J.y),J.y>I&&(I=J.y)}return new e.Rect(B,z,q-B,I-z)},_getSegments:function(){var r=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),a=this.getBottomRight();return[[r,n],[n,a],[a,o],[o,r]]},rotate:function(r,n){if(r=e.positiveModulo(r,360),r===0)return this.clone();n=n||this.getCenter();var o=this.getTopLeft().rotate(r,n),a=this.getTopRight().rotate(r,n),s=a.minus(o);s=s.apply(function(l){var u=1e-15;return Math.abs(l)<u?0:l});var c=Math.atan(s.y/s.x);return s.x<0?c+=Math.PI:s.y<0&&(c+=2*Math.PI),new e.Rect(o.x,o.y,this.width,this.height,c/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var r=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),a=this.getBottomRight(),s=Math.min(r.x,n.x,o.x,a.x),c=Math.max(r.x,n.x,o.x,a.x),l=Math.min(r.y,n.y,o.y,a.y),u=Math.max(r.y,n.y,o.y,a.y);return new e.Rect(s,l,c-s,u-l)},getIntegerBoundingBox:function(){var r=this.getBoundingBox(),n=Math.floor(r.x),o=Math.floor(r.y),a=Math.ceil(r.width+r.x-n),s=Math.ceil(r.height+r.y-o);return new e.Rect(n,o,a,s)},containsPoint:function(r,n){n=n||0;var o=this.getTopLeft(),a=this.getTopRight(),s=this.getBottomLeft(),c=a.minus(o),l=s.minus(o);return(r.x-o.x)*c.x+(r.y-o.y)*c.y>=-n&&(r.x-a.x)*c.x+(r.y-a.y)*c.y<=n&&(r.x-o.x)*l.x+(r.y-o.y)*l.y>=-n&&(r.x-s.x)*l.x+(r.y-s.y)*l.y<=n},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}})(t),(function(e){var r={};e.ReferenceStrip=function(f){var v=this,_=f.viewer,d=e.getElementSize(_.element),g,y,S;for(f.id||(f.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=f.id,this.element.className="referencestrip"),f=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},f,{element:this.element}),e.extend(this,f),r[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,y=this.element.style,y.marginTop="0px",y.marginRight="0px",y.marginBottom="0px",y.marginLeft="0px",y.left="0px",y.bottom="0px",y.border="0px",y.background="#000",y.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=_,this.tracker=new e.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:e.delegate(this,n),dragHandler:e.delegate(this,o),scrollHandler:e.delegate(this,a),enterHandler:e.delegate(this,c),leaveHandler:e.delegate(this,l),keyDownHandler:e.delegate(this,u),keyHandler:e.delegate(this,h),preProcessEventHandler:function(P){P.eventType==="wheel"&&(P.preventDefault=!0)}}),f.width&&f.height?(this.element.style.width=f.width+"px",this.element.style.height=f.height+"px",_.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):f.scroll==="horizontal"?(this.element.style.width=d.x*f.sizeRatio*_.tileSources.length+12*_.tileSources.length+"px",this.element.style.height=d.y*f.sizeRatio+"px",_.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=d.y*f.sizeRatio*_.tileSources.length+12*_.tileSources.length+"px",this.element.style.width=d.x*f.sizeRatio+"px",_.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=d.x*this.sizeRatio+8,this.panelHeight=d.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},S=0;S<_.tileSources.length;S++)g=e.makeNeutralElement("div"),g.id=this.element.id+"-"+S,g.style.width=v.panelWidth+"px",g.style.height=v.panelHeight+"px",g.style.display="inline",g.style.float="left",g.style.cssFloat="left",g.style.padding="2px",e.setElementTouchActionNone(g),e.setElementPointerEventsNone(g),this.element.appendChild(g),g.activePanel=!1,this.panels.push(g);s(this,this.scroll==="vertical"?d.y:d.x,0),this.setFocus(0)},e.ReferenceStrip.prototype={setFocus:function(f){var v=this.element.querySelector("#"+this.element.id+"-"+f),_=e.getElementSize(this.viewer.canvas),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),y=-Number(this.element.style.marginLeft.replace("px","")),S=-Number(this.element.style.marginTop.replace("px","")),P;this.currentSelected!==v&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=v,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(P=Number(f)*(this.panelWidth+3),P>y+_.x-this.panelWidth?(P=Math.min(P,d-_.x),this.element.style.marginLeft=-P+"px",s(this,_.x,-P)):P<y&&(P=Math.max(0,P-_.x/2),this.element.style.marginLeft=-P+"px",s(this,_.x,-P))):(P=Number(f)*(this.panelHeight+3),P>S+_.y-this.panelHeight?(P=Math.min(P,g-_.y),this.element.style.marginTop=-P+"px",s(this,_.y,-P)):P<S&&(P=Math.max(0,P-_.y/2),this.element.style.marginTop=-P+"px",s(this,_.y,-P))),this.currentPage=f,c.call(this,{eventSource:this.tracker}))},update:function(){return!!r[this.id].animating},destroy:function(){if(this.miniViewers)for(var f in this.miniViewers)this.miniViewers[f].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function n(f){if(f.quick){var v;this.scroll==="horizontal"?v=Math.floor(f.position.x/(this.panelWidth+4)):v=Math.floor(f.position.y/this.panelHeight),this.viewer.goToPage(v)}this.element.focus()}function o(f){if(this.dragging=!0,this.element){var v=Number(this.element.style.marginLeft.replace("px","")),_=Number(this.element.style.marginTop.replace("px","")),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),y=e.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-f.delta.x>0?v>-(d-y.x)&&(this.element.style.marginLeft=v+f.delta.x*2+"px",s(this,y.x,v+f.delta.x*2)):-f.delta.x<0&&v<0&&(this.element.style.marginLeft=v+f.delta.x*2+"px",s(this,y.x,v+f.delta.x*2)):-f.delta.y>0?_>-(g-y.y)&&(this.element.style.marginTop=_+f.delta.y*2+"px",s(this,y.y,_+f.delta.y*2)):-f.delta.y<0&&_<0&&(this.element.style.marginTop=_+f.delta.y*2+"px",s(this,y.y,_+f.delta.y*2))}}function a(f){if(this.element){var v=Number(this.element.style.marginLeft.replace("px","")),_=Number(this.element.style.marginTop.replace("px","")),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),y=e.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?f.scroll>0?v>-(d-y.x)&&(this.element.style.marginLeft=v-f.scroll*60+"px",s(this,y.x,v-f.scroll*60)):f.scroll<0&&v<0&&(this.element.style.marginLeft=v-f.scroll*60+"px",s(this,y.x,v-f.scroll*60)):f.scroll<0?_>y.y-g&&(this.element.style.marginTop=_+f.scroll*60+"px",s(this,y.y,_+f.scroll*60)):f.scroll>0&&_<0&&(this.element.style.marginTop=_+f.scroll*60+"px",s(this,y.y,_+f.scroll*60)),f.preventDefault=!0}}function s(f,v,_){var d,g,y,S,P,E;for(f.scroll==="horizontal"?d=f.panelWidth:d=f.panelHeight,g=Math.ceil(v/d)+5,y=Math.ceil((Math.abs(_)+v)/d)+1,g=y-g,g=g<0?0:g,P=g;P<y&&P<f.panels.length;P++)if(E=f.panels[P],!E.activePanel){var A,B=f.viewer.tileSources[P];B.referenceStripThumbnailUrl?A={type:"image",url:B.referenceStripThumbnailUrl}:A=B,S=new e.Viewer({id:E.id,tileSources:[A],element:E,navigatorSizeRatio:f.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:f.viewer.loadTilesWithAjax,ajaxHeaders:f.viewer.ajaxHeaders,drawer:"canvas"}),e.setElementPointerEventsNone(S.canvas),e.setElementPointerEventsNone(S.container),S.innerTracker.setTracking(!1),S.outerTracker.setTracking(!1),f.miniViewers[E.id]=S,E.activePanel=!0}}function c(f){var v=f.eventSource.element;this.scroll==="horizontal"?v.style.marginBottom="0px":v.style.marginLeft="0px"}function l(f){var v=f.eventSource.element;this.scroll==="horizontal"?v.style.marginBottom="-"+e.getElementSize(v).y/2+"px":v.style.marginLeft="-"+e.getElementSize(v).x/2+"px"}function u(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 38:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 40:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 37:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 39:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}function h(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 61:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 45:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 48:case 119:case 87:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 115:case 83:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 97:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 100:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}})(t),(function(e){e.DisplayRect=function(r,n,o,a,s,c){e.Rect.apply(this,[r,n,o,a]),this.minLevel=s,this.maxLevel=c},e.extend(e.DisplayRect.prototype,e.Rect.prototype)})(t),(function(e){e.Spring=function(n){var o=arguments;typeof n!="object"&&(n={initial:o.length&&typeof o[0]=="number"?o[0]:void 0,springStiffness:o.length>1?o[1].springStiffness:5,animationTime:o.length>1?o[1].animationTime:1.5}),e.console.assert(typeof n.springStiffness=="number"&&n.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert(typeof n.animationTime=="number"&&n.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),n.exponential&&(this._exponential=!0,delete n.exponential),e.extend(!0,this,n),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||this.current.value!==0,"[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(n){e.console.assert(!this._exponential||n!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=n,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(n){e.console.assert(!this._exponential||n!==0,"[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=n,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(n){this.start.value+=n,this.target.value+=n,this._exponential&&(e.console.assert(this.target.value!==0&&this.start.value!==0,"[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(n){this._exponential=n,this._exponential&&(e.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[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(){this.current.time=e.now();let n,o;if(this._exponential?(n=this.start._logValue,o=this.target._logValue):(n=this.start.value,o=this.target.value),this.current.time>=this.target.time)this.current.value=this.target.value;else{let a=n+(o-n)*r(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time));this._exponential?this.current.value=Math.exp(a):this.current.value=a}return this.current.value!==this.target.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function r(n,o){return(1-Math.exp(n*-o))/(1-Math.exp(-n))}})(t),(function(e){e.ImageJob=function(n){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},n),this.data=null,this.userData={},this.errorMsg=null},e.ImageJob.prototype={start:function(){this.tries++;var n=this,o=this.abort;this.jobId=window.setTimeout(function(){n.finish(null,null,"Image load exceeded timeout ("+n.timeout+" ms)")},this.timeout),this.abort=function(){n.source.downloadTileAbort(n),typeof o=="function"&&o()},this.source.downloadTileStart(this)},finish:function(n,o,a){this.data=n,this.request=o,this.errorMsg=a,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(n){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},n)},e.ImageLoader.prototype={addJob:function(n){if(!n.source){e.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var o=e.TileSource.prototype;n.source={downloadTileStart:o.downloadTileStart,downloadTileAbort:o.downloadTileAbort}}var a=this,s=function(u){r(a,u,n.callback)},c={src:n.src,tile:n.tile||{},source:n.source,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.loadWithAjax?n.ajaxHeaders:null,crossOriginPolicy:n.crossOriginPolicy,ajaxWithCredentials:n.ajaxWithCredentials,postData:n.postData,callback:s,abort:n.abort,timeout:this.timeout},l=new e.ImageJob(c);!this.jobLimit||this.jobsInProgress<this.jobLimit?(l.start(),this.jobsInProgress++):this.jobQueue.push(l)},clear:function(){for(var n=0;n<this.jobQueue.length;n++){var o=this.jobQueue[n];typeof o.abort=="function"&&o.abort()}this.jobQueue=[]}};function r(n,o,a){o.errorMsg!==""&&(o.data===null||o.data===void 0)&&o.tries<1+n.tileRetryMax&&n.failedTiles.push(o);var s;n.jobsInProgress--,(!n.jobLimit||n.jobsInProgress<n.jobLimit)&&n.jobQueue.length>0&&(s=n.jobQueue.shift(),s.start(),n.jobsInProgress++),n.tileRetryMax>0&&n.jobQueue.length===0&&(!n.jobLimit||n.jobsInProgress<n.jobLimit)&&n.failedTiles.length>0&&(s=n.failedTiles.shift(),setTimeout(function(){s.start()},n.tileRetryDelay),n.jobsInProgress++),a(o.data,o.errorMsg,o.request)}})(t),(function(e){e.Tile=function(r,n,o,a,s,c,l,u,h,f,v,_){this.level=r,this.x=n,this.y=o,this.bounds=a,this.positionedBounds=new t.Rect(a.x,a.y,a.width,a.height),this.sourceBounds=f,this.exists=s,this._url=c,this.postData=v,this.context2D=l,this.loadWithAjax=u,this.ajaxHeaders=h,_===void 0&&(e.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),_=e.TileSource.prototype.getTileHashKey(r,n,o,c,h,v)),this.cacheKey=_,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.hasTransparency=!1,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."),!!this.context2D||this.getUrl().match(".png")},get image(){return e.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return e.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return typeof this._url=="function"?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord&&this.cacheImageRecord.getRenderedContext()},getScaleForEdgeSmoothing:function(){var r;if(this.cacheImageRecord)r=this.cacheImageRecord.getRenderedContext();else if(this.context2D)r=this.context2D;else return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return r.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(r,n,o){var a=Math.max(1,Math.ceil((o.x-n.x)/2)),s=Math.max(1,Math.ceil((o.y-n.y)/2));return new e.Point(a,s).minus(this.position.times(e.pixelDensityRatio).times(r||1).apply(function(c){return c%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}})(t),(function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(r,n,o){var a;e.isPlainObject(r)?a=r:a={element:r,location:n,placement:o},this.elementWrapper=document.createElement("div"),this.element=a.element,this.elementWrapper.appendChild(this.element),this.element.id?this.elementWrapper.id="overlay-wrapper-"+this.element.id:this.elementWrapper.id="overlay-wrapper",this.style=this.elementWrapper.style,this._init(a)},e.Overlay.prototype={_init:function(r){this.location=r.location,this.placement=r.placement===void 0?e.Placement.TOP_LEFT:r.placement,this.onDraw=r.onDraw,this.checkResize=r.checkResize===void 0?!0:r.checkResize,this.width=r.width===void 0?null:r.width,this.height=r.height===void 0?null:r.height,this.rotationMode=r.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(r,n){var o=e.Placement.properties[this.placement];o&&(o.isHorizontallyCentered?r.x-=n.x/2:o.isRight&&(r.x-=n.x),o.isVerticallyCentered?r.y-=n.y/2:o.isBottom&&(r.y-=n.y))},destroy:function(){var r=this.elementWrapper,n=this.style;r.parentNode&&(r.parentNode.removeChild(r),r.prevElementParent&&(n.display="none",document.body.appendChild(r))),this.onDraw=null,n.top="",n.left="",n.position="",this.width!==null&&(n.width=""),this.height!==null&&(n.height="");var o=e.getCssPropertyWithVendorPrefix("transformOrigin"),a=e.getCssPropertyWithVendorPrefix("transform");o&&a&&(n[o]="",n[a]="")},drawHTML:function(r,n){var o=this.elementWrapper;o.parentNode!==r&&(o.prevElementParent=o.parentNode,o.prevNextSibling=o.nextSibling,r.appendChild(o),this.style.position="absolute",this.size=e.getElementSize(this.elementWrapper));var a=this._getOverlayPositionAndSize(n),s=a.position,c=this.size=a.size,l="";n.overlayPreserveContentDirection&&(l=n.flipped?" scaleX(-1)":" scaleX(1)");var u=n.flipped?-a.rotate:a.rotate,h=n.flipped?" scaleX(-1)":"";if(this.onDraw)this.onDraw(s,c,this.element);else{var f=this.style,v=this.element.style;v.display="block",f.left=s.x+"px",f.top=s.y+"px",this.width!==null&&(v.width=c.x+"px"),this.height!==null&&(v.height=c.y+"px");var _=e.getCssPropertyWithVendorPrefix("transformOrigin"),d=e.getCssPropertyWithVendorPrefix("transform");_&&d&&(u&&!n.flipped?(v[d]="",f[_]=this._getTransformOrigin(),f[d]="rotate("+u+"deg)"):!u&&n.flipped?(v[d]=l,f[_]=this._getTransformOrigin(),f[d]=h):u&&n.flipped?(v[d]=l,f[_]=this._getTransformOrigin(),f[d]="rotate("+u+"deg)"+h):(v[d]="",f[_]="",f[d]="")),f.display="flex"}},_getOverlayPositionAndSize:function(r){var n=r.pixelFromPoint(this.location,!0),o=this._getSizeInPixels(r);this.adjust(n,o);var a=0;if(r.getRotation(!0)&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var s=new e.Rect(n.x,n.y,o.x,o.y),c=this._getBoundingBox(s,r.getRotation(!0));n=c.getTopLeft(),o=c.getSize()}else a=r.getRotation(!0);return r.flipped&&(n.x=r.getContainerSize().x-n.x),{position:n,size:o,rotate:a}},_getSizeInPixels:function(r){var n=this.size.x,o=this.size.y;if(this.width!==null||this.height!==null){var a=r.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);this.width!==null&&(n=a.x),this.height!==null&&(o=a.y)}if(this.checkResize&&(this.width===null||this.height===null)){var s=this.size=e.getElementSize(this.elementWrapper);this.width===null&&(n=s.x),this.height===null&&(o=s.y)}return new e.Point(n,o)},_getBoundingBox:function(r,n){var o=this._getPlacementPoint(r);return r.rotate(n,o).getBoundingBox()},_getPlacementPoint:function(r){var n=new e.Point(r.x,r.y),o=e.Placement.properties[this.placement];return o&&(o.isHorizontallyCentered?n.x+=r.width/2:o.isRight&&(n.x+=r.width),o.isVerticallyCentered?n.y+=r.height/2:o.isBottom&&(n.y+=r.height)),n},_getTransformOrigin:function(){var r="",n=e.Placement.properties[this.placement];return n&&(n.isLeft?r="left":n.isRight&&(r="right"),n.isTop?r+=" top":n.isBottom&&(r+=" bottom")),r},update:function(r,n){var o=e.isPlainObject(r)?r:{location:r,placement:n};this._init({location:o.location||this.location,placement:o.placement!==void 0?o.placement:this.placement,onDraw:o.onDraw||this.onDraw,checkResize:o.checkResize||this.checkResize,width:o.width!==void 0?o.width:this.width,height:o.height!==void 0?o.height:this.height,rotationMode:o.rotationMode||this.rotationMode})},getBounds:function(r){e.console.assert(r,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,o=this.height;if(n===null||o===null){var a=r.deltaPointsFromPixelsNoRotate(this.size,!0);n===null&&(n=a.x),o===null&&(o=a.y)}var s=this.location.clone();return this.adjust(s,new e.Point(n,o)),this._adjustBoundsForRotation(r,new e.Rect(s.x,s.y,n,o))},_adjustBoundsForRotation:function(r,n){if(!r||r.getRotation(!0)===0||this.rotationMode===e.OverlayRotationMode.EXACT)return n;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return n;var o=this._getOverlayPositionAndSize(r);return r.viewerElementToViewportRectangle(new e.Rect(o.position.x,o.position.y,o.size.x,o.size.y))}return n.rotate(-r.getRotation(!0),this._getPlacementPoint(n))}}})(t),(function(e){const r=e;r.DrawerBase=class{constructor(o){e.console.assert(o.viewer,"[Drawer] options.viewer is required"),e.console.assert(o.viewport,"[Drawer] options.viewport is required"),e.console.assert(o.element,"[Drawer] options.element is required"),this.viewer=o.viewer,this.viewport=o.viewport,this.debugGridColor=typeof o.debugGridColor=="string"?[o.debugGridColor]:o.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,this.options=o.options||{},this.container=e.getElement(o.element),this._renderingTarget=this._createDrawingElement(),this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",this.canvas.style.left="0",e.setElementOpacity(this.canvas,this.viewer.opacity,!0),e.setElementPointerEventsNone(this.canvas),e.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._checkForAPIOverrides()}get canvas(){return this._renderingTarget}get element(){return e.console.error("Drawer.element is deprecated. Use Drawer.container instead."),this.container}getType(){e.console.error("Drawer.getType must be implemented by child class")}static isSupported(){e.console.error("Drawer.isSupported must be implemented by child class")}_createDrawingElement(){return e.console.error("Drawer._createDrawingElement must be implemented by child class"),null}draw(o){e.console.error("Drawer.draw must be implemented by child class")}canRotate(){e.console.error("Drawer.canRotate must be implemented by child class")}destroy(){e.console.error("Drawer.destroy must be implemented by child class")}minimumOverlapRequired(o){return!1}setImageSmoothingEnabled(o){e.console.error("Drawer.setImageSmoothingEnabled must be implemented by child class")}drawDebuggingRect(o){e.console.warn("[drawer].drawDebuggingRect is not implemented by this drawer")}clear(){e.console.warn("[drawer].clear() is deprecated. The drawer is responsible for clearing itself as needed before drawing tiles.")}_checkForAPIOverrides(){if(this._createDrawingElement===e.DrawerBase.prototype._createDrawingElement)throw new Error("[drawer]._createDrawingElement must be implemented by child class");if(this.draw===e.DrawerBase.prototype.draw)throw new Error("[drawer].draw must be implemented by child class");if(this.canRotate===e.DrawerBase.prototype.canRotate)throw new Error("[drawer].canRotate must be implemented by child class");if(this.destroy===e.DrawerBase.prototype.destroy)throw new Error("[drawer].destroy must be implemented by child class");if(this.setImageSmoothingEnabled===e.DrawerBase.prototype.setImageSmoothingEnabled)throw new Error("[drawer].setImageSmoothingEnabled must be implemented by child class")}viewportToDrawerRectangle(o){var a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!0),s=this.viewport.deltaPixelsFromPointsNoRotate(o.getSize(),!0);return new e.Rect(a.x*e.pixelDensityRatio,a.y*e.pixelDensityRatio,s.x*e.pixelDensityRatio,s.y*e.pixelDensityRatio)}viewportCoordToDrawerCoord(o){var a=this.viewport.pixelFromPointNoRotate(o,!0);return new e.Point(a.x*e.pixelDensityRatio,a.y*e.pixelDensityRatio)}_calculateCanvasSize(){var o=e.pixelDensityRatio,a=this.viewport.getContainerSize();return new r.Point(Math.round(a.x*o),Math.round(a.y*o))}_raiseTiledImageDrawnEvent(o,a){this.viewer&&this.viewer.raiseEvent("tiled-image-drawn",{tiledImage:o,tiles:a})}_raiseDrawerErrorEvent(o,a){this.viewer&&this.viewer.raiseEvent("drawer-error",{tiledImage:o,drawer:this,error:a})}}})(t),(function(e){const r=e;class n extends r.DrawerBase{constructor(a){super(a),this.viewer.rejectEventHandler("tile-drawing","The HTMLDrawer does not raise the tile-drawing event"),this.viewer.allowEventHandler("tile-drawn")}static isSupported(){return!0}getType(){return"html"}minimumOverlapRequired(a){return!0}_createDrawingElement(){return e.makeNeutralElement("div")}draw(a){var s=this;this._prepareNewFrame(),a.forEach(function(c){c.opacity!==0&&s._drawTiles(c)})}canRotate(){return!1}destroy(){this.container.removeChild(this.canvas)}setImageSmoothingEnabled(){}_prepareNewFrame(){this.canvas.innerHTML=""}_drawTiles(a){var s=a.getTilesToDraw().map(u=>u.tile);if(!(a.opacity===0||s.length===0&&!a.placeholderFillStyle))for(var c=s.length-1;c>=0;c--){var l=s[c];this._drawTile(l),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:a,tile:l})}}_drawTile(a){e.console.assert(a,"[Drawer._drawTile] tile is required");let s=this.canvas;if(!a.cacheImageRecord){e.console.warn("[Drawer._drawTileToHTML] attempting to draw tile %s when it's not cached",a.toString());return}if(!a.loaded){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",a.toString());return}if(!a.element){var c=a.getImage();if(!c)return;a.element=e.makeNeutralElement("div"),a.imgElement=c.cloneNode(),a.imgElement.style.msInterpolationMode="nearest-neighbor",a.imgElement.style.width="100%",a.imgElement.style.height="100%",a.style=a.element.style,a.style.position="absolute"}a.element.parentNode!==s&&s.appendChild(a.element),a.imgElement.parentNode!==a.element&&a.element.appendChild(a.imgElement),a.style.top=a.position.y+"px",a.style.left=a.position.x+"px",a.style.height=a.size.y+"px",a.style.width=a.size.x+"px",a.flipped&&(a.style.transform="scaleX(-1)"),e.setElementOpacity(a.element,a.opacity)}}e.HTMLDrawer=n})(t),(function(e){const r=e;class n extends r.DrawerBase{constructor(u){super(u),this.context=this.canvas.getContext("2d"),this.sketchCanvas=null,this.sketchContext=null,this._imageSmoothingEnabled=!0,this.viewer.allowEventHandler("tile-drawn"),this.viewer.allowEventHandler("tile-drawing")}static isSupported(){return e.supportsCanvas}getType(){return"canvas"}_createDrawingElement(){let u=e.makeNeutralElement("canvas"),h=this._calculateCanvasSize();return u.width=h.x,u.height=h.y,u}draw(u){this._prepareNewFrame(),this.viewer.viewport.getFlip()!==this._viewportFlipped&&this._flip();for(const h of u)h.opacity!==0&&this._drawTiles(h)}canRotate(){return!0}destroy(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null,this.container.removeChild(this.canvas)}minimumOverlapRequired(u){return!0}setImageSmoothingEnabled(u){this._imageSmoothingEnabled=!!u,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw()}drawDebuggingRect(u){var h=this.context;h.save(),h.lineWidth=2*e.pixelDensityRatio,h.strokeStyle=this.debugGridColor[0],h.fillStyle=this.debugGridColor[0],h.strokeRect(u.x*e.pixelDensityRatio,u.y*e.pixelDensityRatio,u.width*e.pixelDensityRatio,u.height*e.pixelDensityRatio),h.restore()}get _viewportFlipped(){return this.context.getTransform().a<0}_raiseTileDrawingEvent(u,h,f,v){this.viewer.raiseEvent("tile-drawing",{tiledImage:u,context:h,tile:f,rendered:v})}_prepareNewFrame(){var u=this._calculateCanvasSize();if((this.canvas.width!==u.x||this.canvas.height!==u.y)&&(this.canvas.width=u.x,this.canvas.height=u.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var h=this._calculateSketchCanvasSize();this.sketchCanvas.width=h.x,this.sketchCanvas.height=h.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}_clear(u,h){var f=this._getContext(u);if(h)f.clearRect(h.x,h.y,h.width,h.height);else{var v=f.canvas;f.clearRect(0,0,v.width,v.height)}}_drawTiles(u){var h=u.getTilesToDraw().map(ee=>ee.tile);if(!(u.opacity===0||h.length===0&&!u.placeholderFillStyle)){var f=h[0],v;f&&(v=u.opacity<1||u.compositeOperation&&u.compositeOperation!=="source-over"||!u._isBottomItem()&&u.source.hasTransparency(f.context2D,f.getUrl(),f.ajaxHeaders,f.postData));var _,d,g=this.viewport.getZoom(!0),y=u.viewportToImageZoom(g);h.length>1&&y>u.smoothTileEdgesMinZoom&&!u.iOSDevice&&u.getRotation(!0)%360===0&&(v=!0,_=f.getScaleForEdgeSmoothing(),d=f.getTranslationForEdgeSmoothing(_,this._getCanvasSize(!1),this._getCanvasSize(!0)));var S;v&&(_||(S=this.viewport.viewportToViewerElementRectangle(u.getClippedBounds(!0)).getIntegerBoundingBox(),S=S.times(e.pixelDensityRatio)),this._clear(!0,S)),_||this._setRotations(u,v);var P=!1;if(u._clip){this._saveContext(v);var E=u.imageToViewportRectangle(u._clip,!0);E=E.rotate(-u.getRotation(!0),u._getRotationPoint(!0));var A=this.viewportToDrawerRectangle(E);_&&(A=A.times(_)),d&&(A=A.translate(d)),this._setClip(A,v),P=!0}if(u._croppingPolygons){var B=this;P||this._saveContext(v);try{var q=u._croppingPolygons.map(function(ee){return ee.map(function(ie){var L=u.imageToViewportCoordinates(ie.x,ie.y,!0).rotate(-u.getRotation(!0),u._getRotationPoint(!0)),F=B.viewportCoordToDrawerCoord(L);return _&&(F=F.times(_)),d&&(F=F.plus(d)),F})});this._clipWithPolygons(q,v)}catch(ee){e.console.error(ee)}P=!0}if(u._hasOpaqueTile=!1,u.placeholderFillStyle&&u._hasOpaqueTile===!1){let ee=this.viewportToDrawerRectangle(u.getBoundsNoRotate(!0));_&&(ee=ee.times(_)),d&&(ee=ee.translate(d));let ie=null;typeof u.placeholderFillStyle=="function"?ie=u.placeholderFillStyle(u,this.context):ie=u.placeholderFillStyle,this._drawRectangle(ee,ie,v)}var z=c(u.subPixelRoundingForTransparency),I=!1;if(z===e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)I=!0;else if(z===e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var M=this.viewer&&this.viewer.isAnimating();I=!M}for(var J=0;J<h.length;J++)f=h[J],this._drawTile(f,u,v,_,d,I,u.source),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:u,tile:f});P&&this._restoreContext(v),_||(u.getRotation(!0)%360!==0&&this._restoreRotationChanges(v),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(v)),v&&(_&&this._setRotations(u),this.blendSketch({opacity:u.opacity,scale:_,translate:d,compositeOperation:u.compositeOperation,bounds:S}),_&&(u.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1))),this._drawDebugInfo(u,h),this._raiseTiledImageDrawnEvent(u,h)}}_drawDebugInfo(u,h){if(u.debugMode)for(var f=h.length-1;f>=0;f--){var v=h[f];try{this._drawDebugInfoOnTile(v,h.length,f,u)}catch(_){e.console.error(_)}}}_clipWithPolygons(u,h){var f=this._getContext(h);f.beginPath();for(const v of u)for(const[_,d]of v.entries())f[_===0?"moveTo":"lineTo"](d.x,d.y);f.clip()}_drawTile(u,h,f,v,_,d,g){e.console.assert(u,"[Drawer._drawTile] tile is required"),e.console.assert(h,"[Drawer._drawTile] drawingHandler is required");var y=this._getContext(f);v=v||1,this._drawTileToCanvas(u,y,h,v,_,d,g)}_drawTileToCanvas(u,h,f,v,_,d,g){var y=u.position.times(e.pixelDensityRatio),S=u.size.times(e.pixelDensityRatio),P;if(!u.context2D&&!u.cacheImageRecord){e.console.warn("[Drawer._drawTileToCanvas] attempting to draw tile %s when it's not cached",u.toString());return}if(P=u.getCanvasContext(),!u.loaded||!P){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",u.toString());return}h.save(),typeof v=="number"&&v!==1&&(y=y.times(v),S=S.times(v)),_ instanceof e.Point&&(y=y.plus(_)),h.globalAlpha===1&&u.hasTransparency&&(d&&(y.x=Math.round(y.x),y.y=Math.round(y.y),S.x=Math.round(S.x),S.y=Math.round(S.y)),h.clearRect(y.x,y.y,S.x,S.y)),this._raiseTileDrawingEvent(f,h,u,P);var E,A;u.sourceBounds?(E=Math.min(u.sourceBounds.width,P.canvas.width),A=Math.min(u.sourceBounds.height,P.canvas.height)):(E=P.canvas.width,A=P.canvas.height),h.translate(y.x+S.x/2,0),u.flipped&&h.scale(-1,1),h.drawImage(P.canvas,0,0,E,A,-S.x/2,y.y,S.x,S.y),h.restore()}_getContext(u){var h=this.context;if(u){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var f=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=f.x,this.sketchCanvas.height=f.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var v=this;this.viewer.addHandler("rotate",function _(){if(v.viewport.getRotation()!==0){v.viewer.removeHandler("rotate",_);var d=v._calculateSketchCanvasSize();v.sketchCanvas.width=d.x,v.sketchCanvas.height=d.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}h=this.sketchContext}return h}_saveContext(u){this._getContext(u).save()}_restoreContext(u){this._getContext(u).restore()}_setClip(u,h){var f=this._getContext(h);f.beginPath(),f.rect(u.x,u.y,u.width,u.height),f.clip()}_drawRectangle(u,h,f){var v=this._getContext(f);v.save(),v.fillStyle=h,v.fillRect(u.x,u.y,u.width,u.height),v.restore()}blendSketch(u,h,f,v){var _=u;e.isPlainObject(_)||(_={opacity:u,scale:h,translate:f,compositeOperation:v}),u=_.opacity,v=_.compositeOperation;var d=_.bounds;if(this.context.save(),this.context.globalAlpha=u,v&&(this.context.globalCompositeOperation=v),d)d.x<0&&(d.width+=d.x,d.x=0),d.x+d.width>this.canvas.width&&(d.width=this.canvas.width-d.x),d.y<0&&(d.height+=d.y,d.y=0),d.y+d.height>this.canvas.height&&(d.height=this.canvas.height-d.y),this.context.drawImage(this.sketchCanvas,d.x,d.y,d.width,d.height,d.x,d.y,d.width,d.height);else{h=_.scale||1,f=_.translate;var g=f instanceof e.Point?f:new e.Point(0,0),y=0,S=0;if(f){var P=this.sketchCanvas.width-this.canvas.width,E=this.sketchCanvas.height-this.canvas.height;y=Math.round(P/2),S=Math.round(E/2)}this.context.drawImage(this.sketchCanvas,g.x-y*h,g.y-S*h,(this.canvas.width+2*y)*h,(this.canvas.height+2*S)*h,-y,-S,this.canvas.width+2*y,this.canvas.height+2*S)}this.context.restore()}_drawDebugInfoOnTile(u,h,f,v){var _=this.viewer.world.getIndexOfItem(v)%this.debugGridColor.length,d=this.context;d.save(),d.lineWidth=2*e.pixelDensityRatio,d.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",d.strokeStyle=this.debugGridColor[_],d.fillStyle=this.debugGridColor[_],this._setRotations(v),this._viewportFlipped&&this._flip({point:u.position.plus(u.size.divide(2))}),d.strokeRect(u.position.x*e.pixelDensityRatio,u.position.y*e.pixelDensityRatio,u.size.x*e.pixelDensityRatio,u.size.y*e.pixelDensityRatio);var g=(u.position.x+u.size.x/2)*e.pixelDensityRatio,y=(u.position.y+u.size.y/2)*e.pixelDensityRatio;d.translate(g,y);const S=this.viewport.getRotation(!0);d.rotate(Math.PI/180*-S),d.translate(-g,-y),u.x===0&&u.y===0&&(d.fillText("Zoom: "+this.viewport.getZoom(),u.position.x*e.pixelDensityRatio,(u.position.y-30)*e.pixelDensityRatio),d.fillText("Pan: "+this.viewport.getBounds().toString(),u.position.x*e.pixelDensityRatio,(u.position.y-20)*e.pixelDensityRatio)),d.fillText("Level: "+u.level,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+20)*e.pixelDensityRatio),d.fillText("Column: "+u.x,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+30)*e.pixelDensityRatio),d.fillText("Row: "+u.y,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+40)*e.pixelDensityRatio),d.fillText("Order: "+f+" of "+h,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+50)*e.pixelDensityRatio),d.fillText("Size: "+u.size.toString(),(u.position.x+10)*e.pixelDensityRatio,(u.position.y+60)*e.pixelDensityRatio),d.fillText("Position: "+u.position.toString(),(u.position.x+10)*e.pixelDensityRatio,(u.position.y+70)*e.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),v.getRotation(!0)%360!==0&&this._restoreRotationChanges(),d.restore()}_updateImageSmoothingEnabled(u){u.msImageSmoothingEnabled=this._imageSmoothingEnabled,u.imageSmoothingEnabled=this._imageSmoothingEnabled}_getCanvasSize(u){var h=this._getContext(u).canvas;return new e.Point(h.width,h.height)}_getCanvasCenter(){return new e.Point(this.canvas.width/2,this.canvas.height/2)}_setRotations(u,h=!1){var f=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:h,saveContext:f}),f=!1),u.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:u.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(u._getRotationPoint(!0),!0),useSketch:h,saveContext:f})}_offsetForRotation(u){var h=u.point?u.point.times(e.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(u.useSketch);f.save(),f.translate(h.x,h.y),f.rotate(Math.PI/180*u.degrees),f.translate(-h.x,-h.y)}_flip(u){u=u||{};var h=u.point?u.point.times(e.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(u.useSketch);f.translate(h.x,0),f.scale(-1,1),f.translate(-h.x,0)}_restoreRotationChanges(u){var h=this._getContext(u);h.restore()}_calculateCanvasSize(){var u=e.pixelDensityRatio,h=this.viewport.getContainerSize();return{x:Math.round(h.x*u),y:Math.round(h.y*u)}}_calculateSketchCanvasSize(){var u=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return u;var h=Math.ceil(Math.sqrt(u.x*u.x+u.y*u.y));return{x:h,y:h}}}e.CanvasDrawer=n;var o=e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function a(l){return l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function s(l){return a(l)?o:l}function c(l){if(typeof l=="number")return s(l);if(!l||!e.Browser)return o;var u=l[e.Browser.vendor];return a(u)&&(u=l["*"]),s(u)}})(t),(function(e){const r=e;r.WebGLDrawer=class extends r.DrawerBase{constructor(o){super(o),this._destroyed=!1,this._TextureMap=new Map,this._TileMap=new Map,this._gl=null,this._firstPass=null,this._secondPass=null,this._glFrameBuffer=null,this._renderToTexture=null,this._glFramebufferToCanvasTransform=null,this._outputCanvas=null,this._outputContext=null,this._clippingCanvas=null,this._clippingContext=null,this._renderingCanvas=null,this._backupCanvasDrawer=null,this._imageSmoothingEnabled=!0,this._boundToTileReady=a=>this._tileReadyHandler(a),this._boundToImageUnloaded=a=>this._imageUnloadedHandler(a),this.viewer.addHandler("tile-ready",this._boundToTileReady),this.viewer.addHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.rejectEventHandler("tile-drawn","The WebGLDrawer does not raise the tile-drawn event"),this.viewer.rejectEventHandler("tile-drawing","The WebGLDrawer does not raise the tile-drawing event"),this._setupCanvases(),this._setupRenderer(),this.context=this._outputContext}destroy(){if(this._destroyed)return;let o=this._gl;var a=o.getParameter(o.MAX_TEXTURE_IMAGE_UNITS);for(let c=0;c<a;++c)o.activeTexture(o.TEXTURE0+c),o.bindTexture(o.TEXTURE_2D,null),o.bindTexture(o.TEXTURE_CUBE_MAP,null);o.bindBuffer(o.ARRAY_BUFFER,null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null),o.bindRenderbuffer(o.RENDERBUFFER,null),o.bindFramebuffer(o.FRAMEBUFFER,null),this._unloadTextures(),o.deleteBuffer(this._secondPass.bufferOutputPosition),o.deleteFramebuffer(this._glFrameBuffer),this._renderingCanvas.width=this._renderingCanvas.height=1,this._clippingCanvas.width=this._clippingCanvas.height=1,this._outputCanvas.width=this._outputCanvas.height=1,this._renderingCanvas=null,this._clippingCanvas=this._clippingContext=null,this._outputCanvas=this._outputContext=null;let s=o.getExtension("WEBGL_lose_context");s&&s.loseContext(),this.viewer.removeHandler("tile-ready",this._boundToTileReady),this.viewer.removeHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.removeHandler("resize",this._resizeHandler),this._gl=null,this._backupCanvasDrawer&&(this._backupCanvasDrawer.destroy(),this._backupCanvasDrawer=null),this.container.removeChild(this.canvas),this.viewer.drawer===this&&(this.viewer.drawer=null),this._destroyed=!0}canRotate(){return!0}static isSupported(){let o=document.createElement("canvas"),a=e.isFunction(o.getContext)&&o.getContext("webgl"),s=a&&a.getExtension("WEBGL_lose_context");return s&&s.loseContext(),!!a}getType(){return"webgl"}minimumOverlapRequired(o){return o.isTainted()}_createDrawingElement(){let o=e.makeNeutralElement("canvas"),a=this._calculateCanvasSize();return o.width=a.x,o.height=a.y,o}_getBackupCanvasDrawer(){return this._backupCanvasDrawer||(this._backupCanvasDrawer=this.viewer.requestDrawer("canvas",{mainDrawer:!1}),this._backupCanvasDrawer.canvas.style.setProperty("visibility","hidden")),this._backupCanvasDrawer}draw(o){let a=this._gl;const s=this.viewport.getBoundsNoRotateWithMargins(!0);let c={bounds:s,center:new r.Point(s.x+s.width/2,s.y+s.height/2),rotation:this.viewport.getRotation(!0)*Math.PI/180},l=this.viewport.flipped?-1:1,u=e.Mat3.makeTranslation(-c.center.x,-c.center.y),h=e.Mat3.makeScaling(2/c.bounds.width*l,-2/c.bounds.height),f=e.Mat3.makeRotation(-c.rotation),v=h.multiply(f).multiply(u);a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT),this._outputContext.clearRect(0,0,this._outputCanvas.width,this._outputCanvas.height);let _=!1;o.forEach((d,g)=>{if(d.isTainted()){_&&(this._outputContext.drawImage(this._renderingCanvas,0,0),a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT),_=!1);const y=this._getBackupCanvasDrawer();y.draw([d]),this._outputContext.drawImage(y.canvas,0,0)}else{let y=d.getTilesToDraw();if(d.placeholderFillStyle&&d._hasOpaqueTile===!1&&this._drawPlaceholder(d),y.length===0||d.getOpacity()===0)return;let S=y[0],P=d.compositeOperation||this.viewer.compositeOperation||d._clip||d._croppingPolygons||d.debugMode,E=P||d.opacity<1||S.hasTransparency;P&&(_&&this._outputContext.drawImage(this._renderingCanvas,0,0),a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT)),a.useProgram(this._firstPass.shaderProgram),E?(a.bindFramebuffer(a.FRAMEBUFFER,this._glFrameBuffer),a.clear(a.COLOR_BUFFER_BIT)):a.bindFramebuffer(a.FRAMEBUFFER,null);let A=v,B=d.getRotation(!0);if(B%360!==0){let ee=e.Mat3.makeRotation(-B*Math.PI/180),ie=d.getBoundsNoRotate(!0).getCenter(),L=e.Mat3.makeTranslation(ie.x,ie.y),F=e.Mat3.makeTranslation(-ie.x,-ie.y),X=L.multiply(ee).multiply(F);A=v.multiply(X)}let q=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);if(q<=0)throw new Error(`WegGL error: bad value for gl parameter MAX_TEXTURE_IMAGE_UNITS (${q}). This could happen
|
|
28
|
-
if too many contexts have been created and not released, or there is another problem with the graphics card.`);let z=new Float32Array(
|
|
27
|
+
function t(e){return new t.Viewer(e)}(function(e){e.version={versionStr:"5.0.1",major:parseInt("5",10),minor:parseInt("0",10),revision:parseInt("1",10)};var r={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},n=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.isFunction=function(a){return e.type(a)==="function"},e.isArray=Array.isArray||function(a){return e.type(a)==="array"},e.isWindow=function(a){return a&&typeof a=="object"&&"setInterval"in a},e.type=function(a){return a==null?String(a):r[n.call(a)]||"object"},e.isPlainObject=function(a){if(!a||t.type(a)!=="object"||a.nodeType||e.isWindow(a)||a.constructor&&!o.call(a,"constructor")&&!o.call(a.constructor.prototype,"isPrototypeOf"))return!1;var s;for(var c in a)s=c;return s===void 0||o.call(a,s)},e.isEmptyObject=function(a){for(var s in a)return!1;return!0},e.freezeObject=function(a){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(s){return s},e.freezeObject(a)},e.supportsCanvas=(function(){var a=document.createElement("canvas");return!!(e.isFunction(a.getContext)&&a.getContext("2d"))})(),e.isCanvasTainted=function(a){var s=!1;try{a.getContext("2d").getImageData(0,0,1,1)}catch{s=!0}return s},e.supportsAddEventListener=(function(){return!!(document.documentElement.addEventListener&&document.addEventListener)})(),e.supportsRemoveEventListener=(function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)})(),e.supportsEventListenerOptions=(function(){var a=0;if(e.supportsAddEventListener)try{var s={get capture(){return a++,!1},get once(){return a++,!1},get passive(){return a++,!1}};window.addEventListener("test",null,s),window.removeEventListener("test",null,s)}catch{a=0}return a>=3})(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var a=document.createElement("canvas").getContext("2d"),s=window.devicePixelRatio||1,c=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1;return Math.max(s,1)/c}else return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(t),(function(e){e.extend=function(){var c,l,u,h,f,v,_=arguments[0]||{},d=arguments.length,g=!1,b=1;for(typeof _=="boolean"&&(g=_,_=arguments[1]||{},b=2),typeof _!="object"&&!t.isFunction(_)&&(_={}),d===b&&(_=this,--b);b<d;b++)if(c=arguments[b],c!==null||c!==void 0)for(l in c){var S=Object.getOwnPropertyDescriptor(c,l);if(S!==void 0){if(S.get||S.set){Object.defineProperty(_,l,S);continue}h=S.value}else{e.console.warn('Could not copy inherited property "'+l+'".');continue}_!==h&&(g&&h&&(t.isPlainObject(h)||(f=t.isArray(h)))?(u=_[l],f?(f=!1,v=u&&t.isArray(u)?u:[]):v=u&&t.isPlainObject(u)?u:{},_[l]=t.extend(g,v,h)):h!==void 0&&(_[l]=h))}return _};var r=function(){if(typeof navigator!="object")return!1;var c=navigator.userAgent;return typeof c!="string"?!1:c.indexOf("iPhone")!==-1||c.indexOf("iPad")!==-1||c.indexOf("iPod")!==-1};e.extend(e,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!1,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerDblClickDrag:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:r(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,maxTilesPerFrame:1,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorElement:null,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,overlayPreserveContentDirection:!0,opacity:1,compositeOperation:null,drawer:["webgl","canvas","html"],drawerOptions:{webgl:{},canvas:{},html:{},custom:{}},preload:!1,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,tileRetryMax:0,tileRetryDelay:2500,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},delegate:function(c,l){return function(){var u=arguments;return u===void 0&&(u=[]),l.apply(c,u)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(c){return e._viewers.get(this.getElement(c))},getElement:function(c){return typeof c=="string"&&(c=document.getElementById(c)),c},getElementPosition:function(c){var l=new e.Point,u,h;for(c=e.getElement(c),u=e.getElementStyle(c).position==="fixed",h=s(c,u);h;)l.x+=c.offsetLeft,l.y+=c.offsetTop,u&&(l=l.plus(e.getPageScroll())),c=h,u=e.getElementStyle(c).position==="fixed",h=s(c,u);return l},getElementOffset:function(c){c=e.getElement(c);var l=c&&c.ownerDocument,u,h,f={top:0,left:0};return l?(u=l.documentElement,typeof c.getBoundingClientRect<"u"&&(f=c.getBoundingClientRect()),h=l===l.window?l:l.nodeType===9?l.defaultView||l.parentWindow:!1,new e.Point(f.left+(h.pageXOffset||u.scrollLeft)-(u.clientLeft||0),f.top+(h.pageYOffset||u.scrollTop)-(u.clientTop||0))):new e.Point},getElementSize:function(c){return c=e.getElement(c),new e.Point(c.clientWidth,c.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(c){return c=e.getElement(c),c.currentStyle}:function(c){return c=e.getElement(c),window.getComputedStyle(c,"")},getCssPropertyWithVendorPrefix:function(c){var l={};return e.getCssPropertyWithVendorPrefix=function(u){if(l[u]!==void 0)return l[u];var h=document.createElement("div").style,f=null;if(h[u]!==void 0)f=u;else for(var v=["Webkit","Moz","MS","O","webkit","moz","ms","o"],_=e.capitalizeFirstLetter(u),d=0;d<v.length;d++){var g=v[d]+_;if(h[g]!==void 0){f=g;break}}return l[u]=f,f},e.getCssPropertyWithVendorPrefix(c)},capitalizeFirstLetter:function(c){return c.charAt(0).toUpperCase()+c.slice(1)},positiveModulo:function(c,l){var u=c%l;return u<0&&(u+=l),u},pointInElement:function(c,l){c=e.getElement(c);var u=e.getElementOffset(c),h=e.getElementSize(c);return l.x>=u.x&&l.x<u.x+h.x&&l.y<u.y+h.y&&l.y>=u.y},getMousePosition:function(c){if(typeof c.pageX=="number")e.getMousePosition=function(l){var u=new e.Point;return u.x=l.pageX,u.y=l.pageY,u};else if(typeof c.clientX=="number")e.getMousePosition=function(l){var u=new e.Point;return u.x=l.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,u.y=l.clientY+document.body.scrollTop+document.documentElement.scrollTop,u};else throw new Error("Unknown event mouse position, no known technique.");return e.getMousePosition(c)},getPageScroll:function(){var c=document.documentElement||{},l=document.body||{};if(typeof window.pageXOffset=="number")e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(l.scrollLeft||l.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else if(c.scrollLeft||c.scrollTop)e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new e.Point(0,0);return e.getPageScroll()},setPageScroll:function(c){if(typeof window.scrollTo<"u")e.setPageScroll=function(h){window.scrollTo(h.x,h.y)};else{var l=e.getPageScroll();if(l.x===c.x&&l.y===c.y)return;document.body.scrollLeft=c.x,document.body.scrollTop=c.y;var u=e.getPageScroll();if(u.x!==l.x&&u.y!==l.y){e.setPageScroll=function(h){document.body.scrollLeft=h.x,document.body.scrollTop=h.y};return}if(document.documentElement.scrollLeft=c.x,document.documentElement.scrollTop=c.y,u=e.getPageScroll(),u.x!==l.x&&u.y!==l.y){e.setPageScroll=function(h){document.documentElement.scrollLeft=h.x,document.documentElement.scrollTop=h.y};return}e.setPageScroll=function(h){}}e.setPageScroll(c)},getWindowSize:function(){var c=document.documentElement||{},l=document.body||{};if(typeof window.innerWidth=="number")e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(c.clientWidth||c.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(l.clientWidth||l.clientHeight)e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return e.getWindowSize()},makeCenteredNode:function(c){c=e.getElement(c);var l=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(l[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(l[1].style,{display:"table-row"}),e.extend(l[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),l[0].appendChild(l[1]),l[1].appendChild(l[2]),l[2].appendChild(c),l[0]},makeNeutralElement:function(c){var l=document.createElement(c),u=l.style;return u.background="transparent none",u.border="none",u.margin="0px",u.padding="0px",u.position="static",l},now:function(){return Date.now?e.now=Date.now:e.now=function(){return new Date().getTime()},e.now()},makeTransparentImage:function(c){var l=e.makeNeutralElement("img");return l.src=c,l},setElementOpacity:function(c,l,u){var h,f;c=e.getElement(c),u&&!e.Browser.alpha&&(l=Math.round(l)),e.Browser.opacity?c.style.opacity=l<1?l:"":l<1?(h=Math.round(100*l),f="alpha(opacity="+h+")",c.style.filter=f):c.style.filter=""},setElementTouchActionNone:function(c){c=e.getElement(c),typeof c.style.touchAction<"u"?c.style.touchAction="none":typeof c.style.msTouchAction<"u"&&(c.style.msTouchAction="none")},setElementPointerEvents:function(c,l){c=e.getElement(c),typeof c.style<"u"&&typeof c.style.pointerEvents<"u"&&(c.style.pointerEvents=l)},setElementPointerEventsNone:function(c){e.setElementPointerEvents(c,"none")},addClass:function(c,l){c=e.getElement(c),c.className?(" "+c.className+" ").indexOf(" "+l+" ")===-1&&(c.className+=" "+l):c.className=l},indexOf:function(c,l,u){return Array.prototype.indexOf?this.indexOf=function(h,f,v){return h.indexOf(f,v)}:this.indexOf=function(h,f,v){var _,d=v||0,g;if(!h)throw new TypeError;if(g=h.length,g===0||d>=g)return-1;for(d<0&&(d=g-Math.abs(d)),_=d;_<g;_++)if(h[_]===f)return _;return-1},this.indexOf(c,l,u)},removeClass:function(c,l){var u,h=[],f;for(c=e.getElement(c),u=c.className.split(/\s+/),f=0;f<u.length;f++)u[f]&&u[f]!==l&&h.push(u[f]);c.className=h.join(" ")},normalizeEventListenerOptions:function(c){var l;return typeof c<"u"?typeof c=="boolean"?l=e.supportsEventListenerOptions?{capture:c}:c:l=e.supportsEventListenerOptions?c:typeof c.capture<"u"?c.capture:!1:l=e.supportsEventListenerOptions?{capture:!1}:!1,l},addEvent:(function(){if(e.supportsAddEventListener)return function(c,l,u,h){h=e.normalizeEventListenerOptions(h),c=e.getElement(c),c.addEventListener(l,u,h)};if(document.documentElement.attachEvent&&document.attachEvent)return function(c,l,u){c=e.getElement(c),c.attachEvent("on"+l,u)};throw new Error("No known event model.")})(),removeEvent:(function(){if(e.supportsRemoveEventListener)return function(c,l,u,h){h=e.normalizeEventListenerOptions(h),c=e.getElement(c),c.removeEventListener(l,u,h)};if(document.documentElement.detachEvent&&document.detachEvent)return function(c,l,u){c=e.getElement(c),c.detachEvent("on"+l,u)};throw new Error("No known event model.")})(),cancelEvent:function(c){c.preventDefault()},eventIsCanceled:function(c){return c.defaultPrevented},stopEvent:function(c){c.stopPropagation()},createCallback:function(c,l){console.error("The createCallback function is deprecated and will be removed in future versions. Please use alternativeFunction instead.");var u=[],h;for(h=2;h<arguments.length;h++)u.push(arguments[h]);return function(){var f=u.concat([]),v;for(v=0;v<arguments.length;v++)f.push(arguments[v]);return l.apply(c,f)}},getUrlParameter:function(c){var l=a[c];return l||null},getUrlProtocol:function(c){var l=c.match(/^([a-z]+:)\/\//i);return l===null?window.location.protocol:l[1].toLowerCase()},createAjaxRequest:function(){if(window.XMLHttpRequest)return e.createAjaxRequest=function(){return new XMLHttpRequest},new XMLHttpRequest;throw new Error("Browser doesn't support XMLHttpRequest.")},makeAjaxRequest:function(c,l,u){var h,f,v,_;e.isPlainObject(c)&&(l=c.success,u=c.error,h=c.withCredentials,f=c.headers,v=c.responseType||null,_=c.postData||null,c=c.url);var d=e.getUrlProtocol(c),g=e.createAjaxRequest();if(!e.isFunction(l))throw new Error("makeAjaxRequest requires a success callback");g.onreadystatechange=function(){g.readyState===4&&(g.onreadystatechange=function(){},g.status>=200&&g.status<300||g.status===0&&d!=="http:"&&d!=="https:"?l(g):e.isFunction(u)?u(g):e.console.error("AJAX request returned %d: %s",g.status,c))};var b=_?"POST":"GET";try{if(g.open(b,c,!0),v&&(g.responseType=v),f)for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&f[S]&&g.setRequestHeader(S,f[S]);h&&(g.withCredentials=!0),g.send(_)}catch(P){e.console.error("%s while making AJAX request: %s",P.name,P.message),g.onreadystatechange=function(){},e.isFunction(u)&&u(g,P)}return g},jsonp:function(c){var l,u=c.url,h=document.head||document.getElementsByTagName("head")[0]||document.documentElement,f=c.callbackName||"openseadragon"+e.now(),v=window[f],_="$1"+f+"$2",d=c.param||"callback",g=c.callback;u=u.replace(/(=)\?(&|$)|\?\?/i,_),u+=(/\?/.test(u)?"&":"?")+d+"="+f,window[f]=function(b){if(v)window[f]=v;else try{delete window[f]}catch{}g&&e.isFunction(g)&&g(b)},l=document.createElement("script"),(c.async!==void 0||c.async!==!1)&&(l.async="async"),c.scriptCharset&&(l.charset=c.scriptCharset),l.src=u,l.onload=l.onreadystatechange=function(b,S){(S||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,h&&l.parentNode&&h.removeChild(l),l=void 0)},h.insertBefore(l,h.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(c){if(window.DOMParser)e.parseXml=function(l){var u=null,h;return h=new DOMParser,u=h.parseFromString(l,"text/xml"),u};else throw new Error("Browser doesn't support XML DOM.");return e.parseXml(c)},parseJSON:function(c){return e.parseJSON=window.JSON.parse,e.parseJSON(c)},imageFormatSupported:function(c){return c=c||"",!!o[c.toLowerCase()]},setImageFormatsSupported:function(c){e.extend(o,c)}});var n=function(c){};e.console=window.console||{log:n,debug:n,info:n,warn:n,error:n,assert:n},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var o={avif:!0,bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1,webp:!0},a={};(function(){var c=navigator.appVersion,l=navigator.userAgent,u;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(l.substring(l.indexOf("MSIE")+5,l.indexOf(";",l.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(l.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(l.substring(l.indexOf("Edge")+5))):l.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(l.substring(l.indexOf("Edg")+4))):l.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(l.substring(l.indexOf("Firefox")+8))):l.indexOf("Safari")>=0?(e.Browser.vendor=l.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(l.substring(l.substring(0,l.indexOf("Safari")).lastIndexOf("/")+1,l.indexOf("Safari")))):(u=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),u.exec(l)!==null&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(c);break}var h=window.location.search.substring(1),f=h.split("&"),v,_,d;for(d=0;d<f.length;d++)if(v=f[d],_=v.indexOf("="),_>0){var g=v.substring(0,_),b=v.substring(_+1);try{a[g]=decodeURIComponent(b)}catch{e.console.error("Ignoring malformed URL parameter: %s=%s",g,b)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.console.error("Internet Explorer is not supported by OpenSeadragon")})(),(function(c){var l=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,u=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame;if(l&&u)e.requestAnimationFrame=function(){return l.apply(c,arguments)},e.cancelAnimationFrame=function(){return u.apply(c,arguments)};else{var h=[],f=[],v=0,_;e.requestAnimationFrame=function(d){return h.push([++v,d]),_||(_=setInterval(function(){if(h.length){var g=e.now(),b=f;for(f=h,h=b;f.length;)f.shift()[1](g)}else clearInterval(_),_=void 0},1e3/50)),v},e.cancelAnimationFrame=function(d){var g,b;for(g=0,b=h.length;g<b;g+=1)if(h[g][0]===d){h.splice(g,1);return}for(g=0,b=f.length;g<b;g+=1)if(f[g][0]===d){f.splice(g,1);return}}}})(window);function s(c,l){return l&&c!==document.body?document.body:c.offsetParent}})(t),(function(e,r){i.exports?i.exports=r():e.OpenSeadragon=r()})(_4,function(){return t}),(function(e){class r{constructor(o){o||(o=[0,0,0,0,0,0,0,0,0]),this.values=o}static makeIdentity(){return new r([1,0,0,0,1,0,0,0,1])}static makeTranslation(o,a){return new r([1,0,0,0,1,0,o,a,1])}static makeRotation(o){var a=Math.cos(o),s=Math.sin(o);return new r([a,-s,0,s,a,0,0,0,1])}static makeScaling(o,a){return new r([o,0,0,0,a,0,0,0,1])}multiply(o){let a=this.values,s=o.values;var c=a[0],l=a[1],u=a[2],h=a[3],f=a[4],v=a[5],_=a[6],d=a[7],g=a[8],b=s[0],S=s[1],P=s[2],E=s[3],R=s[4],F=s[5],Z=s[6],z=s[7],M=s[8];return new r([b*c+S*h+P*_,b*l+S*f+P*d,b*u+S*v+P*g,E*c+R*h+F*_,E*l+R*f+F*d,E*u+R*v+F*g,Z*c+z*h+M*_,Z*l+z*f+M*d,Z*u+z*v+M*g])}}e.Mat3=r})(t),(function(e){var r={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.fullscreenElement},r.requestFullScreen=function(n){return n.requestFullscreen().catch(function(o){e.console.error("Fullscreen request failed: ",o)})},r.exitFullScreen=function(){document.exitFullscreen().catch(function(n){e.console.error("Error while exiting fullscreen: ",n)})},r.fullScreenEventName="fullscreenchange",r.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.msFullscreenElement},r.requestFullScreen=function(n){return n.msRequestFullscreen()},r.exitFullScreen=function(){document.msExitFullscreen()},r.fullScreenEventName="MSFullscreenChange",r.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitFullscreenElement},r.requestFullScreen=function(n){return n.webkitRequestFullscreen()},r.exitFullScreen=function(){document.webkitExitFullscreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},r.requestFullScreen=function(n){return n.webkitRequestFullScreen()},r.exitFullScreen=function(){document.webkitCancelFullScreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.mozFullScreenElement},r.requestFullScreen=function(n){return n.mozRequestFullScreen()},r.exitFullScreen=function(){document.mozCancelFullScreen()},r.fullScreenEventName="mozfullscreenchange",r.fullScreenErrorEventName="mozfullscreenerror"),r.isFullScreen=function(){return r.getFullScreenElement()!==null},r.cancelFullScreen=function(){e.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),r.exitFullScreen()},e.extend(e,r)})(t),(function(e){e.EventSource=function(){this.events={},this._rejectedEventList={}},e.EventSource.prototype={addOnceHandler:function(r,n,o,a,s){var c=this;a=a||1;var l=0,u=function(h){return l++,l===a&&c.removeHandler(r,u),n(h)};return this.addHandler(r,u,o,s)},addHandler:function(r,n,o,a){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return e.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var s=this.events[r];if(s||(this.events[r]=s=[]),n&&e.isFunction(n)){var c=s.length,l={handler:n,userData:o||null,priority:a||0};for(s[c]=l;c>0&&s[c-1].priority<s[c].priority;)s[c]=s[c-1],s[c-1]=l,c--}return!0},removeHandler:function(r,n){var o=this.events[r],a=[],s;if(o&&e.isArray(o)){for(s=0;s<o.length;s++)o[s].handler!==n&&a.push(o[s]);this.events[r]=a}},numberOfHandlers:function(r){var n=this.events[r];return n?n.length:0},removeAllHandlers:function(r){if(r)this.events[r]=[];else for(var n in this.events)this.events[n]=[]},getHandler:function(r){var n=this.events[r];return!n||!n.length?null:(n=n.length===1?[n[0]]:Array.apply(null,n),function(o,a){var s,c=n.length;for(s=0;s<c;s++)n[s]&&(a.eventSource=o,a.userData=n[s].userData,n[s].handler(a))})},raiseEvent:function(r,n){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return e.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var o=this.getHandler(r);return o&&o(this,n||{}),!0},rejectEventHandler(r,n=""){this._rejectedEventList[r]=n},allowEventHandler(r){delete this._rejectedEventList[r]}}})(t),(function(e){var r={};e.MouseTracker=function(y){var w=arguments;e.isPlainObject(y)||(y={element:w[0],clickTimeThreshold:w[1],clickDistThreshold:w[2]}),this.hash=Math.random(),this.element=e.getElement(y.element),this.clickTimeThreshold=y.clickTimeThreshold||e.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=y.clickDistThreshold||e.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=y.dblClickTimeThreshold||e.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=y.dblClickDistThreshold||e.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=y.userData||null,this.stopDelay=y.stopDelay||50,this.preProcessEventHandler=y.preProcessEventHandler||null,this.contextMenuHandler=y.contextMenuHandler||null,this.enterHandler=y.enterHandler||null,this.leaveHandler=y.leaveHandler||null,this.exitHandler=y.exitHandler||null,this.overHandler=y.overHandler||null,this.outHandler=y.outHandler||null,this.pressHandler=y.pressHandler||null,this.nonPrimaryPressHandler=y.nonPrimaryPressHandler||null,this.releaseHandler=y.releaseHandler||null,this.nonPrimaryReleaseHandler=y.nonPrimaryReleaseHandler||null,this.moveHandler=y.moveHandler||null,this.scrollHandler=y.scrollHandler||null,this.clickHandler=y.clickHandler||null,this.dblClickHandler=y.dblClickHandler||null,this.dragHandler=y.dragHandler||null,this.dragEndHandler=y.dragEndHandler||null,this.pinchHandler=y.pinchHandler||null,this.stopHandler=y.stopHandler||null,this.keyDownHandler=y.keyDownHandler||null,this.keyUpHandler=y.keyUpHandler||null,this.keyHandler=y.keyHandler||null,this.focusHandler=y.focusHandler||null,this.blurHandler=y.blurHandler||null;var k=this;r[this.hash]={click:function(C){P(k,C)},dblclick:function(C){E(k,C)},keydown:function(C){R(k,C)},keyup:function(C){F(k,C)},keypress:function(C){Z(k,C)},focus:function(C){z(k,C)},blur:function(C){M(k,C)},contextmenu:function(C){O(k,C)},wheel:function(C){$(k,C)},mousewheel:function(C){ee(k,C)},DOMMouseScroll:function(C){ee(k,C)},MozMousePixelScroll:function(C){ee(k,C)},losecapture:function(C){L(k,C)},mouseenter:function(C){ue(k,C)},mouseleave:function(C){V(k,C)},mouseover:function(C){A(k,C)},mouseout:function(C){U(k,C)},mousedown:function(C){le(k,C)},mouseup:function(C){be(k,C)},mousemove:function(C){Te(k,C)},touchstart:function(C){B(k,C)},touchend:function(C){X(k,C)},touchmove:function(C){ae(k,C)},touchcancel:function(C){oe(k,C)},gesturestart:function(C){N(k,C)},gesturechange:function(C){Y(k,C)},gotpointercapture:function(C){we(k,C)},lostpointercapture:function(C){Se(k,C)},pointerenter:function(C){ue(k,C)},pointerleave:function(C){V(k,C)},pointerover:function(C){A(k,C)},pointerout:function(C){U(k,C)},pointerdown:function(C){le(k,C)},pointerup:function(C){be(k,C)},pointermove:function(C){Te(k,C)},pointercancel:function(C){pe(k,C)},pointerupcaptured:function(C){ye(k,C)},pointermovecaptured:function(C){Ee(k,C)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,e.MouseTracker.havePointerEvents&&e.setElementPointerEvents(this.element,"auto"),this.exitHandler&&e.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),y.startDisabled||this.setTracking(!0)},e.MouseTracker.prototype={destroy:function(){c(this),this.element=null,r[this.hash]=null,delete r[this.hash]},isTracking:function(){return r[this.hash].tracking},setTracking:function(y){return y?s(this):c(this),this},getActivePointersListByType:function(y){var w=r[this.hash],k,C=w?w.activePointersLists.length:0,K;for(k=0;k<C;k++)if(w.activePointersLists[k].type===y)return w.activePointersLists[k];return K=new e.MouseTracker.GesturePointList(y),w&&w.activePointersLists.push(K),K},getActivePointerCount:function(){var y=r[this.hash],w,k=y.activePointersLists.length,C=0;for(w=0;w<k;w++)C+=y.activePointersLists[w].getLength();return C},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var n=(function(){try{return window.self!==window.top}catch{return!0}})();function o(y){try{return y.addEventListener&&y.removeEventListener}catch{return!1}}e.MouseTracker.gesturePointVelocityTracker=(function(){var y=[],w=0,k=0,C=function(Je,ze){return Je.hash.toString()+ze.type+ze.id.toString()},K=function(){var Je,ze=y.length,rr,St,$i=e.now(),dh,fh,ph;for(dh=$i-k,k=$i,Je=0;Je<ze;Je++)rr=y[Je],St=rr.gPoint,St.direction=Math.atan2(St.currentPos.y-rr.lastPos.y,St.currentPos.x-rr.lastPos.x),fh=rr.lastPos.distanceTo(St.currentPos),rr.lastPos=St.currentPos,ph=1e3*fh/(dh+1),St.speed=.75*ph+.25*St.speed},he=function(Je,ze){var rr=C(Je,ze);y.push({guid:rr,gPoint:ze,lastPos:ze.currentPos}),y.length===1&&(k=e.now(),w=window.setInterval(K,50))},Oe=function(Je,ze){var rr=C(Je,ze),St,$i=y.length;for(St=0;St<$i;St++)if(y[St].guid===rr){y.splice(St,1),$i--,$i===0&&window.clearInterval(w);break}};return{addPoint:he,removePoint:Oe}})(),e.MouseTracker.captureElement=document,e.MouseTracker.wheelEventName="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],e.MouseTracker.wheelEventName==="DOMMouseScroll"&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=(function(){var y=document.createElement("div");return e.isFunction(y.setPointerCapture)&&e.isFunction(y.releasePointerCapture)})(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=(function(){var y=document.createElement("div");return e.isFunction(y.setCapture)&&e.isFunction(y.releaseCapture)})(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(y){this._gPoints=[],this.type=y,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(y){return this._gPoints.push(y)},removeById:function(y){var w,k=this._gPoints.length;for(w=0;w<k;w++)if(this._gPoints[w].id===y){this._gPoints.splice(w,1);break}return this._gPoints.length},getByIndex:function(y){return y<this._gPoints.length?this._gPoints[y]:null},getById:function(y){var w,k=this._gPoints.length;for(w=0;w<k;w++)if(this._gPoints[w].id===y)return this._gPoints[w];return null},getPrimary:function(y){var w,k=this._gPoints.length;for(w=0;w<k;w++)if(this._gPoints[w].isPrimary)return this._gPoints[w];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function a(y){var w=r[y.hash],k,C,K,he,Oe,Je=w.activePointersLists.length;for(k=0;k<Je;k++)if(K=w.activePointersLists[k],K.getLength()>0){for(Oe=[],he=K.asArray(),C=0;C<he.length;C++)Oe.push(he[C]);for(C=0;C<Oe.length;C++)Ye(y,K,Oe[C])}for(k=0;k<Je;k++)w.activePointersLists.pop();w.sentDragEvent=!1}function s(y){var w=r[y.hash],k,C;if(!w.tracking){for(C=0;C<e.MouseTracker.subscribeEvents.length;C++)k=e.MouseTracker.subscribeEvents[C],e.addEvent(y.element,k,w[k],k===e.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);a(y),w.tracking=!0}}function c(y){var w=r[y.hash],k,C;if(w.tracking){for(C=0;C<e.MouseTracker.subscribeEvents.length;C++)k=e.MouseTracker.subscribeEvents[C],e.removeEvent(y.element,k,w[k],!1);a(y),w.tracking=!1}}function l(y,w){var k=r[y.hash];if(w==="pointerevent")return{upName:"pointerup",upHandler:k.pointerupcaptured,moveName:"pointermove",moveHandler:k.pointermovecaptured};if(w==="mouse")return{upName:"pointerup",upHandler:k.pointerupcaptured,moveName:"pointermove",moveHandler:k.pointermovecaptured};if(w==="touch")return{upName:"touchend",upHandler:k.touchendcaptured,moveName:"touchmove",moveHandler:k.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function u(y,w){var k;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents)try{y.element.setPointerCapture(w.id)}catch{e.console.warn("setPointerCapture() called on invalid pointer ID");return}else y.element.setCapture(!0);else k=l(y,e.MouseTracker.havePointerEvents?"pointerevent":w.type),n&&o(window.top)&&e.addEvent(window.top,k.upName,k.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,k.upName,k.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,k.moveName,k.moveHandler,!0);H(y,w,!0)}function h(y,w){var k,C,K;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents){if(C=y.getActivePointersListByType(w.type),K=C.getById(w.id),!K||!K.captured)return;try{y.element.releasePointerCapture(w.id)}catch{}}else y.element.releaseCapture();else k=l(y,e.MouseTracker.havePointerEvents?"pointerevent":w.type),n&&o(window.top)&&e.removeEvent(window.top,k.upName,k.upHandler,!0),e.removeEvent(e.MouseTracker.captureElement,k.moveName,k.moveHandler,!0),e.removeEvent(e.MouseTracker.captureElement,k.upName,k.upHandler,!0);H(y,w,!1)}function f(y){return e.MouseTracker.havePointerEvents?y.pointerId:e.MouseTracker.mousePointerId}function v(y){return e.MouseTracker.havePointerEvents&&y.pointerType?y.pointerType:"mouse"}function _(y){return e.MouseTracker.havePointerEvents?y.isPrimary:!0}function d(y){return e.getMousePosition(y)}function g(y,w){return b(d(y),w)}function b(y,w){var k=e.getElementOffset(w);return y.minus(k)}function S(y,w){return new e.Point((y.x+w.x)/2,(y.y+w.y)/2)}function P(y,w){var k={originalEvent:w,eventType:"click",pointerType:"mouse",isEmulated:!1};T(y,k),k.preventDefault&&!k.defaultPrevented&&e.cancelEvent(w),k.stopPropagation&&e.stopEvent(w)}function E(y,w){var k={originalEvent:w,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};T(y,k),k.preventDefault&&!k.defaultPrevented&&e.cancelEvent(w),k.stopPropagation&&e.stopEvent(w)}function R(y,w){var k=null,C={originalEvent:w,eventType:"keydown",pointerType:"",isEmulated:!1};T(y,C),y.keyDownHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:y,keyCode:w.keyCode?w.keyCode:w.charCode,ctrl:w.ctrlKey,shift:w.shiftKey,alt:w.altKey,meta:w.metaKey,originalEvent:w,preventDefault:C.preventDefault||C.defaultPrevented,userData:y.userData},y.keyDownHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function F(y,w){var k=null,C={originalEvent:w,eventType:"keyup",pointerType:"",isEmulated:!1};T(y,C),y.keyUpHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:y,keyCode:w.keyCode?w.keyCode:w.charCode,ctrl:w.ctrlKey,shift:w.shiftKey,alt:w.altKey,meta:w.metaKey,originalEvent:w,preventDefault:C.preventDefault||C.defaultPrevented,userData:y.userData},y.keyUpHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function Z(y,w){var k=null,C={originalEvent:w,eventType:"keypress",pointerType:"",isEmulated:!1};T(y,C),y.keyHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:y,keyCode:w.keyCode?w.keyCode:w.charCode,ctrl:w.ctrlKey,shift:w.shiftKey,alt:w.altKey,meta:w.metaKey,originalEvent:w,preventDefault:C.preventDefault||C.defaultPrevented,userData:y.userData},y.keyHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function z(y,w){var k={originalEvent:w,eventType:"focus",pointerType:"",isEmulated:!1};T(y,k),y.focusHandler&&!k.preventGesture&&y.focusHandler({eventSource:y,originalEvent:w,userData:y.userData})}function M(y,w){var k={originalEvent:w,eventType:"blur",pointerType:"",isEmulated:!1};T(y,k),y.blurHandler&&!k.preventGesture&&y.blurHandler({eventSource:y,originalEvent:w,userData:y.userData})}function O(y,w){var k=null,C={originalEvent:w,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};T(y,C),y.contextMenuHandler&&!C.preventGesture&&!C.defaultPrevented&&(k={eventSource:y,position:b(d(w),y.element),originalEvent:C.originalEvent,preventDefault:C.preventDefault||C.defaultPrevented,userData:y.userData},y.contextMenuHandler(k)),(k&&k.preventDefault||C.preventDefault&&!C.defaultPrevented)&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function $(y,w){ie(y,w,w)}function ee(y,w){var k={target:w.target||w.srcElement,type:"wheel",shiftKey:w.shiftKey||!1,clientX:w.clientX,clientY:w.clientY,pageX:w.pageX?w.pageX:w.clientX,pageY:w.pageY?w.pageY:w.clientY,deltaMode:w.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};e.MouseTracker.wheelEventName==="mousewheel"?k.deltaY=-w.wheelDelta/e.DEFAULT_SETTINGS.pixelsPerWheelLine:k.deltaY=w.detail,ie(y,k,w)}function ie(y,w,k){var C=0,K,he=null;C=w.deltaY?w.deltaY<0?1:-1:0,K={originalEvent:w,eventType:"wheel",pointerType:"mouse",isEmulated:w!==k},T(y,K),y.scrollHandler&&!K.preventGesture&&!K.defaultPrevented&&(he={eventSource:y,pointerType:"mouse",position:g(w,y.element),scroll:C,shift:w.shiftKey,isTouchEvent:!1,originalEvent:k,preventDefault:K.preventDefault||K.defaultPrevented,userData:y.userData},y.scrollHandler(he)),K.stopPropagation&&e.stopEvent(k),(he&&he.preventDefault||K.preventDefault&&!K.defaultPrevented)&&e.cancelEvent(k)}function L(y,w){var k={id:e.MouseTracker.mousePointerId,type:"mouse"},C={originalEvent:w,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};T(y,C),w.target===y.element&&H(y,k,!1),C.stopPropagation&&e.stopEvent(w)}function B(y,w){var k,C,K=w.changedTouches.length,he,Oe=y.getActivePointersListByType("touch");k=e.now(),Oe.getLength()>w.touches.length-K&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var Je={originalEvent:w,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(T(y,Je),C=0;C<K;C++)he={id:w.changedTouches[C].identifier,type:"touch",isPrimary:Oe.getLength()===0,currentPos:d(w.changedTouches[C]),currentTime:k},re(y,Je,he),Me(y,Je,he,0),H(y,he,!0);Je.preventDefault&&!Je.defaultPrevented&&e.cancelEvent(w),Je.stopPropagation&&e.stopEvent(w)}function X(y,w){var k,C,K=w.changedTouches.length,he;k=e.now();var Oe={originalEvent:w,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(T(y,Oe),C=0;C<K;C++)he={id:w.changedTouches[C].identifier,type:"touch",currentPos:d(w.changedTouches[C]),currentTime:k},Ue(y,Oe,he,0),H(y,he,!1),ce(y,Oe,he);Oe.preventDefault&&!Oe.defaultPrevented&&e.cancelEvent(w),Oe.stopPropagation&&e.stopEvent(w)}function ae(y,w){var k,C,K=w.changedTouches.length,he;k=e.now();var Oe={originalEvent:w,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(T(y,Oe),C=0;C<K;C++)he={id:w.changedTouches[C].identifier,type:"touch",currentPos:d(w.changedTouches[C]),currentTime:k},je(y,Oe,he);Oe.preventDefault&&!Oe.defaultPrevented&&e.cancelEvent(w),Oe.stopPropagation&&e.stopEvent(w)}function oe(y,w){var k=w.changedTouches.length,C,K,he={originalEvent:w,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(T(y,he),C=0;C<k;C++)K={id:w.changedTouches[C].identifier,type:"touch"},Ce(y,he,K);he.stopPropagation&&e.stopEvent(w)}function N(y,w){return e.eventIsCanceled(w)||w.preventDefault(),!1}function Y(y,w){return e.eventIsCanceled(w)||w.preventDefault(),!1}function we(y,w){var k={originalEvent:w,eventType:"gotpointercapture",pointerType:v(w),isEmulated:!1};T(y,k),w.target===y.element&&H(y,{id:w.pointerId,type:v(w)},!0),k.stopPropagation&&e.stopEvent(w)}function Se(y,w){var k={originalEvent:w,eventType:"lostpointercapture",pointerType:v(w),isEmulated:!1};T(y,k),w.target===y.element&&H(y,{id:w.pointerId,type:v(w)},!1),k.stopPropagation&&e.stopEvent(w)}function ue(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C={originalEvent:w,eventType:"pointerenter",pointerType:k.type,isEmulated:!1};T(y,C),re(y,C,k)}function V(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C={originalEvent:w,eventType:"pointerleave",pointerType:k.type,isEmulated:!1};T(y,C),ce(y,C,k)}function A(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C={originalEvent:w,eventType:"pointerover",pointerType:k.type,isEmulated:!1};T(y,C),de(y,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function U(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C={originalEvent:w,eventType:"pointerout",pointerType:k.type,isEmulated:!1};T(y,C),ne(y,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function le(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C=e.MouseTracker.havePointerEvents&&k.type==="touch",K={originalEvent:w,eventType:"pointerdown",pointerType:k.type,isEmulated:!1};T(y,K),Me(y,K,k,w.button),K.preventDefault&&!K.defaultPrevented&&e.cancelEvent(w),K.stopPropagation&&e.stopEvent(w),K.shouldCapture&&(C?H(y,k,!0):u(y,k))}function be(y,w){xe(y,w)}function ye(y,w){var k=y.getActivePointersListByType(v(w));k.getById(w.pointerId)&&xe(y,w),e.stopEvent(w)}function xe(y,w){var k;k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()};var C={originalEvent:w,eventType:"pointerup",pointerType:k.type,isEmulated:!1};T(y,C),Ue(y,C,k,w.button),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w),C.shouldReleaseCapture&&(w.target===y.element?h(y,k):H(y,k,!1))}function Te(y,w){ke(y,w)}function Ee(y,w){var k=y.getActivePointersListByType(v(w));k.getById(w.pointerId)&&ke(y,w),e.stopEvent(w)}function ke(y,w){var k={id:f(w),type:v(w),isPrimary:_(w),currentPos:d(w),currentTime:e.now()},C={originalEvent:w,eventType:"pointermove",pointerType:k.type,isEmulated:!1};T(y,C),je(y,C,k),C.preventDefault&&!C.defaultPrevented&&e.cancelEvent(w),C.stopPropagation&&e.stopEvent(w)}function pe(y,w){var k={id:w.pointerId,type:v(w)},C={originalEvent:w,eventType:"pointercancel",pointerType:k.type,isEmulated:!1};T(y,C),Ce(y,C,k),C.stopPropagation&&e.stopEvent(w)}function Le(y,w){return w.speed=0,w.direction=0,w.contactPos=w.currentPos,w.contactTime=w.currentTime,w.lastPos=w.currentPos,w.lastTime=w.currentTime,y.add(w)}function Ye(y,w,k){var C,K=w.getById(k.id);return K?(K.captured&&(e.console.warn("stopTrackingPointer() called on captured pointer"),h(y,K)),w.removeContact(),C=w.removeById(k.id)):C=w.getLength(),C}function m(y,w){switch(w.eventType){case"pointermove":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!1,w.preventGesture=!y.hasGestureHandlers,w.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!1,w.preventGesture=!1,w.stopPropagation=!1;break;case"pointerdown":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!1,w.preventGesture=!y.hasGestureHandlers,w.stopPropagation=!1;break;case"pointerup":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!1,w.preventGesture=!y.hasGestureHandlers,w.stopPropagation=!1;break;case"wheel":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!1,w.preventGesture=!y.hasScrollHandler,w.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":w.isStoppable=!0,w.isCancelable=!1,w.preventDefault=!1,w.preventGesture=!1,w.stopPropagation=!1;break;case"click":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!!y.clickHandler,w.preventGesture=!1,w.stopPropagation=!1;break;case"dblclick":w.isStoppable=!0,w.isCancelable=!0,w.preventDefault=!!y.dblClickHandler,w.preventGesture=!1,w.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:w.isStoppable=!1,w.isCancelable=!1,w.preventDefault=!1,w.preventGesture=!1,w.stopPropagation=!1;break}}function T(y,w){w.eventSource=y,w.eventPhase=w.originalEvent&&typeof w.originalEvent.eventPhase<"u"?w.originalEvent.eventPhase:0,w.defaultPrevented=e.eventIsCanceled(w.originalEvent),w.shouldCapture=!1,w.shouldReleaseCapture=!1,w.userData=y.userData,m(y,w),y.preProcessEventHandler&&y.preProcessEventHandler(w)}function H(y,w,k){var C=y.getActivePointersListByType(w.type),K=C.getById(w.id);K?k&&!K.captured?(K.captured=!0,C.captureCount++):!k&&K.captured&&(K.captured=!1,C.captureCount--,C.captureCount<0&&(C.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function re(y,w,k){var C=y.getActivePointersListByType(k.type),K;K=C.getById(k.id),K?(K.insideElement=!0,K.lastPos=K.currentPos,K.lastTime=K.currentTime,K.currentPos=k.currentPos,K.currentTime=k.currentTime,k=K):(k.captured=!1,k.insideElementPressed=!1,k.insideElement=!0,Le(C,k)),y.enterHandler&&y.enterHandler({eventSource:y,pointerType:k.type,position:b(k.currentPos,y.element),buttons:C.buttons,pointers:y.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData})}function ce(y,w,k){var C=y.getActivePointersListByType(k.type),K,he;K=C.getById(k.id),K?(K.captured?(K.insideElement=!1,K.lastPos=K.currentPos,K.lastTime=K.currentTime,K.currentPos=k.currentPos,K.currentTime=k.currentTime):Ye(y,C,K),k=K):(k.captured=!1,k.insideElementPressed=!1),(y.leaveHandler||y.exitHandler)&&(he={eventSource:y,pointerType:k.type,position:k.currentPos&&b(k.currentPos,y.element),buttons:C.buttons,pointers:y.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData},y.leaveHandler&&y.leaveHandler(he),y.exitHandler&&y.exitHandler(he))}function de(y,w,k){var C,K;C=y.getActivePointersListByType(k.type),K=C.getById(k.id),K?k=K:(k.captured=!1,k.insideElementPressed=!1),y.overHandler&&y.overHandler({eventSource:y,pointerType:k.type,position:b(k.currentPos,y.element),buttons:C.buttons,pointers:y.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData})}function ne(y,w,k){var C,K;C=y.getActivePointersListByType(k.type),K=C.getById(k.id),K?k=K:(k.captured=!1,k.insideElementPressed=!1),y.outHandler&&y.outHandler({eventSource:y,pointerType:k.type,position:k.currentPos&&b(k.currentPos,y.element),buttons:C.buttons,pointers:y.getActivePointerCount(),insideElementPressed:k.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData})}function Me(y,w,k,C){var K=r[y.hash],he=y.getActivePointersListByType(k.type),Oe;if(typeof w.originalEvent.buttons<"u"?he.buttons=w.originalEvent.buttons:C===0?he.buttons|=1:C===1?he.buttons|=4:C===2?he.buttons|=2:C===3?he.buttons|=8:C===4?he.buttons|=16:C===5&&(he.buttons|=32),C!==0){w.shouldCapture=!1,w.shouldReleaseCapture=!1,y.nonPrimaryPressHandler&&!w.preventGesture&&!w.defaultPrevented&&(w.preventDefault=!0,y.nonPrimaryPressHandler({eventSource:y,pointerType:k.type,position:b(k.currentPos,y.element),button:C,buttons:he.buttons,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData}));return}Oe=he.getById(k.id),Oe?(Oe.insideElementPressed=!0,Oe.insideElement=!0,Oe.originalTarget=w.originalEvent.target,Oe.contactPos=k.currentPos,Oe.contactTime=k.currentTime,Oe.lastPos=Oe.currentPos,Oe.lastTime=Oe.currentTime,Oe.currentPos=k.currentPos,Oe.currentTime=k.currentTime,k=Oe):(k.captured=!1,k.insideElementPressed=!0,k.insideElement=!0,k.originalTarget=w.originalEvent.target,Le(he,k)),he.addContact(),!w.preventGesture&&!w.defaultPrevented?(w.shouldCapture=!0,w.shouldReleaseCapture=!1,w.preventDefault=!0,(y.dragHandler||y.dragEndHandler||y.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(y,k),he.contacts===1?y.pressHandler&&!w.preventGesture&&y.pressHandler({eventSource:y,pointerType:k.type,position:b(k.contactPos,y.element),buttons:he.buttons,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData}):he.contacts===2&&y.pinchHandler&&k.type==="touch"&&(K.pinchGPoints=he.asArray(),K.lastPinchDist=K.currentPinchDist=K.pinchGPoints[0].currentPos.distanceTo(K.pinchGPoints[1].currentPos),K.lastPinchCenter=K.currentPinchCenter=S(K.pinchGPoints[0].currentPos,K.pinchGPoints[1].currentPos))):(w.shouldCapture=!1,w.shouldReleaseCapture=!1)}function Ue(y,w,k,C){var K=r[y.hash],he=y.getActivePointersListByType(k.type),Oe,Je,ze,rr=!1,St;if(typeof w.originalEvent.buttons<"u"?he.buttons=w.originalEvent.buttons:C===0?he.buttons^=-2:C===1?he.buttons^=-5:C===2?he.buttons^=-3:C===3?he.buttons^=-9:C===4?he.buttons^=-17:C===5&&(he.buttons^=-33),w.shouldCapture=!1,C!==0){w.shouldReleaseCapture=!1,y.nonPrimaryReleaseHandler&&!w.preventGesture&&!w.defaultPrevented&&(w.preventDefault=!0,y.nonPrimaryReleaseHandler({eventSource:y,pointerType:k.type,position:b(k.currentPos,y.element),button:C,buttons:he.buttons,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData}));return}ze=he.getById(k.id),ze?(he.removeContact(),ze.captured&&(rr=!0),ze.lastPos=ze.currentPos,ze.lastTime=ze.currentTime,ze.currentPos=k.currentPos,ze.currentTime=k.currentTime,ze.insideElement||Ye(y,he,ze),Oe=ze.currentPos,Je=ze.currentTime):(k.captured=!1,k.insideElementPressed=!1,k.insideElement=!0,Le(he,k),ze=k),!w.preventGesture&&!w.defaultPrevented&&(rr?(w.shouldReleaseCapture=!0,w.preventDefault=!0,(y.dragHandler||y.dragEndHandler||y.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(y,ze),he.contacts===0?(y.releaseHandler&&Oe&&y.releaseHandler({eventSource:y,pointerType:ze.type,position:b(Oe,y.element),buttons:he.buttons,insideElementPressed:ze.insideElementPressed,insideElementReleased:ze.insideElement,isTouchEvent:ze.type==="touch",originalEvent:w.originalEvent,userData:y.userData}),y.dragEndHandler&&K.sentDragEvent&&y.dragEndHandler({eventSource:y,pointerType:ze.type,position:b(ze.currentPos,y.element),speed:ze.speed,direction:ze.direction,shift:w.originalEvent.shiftKey,isTouchEvent:ze.type==="touch",originalEvent:w.originalEvent,userData:y.userData}),K.sentDragEvent=!1,(y.clickHandler||y.dblClickHandler)&&ze.insideElement&&(St=Je-ze.contactTime<=y.clickTimeThreshold&&ze.contactPos.distanceTo(Oe)<=y.clickDistThreshold,y.clickHandler&&y.clickHandler({eventSource:y,pointerType:ze.type,position:b(ze.currentPos,y.element),quick:St,shift:w.originalEvent.shiftKey,isTouchEvent:ze.type==="touch",originalEvent:w.originalEvent,originalTarget:ze.originalTarget,userData:y.userData}),y.dblClickHandler&&St&&(he.clicks++,he.clicks===1?(K.lastClickPos=Oe,K.dblClickTimeOut=setTimeout(function(){he.clicks=0},y.dblClickTimeThreshold)):he.clicks===2&&(clearTimeout(K.dblClickTimeOut),he.clicks=0,K.lastClickPos.distanceTo(Oe)<=y.dblClickDistThreshold&&y.dblClickHandler({eventSource:y,pointerType:ze.type,position:b(ze.currentPos,y.element),shift:w.originalEvent.shiftKey,isTouchEvent:ze.type==="touch",originalEvent:w.originalEvent,userData:y.userData}),K.lastClickPos=null)))):he.contacts===2&&y.pinchHandler&&ze.type==="touch"&&(K.pinchGPoints=he.asArray(),K.lastPinchDist=K.currentPinchDist=K.pinchGPoints[0].currentPos.distanceTo(K.pinchGPoints[1].currentPos),K.lastPinchCenter=K.currentPinchCenter=S(K.pinchGPoints[0].currentPos,K.pinchGPoints[1].currentPos))):(w.shouldReleaseCapture=!1,y.releaseHandler&&Oe&&(y.releaseHandler({eventSource:y,pointerType:ze.type,position:b(Oe,y.element),buttons:he.buttons,insideElementPressed:ze.insideElementPressed,insideElementReleased:ze.insideElement,isTouchEvent:ze.type==="touch",originalEvent:w.originalEvent,userData:y.userData}),w.preventDefault=!0)))}function je(y,w,k){var C=r[y.hash],K=y.getActivePointersListByType(k.type),he,Oe,Je;if(typeof w.originalEvent.buttons<"u"&&(K.buttons=w.originalEvent.buttons),he=K.getById(k.id),he)he.lastPos=he.currentPos,he.lastTime=he.currentTime,he.currentPos=k.currentPos,he.currentTime=k.currentTime;else return;w.shouldCapture=!1,w.shouldReleaseCapture=!1,y.stopHandler&&k.type==="mouse"&&(clearTimeout(y.stopTimeOut),y.stopTimeOut=setTimeout(function(){Ie(y,w.originalEvent,k.type)},y.stopDelay)),K.contacts===0?y.moveHandler&&y.moveHandler({eventSource:y,pointerType:k.type,position:b(k.currentPos,y.element),buttons:K.buttons,isTouchEvent:k.type==="touch",originalEvent:w.originalEvent,userData:y.userData}):K.contacts===1?(y.moveHandler&&(he=K.asArray()[0],y.moveHandler({eventSource:y,pointerType:he.type,position:b(he.currentPos,y.element),buttons:K.buttons,isTouchEvent:he.type==="touch",originalEvent:w.originalEvent,userData:y.userData})),y.dragHandler&&!w.preventGesture&&!w.defaultPrevented&&(he=K.asArray()[0],Je=he.currentPos.minus(he.lastPos),y.dragHandler({eventSource:y,pointerType:he.type,position:b(he.currentPos,y.element),buttons:K.buttons,delta:Je,speed:he.speed,direction:he.direction,shift:w.originalEvent.shiftKey,isTouchEvent:he.type==="touch",originalEvent:w.originalEvent,userData:y.userData}),w.preventDefault=!0,C.sentDragEvent=!0)):K.contacts===2&&(y.moveHandler&&(Oe=K.asArray(),y.moveHandler({eventSource:y,pointerType:Oe[0].type,position:b(S(Oe[0].currentPos,Oe[1].currentPos),y.element),buttons:K.buttons,isTouchEvent:Oe[0].type==="touch",originalEvent:w.originalEvent,userData:y.userData})),y.pinchHandler&&k.type==="touch"&&!w.preventGesture&&!w.defaultPrevented&&(Je=C.pinchGPoints[0].currentPos.distanceTo(C.pinchGPoints[1].currentPos),Je!==C.currentPinchDist&&(C.lastPinchDist=C.currentPinchDist,C.currentPinchDist=Je,C.lastPinchCenter=C.currentPinchCenter,C.currentPinchCenter=S(C.pinchGPoints[0].currentPos,C.pinchGPoints[1].currentPos),y.pinchHandler({eventSource:y,pointerType:"touch",gesturePoints:C.pinchGPoints,lastCenter:b(C.lastPinchCenter,y.element),center:b(C.currentPinchCenter,y.element),lastDistance:C.lastPinchDist,distance:C.currentPinchDist,shift:w.originalEvent.shiftKey,originalEvent:w.originalEvent,userData:y.userData}),w.preventDefault=!0)))}function Ce(y,w,k){var C=y.getActivePointersListByType(k.type),K;K=C.getById(k.id),K&&Ye(y,C,K)}function Ie(y,w,k){y.stopHandler&&y.stopHandler({eventSource:y,pointerType:k,position:g(w,y.element),buttons:y.getActivePointersListByType(k).buttons,isTouchEvent:k==="touch",originalEvent:w,userData:y.userData})}})(t),(function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(r,n,o){var a=r.parentNode;typeof n=="number"&&(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"),n={anchor:n}),n.attachToViewer=typeof n.attachToViewer>"u"?!0:n.attachToViewer,this.autoFade=typeof n.autoFade>"u"?!0:n.autoFade,this.element=r,this.anchor=n.anchor,this.container=o,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof n.top=="number"?n.top+"px":n.top,this.wrapper.style.left=typeof n.left=="number"?n.left+"px":n.left,this.wrapper.style.height=typeof n.height=="number"?n.height+"px":n.height,this.wrapper.style.width=typeof n.width=="number"?n.width+"px":n.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),n.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):a.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(r){this.wrapper.style.display=r?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(r){e.setElementOpacity(this.wrapper,r,!0)}}})(t),(function(e){e.ControlDock=function(n){var o=["topleft","topright","bottomright","bottomleft"],a,s;for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(Math.random()*1e6),container:e.makeNeutralElement("div"),controls:[]},n),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),e.getElementStyle(this.element).position==="static"&&(this.element.style.position="relative"),this.container.style.width="100%",this.container.style.height="100%"),s=0;s<o.length;s++)a=o[s],this.controls[a]=e.makeNeutralElement("div"),this.controls[a].style.position="absolute",a.match("left")&&(this.controls[a].style.left="0px"),a.match("right")&&(this.controls[a].style.right="0px"),a.match("top")&&(this.controls[a].style.top="0px"),a.match("bottom")&&(this.controls[a].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},e.ControlDock.prototype={addControl:function(n,o){n=e.getElement(n);var a=null;if(!(r(this,n)>=0)){switch(o.anchor){case e.ControlAnchor.TOP_RIGHT:a=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:a=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:a=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:a=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:a=this.container,n.style.margin="0px",n.style.padding="0px";break;default:case e.ControlAnchor.NONE:a=this.container,n.style.margin="0px",n.style.padding="0px";break}this.controls.push(new e.Control(n,o,a)),n.style.display="inline-block"}},removeControl:function(n){n=e.getElement(n);var o=r(this,n);return o>=0&&(this.controls[o].destroy(),this.controls.splice(o,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var n;for(n=this.controls.length-1;n>=0;n--)if(this.controls[n].isVisible())return!0;return!1},setControlsEnabled:function(n){var o;for(o=this.controls.length-1;o>=0;o--)this.controls[o].setVisible(n);return this}};function r(n,o){var a=n.controls,s;for(s=a.length-1;s>=0;s--)if(a[s].element===o)return s;return-1}})(t),(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}}})})(t),(function(e){var r={},n=1;e.Viewer=function(m){var T=arguments,H=this,re;e.isPlainObject(m)||(m={id:T[0],xmlPath:T.length>1?T[1]:void 0,prefixUrl:T.length>2?T[2]:void 0,controls:T.length>3?T[3]:void 0,overlays:T.length>4?T[4]:void 0}),m.config&&(e.extend(!0,m,m.config),delete m.config);let ce=["useCanvas"];if(m.drawerOptions=Object.assign({},ce.reduce((ne,Me)=>(ne[Me]=m[Me],delete m[Me],ne),{}),m.drawerOptions),e.extend(!0,this,{id:m.id,hash:m.hash||n++,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,buttonGroup:null,profiler:null},e.DEFAULT_SETTINGS,m),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");typeof r[this.hash]<"u"&&e.console.warn("Hash "+this.hash+" has already been used."),r[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(ne){var Me=e.getString("Errors.OpenFailed",ne.eventSource,ne.message);H._showMessage(Me)}),e.ControlDock.call(this,m),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(function(ne){ne.width="100%",ne.height="100%",ne.overflow="hidden",ne.position="absolute",ne.top="0px",ne.left="0px"})(this.canvas.style),e.setElementTouchActionNone(this.canvas),m.tabIndex!==""&&(this.canvas.tabIndex=m.tabIndex===void 0?0:m.tabIndex),this.container.className="openseadragon-container",(function(ne){ne.width="100%",ne.height="100%",ne.position="relative",ne.overflow="hidden",ne.left="0px",ne.top="0px",ne.textAlign="left"})(this.container.style),e.setElementTouchActionNone(this.container),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({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,g),keyDownHandler:e.delegate(this,b),keyHandler:e.delegate(this,S),clickHandler:e.delegate(this,P),dblClickHandler:e.delegate(this,E),dragHandler:e.delegate(this,R),dragEndHandler:e.delegate(this,F),enterHandler:e.delegate(this,Z),leaveHandler:e.delegate(this,z),pressHandler:e.delegate(this,M),releaseHandler:e.delegate(this,O),nonPrimaryPressHandler:e.delegate(this,$),nonPrimaryReleaseHandler:e.delegate(this,ee),scrollHandler:e.delegate(this,X),pinchHandler:e.delegate(this,ie),focusHandler:e.delegate(this,L),blurHandler:e.delegate(this,B)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,ae),leaveHandler:e.delegate(this,oe)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),r[this.hash].prevContainerSize=o(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver(function(){r[H.hash].needsResize=!0}),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(ne){H.source=H.world.getItemAt(0).source,r[H.hash].forceRedraw=!0,H._updateRequestId||(H._updateRequestId=l(H,N))}),this.world.addHandler("remove-item",function(ne){H.world.getItemCount()?H.source=H.world.getItemAt(0).source:H.source=null,r[H.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(ne){H.viewport&&H.viewport._setContentBounds(H.world.getHomeBounds(),H.world.getContentFactor())}),this.world.addHandler("item-index-change",function(ne){H.source=H.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:r[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,flipped:this.flipped,overlayPreserveContentDirection:this.overlayPreserveContentDirection,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:m.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),Object.prototype.hasOwnProperty.call(this.drawerOptions,"useCanvas")&&(e.console.error('useCanvas is deprecated, use the "drawer" option to indicate preferred drawer(s)'),this.drawerOptions.useCanvas||(this.drawer=e.HTMLDrawer),delete this.drawerOptions.useCanvas);let de=Array.isArray(this.drawer)?this.drawer:[this.drawer];de.length===0&&(de=[e.DEFAULT_SETTINGS.drawer].flat(),e.console.warn("No valid drawers were selected. Using the default value.")),this.drawer=null;for(const ne of de)if(this.requestDrawer(ne,{mainDrawer:!0,redrawImmediately:!1}))break;if(!this.drawer)throw e.console.error("No drawer could be created!"),"Error with creating the selected drawer(s)";for(this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(re=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(re,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(re=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(re,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({element:this.navigatorElement,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,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime,drawer:this.drawer.getType(),loadTilesWithAjax:this.loadTilesWithAjax,ajaxHeaders:this.ajaxHeaders,ajaxWithCredentials:this.ajaxWithCredentials})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),re=0;re<this.customControls.length;re++)this.addControl(this.customControls[re].id,{anchor:this.customControls[re].anchor});e.requestAnimationFrame(function(){h(H)}),e._viewers.set(this.element,this)},e.extend(e.Viewer.prototype,e.EventSource.prototype,e.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(m){return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(m)},openTileSource:function(m){return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(m)},get buttons(){return e.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(m,T){var H=this;if(this.close(),!m)return this;if(this.sequenceMode&&e.isArray(m))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof T<"u"&&!isNaN(T)&&(this.initialPage=T),this.tileSources=m,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(e.isArray(m)||(m=[m]),!m.length)return this;this._opening=!0;for(var re=m.length,ce=0,de=0,ne,Me=function(){if(ce+de===re)if(ce){(H._firstOpen||!H.preserveViewport)&&(H.viewport.goHome(!0),H.viewport.update()),H._firstOpen=!1;var Ce=m[0];if(Ce.tileSource&&(Ce=Ce.tileSource),H.overlays&&!H.preserveOverlays)for(var Ie=0;Ie<H.overlays.length;Ie++)H.currentOverlays[Ie]=s(H,H.overlays[Ie]);H._drawOverlays(),H._opening=!1,H.raiseEvent("open",{source:Ce})}else H._opening=!1,H.raiseEvent("open-failed",ne)},Ue=function(Ce){(!e.isPlainObject(Ce)||!Ce.tileSource)&&(Ce={tileSource:Ce}),Ce.index!==void 0&&(e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete Ce.index),Ce.collectionImmediately===void 0&&(Ce.collectionImmediately=!0);var Ie=Ce.success;Ce.success=function(w){if(ce++,Ce.tileSource.overlays)for(var k=0;k<Ce.tileSource.overlays.length;k++)H.addOverlay(Ce.tileSource.overlays[k]);Ie&&Ie(w),Me()};var y=Ce.error;Ce.error=function(w){de++,ne||(ne=w),y&&y(w),Me()},H.addTiledImage(Ce)},je=0;je<m.length;je++)Ue(m[je]);return this},close:function(){return r[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),r[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(r[this.hash]){if(this.raiseEvent("before-destroy"),this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this._resizeObserver&&this._resizeObserver.disconnect(),this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),this._updateRequestId!==null&&(e.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),r[this.navigator.hash]=null,delete r[this.navigator.hash],this.navigator=null),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),r[this.hash]=null,delete r[this.hash],this.canvas=null,this.container=null,e._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},requestDrawer(m,T){const H={mainDrawer:!0,redrawImmediately:!0,drawerOptions:null};T=e.extend(!0,H,T);const re=T.mainDrawer,ce=T.redrawImmediately,de=T.drawerOptions,ne=this.drawer;let Me=null;if(m&&m.prototype instanceof e.DrawerBase?(Me=m,m="custom"):typeof m=="string"&&(Me=e.determineDrawer(m)),Me||e.console.warn("Unsupported drawer! Drawer must be an existing string type, or a class that extends OpenSeadragon.DrawerBase."),Me&&Me.isSupported()){ne&&re&&ne.destroy();const Ue=new Me({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor,options:de||this.drawerOptions[m]});return re&&(this.drawer=Ue,ce&&this.forceRedraw()),Ue}return!1},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(m){return this.innerTracker.setTracking(m),this.outerTracker.setTracking(m),this.raiseEvent("mouse-enabled",{enabled:m}),this},areControlsEnabled:function(){var m=this.controls.length,T;for(T=0;T<this.controls.length;T++)m=m&&this.controls[T].isVisible();return m},setControlsEnabled:function(m){return m?v(this):h(this),this.raiseEvent("controls-enabled",{enabled:m}),this},setDebugMode:function(m){for(var T=0;T<this.world.getItemCount();T++)this.world.getItemAt(T).debugMode=m;this.debugMode=m,this.forceRedraw()},setAjaxHeaders:function(m,T){if(m===null&&(m={}),!e.isPlainObject(m)){console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}if(T===void 0&&(T=!0),this.ajaxHeaders=m,T){for(var H=0;H<this.world.getItemCount();H++)this.world.getItemAt(H)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var re in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[re].setAjaxHeaders(this.ajaxHeaders,!0)}},addButton:function(m){this.buttonGroup.addButton(m)},isFullPage:function(){return r[this.hash]&&r[this.hash].fullPage},setFullPage:function(m){var T=document.body,H=T.style,re=document.documentElement.style,ce=this,de,ne;if(m===this.isFullPage())return this;var Me={fullPage:m,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",Me),Me.preventDefaultAction)return this;if(m&&this.element){for(this.elementSize=e.getElementSize(this.element),this.pageScroll=e.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=H.margin,this.docMargin=re.margin,H.margin="0",re.margin="0",this.bodyPadding=H.padding,this.docPadding=re.padding,H.padding="0",re.padding="0",this.bodyWidth=H.width,this.docWidth=re.width,H.width="100%",re.width="100%",this.bodyHeight=H.height,this.docHeight=re.height,H.height="100%",re.height="100%",this.bodyDisplay=H.display,H.display="block",this.previousBody=[],r[this.hash].prevElementParent=this.element.parentNode,r[this.hash].prevNextSibling=this.element.nextSibling,r[this.hash].prevElementWidth=this.element.style.width,r[this.hash].prevElementHeight=this.element.style.height,de=T.childNodes.length,ne=0;ne<de;ne++)this.previousBody.push(T.childNodes[0]),T.removeChild(T.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,T.appendChild(this.toolbar.element),e.addClass(this.toolbar.element,"fullpage")),e.addClass(this.element,"fullpage"),T.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=e.getElementSize(this.element).y-e.getElementSize(this.toolbar.element).y+"px"),r[this.hash].fullPage=!0,e.delegate(this,ae)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,H.margin=this.bodyMargin,re.margin=this.docMargin,H.padding=this.bodyPadding,re.padding=this.docPadding,H.width=this.bodyWidth,re.width=this.docWidth,H.height=this.bodyHeight,re.height=this.docHeight,H.display=this.bodyDisplay,T.removeChild(this.element),de=this.previousBody.length,ne=0;ne<de;ne++)T.appendChild(this.previousBody.shift());e.removeClass(this.element,"fullpage"),r[this.hash].prevElementParent.insertBefore(this.element,r[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(T.removeChild(this.toolbar.element),e.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=r[this.hash].prevElementWidth,this.element.style.height=r[this.hash].prevElementHeight;var Ue=0,je=function(){e.setPageScroll(ce.pageScroll);var Ce=e.getPageScroll();Ue++,Ue<10&&(Ce.x!==ce.pageScroll.x||Ce.y!==ce.pageScroll.y)&&e.requestAnimationFrame(je)};e.requestAnimationFrame(je),r[this.hash].fullPage=!1,e.delegate(this,oe)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:m}),this},setFullScreen:function(m){var T=this;if(!e.supportsFullScreen)return this.setFullPage(m);if(e.isFullScreen()===m)return this;var H={fullScreen:m,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",H),H.preventDefaultAction)return this;if(m){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var re=function(){var ce=e.isFullScreen();ce||(e.removeEvent(document,e.fullScreenEventName,re),e.removeEvent(document,e.fullScreenErrorEventName,re),T.setFullPage(!1),T.isFullPage()&&(T.element.style.width=T.fullPageStyleWidth,T.element.style.height=T.fullPageStyleHeight)),T.navigator&&T.viewport&&setTimeout(function(){T.navigator.update(T.viewport)}),T.raiseEvent("full-screen",{fullScreen:ce})};e.addEvent(document,e.fullScreenEventName,re),e.addEvent(document,e.fullScreenErrorEventName,re),e.requestFullScreen(document.body)}else e.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},isFullScreen:function(){return e.isFullScreen()&&this.isFullPage()},setVisible:function(m){return this.container.style.visibility=m?"":"hidden",this.raiseEvent("visible",{visible:m}),this},addTiledImage:function(m){e.console.assert(m,"[Viewer.addTiledImage] options is required"),e.console.assert(m.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),e.console.assert(!m.replace||m.index>-1&&m.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var T=this;m.replace&&(m.replaceItem=T.world.getItemAt(m.index)),this._hideMessage(),m.placeholderFillStyle===void 0&&(m.placeholderFillStyle=this.placeholderFillStyle),m.opacity===void 0&&(m.opacity=this.opacity),m.preload===void 0&&(m.preload=this.preload),m.compositeOperation===void 0&&(m.compositeOperation=this.compositeOperation),m.crossOriginPolicy===void 0&&(m.crossOriginPolicy=m.tileSource.crossOriginPolicy!==void 0?m.tileSource.crossOriginPolicy:this.crossOriginPolicy),m.ajaxWithCredentials===void 0&&(m.ajaxWithCredentials=this.ajaxWithCredentials),m.loadTilesWithAjax===void 0&&(m.loadTilesWithAjax=this.loadTilesWithAjax),e.isPlainObject(m.ajaxHeaders)||(m.ajaxHeaders={});var H={options:m};function re(ne){for(var Me=0;Me<T._loadQueue.length;Me++)if(T._loadQueue[Me]===H){T._loadQueue.splice(Me,1);break}T._loadQueue.length===0&&ce(H),T.raiseEvent("add-item-failed",ne),m.error&&m.error(ne)}function ce(ne){T.collectionMode&&(T.world.arrange({immediately:ne.options.collectionImmediately,rows:T.collectionRows,columns:T.collectionColumns,layout:T.collectionLayout,tileSize:T.collectionTileSize,tileMargin:T.collectionTileMargin}),T.world.setAutoRefigureSizes(!0))}if(e.isArray(m.tileSource)){setTimeout(function(){re({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:m.tileSource,options:m})});return}this._loadQueue.push(H);function de(){for(var ne,Me,Ue;T._loadQueue.length&&(ne=T._loadQueue[0],!!ne.tileSource);){if(T._loadQueue.splice(0,1),ne.options.replace){var je=T.world.getIndexOfItem(ne.options.replaceItem);je!==-1&&(ne.options.index=je),T.world.removeItem(ne.options.replaceItem)}Me=new e.TiledImage({viewer:T,source:ne.tileSource,viewport:T.viewport,drawer:T.drawer,tileCache:T.tileCache,imageLoader:T.imageLoader,x:ne.options.x,y:ne.options.y,width:ne.options.width,height:ne.options.height,fitBounds:ne.options.fitBounds,fitBoundsPlacement:ne.options.fitBoundsPlacement,clip:ne.options.clip,placeholderFillStyle:ne.options.placeholderFillStyle,opacity:ne.options.opacity,preload:ne.options.preload,degrees:ne.options.degrees,flipped:ne.options.flipped,compositeOperation:ne.options.compositeOperation,springStiffness:T.springStiffness,animationTime:T.animationTime,minZoomImageRatio:T.minZoomImageRatio,wrapHorizontal:T.wrapHorizontal,wrapVertical:T.wrapVertical,maxTilesPerFrame:T.maxTilesPerFrame,immediateRender:T.immediateRender,blendTime:T.blendTime,alwaysBlend:T.alwaysBlend,minPixelRatio:T.minPixelRatio,smoothTileEdgesMinZoom:T.smoothTileEdgesMinZoom,iOSDevice:T.iOSDevice,crossOriginPolicy:ne.options.crossOriginPolicy,ajaxWithCredentials:ne.options.ajaxWithCredentials,loadTilesWithAjax:ne.options.loadTilesWithAjax,ajaxHeaders:ne.options.ajaxHeaders,debugMode:T.debugMode,subPixelRoundingForTransparency:T.subPixelRoundingForTransparency}),T.collectionMode&&T.world.setAutoRefigureSizes(!1),T.navigator&&(Ue=e.extend({},ne.options,{replace:!1,originalTiledImage:Me,tileSource:ne.tileSource}),T.navigator.addTiledImage(Ue)),T.world.addItem(Me,{index:ne.options.index}),T._loadQueue.length===0&&ce(ne),T.world.getItemCount()===1&&!T.preserveViewport&&T.viewport.goHome(!0),ne.options.success&&ne.options.success({item:Me})}}a(this,m.tileSource,m,function(ne){H.tileSource=ne,de()},function(ne){ne.options=m,re(ne),de()})},addSimpleImage:function(m){e.console.assert(m,"[Viewer.addSimpleImage] options is required"),e.console.assert(m.url,"[Viewer.addSimpleImage] options.url is required");var T=e.extend({},m,{tileSource:{type:"image",url:m.url}});delete T.url,this.addTiledImage(T)},addLayer:function(m){var T=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var H=e.extend({},m,{success:function(re){T.raiseEvent("add-layer",{options:m,drawer:re.item})},error:function(re){T.raiseEvent("add-layer-failed",re)}});return this.addTiledImage(H),this},getLayerAtLevel:function(m){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(m)},getLevelOfLayer:function(m){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(m)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(m,T){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(m,T)},removeLayer:function(m){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(m)},forceRedraw:function(){return r[this.hash].forceRedraw=!0,this},forceResize:function(){r[this.hash].needsResize=!0,r[this.hash].forceResize=!0},bindSequenceControls:function(){var m=e.delegate(this,_),T=e.delegate(this,d),H=e.delegate(this,this.goToNextPage),re=e.delegate(this,this.goToPreviousPage),ce=this.navImages,de=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(de=!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:ue(this.prefixUrl,ce.previous.REST),srcGroup:ue(this.prefixUrl,ce.previous.GROUP),srcHover:ue(this.prefixUrl,ce.previous.HOVER),srcDown:ue(this.prefixUrl,ce.previous.DOWN),onRelease:re,onFocus:m,onBlur:T}),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:ue(this.prefixUrl,ce.next.REST),srcGroup:ue(this.prefixUrl,ce.next.GROUP),srcHover:ue(this.prefixUrl,ce.next.HOVER),srcDown:ue(this.prefixUrl,ce.next.DOWN),onRelease:H,onFocus:m,onBlur:T}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),de&&(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 m=e.delegate(this,V),T=e.delegate(this,U),H=e.delegate(this,ye),re=e.delegate(this,A),ce=e.delegate(this,xe),de=e.delegate(this,Ee),ne=e.delegate(this,ke),Me=e.delegate(this,pe),Ue=e.delegate(this,Le),je=e.delegate(this,Ye),Ce=e.delegate(this,_),Ie=e.delegate(this,d),y=this.navImages,w=[],k=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(k=!1),this.showZoomControl&&(w.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:ue(this.prefixUrl,y.zoomIn.REST),srcGroup:ue(this.prefixUrl,y.zoomIn.GROUP),srcHover:ue(this.prefixUrl,y.zoomIn.HOVER),srcDown:ue(this.prefixUrl,y.zoomIn.DOWN),onPress:m,onRelease:T,onClick:H,onEnter:m,onExit:T,onFocus:Ce,onBlur:Ie})),w.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:ue(this.prefixUrl,y.zoomOut.REST),srcGroup:ue(this.prefixUrl,y.zoomOut.GROUP),srcHover:ue(this.prefixUrl,y.zoomOut.HOVER),srcDown:ue(this.prefixUrl,y.zoomOut.DOWN),onPress:re,onRelease:T,onClick:ce,onEnter:re,onExit:T,onFocus:Ce,onBlur:Ie}))),this.showHomeControl&&w.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:ue(this.prefixUrl,y.home.REST),srcGroup:ue(this.prefixUrl,y.home.GROUP),srcHover:ue(this.prefixUrl,y.home.HOVER),srcDown:ue(this.prefixUrl,y.home.DOWN),onRelease:de,onFocus:Ce,onBlur:Ie})),this.showFullPageControl&&w.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:ue(this.prefixUrl,y.fullpage.REST),srcGroup:ue(this.prefixUrl,y.fullpage.GROUP),srcHover:ue(this.prefixUrl,y.fullpage.HOVER),srcDown:ue(this.prefixUrl,y.fullpage.DOWN),onRelease:ne,onFocus:Ce,onBlur:Ie})),this.showRotationControl&&(w.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:ue(this.prefixUrl,y.rotateleft.REST),srcGroup:ue(this.prefixUrl,y.rotateleft.GROUP),srcHover:ue(this.prefixUrl,y.rotateleft.HOVER),srcDown:ue(this.prefixUrl,y.rotateleft.DOWN),onRelease:Me,onFocus:Ce,onBlur:Ie})),w.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:ue(this.prefixUrl,y.rotateright.REST),srcGroup:ue(this.prefixUrl,y.rotateright.GROUP),srcHover:ue(this.prefixUrl,y.rotateright.HOVER),srcDown:ue(this.prefixUrl,y.rotateright.DOWN),onRelease:Ue,onFocus:Ce,onBlur:Ie}))),this.showFlipControl&&w.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:ue(this.prefixUrl,y.flip.REST),srcGroup:ue(this.prefixUrl,y.flip.GROUP),srcHover:ue(this.prefixUrl,y.flip.HOVER),srcDown:ue(this.prefixUrl,y.flip.DOWN),onRelease:je,onFocus:Ce,onBlur:Ie})),k?(this.buttonGroup=new e.ButtonGroup({buttons:w,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",e.delegate(this,Te)),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.customButtons=w),this},currentPage:function(){return this._sequenceIndex},goToPage:function(m){return this.tileSources&&m>=0&&m<this.tileSources.length&&(this._sequenceIndex=m,this._updateSequenceButtons(m),this.open(this.tileSources[m]),this.referenceStrip&&this.referenceStrip.setFocus(m),this.raiseEvent("page",{page:m})),this},addOverlay:function(m,T,H,re){var ce;if(e.isPlainObject(m)?ce=m:ce={element:m,location:T,placement:H,onDraw:re},m=e.getElement(ce.element),c(this.currentOverlays,m)>=0)return this;var de=s(this,ce);return this.currentOverlays.push(de),de.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:m,location:ce.location,placement:ce.placement}),this},updateOverlay:function(m,T,H){var re;return m=e.getElement(m),re=c(this.currentOverlays,m),re>=0&&(this.currentOverlays[re].update(T,H),r[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:m,location:T,placement:H})),this},removeOverlay:function(m){var T;return m=e.getElement(m),T=c(this.currentOverlays,m),T>=0&&(this.currentOverlays[T].destroy(),this.currentOverlays.splice(T,1),r[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:m})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return r[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(m){var T;return m=e.getElement(m),T=c(this.currentOverlays,m),T>=0?this.currentOverlays[T]:null},_updateSequenceButtons:function(m){this.nextButton&&(!this.tileSources||this.tileSources.length-1===m?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(m>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(m){this._hideMessage();var T=e.makeNeutralElement("div");T.appendChild(document.createTextNode(m)),this.messageDiv=e.makeCenteredNode(T),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var m=this.messageDiv;m&&(m.parentNode.removeChild(m),delete this.messageDiv)},gestureSettingsByDeviceType:function(m){switch(m){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var m,T=this.currentOverlays.length;for(m=0;m<T;m++)this.currentOverlays[m].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(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.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var m=e.pixelDensityRatio,T=e.getCurrentPixelDensityRatio();m!==T&&(e.pixelDensityRatio=T,this.forceResize())},goToPreviousPage:function(){var m=this._sequenceIndex-1;this.navPrevNextWrap&&m<0&&(m+=this.tileSources.length),this.goToPage(m)},goToNextPage:function(){var m=this._sequenceIndex+1;this.navPrevNextWrap&&m>=this.tileSources.length&&(m=0),this.goToPage(m)},isAnimating:function(){return r[this.hash].animating}});function o(m){return m=e.getElement(m),new e.Point(m.clientWidth===0?1:m.clientWidth,m.clientHeight===0?1:m.clientHeight)}function a(m,T,H,re,ce){var de=m;if(e.type(T)==="string"){if(T.match(/^\s*<.*>\s*$/))T=e.parseXml(T);else if(T.match(/^\s*[{[].*[}\]]\s*$/))try{var ne=e.parseJSON(T);T=ne}catch{}}function Me(Ue,je){Ue.ready?re(Ue):(Ue.addHandler("ready",function(){re(Ue)}),Ue.addHandler("open-failed",function(Ce){ce({message:Ce.message,source:je})}))}setTimeout(function(){if(e.type(T)==="string")T=new e.TileSource({url:T,crossOriginPolicy:H.crossOriginPolicy!==void 0?H.crossOriginPolicy:m.crossOriginPolicy,ajaxWithCredentials:m.ajaxWithCredentials,ajaxHeaders:H.ajaxHeaders?H.ajaxHeaders:m.ajaxHeaders,splitHashDataForPost:m.splitHashDataForPost,success:function(Ie){re(Ie.tileSource)}}),T.addHandler("open-failed",function(Ie){ce(Ie)});else if(e.isPlainObject(T)||T.nodeType)if(T.crossOriginPolicy===void 0&&(H.crossOriginPolicy!==void 0||m.crossOriginPolicy!==void 0)&&(T.crossOriginPolicy=H.crossOriginPolicy!==void 0?H.crossOriginPolicy:m.crossOriginPolicy),T.ajaxWithCredentials===void 0&&(T.ajaxWithCredentials=m.ajaxWithCredentials),e.isFunction(T.getTileUrl)){var Ue=new e.TileSource(T);Ue.getTileUrl=T.getTileUrl,re(Ue)}else{var je=e.TileSource.determineType(de,T);if(!je){ce({message:"Unable to load TileSource",source:T});return}var Ce=je.prototype.configure.apply(de,[T]);Me(new je(Ce),T)}else Me(T,T)})}function s(m,T){if(T instanceof e.Overlay)return T;var H=null;if(T.element)H=e.getElement(T.element);else{var re=T.id?T.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);H=e.getElement(T.id),H||(H=document.createElement("a"),H.href="#/overlay/"+re),H.id=re,e.addClass(H,T.className?T.className:"openseadragon-overlay")}var ce=T.location,de=T.width,ne=T.height;if(!ce){var Me=T.x,Ue=T.y;if(T.px!==void 0){var je=m.viewport.imageToViewportRectangle(new e.Rect(T.px,T.py,de||0,ne||0));Me=je.x,Ue=je.y,de=de!==void 0?je.width:void 0,ne=ne!==void 0?je.height:void 0}ce=new e.Point(Me,Ue)}var Ce=T.placement;return Ce&&e.type(Ce)==="string"&&(Ce=e.Placement[T.placement.toUpperCase()]),new e.Overlay({element:H,location:ce,placement:Ce,onDraw:T.onDraw,checkResize:T.checkResize,width:de,height:ne,rotationMode:T.rotationMode})}function c(m,T){var H;for(H=m.length-1;H>=0;H--)if(m[H].element===T)return H;return-1}function l(m,T){return e.requestAnimationFrame(function(){T(m)})}function u(m){e.requestAnimationFrame(function(){f(m)})}function h(m){m.autoHideControls&&(m.controlsShouldFade=!0,m.controlsFadeBeginTime=e.now()+m.controlsFadeDelay,window.setTimeout(function(){u(m)},m.controlsFadeDelay))}function f(m){var T,H,re,ce;if(m.controlsShouldFade){for(T=e.now(),H=T-m.controlsFadeBeginTime,re=1-H/m.controlsFadeLength,re=Math.min(1,re),re=Math.max(0,re),ce=m.controls.length-1;ce>=0;ce--)m.controls[ce].autoFade&&m.controls[ce].setOpacity(re);re>0&&u(m)}}function v(m){var T;for(m.controlsShouldFade=!1,T=m.controls.length-1;T>=0;T--)m.controls[T].setOpacity(1)}function _(){v(this)}function d(){h(this)}function g(m){var T={tracker:m.eventSource,position:m.position,originalEvent:m.originalEvent,preventDefault:m.preventDefault};this.raiseEvent("canvas-contextmenu",T),m.preventDefault=T.preventDefault}function b(m){var T={originalEvent:m.originalEvent,preventDefaultAction:!1,preventVerticalPan:m.preventVerticalPan||!this.panVertical,preventHorizontalPan:m.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",T),!T.preventDefaultAction&&!m.ctrl&&!m.alt&&!m.meta)switch(m.keyCode){case 38:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 40:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 37:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 39:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 87:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 83:T.preventVerticalPan||(m.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 65:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 68:T.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),m.preventDefault=!0;break;case 82:m.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),m.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),m.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:m.preventDefault=!1;break}else m.preventDefault=!1}function S(m){var T={originalEvent:m.originalEvent};this.raiseEvent("canvas-key-press",T)}function P(m){var T,H=document.activeElement===this.canvas;H||this.canvas.focus(),this.viewport.flipped&&(m.position.x=this.viewport.getContainerSize().x-m.position.x);var re={tracker:m.eventSource,position:m.position,quick:m.quick,shift:m.shift,originalEvent:m.originalEvent,originalTarget:m.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",re),!re.preventDefaultAction&&this.viewport&&m.quick&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.clickToZoom===!0&&(this.viewport.zoomBy(m.shift?1/this.zoomPerClick:this.zoomPerClick,T.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints()),T.dblClickDragToZoom&&(r[this.hash].draggingToZoom===!0?(r[this.hash].lastClickTime=null,r[this.hash].draggingToZoom=!1):r[this.hash].lastClickTime=e.now()))}function E(m){var T,H={tracker:m.eventSource,position:m.position,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",H),!H.preventDefaultAction&&this.viewport&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.dblClickToZoom&&(this.viewport.zoomBy(m.shift?1/this.zoomPerClick:this.zoomPerClick,T.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints()))}function R(m){var T,H={tracker:m.eventSource,pointerType:m.pointerType,position:m.position,delta:m.delta,speed:m.speed,direction:m.direction,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",H),T=this.gestureSettingsByDeviceType(m.pointerType),!H.preventDefaultAction&&this.viewport){if(T.dblClickDragToZoom&&r[this.hash].draggingToZoom){var re=Math.pow(this.zoomPerDblClickDrag,m.delta.y/50);this.viewport.zoomBy(re)}else if(T.dragToPan&&!r[this.hash].draggingToZoom){if(this.panHorizontal||(m.delta.x=0),this.panVertical||(m.delta.y=0),this.viewport.flipped&&(m.delta.x=-m.delta.x),this.constrainDuringPan){var ce=this.viewport.deltaPointsFromPixels(m.delta.negate());this.viewport.centerSpringX.target.value+=ce.x,this.viewport.centerSpringY.target.value+=ce.y;var de=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=ce.x,this.viewport.centerSpringY.target.value-=ce.y,de.xConstrained&&(m.delta.x=0),de.yConstrained&&(m.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(m.delta.negate()),T.flickEnabled&&!this.constrainDuringPan)}}}function F(m){var T,H={tracker:m.eventSource,pointerType:m.pointerType,position:m.position,speed:m.speed,direction:m.direction,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",H),T=this.gestureSettingsByDeviceType(m.pointerType),!H.preventDefaultAction&&this.viewport){if(!r[this.hash].draggingToZoom&&T.dragToPan&&T.flickEnabled&&m.speed>=T.flickMinSpeed){var re=0;this.panHorizontal&&(re=T.flickMomentum*m.speed*Math.cos(m.direction));var ce=0;this.panVertical&&(ce=T.flickMomentum*m.speed*Math.sin(m.direction));var de=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),ne=this.viewport.pointFromPixel(new e.Point(de.x-re,de.y-ce));this.viewport.panTo(ne,!1)}this.viewport.applyConstraints()}T.dblClickDragToZoom&&r[this.hash].draggingToZoom===!0&&(r[this.hash].draggingToZoom=!1)}function Z(m){this.raiseEvent("canvas-enter",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function z(m){this.raiseEvent("canvas-exit",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function M(m){var T;if(this.raiseEvent("canvas-press",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,insideElementPressed:m.insideElementPressed,insideElementReleased:m.insideElementReleased,originalEvent:m.originalEvent}),T=this.gestureSettingsByDeviceType(m.pointerType),T.dblClickDragToZoom){var H=r[this.hash].lastClickTime,re=e.now();if(H===null)return;re-H<this.dblClickTimeThreshold&&(r[this.hash].draggingToZoom=!0),r[this.hash].lastClickTime=null}}function O(m){this.raiseEvent("canvas-release",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,insideElementPressed:m.insideElementPressed,insideElementReleased:m.insideElementReleased,originalEvent:m.originalEvent})}function $(m){this.raiseEvent("canvas-nonprimary-press",{tracker:m.eventSource,position:m.position,pointerType:m.pointerType,button:m.button,buttons:m.buttons,originalEvent:m.originalEvent})}function ee(m){this.raiseEvent("canvas-nonprimary-release",{tracker:m.eventSource,position:m.position,pointerType:m.pointerType,button:m.button,buttons:m.buttons,originalEvent:m.originalEvent})}function ie(m){var T,H,re,ce,de={tracker:m.eventSource,pointerType:m.pointerType,gesturePoints:m.gesturePoints,lastCenter:m.lastCenter,center:m.center,lastDistance:m.lastDistance,distance:m.distance,shift:m.shift,originalEvent:m.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",de),this.viewport&&(T=this.gestureSettingsByDeviceType(m.pointerType),T.pinchToZoom&&(!de.preventDefaultPanAction||!de.preventDefaultZoomAction)&&(H=this.viewport.pointFromPixel(m.center,!0),T.zoomToRefPoint&&!de.preventDefaultPanAction&&(re=this.viewport.pointFromPixel(m.lastCenter,!0),ce=re.minus(H),this.panHorizontal||(ce.x=0),this.panVertical||(ce.y=0),this.viewport.panBy(ce,!0)),de.preventDefaultZoomAction||this.viewport.zoomBy(m.distance/m.lastDistance,H,!0),this.viewport.applyConstraints()),T.pinchRotate&&!de.preventDefaultRotateAction)){var ne=Math.atan2(m.gesturePoints[0].currentPos.y-m.gesturePoints[1].currentPos.y,m.gesturePoints[0].currentPos.x-m.gesturePoints[1].currentPos.x),Me=Math.atan2(m.gesturePoints[0].lastPos.y-m.gesturePoints[1].lastPos.y,m.gesturePoints[0].lastPos.x-m.gesturePoints[1].lastPos.x);H=this.viewport.pointFromPixel(m.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(ne-Me)*(180/Math.PI),H,!0)}}function L(m){this.raiseEvent("canvas-focus",{tracker:m.eventSource,originalEvent:m.originalEvent})}function B(m){this.raiseEvent("canvas-blur",{tracker:m.eventSource,originalEvent:m.originalEvent})}function X(m){var T,H,re,ce,de;ce=e.now(),de=ce-this._lastScrollTime,de>this.minScrollDeltaTime?(this._lastScrollTime=ce,T={tracker:m.eventSource,position:m.position,scroll:m.scroll,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",T),!T.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(m.position.x=this.viewport.getContainerSize().x-m.position.x),H=this.gestureSettingsByDeviceType(m.pointerType),H.scrollToZoom&&(re=Math.pow(this.zoomPerScroll,m.scroll),this.viewport.zoomBy(re,H.zoomToRefPoint?this.viewport.pointFromPixel(m.position,!0):null),this.viewport.applyConstraints())),m.preventDefault=T.preventDefault):m.preventDefault=!0}function ae(m){r[this.hash].mouseInside=!0,v(this),this.raiseEvent("container-enter",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function oe(m){m.pointers<1&&(r[this.hash].mouseInside=!1,r[this.hash].animating||h(this)),this.raiseEvent("container-exit",{tracker:m.eventSource,pointerType:m.pointerType,position:m.position,buttons:m.buttons,pointers:m.pointers,insideElementPressed:m.insideElementPressed,buttonDownAny:m.buttonDownAny,originalEvent:m.originalEvent})}function N(m){we(m),m.isOpen()?m._updateRequestId=l(m,N):m._updateRequestId=!1}function Y(m,T){var H=m.viewport,re=H.getZoom(),ce=H.getCenter();H.resize(T,m.preserveImageSizeOnResize),H.panTo(ce,!0);var de;if(m.preserveImageSizeOnResize)de=r[m.hash].prevContainerSize.x/T.x;else{var ne=new e.Point(0,0),Me=new e.Point(r[m.hash].prevContainerSize.x,r[m.hash].prevContainerSize.y).distanceTo(ne),Ue=new e.Point(T.x,T.y).distanceTo(ne);de=Ue/Me*r[m.hash].prevContainerSize.x/T.x}H.zoomTo(re*de,null,!0),r[m.hash].prevContainerSize=T,r[m.hash].forceRedraw=!0,r[m.hash].needsResize=!1,r[m.hash].forceResize=!1}function we(m){if(!(m._opening||!r[m.hash])){if(m.autoResize||r[m.hash].forceResize){var T;if(m._autoResizePolling){T=o(m.container);var H=r[m.hash].prevContainerSize;T.equals(H)||(r[m.hash].needsResize=!0)}r[m.hash].needsResize&&Y(m,T||o(m.container))}var re=m.viewport.update(),ce=m.world.update(re)||re;re&&m.raiseEvent("viewport-change"),m.referenceStrip&&(ce=m.referenceStrip.update(m.viewport)||ce);var de=r[m.hash].animating;!de&&ce&&(m.raiseEvent("animation-start"),v(m));var ne=de&&!ce;ne&&(r[m.hash].animating=!1),(ce||ne||r[m.hash].forceRedraw||m.world.needsDraw())&&(Se(m),m._drawOverlays(),m.navigator&&m.navigator.update(m.viewport),r[m.hash].forceRedraw=!1,ce&&m.raiseEvent("animation")),ne&&(m.raiseEvent("animation-finish"),r[m.hash].mouseInside||h(m)),r[m.hash].animating=ce}}function Se(m){m.imageLoader.clear(),m.world.draw(),m.raiseEvent("update-viewport",{})}function ue(m,T){return m?m+T:T}function V(){r[this.hash].lastZoomTime=e.now(),r[this.hash].zoomFactor=this.zoomPerSecond,r[this.hash].zooming=!0,le(this)}function A(){r[this.hash].lastZoomTime=e.now(),r[this.hash].zoomFactor=1/this.zoomPerSecond,r[this.hash].zooming=!0,le(this)}function U(){r[this.hash].zooming=!1}function le(m){e.requestAnimationFrame(e.delegate(m,be))}function be(){var m,T,H;r[this.hash].zooming&&this.viewport&&(m=e.now(),T=m-r[this.hash].lastZoomTime,H=Math.pow(r[this.hash].zoomFactor,T/1e3),this.viewport.zoomBy(H),this.viewport.applyConstraints(),r[this.hash].lastZoomTime=m,le(this))}function ye(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function xe(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function Te(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function Ee(){this.viewport&&this.viewport.goHome()}function ke(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function pe(){if(this.viewport){var m=this.viewport.getRotation();this.viewport.flipped?m+=this.rotationIncrement:m-=this.rotationIncrement,this.viewport.setRotation(m)}}function Le(){if(this.viewport){var m=this.viewport.getRotation();this.viewport.flipped?m-=this.rotationIncrement:m+=this.rotationIncrement,this.viewport.setRotation(m)}}function Ye(){this.viewport.toggleFlip()}e.determineDrawer=function(m){for(let T in t){const H=t[T],re=H.prototype;if(re&&re instanceof t.DrawerBase&&e.isFunction(re.getType)&&re.getType.call(H)===m)return H}return null}})(t),(function(e){e.Navigator=function(l){var u=l.viewer,h=this,f,v;l.element||l.id?(l.element?(l.id&&e.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),l.element.id?l.id=l.element.id:l.id="navigator-"+e.now(),this.element=l.element):this.element=document.getElementById(l.id),l.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(l.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),l.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:l.autoFade},l.position&&(l.position==="BOTTOM_RIGHT"?l.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:l.position==="BOTTOM_LEFT"?l.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:l.position==="TOP_RIGHT"?l.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:l.position==="TOP_LEFT"?l.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:l.position==="ABSOLUTE"&&(l.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,l.controlOptions.top=l.top,l.controlOptions.left=l.left,l.controlOptions.height=l.height,l.controlOptions.width=l.width))),this.element.id=l.id,this.element.className+=" navigator",l=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},l,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:l.animationTime,autoResize:!1,minZoomImageRatio:1,background:l.background,opacity:l.opacity,borderColor:l.borderColor,displayRegionColor:l.displayRegionColor}),l.minPixelRatio=this.minPixelRatio=u.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),l.controlOptions.anchor!==e.ControlAnchor.NONE&&(function(g,b){g.margin="0px",g.border=b+"px solid "+l.borderColor,g.padding="0px",g.background=l.background,g.opacity=l.opacity,g.overflow="hidden"})(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",(function(g,b){g.position="relative",g.top="0px",g.left="0px",g.fontSize="0px",g.overflow="hidden",g.border=b+"px solid "+l.displayRegionColor,g.margin="0px",g.padding="0px",g.background="transparent",g.float="left",g.cssFloat="left",g.zIndex=999999999,g.cursor="default",g.boxSizing="content-box"})(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),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%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),u.addControl(this.element,l.controlOptions),this._resizeWithViewer=l.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&l.controlOptions.anchor!==e.ControlAnchor.NONE,l.width&&l.height?(this.setWidth(l.width),this.setHeight(l.height)):this._resizeWithViewer&&(f=e.getElementSize(u.element),this.element.style.height=Math.round(f.y*l.sizeRatio)+"px",this.element.style.width=Math.round(f.x*l.sizeRatio)+"px",this.oldViewerSize=f,v=e.getElementSize(this.element),this.elementArea=v.x*v.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[l]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function _(g,b){s(h.displayRegionContainer,g),s(h.displayRegion,-g),h.viewport.setRotation(g,b)}if(l.navigatorRotate){var d=l.viewer.viewport?l.viewer.viewport.getRotation():l.viewer.degrees||0;_(d,!0),l.viewer.addHandler("rotate",function(g){_(g.degrees,g.immediately)})}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,r),releaseHandler:e.delegate(this,o),scrollHandler:e.delegate(this,a),preProcessEventHandler:function(g){g.eventType==="wheel"&&(g.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){h.viewport&&h.viewport.goHome(!0)}),u.world.addHandler("item-index-change",function(g){window.setTimeout(function(){var b=h.world.getItemAt(g.previousIndex);h.world.setItemIndex(b,g.newIndex)},1)}),u.world.addHandler("remove-item",function(g){var b=g.item,S=h._getMatchingItem(b);S&&h.world.removeItem(S)}),this.update(u.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var l=new e.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);l.equals(this.oldContainerSize)||(this.viewport.resize(l,!0),this.viewport.goHome(!0),this.oldContainerSize=l,this.world.update(),this.world.draw(),this.update(this.viewer.viewport))}},setWidth:function(l){this.width=l,this.element.style.width=typeof l=="number"?l+"px":l,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(l){this.height=l,this.element.style.height=typeof l=="number"?l+"px":l,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(l){return this.viewport.setFlip(l),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(l){c(this.canvas,l),c(this.element,l)},update:function(l){var u,h,f,v,_,d;if(l||(l=this.viewer.viewport),u=e.getElementSize(this.viewer.element),this._resizeWithViewer&&u.x&&u.y&&!u.equals(this.oldViewerSize)&&(this.oldViewerSize=u,this.maintainSizeRatio||!this.elementArea?(h=u.x*this.sizeRatio,f=u.y*this.sizeRatio):(h=Math.sqrt(this.elementArea*(u.x/u.y)),f=this.elementArea/h),this.element.style.width=Math.round(h)+"px",this.element.style.height=Math.round(f)+"px",this.elementArea||(this.elementArea=h*f),this.updateSize()),l&&this.viewport){if(v=l.getBoundsNoRotate(!0),_=this.viewport.pixelFromPointNoRotate(v.getTopLeft(),!1),d=this.viewport.pixelFromPointNoRotate(v.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var g=l.getRotation(!0);s(this.displayRegion,-g)}var b=this.displayRegion.style;b.display=this.world.getItemCount()?"block":"none",b.top=_.y.toFixed(2)+"px",b.left=_.x.toFixed(2)+"px";var S=d.x-_.x,P=d.y-_.y;b.width=Math.round(Math.max(S,0))+"px",b.height=Math.round(Math.max(P,0))+"px"}},addTiledImage:function(l){var u=this,h=l.originalTiledImage;delete l.original;var f=e.extend({},l,{success:function(v){var _=v.item;_._originalForNavigator=h,u._matchBounds(_,h,!0),u._matchOpacity(_,h),u._matchCompositeOperation(_,h);function d(){u._matchBounds(_,h)}function g(){u._matchOpacity(_,h)}function b(){u._matchCompositeOperation(_,h)}h.addHandler("bounds-change",d),h.addHandler("clip-change",d),h.addHandler("opacity-change",g),h.addHandler("composite-operation-change",b)}});return e.Viewer.prototype.addTiledImage.apply(this,[f])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(l){for(var u=this.world.getItemCount(),h,f=0;f<u;f++)if(h=this.world.getItemAt(f),h._originalForNavigator===l)return h;return null},_matchBounds:function(l,u,h){var f=u.getBoundsNoRotate();l.setPosition(f.getTopLeft(),h),l.setWidth(f.width,h),l.setRotation(u.getRotation(),h),l.setClip(u.getClip()),l.setFlip(u.getFlip())},_matchOpacity:function(l,u){l.setOpacity(u.opacity)},_matchCompositeOperation:function(l,u){l.setCompositeOperation(u.compositeOperation)}});function r(l){var u={tracker:l.eventSource,position:l.position,quick:l.quick,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",u),!u.preventDefaultAction&&l.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(l.position.x=this.viewport.getContainerSize().x-l.position.x);var h=this.viewport.pointFromPixel(l.position);this.panVertical?this.panHorizontal||(h.x=this.viewer.viewport.getCenter(!0).x):h.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(h),this.viewer.viewport.applyConstraints()}}function n(l){var u={tracker:l.eventSource,position:l.position,delta:l.delta,speed:l.speed,direction:l.direction,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",u),!u.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(l.delta.x=0),this.panVertical||(l.delta.y=0),this.viewer.viewport.flipped&&(l.delta.x=-l.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(l.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function o(l){l.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function a(l){var u={tracker:l.eventSource,position:l.position,scroll:l.scroll,shift:l.shift,originalEvent:l.originalEvent,preventDefault:l.preventDefault};this.viewer.raiseEvent("navigator-scroll",u),l.preventDefault=u.preventDefault}function s(l,u){c(l,"rotate("+u+"deg)")}function c(l,u){l.style.webkitTransform=u,l.style.mozTransform=u,l.style.msTransform=u,l.style.oTransform=u,l.style.transform=u}})(t),(function(e){var r={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};e.extend(e,{getString:function(n){var o=n.split("."),a=null,s=arguments,c=r,l;for(l=0;l<o.length-1;l++)c=c[o[l]]||{};return a=c[o[l]],typeof a!="string"&&(e.console.error("Untranslated source string:",n),a=""),a.replace(/\{\d+\}/g,function(u){var h=parseInt(u.match(/\d+/),10)+1;return h<s.length?s[h]:""})},setString:function(n,o){var a=n.split("."),s=r,c;for(c=0;c<a.length-1;c++)s[a[c]]||(s[a[c]]={}),s=s[a[c]];s[a[c]]=o}})})(t),(function(e){e.Point=function(r,n){this.x=typeof r=="number"?r:0,this.y=typeof n=="number"?n:0},e.Point.prototype={clone:function(){return new e.Point(this.x,this.y)},plus:function(r){return new e.Point(this.x+r.x,this.y+r.y)},minus:function(r){return new e.Point(this.x-r.x,this.y-r.y)},times:function(r){return new e.Point(this.x*r,this.y*r)},divide:function(r){return new e.Point(this.x/r,this.y/r)},negate:function(){return new e.Point(-this.x,-this.y)},distanceTo:function(r){return Math.sqrt(Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2))},squaredDistanceTo:function(r){return Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2)},apply:function(r){return new e.Point(r(this.x),r(this.y))},equals:function(r){return r instanceof e.Point&&this.x===r.x&&this.y===r.y},rotate:function(r,n){n=n||new e.Point(0,0);var o,a;if(r%90===0){var s=e.positiveModulo(r,360);switch(s){case 0:o=1,a=0;break;case 90:o=0,a=1;break;case 180:o=-1,a=0;break;case 270:o=0,a=-1;break}}else{var c=r*Math.PI/180;o=Math.cos(c),a=Math.sin(c)}var l=o*(this.x-n.x)-a*(this.y-n.y)+n.x,u=a*(this.x-n.x)+o*(this.y-n.y)+n.y;return new e.Point(l,u)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}})(t),(function(e){e.TileSource=function(n,o,a,s,c,l){var u=this,h=arguments,f,v;if(e.isPlainObject(n)?f=n:f={width:h[0],height:h[1],tileSize:h[2],tileOverlap:h[3],minLevel:h[4],maxLevel:h[5]},e.EventSource.call(this),e.extend(!0,this,f),!this.success){for(v=0;v<arguments.length;v++)if(e.isFunction(arguments[v])){this.success=arguments[v];break}}this.success&&this.addHandler("ready",function(_){u.success(_)}),e.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new e.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=f.width&&f.height?f.width/f.height:1,this.dimensions=new e.Point(f.width,f.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=f.tileOverlap?f.tileOverlap:0,this.minLevel=f.minLevel?f.minLevel:0,this.maxLevel=f.maxLevel!==void 0&&f.maxLevel!==null?f.maxLevel:f.width&&f.height?Math.ceil(Math.log(Math.max(f.width,f.height))/Math.log(2)):0,this.success&&e.isFunction(this.success)&&this.success(this))},e.TileSource.prototype={getTileSize:function(n){return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(n){return this._tileWidth?this._tileWidth:this.getTileSize(n)},getTileHeight:function(n){return this._tileHeight?this._tileHeight:this.getTileSize(n)},setMaxLevel:function(n){this.maxLevel=n,this._memoizeLevelScale()},getLevelScale:function(n){return this._memoizeLevelScale(),this.getLevelScale(n)},_memoizeLevelScale:function(){var n={},o;for(o=0;o<=this.maxLevel;o++)n[o]=1/Math.pow(2,this.maxLevel-o);this.getLevelScale=function(a){return n[a]}},getNumTiles:function(n){var o=this.getLevelScale(n),a=Math.ceil(o*this.dimensions.x/this.getTileWidth(n)),s=Math.ceil(o*this.dimensions.y/this.getTileHeight(n));return new e.Point(a,s)},getPixelRatio:function(n){var o=this.dimensions.times(this.getLevelScale(n)),a=1/o.x*e.pixelDensityRatio,s=1/o.y*e.pixelDensityRatio;return new e.Point(a,s)},getClosestLevel:function(){var n,o;for(n=this.minLevel+1;n<=this.maxLevel&&(o=this.getNumTiles(n),!(o.x>1||o.y>1));n++);return n-1},getTileAtPoint:function(n,o){var a=o.x>=0&&o.x<=1&&o.y>=0&&o.y<=1/this.aspectRatio;e.console.assert(a,"[TileSource.getTileAtPoint] must be called with a valid point.");var s=this.dimensions.x*this.getLevelScale(n),c=o.x*s,l=o.y*s,u=Math.floor(c/this.getTileWidth(n)),h=Math.floor(l/this.getTileHeight(n));o.x>=1&&(u=this.getNumTiles(n).x-1);var f=1e-15;return o.y>=1/this.aspectRatio-f&&(h=this.getNumTiles(n).y-1),new e.Point(u,h)},getTileBounds:function(n,o,a,s){var c=this.dimensions.times(this.getLevelScale(n)),l=this.getTileWidth(n),u=this.getTileHeight(n),h=o===0?0:l*o-this.tileOverlap,f=a===0?0:u*a-this.tileOverlap,v=l+(o===0?1:2)*this.tileOverlap,_=u+(a===0?1:2)*this.tileOverlap,d=1/c.x;return v=Math.min(v,c.x-h),_=Math.min(_,c.y-f),s?new e.Rect(0,0,v,_):new e.Rect(h*d,f*d,v*d,_*d)},getImageInfo:function(n){var o=this,a,s,c,l,u,h,f;n&&(u=n.split("/"),h=u[u.length-1],f=h.lastIndexOf("."),f>-1&&(u[u.length-1]=h.slice(0,f)));var v=null;if(this.splitHashDataForPost){var _=n.indexOf("#");_!==-1&&(v=n.substring(_+1),n=n.substr(0,_))}s=function(d){typeof d=="string"&&(d=e.parseXml(d));var g=e.TileSource.determineType(o,d,n);if(!g){o.raiseEvent("open-failed",{message:"Unable to load TileSource",source:n});return}l=g.prototype.configure.apply(o,[d,n,v]),l.ajaxWithCredentials===void 0&&(l.ajaxWithCredentials=o.ajaxWithCredentials),c=new g(l),o.ready=!0,o.raiseEvent("ready",{tileSource:c})},n.match(/\.js$/)?(a=n.split("/").pop().replace(".js",""),e.jsonp({url:n,async:!1,callbackName:a,callback:s})):e.makeAjaxRequest({url:n,postData:v,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(d){var g=r(d);s(g)},error:function(d,g){var b;try{b="HTTP "+d.status+" attempting to load TileSource: "+n}catch{var S;typeof g>"u"||!g.toString?S="Unknown error":S=g.toString(),b=S+" attempting to load TileSource: "+n}e.console.error(b),o.raiseEvent("open-failed",{message:b,source:n,postData:v})}})},supports:function(n,o){return!1},configure:function(n,o,a){throw new Error("Method not implemented.")},getTileUrl:function(n,o,a){throw new Error("Method not implemented.")},getTilePostData:function(n,o,a){return null},getTileAjaxHeaders:function(n,o,a){return{}},getTileHashKey:function(n,o,a,s,c,l){function u(h){return c?h+"+"+JSON.stringify(c):h}return u(typeof s!="string"?n+"/"+o+"_"+a:s)},tileExists:function(n,o,a){var s=this.getNumTiles(n);return n>=this.minLevel&&n<=this.maxLevel&&o>=0&&a>=0&&o<s.x&&a<s.y},hasTransparency:function(n,o,a,s){return!!n||o.match(".png")},downloadTileStart:function(n){var o=n.userData,a=new Image;o.image=a,o.request=null;var s=function(c){if(!a){n.finish(null,o.request,"Image load failed: undefined Image instance.");return}a.onload=a.onerror=a.onabort=null,n.finish(c?null:a,o.request,c)};a.onload=function(){s()},a.onabort=a.onerror=function(){s("Image load aborted.")},n.loadWithAjax?o.request=e.makeAjaxRequest({url:n.src,withCredentials:n.ajaxWithCredentials,headers:n.ajaxHeaders,responseType:"arraybuffer",postData:n.postData,success:function(c){var l;try{l=new window.Blob([c.response])}catch(f){var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(f.name==="TypeError"&&u){var h=new u;h.append(c.response),l=h.getBlob()}}l.size===0?s("Empty image response."):a.src=(window.URL||window.webkitURL).createObjectURL(l)},error:function(c){s("Image load aborted - XHR error")}}):(n.crossOriginPolicy!==!1&&(a.crossOrigin=n.crossOriginPolicy),a.src=n.src)},downloadTileAbort:function(n){n.userData.request&&n.userData.request.abort();var o=n.userData.image;n.userData.image&&(o.onload=o.onerror=o.onabort=null)},createTileCache:function(n,o,a){n._data=o},destroyTileCache:function(n){n._data=null,n._renderedContext=null},getTileCacheData:function(n){return n._data},getTileCacheDataAsImage:function(n){return n._data},getTileCacheDataAsContext2D:function(n){if(!n._renderedContext){var o=document.createElement("canvas");o.width=n._data.width,o.height=n._data.height,n._renderedContext=o.getContext("2d"),n._renderedContext.drawImage(n._data,0,0),n._data=null}return n._renderedContext}},e.extend(!0,e.TileSource.prototype,e.EventSource.prototype);function r(n){var o=n.responseText,a=n.status,s,c;if(n){if(n.status!==200&&n.status!==0)throw a=n.status,s=a===404?"Not Found":n.statusText,new Error(e.getString("Errors.Status",a,s))}else throw new Error(e.getString("Errors.Security"));if(o.match(/^\s*<.*/))try{c=n.responseXML&&n.responseXML.documentElement?n.responseXML:e.parseXml(o)}catch{c=n.responseText}else if(o.match(/\s*[{[].*/))try{c=e.parseJSON(o)}catch{c=o}else c=o;return c}e.TileSource.determineType=function(n,o,a){var s;for(s in t)if(s.match(/.+TileSource$/)&&e.isFunction(t[s])&&e.isFunction(t[s].prototype.supports)&&t[s].prototype.supports.call(n,o,a))return t[s];return e.console.error("No TileSource was able to open %s %s",a,o),null}})(t),(function(e){e.DziTileSource=function(o,a,s,c,l,u,h,f,v){var _,d,g,b;if(e.isPlainObject(o)?b=o:b={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=b.tilesUrl,this.fileFormat=b.fileFormat,this.displayRects=b.displayRects,this.displayRects)for(_=this.displayRects.length-1;_>=0;_--)for(d=this.displayRects[_],g=d.minLevel;g<=d.maxLevel;g++)this._levelRects[g]||(this._levelRects[g]=[]),this._levelRects[g].push(d);e.TileSource.apply(this,[b])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(o,a){var s;return o.Image?s=o.Image.xmlns:o.documentElement&&(o.documentElement.localName==="Image"||o.documentElement.tagName==="Image")&&(s=o.documentElement.namespaceURI),s=(s||"").toLowerCase(),s.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||s.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(o,a,s){var c;return e.isPlainObject(o)?c=n(this,o):c=r(this,o),a&&!c.tilesUrl&&(c.tilesUrl=a.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),a.search(/\.(dzi|xml|js)\?/)!==-1?c.queryParams=a.match(/\?.*/):c.queryParams=""),c},getTileUrl:function(o,a,s){return[this.tilesUrl,o,"/",a,"_",s,".",this.fileFormat,this.queryParams].join("")},tileExists:function(o,a,s){var c=this._levelRects[o],l,u,h,f,v,_,d;if(this.minLevel&&o<this.minLevel||this.maxLevel&&o>this.maxLevel)return!1;if(!c||!c.length)return!0;for(d=c.length-1;d>=0;d--)if(l=c[d],!(o<l.minLevel||o>l.maxLevel)&&(u=this.getLevelScale(o),h=l.x*u,f=l.y*u,v=h+l.width*u,_=f+l.height*u,h=Math.floor(h/this._tileWidth),f=Math.floor(f/this._tileWidth),v=Math.ceil(v/this._tileWidth),_=Math.ceil(_/this._tileWidth),h<=a&&a<v&&f<=s&&s<_))return!0;return!1}});function r(o,a){if(!a||!a.documentElement)throw new Error(e.getString("Errors.Xml"));var s=a.documentElement,c=s.localName||s.tagName,l=a.documentElement.namespaceURI,u=null,h=[],f,v,_,d,g;if(c==="Image")try{if(d=s.getElementsByTagName("Size")[0],d===void 0&&(d=s.getElementsByTagNameNS(l,"Size")[0]),u={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:s.getAttribute("Url"),Format:s.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(s.getAttribute("Overlap"),10),TileSize:parseInt(s.getAttribute("TileSize"),10),Size:{Height:parseInt(d.getAttribute("Height"),10),Width:parseInt(d.getAttribute("Width"),10)}}},!e.imageFormatSupported(u.Image.Format))throw new Error(e.getString("Errors.ImageFormat",u.Image.Format.toUpperCase()));for(f=s.getElementsByTagName("DisplayRect"),f===void 0&&(f=s.getElementsByTagNameNS(l,"DisplayRect")[0]),g=0;g<f.length;g++)v=f[g],_=v.getElementsByTagName("Rect")[0],_===void 0&&(_=v.getElementsByTagNameNS(l,"Rect")[0]),h.push({Rect:{X:parseInt(_.getAttribute("X"),10),Y:parseInt(_.getAttribute("Y"),10),Width:parseInt(_.getAttribute("Width"),10),Height:parseInt(_.getAttribute("Height"),10),MinLevel:parseInt(v.getAttribute("MinLevel"),10),MaxLevel:parseInt(v.getAttribute("MaxLevel"),10)}});return h.length&&(u.Image.DisplayRect=h),n(o,u)}catch(P){throw P instanceof Error?P:new Error(e.getString("Errors.Dzi"))}else{if(c==="Collection")throw new Error(e.getString("Errors.Dzc"));if(c==="Error"){var b=s.getElementsByTagName("Message")[0],S=b.firstChild.nodeValue;throw new Error(S)}}throw new Error(e.getString("Errors.Dzi"))}function n(o,a){var s=a.Image,c=s.Url,l=s.Format,u=s.Size,h=s.DisplayRect||[],f=parseInt(u.Width,10),v=parseInt(u.Height,10),_=parseInt(s.TileSize,10),d=parseInt(s.Overlap,10),g=[],b,S;for(S=0;S<h.length;S++)b=h[S].Rect,g.push(new e.DisplayRect(parseInt(b.X,10),parseInt(b.Y,10),parseInt(b.Width,10),parseInt(b.Height,10),parseInt(b.MinLevel,10),parseInt(b.MaxLevel,10)));return e.extend(!0,{width:f,height:v,tileSize:_,tileOverlap:d,minLevel:null,maxLevel:null,tilesUrl:c,fileFormat:l,displayRects:g},a)}})(t),(function(e){e.IIIFTileSource=function(s){if(e.extend(!0,this,s),this._id=this["@id"]||this.id||this.identifier||null,!(this.height&&this.width&&this._id))throw new Error("IIIF required parameters (width, height, or id) not provided.");if(s.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=s.version,this.tile_width&&this.tile_height)s.tileWidth=this.tile_width,s.tileHeight=this.tile_height;else if(this.tile_width)s.tileSize=this.tile_width;else if(this.tile_height)s.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)s.tileWidth=this.tiles[0].width,s.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var c=0;c<this.tiles.length;c++)for(var l=0;l<this.tiles[c].scaleFactors.length;l++){var u=this.tiles[c].scaleFactors[l];this.scale_factors.push(u),s.tileSizePerScaleFactor[u]={width:this.tiles[c].width,height:this.tiles[c].height||this.tiles[c].width}}}else if(r(s)){for(var h=Math.min(this.height,this.width),f=[256,512,1024],v=[],_=0;_<f.length;_++)f[_]<=h&&v.push(f[_]);v.length>0?s.tileSize=Math.max.apply(null,v):s.tileSize=h}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,s.levels=n(this),e.extend(!0,s,{width:s.levels[s.levels.length-1].width,height:s.levels[s.levels.length-1].height,tileSize:Math.max(s.height,s.width),tileOverlap:0,minLevel:0,maxLevel:s.levels.length-1}),this.levels=s.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!s.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)s.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));else{var d=Math.max.apply(null,this.scale_factors);s.maxLevel=Math.round(Math.log(d)*Math.LOG2E)}if(this.sizes){var g=this.sizes.length;(g===s.maxLevel||g===s.maxLevel+1)&&(this.levelSizes=this.sizes.slice().sort((b,S)=>b.width-S.width),g===s.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}e.TileSource.apply(this,[s])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(s,c){return s.protocol&&s.protocol==="http://iiif.io/api/image"||s["@context"]&&(s["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||s["@context"]==="http://iiif.io/api/image/1/context.json")||s.profile&&s.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||s.identifier&&s.width&&s.height?!0:!!(s.documentElement&&s.documentElement.tagName==="info"&&s.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(s,c,l){if(e.isPlainObject(s)){if(!s["@context"])s["@context"]="http://iiif.io/api/image/1.0/context.json",s["@id"]=c.replace("/info.json",""),s.version=1;else{var h=s["@context"];if(Array.isArray(h)){for(var f=0;f<h.length;f++)if(typeof h[f]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(h[f])||h[f]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){h=h[f];break}}switch(h){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":s.version=1;break;case"http://iiif.io/api/image/2/context.json":s.version=2;break;case"http://iiif.io/api/image/3/context.json":s.version=3;break;default:e.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(s.preferredFormats){for(var v=0;v<s.preferredFormats.length;v++)if(t.imageFormatSupported(s.preferredFormats[v])){s.tileFormat=s.preferredFormats[v];break}}return s}else{var u=o(s);return u["@context"]="http://iiif.io/api/image/1.0/context.json",u["@id"]=c.replace("/info.xml",""),u.version=1,u}},getTileWidth:function(s){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileWidth.call(this,s);var c=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[c]?this.tileSizePerScaleFactor[c].width:this._tileWidth},getTileHeight:function(s){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileHeight.call(this,s);var c=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[c]?this.tileSizePerScaleFactor[c].height:this._tileHeight},getLevelScale:function(s){if(this.emulateLegacyImagePyramid){var c=NaN;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(c=this.levels[s].width/this.levels[this.maxLevel].width),c}return e.TileSource.prototype.getLevelScale.call(this,s)},getNumTiles:function(s){if(this.emulateLegacyImagePyramid){var c=this.getLevelScale(s);return c?new e.Point(1,1):new e.Point(0,0)}if(this.levelSizes){var l=this.levelSizes[s],u=Math.ceil(l.width/this.getTileWidth(s)),h=Math.ceil(l.height/this.getTileHeight(s));return new e.Point(u,h)}else return e.TileSource.prototype.getNumTiles.call(this,s)},getTileAtPoint:function(s,c){if(this.emulateLegacyImagePyramid)return new e.Point(0,0);if(this.levelSizes){var l=c.x>=0&&c.x<=1&&c.y>=0&&c.y<=1/this.aspectRatio;e.console.assert(l,"[TileSource.getTileAtPoint] must be called with a valid point.");var u=this.levelSizes[s].width,h=c.x*u,f=c.y*u,v=Math.floor(h/this.getTileWidth(s)),_=Math.floor(f/this.getTileHeight(s));c.x>=1&&(v=this.getNumTiles(s).x-1);var d=1e-15;return c.y>=1/this.aspectRatio-d&&(_=this.getNumTiles(s).y-1),new e.Point(v,_)}return e.TileSource.prototype.getTileAtPoint.call(this,s,c)},getTileUrl:function(s,c,l){if(this.emulateLegacyImagePyramid){var u=null;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(u=this.levels[s].url),u}var h="0",f=Math.pow(.5,this.maxLevel-s),v,_,d,g,b,S,P,E,R,F,Z,z,M,O,$,ee;return this.levelSizes?(v=this.levelSizes[s].width,_=this.levelSizes[s].height):(v=Math.ceil(this.width*f),_=Math.ceil(this.height*f)),d=this.getTileWidth(s),g=this.getTileHeight(s),b=Math.round(d/f),S=Math.round(g/f),this.version===1?$="native."+this.tileFormat:$="default."+this.tileFormat,v<d&&_<g?(this.version===2&&v===this.width?z="full":this.version===3&&v===this.width&&_===this.height?z="max":this.version===3?z=v+","+_:z=v+",",P="full"):(E=c*b,R=l*S,F=Math.min(b,this.width-E),Z=Math.min(S,this.height-R),c===0&&l===0&&F===this.width&&Z===this.height?P="full":P=[E,R,F,Z].join(","),M=Math.min(d,v-c*d),O=Math.min(g,_-l*g),this.version===2&&M===this.width?z="full":this.version===3&&M===this.width&&O===this.height?z="max":this.version===3?z=M+","+O:z=M+","),ee=[this._id,P,z,h,$].join("/"),ee},__testonly__:{canBeTiled:r,constructLevels:n}});function r(s){var c=["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"],l=Array.isArray(s.profile)?s.profile[0]:s.profile,u=c.indexOf(l)!==-1,h=!1;return s.version===2&&s.profile.length>1&&s.profile[1].supports&&(h=s.profile[1].supports.indexOf("sizeByW")!==-1),s.version===3&&s.extraFeatures&&(h=s.extraFeatures.indexOf("sizeByWh")!==-1),!u||h}function n(s){for(var c=[],l=0;l<s.sizes.length;l++)c.push({url:s._id+"/full/"+s.sizes[l].width+","+(s.version===3?s.sizes[l].height:"")+"/0/default."+s.tileFormat,width:s.sizes[l].width,height:s.sizes[l].height});return c.sort(function(u,h){return u.width-h.width})}function o(s){if(!s||!s.documentElement)throw new Error(e.getString("Errors.Xml"));var c=s.documentElement,l=c.tagName,u=null;if(l==="info")try{return u={},a(c,u),u}catch(h){throw h instanceof Error?h:new Error(e.getString("Errors.IIIF"))}throw new Error(e.getString("Errors.IIIF"))}function a(s,c,l){var u,h;if(s.nodeType===3&&l)h=s.nodeValue.trim(),h.match(/^\d*$/)&&(h=Number(h)),c[l]?(e.isArray(c[l])||(c[l]=[c[l]]),c[l].push(h)):c[l]=h;else if(s.nodeType===1)for(u=0;u<s.childNodes.length;u++)a(s.childNodes[u],c,s.nodeName)}})(t),(function(e){e.OsmTileSource=function(r,n,o,a,s){var c;e.isPlainObject(r)?c=r:c={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!c.width||!c.height)&&(c.width=65572864,c.height=65572864),c.tileSize||(c.tileSize=256,c.tileOverlap=0),c.tilesUrl||(c.tilesUrl="http://tile.openstreetmap.org/"),c.minLevel=8,e.TileSource.apply(this,[c])},e.extend(e.OsmTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="openstreetmaps"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){return this.tilesUrl+(r-8)+"/"+n+"/"+o+".png"}})})(t),(function(e){e.TmsTileSource=function(r,n,o,a,s){var c;e.isPlainObject(r)?c=r:c={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var l=Math.ceil(c.width/256)*256,u=Math.ceil(c.height/256)*256,h;l>u?h=l/256:h=u/256,c.maxLevel=Math.ceil(Math.log(h)/Math.log(2))-1,c.tileSize=256,c.width=l,c.height=u,e.TileSource.apply(this,[c])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="tiledmapservice"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){var a=this.getNumTiles(r).y-1;return this.tilesUrl+r+"/"+n+"/"+(a-o)+".png"}})})(t),(function(e){e.ZoomifyTileSource=function(r){typeof r.tileSize>"u"&&(r.tileSize=256),typeof r.fileFormat>"u"&&(r.fileFormat="jpg",this.fileFormat=r.fileFormat);var n={x:r.width,y:r.height};for(r.imageSizes=[{x:r.width,y:r.height}],r.gridSize=[this._getGridSize(r.width,r.height,r.tileSize)];parseInt(n.x,10)>r.tileSize||parseInt(n.y,10)>r.tileSize;)n.x=Math.floor(n.x/2),n.y=Math.floor(n.y/2),r.imageSizes.push({x:n.x,y:n.y}),r.gridSize.push(this._getGridSize(n.x,n.y,r.tileSize));r.imageSizes.reverse(),r.gridSize.reverse(),r.minLevel=0,r.maxLevel=r.gridSize.length-1,t.TileSource.apply(this,[r])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(r,n,o){return{x:Math.ceil(r/o),y:Math.ceil(n/o)}},_calculateAbsoluteTileNumber:function(r,n,o){for(var a=0,s={},c=0;c<r;c++)s=this.gridSize[c],a+=s.x*s.y;return s=this.gridSize[r],a+=s.x*o+n,a},supports:function(r,n){return r.type&&r.type==="zoomifytileservice"},configure:function(r,n,o){return r},getTileUrl:function(r,n,o){var a=0,s=this._calculateAbsoluteTileNumber(r,n,o);return a=Math.floor(s/256),this.tilesUrl+"TileGroup"+a+"/"+r+"-"+n+"-"+o+"."+this.fileFormat}})})(t),(function(e){e.LegacyTileSource=function(a){var s,c,l;e.isArray(a)&&(s={type:"legacy-image-pyramid",levels:a}),s.levels=r(s.levels),s.levels.length>0?(c=s.levels[s.levels.length-1].width,l=s.levels[s.levels.length-1].height):(c=0,l=0,e.console.error("No supported image formats found")),e.extend(!0,s,{width:c,height:l,tileSize:Math.max(l,c),tileOverlap:0,minLevel:0,maxLevel:s.levels.length>0?s.levels.length-1:0}),e.TileSource.apply(this,[s]),this.levels=s.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(a,s){return a.type&&a.type==="legacy-image-pyramid"||a.documentElement&&a.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(a,s,c){var l;return e.isPlainObject(a)?l=o(this,a):l=n(this,a),l},getLevelScale:function(a){var s=NaN;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(s=this.levels[a].width/this.levels[this.maxLevel].width),s},getNumTiles:function(a){var s=this.getLevelScale(a);return s?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(a,s,c){var l=null;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(l=this.levels[a].url),l}});function r(a){var s=[],c,l;for(l=0;l<a.length;l++)c=a[l],c.height&&c.width&&c.url?s.push({url:c.url,width:Number(c.width),height:Number(c.height)}):e.console.error("Unsupported image format: %s",c.url?c.url:"<no URL>");return s.sort(function(u,h){return u.height-h.height})}function n(a,s){if(!s||!s.documentElement)throw new Error(e.getString("Errors.Xml"));var c=s.documentElement,l=c.tagName,u=null,h=[],f,v;if(l==="image")try{for(u={type:c.getAttribute("type"),levels:[]},h=c.getElementsByTagName("level"),v=0;v<h.length;v++)f=h[v],u.levels.push({url:f.getAttribute("url"),width:parseInt(f.getAttribute("width"),10),height:parseInt(f.getAttribute("height"),10)});return o(a,u)}catch(_){throw _ instanceof Error?_:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(l==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(l==="error")throw new Error("Error: "+s)}throw new Error("Unknown element "+l)}function o(a,s){return s.levels}})(t),(function(e){e.ImageTileSource=function(r){r=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1},r),e.TileSource.apply(this,[r])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(r,n){return r.type&&r.type==="image"},configure:function(r,n,o){return r},getImageInfo:function(r){var n=this._image=new Image,o=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",function(){o.width=n.naturalWidth,o.height=n.naturalHeight,o.aspectRatio=o.width/o.height,o.dimensions=new e.Point(o.width,o.height),o._tileWidth=o.width,o._tileHeight=o.height,o.tileOverlap=0,o.minLevel=0,o.levels=o._buildLevels(),o.maxLevel=o.levels.length-1,o.ready=!0,o.raiseEvent("ready",{tileSource:o})}),e.addEvent(n,"error",function(){o.raiseEvent("open-failed",{message:"Error loading image at "+r,source:r})}),n.src=r},getLevelScale:function(r){var n=NaN;return r>=this.minLevel&&r<=this.maxLevel&&(n=this.levels[r].width/this.levels[this.maxLevel].width),n},getNumTiles:function(r){var n=this.getLevelScale(r);return n?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(r,n,o){var a=null;return r>=this.minLevel&&r<=this.maxLevel&&(a=this.levels[r].url),a},getContext2D:function(r,n,o){var a=null;return r>=this.minLevel&&r<=this.maxLevel&&(a=this.levels[r].context2D),a},destroy:function(r){this._freeupCanvasMemory(r)},_buildLevels:function(){var r=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas)return delete this._image,r;var n=this._image.naturalWidth,o=this._image.naturalHeight,a=document.createElement("canvas"),s=a.getContext("2d");if(a.width=n,a.height=o,s.drawImage(this._image,0,0,n,o),r[0].context2D=s,delete this._image,e.isCanvasTainted(a))return r;for(;n>=2&&o>=2;){n=Math.floor(n/2),o=Math.floor(o/2);var c=document.createElement("canvas"),l=c.getContext("2d");c.width=n,c.height=o,l.drawImage(a,0,0,n,o),r.splice(0,0,{context2D:l,width:n,height:o}),a=c,s=l}return r},_freeupCanvasMemory:function(r){for(var n=0;n<this.levels.length;n++)this.levels[n].context2D&&(this.levels[n].context2D.canvas.height=0,this.levels[n].context2D.canvas.width=0,r&&r.raiseEvent("image-unloaded",{context2D:this.levels[n].context2D}))}})})(t),(function(e){e.TileSourceCollection=function(r,n,o,a){e.console.error("TileSourceCollection is deprecated; use World instead")}})(t),(function(e){e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(l){var u=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,userData:null},l),this.element=l.element||e.makeNeutralElement("div"),l.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,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),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",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({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(h){h.insideElementPressed?(s(u,e.ButtonState.DOWN),u.raiseEvent("enter",{originalEvent:h.originalEvent})):h.buttonDownAny||s(u,e.ButtonState.HOVER)},focusHandler:function(h){u.tracker.enterHandler(h),u.raiseEvent("focus",{originalEvent:h.originalEvent})},leaveHandler:function(h){c(u,e.ButtonState.GROUP),h.insideElementPressed&&u.raiseEvent("exit",{originalEvent:h.originalEvent})},blurHandler:function(h){u.tracker.leaveHandler(h),u.raiseEvent("blur",{originalEvent:h.originalEvent})},pressHandler:function(h){s(u,e.ButtonState.DOWN),u.raiseEvent("press",{originalEvent:h.originalEvent})},releaseHandler:function(h){h.insideElementPressed&&h.insideElementReleased?(c(u,e.ButtonState.HOVER),u.raiseEvent("release",{originalEvent:h.originalEvent})):h.insideElementPressed?c(u,e.ButtonState.GROUP):s(u,e.ButtonState.HOVER)},clickHandler:function(h){h.quick&&u.raiseEvent("click",{originalEvent:h.originalEvent})},keyHandler:function(h){h.keyCode===13?(u.raiseEvent("click",{originalEvent:h.originalEvent}),u.raiseEvent("release",{originalEvent:h.originalEvent}),h.preventDefault=!0):h.preventDefault=!1}}),c(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){s(this,e.ButtonState.GROUP)},notifyGroupExit:function(){c(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}});function r(l){e.requestAnimationFrame(function(){n(l)})}function n(l){var u,h,f;l.shouldFade&&(u=e.now(),h=u-l.fadeBeginTime,f=1-h/l.fadeLength,f=Math.min(1,f),f=Math.max(0,f),l.imgGroup&&e.setElementOpacity(l.imgGroup,f,!0),f>0&&r(l))}function o(l){l.shouldFade=!0,l.fadeBeginTime=e.now()+l.fadeDelay,window.setTimeout(function(){r(l)},l.fadeDelay)}function a(l){l.shouldFade=!1,l.imgGroup&&e.setElementOpacity(l.imgGroup,1,!0)}function s(l,u){l.element.disabled||(u>=e.ButtonState.GROUP&&l.currentState===e.ButtonState.REST&&(a(l),l.currentState=e.ButtonState.GROUP),u>=e.ButtonState.HOVER&&l.currentState===e.ButtonState.GROUP&&(l.imgHover&&(l.imgHover.style.visibility=""),l.currentState=e.ButtonState.HOVER),u>=e.ButtonState.DOWN&&l.currentState===e.ButtonState.HOVER&&(l.imgDown&&(l.imgDown.style.visibility=""),l.currentState=e.ButtonState.DOWN))}function c(l,u){l.element.disabled||(u<=e.ButtonState.HOVER&&l.currentState===e.ButtonState.DOWN&&(l.imgDown&&(l.imgDown.style.visibility="hidden"),l.currentState=e.ButtonState.HOVER),u<=e.ButtonState.GROUP&&l.currentState===e.ButtonState.HOVER&&(l.imgHover&&(l.imgHover.style.visibility="hidden"),l.currentState=e.ButtonState.GROUP),u<=e.ButtonState.REST&&l.currentState===e.ButtonState.GROUP&&(o(l),l.currentState=e.ButtonState.REST))}})(t),(function(e){e.ButtonGroup=function(r){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},r);var n=this.buttons.concat([]),o=this,a;if(this.element=r.element||e.makeNeutralElement("div"),!r.group)for(this.element.style.display="inline-block",a=0;a<n.length;a++)this.element.appendChild(n[a].element);e.setElementTouchActionNone(this.element),this.tracker=new e.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(s){var c;for(c=0;c<o.buttons.length;c++)o.buttons[c].notifyGroupEnter()},leaveHandler:function(s){var c;if(!s.insideElementPressed)for(c=0;c<o.buttons.length;c++)o.buttons[c].notifyGroupExit()}})},e.ButtonGroup.prototype={addButton:function(r){this.buttons.push(r),this.element.appendChild(r.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var r=this.buttons.pop();this.element.removeChild(r.element),r.destroy()}this.tracker.destroy(),this.element=null}}})(t),(function(e){e.Rect=function(r,n,o,a,s){this.x=typeof r=="number"?r:0,this.y=typeof n=="number"?n:0,this.width=typeof o=="number"?o:0,this.height=typeof a=="number"?a:0,this.degrees=typeof s=="number"?s:0,this.degrees=e.positiveModulo(this.degrees,360);var c,l;this.degrees>=270?(c=this.getTopRight(),this.x=c.x,this.y=c.y,l=this.height,this.height=this.width,this.width=l,this.degrees-=270):this.degrees>=180?(c=this.getBottomRight(),this.x=c.x,this.y=c.y,this.degrees-=180):this.degrees>=90&&(c=this.getBottomLeft(),this.x=c.x,this.y=c.y,l=this.height,this.height=this.width,this.width=l,this.degrees-=90)},e.Rect.fromSummits=function(r,n,o){var a=r.distanceTo(n),s=r.distanceTo(o),c=n.minus(r),l=Math.atan(c.y/c.x);return c.x<0?l+=Math.PI:c.y<0&&(l+=2*Math.PI),new e.Rect(r.x,r.y,a,s,l/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(r){return r instanceof e.Rect&&this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height&&this.degrees===r.degrees},times:function(r){return new e.Rect(this.x*r,this.y*r,this.width*r,this.height*r,this.degrees)},translate:function(r){return new e.Rect(this.x+r.x,this.y+r.y,this.width,this.height,this.degrees)},union:function(r){var n=this.getBoundingBox(),o=r.getBoundingBox(),a=Math.min(n.x,o.x),s=Math.min(n.y,o.y),c=Math.max(n.x+n.width,o.x+o.width),l=Math.max(n.y+n.height,o.y+o.height);return new e.Rect(a,s,c-a,l-s)},intersection:function(r){var n=1e-10,o=[],a=this.getTopLeft();r.containsPoint(a,n)&&o.push(a);var s=this.getTopRight();r.containsPoint(s,n)&&o.push(s);var c=this.getBottomLeft();r.containsPoint(c,n)&&o.push(c);var l=this.getBottomRight();r.containsPoint(l,n)&&o.push(l);var u=r.getTopLeft();this.containsPoint(u,n)&&o.push(u);var h=r.getTopRight();this.containsPoint(h,n)&&o.push(h);var f=r.getBottomLeft();this.containsPoint(f,n)&&o.push(f);var v=r.getBottomRight();this.containsPoint(v,n)&&o.push(v);for(var _=this._getSegments(),d=r._getSegments(),g=0;g<_.length;g++)for(var b=_[g],S=0;S<d.length;S++){var P=d[S],E=R(b[0],b[1],P[0],P[1]);E&&o.push(E)}function R(ee,ie,L,B){var X=ie.minus(ee),ae=B.minus(L),oe=-ae.x*X.y+X.x*ae.y;if(oe===0)return null;var N=(X.x*(ee.y-L.y)-X.y*(ee.x-L.x))/oe,Y=(ae.x*(ee.y-L.y)-ae.y*(ee.x-L.x))/oe;return-n<=N&&N<=1-n&&-n<=Y&&Y<=1-n?new e.Point(ee.x+Y*X.x,ee.y+Y*X.y):null}if(o.length===0)return null;for(var F=o[0].x,Z=o[0].x,z=o[0].y,M=o[0].y,O=1;O<o.length;O++){var $=o[O];$.x<F&&(F=$.x),$.x>Z&&(Z=$.x),$.y<z&&(z=$.y),$.y>M&&(M=$.y)}return new e.Rect(F,z,Z-F,M-z)},_getSegments:function(){var r=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),a=this.getBottomRight();return[[r,n],[n,a],[a,o],[o,r]]},rotate:function(r,n){if(r=e.positiveModulo(r,360),r===0)return this.clone();n=n||this.getCenter();var o=this.getTopLeft().rotate(r,n),a=this.getTopRight().rotate(r,n),s=a.minus(o);s=s.apply(function(l){var u=1e-15;return Math.abs(l)<u?0:l});var c=Math.atan(s.y/s.x);return s.x<0?c+=Math.PI:s.y<0&&(c+=2*Math.PI),new e.Rect(o.x,o.y,this.width,this.height,c/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var r=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),a=this.getBottomRight(),s=Math.min(r.x,n.x,o.x,a.x),c=Math.max(r.x,n.x,o.x,a.x),l=Math.min(r.y,n.y,o.y,a.y),u=Math.max(r.y,n.y,o.y,a.y);return new e.Rect(s,l,c-s,u-l)},getIntegerBoundingBox:function(){var r=this.getBoundingBox(),n=Math.floor(r.x),o=Math.floor(r.y),a=Math.ceil(r.width+r.x-n),s=Math.ceil(r.height+r.y-o);return new e.Rect(n,o,a,s)},containsPoint:function(r,n){n=n||0;var o=this.getTopLeft(),a=this.getTopRight(),s=this.getBottomLeft(),c=a.minus(o),l=s.minus(o);return(r.x-o.x)*c.x+(r.y-o.y)*c.y>=-n&&(r.x-a.x)*c.x+(r.y-a.y)*c.y<=n&&(r.x-o.x)*l.x+(r.y-o.y)*l.y>=-n&&(r.x-s.x)*l.x+(r.y-s.y)*l.y<=n},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}})(t),(function(e){var r={};e.ReferenceStrip=function(f){var v=this,_=f.viewer,d=e.getElementSize(_.element),g,b,S;for(f.id||(f.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=f.id,this.element.className="referencestrip"),f=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},f,{element:this.element}),e.extend(this,f),r[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,b=this.element.style,b.marginTop="0px",b.marginRight="0px",b.marginBottom="0px",b.marginLeft="0px",b.left="0px",b.bottom="0px",b.border="0px",b.background="#000",b.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=_,this.tracker=new e.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:e.delegate(this,n),dragHandler:e.delegate(this,o),scrollHandler:e.delegate(this,a),enterHandler:e.delegate(this,c),leaveHandler:e.delegate(this,l),keyDownHandler:e.delegate(this,u),keyHandler:e.delegate(this,h),preProcessEventHandler:function(P){P.eventType==="wheel"&&(P.preventDefault=!0)}}),f.width&&f.height?(this.element.style.width=f.width+"px",this.element.style.height=f.height+"px",_.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):f.scroll==="horizontal"?(this.element.style.width=d.x*f.sizeRatio*_.tileSources.length+12*_.tileSources.length+"px",this.element.style.height=d.y*f.sizeRatio+"px",_.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=d.y*f.sizeRatio*_.tileSources.length+12*_.tileSources.length+"px",this.element.style.width=d.x*f.sizeRatio+"px",_.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=d.x*this.sizeRatio+8,this.panelHeight=d.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},S=0;S<_.tileSources.length;S++)g=e.makeNeutralElement("div"),g.id=this.element.id+"-"+S,g.style.width=v.panelWidth+"px",g.style.height=v.panelHeight+"px",g.style.display="inline",g.style.float="left",g.style.cssFloat="left",g.style.padding="2px",e.setElementTouchActionNone(g),e.setElementPointerEventsNone(g),this.element.appendChild(g),g.activePanel=!1,this.panels.push(g);s(this,this.scroll==="vertical"?d.y:d.x,0),this.setFocus(0)},e.ReferenceStrip.prototype={setFocus:function(f){var v=this.element.querySelector("#"+this.element.id+"-"+f),_=e.getElementSize(this.viewer.canvas),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),b=-Number(this.element.style.marginLeft.replace("px","")),S=-Number(this.element.style.marginTop.replace("px","")),P;this.currentSelected!==v&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=v,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(P=Number(f)*(this.panelWidth+3),P>b+_.x-this.panelWidth?(P=Math.min(P,d-_.x),this.element.style.marginLeft=-P+"px",s(this,_.x,-P)):P<b&&(P=Math.max(0,P-_.x/2),this.element.style.marginLeft=-P+"px",s(this,_.x,-P))):(P=Number(f)*(this.panelHeight+3),P>S+_.y-this.panelHeight?(P=Math.min(P,g-_.y),this.element.style.marginTop=-P+"px",s(this,_.y,-P)):P<S&&(P=Math.max(0,P-_.y/2),this.element.style.marginTop=-P+"px",s(this,_.y,-P))),this.currentPage=f,c.call(this,{eventSource:this.tracker}))},update:function(){return!!r[this.id].animating},destroy:function(){if(this.miniViewers)for(var f in this.miniViewers)this.miniViewers[f].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function n(f){if(f.quick){var v;this.scroll==="horizontal"?v=Math.floor(f.position.x/(this.panelWidth+4)):v=Math.floor(f.position.y/this.panelHeight),this.viewer.goToPage(v)}this.element.focus()}function o(f){if(this.dragging=!0,this.element){var v=Number(this.element.style.marginLeft.replace("px","")),_=Number(this.element.style.marginTop.replace("px","")),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),b=e.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-f.delta.x>0?v>-(d-b.x)&&(this.element.style.marginLeft=v+f.delta.x*2+"px",s(this,b.x,v+f.delta.x*2)):-f.delta.x<0&&v<0&&(this.element.style.marginLeft=v+f.delta.x*2+"px",s(this,b.x,v+f.delta.x*2)):-f.delta.y>0?_>-(g-b.y)&&(this.element.style.marginTop=_+f.delta.y*2+"px",s(this,b.y,_+f.delta.y*2)):-f.delta.y<0&&_<0&&(this.element.style.marginTop=_+f.delta.y*2+"px",s(this,b.y,_+f.delta.y*2))}}function a(f){if(this.element){var v=Number(this.element.style.marginLeft.replace("px","")),_=Number(this.element.style.marginTop.replace("px","")),d=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),b=e.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?f.scroll>0?v>-(d-b.x)&&(this.element.style.marginLeft=v-f.scroll*60+"px",s(this,b.x,v-f.scroll*60)):f.scroll<0&&v<0&&(this.element.style.marginLeft=v-f.scroll*60+"px",s(this,b.x,v-f.scroll*60)):f.scroll<0?_>b.y-g&&(this.element.style.marginTop=_+f.scroll*60+"px",s(this,b.y,_+f.scroll*60)):f.scroll>0&&_<0&&(this.element.style.marginTop=_+f.scroll*60+"px",s(this,b.y,_+f.scroll*60)),f.preventDefault=!0}}function s(f,v,_){var d,g,b,S,P,E;for(f.scroll==="horizontal"?d=f.panelWidth:d=f.panelHeight,g=Math.ceil(v/d)+5,b=Math.ceil((Math.abs(_)+v)/d)+1,g=b-g,g=g<0?0:g,P=g;P<b&&P<f.panels.length;P++)if(E=f.panels[P],!E.activePanel){var R,F=f.viewer.tileSources[P];F.referenceStripThumbnailUrl?R={type:"image",url:F.referenceStripThumbnailUrl}:R=F,S=new e.Viewer({id:E.id,tileSources:[R],element:E,navigatorSizeRatio:f.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:f.viewer.loadTilesWithAjax,ajaxHeaders:f.viewer.ajaxHeaders,drawer:"canvas"}),e.setElementPointerEventsNone(S.canvas),e.setElementPointerEventsNone(S.container),S.innerTracker.setTracking(!1),S.outerTracker.setTracking(!1),f.miniViewers[E.id]=S,E.activePanel=!0}}function c(f){var v=f.eventSource.element;this.scroll==="horizontal"?v.style.marginBottom="0px":v.style.marginLeft="0px"}function l(f){var v=f.eventSource.element;this.scroll==="horizontal"?v.style.marginBottom="-"+e.getElementSize(v).y/2+"px":v.style.marginLeft="-"+e.getElementSize(v).x/2+"px"}function u(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 38:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 40:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 37:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 39:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}function h(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 61:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 45:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 48:case 119:case 87:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 115:case 83:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 97:a.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 100:a.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}})(t),(function(e){e.DisplayRect=function(r,n,o,a,s,c){e.Rect.apply(this,[r,n,o,a]),this.minLevel=s,this.maxLevel=c},e.extend(e.DisplayRect.prototype,e.Rect.prototype)})(t),(function(e){e.Spring=function(n){var o=arguments;typeof n!="object"&&(n={initial:o.length&&typeof o[0]=="number"?o[0]:void 0,springStiffness:o.length>1?o[1].springStiffness:5,animationTime:o.length>1?o[1].animationTime:1.5}),e.console.assert(typeof n.springStiffness=="number"&&n.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert(typeof n.animationTime=="number"&&n.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),n.exponential&&(this._exponential=!0,delete n.exponential),e.extend(!0,this,n),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||this.current.value!==0,"[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(n){e.console.assert(!this._exponential||n!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=n,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(n){e.console.assert(!this._exponential||n!==0,"[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=n,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(n){this.start.value+=n,this.target.value+=n,this._exponential&&(e.console.assert(this.target.value!==0&&this.start.value!==0,"[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(n){this._exponential=n,this._exponential&&(e.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[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(){this.current.time=e.now();let n,o;if(this._exponential?(n=this.start._logValue,o=this.target._logValue):(n=this.start.value,o=this.target.value),this.current.time>=this.target.time)this.current.value=this.target.value;else{let a=n+(o-n)*r(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time));this._exponential?this.current.value=Math.exp(a):this.current.value=a}return this.current.value!==this.target.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function r(n,o){return(1-Math.exp(n*-o))/(1-Math.exp(-n))}})(t),(function(e){e.ImageJob=function(n){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},n),this.data=null,this.userData={},this.errorMsg=null},e.ImageJob.prototype={start:function(){this.tries++;var n=this,o=this.abort;this.jobId=window.setTimeout(function(){n.finish(null,null,"Image load exceeded timeout ("+n.timeout+" ms)")},this.timeout),this.abort=function(){n.source.downloadTileAbort(n),typeof o=="function"&&o()},this.source.downloadTileStart(this)},finish:function(n,o,a){this.data=n,this.request=o,this.errorMsg=a,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(n){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},n)},e.ImageLoader.prototype={addJob:function(n){if(!n.source){e.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var o=e.TileSource.prototype;n.source={downloadTileStart:o.downloadTileStart,downloadTileAbort:o.downloadTileAbort}}var a=this,s=function(u){r(a,u,n.callback)},c={src:n.src,tile:n.tile||{},source:n.source,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.loadWithAjax?n.ajaxHeaders:null,crossOriginPolicy:n.crossOriginPolicy,ajaxWithCredentials:n.ajaxWithCredentials,postData:n.postData,callback:s,abort:n.abort,timeout:this.timeout},l=new e.ImageJob(c);!this.jobLimit||this.jobsInProgress<this.jobLimit?(l.start(),this.jobsInProgress++):this.jobQueue.push(l)},clear:function(){for(var n=0;n<this.jobQueue.length;n++){var o=this.jobQueue[n];typeof o.abort=="function"&&o.abort()}this.jobQueue=[]}};function r(n,o,a){o.errorMsg!==""&&(o.data===null||o.data===void 0)&&o.tries<1+n.tileRetryMax&&n.failedTiles.push(o);var s;n.jobsInProgress--,(!n.jobLimit||n.jobsInProgress<n.jobLimit)&&n.jobQueue.length>0&&(s=n.jobQueue.shift(),s.start(),n.jobsInProgress++),n.tileRetryMax>0&&n.jobQueue.length===0&&(!n.jobLimit||n.jobsInProgress<n.jobLimit)&&n.failedTiles.length>0&&(s=n.failedTiles.shift(),setTimeout(function(){s.start()},n.tileRetryDelay),n.jobsInProgress++),a(o.data,o.errorMsg,o.request)}})(t),(function(e){e.Tile=function(r,n,o,a,s,c,l,u,h,f,v,_){this.level=r,this.x=n,this.y=o,this.bounds=a,this.positionedBounds=new t.Rect(a.x,a.y,a.width,a.height),this.sourceBounds=f,this.exists=s,this._url=c,this.postData=v,this.context2D=l,this.loadWithAjax=u,this.ajaxHeaders=h,_===void 0&&(e.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),_=e.TileSource.prototype.getTileHashKey(r,n,o,c,h,v)),this.cacheKey=_,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.hasTransparency=!1,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."),!!this.context2D||this.getUrl().match(".png")},get image(){return e.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return e.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return typeof this._url=="function"?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord&&this.cacheImageRecord.getRenderedContext()},getScaleForEdgeSmoothing:function(){var r;if(this.cacheImageRecord)r=this.cacheImageRecord.getRenderedContext();else if(this.context2D)r=this.context2D;else return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return r.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(r,n,o){var a=Math.max(1,Math.ceil((o.x-n.x)/2)),s=Math.max(1,Math.ceil((o.y-n.y)/2));return new e.Point(a,s).minus(this.position.times(e.pixelDensityRatio).times(r||1).apply(function(c){return c%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}})(t),(function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(r,n,o){var a;e.isPlainObject(r)?a=r:a={element:r,location:n,placement:o},this.elementWrapper=document.createElement("div"),this.element=a.element,this.elementWrapper.appendChild(this.element),this.element.id?this.elementWrapper.id="overlay-wrapper-"+this.element.id:this.elementWrapper.id="overlay-wrapper",this.style=this.elementWrapper.style,this._init(a)},e.Overlay.prototype={_init:function(r){this.location=r.location,this.placement=r.placement===void 0?e.Placement.TOP_LEFT:r.placement,this.onDraw=r.onDraw,this.checkResize=r.checkResize===void 0?!0:r.checkResize,this.width=r.width===void 0?null:r.width,this.height=r.height===void 0?null:r.height,this.rotationMode=r.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(r,n){var o=e.Placement.properties[this.placement];o&&(o.isHorizontallyCentered?r.x-=n.x/2:o.isRight&&(r.x-=n.x),o.isVerticallyCentered?r.y-=n.y/2:o.isBottom&&(r.y-=n.y))},destroy:function(){var r=this.elementWrapper,n=this.style;r.parentNode&&(r.parentNode.removeChild(r),r.prevElementParent&&(n.display="none",document.body.appendChild(r))),this.onDraw=null,n.top="",n.left="",n.position="",this.width!==null&&(n.width=""),this.height!==null&&(n.height="");var o=e.getCssPropertyWithVendorPrefix("transformOrigin"),a=e.getCssPropertyWithVendorPrefix("transform");o&&a&&(n[o]="",n[a]="")},drawHTML:function(r,n){var o=this.elementWrapper;o.parentNode!==r&&(o.prevElementParent=o.parentNode,o.prevNextSibling=o.nextSibling,r.appendChild(o),this.style.position="absolute",this.size=e.getElementSize(this.elementWrapper));var a=this._getOverlayPositionAndSize(n),s=a.position,c=this.size=a.size,l="";n.overlayPreserveContentDirection&&(l=n.flipped?" scaleX(-1)":" scaleX(1)");var u=n.flipped?-a.rotate:a.rotate,h=n.flipped?" scaleX(-1)":"";if(this.onDraw)this.onDraw(s,c,this.element);else{var f=this.style,v=this.element.style;v.display="block",f.left=s.x+"px",f.top=s.y+"px",this.width!==null&&(v.width=c.x+"px"),this.height!==null&&(v.height=c.y+"px");var _=e.getCssPropertyWithVendorPrefix("transformOrigin"),d=e.getCssPropertyWithVendorPrefix("transform");_&&d&&(u&&!n.flipped?(v[d]="",f[_]=this._getTransformOrigin(),f[d]="rotate("+u+"deg)"):!u&&n.flipped?(v[d]=l,f[_]=this._getTransformOrigin(),f[d]=h):u&&n.flipped?(v[d]=l,f[_]=this._getTransformOrigin(),f[d]="rotate("+u+"deg)"+h):(v[d]="",f[_]="",f[d]="")),f.display="flex"}},_getOverlayPositionAndSize:function(r){var n=r.pixelFromPoint(this.location,!0),o=this._getSizeInPixels(r);this.adjust(n,o);var a=0;if(r.getRotation(!0)&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var s=new e.Rect(n.x,n.y,o.x,o.y),c=this._getBoundingBox(s,r.getRotation(!0));n=c.getTopLeft(),o=c.getSize()}else a=r.getRotation(!0);return r.flipped&&(n.x=r.getContainerSize().x-n.x),{position:n,size:o,rotate:a}},_getSizeInPixels:function(r){var n=this.size.x,o=this.size.y;if(this.width!==null||this.height!==null){var a=r.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);this.width!==null&&(n=a.x),this.height!==null&&(o=a.y)}if(this.checkResize&&(this.width===null||this.height===null)){var s=this.size=e.getElementSize(this.elementWrapper);this.width===null&&(n=s.x),this.height===null&&(o=s.y)}return new e.Point(n,o)},_getBoundingBox:function(r,n){var o=this._getPlacementPoint(r);return r.rotate(n,o).getBoundingBox()},_getPlacementPoint:function(r){var n=new e.Point(r.x,r.y),o=e.Placement.properties[this.placement];return o&&(o.isHorizontallyCentered?n.x+=r.width/2:o.isRight&&(n.x+=r.width),o.isVerticallyCentered?n.y+=r.height/2:o.isBottom&&(n.y+=r.height)),n},_getTransformOrigin:function(){var r="",n=e.Placement.properties[this.placement];return n&&(n.isLeft?r="left":n.isRight&&(r="right"),n.isTop?r+=" top":n.isBottom&&(r+=" bottom")),r},update:function(r,n){var o=e.isPlainObject(r)?r:{location:r,placement:n};this._init({location:o.location||this.location,placement:o.placement!==void 0?o.placement:this.placement,onDraw:o.onDraw||this.onDraw,checkResize:o.checkResize||this.checkResize,width:o.width!==void 0?o.width:this.width,height:o.height!==void 0?o.height:this.height,rotationMode:o.rotationMode||this.rotationMode})},getBounds:function(r){e.console.assert(r,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,o=this.height;if(n===null||o===null){var a=r.deltaPointsFromPixelsNoRotate(this.size,!0);n===null&&(n=a.x),o===null&&(o=a.y)}var s=this.location.clone();return this.adjust(s,new e.Point(n,o)),this._adjustBoundsForRotation(r,new e.Rect(s.x,s.y,n,o))},_adjustBoundsForRotation:function(r,n){if(!r||r.getRotation(!0)===0||this.rotationMode===e.OverlayRotationMode.EXACT)return n;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return n;var o=this._getOverlayPositionAndSize(r);return r.viewerElementToViewportRectangle(new e.Rect(o.position.x,o.position.y,o.size.x,o.size.y))}return n.rotate(-r.getRotation(!0),this._getPlacementPoint(n))}}})(t),(function(e){const r=e;r.DrawerBase=class{constructor(o){e.console.assert(o.viewer,"[Drawer] options.viewer is required"),e.console.assert(o.viewport,"[Drawer] options.viewport is required"),e.console.assert(o.element,"[Drawer] options.element is required"),this.viewer=o.viewer,this.viewport=o.viewport,this.debugGridColor=typeof o.debugGridColor=="string"?[o.debugGridColor]:o.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,this.options=o.options||{},this.container=e.getElement(o.element),this._renderingTarget=this._createDrawingElement(),this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",this.canvas.style.left="0",e.setElementOpacity(this.canvas,this.viewer.opacity,!0),e.setElementPointerEventsNone(this.canvas),e.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._checkForAPIOverrides()}get canvas(){return this._renderingTarget}get element(){return e.console.error("Drawer.element is deprecated. Use Drawer.container instead."),this.container}getType(){e.console.error("Drawer.getType must be implemented by child class")}static isSupported(){e.console.error("Drawer.isSupported must be implemented by child class")}_createDrawingElement(){return e.console.error("Drawer._createDrawingElement must be implemented by child class"),null}draw(o){e.console.error("Drawer.draw must be implemented by child class")}canRotate(){e.console.error("Drawer.canRotate must be implemented by child class")}destroy(){e.console.error("Drawer.destroy must be implemented by child class")}minimumOverlapRequired(o){return!1}setImageSmoothingEnabled(o){e.console.error("Drawer.setImageSmoothingEnabled must be implemented by child class")}drawDebuggingRect(o){e.console.warn("[drawer].drawDebuggingRect is not implemented by this drawer")}clear(){e.console.warn("[drawer].clear() is deprecated. The drawer is responsible for clearing itself as needed before drawing tiles.")}_checkForAPIOverrides(){if(this._createDrawingElement===e.DrawerBase.prototype._createDrawingElement)throw new Error("[drawer]._createDrawingElement must be implemented by child class");if(this.draw===e.DrawerBase.prototype.draw)throw new Error("[drawer].draw must be implemented by child class");if(this.canRotate===e.DrawerBase.prototype.canRotate)throw new Error("[drawer].canRotate must be implemented by child class");if(this.destroy===e.DrawerBase.prototype.destroy)throw new Error("[drawer].destroy must be implemented by child class");if(this.setImageSmoothingEnabled===e.DrawerBase.prototype.setImageSmoothingEnabled)throw new Error("[drawer].setImageSmoothingEnabled must be implemented by child class")}viewportToDrawerRectangle(o){var a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!0),s=this.viewport.deltaPixelsFromPointsNoRotate(o.getSize(),!0);return new e.Rect(a.x*e.pixelDensityRatio,a.y*e.pixelDensityRatio,s.x*e.pixelDensityRatio,s.y*e.pixelDensityRatio)}viewportCoordToDrawerCoord(o){var a=this.viewport.pixelFromPointNoRotate(o,!0);return new e.Point(a.x*e.pixelDensityRatio,a.y*e.pixelDensityRatio)}_calculateCanvasSize(){var o=e.pixelDensityRatio,a=this.viewport.getContainerSize();return new r.Point(Math.round(a.x*o),Math.round(a.y*o))}_raiseTiledImageDrawnEvent(o,a){this.viewer&&this.viewer.raiseEvent("tiled-image-drawn",{tiledImage:o,tiles:a})}_raiseDrawerErrorEvent(o,a){this.viewer&&this.viewer.raiseEvent("drawer-error",{tiledImage:o,drawer:this,error:a})}}})(t),(function(e){const r=e;class n extends r.DrawerBase{constructor(a){super(a),this.viewer.rejectEventHandler("tile-drawing","The HTMLDrawer does not raise the tile-drawing event"),this.viewer.allowEventHandler("tile-drawn")}static isSupported(){return!0}getType(){return"html"}minimumOverlapRequired(a){return!0}_createDrawingElement(){return e.makeNeutralElement("div")}draw(a){var s=this;this._prepareNewFrame(),a.forEach(function(c){c.opacity!==0&&s._drawTiles(c)})}canRotate(){return!1}destroy(){this.container.removeChild(this.canvas)}setImageSmoothingEnabled(){}_prepareNewFrame(){this.canvas.innerHTML=""}_drawTiles(a){var s=a.getTilesToDraw().map(u=>u.tile);if(!(a.opacity===0||s.length===0&&!a.placeholderFillStyle))for(var c=s.length-1;c>=0;c--){var l=s[c];this._drawTile(l),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:a,tile:l})}}_drawTile(a){e.console.assert(a,"[Drawer._drawTile] tile is required");let s=this.canvas;if(!a.cacheImageRecord){e.console.warn("[Drawer._drawTileToHTML] attempting to draw tile %s when it's not cached",a.toString());return}if(!a.loaded){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",a.toString());return}if(!a.element){var c=a.getImage();if(!c)return;a.element=e.makeNeutralElement("div"),a.imgElement=c.cloneNode(),a.imgElement.style.msInterpolationMode="nearest-neighbor",a.imgElement.style.width="100%",a.imgElement.style.height="100%",a.style=a.element.style,a.style.position="absolute"}a.element.parentNode!==s&&s.appendChild(a.element),a.imgElement.parentNode!==a.element&&a.element.appendChild(a.imgElement),a.style.top=a.position.y+"px",a.style.left=a.position.x+"px",a.style.height=a.size.y+"px",a.style.width=a.size.x+"px",a.flipped&&(a.style.transform="scaleX(-1)"),e.setElementOpacity(a.element,a.opacity)}}e.HTMLDrawer=n})(t),(function(e){const r=e;class n extends r.DrawerBase{constructor(u){super(u),this.context=this.canvas.getContext("2d"),this.sketchCanvas=null,this.sketchContext=null,this._imageSmoothingEnabled=!0,this.viewer.allowEventHandler("tile-drawn"),this.viewer.allowEventHandler("tile-drawing")}static isSupported(){return e.supportsCanvas}getType(){return"canvas"}_createDrawingElement(){let u=e.makeNeutralElement("canvas"),h=this._calculateCanvasSize();return u.width=h.x,u.height=h.y,u}draw(u){this._prepareNewFrame(),this.viewer.viewport.getFlip()!==this._viewportFlipped&&this._flip();for(const h of u)h.opacity!==0&&this._drawTiles(h)}canRotate(){return!0}destroy(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null,this.container.removeChild(this.canvas)}minimumOverlapRequired(u){return!0}setImageSmoothingEnabled(u){this._imageSmoothingEnabled=!!u,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw()}drawDebuggingRect(u){var h=this.context;h.save(),h.lineWidth=2*e.pixelDensityRatio,h.strokeStyle=this.debugGridColor[0],h.fillStyle=this.debugGridColor[0],h.strokeRect(u.x*e.pixelDensityRatio,u.y*e.pixelDensityRatio,u.width*e.pixelDensityRatio,u.height*e.pixelDensityRatio),h.restore()}get _viewportFlipped(){return this.context.getTransform().a<0}_raiseTileDrawingEvent(u,h,f,v){this.viewer.raiseEvent("tile-drawing",{tiledImage:u,context:h,tile:f,rendered:v})}_prepareNewFrame(){var u=this._calculateCanvasSize();if((this.canvas.width!==u.x||this.canvas.height!==u.y)&&(this.canvas.width=u.x,this.canvas.height=u.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var h=this._calculateSketchCanvasSize();this.sketchCanvas.width=h.x,this.sketchCanvas.height=h.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}_clear(u,h){var f=this._getContext(u);if(h)f.clearRect(h.x,h.y,h.width,h.height);else{var v=f.canvas;f.clearRect(0,0,v.width,v.height)}}_drawTiles(u){var h=u.getTilesToDraw().map(ee=>ee.tile);if(!(u.opacity===0||h.length===0&&!u.placeholderFillStyle)){var f=h[0],v;f&&(v=u.opacity<1||u.compositeOperation&&u.compositeOperation!=="source-over"||!u._isBottomItem()&&u.source.hasTransparency(f.context2D,f.getUrl(),f.ajaxHeaders,f.postData));var _,d,g=this.viewport.getZoom(!0),b=u.viewportToImageZoom(g);h.length>1&&b>u.smoothTileEdgesMinZoom&&!u.iOSDevice&&u.getRotation(!0)%360===0&&(v=!0,_=f.getScaleForEdgeSmoothing(),d=f.getTranslationForEdgeSmoothing(_,this._getCanvasSize(!1),this._getCanvasSize(!0)));var S;v&&(_||(S=this.viewport.viewportToViewerElementRectangle(u.getClippedBounds(!0)).getIntegerBoundingBox(),S=S.times(e.pixelDensityRatio)),this._clear(!0,S)),_||this._setRotations(u,v);var P=!1;if(u._clip){this._saveContext(v);var E=u.imageToViewportRectangle(u._clip,!0);E=E.rotate(-u.getRotation(!0),u._getRotationPoint(!0));var R=this.viewportToDrawerRectangle(E);_&&(R=R.times(_)),d&&(R=R.translate(d)),this._setClip(R,v),P=!0}if(u._croppingPolygons){var F=this;P||this._saveContext(v);try{var Z=u._croppingPolygons.map(function(ee){return ee.map(function(ie){var L=u.imageToViewportCoordinates(ie.x,ie.y,!0).rotate(-u.getRotation(!0),u._getRotationPoint(!0)),B=F.viewportCoordToDrawerCoord(L);return _&&(B=B.times(_)),d&&(B=B.plus(d)),B})});this._clipWithPolygons(Z,v)}catch(ee){e.console.error(ee)}P=!0}if(u._hasOpaqueTile=!1,u.placeholderFillStyle&&u._hasOpaqueTile===!1){let ee=this.viewportToDrawerRectangle(u.getBoundsNoRotate(!0));_&&(ee=ee.times(_)),d&&(ee=ee.translate(d));let ie=null;typeof u.placeholderFillStyle=="function"?ie=u.placeholderFillStyle(u,this.context):ie=u.placeholderFillStyle,this._drawRectangle(ee,ie,v)}var z=c(u.subPixelRoundingForTransparency),M=!1;if(z===e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)M=!0;else if(z===e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var O=this.viewer&&this.viewer.isAnimating();M=!O}for(var $=0;$<h.length;$++)f=h[$],this._drawTile(f,u,v,_,d,M,u.source),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:u,tile:f});P&&this._restoreContext(v),_||(u.getRotation(!0)%360!==0&&this._restoreRotationChanges(v),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(v)),v&&(_&&this._setRotations(u),this.blendSketch({opacity:u.opacity,scale:_,translate:d,compositeOperation:u.compositeOperation,bounds:S}),_&&(u.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1))),this._drawDebugInfo(u,h),this._raiseTiledImageDrawnEvent(u,h)}}_drawDebugInfo(u,h){if(u.debugMode)for(var f=h.length-1;f>=0;f--){var v=h[f];try{this._drawDebugInfoOnTile(v,h.length,f,u)}catch(_){e.console.error(_)}}}_clipWithPolygons(u,h){var f=this._getContext(h);f.beginPath();for(const v of u)for(const[_,d]of v.entries())f[_===0?"moveTo":"lineTo"](d.x,d.y);f.clip()}_drawTile(u,h,f,v,_,d,g){e.console.assert(u,"[Drawer._drawTile] tile is required"),e.console.assert(h,"[Drawer._drawTile] drawingHandler is required");var b=this._getContext(f);v=v||1,this._drawTileToCanvas(u,b,h,v,_,d,g)}_drawTileToCanvas(u,h,f,v,_,d,g){var b=u.position.times(e.pixelDensityRatio),S=u.size.times(e.pixelDensityRatio),P;if(!u.context2D&&!u.cacheImageRecord){e.console.warn("[Drawer._drawTileToCanvas] attempting to draw tile %s when it's not cached",u.toString());return}if(P=u.getCanvasContext(),!u.loaded||!P){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",u.toString());return}h.save(),typeof v=="number"&&v!==1&&(b=b.times(v),S=S.times(v)),_ instanceof e.Point&&(b=b.plus(_)),h.globalAlpha===1&&u.hasTransparency&&(d&&(b.x=Math.round(b.x),b.y=Math.round(b.y),S.x=Math.round(S.x),S.y=Math.round(S.y)),h.clearRect(b.x,b.y,S.x,S.y)),this._raiseTileDrawingEvent(f,h,u,P);var E,R;u.sourceBounds?(E=Math.min(u.sourceBounds.width,P.canvas.width),R=Math.min(u.sourceBounds.height,P.canvas.height)):(E=P.canvas.width,R=P.canvas.height),h.translate(b.x+S.x/2,0),u.flipped&&h.scale(-1,1),h.drawImage(P.canvas,0,0,E,R,-S.x/2,b.y,S.x,S.y),h.restore()}_getContext(u){var h=this.context;if(u){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var f=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=f.x,this.sketchCanvas.height=f.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var v=this;this.viewer.addHandler("rotate",function _(){if(v.viewport.getRotation()!==0){v.viewer.removeHandler("rotate",_);var d=v._calculateSketchCanvasSize();v.sketchCanvas.width=d.x,v.sketchCanvas.height=d.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}h=this.sketchContext}return h}_saveContext(u){this._getContext(u).save()}_restoreContext(u){this._getContext(u).restore()}_setClip(u,h){var f=this._getContext(h);f.beginPath(),f.rect(u.x,u.y,u.width,u.height),f.clip()}_drawRectangle(u,h,f){var v=this._getContext(f);v.save(),v.fillStyle=h,v.fillRect(u.x,u.y,u.width,u.height),v.restore()}blendSketch(u,h,f,v){var _=u;e.isPlainObject(_)||(_={opacity:u,scale:h,translate:f,compositeOperation:v}),u=_.opacity,v=_.compositeOperation;var d=_.bounds;if(this.context.save(),this.context.globalAlpha=u,v&&(this.context.globalCompositeOperation=v),d)d.x<0&&(d.width+=d.x,d.x=0),d.x+d.width>this.canvas.width&&(d.width=this.canvas.width-d.x),d.y<0&&(d.height+=d.y,d.y=0),d.y+d.height>this.canvas.height&&(d.height=this.canvas.height-d.y),this.context.drawImage(this.sketchCanvas,d.x,d.y,d.width,d.height,d.x,d.y,d.width,d.height);else{h=_.scale||1,f=_.translate;var g=f instanceof e.Point?f:new e.Point(0,0),b=0,S=0;if(f){var P=this.sketchCanvas.width-this.canvas.width,E=this.sketchCanvas.height-this.canvas.height;b=Math.round(P/2),S=Math.round(E/2)}this.context.drawImage(this.sketchCanvas,g.x-b*h,g.y-S*h,(this.canvas.width+2*b)*h,(this.canvas.height+2*S)*h,-b,-S,this.canvas.width+2*b,this.canvas.height+2*S)}this.context.restore()}_drawDebugInfoOnTile(u,h,f,v){var _=this.viewer.world.getIndexOfItem(v)%this.debugGridColor.length,d=this.context;d.save(),d.lineWidth=2*e.pixelDensityRatio,d.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",d.strokeStyle=this.debugGridColor[_],d.fillStyle=this.debugGridColor[_],this._setRotations(v),this._viewportFlipped&&this._flip({point:u.position.plus(u.size.divide(2))}),d.strokeRect(u.position.x*e.pixelDensityRatio,u.position.y*e.pixelDensityRatio,u.size.x*e.pixelDensityRatio,u.size.y*e.pixelDensityRatio);var g=(u.position.x+u.size.x/2)*e.pixelDensityRatio,b=(u.position.y+u.size.y/2)*e.pixelDensityRatio;d.translate(g,b);const S=this.viewport.getRotation(!0);d.rotate(Math.PI/180*-S),d.translate(-g,-b),u.x===0&&u.y===0&&(d.fillText("Zoom: "+this.viewport.getZoom(),u.position.x*e.pixelDensityRatio,(u.position.y-30)*e.pixelDensityRatio),d.fillText("Pan: "+this.viewport.getBounds().toString(),u.position.x*e.pixelDensityRatio,(u.position.y-20)*e.pixelDensityRatio)),d.fillText("Level: "+u.level,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+20)*e.pixelDensityRatio),d.fillText("Column: "+u.x,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+30)*e.pixelDensityRatio),d.fillText("Row: "+u.y,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+40)*e.pixelDensityRatio),d.fillText("Order: "+f+" of "+h,(u.position.x+10)*e.pixelDensityRatio,(u.position.y+50)*e.pixelDensityRatio),d.fillText("Size: "+u.size.toString(),(u.position.x+10)*e.pixelDensityRatio,(u.position.y+60)*e.pixelDensityRatio),d.fillText("Position: "+u.position.toString(),(u.position.x+10)*e.pixelDensityRatio,(u.position.y+70)*e.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),v.getRotation(!0)%360!==0&&this._restoreRotationChanges(),d.restore()}_updateImageSmoothingEnabled(u){u.msImageSmoothingEnabled=this._imageSmoothingEnabled,u.imageSmoothingEnabled=this._imageSmoothingEnabled}_getCanvasSize(u){var h=this._getContext(u).canvas;return new e.Point(h.width,h.height)}_getCanvasCenter(){return new e.Point(this.canvas.width/2,this.canvas.height/2)}_setRotations(u,h=!1){var f=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:h,saveContext:f}),f=!1),u.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:u.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(u._getRotationPoint(!0),!0),useSketch:h,saveContext:f})}_offsetForRotation(u){var h=u.point?u.point.times(e.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(u.useSketch);f.save(),f.translate(h.x,h.y),f.rotate(Math.PI/180*u.degrees),f.translate(-h.x,-h.y)}_flip(u){u=u||{};var h=u.point?u.point.times(e.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(u.useSketch);f.translate(h.x,0),f.scale(-1,1),f.translate(-h.x,0)}_restoreRotationChanges(u){var h=this._getContext(u);h.restore()}_calculateCanvasSize(){var u=e.pixelDensityRatio,h=this.viewport.getContainerSize();return{x:Math.round(h.x*u),y:Math.round(h.y*u)}}_calculateSketchCanvasSize(){var u=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return u;var h=Math.ceil(Math.sqrt(u.x*u.x+u.y*u.y));return{x:h,y:h}}}e.CanvasDrawer=n;var o=e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function a(l){return l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&l!==e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function s(l){return a(l)?o:l}function c(l){if(typeof l=="number")return s(l);if(!l||!e.Browser)return o;var u=l[e.Browser.vendor];return a(u)&&(u=l["*"]),s(u)}})(t),(function(e){const r=e;r.WebGLDrawer=class extends r.DrawerBase{constructor(o){super(o),this._destroyed=!1,this._TextureMap=new Map,this._TileMap=new Map,this._gl=null,this._firstPass=null,this._secondPass=null,this._glFrameBuffer=null,this._renderToTexture=null,this._glFramebufferToCanvasTransform=null,this._outputCanvas=null,this._outputContext=null,this._clippingCanvas=null,this._clippingContext=null,this._renderingCanvas=null,this._backupCanvasDrawer=null,this._imageSmoothingEnabled=!0,this._boundToTileReady=a=>this._tileReadyHandler(a),this._boundToImageUnloaded=a=>this._imageUnloadedHandler(a),this.viewer.addHandler("tile-ready",this._boundToTileReady),this.viewer.addHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.rejectEventHandler("tile-drawn","The WebGLDrawer does not raise the tile-drawn event"),this.viewer.rejectEventHandler("tile-drawing","The WebGLDrawer does not raise the tile-drawing event"),this._setupCanvases(),this._setupRenderer(),this.context=this._outputContext}destroy(){if(this._destroyed)return;let o=this._gl;var a=o.getParameter(o.MAX_TEXTURE_IMAGE_UNITS);for(let c=0;c<a;++c)o.activeTexture(o.TEXTURE0+c),o.bindTexture(o.TEXTURE_2D,null),o.bindTexture(o.TEXTURE_CUBE_MAP,null);o.bindBuffer(o.ARRAY_BUFFER,null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null),o.bindRenderbuffer(o.RENDERBUFFER,null),o.bindFramebuffer(o.FRAMEBUFFER,null),this._unloadTextures(),o.deleteBuffer(this._secondPass.bufferOutputPosition),o.deleteFramebuffer(this._glFrameBuffer),this._renderingCanvas.width=this._renderingCanvas.height=1,this._clippingCanvas.width=this._clippingCanvas.height=1,this._outputCanvas.width=this._outputCanvas.height=1,this._renderingCanvas=null,this._clippingCanvas=this._clippingContext=null,this._outputCanvas=this._outputContext=null;let s=o.getExtension("WEBGL_lose_context");s&&s.loseContext(),this.viewer.removeHandler("tile-ready",this._boundToTileReady),this.viewer.removeHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.removeHandler("resize",this._resizeHandler),this._gl=null,this._backupCanvasDrawer&&(this._backupCanvasDrawer.destroy(),this._backupCanvasDrawer=null),this.container.removeChild(this.canvas),this.viewer.drawer===this&&(this.viewer.drawer=null),this._destroyed=!0}canRotate(){return!0}static isSupported(){let o=document.createElement("canvas"),a=e.isFunction(o.getContext)&&o.getContext("webgl"),s=a&&a.getExtension("WEBGL_lose_context");return s&&s.loseContext(),!!a}getType(){return"webgl"}minimumOverlapRequired(o){return o.isTainted()}_createDrawingElement(){let o=e.makeNeutralElement("canvas"),a=this._calculateCanvasSize();return o.width=a.x,o.height=a.y,o}_getBackupCanvasDrawer(){return this._backupCanvasDrawer||(this._backupCanvasDrawer=this.viewer.requestDrawer("canvas",{mainDrawer:!1}),this._backupCanvasDrawer.canvas.style.setProperty("visibility","hidden")),this._backupCanvasDrawer}draw(o){let a=this._gl;const s=this.viewport.getBoundsNoRotateWithMargins(!0);let c={bounds:s,center:new r.Point(s.x+s.width/2,s.y+s.height/2),rotation:this.viewport.getRotation(!0)*Math.PI/180},l=this.viewport.flipped?-1:1,u=e.Mat3.makeTranslation(-c.center.x,-c.center.y),h=e.Mat3.makeScaling(2/c.bounds.width*l,-2/c.bounds.height),f=e.Mat3.makeRotation(-c.rotation),v=h.multiply(f).multiply(u);a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT),this._outputContext.clearRect(0,0,this._outputCanvas.width,this._outputCanvas.height);let _=!1;o.forEach((d,g)=>{if(d.isTainted()){_&&(this._outputContext.drawImage(this._renderingCanvas,0,0),a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT),_=!1);const b=this._getBackupCanvasDrawer();b.draw([d]),this._outputContext.drawImage(b.canvas,0,0)}else{let b=d.getTilesToDraw();if(d.placeholderFillStyle&&d._hasOpaqueTile===!1&&this._drawPlaceholder(d),b.length===0||d.getOpacity()===0)return;let S=b[0],P=d.compositeOperation||this.viewer.compositeOperation||d._clip||d._croppingPolygons||d.debugMode,E=P||d.opacity<1||S.hasTransparency;P&&(_&&this._outputContext.drawImage(this._renderingCanvas,0,0),a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT)),a.useProgram(this._firstPass.shaderProgram),E?(a.bindFramebuffer(a.FRAMEBUFFER,this._glFrameBuffer),a.clear(a.COLOR_BUFFER_BIT)):a.bindFramebuffer(a.FRAMEBUFFER,null);let R=v,F=d.getRotation(!0);if(F%360!==0){let ee=e.Mat3.makeRotation(-F*Math.PI/180),ie=d.getBoundsNoRotate(!0).getCenter(),L=e.Mat3.makeTranslation(ie.x,ie.y),B=e.Mat3.makeTranslation(-ie.x,-ie.y),X=L.multiply(ee).multiply(B);R=v.multiply(X)}let Z=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);if(Z<=0)throw new Error(`WegGL error: bad value for gl parameter MAX_TEXTURE_IMAGE_UNITS (${Z}). This could happen
|
|
28
|
+
if too many contexts have been created and not released, or there is another problem with the graphics card.`);let z=new Float32Array(Z*12),M=new Array(Z),O=new Array(Z),$=new Array(Z);for(let ee=0;ee<b.length;ee++){let ie=b[ee].tile,L=ee%Z,B=L+1,X=ie.getCanvasContext(),ae=X?this._TextureMap.get(X.canvas):null;if(ae||(this._tileReadyHandler({tile:ie,tiledImage:d}),ae=X?this._TextureMap.get(X.canvas):null),ae&&this._getTileData(ie,d,ae,R,L,z,M,O,$),B===Z||ee===b.length-1){for(let oe=0;oe<=B;oe++)a.activeTexture(a.TEXTURE0+oe),a.bindTexture(a.TEXTURE_2D,M[oe]);a.bindBuffer(a.ARRAY_BUFFER,this._firstPass.bufferTexturePosition),a.bufferData(a.ARRAY_BUFFER,z,a.DYNAMIC_DRAW),O.forEach((oe,N)=>{a.uniformMatrix3fv(this._firstPass.uTransformMatrices[N],!1,oe)}),a.uniform1fv(this._firstPass.uOpacities,new Float32Array($)),a.bindBuffer(a.ARRAY_BUFFER,this._firstPass.bufferOutputPosition),a.vertexAttribPointer(this._firstPass.aOutputPosition,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this._firstPass.bufferTexturePosition),a.vertexAttribPointer(this._firstPass.aTexturePosition,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this._firstPass.bufferIndex),a.vertexAttribPointer(this._firstPass.aIndex,1,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLES,0,6*B)}}E&&(a.useProgram(this._secondPass.shaderProgram),a.bindFramebuffer(a.FRAMEBUFFER,null),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._renderToTexture),this._gl.uniform1f(this._secondPass.uOpacityMultiplier,d.opacity),a.bindBuffer(a.ARRAY_BUFFER,this._secondPass.bufferTexturePosition),a.vertexAttribPointer(this._secondPass.aTexturePosition,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this._secondPass.bufferOutputPosition),a.vertexAttribPointer(this._secondPass.aOutputPosition,2,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLES,0,6)),_=!0,P&&(this._applyContext2dPipeline(d,b,g),_=!1,a.bindFramebuffer(a.FRAMEBUFFER,null),a.clear(a.COLOR_BUFFER_BIT)),g===0&&this._raiseTiledImageDrawnEvent(d,b.map(ee=>ee.tile))}}),_&&this._outputContext.drawImage(this._renderingCanvas,0,0)}setImageSmoothingEnabled(o){this._imageSmoothingEnabled!==o&&(this._imageSmoothingEnabled=o,this._unloadTextures(),this.viewer.world.draw())}drawDebuggingRect(o){let a=this._outputContext;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.strokeStyle=this.debugGridColor[0],a.fillStyle=this.debugGridColor[0],a.strokeRect(o.x*e.pixelDensityRatio,o.y*e.pixelDensityRatio,o.width*e.pixelDensityRatio,o.height*e.pixelDensityRatio),a.restore()}_getTextureDataFromTile(o){return o.getCanvasContext().canvas}_applyContext2dPipeline(o,a,s){if(this._outputContext.save(),this._outputContext.globalCompositeOperation=s===0?null:o.compositeOperation||this.viewer.compositeOperation,o._croppingPolygons||o._clip?(this._renderToClippingCanvas(o),this._outputContext.drawImage(this._clippingCanvas,0,0)):this._outputContext.drawImage(this._renderingCanvas,0,0),this._outputContext.restore(),o.debugMode){const c=this.viewer.viewport.getFlip();c&&this._flip(),this._drawDebugInfo(a,o,c),c&&this._flip()}}_getTileData(o,a,s,c,l,u,h,f,v){let _=s.texture,d=s.position;u.set(d,l*12);let g=this._calculateOverlapFraction(o,a),b=o.positionedBounds.width*g.x,S=o.positionedBounds.height*g.y,P=o.positionedBounds.x+(o.x===0?0:b),E=o.positionedBounds.y+(o.y===0?0:S),R=o.positionedBounds.x+o.positionedBounds.width-(o.isRightMost?0:b),F=o.positionedBounds.y+o.positionedBounds.height-(o.isBottomMost?0:S),Z=R-P,z=F-E,M=new e.Mat3([Z,0,0,0,z,0,P,E,1]);if(o.flipped){let $=e.Mat3.makeTranslation(.5,0),ee=e.Mat3.makeTranslation(-.5,0),ie=$.multiply(e.Mat3.makeScaling(-1,1)).multiply(ee);M=M.multiply(ie)}let O=c.multiply(M);v[l]=o.opacity,h[l]=_,f[l]=O.values}_textureFilter(){return this._imageSmoothingEnabled?this._gl.LINEAR:this._gl.NEAREST}_setupRenderer(){let o=this._gl;o||e.console.error("_setupCanvases must be called before _setupRenderer"),this._unitQuad=this._makeQuadVertexBuffer(0,1,0,1),this._makeFirstPassShaderProgram(),this._makeSecondPassShaderProgram(),this._renderToTexture=o.createTexture(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._renderToTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,this._renderingCanvas.width,this._renderingCanvas.height,0,o.RGBA,o.UNSIGNED_BYTE,null),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this._textureFilter()),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this._glFrameBuffer=o.createFramebuffer(),o.bindFramebuffer(o.FRAMEBUFFER,this._glFrameBuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,this._renderToTexture,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)}_makeFirstPassShaderProgram(){let o=this._glNumTextures=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),a=()=>[...Array(o).keys()].map(_=>`uniform mat3 u_matrix_${_};`).join(`
|
|
29
29
|
`),s=()=>[...Array(o).keys()].map(_=>`${_>0?"else ":""}if(int(a_index) == ${_}) { transform_matrix = u_matrix_${_}; }`).join(`
|
|
30
30
|
`);const c=`
|
|
31
31
|
attribute vec2 a_output_position;
|
|
@@ -97,4 +97,4 @@ function t(e){return new t.Viewer(e)}(function(e){e.version={versionStr:"5.0.1",
|
|
|
97
97
|
gl_FragColor = texture2D(u_image, v_texture_position);
|
|
98
98
|
gl_FragColor *= u_opacity_multiplier;
|
|
99
99
|
}
|
|
100
|
-
`;let s=this._gl,c=this.constructor.initShaderProgram(s,o,a);s.useProgram(c),this._secondPass={shaderProgram:c,aOutputPosition:s.getAttribLocation(c,"a_output_position"),aTexturePosition:s.getAttribLocation(c,"a_texture_position"),uMatrix:s.getUniformLocation(c,"u_matrix"),uImage:s.getUniformLocation(c,"u_image"),uOpacityMultiplier:s.getUniformLocation(c,"u_opacity_multiplier"),bufferOutputPosition:s.createBuffer(),bufferTexturePosition:s.createBuffer()},s.bindBuffer(s.ARRAY_BUFFER,this._secondPass.bufferOutputPosition),s.bufferData(s.ARRAY_BUFFER,this._unitQuad,s.STATIC_DRAW),s.enableVertexAttribArray(this._secondPass.aOutputPosition),s.bindBuffer(s.ARRAY_BUFFER,this._secondPass.bufferTexturePosition),s.bufferData(s.ARRAY_BUFFER,this._unitQuad,s.DYNAMIC_DRAW),s.enableVertexAttribArray(this._secondPass.aTexturePosition);let l=e.Mat3.makeScaling(2,2).multiply(e.Mat3.makeTranslation(-.5,-.5));s.uniformMatrix3fv(this._secondPass.uMatrix,!1,l.values)}_resizeRenderer(){let o=this._gl,a=this._renderingCanvas.width,s=this._renderingCanvas.height;o.viewport(0,0,a,s),o.deleteTexture(this._renderToTexture),this._renderToTexture=o.createTexture(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._renderToTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,a,s,0,o.RGBA,o.UNSIGNED_BYTE,null),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this._textureFilter()),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.bindFramebuffer(o.FRAMEBUFFER,this._glFrameBuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,this._renderToTexture,0)}_setupCanvases(){let o=this;this._outputCanvas=this.canvas,this._outputContext=this._outputCanvas.getContext("2d"),this._renderingCanvas=document.createElement("canvas"),this._clippingCanvas=document.createElement("canvas"),this._clippingContext=this._clippingCanvas.getContext("2d"),this._renderingCanvas.width=this._clippingCanvas.width=this._outputCanvas.width,this._renderingCanvas.height=this._clippingCanvas.height=this._outputCanvas.height,this._gl=this._renderingCanvas.getContext("webgl"),this._resizeHandler=function(){o._outputCanvas!==o.viewer.drawer.canvas&&(o._outputCanvas.style.width=o.viewer.drawer.canvas.clientWidth+"px",o._outputCanvas.style.height=o.viewer.drawer.canvas.clientHeight+"px");let a=o._calculateCanvasSize();(o._outputCanvas.width!==a.x||o._outputCanvas.height!==a.y)&&(o._outputCanvas.width=a.x,o._outputCanvas.height=a.y),o._renderingCanvas.style.width=o._outputCanvas.clientWidth+"px",o._renderingCanvas.style.height=o._outputCanvas.clientHeight+"px",o._renderingCanvas.width=o._clippingCanvas.width=o._outputCanvas.width,o._renderingCanvas.height=o._clippingCanvas.height=o._outputCanvas.height,o._resizeRenderer()},this.viewer.addHandler("resize",this._resizeHandler)}_makeQuadVertexBuffer(o,a,s,c){return new Float32Array([o,c,a,c,o,s,o,s,a,c,a,s])}_tileReadyHandler(o){let a=o.tile,s=o.tiledImage;if(s.isTainted())return;let c=a.getCanvasContext(),l=c&&c.canvas;if(!l||e.isCanvasTainted(l)){s.isTainted()||(s.setTainted(!0),e.console.warn("WebGL cannot be used to draw this TiledImage because it has tainted data. Does crossOriginPolicy need to be set?"),this._raiseDrawerErrorEvent(s,"Tainted data cannot be used by the WebGLDrawer. Falling back to CanvasDrawer for this TiledImage."));return}if(!this._TextureMap.get(l)){let h=this._gl,f=h.createTexture(),v,_=s.source.tileOverlap,d,g;if(a.sourceBounds?(d=Math.min(a.sourceBounds.width,l.width)/l.width,g=Math.min(a.sourceBounds.height,l.height)/l.height):(d=1,g=1),_>0){let S=this._calculateOverlapFraction(a,s),P=(a.x===0?0:S.x)*d,E=(a.y===0?0:S.y)*g,A=(a.isRightMost?1:1-S.x)*d,B=(a.isBottomMost?1:1-S.y)*g;v=this._makeQuadVertexBuffer(P,A,E,B)}else d===1&&g===1?v=this._unitQuad:v=this._makeQuadVertexBuffer(0,d,0,g);let y={texture:f,position:v};this._TextureMap.set(l,y),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,f),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,this._textureFilter()),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,this._textureFilter()),this._uploadImageData(c)}}_calculateOverlapFraction(o,a){let s=a.source.tileOverlap,c=o.sourceBounds.width,l=o.sourceBounds.height,u=(o.x===0?0:s)+(o.isRightMost?0:s),h=(o.y===0?0:s)+(o.isBottomMost?0:s),f=s/(c+u),v=s/(l+h);return{x:f,y:v}}_unloadTextures(){Array.from(this._TextureMap.keys()).forEach(a=>{this._cleanupImageData(a)})}_uploadImageData(o){let a=this._gl,s=o.canvas;try{if(!s)throw o;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,s)}catch(c){e.console.error("Error uploading image data to WebGL",c)}}_imageUnloadedHandler(o){let a=o.context2D.canvas;this._cleanupImageData(a)}_cleanupImageData(o){let a=this._TextureMap.get(o);this._TextureMap.delete(o),a&&this._gl.deleteTexture(a.texture)}_setClip(){}_renderToClippingCanvas(o){if(this._clippingContext.clearRect(0,0,this._clippingCanvas.width,this._clippingCanvas.height),this._clippingContext.save(),this.viewer.viewport.getFlip()){const a=new e.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(a.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-a.x,0)}if(o._clip){let s=[{x:o._clip.x,y:o._clip.y},{x:o._clip.x+o._clip.width,y:o._clip.y},{x:o._clip.x+o._clip.width,y:o._clip.y+o._clip.height},{x:o._clip.x,y:o._clip.y+o._clip.height}].map(c=>{let l=o.imageToViewportCoordinates(c.x,c.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(l)});this._clippingContext.beginPath(),s.forEach((c,l)=>{this._clippingContext[l===0?"moveTo":"lineTo"](c.x,c.y)}),this._clippingContext.clip(),this._setClip()}if(o._croppingPolygons){let a=o._croppingPolygons.map(s=>s.map(c=>{let l=o.imageToViewportCoordinates(c.x,c.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(l)}));this._clippingContext.beginPath(),a.forEach(s=>{s.forEach((c,l)=>{this._clippingContext[l===0?"moveTo":"lineTo"](c.x,c.y)})}),this._clippingContext.clip()}if(this.viewer.viewport.getFlip()){const a=new e.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(a.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-a.x,0)}this._clippingContext.drawImage(this._renderingCanvas,0,0),this._clippingContext.restore()}_setRotations(o){var a=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),saveContext:a}),a=!1),o.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:o.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(o._getRotationPoint(!0),!0),saveContext:a})}_offsetForRotation(o){var a=o.point?o.point.times(e.pixelDensityRatio):this._getCanvasCenter(),s=this._outputContext;s.save(),s.translate(a.x,a.y),s.rotate(Math.PI/180*o.degrees),s.translate(-a.x,-a.y)}_flip(o){o=o||{};var a=o.point?o.point.times(e.pixelDensityRatio):this._getCanvasCenter(),s=this._outputContext;s.translate(a.x,0),s.scale(-1,1),s.translate(-a.x,0)}_drawDebugInfo(o,a,s){for(var c=o.length-1;c>=0;c--){var l=o[c].tile;try{this._drawDebugInfoOnTile(l,o.length,c,a,s)}catch(u){e.console.error(u)}}}_drawDebugInfoOnTile(o,a,s,c,l){var u=this.viewer.world.getIndexOfItem(c)%this.debugGridColor.length,h=this.context;h.save(),h.lineWidth=2*e.pixelDensityRatio,h.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",h.strokeStyle=this.debugGridColor[u],h.fillStyle=this.debugGridColor[u],this._setRotations(c),l&&this._flip({point:o.position.plus(o.size.divide(2))}),h.strokeRect(o.position.x*e.pixelDensityRatio,o.position.y*e.pixelDensityRatio,o.size.x*e.pixelDensityRatio,o.size.y*e.pixelDensityRatio);var f=(o.position.x+o.size.x/2)*e.pixelDensityRatio,v=(o.position.y+o.size.y/2)*e.pixelDensityRatio;h.translate(f,v);const _=this.viewport.getRotation(!0);h.rotate(Math.PI/180*-_),h.translate(-f,-v),o.x===0&&o.y===0&&(h.fillText("Zoom: "+this.viewport.getZoom(),o.position.x*e.pixelDensityRatio,(o.position.y-30)*e.pixelDensityRatio),h.fillText("Pan: "+this.viewport.getBounds().toString(),o.position.x*e.pixelDensityRatio,(o.position.y-20)*e.pixelDensityRatio)),h.fillText("Level: "+o.level,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+20)*e.pixelDensityRatio),h.fillText("Column: "+o.x,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+30)*e.pixelDensityRatio),h.fillText("Row: "+o.y,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+40)*e.pixelDensityRatio),h.fillText("Order: "+s+" of "+a,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+50)*e.pixelDensityRatio),h.fillText("Size: "+o.size.toString(),(o.position.x+10)*e.pixelDensityRatio,(o.position.y+60)*e.pixelDensityRatio),h.fillText("Position: "+o.position.toString(),(o.position.x+10)*e.pixelDensityRatio,(o.position.y+70)*e.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),c.getRotation(!0)%360!==0&&this._restoreRotationChanges(),h.restore()}_drawPlaceholder(o){const a=o.getBounds(!0),s=this.viewportToDrawerRectangle(o.getBounds(!0)),c=this._outputContext;let l;typeof o.placeholderFillStyle=="function"?l=o.placeholderFillStyle(o,c):l=o.placeholderFillStyle,this._offsetForRotation({degrees:this.viewer.viewport.getRotation(!0)}),c.fillStyle=l,c.translate(s.x,s.y),c.rotate(Math.PI/180*a.degrees),c.translate(-s.x,-s.y),c.fillRect(s.x,s.y,s.width,s.height),this._restoreRotationChanges()}_getCanvasCenter(){return new e.Point(this.canvas.width/2,this.canvas.height/2)}_restoreRotationChanges(){var o=this._outputContext;o.restore()}static initShaderProgram(o,a,s){function c(f,v,_){const d=f.createShader(v);return f.shaderSource(d,_),f.compileShader(d),f.getShaderParameter(d,f.COMPILE_STATUS)?d:(e.console.error(`An error occurred compiling the shaders: ${f.getShaderInfoLog(d)}`),f.deleteShader(d),null)}const l=c(o,o.VERTEX_SHADER,a),u=c(o,o.FRAGMENT_SHADER,s),h=o.createProgram();return o.attachShader(h,l),o.attachShader(h,u),o.linkProgram(h),o.getProgramParameter(h,o.LINK_STATUS)?h:(e.console.error(`Unable to initialize the shader program: ${o.getProgramInfoLog(h)}`),null)}}})(t),(function(e){e.Viewport=function(r){var n=arguments;n.length&&n[0]instanceof e.Point&&(r={containerSize:n[0],contentSize:n[1],config:n[2]}),r.config&&(e.extend(!0,r,r.config),delete r.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},r.margins||{}),delete r.margins,r.initialDegrees=r.degrees,delete r.degrees,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot: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,initialDegrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:e.DEFAULT_SETTINGS.silenceMultiImageWarnings},r),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.degreesSpring=new e.Spring({initial:r.initialDegrees,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._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={get degrees(){return e.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(r){e.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(r)},resetContentSize:function(r){return e.console.assert(r,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(r instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(r.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(r.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,r.y/r.x),r.x),this},setHomeBounds:function(r,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(r,n)},_setContentBounds:function(r,n){e.console.assert(r,"[Viewport._setContentBounds] bounds is required"),e.console.assert(r instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(r.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(r.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=r.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=r.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var r=this._contentAspectRatio/this.getAspectRatio(),n;return this.homeFillsViewer?n=r>=1?r:1:n=r>=1?1:r,n/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var r=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),o=n/this.getAspectRatio();return new e.Rect(r.x-n/2,r.y-o/2,n,o)},goHome:function(r){return this.viewer&&this.viewer.raiseEvent("home",{immediately:r}),this.fitBounds(this.getHomeBounds(),r)},getMinZoom:function(){var r=this.getHomeZoom(),n=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*r;return n},getMaxZoom:function(){var r=this.maxZoomLevel;return r||(r=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,r/=this._contentBounds.width),Math.max(r,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(r){e.console.assert(e.type(r)==="object","[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},r),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(-this.getRotation(r))},getBoundsNoRotate:function(r){var n=this.getCenter(r),o=1/this.getZoom(r),a=o/this.getAspectRatio();return new e.Rect(n.x-o/2,n.y-a/2,o,a)},getBoundsWithMargins:function(r){return this.getBoundsNoRotateWithMargins(r).rotate(-this.getRotation(r),this.getCenter(r))},getBoundsNoRotateWithMargins:function(r){var n=this.getBoundsNoRotate(r),o=this._containerInnerSize.x*this.getZoom(r);return n.x-=this._margins.left/o,n.y-=this._margins.top/o,n.width+=(this._margins.left+this._margins.right)/o,n.height+=(this._margins.top+this._margins.bottom)/o,n},getCenter:function(r){var n=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),o=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),a,s,c,l,u,h,f,v;return r?n:this.zoomPoint?(a=this.pixelFromPoint(this.zoomPoint,!0),s=this.getZoom(),c=1/s,l=c/this.getAspectRatio(),u=new e.Rect(n.x-c/2,n.y-l/2,c,l),h=this._pixelFromPoint(this.zoomPoint,u),f=h.minus(a).rotate(-this.getRotation(!0)),v=f.divide(this._containerInnerSize.x*s),o.plus(v)):o},getZoom:function(r){return r?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(r){return Math.max(Math.min(r,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(r){var n=this.viewportToViewerElementRectangle(r).getBoundingBox(),o=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),a=!1,s=!1;if(!this.wrapHorizontal){var c=n.x+n.width,l=o.x+o.width,u,h,f;n.width>o.width?u=this.visibilityRatio*o.width:u=this.visibilityRatio*n.width,h=o.x-c+u,f=l-n.x-u,u>o.width?(n.x+=(h+f)/2,a=!0):f<0?(n.x+=f,a=!0):h>0&&(n.x+=h,a=!0)}if(!this.wrapVertical){var v=n.y+n.height,_=o.y+o.height,d,g,y;n.height>o.height?d=this.visibilityRatio*o.height:d=this.visibilityRatio*n.height,g=o.y-v+d,y=_-n.y-d,d>o.height?(n.y+=(g+y)/2,s=!0):y<0?(n.y+=y,s=!0):g>0&&(n.y+=g,s=!0)}var S=a||s,P=S?this.viewerElementToViewportRectangle(n):r.clone();return P.xConstrained=a,P.yConstrained=s,P.constraintApplied=S,P},_raiseConstraintsEvent:function(r){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:r})},applyConstraints:function(r){var n=this.getZoom(),o=this._applyZoomConstraints(n);n!==o&&this.zoomTo(o,this.zoomPoint,r);var a=this.getConstrainedBounds(!1);return a.constraintApplied&&(this.fitBounds(a,r),this._raiseConstraintsEvent(r)),this},ensureVisible:function(r){return this.applyConstraints(r)},_fitBounds:function(r,n){n=n||{};var o=n.immediately||!1,a=n.constraints||!1,s=this.getAspectRatio(),c=r.getCenter(),l=new e.Rect(r.x,r.y,r.width,r.height,r.degrees+this.getRotation()).getBoundingBox();l.getAspectRatio()>=s?l.height=l.width/s:l.width=l.height*s,l.x=c.x-l.width/2,l.y=c.y-l.height/2;var u=1/l.width;if(o)return this.panTo(c,!0),this.zoomTo(u,null,!0),a&&this.applyConstraints(!0),this;var h=this.getCenter(!0),f=this.getZoom(!0);this.panTo(h,!0),this.zoomTo(f,null,!0);var v=this.getBounds(),_=this.getZoom();if(_===0||Math.abs(u/_-1)<1e-8)return this.zoomTo(u,null,!0),this.panTo(c,o),a&&this.applyConstraints(!1),this;if(a){this.panTo(c,!1),u=this._applyZoomConstraints(u),this.zoomTo(u,null,!1);var d=this.getConstrainedBounds();this.panTo(h,!0),this.zoomTo(f,null,!0),this.fitBounds(d)}else{var g=l.rotate(-this.getRotation()),y=g.getTopLeft().times(u).minus(v.getTopLeft().times(_)).divide(u-_);this.zoomTo(u,y,o)}return this},fitBounds:function(r,n){return this._fitBounds(r,{immediately:n,constraints:!1})},fitBoundsWithConstraints:function(r,n){return this._fitBounds(r,{immediately:n,constraints:!0})},fitVertically:function(r){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,r)},fitHorizontally:function(r){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,r)},getConstrainedBounds:function(r){var n,o;return n=this.getBounds(r),o=this._applyBoundaryConstraints(n),o},panBy:function(r,n){var o=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(o.plus(r),n)},panTo:function(r,n){return n?(this.centerSpringX.resetTo(r.x),this.centerSpringY.resetTo(r.y)):(this.centerSpringX.springTo(r.x),this.centerSpringY.springTo(r.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:r,immediately:n}),this},zoomBy:function(r,n,o){return this.zoomTo(this.zoomSpring.target.value*r,n,o)},zoomTo:function(r,n,o){var a=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,o?this._adjustCenterSpringsForZoomPoint(function(){a.zoomSpring.resetTo(r)}):this.zoomSpring.springTo(r),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:r,refPoint:n,immediately:o}),this},setRotation:function(r,n){return this.rotateTo(r,null,n)},getRotation:function(r){return r?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(r,n,o){return this.rotateTo(r,n,o)},rotateTo:function(r,n,o){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===r&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,o)if(this.rotationPivot){var a=r-this._oldDegrees;if(!a)return this.rotationPivot=null,this;this._rotateAboutPivot(r)}else this.degreesSpring.resetTo(r);else{var s=e.positiveModulo(this.degreesSpring.current.value,360),c=e.positiveModulo(r,360),l=c-s;l>180?c-=360:l<-180&&(c+=360);var u=s-c;this.degreesSpring.resetTo(r+u),this.degreesSpring.springTo(r)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:r,immediately:!!o,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(r,n,o){return this.rotateTo(this.degreesSpring.target.value+r,n,o)},resize:function(r,n){var o=this.getBoundsNoRotate(),a=o,s;this.containerSize.x=r.x,this.containerSize.y=r.y,this._updateContainerInnerSize(),n&&(s=r.x/this.containerSize.x,a.width=o.width*s,a.height=a.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:r,maintain:n});var c=this.fitBounds(a,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:r,maintain:n}),c},_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 r=this;this._adjustCenterSpringsForZoomPoint(function(){r.zoomSpring.update()}),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var n=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value;var o=n||!this.zoomSpring.isAtTargetValue()||!this.centerSpringX.isAtTargetValue()||!this.centerSpringY.isAtTargetValue()||!this.degreesSpring.isAtTargetValue();return o},_rotateAboutPivot:function(r){var n=r===!0,o=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(o.x),this.centerSpringY.shiftBy(o.y),n?this.degreesSpring.update():this.degreesSpring.resetTo(r);var a=this.degreesSpring.current.value-this._oldDegrees,s=o.rotate(a*-1).times(-1);this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y)},_adjustCenterSpringsForZoomPoint:function(r){if(this.zoomPoint){var n=this.pixelFromPoint(this.zoomPoint,!0);r();var o=this.pixelFromPoint(this.zoomPoint,!0),a=o.minus(n),s=this.deltaPointsFromPixels(a,!0);this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else r()},deltaPixelsFromPointsNoRotate:function(r,n){return r.times(this._containerInnerSize.x*this.getZoom(n))},deltaPixelsFromPoints:function(r,n){return this.deltaPixelsFromPointsNoRotate(r.rotate(this.getRotation(n)),n)},deltaPointsFromPixelsNoRotate:function(r,n){return r.divide(this._containerInnerSize.x*this.getZoom(n))},deltaPointsFromPixels:function(r,n){return this.deltaPointsFromPixelsNoRotate(r,n).rotate(-this.getRotation(n))},pixelFromPointNoRotate:function(r,n){return this._pixelFromPointNoRotate(r,this.getBoundsNoRotate(n))},pixelFromPoint:function(r,n){return this._pixelFromPoint(r,this.getBoundsNoRotate(n))},_pixelFromPointNoRotate:function(r,n){return r.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(r,n){return this._pixelFromPointNoRotate(r.rotate(this.getRotation(!0),this.getCenter(!0)),n)},pointFromPixelNoRotate:function(r,n){var o=this.getBoundsNoRotate(n);return r.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/o.width).plus(o.getTopLeft())},pointFromPixel:function(r,n){return this.pointFromPixelNoRotate(r,n).rotate(-this.getRotation(n),this.getCenter(n))},_viewportToImageDelta:function(r,n){var o=this._contentBoundsNoRotate.width;return new e.Point(r*this._contentSizeNoRotate.x/o,n*this._contentSizeNoRotate.x/o)},viewportToImageCoordinates:function(r,n){if(r instanceof e.Point)return this.viewportToImageCoordinates(r.x,r.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(o===1){var a=this.viewer.world.getItemAt(0);return a.viewportToImageCoordinates(r,n,!0)}}return this._viewportToImageDelta(r-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(r,n){var o=this._contentBoundsNoRotate.width;return new e.Point(r/this._contentSizeNoRotate.x*o,n/this._contentSizeNoRotate.x*o)},imageToViewportCoordinates:function(r,n){if(r instanceof e.Point)return this.imageToViewportCoordinates(r.x,r.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(o===1){var a=this.viewer.world.getItemAt(0);return a.imageToViewportCoordinates(r,n,!0)}}var s=this._imageToViewportDelta(r,n);return s.x+=this._contentBoundsNoRotate.x,s.y+=this._contentBoundsNoRotate.y,s},imageToViewportRectangle:function(r,n,o,a){var s=r;if(s instanceof e.Rect||(s=new e.Rect(r,n,o,a)),this.viewer){var c=this.viewer.world.getItemCount();if(c>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(c===1){var l=this.viewer.world.getItemAt(0);return l.imageToViewportRectangle(r,n,o,a,!0)}}var u=this.imageToViewportCoordinates(s.x,s.y),h=this._imageToViewportDelta(s.width,s.height);return new e.Rect(u.x,u.y,h.x,h.y,s.degrees)},viewportToImageRectangle:function(r,n,o,a){var s=r;if(s instanceof e.Rect||(s=new e.Rect(r,n,o,a)),this.viewer){var c=this.viewer.world.getItemCount();if(c>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(c===1){var l=this.viewer.world.getItemAt(0);return l.viewportToImageRectangle(r,n,o,a,!0)}}var u=this.viewportToImageCoordinates(s.x,s.y),h=this._viewportToImageDelta(s.width,s.height);return new e.Rect(u.x,u.y,h.x,h.y,s.degrees)},viewerElementToImageCoordinates:function(r){var n=this.pointFromPixel(r,!0);return this.viewportToImageCoordinates(n)},imageToViewerElementCoordinates:function(r){var n=this.imageToViewportCoordinates(r);return this.pixelFromPoint(n,!0)},windowToImageCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=r.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var n=this.imageToViewerElementCoordinates(r);return n.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(r){return this.pointFromPixel(r,!0)},viewportToViewerElementCoordinates:function(r){return this.pixelFromPoint(r,!0)},viewerElementToViewportRectangle:function(r){return e.Rect.fromSummits(this.pointFromPixel(r.getTopLeft(),!0),this.pointFromPixel(r.getTopRight(),!0),this.pointFromPixel(r.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(r){return e.Rect.fromSummits(this.pixelFromPoint(r.getTopLeft(),!0),this.pixelFromPoint(r.getTopRight(),!0),this.pixelFromPoint(r.getBottomLeft(),!0))},windowToViewportCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=r.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var n=this.viewportToViewerElementCoordinates(r);return n.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(r){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(n===1){var o=this.viewer.world.getItemAt(0);return o.viewportToImageZoom(r)}}var a=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,c=this._contentBoundsNoRotate.width,l=s/a*c;return r*l},imageToViewportZoom:function(r){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image. Instead, use [TiledImage.imageToViewportZoom] for the specific image of interest");else if(n===1){var o=this.viewer.world.getItemAt(0);return o.imageToViewportZoom(r)}}var a=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,c=this._contentBoundsNoRotate.width,l=a/s/c;return r*l},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(r){return this.flipped===r?this:(this.flipped=r,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:r}),this)},getMaxZoomPixelRatio:function(){return this.maxZoomPixelRatio},setMaxZoomPixelRatio:function(r,n=!0,o=!1){e.console.assert(!isNaN(r),"[Viewport.setMaxZoomPixelRatio] ratio must be a number"),!isNaN(r)&&(this.maxZoomPixelRatio=r,n&&this.getZoom()>this.getMaxZoom()&&this.applyConstraints(o))}}})(t),(function(e){e.TiledImage=function(r){this._initialized=!1,e.console.assert(r.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(r.drawer,"[TiledImage] options.drawer is required"),e.console.assert(r.viewer,"[TiledImage] options.viewer is required"),e.console.assert(r.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(r.source,"[TiledImage] options.source is required"),e.console.assert(!r.clip||r.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=r.tileCache,delete r.tileCache,this._drawer=r.drawer,delete r.drawer,this._imageLoader=r.imageLoader,delete r.imageLoader,r.clip instanceof e.Rect&&(this._clip=r.clip.clone()),delete r.clip;var n=r.x||0;delete r.x;var o=r.y||0;delete r.y,this.normHeight=r.source.dimensions.y/r.source.dimensions.x,this.contentAspectX=r.source.dimensions.x/r.source.dimensions.y;var a=1;r.width?(a=r.width,delete r.width,r.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete r.height)):r.height&&(a=r.height/this.normHeight,delete r.height);var s=r.fitBounds;delete r.fitBounds;var c=r.fitBoundsPlacement||t.Placement.CENTER;delete r.fitBoundsPlacement;var l=r.degrees||0;delete r.degrees;var u=r.ajaxHeaders;delete r.ajaxHeaders,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_needsDraw:!0,_needsUpdate:!0,_hasOpaqueTile:!1,_tilesLoading:0,_tilesToDraw:[],_lastDrawn:[],_isBlending:!1,_wasBlending:!1,_isTainted:!1,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:e.DEFAULT_SETTINGS.subPixelRoundingForTransparency,maxTilesPerFrame:e.DEFAULT_SETTINGS.maxTilesPerFrame},r),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:a,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:l,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),s&&this.fitBounds(s,c,!0),this._ownAjaxHeaders={},this.setAjaxHeaders(u,!1),this._initialized=!0},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},redraw:function(){this._needsDraw=!0},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(r){r!==this._fullyLoaded&&(this._fullyLoaded=r,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(r){let n=this._xSpring.update(),o=this._ySpring.update(),a=this._scaleSpring.update(),s=this._degreesSpring.update(),c=n||o||a||s||this._needsUpdate;if(c||r||!this._fullyLoaded){let l=this._updateLevelsForViewport();this._setFullyLoaded(l)}return this._needsUpdate=!1,c?(this._updateForScale(),this._raiseBoundsChange(),this._needsDraw=!0,!0):!1},setDrawn:function(){return this._needsDraw=this._isBlending||this._wasBlending,this._needsDraw},setTainted(r){this._isTainted=r},isTainted(){return this._isTainted},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy(this.viewer)},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(this.getRotation(r),this._getRotationPoint(r))},getBoundsNoRotate:function(r){return r?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(r){var n=this.getBoundsNoRotate(r);if(this._clip){var o=r?this._worldWidthCurrent:this._worldWidthTarget,a=o/this.source.dimensions.x,s=this._clip.times(a);n=new e.Rect(n.x+s.x,n.y+s.y,s.width,s.height)}return n.rotate(this.getRotation(r),this._getRotationPoint(r))},getTileBounds:function(r,n,o){var a=this.source.getNumTiles(r),s=(a.x+n%a.x)%a.x,c=(a.y+o%a.y)%a.y,l=this.source.getTileBounds(r,s,c);return this.getFlip()&&(l.x=Math.max(0,1-l.x-l.width)),l.x+=(n-s)/a.x,l.y+=this._worldHeightCurrent/this._worldWidthCurrent*((o-c)/a.y),l},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var r=this.imageToWindowCoordinates(new e.Point(0,0)),n=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(n.x-r.x,n.y-r.y)},_viewportToImageDelta:function(r,n,o){var a=o?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(r*(this.source.dimensions.x/a),n*(this.source.dimensions.y*this.contentAspectX/a))},viewportToImageCoordinates:function(r,n,o){var a;return r instanceof e.Point?(o=n,a=r):a=new e.Point(r,n),a=a.rotate(-this.getRotation(o),this._getRotationPoint(o)),o?this._viewportToImageDelta(a.x-this._xSpring.current.value,a.y-this._ySpring.current.value):this._viewportToImageDelta(a.x-this._xSpring.target.value,a.y-this._ySpring.target.value)},_imageToViewportDelta:function(r,n,o){var a=o?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(r/this.source.dimensions.x*a,n/this.source.dimensions.y/this.contentAspectX*a)},imageToViewportCoordinates:function(r,n,o){r instanceof e.Point&&(o=n,n=r.y,r=r.x);var a=this._imageToViewportDelta(r,n,o);return o?(a.x+=this._xSpring.current.value,a.y+=this._ySpring.current.value):(a.x+=this._xSpring.target.value,a.y+=this._ySpring.target.value),a.rotate(this.getRotation(o),this._getRotationPoint(o))},imageToViewportRectangle:function(r,n,o,a,s){var c=r;c instanceof e.Rect?s=n:c=new e.Rect(r,n,o,a);var l=this.imageToViewportCoordinates(c.getTopLeft(),s),u=this._imageToViewportDelta(c.width,c.height,s);return new e.Rect(l.x,l.y,u.x,u.y,c.degrees+this.getRotation(s))},viewportToImageRectangle:function(r,n,o,a,s){var c=r;r instanceof e.Rect?s=n:c=new e.Rect(r,n,o,a);var l=this.viewportToImageCoordinates(c.getTopLeft(),s),u=this._viewportToImageDelta(c.width,c.height,s);return new e.Rect(l.x,l.y,u.x,u.y,c.degrees-this.getRotation(s))},viewerElementToImageCoordinates:function(r){var n=this.viewport.pointFromPixel(r,!0);return this.viewportToImageCoordinates(n)},imageToViewerElementCoordinates:function(r){var n=this.imageToViewportCoordinates(r);return this.viewport.pixelFromPoint(n,!0)},windowToImageCoordinates:function(r){var n=r.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(r){var n=this.imageToViewerElementCoordinates(r);return n.plus(t.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(r){var n=this._scaleSpring.current.value;return r=r.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((r.x-this._xSpring.current.value)/n,(r.y-this._ySpring.current.value)/n,r.width/n,r.height/n,r.degrees)},viewportToImageZoom:function(r){var n=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return n*r},imageToViewportZoom:function(r){var n=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return r/n},setPosition:function(r,n){var o=this._xSpring.target.value===r.x&&this._ySpring.target.value===r.y;if(n){if(o&&this._xSpring.current.value===r.x&&this._ySpring.current.value===r.y)return;this._xSpring.resetTo(r.x),this._ySpring.resetTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}else{if(o)return;this._xSpring.springTo(r.x),this._ySpring.springTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}o||this._raiseBoundsChange()},setWidth:function(r,n){this._setScale(r,n)},setHeight:function(r,n){this._setScale(r/this.normHeight,n)},setCroppingPolygons:function(r){var n=function(a){return a instanceof e.Point||typeof a.x=="number"&&typeof a.y=="number"},o=function(a){return a.map(function(s){try{if(n(s))return{x:s.x,y:s.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!e.isArray(r))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=r.map(function(a){return o(a)}),this._needsDraw=!0}catch(a){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(a),this.resetCroppingPolygons()}},resetCroppingPolygons:function(){this._croppingPolygons=null,this._needsDraw=!0},fitBounds:function(r,n,o){n=n||e.Placement.CENTER;var a=e.Placement.properties[n],s=this.contentAspectX,c=0,l=0,u=1,h=1;if(this._clip&&(s=this._clip.getAspectRatio(),u=this._clip.width/this.source.dimensions.x,h=this._clip.height/this.source.dimensions.y,r.getAspectRatio()>s?(c=this._clip.x/this._clip.height*r.height,l=this._clip.y/this._clip.height*r.height):(c=this._clip.x/this._clip.width*r.width,l=this._clip.y/this._clip.width*r.width)),r.getAspectRatio()>s){var f=r.height/h,v=0;a.isHorizontallyCentered?v=(r.width-r.height*s)/2:a.isRight&&(v=r.width-r.height*s),this.setPosition(new e.Point(r.x-c+v,r.y-l),o),this.setHeight(f,o)}else{var _=r.width/u,d=0;a.isVerticallyCentered?d=(r.height-r.width/s)/2:a.isBottom&&(d=r.height-r.width/s),this.setPosition(new e.Point(r.x-c,r.y-l+d),o),this.setWidth(_,o)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(r){e.console.assert(!r||r instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),r instanceof e.Rect?this._clip=r.clone():this._clip=null,this._needsUpdate=!0,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return this.flipped},setFlip:function(r){this.flipped=r},get flipped(){return this._flipped},set flipped(r){let n=this._flipped!==!!r;this._flipped=!!r,n&&(this.update(!0),this._needsDraw=!0,this._raiseBoundsChange())},get wrapHorizontal(){return this._wrapHorizontal},set wrapHorizontal(r){let n=this._wrapHorizontal!==!!r;this._wrapHorizontal=!!r,this._initialized&&n&&(this.update(!0),this._needsDraw=!0)},get wrapVertical(){return this._wrapVertical},set wrapVertical(r){let n=this._wrapVertical!==!!r;this._wrapVertical=!!r,this._initialized&&n&&(this.update(!0),this._needsDraw=!0)},get debugMode(){return this._debugMode},set debugMode(r){this._debugMode=!!r,this._needsDraw=!0},getOpacity:function(){return this.opacity},setOpacity:function(r){this.opacity=r},get opacity(){return this._opacity},set opacity(r){r!==this.opacity&&(this._opacity=r,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(r){this._preload=!!r,this._needsDraw=!0},getRotation:function(r){return r?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(r,n){this._degreesSpring.target.value===r&&this._degreesSpring.isAtTargetValue()||(n?this._degreesSpring.resetTo(r):this._degreesSpring.springTo(r),this._needsDraw=!0,this._needsUpdate=!0,this._raiseBoundsChange())},getDrawArea:function(){if(this._opacity===0&&!this._preload)return!1;var r=this._viewportToTiledImageRectangle(this.viewport.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var n=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));r=r.intersection(n)}return r},getTilesToDraw:function(){let r=this._tilesToDraw.flat();return this._updateTilesInViewport(r),r=this._tilesToDraw.flat(),r.forEach(n=>{n.tile.beingDrawn=!0}),this._lastDrawn=r,r},_getRotationPoint:function(r){return this.getBoundsNoRotate(r).getCenter()},get compositeOperation(){return this._compositeOperation},set compositeOperation(r){r!==this._compositeOperation&&(this._compositeOperation=r,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this._compositeOperation}))},getCompositeOperation:function(){return this._compositeOperation},setCompositeOperation:function(r){this.compositeOperation=r},setAjaxHeaders:function(r,n){if(r===null&&(r={}),!e.isPlainObject(r)){console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}this._ownAjaxHeaders=r,this._updateAjaxHeaders(n)},_updateAjaxHeaders:function(r){if(r===void 0&&(r=!0),e.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=e.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,r){var n,o,a,s;for(var c in this.tilesMatrix){n=this.source.getNumTiles(c);for(var l in this.tilesMatrix[c]){o=(n.x+l%n.x)%n.x;for(var u in this.tilesMatrix[c][l])if(a=(n.y+u%n.y)%n.y,s=this.tilesMatrix[c][l][u],s.loadWithAjax=this.loadTilesWithAjax,s.loadWithAjax){var h=this.source.getTileAjaxHeaders(c,o,a);s.ajaxHeaders=e.extend({},this.ajaxHeaders,h)}else s.ajaxHeaders=null}}for(var f=0;f<this._imageLoader.jobQueue.length;f++){var v=this._imageLoader.jobQueue[f];v.loadWithAjax=v.tile.loadWithAjax,v.ajaxHeaders=v.tile.loadWithAjax?v.tile.ajaxHeaders:null}}},_setScale:function(r,n){var o=this._scaleSpring.target.value===r;if(n){if(o&&this._scaleSpring.current.value===r)return;this._scaleSpring.resetTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}else{if(o)return;this._scaleSpring.springTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}o||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 r=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),n=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,o=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(n/this.minPixelRatio)/Math.log(2))));return o=Math.max(o,this.source.minLevel||0),r=Math.min(r,o),{lowestLevel:r,highestLevel:o}},_updateLevelsForViewport:function(){var r=this._getLevelsInterval(),n=r.lowestLevel,o=r.highestLevel,a=[],s=this.getDrawArea(),c=e.now();if(this._lastDrawn.forEach(A=>{A.tile.beingDrawn=!1}),this._tilesToDraw=[],this._tilesLoading=0,this.loadingCoverage={},!s)return this._needsDraw=!1,this._fullyLoaded;var l=new Array(o-n+1);for(let A=0,B=o;B>=n;B--,A++)l[A]=B;for(let A=o+1;A<=this.source.maxLevel;A++){var u=this.tilesMatrix[A]&&this.tilesMatrix[A][0]&&this.tilesMatrix[A][0][0];if(u&&u.isBottomMost&&u.isRightMost&&u.loaded){l.push(A);break}}let h=!1;for(let A=0;A<l.length;A++){let B=l[A];var f=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(B),!0).x*this._scaleSpring.current.value;if(A===l.length-1||f>=this.minPixelRatio)h=!0;else if(!h)continue;var v=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(B),!1).x*this._scaleSpring.current.value,_=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,d=this.immediateRender?1:_,g=Math.min(1,(f-.5)/.5),y=d/Math.abs(d-v),S=this._updateLevel(B,g,y,s,c,a);a=S.bestTiles;var P=S.updatedTiles.filter(q=>q.loaded),E=(function(q,z,I){return function(M){return{tile:M,level:q,levelOpacity:z,currentTime:I}}})(B,g,c);if(this._tilesToDraw[B]=P.map(E),this._providesCoverage(this.coverage,B))break}return a&&a.length>0?(a.forEach(function(A){A&&!A.context2D&&this._loadTile(A,c)},this),this._needsDraw=!0,!1):this._tilesLoading===0},_updateTilesInViewport:function(r){let n=e.now(),o=this;this._tilesLoading=0,this._wasBlending=this._isBlending,this._isBlending=!1,this.loadingCoverage={};let a=r.length?r[0].level:0;if(!this.getDrawArea())return;function c(u){let h=u.tile;if(h&&h.loaded){let f=o._blendTile(h,h.x,h.y,u.level,u.levelOpacity,n,a);o._isBlending=o._isBlending||f,o._needsDraw=o._needsDraw||f||o._wasBlending}}let l=0;for(let u=0;u<r.length;u++){let h=r[u];c(h),this._providesCoverage(this.coverage,h.level)&&(l=Math.max(l,h.level))}if(l>0)for(let u in this._tilesToDraw)u<l&&delete this._tilesToDraw[u]},_blendTile:function(r,n,o,a,s,c,l){let u=1e3*this.blendTime,h,f;return r.blendStart||(r.blendStart=c),h=c-r.blendStart,f=u?Math.min(1,h/u):1,a===l&&(f=1,h=u),this.alwaysBlend&&(f*=s),r.opacity=f,f===1&&(this._setCoverage(this.coverage,a,n,o,!0),this._hasOpaqueTile=!0),h<u},_updateLevel:function(r,n,o,a,s,c){var l=a.getBoundingBox().getTopLeft(),u=a.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:!0,level:r,opacity:n,visibility:o,drawArea:a,topleft:l,bottomright:u,currenttime:s,best:c}),this._resetCoverage(this.coverage,r),this._resetCoverage(this.loadingCoverage,r);var h=this._getCornerTiles(r,l,u),f=h.topLeft,v=h.bottomRight,_=this.source.getNumTiles(r),d=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(v.x+=1,this.wrapHorizontal||(v.x=Math.min(v.x,_.x-1)));for(var g=Math.max(0,(v.x-f.x)*(v.y-f.y)),y=new Array(g),S=0,P=f.x;P<=v.x;P++)for(var E=f.y;E<=v.y;E++){var A;if(this.getFlip()){var B=(_.x+P%_.x)%_.x;A=P+_.x-B-B-1}else A=P;if(a.intersection(this.getTileBounds(r,A,E))!==null){var q=this._updateTile(A,E,r,o,d,_,s,c);c=q.bestTiles,y[S]=q.tile,S+=1}}return{bestTiles:c,updatedTiles:y}},_positionTile:function(r,n,o,a,s){var c=r.bounds.getTopLeft();c.x*=this._scaleSpring.current.value,c.y*=this._scaleSpring.current.value,c.x+=this._xSpring.current.value,c.y+=this._ySpring.current.value;var l=r.bounds.getSize();l.x*=this._scaleSpring.current.value,l.y*=this._scaleSpring.current.value,r.positionedBounds.x=c.x,r.positionedBounds.y=c.y,r.positionedBounds.width=l.x,r.positionedBounds.height=l.y;var u=o.pixelFromPointNoRotate(c,!0),h=o.pixelFromPointNoRotate(c,!1),f=o.deltaPixelsFromPointsNoRotate(l,!0),v=o.deltaPixelsFromPointsNoRotate(l,!1),_=h.plus(v.divide(2)),d=a.squaredDistanceTo(_);this.viewer.drawer.minimumOverlapRequired(this)&&(n||(f=f.plus(new e.Point(1,1))),r.isRightMost&&this.wrapHorizontal&&(f.x+=.75),r.isBottomMost&&this.wrapVertical&&(f.y+=.75)),r.position=u,r.size=f,r.squaredDistance=d,r.visibility=s},_updateTile:function(r,n,o,a,s,c,l,u){var h=this._getTile(r,n,o,l,c);this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:h}),this._setCoverage(this.coverage,o,r,n,!1);var f=h.loaded||h.loading||this._isCovered(this.loadingCoverage,o,r,n);if(this._setCoverage(this.loadingCoverage,o,r,n,f),!h.exists)return{bestTiles:u,tile:h};if(h.loaded&&h.opacity===1&&this._setCoverage(this.coverage,o,r,n,!0),this._positionTile(h,this.source.tileOverlap,this.viewport,s,a),!h.loaded)if(h.context2D)this._setTileLoaded(h);else{var v=this._tileCache.getImageRecord(h.cacheKey);v&&this._setTileLoaded(h,v.getData())}return h.loading?this._tilesLoading++:f||(u=this._compareTiles(u,h,this.maxTilesPerFrame)),{bestTiles:u,tile:h}},_getCornerTiles:function(r,n,o){var a,s;this.wrapHorizontal?(a=e.positiveModulo(n.x,1),s=e.positiveModulo(o.x,1)):(a=Math.max(0,n.x),s=Math.min(1,o.x));var c,l,u=1/this.source.aspectRatio;this.wrapVertical?(c=e.positiveModulo(n.y,u),l=e.positiveModulo(o.y,u)):(c=Math.max(0,n.y),l=Math.min(u,o.y));var h=this.source.getTileAtPoint(r,new e.Point(a,c)),f=this.source.getTileAtPoint(r,new e.Point(s,l)),v=this.source.getNumTiles(r);return this.wrapHorizontal&&(h.x+=v.x*Math.floor(n.x),f.x+=v.x*Math.floor(o.x)),this.wrapVertical&&(h.y+=v.y*Math.floor(n.y/u),f.y+=v.y*Math.floor(o.y/u)),{topLeft:h,bottomRight:f}},_getTile:function(r,n,o,a,s){var c,l,u,h,f,v,_,d,g,y,S=this.tilesMatrix,P=this.source;return S[o]||(S[o]={}),S[o][r]||(S[o][r]={}),(!S[o][r][n]||!S[o][r][n].flipped!=!this.flipped)&&(c=(s.x+r%s.x)%s.x,l=(s.y+n%s.y)%s.y,u=this.getTileBounds(o,r,n),h=P.getTileBounds(o,c,l,!0),f=P.tileExists(o,c,l),v=P.getTileUrl(o,c,l),_=P.getTilePostData(o,c,l),this.loadTilesWithAjax?(d=P.getTileAjaxHeaders(o,c,l),e.isPlainObject(this.ajaxHeaders)&&(d=e.extend({},this.ajaxHeaders,d))):d=null,g=P.getContext2D?P.getContext2D(o,c,l):void 0,y=new e.Tile(o,r,n,u,f,v,g,this.loadTilesWithAjax,d,h,_,P.getTileHashKey(o,c,l,v,d,_)),this.getFlip()?c===0&&(y.isRightMost=!0):c===s.x-1&&(y.isRightMost=!0),l===s.y-1&&(y.isBottomMost=!0),y.flipped=this.flipped,S[o][r][n]=y),y=S[o][r][n],y.lastTouchTime=a,y},_loadTile:function(r,n){var o=this;r.loading=!0,this._imageLoader.addJob({src:r.getUrl(),tile:r,source:this.source,postData:r.postData,loadWithAjax:r.loadWithAjax,ajaxHeaders:r.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(a,s,c){o._onTileLoad(r,n,a,s,c)},abort:function(){r.loading=!1}})},_onTileLoad:function(r,n,o,a,s){if(o)r.exists=!0;else{e.console.error("Tile %s failed to load: %s - error: %s",r,r.getUrl(),a),this.viewer.raiseEvent("tile-load-failed",{tile:r,tiledImage:this,time:n,message:a,tileRequest:s}),r.loading=!1,r.exists=!1;return}if(n<this.lastResetTime){e.console.warn("Ignoring tile %s loaded before reset: %s",r,r.getUrl()),r.loading=!1;return}var c=this,l=function(){var u=c.source,h=u.getClosestLevel();c._setTileLoaded(r,o,h,s)};l()},_setTileLoaded:function(r,n,o,a){var s=0,c=!1,l=this;function u(){return c&&e.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),s++,h}function h(){s--,s===0&&(r.loading=!1,r.loaded=!0,r.hasTransparency=l.source.hasTransparency(r.context2D,r.getUrl(),r.ajaxHeaders,r.postData),r.context2D||l._tileCache.cacheTile({data:n,tile:r,cutoff:o,tiledImage:l}),l.viewer.raiseEvent("tile-ready",{tile:r,tiledImage:l,tileRequest:a}),l._needsDraw=!0)}var f=u();this.viewer.raiseEvent("tile-loaded",{tile:r,tiledImage:this,tileRequest:a,get image(){return e.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),n},data:n,getCompletionCallback:u}),c=!0,f()},_compareTiles:function(r,n,o){return r?(r.push(n),this._sortTiles(r),r.length>o&&r.pop(),r):[n]},_sortTiles:function(r){r.sort(function(n,o){return n===null?1:o===null?-1:n.visibility===o.visibility?n.squaredDistance-o.squaredDistance:o.visibility-n.visibility})},_providesCoverage:function(r,n,o,a){var s,c,l,u;if(!r[n])return!1;if(o===void 0||a===void 0){s=r[n];for(l in s)if(Object.prototype.hasOwnProperty.call(s,l)){c=s[l];for(u in c)if(Object.prototype.hasOwnProperty.call(c,u)&&!c[u])return!1}return!0}return r[n][o]===void 0||r[n][o][a]===void 0||r[n][o][a]===!0},_isCovered:function(r,n,o,a){return o===void 0||a===void 0?this._providesCoverage(r,n+1):this._providesCoverage(r,n+1,2*o,2*a)&&this._providesCoverage(r,n+1,2*o,2*a+1)&&this._providesCoverage(r,n+1,2*o+1,2*a)&&this._providesCoverage(r,n+1,2*o+1,2*a+1)},_setCoverage:function(r,n,o,a,s){if(!r[n]){e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n);return}r[n][o]||(r[n][o]={}),r[n][o][a]=s},_resetCoverage:function(r,n){r[n]={}}})})(t),(function(e){var r=function(o){e.console.assert(o,"[TileCache.cacheTile] options is required"),e.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=o.tile,this.tiledImage=o.tiledImage},n=function(o){e.console.assert(o,"[ImageRecord] options is required"),e.console.assert(o.data,"[ImageRecord] options.data is required"),this._tiles=[],o.create.apply(null,[this,o.data,o.ownerTile]),this._destroyImplementation=o.destroy.bind(null,this),this.getImage=o.getImage.bind(null,this),this.getData=o.getData.bind(null,this),this.getRenderedContext=o.getRenderedContext.bind(null,this)};n.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(o){e.console.assert(o,"[ImageRecord.addTile] tile is required"),this._tiles.push(o)},removeTile:function(o){for(var a=0;a<this._tiles.length;a++)if(this._tiles[a]===o){this._tiles.splice(a,1);return}e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",o)},getTileCount:function(){return this._tiles.length}},e.TileCache=function(o){o=o||{},this._maxImageCacheCount=o.maxImageCacheCount||e.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},e.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(o){e.console.assert(o,"[TileCache.cacheTile] options is required"),e.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(o.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),e.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var a=o.cutoff||0,s=this._tilesLoaded.length,c=this._imagesLoaded[o.tile.cacheKey];if(c||(o.data||(e.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),o.data=o.image),e.console.assert(o.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),c=this._imagesLoaded[o.tile.cacheKey]=new n({data:o.data,ownerTile:o.tile,create:o.tiledImage.source.createTileCache,destroy:o.tiledImage.source.destroyTileCache,getImage:o.tiledImage.source.getTileCacheDataAsImage,getData:o.tiledImage.source.getTileCacheData,getRenderedContext:o.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),c.addTile(o.tile),o.tile.cacheImageRecord=c,this._imagesLoadedCount>this._maxImageCacheCount){for(var l=null,u=-1,h=null,f,v,_,d,g,y,S=this._tilesLoaded.length-1;S>=0;S--)if(y=this._tilesLoaded[S],f=y.tile,!(f.level<=a||f.beingDrawn)){if(!l){l=f,u=S,h=y;continue}d=f.lastTouchTime,v=l.lastTouchTime,g=f.level,_=l.level,(d<v||d===v&&g>_)&&(l=f,u=S,h=y)}l&&u>=0&&(this._unloadTile(h),s=u)}this._tilesLoaded[s]=new r({tile:o.tile,tiledImage:o.tiledImage})},clearTilesFor:function(o){e.console.assert(o,"[TileCache.clearTilesFor] tiledImage is required");for(var a,s=0;s<this._tilesLoaded.length;++s)a=this._tilesLoaded[s],a.tiledImage===o&&(this._unloadTile(a),this._tilesLoaded.splice(s,1),s--)},getImageRecord:function(o){return e.console.assert(o,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[o]},_unloadTile:function(o){e.console.assert(o,"[TileCache._unloadTile] tileRecord is required");var a=o.tile,s=o.tiledImage;let c=a.getCanvasContext&&a.getCanvasContext();a.unload(),a.cacheImageRecord=null;var l=this._imagesLoaded[a.cacheKey];l&&(l.removeTile(a),l.getTileCount()||(l.destroy(),delete this._imagesLoaded[a.cacheKey],this._imagesLoadedCount--,c&&(c.canvas.width=0,c.canvas.height=0,s.viewer.raiseEvent("image-unloaded",{context2D:c,tile:a}))),s.viewer.raiseEvent("tile-unloaded",{tile:a,tiledImage:s}))}}})(t),(function(e){e.World=function(r){var n=this;e.console.assert(r.viewer,"[World] options.viewer is required"),e.EventSource.call(this),this.viewer=r.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(o){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},e.extend(e.World.prototype,e.EventSource.prototype,{addItem:function(r,n){if(e.console.assert(r,"[World.addItem] item is required"),e.console.assert(r instanceof e.TiledImage,"[World.addItem] only TiledImages supported at this time"),n=n||{},n.index!==void 0){var o=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(o,0,r)}else this._items.push(r);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,r.addHandler("bounds-change",this._delegatedFigureSizes),r.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:r})},getItemAt:function(r){return e.console.assert(r!==void 0,"[World.getItemAt] index is required"),this._items[r]},getIndexOfItem:function(r){return e.console.assert(r,"[World.getIndexOfItem] item is required"),e.indexOf(this._items,r)},getItemCount:function(){return this._items.length},setItemIndex:function(r,n){e.console.assert(r,"[World.setItemIndex] item is required"),e.console.assert(n!==void 0,"[World.setItemIndex] index is required");var o=this.getIndexOfItem(r);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n===o||o===-1||(this._items.splice(o,1),this._items.splice(n,0,r),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:r,previousIndex:o,newIndex:n}))},removeItem:function(r){e.console.assert(r,"[World.removeItem] item is required");var n=e.indexOf(this._items,r);n!==-1&&(r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(r))},removeAll:function(){this.viewer._cancelPendingImages();var r,n;for(n=0;n<this._items.length;n++)r=this._items[n],r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy();var o=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,n=0;n<o.length;n++)r=o[n],this._raiseRemoveItem(r)},resetItems:function(){for(var r=0;r<this._items.length;r++)this._items[r].reset()},update:function(r){for(var n=!1,o=0;o<this._items.length;o++)n=this._items[o].update(r)||n;return n},draw:function(){this.viewer.drawer.draw(this._items),this._needsDraw=!1,this._items.forEach(r=>{this._needsDraw=r.setDrawn()||this._needsDraw})},needsDraw:function(){for(var r=0;r<this._items.length;r++)if(this._items[r].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(r){this._autoRefigureSizes=r,r&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(r){r=r||{};var n=r.immediately||!1,o=r.layout||e.DEFAULT_SETTINGS.collectionLayout,a=r.rows||e.DEFAULT_SETTINGS.collectionRows,s=r.columns||e.DEFAULT_SETTINGS.collectionColumns,c=r.tileSize||e.DEFAULT_SETTINGS.collectionTileSize,l=r.tileMargin||e.DEFAULT_SETTINGS.collectionTileMargin,u=c+l,h;!r.rows&&s?h=s:h=Math.ceil(this._items.length/a);var f=0,v=0,_,d,g,y,S;this.setAutoRefigureSizes(!1);for(var P=0;P<this._items.length;P++)P&&P%h===0&&(o==="horizontal"?(v+=u,f=0):(f+=u,v=0)),_=this._items[P],d=_.getBounds(),d.width>d.height?g=c:g=c*(d.width/d.height),y=g*(d.height/d.width),S=new e.Point(f+(c-g)/2,v+(c-y)/2),_.setPosition(S,n),_.setWidth(g,n),o==="horizontal"?f+=u:v+=u;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var r=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,o=this._contentFactor||0;if(!this._items.length)this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;else{var a=this._items[0],s=a.getBounds();this._contentFactor=a.getContentSize().x/s.width;for(var c=a.getClippedBounds().getBoundingBox(),l=c.x,u=c.y,h=c.x+c.width,f=c.y+c.height,v=1;v<this._items.length;v++)a=this._items[v],s=a.getBounds(),this._contentFactor=Math.max(this._contentFactor,a.getContentSize().x/s.width),c=a.getClippedBounds().getBoundingBox(),l=Math.min(l,c.x),u=Math.min(u,c.y),h=Math.max(h,c.x+c.width),f=Math.max(f,c.y+c.height);this._homeBounds=new e.Rect(l,u,h-l,f-u),this._contentSize=new e.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==o||!this._homeBounds.equals(r)||!this._contentSize.equals(n))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(r){this.raiseEvent("remove-item",{item:r})}})})(t)})(Wo)),Wo.exports}var uh=b4();const y4=$e({__proto__:null,default:Ua(uh)},[uh])})();
|
|
100
|
+
`;let s=this._gl,c=this.constructor.initShaderProgram(s,o,a);s.useProgram(c),this._secondPass={shaderProgram:c,aOutputPosition:s.getAttribLocation(c,"a_output_position"),aTexturePosition:s.getAttribLocation(c,"a_texture_position"),uMatrix:s.getUniformLocation(c,"u_matrix"),uImage:s.getUniformLocation(c,"u_image"),uOpacityMultiplier:s.getUniformLocation(c,"u_opacity_multiplier"),bufferOutputPosition:s.createBuffer(),bufferTexturePosition:s.createBuffer()},s.bindBuffer(s.ARRAY_BUFFER,this._secondPass.bufferOutputPosition),s.bufferData(s.ARRAY_BUFFER,this._unitQuad,s.STATIC_DRAW),s.enableVertexAttribArray(this._secondPass.aOutputPosition),s.bindBuffer(s.ARRAY_BUFFER,this._secondPass.bufferTexturePosition),s.bufferData(s.ARRAY_BUFFER,this._unitQuad,s.DYNAMIC_DRAW),s.enableVertexAttribArray(this._secondPass.aTexturePosition);let l=e.Mat3.makeScaling(2,2).multiply(e.Mat3.makeTranslation(-.5,-.5));s.uniformMatrix3fv(this._secondPass.uMatrix,!1,l.values)}_resizeRenderer(){let o=this._gl,a=this._renderingCanvas.width,s=this._renderingCanvas.height;o.viewport(0,0,a,s),o.deleteTexture(this._renderToTexture),this._renderToTexture=o.createTexture(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._renderToTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,a,s,0,o.RGBA,o.UNSIGNED_BYTE,null),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this._textureFilter()),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.bindFramebuffer(o.FRAMEBUFFER,this._glFrameBuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,this._renderToTexture,0)}_setupCanvases(){let o=this;this._outputCanvas=this.canvas,this._outputContext=this._outputCanvas.getContext("2d"),this._renderingCanvas=document.createElement("canvas"),this._clippingCanvas=document.createElement("canvas"),this._clippingContext=this._clippingCanvas.getContext("2d"),this._renderingCanvas.width=this._clippingCanvas.width=this._outputCanvas.width,this._renderingCanvas.height=this._clippingCanvas.height=this._outputCanvas.height,this._gl=this._renderingCanvas.getContext("webgl"),this._resizeHandler=function(){o._outputCanvas!==o.viewer.drawer.canvas&&(o._outputCanvas.style.width=o.viewer.drawer.canvas.clientWidth+"px",o._outputCanvas.style.height=o.viewer.drawer.canvas.clientHeight+"px");let a=o._calculateCanvasSize();(o._outputCanvas.width!==a.x||o._outputCanvas.height!==a.y)&&(o._outputCanvas.width=a.x,o._outputCanvas.height=a.y),o._renderingCanvas.style.width=o._outputCanvas.clientWidth+"px",o._renderingCanvas.style.height=o._outputCanvas.clientHeight+"px",o._renderingCanvas.width=o._clippingCanvas.width=o._outputCanvas.width,o._renderingCanvas.height=o._clippingCanvas.height=o._outputCanvas.height,o._resizeRenderer()},this.viewer.addHandler("resize",this._resizeHandler)}_makeQuadVertexBuffer(o,a,s,c){return new Float32Array([o,c,a,c,o,s,o,s,a,c,a,s])}_tileReadyHandler(o){let a=o.tile,s=o.tiledImage;if(s.isTainted())return;let c=a.getCanvasContext(),l=c&&c.canvas;if(!l||e.isCanvasTainted(l)){s.isTainted()||(s.setTainted(!0),e.console.warn("WebGL cannot be used to draw this TiledImage because it has tainted data. Does crossOriginPolicy need to be set?"),this._raiseDrawerErrorEvent(s,"Tainted data cannot be used by the WebGLDrawer. Falling back to CanvasDrawer for this TiledImage."));return}if(!this._TextureMap.get(l)){let h=this._gl,f=h.createTexture(),v,_=s.source.tileOverlap,d,g;if(a.sourceBounds?(d=Math.min(a.sourceBounds.width,l.width)/l.width,g=Math.min(a.sourceBounds.height,l.height)/l.height):(d=1,g=1),_>0){let S=this._calculateOverlapFraction(a,s),P=(a.x===0?0:S.x)*d,E=(a.y===0?0:S.y)*g,R=(a.isRightMost?1:1-S.x)*d,F=(a.isBottomMost?1:1-S.y)*g;v=this._makeQuadVertexBuffer(P,R,E,F)}else d===1&&g===1?v=this._unitQuad:v=this._makeQuadVertexBuffer(0,d,0,g);let b={texture:f,position:v};this._TextureMap.set(l,b),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,f),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,this._textureFilter()),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,this._textureFilter()),this._uploadImageData(c)}}_calculateOverlapFraction(o,a){let s=a.source.tileOverlap,c=o.sourceBounds.width,l=o.sourceBounds.height,u=(o.x===0?0:s)+(o.isRightMost?0:s),h=(o.y===0?0:s)+(o.isBottomMost?0:s),f=s/(c+u),v=s/(l+h);return{x:f,y:v}}_unloadTextures(){Array.from(this._TextureMap.keys()).forEach(a=>{this._cleanupImageData(a)})}_uploadImageData(o){let a=this._gl,s=o.canvas;try{if(!s)throw o;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,s)}catch(c){e.console.error("Error uploading image data to WebGL",c)}}_imageUnloadedHandler(o){let a=o.context2D.canvas;this._cleanupImageData(a)}_cleanupImageData(o){let a=this._TextureMap.get(o);this._TextureMap.delete(o),a&&this._gl.deleteTexture(a.texture)}_setClip(){}_renderToClippingCanvas(o){if(this._clippingContext.clearRect(0,0,this._clippingCanvas.width,this._clippingCanvas.height),this._clippingContext.save(),this.viewer.viewport.getFlip()){const a=new e.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(a.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-a.x,0)}if(o._clip){let s=[{x:o._clip.x,y:o._clip.y},{x:o._clip.x+o._clip.width,y:o._clip.y},{x:o._clip.x+o._clip.width,y:o._clip.y+o._clip.height},{x:o._clip.x,y:o._clip.y+o._clip.height}].map(c=>{let l=o.imageToViewportCoordinates(c.x,c.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(l)});this._clippingContext.beginPath(),s.forEach((c,l)=>{this._clippingContext[l===0?"moveTo":"lineTo"](c.x,c.y)}),this._clippingContext.clip(),this._setClip()}if(o._croppingPolygons){let a=o._croppingPolygons.map(s=>s.map(c=>{let l=o.imageToViewportCoordinates(c.x,c.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(l)}));this._clippingContext.beginPath(),a.forEach(s=>{s.forEach((c,l)=>{this._clippingContext[l===0?"moveTo":"lineTo"](c.x,c.y)})}),this._clippingContext.clip()}if(this.viewer.viewport.getFlip()){const a=new e.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(a.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-a.x,0)}this._clippingContext.drawImage(this._renderingCanvas,0,0),this._clippingContext.restore()}_setRotations(o){var a=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),saveContext:a}),a=!1),o.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:o.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(o._getRotationPoint(!0),!0),saveContext:a})}_offsetForRotation(o){var a=o.point?o.point.times(e.pixelDensityRatio):this._getCanvasCenter(),s=this._outputContext;s.save(),s.translate(a.x,a.y),s.rotate(Math.PI/180*o.degrees),s.translate(-a.x,-a.y)}_flip(o){o=o||{};var a=o.point?o.point.times(e.pixelDensityRatio):this._getCanvasCenter(),s=this._outputContext;s.translate(a.x,0),s.scale(-1,1),s.translate(-a.x,0)}_drawDebugInfo(o,a,s){for(var c=o.length-1;c>=0;c--){var l=o[c].tile;try{this._drawDebugInfoOnTile(l,o.length,c,a,s)}catch(u){e.console.error(u)}}}_drawDebugInfoOnTile(o,a,s,c,l){var u=this.viewer.world.getIndexOfItem(c)%this.debugGridColor.length,h=this.context;h.save(),h.lineWidth=2*e.pixelDensityRatio,h.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",h.strokeStyle=this.debugGridColor[u],h.fillStyle=this.debugGridColor[u],this._setRotations(c),l&&this._flip({point:o.position.plus(o.size.divide(2))}),h.strokeRect(o.position.x*e.pixelDensityRatio,o.position.y*e.pixelDensityRatio,o.size.x*e.pixelDensityRatio,o.size.y*e.pixelDensityRatio);var f=(o.position.x+o.size.x/2)*e.pixelDensityRatio,v=(o.position.y+o.size.y/2)*e.pixelDensityRatio;h.translate(f,v);const _=this.viewport.getRotation(!0);h.rotate(Math.PI/180*-_),h.translate(-f,-v),o.x===0&&o.y===0&&(h.fillText("Zoom: "+this.viewport.getZoom(),o.position.x*e.pixelDensityRatio,(o.position.y-30)*e.pixelDensityRatio),h.fillText("Pan: "+this.viewport.getBounds().toString(),o.position.x*e.pixelDensityRatio,(o.position.y-20)*e.pixelDensityRatio)),h.fillText("Level: "+o.level,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+20)*e.pixelDensityRatio),h.fillText("Column: "+o.x,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+30)*e.pixelDensityRatio),h.fillText("Row: "+o.y,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+40)*e.pixelDensityRatio),h.fillText("Order: "+s+" of "+a,(o.position.x+10)*e.pixelDensityRatio,(o.position.y+50)*e.pixelDensityRatio),h.fillText("Size: "+o.size.toString(),(o.position.x+10)*e.pixelDensityRatio,(o.position.y+60)*e.pixelDensityRatio),h.fillText("Position: "+o.position.toString(),(o.position.x+10)*e.pixelDensityRatio,(o.position.y+70)*e.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),c.getRotation(!0)%360!==0&&this._restoreRotationChanges(),h.restore()}_drawPlaceholder(o){const a=o.getBounds(!0),s=this.viewportToDrawerRectangle(o.getBounds(!0)),c=this._outputContext;let l;typeof o.placeholderFillStyle=="function"?l=o.placeholderFillStyle(o,c):l=o.placeholderFillStyle,this._offsetForRotation({degrees:this.viewer.viewport.getRotation(!0)}),c.fillStyle=l,c.translate(s.x,s.y),c.rotate(Math.PI/180*a.degrees),c.translate(-s.x,-s.y),c.fillRect(s.x,s.y,s.width,s.height),this._restoreRotationChanges()}_getCanvasCenter(){return new e.Point(this.canvas.width/2,this.canvas.height/2)}_restoreRotationChanges(){var o=this._outputContext;o.restore()}static initShaderProgram(o,a,s){function c(f,v,_){const d=f.createShader(v);return f.shaderSource(d,_),f.compileShader(d),f.getShaderParameter(d,f.COMPILE_STATUS)?d:(e.console.error(`An error occurred compiling the shaders: ${f.getShaderInfoLog(d)}`),f.deleteShader(d),null)}const l=c(o,o.VERTEX_SHADER,a),u=c(o,o.FRAGMENT_SHADER,s),h=o.createProgram();return o.attachShader(h,l),o.attachShader(h,u),o.linkProgram(h),o.getProgramParameter(h,o.LINK_STATUS)?h:(e.console.error(`Unable to initialize the shader program: ${o.getProgramInfoLog(h)}`),null)}}})(t),(function(e){e.Viewport=function(r){var n=arguments;n.length&&n[0]instanceof e.Point&&(r={containerSize:n[0],contentSize:n[1],config:n[2]}),r.config&&(e.extend(!0,r,r.config),delete r.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},r.margins||{}),delete r.margins,r.initialDegrees=r.degrees,delete r.degrees,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot: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,initialDegrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:e.DEFAULT_SETTINGS.silenceMultiImageWarnings},r),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.degreesSpring=new e.Spring({initial:r.initialDegrees,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._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={get degrees(){return e.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(r){e.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(r)},resetContentSize:function(r){return e.console.assert(r,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(r instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(r.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(r.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,r.y/r.x),r.x),this},setHomeBounds:function(r,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(r,n)},_setContentBounds:function(r,n){e.console.assert(r,"[Viewport._setContentBounds] bounds is required"),e.console.assert(r instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(r.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(r.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=r.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=r.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var r=this._contentAspectRatio/this.getAspectRatio(),n;return this.homeFillsViewer?n=r>=1?r:1:n=r>=1?1:r,n/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var r=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),o=n/this.getAspectRatio();return new e.Rect(r.x-n/2,r.y-o/2,n,o)},goHome:function(r){return this.viewer&&this.viewer.raiseEvent("home",{immediately:r}),this.fitBounds(this.getHomeBounds(),r)},getMinZoom:function(){var r=this.getHomeZoom(),n=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*r;return n},getMaxZoom:function(){var r=this.maxZoomLevel;return r||(r=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,r/=this._contentBounds.width),Math.max(r,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(r){e.console.assert(e.type(r)==="object","[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},r),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(-this.getRotation(r))},getBoundsNoRotate:function(r){var n=this.getCenter(r),o=1/this.getZoom(r),a=o/this.getAspectRatio();return new e.Rect(n.x-o/2,n.y-a/2,o,a)},getBoundsWithMargins:function(r){return this.getBoundsNoRotateWithMargins(r).rotate(-this.getRotation(r),this.getCenter(r))},getBoundsNoRotateWithMargins:function(r){var n=this.getBoundsNoRotate(r),o=this._containerInnerSize.x*this.getZoom(r);return n.x-=this._margins.left/o,n.y-=this._margins.top/o,n.width+=(this._margins.left+this._margins.right)/o,n.height+=(this._margins.top+this._margins.bottom)/o,n},getCenter:function(r){var n=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),o=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),a,s,c,l,u,h,f,v;return r?n:this.zoomPoint?(a=this.pixelFromPoint(this.zoomPoint,!0),s=this.getZoom(),c=1/s,l=c/this.getAspectRatio(),u=new e.Rect(n.x-c/2,n.y-l/2,c,l),h=this._pixelFromPoint(this.zoomPoint,u),f=h.minus(a).rotate(-this.getRotation(!0)),v=f.divide(this._containerInnerSize.x*s),o.plus(v)):o},getZoom:function(r){return r?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(r){return Math.max(Math.min(r,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(r){var n=this.viewportToViewerElementRectangle(r).getBoundingBox(),o=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),a=!1,s=!1;if(!this.wrapHorizontal){var c=n.x+n.width,l=o.x+o.width,u,h,f;n.width>o.width?u=this.visibilityRatio*o.width:u=this.visibilityRatio*n.width,h=o.x-c+u,f=l-n.x-u,u>o.width?(n.x+=(h+f)/2,a=!0):f<0?(n.x+=f,a=!0):h>0&&(n.x+=h,a=!0)}if(!this.wrapVertical){var v=n.y+n.height,_=o.y+o.height,d,g,b;n.height>o.height?d=this.visibilityRatio*o.height:d=this.visibilityRatio*n.height,g=o.y-v+d,b=_-n.y-d,d>o.height?(n.y+=(g+b)/2,s=!0):b<0?(n.y+=b,s=!0):g>0&&(n.y+=g,s=!0)}var S=a||s,P=S?this.viewerElementToViewportRectangle(n):r.clone();return P.xConstrained=a,P.yConstrained=s,P.constraintApplied=S,P},_raiseConstraintsEvent:function(r){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:r})},applyConstraints:function(r){var n=this.getZoom(),o=this._applyZoomConstraints(n);n!==o&&this.zoomTo(o,this.zoomPoint,r);var a=this.getConstrainedBounds(!1);return a.constraintApplied&&(this.fitBounds(a,r),this._raiseConstraintsEvent(r)),this},ensureVisible:function(r){return this.applyConstraints(r)},_fitBounds:function(r,n){n=n||{};var o=n.immediately||!1,a=n.constraints||!1,s=this.getAspectRatio(),c=r.getCenter(),l=new e.Rect(r.x,r.y,r.width,r.height,r.degrees+this.getRotation()).getBoundingBox();l.getAspectRatio()>=s?l.height=l.width/s:l.width=l.height*s,l.x=c.x-l.width/2,l.y=c.y-l.height/2;var u=1/l.width;if(o)return this.panTo(c,!0),this.zoomTo(u,null,!0),a&&this.applyConstraints(!0),this;var h=this.getCenter(!0),f=this.getZoom(!0);this.panTo(h,!0),this.zoomTo(f,null,!0);var v=this.getBounds(),_=this.getZoom();if(_===0||Math.abs(u/_-1)<1e-8)return this.zoomTo(u,null,!0),this.panTo(c,o),a&&this.applyConstraints(!1),this;if(a){this.panTo(c,!1),u=this._applyZoomConstraints(u),this.zoomTo(u,null,!1);var d=this.getConstrainedBounds();this.panTo(h,!0),this.zoomTo(f,null,!0),this.fitBounds(d)}else{var g=l.rotate(-this.getRotation()),b=g.getTopLeft().times(u).minus(v.getTopLeft().times(_)).divide(u-_);this.zoomTo(u,b,o)}return this},fitBounds:function(r,n){return this._fitBounds(r,{immediately:n,constraints:!1})},fitBoundsWithConstraints:function(r,n){return this._fitBounds(r,{immediately:n,constraints:!0})},fitVertically:function(r){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,r)},fitHorizontally:function(r){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,r)},getConstrainedBounds:function(r){var n,o;return n=this.getBounds(r),o=this._applyBoundaryConstraints(n),o},panBy:function(r,n){var o=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(o.plus(r),n)},panTo:function(r,n){return n?(this.centerSpringX.resetTo(r.x),this.centerSpringY.resetTo(r.y)):(this.centerSpringX.springTo(r.x),this.centerSpringY.springTo(r.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:r,immediately:n}),this},zoomBy:function(r,n,o){return this.zoomTo(this.zoomSpring.target.value*r,n,o)},zoomTo:function(r,n,o){var a=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,o?this._adjustCenterSpringsForZoomPoint(function(){a.zoomSpring.resetTo(r)}):this.zoomSpring.springTo(r),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:r,refPoint:n,immediately:o}),this},setRotation:function(r,n){return this.rotateTo(r,null,n)},getRotation:function(r){return r?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(r,n,o){return this.rotateTo(r,n,o)},rotateTo:function(r,n,o){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===r&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,o)if(this.rotationPivot){var a=r-this._oldDegrees;if(!a)return this.rotationPivot=null,this;this._rotateAboutPivot(r)}else this.degreesSpring.resetTo(r);else{var s=e.positiveModulo(this.degreesSpring.current.value,360),c=e.positiveModulo(r,360),l=c-s;l>180?c-=360:l<-180&&(c+=360);var u=s-c;this.degreesSpring.resetTo(r+u),this.degreesSpring.springTo(r)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:r,immediately:!!o,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(r,n,o){return this.rotateTo(this.degreesSpring.target.value+r,n,o)},resize:function(r,n){var o=this.getBoundsNoRotate(),a=o,s;this.containerSize.x=r.x,this.containerSize.y=r.y,this._updateContainerInnerSize(),n&&(s=r.x/this.containerSize.x,a.width=o.width*s,a.height=a.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:r,maintain:n});var c=this.fitBounds(a,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:r,maintain:n}),c},_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 r=this;this._adjustCenterSpringsForZoomPoint(function(){r.zoomSpring.update()}),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var n=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value;var o=n||!this.zoomSpring.isAtTargetValue()||!this.centerSpringX.isAtTargetValue()||!this.centerSpringY.isAtTargetValue()||!this.degreesSpring.isAtTargetValue();return o},_rotateAboutPivot:function(r){var n=r===!0,o=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(o.x),this.centerSpringY.shiftBy(o.y),n?this.degreesSpring.update():this.degreesSpring.resetTo(r);var a=this.degreesSpring.current.value-this._oldDegrees,s=o.rotate(a*-1).times(-1);this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y)},_adjustCenterSpringsForZoomPoint:function(r){if(this.zoomPoint){var n=this.pixelFromPoint(this.zoomPoint,!0);r();var o=this.pixelFromPoint(this.zoomPoint,!0),a=o.minus(n),s=this.deltaPointsFromPixels(a,!0);this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else r()},deltaPixelsFromPointsNoRotate:function(r,n){return r.times(this._containerInnerSize.x*this.getZoom(n))},deltaPixelsFromPoints:function(r,n){return this.deltaPixelsFromPointsNoRotate(r.rotate(this.getRotation(n)),n)},deltaPointsFromPixelsNoRotate:function(r,n){return r.divide(this._containerInnerSize.x*this.getZoom(n))},deltaPointsFromPixels:function(r,n){return this.deltaPointsFromPixelsNoRotate(r,n).rotate(-this.getRotation(n))},pixelFromPointNoRotate:function(r,n){return this._pixelFromPointNoRotate(r,this.getBoundsNoRotate(n))},pixelFromPoint:function(r,n){return this._pixelFromPoint(r,this.getBoundsNoRotate(n))},_pixelFromPointNoRotate:function(r,n){return r.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(r,n){return this._pixelFromPointNoRotate(r.rotate(this.getRotation(!0),this.getCenter(!0)),n)},pointFromPixelNoRotate:function(r,n){var o=this.getBoundsNoRotate(n);return r.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/o.width).plus(o.getTopLeft())},pointFromPixel:function(r,n){return this.pointFromPixelNoRotate(r,n).rotate(-this.getRotation(n),this.getCenter(n))},_viewportToImageDelta:function(r,n){var o=this._contentBoundsNoRotate.width;return new e.Point(r*this._contentSizeNoRotate.x/o,n*this._contentSizeNoRotate.x/o)},viewportToImageCoordinates:function(r,n){if(r instanceof e.Point)return this.viewportToImageCoordinates(r.x,r.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(o===1){var a=this.viewer.world.getItemAt(0);return a.viewportToImageCoordinates(r,n,!0)}}return this._viewportToImageDelta(r-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(r,n){var o=this._contentBoundsNoRotate.width;return new e.Point(r/this._contentSizeNoRotate.x*o,n/this._contentSizeNoRotate.x*o)},imageToViewportCoordinates:function(r,n){if(r instanceof e.Point)return this.imageToViewportCoordinates(r.x,r.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(o===1){var a=this.viewer.world.getItemAt(0);return a.imageToViewportCoordinates(r,n,!0)}}var s=this._imageToViewportDelta(r,n);return s.x+=this._contentBoundsNoRotate.x,s.y+=this._contentBoundsNoRotate.y,s},imageToViewportRectangle:function(r,n,o,a){var s=r;if(s instanceof e.Rect||(s=new e.Rect(r,n,o,a)),this.viewer){var c=this.viewer.world.getItemCount();if(c>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(c===1){var l=this.viewer.world.getItemAt(0);return l.imageToViewportRectangle(r,n,o,a,!0)}}var u=this.imageToViewportCoordinates(s.x,s.y),h=this._imageToViewportDelta(s.width,s.height);return new e.Rect(u.x,u.y,h.x,h.y,s.degrees)},viewportToImageRectangle:function(r,n,o,a){var s=r;if(s instanceof e.Rect||(s=new e.Rect(r,n,o,a)),this.viewer){var c=this.viewer.world.getItemCount();if(c>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(c===1){var l=this.viewer.world.getItemAt(0);return l.viewportToImageRectangle(r,n,o,a,!0)}}var u=this.viewportToImageCoordinates(s.x,s.y),h=this._viewportToImageDelta(s.width,s.height);return new e.Rect(u.x,u.y,h.x,h.y,s.degrees)},viewerElementToImageCoordinates:function(r){var n=this.pointFromPixel(r,!0);return this.viewportToImageCoordinates(n)},imageToViewerElementCoordinates:function(r){var n=this.imageToViewportCoordinates(r);return this.pixelFromPoint(n,!0)},windowToImageCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=r.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var n=this.imageToViewerElementCoordinates(r);return n.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(r){return this.pointFromPixel(r,!0)},viewportToViewerElementCoordinates:function(r){return this.pixelFromPoint(r,!0)},viewerElementToViewportRectangle:function(r){return e.Rect.fromSummits(this.pointFromPixel(r.getTopLeft(),!0),this.pointFromPixel(r.getTopRight(),!0),this.pointFromPixel(r.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(r){return e.Rect.fromSummits(this.pixelFromPoint(r.getTopLeft(),!0),this.pixelFromPoint(r.getTopRight(),!0),this.pixelFromPoint(r.getBottomLeft(),!0))},windowToViewportCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=r.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(r){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var n=this.viewportToViewerElementCoordinates(r);return n.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(r){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(n===1){var o=this.viewer.world.getItemAt(0);return o.viewportToImageZoom(r)}}var a=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,c=this._contentBoundsNoRotate.width,l=s/a*c;return r*l},imageToViewportZoom:function(r){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image. Instead, use [TiledImage.imageToViewportZoom] for the specific image of interest");else if(n===1){var o=this.viewer.world.getItemAt(0);return o.imageToViewportZoom(r)}}var a=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,c=this._contentBoundsNoRotate.width,l=a/s/c;return r*l},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(r){return this.flipped===r?this:(this.flipped=r,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:r}),this)},getMaxZoomPixelRatio:function(){return this.maxZoomPixelRatio},setMaxZoomPixelRatio:function(r,n=!0,o=!1){e.console.assert(!isNaN(r),"[Viewport.setMaxZoomPixelRatio] ratio must be a number"),!isNaN(r)&&(this.maxZoomPixelRatio=r,n&&this.getZoom()>this.getMaxZoom()&&this.applyConstraints(o))}}})(t),(function(e){e.TiledImage=function(r){this._initialized=!1,e.console.assert(r.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(r.drawer,"[TiledImage] options.drawer is required"),e.console.assert(r.viewer,"[TiledImage] options.viewer is required"),e.console.assert(r.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(r.source,"[TiledImage] options.source is required"),e.console.assert(!r.clip||r.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=r.tileCache,delete r.tileCache,this._drawer=r.drawer,delete r.drawer,this._imageLoader=r.imageLoader,delete r.imageLoader,r.clip instanceof e.Rect&&(this._clip=r.clip.clone()),delete r.clip;var n=r.x||0;delete r.x;var o=r.y||0;delete r.y,this.normHeight=r.source.dimensions.y/r.source.dimensions.x,this.contentAspectX=r.source.dimensions.x/r.source.dimensions.y;var a=1;r.width?(a=r.width,delete r.width,r.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete r.height)):r.height&&(a=r.height/this.normHeight,delete r.height);var s=r.fitBounds;delete r.fitBounds;var c=r.fitBoundsPlacement||t.Placement.CENTER;delete r.fitBoundsPlacement;var l=r.degrees||0;delete r.degrees;var u=r.ajaxHeaders;delete r.ajaxHeaders,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_needsDraw:!0,_needsUpdate:!0,_hasOpaqueTile:!1,_tilesLoading:0,_tilesToDraw:[],_lastDrawn:[],_isBlending:!1,_wasBlending:!1,_isTainted:!1,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:e.DEFAULT_SETTINGS.subPixelRoundingForTransparency,maxTilesPerFrame:e.DEFAULT_SETTINGS.maxTilesPerFrame},r),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:a,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:l,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),s&&this.fitBounds(s,c,!0),this._ownAjaxHeaders={},this.setAjaxHeaders(u,!1),this._initialized=!0},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},redraw:function(){this._needsDraw=!0},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(r){r!==this._fullyLoaded&&(this._fullyLoaded=r,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(r){let n=this._xSpring.update(),o=this._ySpring.update(),a=this._scaleSpring.update(),s=this._degreesSpring.update(),c=n||o||a||s||this._needsUpdate;if(c||r||!this._fullyLoaded){let l=this._updateLevelsForViewport();this._setFullyLoaded(l)}return this._needsUpdate=!1,c?(this._updateForScale(),this._raiseBoundsChange(),this._needsDraw=!0,!0):!1},setDrawn:function(){return this._needsDraw=this._isBlending||this._wasBlending,this._needsDraw},setTainted(r){this._isTainted=r},isTainted(){return this._isTainted},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy(this.viewer)},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(this.getRotation(r),this._getRotationPoint(r))},getBoundsNoRotate:function(r){return r?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(r){var n=this.getBoundsNoRotate(r);if(this._clip){var o=r?this._worldWidthCurrent:this._worldWidthTarget,a=o/this.source.dimensions.x,s=this._clip.times(a);n=new e.Rect(n.x+s.x,n.y+s.y,s.width,s.height)}return n.rotate(this.getRotation(r),this._getRotationPoint(r))},getTileBounds:function(r,n,o){var a=this.source.getNumTiles(r),s=(a.x+n%a.x)%a.x,c=(a.y+o%a.y)%a.y,l=this.source.getTileBounds(r,s,c);return this.getFlip()&&(l.x=Math.max(0,1-l.x-l.width)),l.x+=(n-s)/a.x,l.y+=this._worldHeightCurrent/this._worldWidthCurrent*((o-c)/a.y),l},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var r=this.imageToWindowCoordinates(new e.Point(0,0)),n=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(n.x-r.x,n.y-r.y)},_viewportToImageDelta:function(r,n,o){var a=o?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(r*(this.source.dimensions.x/a),n*(this.source.dimensions.y*this.contentAspectX/a))},viewportToImageCoordinates:function(r,n,o){var a;return r instanceof e.Point?(o=n,a=r):a=new e.Point(r,n),a=a.rotate(-this.getRotation(o),this._getRotationPoint(o)),o?this._viewportToImageDelta(a.x-this._xSpring.current.value,a.y-this._ySpring.current.value):this._viewportToImageDelta(a.x-this._xSpring.target.value,a.y-this._ySpring.target.value)},_imageToViewportDelta:function(r,n,o){var a=o?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(r/this.source.dimensions.x*a,n/this.source.dimensions.y/this.contentAspectX*a)},imageToViewportCoordinates:function(r,n,o){r instanceof e.Point&&(o=n,n=r.y,r=r.x);var a=this._imageToViewportDelta(r,n,o);return o?(a.x+=this._xSpring.current.value,a.y+=this._ySpring.current.value):(a.x+=this._xSpring.target.value,a.y+=this._ySpring.target.value),a.rotate(this.getRotation(o),this._getRotationPoint(o))},imageToViewportRectangle:function(r,n,o,a,s){var c=r;c instanceof e.Rect?s=n:c=new e.Rect(r,n,o,a);var l=this.imageToViewportCoordinates(c.getTopLeft(),s),u=this._imageToViewportDelta(c.width,c.height,s);return new e.Rect(l.x,l.y,u.x,u.y,c.degrees+this.getRotation(s))},viewportToImageRectangle:function(r,n,o,a,s){var c=r;r instanceof e.Rect?s=n:c=new e.Rect(r,n,o,a);var l=this.viewportToImageCoordinates(c.getTopLeft(),s),u=this._viewportToImageDelta(c.width,c.height,s);return new e.Rect(l.x,l.y,u.x,u.y,c.degrees-this.getRotation(s))},viewerElementToImageCoordinates:function(r){var n=this.viewport.pointFromPixel(r,!0);return this.viewportToImageCoordinates(n)},imageToViewerElementCoordinates:function(r){var n=this.imageToViewportCoordinates(r);return this.viewport.pixelFromPoint(n,!0)},windowToImageCoordinates:function(r){var n=r.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(r){var n=this.imageToViewerElementCoordinates(r);return n.plus(t.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(r){var n=this._scaleSpring.current.value;return r=r.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((r.x-this._xSpring.current.value)/n,(r.y-this._ySpring.current.value)/n,r.width/n,r.height/n,r.degrees)},viewportToImageZoom:function(r){var n=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return n*r},imageToViewportZoom:function(r){var n=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return r/n},setPosition:function(r,n){var o=this._xSpring.target.value===r.x&&this._ySpring.target.value===r.y;if(n){if(o&&this._xSpring.current.value===r.x&&this._ySpring.current.value===r.y)return;this._xSpring.resetTo(r.x),this._ySpring.resetTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}else{if(o)return;this._xSpring.springTo(r.x),this._ySpring.springTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}o||this._raiseBoundsChange()},setWidth:function(r,n){this._setScale(r,n)},setHeight:function(r,n){this._setScale(r/this.normHeight,n)},setCroppingPolygons:function(r){var n=function(a){return a instanceof e.Point||typeof a.x=="number"&&typeof a.y=="number"},o=function(a){return a.map(function(s){try{if(n(s))return{x:s.x,y:s.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!e.isArray(r))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=r.map(function(a){return o(a)}),this._needsDraw=!0}catch(a){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(a),this.resetCroppingPolygons()}},resetCroppingPolygons:function(){this._croppingPolygons=null,this._needsDraw=!0},fitBounds:function(r,n,o){n=n||e.Placement.CENTER;var a=e.Placement.properties[n],s=this.contentAspectX,c=0,l=0,u=1,h=1;if(this._clip&&(s=this._clip.getAspectRatio(),u=this._clip.width/this.source.dimensions.x,h=this._clip.height/this.source.dimensions.y,r.getAspectRatio()>s?(c=this._clip.x/this._clip.height*r.height,l=this._clip.y/this._clip.height*r.height):(c=this._clip.x/this._clip.width*r.width,l=this._clip.y/this._clip.width*r.width)),r.getAspectRatio()>s){var f=r.height/h,v=0;a.isHorizontallyCentered?v=(r.width-r.height*s)/2:a.isRight&&(v=r.width-r.height*s),this.setPosition(new e.Point(r.x-c+v,r.y-l),o),this.setHeight(f,o)}else{var _=r.width/u,d=0;a.isVerticallyCentered?d=(r.height-r.width/s)/2:a.isBottom&&(d=r.height-r.width/s),this.setPosition(new e.Point(r.x-c,r.y-l+d),o),this.setWidth(_,o)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(r){e.console.assert(!r||r instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),r instanceof e.Rect?this._clip=r.clone():this._clip=null,this._needsUpdate=!0,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return this.flipped},setFlip:function(r){this.flipped=r},get flipped(){return this._flipped},set flipped(r){let n=this._flipped!==!!r;this._flipped=!!r,n&&(this.update(!0),this._needsDraw=!0,this._raiseBoundsChange())},get wrapHorizontal(){return this._wrapHorizontal},set wrapHorizontal(r){let n=this._wrapHorizontal!==!!r;this._wrapHorizontal=!!r,this._initialized&&n&&(this.update(!0),this._needsDraw=!0)},get wrapVertical(){return this._wrapVertical},set wrapVertical(r){let n=this._wrapVertical!==!!r;this._wrapVertical=!!r,this._initialized&&n&&(this.update(!0),this._needsDraw=!0)},get debugMode(){return this._debugMode},set debugMode(r){this._debugMode=!!r,this._needsDraw=!0},getOpacity:function(){return this.opacity},setOpacity:function(r){this.opacity=r},get opacity(){return this._opacity},set opacity(r){r!==this.opacity&&(this._opacity=r,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(r){this._preload=!!r,this._needsDraw=!0},getRotation:function(r){return r?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(r,n){this._degreesSpring.target.value===r&&this._degreesSpring.isAtTargetValue()||(n?this._degreesSpring.resetTo(r):this._degreesSpring.springTo(r),this._needsDraw=!0,this._needsUpdate=!0,this._raiseBoundsChange())},getDrawArea:function(){if(this._opacity===0&&!this._preload)return!1;var r=this._viewportToTiledImageRectangle(this.viewport.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var n=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));r=r.intersection(n)}return r},getTilesToDraw:function(){let r=this._tilesToDraw.flat();return this._updateTilesInViewport(r),r=this._tilesToDraw.flat(),r.forEach(n=>{n.tile.beingDrawn=!0}),this._lastDrawn=r,r},_getRotationPoint:function(r){return this.getBoundsNoRotate(r).getCenter()},get compositeOperation(){return this._compositeOperation},set compositeOperation(r){r!==this._compositeOperation&&(this._compositeOperation=r,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this._compositeOperation}))},getCompositeOperation:function(){return this._compositeOperation},setCompositeOperation:function(r){this.compositeOperation=r},setAjaxHeaders:function(r,n){if(r===null&&(r={}),!e.isPlainObject(r)){console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}this._ownAjaxHeaders=r,this._updateAjaxHeaders(n)},_updateAjaxHeaders:function(r){if(r===void 0&&(r=!0),e.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=e.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,r){var n,o,a,s;for(var c in this.tilesMatrix){n=this.source.getNumTiles(c);for(var l in this.tilesMatrix[c]){o=(n.x+l%n.x)%n.x;for(var u in this.tilesMatrix[c][l])if(a=(n.y+u%n.y)%n.y,s=this.tilesMatrix[c][l][u],s.loadWithAjax=this.loadTilesWithAjax,s.loadWithAjax){var h=this.source.getTileAjaxHeaders(c,o,a);s.ajaxHeaders=e.extend({},this.ajaxHeaders,h)}else s.ajaxHeaders=null}}for(var f=0;f<this._imageLoader.jobQueue.length;f++){var v=this._imageLoader.jobQueue[f];v.loadWithAjax=v.tile.loadWithAjax,v.ajaxHeaders=v.tile.loadWithAjax?v.tile.ajaxHeaders:null}}},_setScale:function(r,n){var o=this._scaleSpring.target.value===r;if(n){if(o&&this._scaleSpring.current.value===r)return;this._scaleSpring.resetTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}else{if(o)return;this._scaleSpring.springTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}o||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 r=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),n=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,o=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(n/this.minPixelRatio)/Math.log(2))));return o=Math.max(o,this.source.minLevel||0),r=Math.min(r,o),{lowestLevel:r,highestLevel:o}},_updateLevelsForViewport:function(){var r=this._getLevelsInterval(),n=r.lowestLevel,o=r.highestLevel,a=[],s=this.getDrawArea(),c=e.now();if(this._lastDrawn.forEach(R=>{R.tile.beingDrawn=!1}),this._tilesToDraw=[],this._tilesLoading=0,this.loadingCoverage={},!s)return this._needsDraw=!1,this._fullyLoaded;var l=new Array(o-n+1);for(let R=0,F=o;F>=n;F--,R++)l[R]=F;for(let R=o+1;R<=this.source.maxLevel;R++){var u=this.tilesMatrix[R]&&this.tilesMatrix[R][0]&&this.tilesMatrix[R][0][0];if(u&&u.isBottomMost&&u.isRightMost&&u.loaded){l.push(R);break}}let h=!1;for(let R=0;R<l.length;R++){let F=l[R];var f=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(F),!0).x*this._scaleSpring.current.value;if(R===l.length-1||f>=this.minPixelRatio)h=!0;else if(!h)continue;var v=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(F),!1).x*this._scaleSpring.current.value,_=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,d=this.immediateRender?1:_,g=Math.min(1,(f-.5)/.5),b=d/Math.abs(d-v),S=this._updateLevel(F,g,b,s,c,a);a=S.bestTiles;var P=S.updatedTiles.filter(Z=>Z.loaded),E=(function(Z,z,M){return function(O){return{tile:O,level:Z,levelOpacity:z,currentTime:M}}})(F,g,c);if(this._tilesToDraw[F]=P.map(E),this._providesCoverage(this.coverage,F))break}return a&&a.length>0?(a.forEach(function(R){R&&!R.context2D&&this._loadTile(R,c)},this),this._needsDraw=!0,!1):this._tilesLoading===0},_updateTilesInViewport:function(r){let n=e.now(),o=this;this._tilesLoading=0,this._wasBlending=this._isBlending,this._isBlending=!1,this.loadingCoverage={};let a=r.length?r[0].level:0;if(!this.getDrawArea())return;function c(u){let h=u.tile;if(h&&h.loaded){let f=o._blendTile(h,h.x,h.y,u.level,u.levelOpacity,n,a);o._isBlending=o._isBlending||f,o._needsDraw=o._needsDraw||f||o._wasBlending}}let l=0;for(let u=0;u<r.length;u++){let h=r[u];c(h),this._providesCoverage(this.coverage,h.level)&&(l=Math.max(l,h.level))}if(l>0)for(let u in this._tilesToDraw)u<l&&delete this._tilesToDraw[u]},_blendTile:function(r,n,o,a,s,c,l){let u=1e3*this.blendTime,h,f;return r.blendStart||(r.blendStart=c),h=c-r.blendStart,f=u?Math.min(1,h/u):1,a===l&&(f=1,h=u),this.alwaysBlend&&(f*=s),r.opacity=f,f===1&&(this._setCoverage(this.coverage,a,n,o,!0),this._hasOpaqueTile=!0),h<u},_updateLevel:function(r,n,o,a,s,c){var l=a.getBoundingBox().getTopLeft(),u=a.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:!0,level:r,opacity:n,visibility:o,drawArea:a,topleft:l,bottomright:u,currenttime:s,best:c}),this._resetCoverage(this.coverage,r),this._resetCoverage(this.loadingCoverage,r);var h=this._getCornerTiles(r,l,u),f=h.topLeft,v=h.bottomRight,_=this.source.getNumTiles(r),d=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(v.x+=1,this.wrapHorizontal||(v.x=Math.min(v.x,_.x-1)));for(var g=Math.max(0,(v.x-f.x)*(v.y-f.y)),b=new Array(g),S=0,P=f.x;P<=v.x;P++)for(var E=f.y;E<=v.y;E++){var R;if(this.getFlip()){var F=(_.x+P%_.x)%_.x;R=P+_.x-F-F-1}else R=P;if(a.intersection(this.getTileBounds(r,R,E))!==null){var Z=this._updateTile(R,E,r,o,d,_,s,c);c=Z.bestTiles,b[S]=Z.tile,S+=1}}return{bestTiles:c,updatedTiles:b}},_positionTile:function(r,n,o,a,s){var c=r.bounds.getTopLeft();c.x*=this._scaleSpring.current.value,c.y*=this._scaleSpring.current.value,c.x+=this._xSpring.current.value,c.y+=this._ySpring.current.value;var l=r.bounds.getSize();l.x*=this._scaleSpring.current.value,l.y*=this._scaleSpring.current.value,r.positionedBounds.x=c.x,r.positionedBounds.y=c.y,r.positionedBounds.width=l.x,r.positionedBounds.height=l.y;var u=o.pixelFromPointNoRotate(c,!0),h=o.pixelFromPointNoRotate(c,!1),f=o.deltaPixelsFromPointsNoRotate(l,!0),v=o.deltaPixelsFromPointsNoRotate(l,!1),_=h.plus(v.divide(2)),d=a.squaredDistanceTo(_);this.viewer.drawer.minimumOverlapRequired(this)&&(n||(f=f.plus(new e.Point(1,1))),r.isRightMost&&this.wrapHorizontal&&(f.x+=.75),r.isBottomMost&&this.wrapVertical&&(f.y+=.75)),r.position=u,r.size=f,r.squaredDistance=d,r.visibility=s},_updateTile:function(r,n,o,a,s,c,l,u){var h=this._getTile(r,n,o,l,c);this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:h}),this._setCoverage(this.coverage,o,r,n,!1);var f=h.loaded||h.loading||this._isCovered(this.loadingCoverage,o,r,n);if(this._setCoverage(this.loadingCoverage,o,r,n,f),!h.exists)return{bestTiles:u,tile:h};if(h.loaded&&h.opacity===1&&this._setCoverage(this.coverage,o,r,n,!0),this._positionTile(h,this.source.tileOverlap,this.viewport,s,a),!h.loaded)if(h.context2D)this._setTileLoaded(h);else{var v=this._tileCache.getImageRecord(h.cacheKey);v&&this._setTileLoaded(h,v.getData())}return h.loading?this._tilesLoading++:f||(u=this._compareTiles(u,h,this.maxTilesPerFrame)),{bestTiles:u,tile:h}},_getCornerTiles:function(r,n,o){var a,s;this.wrapHorizontal?(a=e.positiveModulo(n.x,1),s=e.positiveModulo(o.x,1)):(a=Math.max(0,n.x),s=Math.min(1,o.x));var c,l,u=1/this.source.aspectRatio;this.wrapVertical?(c=e.positiveModulo(n.y,u),l=e.positiveModulo(o.y,u)):(c=Math.max(0,n.y),l=Math.min(u,o.y));var h=this.source.getTileAtPoint(r,new e.Point(a,c)),f=this.source.getTileAtPoint(r,new e.Point(s,l)),v=this.source.getNumTiles(r);return this.wrapHorizontal&&(h.x+=v.x*Math.floor(n.x),f.x+=v.x*Math.floor(o.x)),this.wrapVertical&&(h.y+=v.y*Math.floor(n.y/u),f.y+=v.y*Math.floor(o.y/u)),{topLeft:h,bottomRight:f}},_getTile:function(r,n,o,a,s){var c,l,u,h,f,v,_,d,g,b,S=this.tilesMatrix,P=this.source;return S[o]||(S[o]={}),S[o][r]||(S[o][r]={}),(!S[o][r][n]||!S[o][r][n].flipped!=!this.flipped)&&(c=(s.x+r%s.x)%s.x,l=(s.y+n%s.y)%s.y,u=this.getTileBounds(o,r,n),h=P.getTileBounds(o,c,l,!0),f=P.tileExists(o,c,l),v=P.getTileUrl(o,c,l),_=P.getTilePostData(o,c,l),this.loadTilesWithAjax?(d=P.getTileAjaxHeaders(o,c,l),e.isPlainObject(this.ajaxHeaders)&&(d=e.extend({},this.ajaxHeaders,d))):d=null,g=P.getContext2D?P.getContext2D(o,c,l):void 0,b=new e.Tile(o,r,n,u,f,v,g,this.loadTilesWithAjax,d,h,_,P.getTileHashKey(o,c,l,v,d,_)),this.getFlip()?c===0&&(b.isRightMost=!0):c===s.x-1&&(b.isRightMost=!0),l===s.y-1&&(b.isBottomMost=!0),b.flipped=this.flipped,S[o][r][n]=b),b=S[o][r][n],b.lastTouchTime=a,b},_loadTile:function(r,n){var o=this;r.loading=!0,this._imageLoader.addJob({src:r.getUrl(),tile:r,source:this.source,postData:r.postData,loadWithAjax:r.loadWithAjax,ajaxHeaders:r.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(a,s,c){o._onTileLoad(r,n,a,s,c)},abort:function(){r.loading=!1}})},_onTileLoad:function(r,n,o,a,s){if(o)r.exists=!0;else{e.console.error("Tile %s failed to load: %s - error: %s",r,r.getUrl(),a),this.viewer.raiseEvent("tile-load-failed",{tile:r,tiledImage:this,time:n,message:a,tileRequest:s}),r.loading=!1,r.exists=!1;return}if(n<this.lastResetTime){e.console.warn("Ignoring tile %s loaded before reset: %s",r,r.getUrl()),r.loading=!1;return}var c=this,l=function(){var u=c.source,h=u.getClosestLevel();c._setTileLoaded(r,o,h,s)};l()},_setTileLoaded:function(r,n,o,a){var s=0,c=!1,l=this;function u(){return c&&e.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),s++,h}function h(){s--,s===0&&(r.loading=!1,r.loaded=!0,r.hasTransparency=l.source.hasTransparency(r.context2D,r.getUrl(),r.ajaxHeaders,r.postData),r.context2D||l._tileCache.cacheTile({data:n,tile:r,cutoff:o,tiledImage:l}),l.viewer.raiseEvent("tile-ready",{tile:r,tiledImage:l,tileRequest:a}),l._needsDraw=!0)}var f=u();this.viewer.raiseEvent("tile-loaded",{tile:r,tiledImage:this,tileRequest:a,get image(){return e.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),n},data:n,getCompletionCallback:u}),c=!0,f()},_compareTiles:function(r,n,o){return r?(r.push(n),this._sortTiles(r),r.length>o&&r.pop(),r):[n]},_sortTiles:function(r){r.sort(function(n,o){return n===null?1:o===null?-1:n.visibility===o.visibility?n.squaredDistance-o.squaredDistance:o.visibility-n.visibility})},_providesCoverage:function(r,n,o,a){var s,c,l,u;if(!r[n])return!1;if(o===void 0||a===void 0){s=r[n];for(l in s)if(Object.prototype.hasOwnProperty.call(s,l)){c=s[l];for(u in c)if(Object.prototype.hasOwnProperty.call(c,u)&&!c[u])return!1}return!0}return r[n][o]===void 0||r[n][o][a]===void 0||r[n][o][a]===!0},_isCovered:function(r,n,o,a){return o===void 0||a===void 0?this._providesCoverage(r,n+1):this._providesCoverage(r,n+1,2*o,2*a)&&this._providesCoverage(r,n+1,2*o,2*a+1)&&this._providesCoverage(r,n+1,2*o+1,2*a)&&this._providesCoverage(r,n+1,2*o+1,2*a+1)},_setCoverage:function(r,n,o,a,s){if(!r[n]){e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n);return}r[n][o]||(r[n][o]={}),r[n][o][a]=s},_resetCoverage:function(r,n){r[n]={}}})})(t),(function(e){var r=function(o){e.console.assert(o,"[TileCache.cacheTile] options is required"),e.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=o.tile,this.tiledImage=o.tiledImage},n=function(o){e.console.assert(o,"[ImageRecord] options is required"),e.console.assert(o.data,"[ImageRecord] options.data is required"),this._tiles=[],o.create.apply(null,[this,o.data,o.ownerTile]),this._destroyImplementation=o.destroy.bind(null,this),this.getImage=o.getImage.bind(null,this),this.getData=o.getData.bind(null,this),this.getRenderedContext=o.getRenderedContext.bind(null,this)};n.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(o){e.console.assert(o,"[ImageRecord.addTile] tile is required"),this._tiles.push(o)},removeTile:function(o){for(var a=0;a<this._tiles.length;a++)if(this._tiles[a]===o){this._tiles.splice(a,1);return}e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",o)},getTileCount:function(){return this._tiles.length}},e.TileCache=function(o){o=o||{},this._maxImageCacheCount=o.maxImageCacheCount||e.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},e.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(o){e.console.assert(o,"[TileCache.cacheTile] options is required"),e.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(o.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),e.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var a=o.cutoff||0,s=this._tilesLoaded.length,c=this._imagesLoaded[o.tile.cacheKey];if(c||(o.data||(e.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),o.data=o.image),e.console.assert(o.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),c=this._imagesLoaded[o.tile.cacheKey]=new n({data:o.data,ownerTile:o.tile,create:o.tiledImage.source.createTileCache,destroy:o.tiledImage.source.destroyTileCache,getImage:o.tiledImage.source.getTileCacheDataAsImage,getData:o.tiledImage.source.getTileCacheData,getRenderedContext:o.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),c.addTile(o.tile),o.tile.cacheImageRecord=c,this._imagesLoadedCount>this._maxImageCacheCount){for(var l=null,u=-1,h=null,f,v,_,d,g,b,S=this._tilesLoaded.length-1;S>=0;S--)if(b=this._tilesLoaded[S],f=b.tile,!(f.level<=a||f.beingDrawn)){if(!l){l=f,u=S,h=b;continue}d=f.lastTouchTime,v=l.lastTouchTime,g=f.level,_=l.level,(d<v||d===v&&g>_)&&(l=f,u=S,h=b)}l&&u>=0&&(this._unloadTile(h),s=u)}this._tilesLoaded[s]=new r({tile:o.tile,tiledImage:o.tiledImage})},clearTilesFor:function(o){e.console.assert(o,"[TileCache.clearTilesFor] tiledImage is required");for(var a,s=0;s<this._tilesLoaded.length;++s)a=this._tilesLoaded[s],a.tiledImage===o&&(this._unloadTile(a),this._tilesLoaded.splice(s,1),s--)},getImageRecord:function(o){return e.console.assert(o,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[o]},_unloadTile:function(o){e.console.assert(o,"[TileCache._unloadTile] tileRecord is required");var a=o.tile,s=o.tiledImage;let c=a.getCanvasContext&&a.getCanvasContext();a.unload(),a.cacheImageRecord=null;var l=this._imagesLoaded[a.cacheKey];l&&(l.removeTile(a),l.getTileCount()||(l.destroy(),delete this._imagesLoaded[a.cacheKey],this._imagesLoadedCount--,c&&(c.canvas.width=0,c.canvas.height=0,s.viewer.raiseEvent("image-unloaded",{context2D:c,tile:a}))),s.viewer.raiseEvent("tile-unloaded",{tile:a,tiledImage:s}))}}})(t),(function(e){e.World=function(r){var n=this;e.console.assert(r.viewer,"[World] options.viewer is required"),e.EventSource.call(this),this.viewer=r.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(o){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},e.extend(e.World.prototype,e.EventSource.prototype,{addItem:function(r,n){if(e.console.assert(r,"[World.addItem] item is required"),e.console.assert(r instanceof e.TiledImage,"[World.addItem] only TiledImages supported at this time"),n=n||{},n.index!==void 0){var o=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(o,0,r)}else this._items.push(r);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,r.addHandler("bounds-change",this._delegatedFigureSizes),r.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:r})},getItemAt:function(r){return e.console.assert(r!==void 0,"[World.getItemAt] index is required"),this._items[r]},getIndexOfItem:function(r){return e.console.assert(r,"[World.getIndexOfItem] item is required"),e.indexOf(this._items,r)},getItemCount:function(){return this._items.length},setItemIndex:function(r,n){e.console.assert(r,"[World.setItemIndex] item is required"),e.console.assert(n!==void 0,"[World.setItemIndex] index is required");var o=this.getIndexOfItem(r);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n===o||o===-1||(this._items.splice(o,1),this._items.splice(n,0,r),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:r,previousIndex:o,newIndex:n}))},removeItem:function(r){e.console.assert(r,"[World.removeItem] item is required");var n=e.indexOf(this._items,r);n!==-1&&(r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(r))},removeAll:function(){this.viewer._cancelPendingImages();var r,n;for(n=0;n<this._items.length;n++)r=this._items[n],r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy();var o=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,n=0;n<o.length;n++)r=o[n],this._raiseRemoveItem(r)},resetItems:function(){for(var r=0;r<this._items.length;r++)this._items[r].reset()},update:function(r){for(var n=!1,o=0;o<this._items.length;o++)n=this._items[o].update(r)||n;return n},draw:function(){this.viewer.drawer.draw(this._items),this._needsDraw=!1,this._items.forEach(r=>{this._needsDraw=r.setDrawn()||this._needsDraw})},needsDraw:function(){for(var r=0;r<this._items.length;r++)if(this._items[r].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(r){this._autoRefigureSizes=r,r&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(r){r=r||{};var n=r.immediately||!1,o=r.layout||e.DEFAULT_SETTINGS.collectionLayout,a=r.rows||e.DEFAULT_SETTINGS.collectionRows,s=r.columns||e.DEFAULT_SETTINGS.collectionColumns,c=r.tileSize||e.DEFAULT_SETTINGS.collectionTileSize,l=r.tileMargin||e.DEFAULT_SETTINGS.collectionTileMargin,u=c+l,h;!r.rows&&s?h=s:h=Math.ceil(this._items.length/a);var f=0,v=0,_,d,g,b,S;this.setAutoRefigureSizes(!1);for(var P=0;P<this._items.length;P++)P&&P%h===0&&(o==="horizontal"?(v+=u,f=0):(f+=u,v=0)),_=this._items[P],d=_.getBounds(),d.width>d.height?g=c:g=c*(d.width/d.height),b=g*(d.height/d.width),S=new e.Point(f+(c-g)/2,v+(c-b)/2),_.setPosition(S,n),_.setWidth(g,n),o==="horizontal"?f+=u:v+=u;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var r=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,o=this._contentFactor||0;if(!this._items.length)this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;else{var a=this._items[0],s=a.getBounds();this._contentFactor=a.getContentSize().x/s.width;for(var c=a.getClippedBounds().getBoundingBox(),l=c.x,u=c.y,h=c.x+c.width,f=c.y+c.height,v=1;v<this._items.length;v++)a=this._items[v],s=a.getBounds(),this._contentFactor=Math.max(this._contentFactor,a.getContentSize().x/s.width),c=a.getClippedBounds().getBoundingBox(),l=Math.min(l,c.x),u=Math.min(u,c.y),h=Math.max(h,c.x+c.width),f=Math.max(f,c.y+c.height);this._homeBounds=new e.Rect(l,u,h-l,f-u),this._contentSize=new e.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==o||!this._homeBounds.equals(r)||!this._contentSize.equals(n))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(r){this.raiseEvent("remove-item",{item:r})}})})(t)})(Wo)),Wo.exports}var uh=w4();const b4=$e({__proto__:null,default:Ua(uh)},[uh])})();
|