@htmlbricks/hb-player-live-camera-ptz 0.66.2 → 0.66.4

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.
package/main.iife.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(Mn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const ui=1,ci=4,di=8,hi=16,vi=1,bi=2,jn="[",Ln="[!",In="[?",zn="]",Ze={},F=Symbol(),Fn="http://www.w3.org/1999/xhtml",_i=!1;var pi=Array.isArray,gi=Array.prototype.indexOf,Xe=Array.prototype.includes,xi=Array.from,_t=Object.keys,pt=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,mi=Object.getOwnPropertyDescriptors,yi=Object.prototype,wi=Array.prototype,Vn=Object.getPrototypeOf,Hn=Object.isExtensible;const $i=()=>{};function ki(e){for(var t=0;t<e.length;t++)e[t]()}function Bn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const z=2,Ke=4,gt=8,Yn=1<<24,we=16,ue=32,$e=64,Jt=128,X=512,L=1024,V=2048,ce=4096,de=8192,re=16384,ke=32768,Gn=1<<25,Qe=65536,qn=1<<17,Jn=1<<18,Ee=1<<19,Ei=1<<20,Ie=65536,Ut=1<<21,Wt=1<<22,Te=1<<23,xt=Symbol("$state"),Un=Symbol("legacy props"),Ti=Symbol(""),_e=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Pi=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),mt=3,it=8;function Si(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ai(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ci(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ni(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ri(){throw new Error("https://svelte.dev/e/hydration_failed")}function Di(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Mi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ji(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Li(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ii(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function yt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function zi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let k=!1;function he(e){k=e}let S;function J(e){if(e===null)throw yt(),Ze;return S=e}function Zt(){return J(se(S))}function N(e){if(k){if(se(S)!==null)throw yt(),Ze;S=e}}function Wn(e=1){if(k){for(var t=e,n=S;t--;)n=se(n);S=n}}function Zn(e=!0){for(var t=0,n=S;;){if(n.nodeType===it){var r=n.data;if(r===zn){if(t===0)return n;t-=1}else(r===jn||r===Ln||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=se(n);e&&n.remove(),n=i}}function Fi(e){if(!e||e.nodeType!==it)throw yt(),Ze;return e.data}function Xn(e){return e===this.v}function Vi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Kn(e){return!Vi(e,this.v)}let Hi=!1,K=null;function et(e){K=e}function Qn(e,t=!1,n){K={p:K,i:!1,c:null,e:null,s:e,x:null,r:y,l:null}}function er(e){var t=K,n=t.e;if(n!==null){t.e=null;for(var r of n)Er(r)}return e!==void 0&&(t.x=e),t.i=!0,K=t.p,e??{}}function tr(){return!0}let ze=[];function nr(){var e=ze;ze=[],ki(e)}function Pe(e){if(ze.length===0&&!st){var t=ze;queueMicrotask(()=>{t===ze&&nr()})}ze.push(e)}function Bi(){for(;ze.length>0;)nr()}function rr(e){var t=y;if(t===null)return x.f|=Te,e;if((t.f&ke)===0&&(t.f&Ke)===0)throw e;Se(e,t)}function Se(e,t){for(;t!==null;){if((t.f&Jt)!==0){if((t.f&ke)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Yi=-7169;function M(e,t){e.f=e.f&Yi|t}function Xt(e){(e.f&X)!==0||e.deps===null?M(e,L):M(e,ce)}function ir(e){if(e!==null)for(const t of e)(t.f&z)===0||(t.f&Ie)===0||(t.f^=Ie,ir(t.deps))}function sr(e,t,n){(e.f&V)!==0?t.add(e):(e.f&ce)!==0&&n.add(e),ir(e.deps),M(e,L)}let wt=!1;function Gi(e){var t=wt;try{return wt=!1,[e(),wt]}finally{wt=t}}const Ae=new Set;let T=null,ie=null,Kt=null,st=!1,Qt=!1,tt=null,$t=null;var or=0;let qi=1;class pe{id=qi++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#o=new Set;#l=new Set;#a=new Map;is_fork=!1;#c=!1;#f=new Set;#d(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#f)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#a.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#a.has(t)||this.#a.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#a.get(t);if(n){this.#a.delete(t);for(var r of n.d)M(r,V),this.schedule(r);for(r of n.m)M(r,ce),this.schedule(r)}}#h(){if(or++>1e3&&(Ae.delete(this),Ji()),!this.#d()){for(const o of this.#o)this.#l.delete(o),M(o,V),this.schedule(o);for(const o of this.#l)M(o,ce),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=tt=[],r=[],i=$t=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw cr(o),f}if(T=null,i.length>0){var s=pe.ensure();for(const o of i)s.schedule(o)}if(tt=null,$t=null,this.#d()||this.#v()){this.#b(r),this.#b(n);for(const[o,f]of this.#a)ur(o,f)}else{this.#t.size===0&&Ae.delete(this),this.#o.clear(),this.#l.clear();for(const o of this.#e)o(this);this.#e.clear(),lr(r),lr(n),this.#s?.resolve()}var l=T;if(this.#r.length>0){const o=l??=this;o.#r.push(...this.#r.filter(f=>!o.#r.includes(f)))}l!==null&&(Ae.add(l),l.#h()),Ae.has(this)||this.#_()}#u(t,n,r){t.f^=L;for(var i=t.first;i!==null;){var s=i.f,l=(s&(ue|$e))!==0,o=l&&(s&L)!==0,f=o||(s&de)!==0||this.#a.has(i);if(!f&&i.fn!==null){l?i.f^=L:(s&Ke)!==0?n.push(i):ft(i)&&((s&we)!==0&&this.#l.add(i),nt(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var d=i.next;if(d!==null){i=d;break}i=i.parent}}}#b(t){for(var n=0;n<t.length;n+=1)sr(t[n],this.#o,this.#l)}capture(t,n,r=!1){n!==F&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Te)===0&&(this.current.set(t,[t.v,r]),ie?.set(t,t.v))}activate(){T=this}deactivate(){T=null,ie=null}flush(){try{Qt=!0,T=this,this.#h()}finally{or=0,Kt=null,tt=null,$t=null,Qt=!1,T=null,ie=null,Ce.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Ae.delete(this)}#_(){for(const a of Ae){var t=a.id<this.id,n=[];for(const[d,[b,h]]of this.current){if(a.current.has(d)){var r=a.current.get(d)[0];if(t&&b!==r)a.current.set(d,[b,h]);else continue}n.push(d)}var i=[...a.current.keys()].filter(d=>!this.current.has(d));if(i.length===0)t&&a.discard();else if(n.length>0){a.activate();var s=new Set,l=new Map;for(var o of n)ar(o,i,s,l);if(a.#r.length>0){a.apply();for(var f of a.#r)a.#u(f,[],[]);a.#r=[]}a.deactivate()}}for(const a of Ae)a.#f.has(this)&&(a.#f.delete(this),a.#f.size===0&&!a.#d()&&(a.activate(),a.#h()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,Pe(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#o.add(r);for(const r of n)this.#l.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=Bn()).promise}static ensure(){if(T===null){const t=T=new pe;Qt||(Ae.add(T),st||Pe(()=>{T===t&&t.flush()}))}return T}apply(){{ie=null;return}}schedule(t){if(Kt=t,t.b?.is_pending&&(t.f&(Ke|gt|Yn))!==0&&(t.f&ke)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(tt!==null&&n===y&&(x===null||(x.f&z)===0))return;if((r&($e|ue))!==0){if((r&L)===0)return;n.f^=L}}this.#r.push(n)}}function Q(e){var t=st;st=!0;try{for(var n;;){if(Bi(),T===null)return n;T.flush()}}finally{st=t}}function Ji(){try{Oi()}catch(e){Se(e,Kt)}}let ge=null;function lr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(re|de))===0&&ft(r)&&(ge=new Set,nt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Pr(r),ge?.size>0)){Ce.clear();for(const i of ge){if((i.f&(re|de))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)ge.has(l)&&(ge.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(re|de))===0&&nt(f)}}ge.clear()}}ge=null}}function ar(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&z)!==0?ar(i,t,n,r):(s&(Wt|we))!==0&&(s&V)===0&&fr(i,t,r)&&(M(i,V),en(i))}}function fr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Xe.call(t,i))return!0;if((i.f&z)!==0&&fr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function en(e){T.schedule(e)}function ur(e,t){if(!((e.f&ue)!==0&&(e.f&L)!==0)){(e.f&V)!==0?t.d.push(e):(e.f&ce)!==0&&t.m.push(e),M(e,L);for(var n=e.first;n!==null;)ur(n,t),n=n.next}}function cr(e){M(e,L);for(var t=e.first;t!==null;)cr(t),t=t.next}function Ui(e){let t=0,n=ot(0),r;return()=>{ln()&&(c(n),an(()=>(t===0&&(r=cn(()=>e(()=>lt(n)))),t+=1,()=>{Pe(()=>{t-=1,t===0&&(r?.(),r=void 0,lt(n))})})))}}var Wi=Qe|Ee;function Zi(e,t,n,r){new Xi(e,t,n,r)}class Xi{parent;is_pending=!1;transform_error;#e;#n=k?S:null;#t;#i;#s;#r=null;#o=null;#l=null;#a=null;#c=0;#f=0;#d=!1;#v=new Set;#h=new Set;#u=null;#b=Ui(()=>(this.#u=ot(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var l=y;l.b=this,l.f|=Jt,r(s)},this.parent=y.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=fn(()=>{if(k){const s=this.#n;Zt();const l=s.data===Ln;if(s.data.startsWith(In)){const f=JSON.parse(s.data.slice(In.length));this.#y(f)}else l?this.#w():this.#_()}else this.#x()},Wi),k&&(this.#e=S)}#_(){try{this.#r=me(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#l=me(()=>{n(this.#e,()=>t,()=>()=>{})}))}#w(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#o=me(()=>t(this.#e)),Pe(()=>{var n=this.#a=document.createDocumentFragment(),r=xe();n.append(r),this.#r=this.#g(()=>me(()=>this.#i(r))),this.#f===0&&(this.#e.before(n),this.#a=null,at(this.#o,()=>{this.#o=null}),this.#p(T))}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#r=me(()=>{this.#i(this.#e)}),this.#f>0){var t=this.#a=document.createDocumentFragment();Cr(this.#r,t);const n=this.#t.pending;this.#o=me(()=>n(this.#e))}else this.#p(T)}catch(n){this.error(n)}}#p(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){sr(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#g(t){var n=y,r=x,i=K;ee(this.#s),Y(this.#s),et(this.#s.ctx);try{return pe.ensure(),t()}catch(s){return rr(s),null}finally{ee(n),Y(r),et(i)}}#m(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t,n);return}this.#f+=t,this.#f===0&&(this.#p(n),this.#o&&at(this.#o,()=>{this.#o=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(t,n){this.#m(t,n),this.#c+=t,!(!this.#u||this.#d)&&(this.#d=!0,Pe(()=>{this.#d=!1,this.#u&&Tt(this.#u,this.#c)}))}get_effect_pending(){return this.#b(),c(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(B(this.#r),this.#r=null),this.#o&&(B(this.#o),this.#o=null),this.#l&&(B(this.#l),this.#l=null),k&&(J(this.#n),Wn(),J(Zn()));var i=!1,s=!1;const l=()=>{if(i){zi();return}i=!0,s&&Ii(),this.#l!==null&&at(this.#l,()=>{this.#l=null}),this.#g(()=>{this.#x()})},o=f=>{try{s=!0,n?.(f,l),s=!1}catch(a){Se(a,this.#s&&this.#s.parent)}r&&(this.#l=this.#g(()=>{try{return me(()=>{var a=y;a.b=this,a.f|=Jt,r(this.#e,()=>f,()=>l)})}catch(a){return Se(a,this.#s.parent),null}}))};Pe(()=>{var f;try{f=this.transform_error(t)}catch(a){Se(a,this.#s&&this.#s.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,a=>Se(a,this.#s&&this.#s.parent)):o(f)})}}function Ki(e,t,n,r){const i=Et;var s=e.filter(h=>!h.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var l=y,o=Qi(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function a(h){o();try{r(h)}catch(v){(l.f&re)===0&&Se(v,l)}kt()}if(n.length===0){f.then(()=>a(t.map(i)));return}var d=dr();function b(){Promise.all(n.map(h=>es(h))).then(h=>a([...t.map(i),...h])).catch(h=>Se(h,l)).finally(()=>d())}f?f.then(()=>{o(),b(),kt()}):b()}function Qi(){var e=y,t=x,n=K,r=T;return function(s=!0){ee(e),Y(t),et(n),s&&(e.f&re)===0&&(r?.activate(),r?.apply())}}function kt(e=!0){ee(null),Y(null),et(null),e&&T?.deactivate()}function dr(){var e=y,t=e.b,n=T,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Et(e){var t=z|V,n=x!==null&&(x.f&z)!==0?x:null;return y!==null&&(y.f|=Ee),{ctx:K,deps:null,effects:null,equals:Xn,f:t,fn:e,reactions:null,rv:0,v:F,wv:0,parent:n??y,ac:null}}function es(e,t,n){let r=y;r===null&&Si();var i=void 0,s=ot(F),l=!x,o=new Map;return ps(()=>{var f=y,a=Bn();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(kt)}catch(v){a.reject(v),kt()}var d=T;if(l){if((f.f&ke)!==0)var b=dr();if(r.b.is_rendered())o.get(d)?.reject(_e),o.delete(d);else{for(const v of o.values())v.reject(_e);o.clear()}o.set(d,a)}const h=(v,_=void 0)=>{if(b){var E=_===_e;b(E)}if(!(_===_e||(f.f&re)!==0)){if(d.activate(),_)s.f|=Te,Tt(s,_);else{(s.f&Te)!==0&&(s.f^=Te),Tt(s,v);for(const[p,C]of o){if(o.delete(p),p===d)break;C.reject(_e)}}d.deactivate()}};a.promise.then(h,v=>h(null,v||"unknown"))}),kr(()=>{for(const f of o.values())f.reject(_e)}),new Promise(f=>{function a(d){function b(){d===i?f(s):a(i)}d.then(b,b)}a(i)})}function ts(e){const t=Et(e);return Or(t),t}function ns(e){const t=Et(e);return t.equals=Kn,t}function rs(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function is(e){for(var t=e.parent;t!==null;){if((t.f&z)===0)return(t.f&re)===0?t:null;t=t.parent}return null}function tn(e){var t,n=y;ee(is(e));try{e.f&=~Ie,rs(e),t=Lr(e)}finally{ee(n)}return t}function hr(e){var t=e.v,n=tn(e);if(!e.equals(n)&&(e.wv=Mr(),(!T?.is_fork||e.deps===null)&&(e.v=n,T?.capture(e,t,!0),e.deps===null))){M(e,L);return}Oe||(ie!==null?(ln()||T?.is_fork)&&ie.set(e,n):Xt(e))}function ss(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(_e),t.teardown=$i,t.ac=null,ut(t,0),un(t))}function vr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&nt(t)}let nn=new Set;const Ce=new Map;let br=!1;function ot(e,t){var n={f:0,v:e,reactions:null,equals:Xn,rv:0,wv:0};return n}function R(e,t){const n=ot(e);return Or(n),n}function os(e,t=!1,n=!0){const r=ot(e);return t||(r.equals=Kn),r}function m(e,t,n=!1){x!==null&&(!oe||(x.f&qn)!==0)&&tr()&&(x.f&(z|we|Wt|qn))!==0&&(te===null||!Xe.call(te,e))&&Li();let r=n?Ne(t):t;return Tt(e,r,$t)}function Tt(e,t,n=null){if(!e.equals(t)){var r=e.v;Oe?Ce.set(e,t):Ce.set(e,r),e.v=t;var i=pe.ensure();if(i.capture(e,r),(e.f&z)!==0){const s=e;(e.f&V)!==0&&tn(s),ie===null&&Xt(s)}e.wv=Mr(),_r(e,V,n),y!==null&&(y.f&L)!==0&&(y.f&(ue|$e))===0&&(ne===null?ys([e]):ne.push(e)),!i.is_fork&&nn.size>0&&!br&&ls()}return t}function ls(){br=!1;for(const e of nn)(e.f&L)!==0&&M(e,ce),ft(e)&&nt(e);nn.clear()}function lt(e){m(e,e.v+1)}function _r(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var l=r[s],o=l.f,f=(o&V)===0;if(f&&M(l,t),(o&z)!==0){var a=l;ie?.delete(a),(o&Ie)===0&&(o&X&&(l.f|=Ie),_r(a,ce,n))}else if(f){var d=l;(o&we)!==0&&ge!==null&&ge.add(d),n!==null?n.push(d):en(d)}}}function Ne(e){if(typeof e!="object"||e===null||xt in e)return e;const t=Vn(e);if(t!==yi&&t!==wi)return e;var n=new Map,r=pi(e),i=R(0),s=He,l=o=>{if(He===s)return o();var f=x,a=He;Y(null),Dr(s);var d=o();return Y(f),Dr(a),d};return r&&n.set("length",R(e.length)),new Proxy(e,{defineProperty(o,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Mi();var d=n.get(f);return d===void 0?l(()=>{var b=R(a.value);return n.set(f,b),b}):m(d,a.value,!0),!0},deleteProperty(o,f){var a=n.get(f);if(a===void 0){if(f in o){const d=l(()=>R(F));n.set(f,d),lt(i)}}else m(a,F),lt(i);return!0},get(o,f,a){if(f===xt)return e;var d=n.get(f),b=f in o;if(d===void 0&&(!b||Le(o,f)?.writable)&&(d=l(()=>{var v=Ne(b?o[f]:F),_=R(v);return _}),n.set(f,d)),d!==void 0){var h=c(d);return h===F?void 0:h}return Reflect.get(o,f,a)},getOwnPropertyDescriptor(o,f){var a=Reflect.getOwnPropertyDescriptor(o,f);if(a&&"value"in a){var d=n.get(f);d&&(a.value=c(d))}else if(a===void 0){var b=n.get(f),h=b?.v;if(b!==void 0&&h!==F)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return a},has(o,f){if(f===xt)return!0;var a=n.get(f),d=a!==void 0&&a.v!==F||Reflect.has(o,f);if(a!==void 0||y!==null&&(!d||Le(o,f)?.writable)){a===void 0&&(a=l(()=>{var h=d?Ne(o[f]):F,v=R(h);return v}),n.set(f,a));var b=c(a);if(b===F)return!1}return d},set(o,f,a,d){var b=n.get(f),h=f in o;if(r&&f==="length")for(var v=a;v<b.v;v+=1){var _=n.get(v+"");_!==void 0?m(_,F):v in o&&(_=l(()=>R(F)),n.set(v+"",_))}if(b===void 0)(!h||Le(o,f)?.writable)&&(b=l(()=>R(void 0)),m(b,Ne(a)),n.set(f,b));else{h=b.v!==F;var E=l(()=>Ne(a));m(b,E)}var p=Reflect.getOwnPropertyDescriptor(o,f);if(p?.set&&p.set.call(d,a),!h){if(r&&typeof f=="string"){var C=n.get("length"),P=Number(f);Number.isInteger(P)&&P>=C.v&&m(C,P+1)}lt(i)}return!0},ownKeys(o){c(i);var f=Reflect.ownKeys(o).filter(b=>{var h=n.get(b);return h===void 0||h.v!==F});for(var[a,d]of n)d.v!==F&&!(a in o)&&f.push(a);return f},setPrototypeOf(){ji()}})}var pr,gr,xr,mr;function rn(){if(pr===void 0){pr=window,gr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xr=Le(t,"firstChild").get,mr=Le(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(n)&&(n.__t=void 0)}}function xe(e=""){return document.createTextNode(e)}function Fe(e){return xr.call(e)}function se(e){return mr.call(e)}function O(e,t){if(!k)return Fe(e);var n=Fe(S);if(n===null)n=S.appendChild(xe());else if(t&&n.nodeType!==mt){var r=xe();return n?.before(r),J(r),r}return t&&on(n),J(n),n}function yr(e,t=!1){if(!k){var n=Fe(e);return n instanceof Comment&&n.data===""?se(n):n}if(t){if(S?.nodeType!==mt){var r=xe();return S?.before(r),J(r),r}on(S)}return S}function A(e,t=1,n=!1){let r=k?S:e;for(var i;t--;)i=r,r=se(r);if(!k)return r;if(n){if(r?.nodeType!==mt){var s=xe();return r===null?i?.after(s):r.before(s),J(s),s}on(r)}return J(r),r}function as(e){e.textContent=""}function fs(){return!1}function sn(e,t,n){return document.createElementNS(Fn,e,void 0)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===mt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}let wr=!1;function $r(){wr||(wr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Pt(e){var t=x,n=y;Y(null),ee(null);try{return e()}finally{Y(t),ee(n)}}function us(e,t,n,r=n){e.addEventListener(t,()=>Pt(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),$r()}function cs(e){y===null&&(x===null&&Ni(),Ci()),Oe&&Ai()}function ds(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ve(e,t){var n=y;n!==null&&(n.f&de)!==0&&(e|=de);var r={ctx:K,deps:null,nodes:null,f:e|V|X,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&Ke)!==0)tt!==null?tt.push(r):pe.ensure().schedule(r);else if(t!==null){try{nt(r)}catch(l){throw B(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ee)===0&&(i=i.first,(e&we)!==0&&(e&Qe)!==0&&i!==null&&(i.f|=Qe))}if(i!==null&&(i.parent=n,n!==null&&ds(i,n),x!==null&&(x.f&z)!==0&&(e&$e)===0)){var s=x;(s.effects??=[]).push(i)}return r}function ln(){return x!==null&&!oe}function kr(e){const t=ve(gt,null);return M(t,L),t.teardown=e,t}function hs(e){cs();var t=y.f,n=!x&&(t&ue)!==0&&(t&ke)===0;if(n){var r=K;(r.e??=[]).push(e)}else return Er(e)}function Er(e){return ve(Ke|Ei,e)}function vs(e){pe.ensure();const t=ve($e|Ee,e);return()=>{B(t)}}function bs(e){pe.ensure();const t=ve($e|Ee,e);return(n={})=>new Promise(r=>{n.outro?at(t,()=>{B(t),r(void 0)}):(B(t),r(void 0))})}function _s(e){return ve(Ke,e)}function ps(e){return ve(Wt|Ee,e)}function an(e,t=0){return ve(gt|t,e)}function j(e,t=[],n=[],r=[]){Ki(r,t,n,i=>{ve(gt,()=>e(...i.map(c)))})}function fn(e,t=0){var n=ve(we|t,e);return n}function me(e){return ve(ue|Ee,e)}function Tr(e){var t=e.teardown;if(t!==null){const n=Oe,r=x;Nr(!0),Y(null);try{t.call(null)}finally{Nr(n),Y(r)}}}function un(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Pt(()=>{i.abort(_e)});var r=n.next;(n.f&$e)!==0?n.parent=null:B(n,t),n=r}}function gs(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&B(t),t=n}}function B(e,t=!0){var n=!1;(t||(e.f&Jn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(xs(e.nodes.start,e.nodes.end),n=!0),M(e,Gn),un(e,t&&!n),ut(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Tr(e),e.f^=Gn,e.f|=re;var i=e.parent;i!==null&&i.first!==null&&Pr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function xs(e,t){for(;e!==null;){var n=e===t?null:se(e);e.remove(),e=n}}function Pr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function at(e,t,n=!0){var r=[];Sr(e,r,!0);var i=()=>{n&&B(e),t&&t()},s=r.length;if(s>0){var l=()=>--s||i();for(var o of r)o.out(l)}else i()}function Sr(e,t,n){if((e.f&de)===0){e.f^=de;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,l=(i.f&Qe)!==0||(i.f&ue)!==0&&(e.f&we)!==0;Sr(i,t,l?n:!1),i=s}}}function ms(e){Ar(e,!0)}function Ar(e,t){if((e.f&de)!==0){e.f^=de,(e.f&L)===0&&(M(e,V),pe.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Qe)!==0||(n.f&ue)!==0;Ar(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||t)&&l.in()}}function Cr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:se(n);t.append(n),n=i}}let St=!1,Oe=!1;function Nr(e){Oe=e}let x=null,oe=!1;function Y(e){x=e}let y=null;function ee(e){y=e}let te=null;function Or(e){x!==null&&(te===null?te=[e]:te.push(e))}let G=null,U=0,ne=null;function ys(e){ne=e}let Rr=1,Ve=0,He=Ve;function Dr(e){He=e}function Mr(){return++Rr}function ft(e){var t=e.f;if((t&V)!==0)return!0;if(t&z&&(e.f&=~Ie),(t&ce)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(ft(s)&&hr(s),s.wv>e.wv)return!0}(t&X)!==0&&ie===null&&M(e,L)}return!1}function jr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(te!==null&&Xe.call(te,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&z)!==0?jr(s,t,!1):t===s&&(n?M(s,V):(s.f&L)!==0&&M(s,ce),en(s))}}function Lr(e){var t=G,n=U,r=ne,i=x,s=te,l=K,o=oe,f=He,a=e.f;G=null,U=0,ne=null,x=(a&(ue|$e))===0?e:null,te=null,et(e.ctx),oe=!1,He=++Ve,e.ac!==null&&(Pt(()=>{e.ac.abort(_e)}),e.ac=null);try{e.f|=Ut;var d=e.fn,b=d();e.f|=ke;var h=e.deps,v=T?.is_fork;if(G!==null){var _;if(v||ut(e,U),h!==null&&U>0)for(h.length=U+G.length,_=0;_<G.length;_++)h[U+_]=G[_];else e.deps=h=G;if(ln()&&(e.f&X)!==0)for(_=U;_<h.length;_++)(h[_].reactions??=[]).push(e)}else!v&&h!==null&&U<h.length&&(ut(e,U),h.length=U);if(tr()&&ne!==null&&!oe&&h!==null&&(e.f&(z|ce|V))===0)for(_=0;_<ne.length;_++)jr(ne[_],e);if(i!==null&&i!==e){if(Ve++,i.deps!==null)for(let E=0;E<n;E+=1)i.deps[E].rv=Ve;if(t!==null)for(const E of t)E.rv=Ve;ne!==null&&(r===null?r=ne:r.push(...ne))}return(e.f&Te)!==0&&(e.f^=Te),b}catch(E){return rr(E)}finally{e.f^=Ut,G=t,U=n,ne=r,x=i,te=s,et(l),oe=o,He=f}}function ws(e,t){let n=t.reactions;if(n!==null){var r=gi.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&z)!==0&&(G===null||!Xe.call(G,t))){var s=t;(s.f&X)!==0&&(s.f^=X,s.f&=~Ie),Xt(s),ss(s),ut(s,0)}}function ut(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ws(e,n[r])}function nt(e){var t=e.f;if((t&re)===0){M(e,L);var n=y,r=St;y=e,St=!0;try{(t&(we|Yn))!==0?gs(e):un(e),Tr(e);var i=Lr(e);e.teardown=typeof i=="function"?i:null,e.wv=Rr;var s;_i&&Hi&&(e.f&V)!==0&&e.deps}finally{St=r,y=n}}}async function $s(){await Promise.resolve(),Q()}function c(e){var t=e.f,n=(t&z)!==0;if(x!==null&&!oe){var r=y!==null&&(y.f&re)!==0;if(!r&&(te===null||!Xe.call(te,e))){var i=x.deps;if((x.f&Ut)!==0)e.rv<Ve&&(e.rv=Ve,G===null&&i!==null&&i[U]===e?U++:G===null?G=[e]:G.push(e));else{(x.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[x]:Xe.call(s,x)||s.push(x)}}}if(Oe&&Ce.has(e))return Ce.get(e);if(n){var l=e;if(Oe){var o=l.v;return((l.f&L)===0&&l.reactions!==null||zr(l))&&(o=tn(l)),Ce.set(l,o),o}var f=(l.f&X)===0&&!oe&&x!==null&&(St||(x.f&X)!==0),a=(l.f&ke)===0;ft(l)&&(f&&(l.f|=X),hr(l)),f&&!a&&(vr(l),Ir(l))}if(ie?.has(e))return ie.get(e);if((e.f&Te)!==0)throw e.v;return e.v}function Ir(e){if(e.f|=X,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&z)!==0&&(t.f&X)===0&&(vr(t),Ir(t))}function zr(e){if(e.v===F)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ce.has(t)||(t.f&z)!==0&&zr(t))return!0;return!1}function cn(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const ct=Symbol("events"),Fr=new Set,dn=new Set;function ks(e,t,n,r={}){function i(s){if(r.capture||hn.call(t,s),!s.cancelBubble)return Pt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Pe(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function W(e,t,n,r,i){var s={capture:r,passive:i},l=ks(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&kr(()=>{t.removeEventListener(e,l,s)})}function q(e,t,n){(t[ct]??={})[e]=n}function Es(e){for(var t=0;t<e.length;t++)Fr.add(e[t]);for(var n of dn)n(e)}let Vr=null;function hn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Vr=e;var l=0,o=Vr===e&&e[ct];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[ct]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(l=f)}if(s=i[l]||e.target,s!==t){pt(e,"currentTarget",{configurable:!0,get(){return s||n}});var d=x,b=y;Y(null),ee(null);try{for(var h,v=[];s!==null;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[ct]?.[r];E!=null&&(!s.disabled||e.target===s)&&E.call(s,e)}catch(p){h?v.push(p):h=p}if(e.cancelBubble||_===t||_===null)break;s=_}if(h){for(let p of v)queueMicrotask(()=>{throw p});throw h}}finally{e[ct]=t,delete e.currentTarget,Y(d),ee(b)}}}const Ts=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ps(e){return Ts?.createHTML(e)??e}function Ss(e){var t=sn("template");return t.innerHTML=Ps(e.replaceAll("<!>","<!---->")),t.content}function At(e,t){var n=y;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Be(e,t){var n=(t&vi)!==0,r=(t&bi)!==0,i,s=!e.startsWith("<!>");return()=>{if(k)return At(S,null),S;i===void 0&&(i=Ss(s?e:"<!>"+e),n||(i=Fe(i)));var l=r||gr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Fe(l),f=l.lastChild;At(o,f)}else At(l,l);return l}}function Re(e,t){if(k){var n=y;((n.f&ke)===0||n.nodes.end===null)&&(n.nodes.end=S),Zt();return}e!==null&&e.before(t)}const As=["touchstart","touchmove"];function Cs(e){return As.includes(e)}function Ct(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Hr(e,t){return Br(e,t)}function Ns(e,t){rn(),t.intro=t.intro??!1;const n=t.target,r=k,i=S;try{for(var s=Fe(n);s&&(s.nodeType!==it||s.data!==jn);)s=se(s);if(!s)throw Ze;he(!0),J(s);const l=Br(e,{...t,anchor:s});return he(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Ze&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Ri(),rn(),as(n),he(!1),Hr(e,t)}finally{he(r),J(i)}}const Nt=new Map;function Br(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){rn();var f=void 0,a=bs(()=>{var d=n??t.appendChild(xe());Zi(d,{pending:()=>{}},v=>{Qn({});var _=K;if(s&&(_.c=s),i&&(r.$$events=i),k&&At(v,null),f=e(v,r)||{},k&&(y.nodes.end=S,S===null||S.nodeType!==it||S.data!==zn))throw yt(),Ze;er()},o);var b=new Set,h=v=>{for(var _=0;_<v.length;_++){var E=v[_];if(!b.has(E)){b.add(E);var p=Cs(E);for(const le of[t,document]){var C=Nt.get(le);C===void 0&&(C=new Map,Nt.set(le,C));var P=C.get(E);P===void 0?(le.addEventListener(E,hn,{passive:p}),C.set(E,1)):C.set(E,P+1)}}}};return h(xi(Fr)),dn.add(h),()=>{for(var v of b)for(const p of[t,document]){var _=Nt.get(p),E=_.get(v);--E==0?(p.removeEventListener(v,hn),_.delete(v),_.size===0&&Nt.delete(p)):_.set(v,E)}dn.delete(h),d!==n&&d.parentNode?.removeChild(d)}});return vn.set(f,a),f}let vn=new WeakMap;function Os(e,t){const n=vn.get(e);return n?(vn.delete(e),n(t)):Promise.resolve()}class Rs{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)ms(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(B(o.effect),this.#t.delete(l))}for(const[s,l]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var a=document.createDocumentFragment();Cr(l,a),a.append(xe()),this.#t.set(s,{effect:l,fragment:a})}else B(l);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),at(l,o,!1)):o()}}};#o=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(B(i.effect),this.#t.delete(r))};ensure(t,n){var r=T,i=fs();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),l=xe();s.append(l),this.#t.set(t,{effect:me(()=>n(l)),fragment:s})}else this.#n.set(t,me(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#o)}else k&&(this.anchor=S),this.#r(r)}}function Ot(e,t,n=!1){var r;k&&(r=S,Zt());var i=new Rs(e),s=n?Qe:0;function l(o,f){if(k){var a=Fi(r);if(o!==parseInt(a.substring(1))){var d=Zn();J(d),i.anchor=d,he(!1),i.ensure(o,f),he(!0);return}}i.ensure(o,f)}fn(()=>{var o=!1;t((f,a=0)=>{o=!0,l(a,f)}),o||l(-1,null)},s)}function Ds(e,t){let n=null,r=k;var i;if(k){n=S;for(var s=Fe(document.head);s!==null&&(s.nodeType!==it||s.data!==e);)s=se(s);if(s===null)he(!1);else{var l=se(s);s.remove(),J(l)}}k||(i=document.head.appendChild(xe()));try{fn(()=>t(i),Jn|Ee)}finally{r&&(he(!0),J(n))}}function Ms(e,t){_s(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=sn("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function js(e,t,n){var r=e==null?"":""+e;return t&&(r=r?r+" "+t:t),r===""?null:r}function Ls(e,t){return e==null?null:String(e)}function I(e,t,n,r,i,s){var l=e.__className;if(k||l!==n||l===void 0){var o=js(n,r);(!k||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return s}function Rt(e,t,n,r){var i=e.__style;if(k||i!==t){var s=Ls(t);(!k||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Is=Symbol("is custom element"),zs=Symbol("is html"),Fs=Pi?"link":"LINK";function Yr(e){if(k){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;dt(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;dt(e,"checked",null),e.checked=i}}};e.__on_r=n,Pe(n),$r()}}function dt(e,t,n,r){var i=Vs(e);k&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Fs)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ti]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Gr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $(e,t,n){var r=x,i=y;let s=k;k&&he(!1),Y(null),ee(null);try{t!=="style"&&(bn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Gr(e).includes(t):n&&typeof n=="object")?e[t]=n:dt(e,t,n==null?n:String(n))}finally{Y(r),ee(i),s&&he(!0)}}function Vs(e){return e.__attributes??={[Is]:e.nodeName.includes("-"),[zs]:e.namespaceURI===Fn}}var bn=new Map;function Gr(e){var t=e.getAttribute("is")||e.nodeName,n=bn.get(t);if(n)return n;bn.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=mi(i);for(var l in r)r[l].set&&n.push(l);i=Vn(i)}return n}function qr(e,t,n=t){var r=new WeakSet;us(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=_n(e)?pn(s):s,n(s),T!==null&&r.add(T),await $s(),s!==(s=t())){var l=e.selectionStart,o=e.selectionEnd,f=e.value.length;if(e.value=s??"",o!==null){var a=e.value.length;l===o&&o===f&&a>f?(e.selectionStart=a,e.selectionEnd=a):(e.selectionStart=l,e.selectionEnd=Math.min(o,a))}}}),(k&&e.defaultValue!==e.value||cn(t)==null&&e.value)&&(n(_n(e)?pn(e.value):e.value),T!==null&&r.add(T)),an(()=>{var i=t();if(e===document.activeElement){var s=T;if(r.has(s))return}_n(e)&&i===pn(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function _n(e){var t=e.type;return t==="number"||t==="range"}function pn(e){return e===""?null:+e}function be(e,t,n,r){var i=(n&di)!==0,s=(n&hi)!==0,l=r,o=!0,f=()=>(o&&(o=!1,l=s?cn(r):r),l);let a;if(i){var d=xt in e||Un in e;a=Le(e,t)?.set??(d&&t in e?P=>e[t]=P:void 0)}var b,h=!1;i?[b,h]=Gi(()=>e[t]):b=e[t],b===void 0&&r!==void 0&&(b=f(),a&&(Di(),a(b)));var v;if(v=()=>{var P=e[t];return P===void 0?f():(o=!0,P)},(n&ci)===0)return v;if(a){var _=e.$$legacy;return(function(P,le){return arguments.length>0?((!le||_||h)&&a(le?v():P),P):v()})}var E=!1,p=((n&ui)!==0?Et:ns)(()=>(E=!1,v()));i&&c(p);var C=y;return(function(P,le){if(arguments.length>0){const Ge=le?c(p):i?Ne(P):P;return m(p,Ge),E=!0,l!==void 0&&(l=Ge),P}return Oe&&E||(C.f&re)!==0?p.v:c(p)})}function Hs(e){return new Bs(e)}class Bs{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=os(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return c(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===Un?!0:(c(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return m(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?Ns:Hr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||pt(this,s,{get(){return this.#n[s]},set(l){this.#n[s]=l},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{Os(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Jr;typeof HTMLElement=="function"&&(Jr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=sn("slot");r!=="default"&&(s.name=r),Re(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Ys(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Dt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Hs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=vs(()=>{an(()=>{this.$$r=!0;for(const r of _t(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Dt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Dt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return _t(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Dt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ys(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Gs(e,t,n,r,i,s){let l=class extends Jr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return _t(t).map(o=>(t[o].attribute||o).toLowerCase())}};return _t(t).forEach(o=>{pt(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=Dt(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var d=Le(a,o)?.get;d?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{pt(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Mt={version:"0.66.2"};var Ye={},Ur;function qs(){if(Ur)return Ye;Ur=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.LanguageTranslator=void 0,Ye.getChildStyleToPass=e,Ye.addComponent=t;function e(r,i){var s,l,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(h){return Object.keys(r).includes(h.name)}))===null||l===void 0)&&l.length))for(var f=function(h){var v=i?.filter(function(_){return _.name===h&&_.defaultValue!==r[h]});v&&(o+="".concat(h,":").concat(r[h],";"))},a=0,d=Object.keys(r);a<d.length;a++){var b=d[a];f(b)}}catch(h){console.error("error getting child style to pass",h)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(f+"-",""),"/").concat(l)}document.head.appendChild(o)}catch(a){console.warn(a)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,o="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(i,s,l){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((o=s[l])===null||o===void 0)&&o[i]))return s[l][i];var f="",a=r.getDefaultLang();if(!l||a!==l){var d=s?.[a];d?.[i]&&(f=d[i])}return f},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return o.format(i)},r})();return Ye.LanguageTranslator=n,Ye}var jt=qs(),Js=Be('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-eex92x"/>'),Us=Be("<hb-table></hb-table>",2),Ws=Be("<hb-pad-joystick></hb-pad-joystick>",2),Zs=Be("<hb-pad-joystick></hb-pad-joystick>",2),Xs=Be('<div id="controller" class="svelte-eex92x"><div id="panel" class="svelte-eex92x"><div id="joystick" class="area svelte-eex92x"><!></div> <div id="buttons" class="area svelte-eex92x"><div class="btn-group svelte-eex92x" style="margin-right:10px"><button class="btn btn-sm btn-light svelte-eex92x" aria-label="Zoom In"><i class="bi bi-zoom-in svelte-eex92x"></i></button> <button class="btn btn-sm btn-light svelte-eex92x" aria-label="Zoom Out"><i class="bi bi-zoom-out svelte-eex92x"></i></button></div> <button aria-label="Go to home"><i class="bi bi-house-door-fill svelte-eex92x"></i></button> <button aria-label="select zone"><i class="bi bi-square svelte-eex92x"></i></button></div> <div id="speed" class="area svelte-eex92x"><span class="slider_label svelte-eex92x">speed:</span> <input class="range svelte-eex92x" type="range"/></div> <div id="precision" class="area svelte-eex92x"><span class="slider_label svelte-eex92x">precision:</span> <input class="range svelte-eex92x" type="range"/></div> <div id="presets_view" class="area svelte-eex92x"><button aria-label="showGrid"><i class="bi bi-grid-3x3 svelte-eex92x"></i></button> <button aria-label="Toggle joystick mode"><i class="bi bi-joystick svelte-eex92x"></i></button> <button style="float:right;margin-right:5px;" class="btn btn-sm btn-light svelte-eex92x" aria-label="Enter fullscreen mode"><i class="bi bi-arrows-fullscreen svelte-eex92x"></i></button></div> <div id="presets_select" class="area svelte-eex92x"><button class="btn btn-sm btn-light svelte-eex92x" aria-label="Add Scene to Preset"><i class="bi bi-plus-circle-fill svelte-eex92x"></i></button> <button style="width:130px!important;display:inline-block!important" aria-label="Open Presets Modal"> <i style="float:right" class="bi bi-arrow-down-up svelte-eex92x"></i></button></div> <div id="presets_buttons" class="area svelte-eex92x"><button><i></i></button> <button><i></i></button> <button class="btn btn-sm btn-light svelte-eex92x" aria-label="Open settings"><i class="bi bi-sliders svelte-eex92x"></i> <span class="timecell svelte-eex92x"><span class="svelte-eex92x"> </span></span></button></div></div></div>'),Ks=Be('<!> <div id="opener" class="svelte-eex92x"><i></i></div>',1),Qs=Be('<hb-dialog><div slot="body-content" class="svelte-eex92x"><!></div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x">Are You sure to add this scene to the preset?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x">Are You sure to go To Home?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x"> </div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x"> </div></hb-dialog> <div id="container" class="svelte-eex92x"><hb-player-live></hb-player-live> <div id="area_selector" class="svelte-eex92x"></div> <div id="grid" class="svelte-eex92x"><table id="grid_table" class="svelte-eex92x"><tbody class="svelte-eex92x"><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr></tbody></table></div> <!></div>',3);const eo={hash:"svelte-eex92x",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
1
+ (function(Mn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const ai=1,fi=4,ui=8,ci=16,di=1,hi=2,jn="[",Dn="[!",In="[?",zn="]",We={},F=Symbol(),Ln="http://www.w3.org/1999/xhtml",vi=!1;var bi=Array.isArray,_i=Array.prototype.indexOf,Ze=Array.prototype.includes,pi=Array.from,bt=Object.keys,_t=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,gi=Object.getOwnPropertyDescriptors,xi=Object.prototype,mi=Array.prototype,Fn=Object.getPrototypeOf,Vn=Object.isExtensible;const yi=()=>{};function wi(e){for(var t=0;t<e.length;t++)e[t]()}function Hn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const L=2,Ke=4,pt=8,Bn=1<<24,we=16,ue=32,$e=64,qt=128,K=512,I=1024,V=2048,ce=4096,de=8192,re=16384,ke=32768,Yn=1<<25,Xe=65536,Gn=1<<17,qn=1<<18,Ee=1<<19,$i=1<<20,ze=65536,Jt=1<<21,Ut=1<<22,Te=1<<23,gt=Symbol("$state"),Jn=Symbol("legacy props"),ki=Symbol(""),_e=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ei=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),xt=3,rt=8;function Ti(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Si(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ai(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ni(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ci(){throw new Error("https://svelte.dev/e/hydration_failed")}function Oi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ri(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Mi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ji(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Di(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function mt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Ii(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let k=!1;function he(e){k=e}let P;function J(e){if(e===null)throw mt(),We;return P=e}function Wt(){return J(se(P))}function C(e){if(k){if(se(P)!==null)throw mt(),We;P=e}}function Un(e=1){if(k){for(var t=e,n=P;t--;)n=se(n);P=n}}function Wn(e=!0){for(var t=0,n=P;;){if(n.nodeType===rt){var r=n.data;if(r===zn){if(t===0)return n;t-=1}else(r===jn||r===Dn||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=se(n);e&&n.remove(),n=i}}function zi(e){if(!e||e.nodeType!==rt)throw mt(),We;return e.data}function Zn(e){return e===this.v}function Li(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Kn(e){return!Li(e,this.v)}let Fi=!1,X=null;function Qe(e){X=e}function Xn(e,t=!1,n){X={p:X,i:!1,c:null,e:null,s:e,x:null,r:y,l:null}}function Qn(e){var t=X,n=t.e;if(n!==null){t.e=null;for(var r of n)kr(r)}return e!==void 0&&(t.x=e),t.i=!0,X=t.p,e??{}}function er(){return!0}let Le=[];function tr(){var e=Le;Le=[],wi(e)}function Se(e){if(Le.length===0&&!it){var t=Le;queueMicrotask(()=>{t===Le&&tr()})}Le.push(e)}function Vi(){for(;Le.length>0;)tr()}function nr(e){var t=y;if(t===null)return x.f|=Te,e;if((t.f&ke)===0&&(t.f&Ke)===0)throw e;Pe(e,t)}function Pe(e,t){for(;t!==null;){if((t.f&qt)!==0){if((t.f&ke)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Hi=-7169;function j(e,t){e.f=e.f&Hi|t}function Zt(e){(e.f&K)!==0||e.deps===null?j(e,I):j(e,ce)}function rr(e){if(e!==null)for(const t of e)(t.f&L)===0||(t.f&ze)===0||(t.f^=ze,rr(t.deps))}function ir(e,t,n){(e.f&V)!==0?t.add(e):(e.f&ce)!==0&&n.add(e),rr(e.deps),j(e,I)}let yt=!1;function Bi(e){var t=yt;try{return yt=!1,[e(),yt]}finally{yt=t}}const Ae=new Set;let T=null,ie=null,Kt=null,it=!1,Xt=!1,et=null,wt=null;var sr=0;let Yi=1;class pe{id=Yi++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#o=new Set;#l=new Set;#a=new Map;is_fork=!1;#c=!1;#f=new Set;#d(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#f)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#a.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#a.has(t)||this.#a.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#a.get(t);if(n){this.#a.delete(t);for(var r of n.d)j(r,V),this.schedule(r);for(r of n.m)j(r,ce),this.schedule(r)}}#h(){if(sr++>1e3&&(Ae.delete(this),Gi()),!this.#d()){for(const o of this.#o)this.#l.delete(o),j(o,V),this.schedule(o);for(const o of this.#l)j(o,ce),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=et=[],r=[],i=wt=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw ur(o),f}if(T=null,i.length>0){var s=pe.ensure();for(const o of i)s.schedule(o)}if(et=null,wt=null,this.#d()||this.#v()){this.#b(r),this.#b(n);for(const[o,f]of this.#a)fr(o,f)}else{this.#t.size===0&&Ae.delete(this),this.#o.clear(),this.#l.clear();for(const o of this.#e)o(this);this.#e.clear(),or(r),or(n),this.#s?.resolve()}var a=T;if(this.#r.length>0){const o=a??=this;o.#r.push(...this.#r.filter(f=>!o.#r.includes(f)))}a!==null&&(Ae.add(a),a.#h()),Ae.has(this)||this.#_()}#u(t,n,r){t.f^=I;for(var i=t.first;i!==null;){var s=i.f,a=(s&(ue|$e))!==0,o=a&&(s&I)!==0,f=o||(s&de)!==0||this.#a.has(i);if(!f&&i.fn!==null){a?i.f^=I:(s&Ke)!==0?n.push(i):at(i)&&((s&we)!==0&&this.#l.add(i),tt(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var d=i.next;if(d!==null){i=d;break}i=i.parent}}}#b(t){for(var n=0;n<t.length;n+=1)ir(t[n],this.#o,this.#l)}capture(t,n,r=!1){n!==F&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Te)===0&&(this.current.set(t,[t.v,r]),ie?.set(t,t.v))}activate(){T=this}deactivate(){T=null,ie=null}flush(){try{Xt=!0,T=this,this.#h()}finally{sr=0,Kt=null,et=null,wt=null,Xt=!1,T=null,ie=null,Ne.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Ae.delete(this)}#_(){for(const l of Ae){var t=l.id<this.id,n=[];for(const[d,[b,h]]of this.current){if(l.current.has(d)){var r=l.current.get(d)[0];if(t&&b!==r)l.current.set(d,[b,h]);else continue}n.push(d)}var i=[...l.current.keys()].filter(d=>!this.current.has(d));if(i.length===0)t&&l.discard();else if(n.length>0){l.activate();var s=new Set,a=new Map;for(var o of n)lr(o,i,s,a);if(l.#r.length>0){l.apply();for(var f of l.#r)l.#u(f,[],[]);l.#r=[]}l.deactivate()}}for(const l of Ae)l.#f.has(this)&&(l.#f.delete(this),l.#f.size===0&&!l.#d()&&(l.activate(),l.#h()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,Se(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#o.add(r);for(const r of n)this.#l.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=Hn()).promise}static ensure(){if(T===null){const t=T=new pe;Xt||(Ae.add(T),it||Se(()=>{T===t&&t.flush()}))}return T}apply(){{ie=null;return}}schedule(t){if(Kt=t,t.b?.is_pending&&(t.f&(Ke|pt|Bn))!==0&&(t.f&ke)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(et!==null&&n===y&&(x===null||(x.f&L)===0))return;if((r&($e|ue))!==0){if((r&I)===0)return;n.f^=I}}this.#r.push(n)}}function Q(e){var t=it;it=!0;try{for(var n;;){if(Vi(),T===null)return n;T.flush()}}finally{it=t}}function Gi(){try{Ni()}catch(e){Pe(e,Kt)}}let ge=null;function or(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(re|de))===0&&at(r)&&(ge=new Set,tt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Tr(r),ge?.size>0)){Ne.clear();for(const i of ge){if((i.f&(re|de))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)ge.has(a)&&(ge.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(re|de))===0&&tt(f)}}ge.clear()}}ge=null}}function lr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&L)!==0?lr(i,t,n,r):(s&(Ut|we))!==0&&(s&V)===0&&ar(i,t,r)&&(j(i,V),Qt(i))}}function ar(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Ze.call(t,i))return!0;if((i.f&L)!==0&&ar(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Qt(e){T.schedule(e)}function fr(e,t){if(!((e.f&ue)!==0&&(e.f&I)!==0)){(e.f&V)!==0?t.d.push(e):(e.f&ce)!==0&&t.m.push(e),j(e,I);for(var n=e.first;n!==null;)fr(n,t),n=n.next}}function ur(e){j(e,I);for(var t=e.first;t!==null;)ur(t),t=t.next}function qi(e){let t=0,n=st(0),r;return()=>{on()&&(c(n),ln(()=>(t===0&&(r=un(()=>e(()=>ot(n)))),t+=1,()=>{Se(()=>{t-=1,t===0&&(r?.(),r=void 0,ot(n))})})))}}var Ji=Xe|Ee;function Ui(e,t,n,r){new Wi(e,t,n,r)}class Wi{parent;is_pending=!1;transform_error;#e;#n=k?P:null;#t;#i;#s;#r=null;#o=null;#l=null;#a=null;#c=0;#f=0;#d=!1;#v=new Set;#h=new Set;#u=null;#b=qi(()=>(this.#u=st(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var a=y;a.b=this,a.f|=qt,r(s)},this.parent=y.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=an(()=>{if(k){const s=this.#n;Wt();const a=s.data===Dn;if(s.data.startsWith(In)){const f=JSON.parse(s.data.slice(In.length));this.#y(f)}else a?this.#w():this.#_()}else this.#x()},Ji),k&&(this.#e=P)}#_(){try{this.#r=me(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#l=me(()=>{n(this.#e,()=>t,()=>()=>{})}))}#w(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#o=me(()=>t(this.#e)),Se(()=>{var n=this.#a=document.createDocumentFragment(),r=xe();n.append(r),this.#r=this.#g(()=>me(()=>this.#i(r))),this.#f===0&&(this.#e.before(n),this.#a=null,lt(this.#o,()=>{this.#o=null}),this.#p(T))}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#r=me(()=>{this.#i(this.#e)}),this.#f>0){var t=this.#a=document.createDocumentFragment();Ar(this.#r,t);const n=this.#t.pending;this.#o=me(()=>n(this.#e))}else this.#p(T)}catch(n){this.error(n)}}#p(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){ir(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#g(t){var n=y,r=x,i=X;ee(this.#s),Y(this.#s),Qe(this.#s.ctx);try{return pe.ensure(),t()}catch(s){return nr(s),null}finally{ee(n),Y(r),Qe(i)}}#m(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t,n);return}this.#f+=t,this.#f===0&&(this.#p(n),this.#o&&lt(this.#o,()=>{this.#o=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(t,n){this.#m(t,n),this.#c+=t,!(!this.#u||this.#d)&&(this.#d=!0,Se(()=>{this.#d=!1,this.#u&&Et(this.#u,this.#c)}))}get_effect_pending(){return this.#b(),c(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(B(this.#r),this.#r=null),this.#o&&(B(this.#o),this.#o=null),this.#l&&(B(this.#l),this.#l=null),k&&(J(this.#n),Un(),J(Wn()));var i=!1,s=!1;const a=()=>{if(i){Ii();return}i=!0,s&&Di(),this.#l!==null&&lt(this.#l,()=>{this.#l=null}),this.#g(()=>{this.#x()})},o=f=>{try{s=!0,n?.(f,a),s=!1}catch(l){Pe(l,this.#s&&this.#s.parent)}r&&(this.#l=this.#g(()=>{try{return me(()=>{var l=y;l.b=this,l.f|=qt,r(this.#e,()=>f,()=>a)})}catch(l){return Pe(l,this.#s.parent),null}}))};Se(()=>{var f;try{f=this.transform_error(t)}catch(l){Pe(l,this.#s&&this.#s.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,l=>Pe(l,this.#s&&this.#s.parent)):o(f)})}}function Zi(e,t,n,r){const i=kt;var s=e.filter(h=>!h.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var a=y,o=Ki(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function l(h){o();try{r(h)}catch(v){(a.f&re)===0&&Pe(v,a)}$t()}if(n.length===0){f.then(()=>l(t.map(i)));return}var d=cr();function b(){Promise.all(n.map(h=>Xi(h))).then(h=>l([...t.map(i),...h])).catch(h=>Pe(h,a)).finally(()=>d())}f?f.then(()=>{o(),b(),$t()}):b()}function Ki(){var e=y,t=x,n=X,r=T;return function(s=!0){ee(e),Y(t),Qe(n),s&&(e.f&re)===0&&(r?.activate(),r?.apply())}}function $t(e=!0){ee(null),Y(null),Qe(null),e&&T?.deactivate()}function cr(){var e=y,t=e.b,n=T,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function kt(e){var t=L|V,n=x!==null&&(x.f&L)!==0?x:null;return y!==null&&(y.f|=Ee),{ctx:X,deps:null,effects:null,equals:Zn,f:t,fn:e,reactions:null,rv:0,v:F,wv:0,parent:n??y,ac:null}}function Xi(e,t,n){let r=y;r===null&&Ti();var i=void 0,s=st(F),a=!x,o=new Map;return bs(()=>{var f=y,l=Hn();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).finally($t)}catch(v){l.reject(v),$t()}var d=T;if(a){if((f.f&ke)!==0)var b=cr();if(r.b.is_rendered())o.get(d)?.reject(_e),o.delete(d);else{for(const v of o.values())v.reject(_e);o.clear()}o.set(d,l)}const h=(v,p=void 0)=>{if(b){var E=p===_e;b(E)}if(!(p===_e||(f.f&re)!==0)){if(d.activate(),p)s.f|=Te,Et(s,p);else{(s.f&Te)!==0&&(s.f^=Te),Et(s,v);for(const[_,N]of o){if(o.delete(_),_===d)break;N.reject(_e)}}d.deactivate()}};l.promise.then(h,v=>h(null,v||"unknown"))}),$r(()=>{for(const f of o.values())f.reject(_e)}),new Promise(f=>{function l(d){function b(){d===i?f(s):l(i)}d.then(b,b)}l(i)})}function Qi(e){const t=kt(e);return Cr(t),t}function es(e){const t=kt(e);return t.equals=Kn,t}function ts(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function ns(e){for(var t=e.parent;t!==null;){if((t.f&L)===0)return(t.f&re)===0?t:null;t=t.parent}return null}function en(e){var t,n=y;ee(ns(e));try{e.f&=~ze,ts(e),t=Dr(e)}finally{ee(n)}return t}function dr(e){var t=e.v,n=en(e);if(!e.equals(n)&&(e.wv=Mr(),(!T?.is_fork||e.deps===null)&&(e.v=n,T?.capture(e,t,!0),e.deps===null))){j(e,I);return}Oe||(ie!==null?(on()||T?.is_fork)&&ie.set(e,n):Zt(e))}function rs(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(_e),t.teardown=yi,t.ac=null,ft(t,0),fn(t))}function hr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&tt(t)}let tn=new Set;const Ne=new Map;let vr=!1;function st(e,t){var n={f:0,v:e,reactions:null,equals:Zn,rv:0,wv:0};return n}function R(e,t){const n=st(e);return Cr(n),n}function is(e,t=!1,n=!0){const r=st(e);return t||(r.equals=Kn),r}function m(e,t,n=!1){x!==null&&(!oe||(x.f&Gn)!==0)&&er()&&(x.f&(L|we|Ut|Gn))!==0&&(te===null||!Ze.call(te,e))&&ji();let r=n?Ce(t):t;return Et(e,r,wt)}function Et(e,t,n=null){if(!e.equals(t)){var r=e.v;Oe?Ne.set(e,t):Ne.set(e,r),e.v=t;var i=pe.ensure();if(i.capture(e,r),(e.f&L)!==0){const s=e;(e.f&V)!==0&&en(s),ie===null&&Zt(s)}e.wv=Mr(),br(e,V,n),y!==null&&(y.f&I)!==0&&(y.f&(ue|$e))===0&&(ne===null?xs([e]):ne.push(e)),!i.is_fork&&tn.size>0&&!vr&&ss()}return t}function ss(){vr=!1;for(const e of tn)(e.f&I)!==0&&j(e,ce),at(e)&&tt(e);tn.clear()}function ot(e){m(e,e.v+1)}function br(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],o=a.f,f=(o&V)===0;if(f&&j(a,t),(o&L)!==0){var l=a;ie?.delete(l),(o&ze)===0&&(o&K&&(a.f|=ze),br(l,ce,n))}else if(f){var d=a;(o&we)!==0&&ge!==null&&ge.add(d),n!==null?n.push(d):Qt(d)}}}function Ce(e){if(typeof e!="object"||e===null||gt in e)return e;const t=Fn(e);if(t!==xi&&t!==mi)return e;var n=new Map,r=bi(e),i=R(0),s=He,a=o=>{if(He===s)return o();var f=x,l=He;Y(null),Rr(s);var d=o();return Y(f),Rr(l),d};return r&&n.set("length",R(e.length)),new Proxy(e,{defineProperty(o,f,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Ri();var d=n.get(f);return d===void 0?a(()=>{var b=R(l.value);return n.set(f,b),b}):m(d,l.value,!0),!0},deleteProperty(o,f){var l=n.get(f);if(l===void 0){if(f in o){const d=a(()=>R(F));n.set(f,d),ot(i)}}else m(l,F),ot(i);return!0},get(o,f,l){if(f===gt)return e;var d=n.get(f),b=f in o;if(d===void 0&&(!b||Ie(o,f)?.writable)&&(d=a(()=>{var v=Ce(b?o[f]:F),p=R(v);return p}),n.set(f,d)),d!==void 0){var h=c(d);return h===F?void 0:h}return Reflect.get(o,f,l)},getOwnPropertyDescriptor(o,f){var l=Reflect.getOwnPropertyDescriptor(o,f);if(l&&"value"in l){var d=n.get(f);d&&(l.value=c(d))}else if(l===void 0){var b=n.get(f),h=b?.v;if(b!==void 0&&h!==F)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(o,f){if(f===gt)return!0;var l=n.get(f),d=l!==void 0&&l.v!==F||Reflect.has(o,f);if(l!==void 0||y!==null&&(!d||Ie(o,f)?.writable)){l===void 0&&(l=a(()=>{var h=d?Ce(o[f]):F,v=R(h);return v}),n.set(f,l));var b=c(l);if(b===F)return!1}return d},set(o,f,l,d){var b=n.get(f),h=f in o;if(r&&f==="length")for(var v=l;v<b.v;v+=1){var p=n.get(v+"");p!==void 0?m(p,F):v in o&&(p=a(()=>R(F)),n.set(v+"",p))}if(b===void 0)(!h||Ie(o,f)?.writable)&&(b=a(()=>R(void 0)),m(b,Ce(l)),n.set(f,b));else{h=b.v!==F;var E=a(()=>Ce(l));m(b,E)}var _=Reflect.getOwnPropertyDescriptor(o,f);if(_?.set&&_.set.call(d,l),!h){if(r&&typeof f=="string"){var N=n.get("length"),S=Number(f);Number.isInteger(S)&&S>=N.v&&m(N,S+1)}ot(i)}return!0},ownKeys(o){c(i);var f=Reflect.ownKeys(o).filter(b=>{var h=n.get(b);return h===void 0||h.v!==F});for(var[l,d]of n)d.v!==F&&!(l in o)&&f.push(l);return f},setPrototypeOf(){Mi()}})}var _r,pr,gr,xr;function nn(){if(_r===void 0){_r=window,pr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;gr=Ie(t,"firstChild").get,xr=Ie(t,"nextSibling").get,Vn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Vn(n)&&(n.__t=void 0)}}function xe(e=""){return document.createTextNode(e)}function Fe(e){return gr.call(e)}function se(e){return xr.call(e)}function O(e,t){if(!k)return Fe(e);var n=Fe(P);if(n===null)n=P.appendChild(xe());else if(t&&n.nodeType!==xt){var r=xe();return n?.before(r),J(r),r}return t&&sn(n),J(n),n}function mr(e,t=!1){if(!k){var n=Fe(e);return n instanceof Comment&&n.data===""?se(n):n}if(t){if(P?.nodeType!==xt){var r=xe();return P?.before(r),J(r),r}sn(P)}return P}function A(e,t=1,n=!1){let r=k?P:e;for(var i;t--;)i=r,r=se(r);if(!k)return r;if(n){if(r?.nodeType!==xt){var s=xe();return r===null?i?.after(s):r.before(s),J(s),s}sn(r)}return J(r),r}function os(e){e.textContent=""}function ls(){return!1}function rn(e,t,n){return document.createElementNS(Ln,e,void 0)}function sn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===xt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}let yr=!1;function wr(){yr||(yr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Tt(e){var t=x,n=y;Y(null),ee(null);try{return e()}finally{Y(t),ee(n)}}function as(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),wr()}function fs(e){y===null&&(x===null&&Ai(),Pi()),Oe&&Si()}function us(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ve(e,t){var n=y;n!==null&&(n.f&de)!==0&&(e|=de);var r={ctx:X,deps:null,nodes:null,f:e|V|K,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&Ke)!==0)et!==null?et.push(r):pe.ensure().schedule(r);else if(t!==null){try{tt(r)}catch(a){throw B(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ee)===0&&(i=i.first,(e&we)!==0&&(e&Xe)!==0&&i!==null&&(i.f|=Xe))}if(i!==null&&(i.parent=n,n!==null&&us(i,n),x!==null&&(x.f&L)!==0&&(e&$e)===0)){var s=x;(s.effects??=[]).push(i)}return r}function on(){return x!==null&&!oe}function $r(e){const t=ve(pt,null);return j(t,I),t.teardown=e,t}function cs(e){fs();var t=y.f,n=!x&&(t&ue)!==0&&(t&ke)===0;if(n){var r=X;(r.e??=[]).push(e)}else return kr(e)}function kr(e){return ve(Ke|$i,e)}function ds(e){pe.ensure();const t=ve($e|Ee,e);return()=>{B(t)}}function hs(e){pe.ensure();const t=ve($e|Ee,e);return(n={})=>new Promise(r=>{n.outro?lt(t,()=>{B(t),r(void 0)}):(B(t),r(void 0))})}function vs(e){return ve(Ke,e)}function bs(e){return ve(Ut|Ee,e)}function ln(e,t=0){return ve(pt|t,e)}function D(e,t=[],n=[],r=[]){Zi(r,t,n,i=>{ve(pt,()=>e(...i.map(c)))})}function an(e,t=0){var n=ve(we|t,e);return n}function me(e){return ve(ue|Ee,e)}function Er(e){var t=e.teardown;if(t!==null){const n=Oe,r=x;Nr(!0),Y(null);try{t.call(null)}finally{Nr(n),Y(r)}}}function fn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Tt(()=>{i.abort(_e)});var r=n.next;(n.f&$e)!==0?n.parent=null:B(n,t),n=r}}function _s(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&B(t),t=n}}function B(e,t=!0){var n=!1;(t||(e.f&qn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ps(e.nodes.start,e.nodes.end),n=!0),j(e,Yn),fn(e,t&&!n),ft(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Er(e),e.f^=Yn,e.f|=re;var i=e.parent;i!==null&&i.first!==null&&Tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ps(e,t){for(;e!==null;){var n=e===t?null:se(e);e.remove(),e=n}}function Tr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function lt(e,t,n=!0){var r=[];Sr(e,r,!0);var i=()=>{n&&B(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function Sr(e,t,n){if((e.f&de)===0){e.f^=de;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&Xe)!==0||(i.f&ue)!==0&&(e.f&we)!==0;Sr(i,t,a?n:!1),i=s}}}function gs(e){Pr(e,!0)}function Pr(e,t){if((e.f&de)!==0){e.f^=de,(e.f&I)===0&&(j(e,V),pe.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Xe)!==0||(n.f&ue)!==0;Pr(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Ar(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:se(n);t.append(n),n=i}}let St=!1,Oe=!1;function Nr(e){Oe=e}let x=null,oe=!1;function Y(e){x=e}let y=null;function ee(e){y=e}let te=null;function Cr(e){x!==null&&(te===null?te=[e]:te.push(e))}let G=null,U=0,ne=null;function xs(e){ne=e}let Or=1,Ve=0,He=Ve;function Rr(e){He=e}function Mr(){return++Or}function at(e){var t=e.f;if((t&V)!==0)return!0;if(t&L&&(e.f&=~ze),(t&ce)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(at(s)&&dr(s),s.wv>e.wv)return!0}(t&K)!==0&&ie===null&&j(e,I)}return!1}function jr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(te!==null&&Ze.call(te,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&L)!==0?jr(s,t,!1):t===s&&(n?j(s,V):(s.f&I)!==0&&j(s,ce),Qt(s))}}function Dr(e){var t=G,n=U,r=ne,i=x,s=te,a=X,o=oe,f=He,l=e.f;G=null,U=0,ne=null,x=(l&(ue|$e))===0?e:null,te=null,Qe(e.ctx),oe=!1,He=++Ve,e.ac!==null&&(Tt(()=>{e.ac.abort(_e)}),e.ac=null);try{e.f|=Jt;var d=e.fn,b=d();e.f|=ke;var h=e.deps,v=T?.is_fork;if(G!==null){var p;if(v||ft(e,U),h!==null&&U>0)for(h.length=U+G.length,p=0;p<G.length;p++)h[U+p]=G[p];else e.deps=h=G;if(on()&&(e.f&K)!==0)for(p=U;p<h.length;p++)(h[p].reactions??=[]).push(e)}else!v&&h!==null&&U<h.length&&(ft(e,U),h.length=U);if(er()&&ne!==null&&!oe&&h!==null&&(e.f&(L|ce|V))===0)for(p=0;p<ne.length;p++)jr(ne[p],e);if(i!==null&&i!==e){if(Ve++,i.deps!==null)for(let E=0;E<n;E+=1)i.deps[E].rv=Ve;if(t!==null)for(const E of t)E.rv=Ve;ne!==null&&(r===null?r=ne:r.push(...ne))}return(e.f&Te)!==0&&(e.f^=Te),b}catch(E){return nr(E)}finally{e.f^=Jt,G=t,U=n,ne=r,x=i,te=s,Qe(a),oe=o,He=f}}function ms(e,t){let n=t.reactions;if(n!==null){var r=_i.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&L)!==0&&(G===null||!Ze.call(G,t))){var s=t;(s.f&K)!==0&&(s.f^=K,s.f&=~ze),Zt(s),rs(s),ft(s,0)}}function ft(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ms(e,n[r])}function tt(e){var t=e.f;if((t&re)===0){j(e,I);var n=y,r=St;y=e,St=!0;try{(t&(we|Bn))!==0?_s(e):fn(e),Er(e);var i=Dr(e);e.teardown=typeof i=="function"?i:null,e.wv=Or;var s;vi&&Fi&&(e.f&V)!==0&&e.deps}finally{St=r,y=n}}}async function ys(){await Promise.resolve(),Q()}function c(e){var t=e.f,n=(t&L)!==0;if(x!==null&&!oe){var r=y!==null&&(y.f&re)!==0;if(!r&&(te===null||!Ze.call(te,e))){var i=x.deps;if((x.f&Jt)!==0)e.rv<Ve&&(e.rv=Ve,G===null&&i!==null&&i[U]===e?U++:G===null?G=[e]:G.push(e));else{(x.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[x]:Ze.call(s,x)||s.push(x)}}}if(Oe&&Ne.has(e))return Ne.get(e);if(n){var a=e;if(Oe){var o=a.v;return((a.f&I)===0&&a.reactions!==null||zr(a))&&(o=en(a)),Ne.set(a,o),o}var f=(a.f&K)===0&&!oe&&x!==null&&(St||(x.f&K)!==0),l=(a.f&ke)===0;at(a)&&(f&&(a.f|=K),dr(a)),f&&!l&&(hr(a),Ir(a))}if(ie?.has(e))return ie.get(e);if((e.f&Te)!==0)throw e.v;return e.v}function Ir(e){if(e.f|=K,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&L)!==0&&(t.f&K)===0&&(hr(t),Ir(t))}function zr(e){if(e.v===F)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ne.has(t)||(t.f&L)!==0&&zr(t))return!0;return!1}function un(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const ut=Symbol("events"),Lr=new Set,cn=new Set;function ws(e,t,n,r={}){function i(s){if(r.capture||dn.call(t,s),!s.cancelBubble)return Tt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Se(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function W(e,t,n,r,i){var s={capture:r,passive:i},a=ws(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&$r(()=>{t.removeEventListener(e,a,s)})}function q(e,t,n){(t[ut]??={})[e]=n}function $s(e){for(var t=0;t<e.length;t++)Lr.add(e[t]);for(var n of cn)n(e)}let Fr=null;function dn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Fr=e;var a=0,o=Fr===e&&e[ut];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[ut]=t;return}var l=i.indexOf(t);if(l===-1)return;f<=l&&(a=f)}if(s=i[a]||e.target,s!==t){_t(e,"currentTarget",{configurable:!0,get(){return s||n}});var d=x,b=y;Y(null),ee(null);try{for(var h,v=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[ut]?.[r];E!=null&&(!s.disabled||e.target===s)&&E.call(s,e)}catch(_){h?v.push(_):h=_}if(e.cancelBubble||p===t||p===null)break;s=p}if(h){for(let _ of v)queueMicrotask(()=>{throw _});throw h}}finally{e[ut]=t,delete e.currentTarget,Y(d),ee(b)}}}const ks=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Es(e){return ks?.createHTML(e)??e}function Ts(e){var t=rn("template");return t.innerHTML=Es(e.replaceAll("<!>","<!---->")),t.content}function Pt(e,t){var n=y;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Be(e,t){var n=(t&di)!==0,r=(t&hi)!==0,i,s=!e.startsWith("<!>");return()=>{if(k)return Pt(P,null),P;i===void 0&&(i=Ts(s?e:"<!>"+e),n||(i=Fe(i)));var a=r||pr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Fe(a),f=a.lastChild;Pt(o,f)}else Pt(a,a);return a}}function Re(e,t){if(k){var n=y;((n.f&ke)===0||n.nodes.end===null)&&(n.nodes.end=P),Wt();return}e!==null&&e.before(t)}const Ss=["touchstart","touchmove"];function Ps(e){return Ss.includes(e)}function At(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Vr(e,t){return Hr(e,t)}function As(e,t){nn(),t.intro=t.intro??!1;const n=t.target,r=k,i=P;try{for(var s=Fe(n);s&&(s.nodeType!==rt||s.data!==jn);)s=se(s);if(!s)throw We;he(!0),J(s);const a=Hr(e,{...t,anchor:s});return he(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==We&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Ci(),nn(),os(n),he(!1),Vr(e,t)}finally{he(r),J(i)}}const Nt=new Map;function Hr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:o}){nn();var f=void 0,l=hs(()=>{var d=n??t.appendChild(xe());Ui(d,{pending:()=>{}},v=>{Xn({});var p=X;if(s&&(p.c=s),i&&(r.$$events=i),k&&Pt(v,null),f=e(v,r)||{},k&&(y.nodes.end=P,P===null||P.nodeType!==rt||P.data!==zn))throw mt(),We;Qn()},o);var b=new Set,h=v=>{for(var p=0;p<v.length;p++){var E=v[p];if(!b.has(E)){b.add(E);var _=Ps(E);for(const le of[t,document]){var N=Nt.get(le);N===void 0&&(N=new Map,Nt.set(le,N));var S=N.get(E);S===void 0?(le.addEventListener(E,dn,{passive:_}),N.set(E,1)):N.set(E,S+1)}}}};return h(pi(Lr)),cn.add(h),()=>{for(var v of b)for(const _ of[t,document]){var p=Nt.get(_),E=p.get(v);--E==0?(_.removeEventListener(v,dn),p.delete(v),p.size===0&&Nt.delete(_)):p.set(v,E)}cn.delete(h),d!==n&&d.parentNode?.removeChild(d)}});return hn.set(f,l),f}let hn=new WeakMap;function Ns(e,t){const n=hn.get(e);return n?(hn.delete(e),n(t)):Promise.resolve()}class Cs{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)gs(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(a);o&&(B(o.effect),this.#t.delete(a))}for(const[s,a]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();Ar(a,l),l.append(xe()),this.#t.set(s,{effect:a,fragment:l})}else B(a);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),lt(a,o,!1)):o()}}};#o=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(B(i.effect),this.#t.delete(r))};ensure(t,n){var r=T,i=ls();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),a=xe();s.append(a),this.#t.set(t,{effect:me(()=>n(a)),fragment:s})}else this.#n.set(t,me(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#o)}else k&&(this.anchor=P),this.#r(r)}}function Ct(e,t,n=!1){var r;k&&(r=P,Wt());var i=new Cs(e),s=n?Xe:0;function a(o,f){if(k){var l=zi(r);if(o!==parseInt(l.substring(1))){var d=Wn();J(d),i.anchor=d,he(!1),i.ensure(o,f),he(!0);return}}i.ensure(o,f)}an(()=>{var o=!1;t((f,l=0)=>{o=!0,a(l,f)}),o||a(-1,null)},s)}function Os(e,t){let n=null,r=k;var i;if(k){n=P;for(var s=Fe(document.head);s!==null&&(s.nodeType!==rt||s.data!==e);)s=se(s);if(s===null)he(!1);else{var a=se(s);s.remove(),J(a)}}k||(i=document.head.appendChild(xe()));try{an(()=>t(i),qn|Ee)}finally{r&&(he(!0),J(n))}}function Rs(e,t){vs(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=rn("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Ms(e,t,n){var r=e==null?"":""+e;return t&&(r=r?r+" "+t:t),r===""?null:r}function js(e,t){return e==null?null:String(e)}function z(e,t,n,r,i,s){var a=e.__className;if(k||a!==n||a===void 0){var o=Ms(n,r);(!k||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return s}function Ot(e,t,n,r){var i=e.__style;if(k||i!==t){var s=js(t);(!k||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Ds=Symbol("is custom element"),Is=Symbol("is html"),zs=Ei?"link":"LINK";function Br(e){if(k){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;ct(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;ct(e,"checked",null),e.checked=i}}};e.__on_r=n,Se(n),wr()}}function ct(e,t,n,r){var i=Ls(e);k&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===zs)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[ki]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Yr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $(e,t,n){var r=x,i=y;let s=k;k&&he(!1),Y(null),ee(null);try{t!=="style"&&(vn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Yr(e).includes(t):n&&typeof n=="object")?e[t]=n:ct(e,t,n==null?n:String(n))}finally{Y(r),ee(i),s&&he(!0)}}function Ls(e){return e.__attributes??={[Ds]:e.nodeName.includes("-"),[Is]:e.namespaceURI===Ln}}var vn=new Map;function Yr(e){var t=e.getAttribute("is")||e.nodeName,n=vn.get(t);if(n)return n;vn.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=gi(i);for(var a in r)r[a].set&&n.push(a);i=Fn(i)}return n}function Gr(e,t,n=t){var r=new WeakSet;as(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=bn(e)?_n(s):s,n(s),T!==null&&r.add(T),await ys(),s!==(s=t())){var a=e.selectionStart,o=e.selectionEnd,f=e.value.length;if(e.value=s??"",o!==null){var l=e.value.length;a===o&&o===f&&l>f?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=a,e.selectionEnd=Math.min(o,l))}}}),(k&&e.defaultValue!==e.value||un(t)==null&&e.value)&&(n(bn(e)?_n(e.value):e.value),T!==null&&r.add(T)),ln(()=>{var i=t();if(e===document.activeElement){var s=T;if(r.has(s))return}bn(e)&&i===_n(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function bn(e){var t=e.type;return t==="number"||t==="range"}function _n(e){return e===""?null:+e}function be(e,t,n,r){var i=(n&ui)!==0,s=(n&ci)!==0,a=r,o=!0,f=()=>(o&&(o=!1,a=s?un(r):r),a);let l;if(i){var d=gt in e||Jn in e;l=Ie(e,t)?.set??(d&&t in e?S=>e[t]=S:void 0)}var b,h=!1;i?[b,h]=Bi(()=>e[t]):b=e[t],b===void 0&&r!==void 0&&(b=f(),l&&(Oi(),l(b)));var v;if(v=()=>{var S=e[t];return S===void 0?f():(o=!0,S)},(n&fi)===0)return v;if(l){var p=e.$$legacy;return(function(S,le){return arguments.length>0?((!le||p||h)&&l(le?v():S),S):v()})}var E=!1,_=((n&ai)!==0?kt:es)(()=>(E=!1,v()));i&&c(_);var N=y;return(function(S,le){if(arguments.length>0){const Ye=le?c(_):i?Ce(S):S;return m(_,Ye),E=!0,a!==void 0&&(a=Ye),S}return Oe&&E||(N.f&re)!==0?_.v:c(_)})}function Fs(e){return new Vs(e)}class Vs{#e;#n;constructor(t){var n=new Map,r=(s,a)=>{var o=is(a,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return c(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===Jn?!0:(c(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return m(n.get(a)??r(a,o),o),Reflect.set(s,a,o)}});this.#n=(t.hydrate?As:Vr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||_t(this,s,{get(){return this.#n[s]},set(a){this.#n[s]=a},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{Ns(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let qr;typeof HTMLElement=="function"&&(qr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=rn("slot");r!=="default"&&(s.name=r),Re(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Hs(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Rt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Fs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ds(()=>{ln(()=>{this.$$r=!0;for(const r of bt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Rt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Rt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return bt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Rt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Hs(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Bs(e,t,n,r,i,s){let a=class extends qr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return bt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return bt(t).forEach(o=>{_t(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=Rt(o,f,t),this.$$d[o]=f;var l=this.$$c;if(l){var d=Ie(l,o)?.get;d?l[o]=f:l.$set({[o]:f})}}})}),r.forEach(o=>{_t(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const Mt={version:"0.66.4"};function jt(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var Ys=Be('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-eex92x"/>'),Gs=Be("<hb-table></hb-table>",2),qs=Be("<hb-pad-joystick></hb-pad-joystick>",2),Js=Be("<hb-pad-joystick></hb-pad-joystick>",2),Us=Be('<div id="controller" class="svelte-eex92x"><div id="panel" class="svelte-eex92x"><div id="joystick" class="area svelte-eex92x"><!></div> <div id="buttons" class="area svelte-eex92x"><div class="btn-group svelte-eex92x" style="margin-right:10px"><button class="btn btn-sm btn-light svelte-eex92x" aria-label="Zoom In"><i class="bi bi-zoom-in svelte-eex92x"></i></button> <button class="btn btn-sm btn-light svelte-eex92x" aria-label="Zoom Out"><i class="bi bi-zoom-out svelte-eex92x"></i></button></div> <button aria-label="Go to home"><i class="bi bi-house-door-fill svelte-eex92x"></i></button> <button aria-label="select zone"><i class="bi bi-square svelte-eex92x"></i></button></div> <div id="speed" class="area svelte-eex92x"><span class="slider_label svelte-eex92x">speed:</span> <input class="range svelte-eex92x" type="range"/></div> <div id="precision" class="area svelte-eex92x"><span class="slider_label svelte-eex92x">precision:</span> <input class="range svelte-eex92x" type="range"/></div> <div id="presets_view" class="area svelte-eex92x"><button aria-label="showGrid"><i class="bi bi-grid-3x3 svelte-eex92x"></i></button> <button aria-label="Toggle joystick mode"><i class="bi bi-joystick svelte-eex92x"></i></button> <button style="float:right;margin-right:5px;" class="btn btn-sm btn-light svelte-eex92x" aria-label="Enter fullscreen mode"><i class="bi bi-arrows-fullscreen svelte-eex92x"></i></button></div> <div id="presets_select" class="area svelte-eex92x"><button class="btn btn-sm btn-light svelte-eex92x" aria-label="Add Scene to Preset"><i class="bi bi-plus-circle-fill svelte-eex92x"></i></button> <button style="width:130px!important;display:inline-block!important" aria-label="Open Presets Modal"> <i style="float:right" class="bi bi-arrow-down-up svelte-eex92x"></i></button></div> <div id="presets_buttons" class="area svelte-eex92x"><button><i></i></button> <button><i></i></button> <button class="btn btn-sm btn-light svelte-eex92x" aria-label="Open settings"><i class="bi bi-sliders svelte-eex92x"></i> <span class="timecell svelte-eex92x"><span class="svelte-eex92x"> </span></span></button></div></div></div>'),Ws=Be('<!> <div id="opener" class="svelte-eex92x"><i></i></div>',1),Zs=Be('<hb-dialog><div slot="body-content" class="svelte-eex92x"><!></div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x">Are You sure to add this scene to the preset?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x">Are You sure to go To Home?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x"> </div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-eex92x"> </div></hb-dialog> <div id="container" class="svelte-eex92x"><hb-player-live></hb-player-live> <div id="area_selector" class="svelte-eex92x"></div> <div id="grid" class="svelte-eex92x"><table id="grid_table" class="svelte-eex92x"><tbody class="svelte-eex92x"><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr><tr class="svelte-eex92x"><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td><td class="svelte-eex92x"></td></tr></tbody></table></div> <!></div>',3);const Ks={hash:"svelte-eex92x",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
3
  @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;}#grid_table.svelte-eex92x {width:100%;height:100%;}#area_selector.svelte-eex92x {position:absolute;z-index:2;border:solid 2px red;}#grid.svelte-eex92x {position:absolute;top:0px;z-index:2;width:100%;height:100%;}#grid.svelte-eex92x td:where(.svelte-eex92x) {border:2px solid black;}.area.svelte-eex92x {padding:5px;}#container.svelte-eex92x {position:relative;width:100%;height:100%;display:block;min-height:160px;}hb-pad-joystick.svelte-eex92x {--hb-pad-joystick-size: 100px;}#joystick.svelte-eex92x {grid-area:pad;margin-top:7px;display:block;width:100%;text-align:center;}#buttons.svelte-eex92x {grid-area:buttons;}#presets_buttons.svelte-eex92x {grid-area:presets_buttons;}#speed.svelte-eex92x {grid-area:speed;text-align:center;vertical-align:middle;line-height:28px;}#precision.svelte-eex92x {grid-area:precision;text-align:center;vertical-align:middle;line-height:28px;}#presets_select.svelte-eex92x {grid-area:presets_select;}#presets_view.svelte-eex92x {grid-area:presets_view;}#controller.svelte-eex92x {position:absolute;top:calc(100% - 160px);width:100%;z-index:3;}#opener.svelte-eex92x {background-color:silver;line-height:126px;vertical-align:middle;position:absolute;position:absolute;top:calc(100% - 160px);z-index:4;cursor:pointer;}#panel.svelte-eex92x {display:grid;width:500px;height:126px;background-color:rgba(127, 127, 127, 0.8);grid-template-areas:"pad buttons presets_view opener" "pad speed presets_select opener" "pad precision presets_buttons opener";grid-template-columns:120px 200px 180px;grid-template-rows:42px 42px 42px;}.slider_label.svelte-eex92x {font-size:0.6em;width:50px;display:inline-block;font-weight:bold;}#player.svelte-eex92x {z-index:1;}.timecell.svelte-eex92x {font-size:0.8em;line-height:20px;width:56px;display:inline-block;vertical-align:middle;}.range.svelte-eex92x {vertical-align:middle;line-height:28px;}
4
4
  /*!
5
5
  * Bootstrap v5.3.8 (https://getbootstrap.com/)
@@ -72,5 +72,5 @@ button.svelte-eex92x {margin:0;font-family:inherit;font-size:inherit;line-height
72
72
  @media (min-width: 1200px) {
73
73
  }
74
74
  @media print {
75
- }`};function Wr(e,t){Qn(t,!0),Ms(e,eo);function n(u,g){t.$$host.dispatchEvent(new CustomEvent(u,{detail:g}))}const r={joystick:!0,presets:!0,deletePreset:!0,addPreset:!0,switchPreset:!0,home:!0,zoom:{in:!0,out:!0},pan:!0,tilt:!0,clickToCenter:!0,settings:!0};let i=be(t,"id",7,""),s=be(t,"live_uri",7,""),l=be(t,"media_type",7,"auto"),o=be(t,"presets",23,()=>[]),f=be(t,"position",7,"right-bottom"),a=be(t,"configuration",7,r),d=be(t,"current_preset",7,""),b=be(t,"is_home",7,void 0),h=be(t,"is_ptz_connected",7,void 0),v=be(t,"is_ptz_panel_opened",7,void 0);const _=[{label:"Name",key:"name",copyTxt:!0},{label:"Token",key:"token",copyTxt:!0}],E=[{name:"goto",type:"icon",iconOrText:"arrow-right-circle"},{name:"delete",type:"icon",iconOrText:"x-circle-fill",btnClass:"danger"}];let p=R(void 0),C=R("");const P={precision:50,speed:50};let le=R(Ne(new Date().toLocaleTimeString())),Ge=ts(()=>o()?.map(u=>({_id:u.token+"_"+u.name,name:u.name,token:u.token}))),gn=R(!0),Lt=R(!1),ht=R(!1),vt=R(!1),It=R(!1),xn=R(!1),mn=R(!1),zt=R(!1),Ft=R(!1),De=R("dpad"),ye=R(!1),Me=R(Ne({top:0,left:0,width:0,height:0})),w={};hs(()=>{if(h()===""&&h(!0),h()||h(!1),typeof h()=="string"&&h(h()==="true"||h()==="yes"),v()===""&&v(!0),v()||v(!1),typeof v()=="string"&&v(v()==="true"||v()==="yes"),b()===""&&b(!0),b()||b(!1),typeof b()=="string"&&b(b()==="true"||b()==="yes"),typeof a()=="string")try{a(JSON.parse(a()))}catch{}if(typeof o()=="string")try{o(JSON.parse(o()))}catch{}}),setInterval(()=>{m(le,new Date().toLocaleTimeString(),!0)},1e3);function Zr(u){if(!a()?.zoom)return console.error("Zoom is not enabled in the configuration");if(!a().zoom[u])return console.error(`Zoom ${u} is not enabled in the configuration`);const g={time:new Date,id:i(),movementSettings:P,direction:u};n("zoomAction",g)}function to(){if(!a()?.home)return console.error("Go to home is not enabled in the configuration");i(),n("goToHome",{id:i(),movementSettings:P})}function no(){if(!a()?.addPreset)return console.error("Add scene to preset is not enabled in the configuration");const u={time:new Date,id:i()};n("setPreset",u)}function ro(){if(!a()?.clickToCenter)return console.error("Click to center is not enabled in the configuration");const u=c(p)?.getBoundingClientRect(),g=Object.assign({time:new Date,id:i(),movementSettings:P,htmlVideoElementWidth:u?.width,htmlVideoElementHeight:u?.height},c(Me));n("goToSelectedArea",g),m(ye,!1),m(Me,{top:0,left:0,width:0,height:0},!0),w={}}function io(){if(!a()?.presets)return console.error("Presets is not enabled in the configuration");m(vt,!c(vt))}function so(){if(!a()?.addPreset)return console.error("Add scene to preset is not enabled in the configuration");m(It,!c(It))}function oo(){if(!a()?.home)return console.error("Go to home is not enabled in the configuration");m(zt,!c(zt))}function lo(u){if(!a()?.switchPreset)return console.error("Switch preset is not enabled in the configuration");const g=o()?.find?.(D=>D.token===u);if(g){const D=Object.assign({time:new Date,playerId:i(),movementSettings:P},g);n("goToPreset",D)}else console.error("Preset not found")}function ao(){const u={time:new Date,id:i(),htmlVideoElement:c(p)};n("initVideo",u),c(p)&&(c(p).onloadedmetadata=()=>{m(ht,!0)},c(p).onpause=()=>{m(gn,!0),m(Lt,!1)},c(p).onplay=()=>{m(gn,!1),m(Lt,!0)},c(p).onclick=g=>{if(c(ye)){const D=c(p)?.getBoundingClientRect(),Ht={x:g.clientX-D?.left,y:g.clientY-D?.top,width:0,height:0};w.start?(w={start:w.start,end:Ht},ro()):w={start:Ht}}},c(p).onmousemove=g=>{if(c(ye)){const D={x:g.clientX,y:g.clientY};w.start&&(w={start:w.start,end:D},m(Me,{top:w.start.y>w.end.y?w.end.y:w.start.y,left:w.start.x>w.end.x?w.end.x:w.start.x,width:Math.abs((w?.start?.x||0)-(w?.end?.x||0)),height:Math.abs((w?.start?.y||0)-(w?.end?.y||0))},!0))}})}function fo(u){if(!a()?.deletePreset)return console.error("Delete preset is not enabled in the configuration");const g=o()?.find(D=>D.token===u);if(g){const D=Object.assign({time:new Date,playerId:i()},g);n("deletePreset",D)}else console.error("Preset not found")}function uo(u){if(!a()?.joystick||a()?.pan||a()?.tilt)return console.error("Pan and Tilt on joystick are not enabled in the configuration");n("sendJoystickPosition",{id:i(),x:u.x,y:u.y,cardinalDirection:u.cardinalDirection,joyId:u.id,movementSettings:P})}function co(u){a()?.pan&&a()?.tilt?n("sendDirection",{id:i(),movementSettings:P,direction:u.direction,joyId:u.id}):console.error("Pan and Tilt are not enabled in the configuration")}function ho(){m(Ft,!c(Ft))}function vo(){if(!a()?.clickToCenter)return console.error("Click to center is not enabled in the configuration");m(ye,!c(ye))}function bo(){if(c(De)==="dpad"){if(!a()?.joystick)return console.error("Joystick is not enabled in the configuration");m(De,"joystick")}else m(De,"dpad")}function jo(){}function _o(u){console.log(u,"presetclick"),m(vt,!1);const g=o()?.find(D=>u.itemId.includes(D.token+"_"))?.token;switch(g&&m(C,g,!0),u.action){case"goto":m(mn,!0);break;case"delete":m(xn,!0);break;default:return console.error("Action not found")}}function po(){if(!c(p))return console.error("Video element not found");c(p).paused?c(p).play():c(p).pause()}jt.addComponent({repoName:"@htmlbricks/hb-player-live",version:Mt.version}),jt.addComponent({repoName:"@htmlbricks/hb-pad-joystick",version:Mt.version}),jt.addComponent({repoName:"@htmlbricks/hb-table",version:Mt.version}),jt.addComponent({repoName:"@htmlbricks/hb-dialog",version:Mt.version});var go={get id(){return i()},set id(u=""){i(u),Q()},get live_uri(){return s()},set live_uri(u=""){s(u),Q()},get media_type(){return l()},set media_type(u="auto"){l(u),Q()},get presets(){return o()},set presets(u=[]){o(u),Q()},get position(){return f()},set position(u="right-bottom"){f(u),Q()},get configuration(){return a()},set configuration(u=r){a(u),Q()},get current_preset(){return d()},set current_preset(u=""){d(u),Q()},get is_home(){return b()},set is_home(u=void 0){b(u),Q()},get is_ptz_connected(){return h()},set is_ptz_connected(u=void 0){h(u),Q()},get is_ptz_panel_opened(){return v()},set is_ptz_panel_opened(u=void 0){v(u),Q()}},Xr=Qs();Ds("eex92x",u=>{var g=Js();Re(u,g)});var je=yr(Xr);$(je,"title","Presets"),j(()=>$(je,"show",c(vt)?"yes":"no")),$(je,"hide_confirm","yes"),I(je,1,"svelte-eex92x");var Kr=O(je),xo=O(Kr);{var mo=u=>{var g=Us();j(()=>$(g,"rows",JSON.stringify(c(Ge)))),j(()=>$(g,"headers",JSON.stringify(_))),j(()=>$(g,"actions",JSON.stringify(E))),$(g,"size","12"),j(()=>$(g,"disablepagination",c(Ge)&&c(Ge).length<12?"yes":"no")),I(g,1,"svelte-eex92x"),W("tableaction",g,D=>{_o(D.detail)}),Re(u,g)};Ot(xo,u=>{c(Ge)?.length&&u(mo)})}N(Kr),N(je);var rt=A(je,2);$(rt,"title","Add Scene to Preset"),j(()=>$(rt,"show",c(It)?"yes":"no")),I(rt,1,"svelte-eex92x");var qe=A(rt,2);$(qe,"title","Go to Home"),j(()=>$(qe,"show",c(zt)?"yes":"no")),$(qe,"confirmlabel","GO"),I(qe,1,"svelte-eex92x");var ae=A(qe,2);j(()=>$(ae,"id","del_"+c(C))),j(()=>$(ae,"title",`Go to Preset ${(c(C)?o()?.find(u=>u.token===c(C))?.token:"")??""}`)),j(()=>$(ae,"show",c(xn)?"yes":"no")),$(ae,"confirmlabel","delete"),$(ae,"confirm_btn_class","danger"),I(ae,1,"svelte-eex92x");var Qr=O(ae),yo=O(Qr);N(Qr),N(ae);var fe=A(ae,2);j(()=>$(fe,"id","goto_"+c(C))),j(()=>$(fe,"title",`Go to Preset ${(c(C)?o()?.find(u=>u.token===c(C))?.token:"")??""}`)),j(()=>$(fe,"show",c(mn)?"yes":"no")),$(fe,"confirmlabel","go"),$(fe,"confirm_btn_class","light"),I(fe,1,"svelte-eex92x");var ei=O(fe),wo=O(ei);N(ei),N(fe);var Vt=A(fe,2),Je=O(Vt);$(Je,"no_controls","yes"),$(Je,"id","player"),j(()=>$(Je,"mediauri",s())),j(()=>$(Je,"media_type",l())),I(Je,1,"svelte-eex92x");var ti=A(Je,2),ni=A(ti,2),$o=A(ni,2);{var ko=u=>{var g=Ks(),D=yr(g);{var Ht=yn=>{var wn=Xs(),ri=O(wn),$n=O(ri),To=O($n);{var Po=H=>{var Z=Ws();j(()=>$(Z,"id","pad_"+c(De))),$(Z,"pad_or_joystick","dpad"),$(Z,"size","60px"),I(Z,1,"svelte-eex92x"),W("sendDirection",Z,Dn=>{co(Dn.detail)}),Re(H,Z)},So=H=>{var Z=Zs();j(()=>$(Z,"id","pad_"+c(De))),$(Z,"pad_or_joystick","joystick"),$(Z,"size","60px"),I(Z,1,"svelte-eex92x"),W("sendJoystickPosition",Z,Dn=>{uo(Dn.detail)}),Re(H,Z)};Ot(To,H=>{c(De)==="dpad"?H(Po):H(So,-1)})}N($n);var kn=A($n,2),En=O(kn),Tn=O(En),ii=A(Tn,2);N(En);var Yt=A(En,2),Pn=A(Yt,2);N(kn);var Sn=A(kn,2),si=A(O(Sn),2);Yr(si),N(Sn);var An=A(Sn,2),oi=A(O(An),2);Yr(oi),N(An);var Cn=A(An,2),Nn=O(Cn),Gt=A(Nn,2),Ao=A(Gt,2);N(Cn);var On=A(Cn,2),Rn=O(On),bt=A(Rn,2),Co=O(bt);Wn(),N(bt),N(On);var li=A(On,2),Ue=O(li),No=O(Ue);N(Ue);var We=A(Ue,2),Oo=O(We);N(We);var qt=A(We,2),ai=A(O(qt),2),fi=O(ai),Ro=O(fi,!0);N(fi),N(ai),N(qt),N(li),N(ri),N(wn),j(H=>{Tn.disabled=!a()?.zoom?.in,ii.disabled=!a()?.zoom?.out,Yt.disabled=!a()?.home,I(Yt,1,`btn btn-sm btn-${b()?"primary":"light"}`,"svelte-eex92x"),Pn.disabled=!a()?.clickToCenter,I(Pn,1,`btn btn-sm btn-${c(ye)?"primary":"light"}`,"svelte-eex92x"),I(Nn,1,`btn btn-sm btn-${c(Ft)?"primary":"light"}`,"svelte-eex92x"),Gt.disabled=!a()?.joystick,I(Gt,1,`btn btn-sm btn-${c(De)&&c(De)==="dpad"?"light":"primary"}`,"svelte-eex92x"),Rn.disabled=!a()?.addPreset,bt.disabled=!a()?.presets,I(bt,1,`btn btn-sm btn-${d()?"primary":"light"}`,"svelte-eex92x"),Ct(Co,`${H??""} `),Ue.disabled=!c(ht),I(Ue,1,`btn btn-sm btn-${c(ht)?c(p)?.muted?"warning":"primary":"light"}`,"svelte-eex92x"),dt(Ue,"aria-label",c(p)?.muted?"Unmute video":"Mute video"),I(No,1,`bi bi-${c(p)?.muted||!c(p)?"volume-mute-fill":"volume-up-fill"}`,"svelte-eex92x"),We.disabled=!c(ht),I(We,1,`btn btn-sm btn-${c(ht)?c(Lt)?"primary":"warning":"light"}`,"svelte-eex92x"),dt(We,"aria-label",c(Lt)?"Pause video":"Play video"),I(Oo,1,`bi bi-${c(gn)||!c(p)?"pause-fill":"play"}`,"svelte-eex92x"),qt.disabled=!a()?.settings,Ct(Ro,c(le))},[()=>d()&&o()?.find(H=>H.token===d())?o()?.find(H=>H.token===d())?.name:""]),q("click",Tn,()=>Zr("in")),q("click",ii,()=>Zr("out")),q("click",Yt,()=>oo()),q("click",Pn,()=>vo()),qr(si,()=>P.speed,H=>P.speed=H),qr(oi,()=>P.precision,H=>P.precision=H),q("click",Nn,()=>ho()),q("click",Gt,()=>bo()),q("click",Ao,()=>c(p)?.requestFullscreen()),q("click",Rn,()=>so()),q("click",bt,()=>{io()}),q("click",Ue,()=>{c(p)&&(c(p).muted=!c(p).muted)}),q("click",We,()=>po()),q("click",qt,()=>void 0),Re(yn,wn)};Ot(D,yn=>{v()&&yn(Ht)})}var Bt=A(D,2),Eo=O(Bt);N(Bt),j(()=>{Rt(Bt,`left:${v()?"500":"0"}px;`),I(Eo,1,`bi-${v()?"caret-left-fill":"caret-right-fill"}`,"svelte-eex92x")}),q("click",Bt,()=>{v(!v()),n("panelMove",{id:i(),opened:v()})}),Re(u,g)};Ot($o,u=>{h()&&u(ko)})}return N(Vt),j((u,g)=>{Ct(yo,`Are You sure to DELETE preset ${u??""}?`),Ct(wo,`Are You sure to GO to preset "${g??""}"?`),Rt(Vt,`cursor: ${c(ye)?"crosshair":""};`),Rt(ti,`display:${c(ye)?"inherit":"none"}; width:${c(Me).width??""}px; height:${c(Me).height??""}px;top:${c(Me).top??""}px;left:${c(Me).left??""}px;`),Rt(ni,`display:${c(Ft)?"inherit":"none"}`)},[()=>c(C)?o()?.find(u=>u.token===c(C))?.token:"",()=>c(C)?o()?.find(u=>u.token===c(C))?.token:""]),W("modalShow",je,u=>{m(vt,u.detail.show,!0)}),W("modalShow",rt,u=>{m(It,u.detail.show,!0)}),W("modalConfirm",rt,u=>{u?.detail?.confirm&&no()}),W("modalShow",qe,u=>{m(zt,u.detail.show,!0)}),W("modalConfirm",qe,u=>{u?.detail?.confirm&&to()}),W("modalShow",ae,u=>{m(xn,u.detail.show,!0)}),W("modalConfirm",ae,u=>{console.log(u.detail,"detail"),u?.detail?.confirm&&fo(u.detail.id.split("del_")[1])}),W("modalShow",fe,u=>{m(mn,u.detail.show,!0)}),W("modalConfirm",fe,u=>{console.log(u.detail.id.split("goto")[1],"detail"),u?.detail?.confirm&&lo(u.detail.id.split("goto_")[1])}),q("mousemove",Vt,u=>{if(c(ye)){const g=c(p)?.getBoundingClientRect(),D={x:u.clientX-g?.left,y:u.clientY-g?.top};w.start&&(w={start:w.start,end:D},m(Me,{top:w.start.y>w.end.y?w.end.y:w.start.y,left:w.start.x>w.end.x?w.end.x:w.start.x,width:Math.abs((w?.start?.x||0)-(w?.end?.x||0)),height:Math.abs((w?.start?.y||0)-(w?.end?.y||0))},!0))}}),W("htmlVideoInit",Je,u=>{console.log(u.detail,"detailvid"),m(p,u.detail.video,!0),ao()}),Re(e,Xr),er(go)}Es(["mousemove","click"]),customElements.define("hb-player-live-camera-ptz",Gs(Wr,{id:{},live_uri:{},media_type:{},presets:{},position:{},configuration:{},current_preset:{},is_home:{},is_ptz_connected:{},is_ptz_panel_opened:{}},[],[],{mode:"open"})),Mn.Component=Wr,Object.defineProperty(Mn,Symbol.toStringTag,{value:"Module"})})(this["player-live-camera-ptz"]=this["player-live-camera-ptz"]||{});
75
+ }`};function Jr(e,t){Xn(t,!0),Rs(e,Ks);function n(u,g){t.$$host.dispatchEvent(new CustomEvent(u,{detail:g}))}const r={joystick:!0,presets:!0,deletePreset:!0,addPreset:!0,switchPreset:!0,home:!0,zoom:{in:!0,out:!0},pan:!0,tilt:!0,clickToCenter:!0,settings:!0};let i=be(t,"id",7,""),s=be(t,"live_uri",7,""),a=be(t,"media_type",7,"auto"),o=be(t,"presets",23,()=>[]),f=be(t,"position",7,"right-bottom"),l=be(t,"configuration",7,r),d=be(t,"current_preset",7,""),b=be(t,"is_home",7,void 0),h=be(t,"is_ptz_connected",7,void 0),v=be(t,"is_ptz_panel_opened",7,void 0);const p=[{label:"Name",key:"name",copyTxt:!0},{label:"Token",key:"token",copyTxt:!0}],E=[{name:"goto",type:"icon",iconOrText:"arrow-right-circle"},{name:"delete",type:"icon",iconOrText:"x-circle-fill",btnClass:"danger"}];let _=R(void 0),N=R("");const S={precision:50,speed:50};let le=R(Ce(new Date().toLocaleTimeString())),Ye=Qi(()=>o()?.map(u=>({_id:u.token+"_"+u.name,name:u.name,token:u.token}))),pn=R(!0),Dt=R(!1),dt=R(!1),ht=R(!1),It=R(!1),gn=R(!1),xn=R(!1),zt=R(!1),Lt=R(!1),Me=R("dpad"),ye=R(!1),je=R(Ce({top:0,left:0,width:0,height:0})),w={};cs(()=>{if(h()===""&&h(!0),h()||h(!1),typeof h()=="string"&&h(h()==="true"||h()==="yes"),v()===""&&v(!0),v()||v(!1),typeof v()=="string"&&v(v()==="true"||v()==="yes"),b()===""&&b(!0),b()||b(!1),typeof b()=="string"&&b(b()==="true"||b()==="yes"),typeof l()=="string")try{l(JSON.parse(l()))}catch{}if(typeof o()=="string")try{o(JSON.parse(o()))}catch{}}),setInterval(()=>{m(le,new Date().toLocaleTimeString(),!0)},1e3);function Ur(u){if(!l()?.zoom)return console.error("Zoom is not enabled in the configuration");if(!l().zoom[u])return console.error(`Zoom ${u} is not enabled in the configuration`);const g={time:new Date,id:i(),movementSettings:S,direction:u};n("zoomAction",g)}function Xs(){if(!l()?.home)return console.error("Go to home is not enabled in the configuration");i(),n("goToHome",{id:i(),movementSettings:S})}function Qs(){if(!l()?.addPreset)return console.error("Add scene to preset is not enabled in the configuration");const u={time:new Date,id:i()};n("setPreset",u)}function eo(){if(!l()?.clickToCenter)return console.error("Click to center is not enabled in the configuration");const u=c(_)?.getBoundingClientRect(),g=Object.assign({time:new Date,id:i(),movementSettings:S,htmlVideoElementWidth:u?.width,htmlVideoElementHeight:u?.height},c(je));n("goToSelectedArea",g),m(ye,!1),m(je,{top:0,left:0,width:0,height:0},!0),w={}}function to(){if(!l()?.presets)return console.error("Presets is not enabled in the configuration");m(ht,!c(ht))}function no(){if(!l()?.addPreset)return console.error("Add scene to preset is not enabled in the configuration");m(It,!c(It))}function ro(){if(!l()?.home)return console.error("Go to home is not enabled in the configuration");m(zt,!c(zt))}function io(u){if(!l()?.switchPreset)return console.error("Switch preset is not enabled in the configuration");const g=o()?.find?.(M=>M.token===u);if(g){const M=Object.assign({time:new Date,playerId:i(),movementSettings:S},g);n("goToPreset",M)}else console.error("Preset not found")}function so(){const u={time:new Date,id:i(),htmlVideoElement:c(_)};n("initVideo",u),c(_)&&(c(_).onloadedmetadata=()=>{m(dt,!0)},c(_).onpause=()=>{m(pn,!0),m(Dt,!1)},c(_).onplay=()=>{m(pn,!1),m(Dt,!0)},c(_).onclick=g=>{if(c(ye)){const M=c(_)?.getBoundingClientRect(),Vt={x:g.clientX-M?.left,y:g.clientY-M?.top,width:0,height:0};w.start?(w={start:w.start,end:Vt},eo()):w={start:Vt}}},c(_).onmousemove=g=>{if(c(ye)){const M={x:g.clientX,y:g.clientY};w.start&&(w={start:w.start,end:M},m(je,{top:w.start.y>w.end.y?w.end.y:w.start.y,left:w.start.x>w.end.x?w.end.x:w.start.x,width:Math.abs((w?.start?.x||0)-(w?.end?.x||0)),height:Math.abs((w?.start?.y||0)-(w?.end?.y||0))},!0))}})}function oo(u){if(!l()?.deletePreset)return console.error("Delete preset is not enabled in the configuration");const g=o()?.find(M=>M.token===u);if(g){const M=Object.assign({time:new Date,playerId:i()},g);n("deletePreset",M)}else console.error("Preset not found")}function lo(u){if(!l()?.joystick||l()?.pan||l()?.tilt)return console.error("Pan and Tilt on joystick are not enabled in the configuration");n("sendJoystickPosition",{id:i(),x:u.x,y:u.y,cardinalDirection:u.cardinalDirection,joyId:u.id,movementSettings:S})}function ao(u){l()?.pan&&l()?.tilt?n("sendDirection",{id:i(),movementSettings:S,direction:u.direction,joyId:u.id}):console.error("Pan and Tilt are not enabled in the configuration")}function fo(){m(Lt,!c(Lt))}function uo(){if(!l()?.clickToCenter)return console.error("Click to center is not enabled in the configuration");m(ye,!c(ye))}function co(){if(c(Me)==="dpad"){if(!l()?.joystick)return console.error("Joystick is not enabled in the configuration");m(Me,"joystick")}else m(Me,"dpad")}function Ro(){}function ho(u){console.log(u,"presetclick"),m(ht,!1);const g=o()?.find(M=>u.itemId.includes(M.token+"_"))?.token;switch(g&&m(N,g,!0),u.action){case"goto":m(xn,!0);break;case"delete":m(gn,!0);break;default:return console.error("Action not found")}}function vo(){if(!c(_))return console.error("Video element not found");c(_).paused?c(_).play():c(_).pause()}jt({repoName:"@htmlbricks/hb-player-live",version:Mt.version}),jt({repoName:"@htmlbricks/hb-pad-joystick",version:Mt.version}),jt({repoName:"@htmlbricks/hb-table",version:Mt.version}),jt({repoName:"@htmlbricks/hb-dialog",version:Mt.version});var bo={get id(){return i()},set id(u=""){i(u),Q()},get live_uri(){return s()},set live_uri(u=""){s(u),Q()},get media_type(){return a()},set media_type(u="auto"){a(u),Q()},get presets(){return o()},set presets(u=[]){o(u),Q()},get position(){return f()},set position(u="right-bottom"){f(u),Q()},get configuration(){return l()},set configuration(u=r){l(u),Q()},get current_preset(){return d()},set current_preset(u=""){d(u),Q()},get is_home(){return b()},set is_home(u=void 0){b(u),Q()},get is_ptz_connected(){return h()},set is_ptz_connected(u=void 0){h(u),Q()},get is_ptz_panel_opened(){return v()},set is_ptz_panel_opened(u=void 0){v(u),Q()}},Wr=Zs();Os("eex92x",u=>{var g=Ys();Re(u,g)});var De=mr(Wr);$(De,"title","Presets"),D(()=>$(De,"show",c(ht)?"yes":"no")),$(De,"hide_confirm","yes"),z(De,1,"svelte-eex92x");var Zr=O(De),_o=O(Zr);{var po=u=>{var g=Gs();D(()=>$(g,"rows",JSON.stringify(c(Ye)))),D(()=>$(g,"headers",JSON.stringify(p))),D(()=>$(g,"actions",JSON.stringify(E))),$(g,"size","12"),D(()=>$(g,"disablepagination",c(Ye)&&c(Ye).length<12?"yes":"no")),z(g,1,"svelte-eex92x"),W("tableaction",g,M=>{ho(M.detail)}),Re(u,g)};Ct(_o,u=>{c(Ye)?.length&&u(po)})}C(Zr),C(De);var nt=A(De,2);$(nt,"title","Add Scene to Preset"),D(()=>$(nt,"show",c(It)?"yes":"no")),z(nt,1,"svelte-eex92x");var Ge=A(nt,2);$(Ge,"title","Go to Home"),D(()=>$(Ge,"show",c(zt)?"yes":"no")),$(Ge,"confirmlabel","GO"),z(Ge,1,"svelte-eex92x");var ae=A(Ge,2);D(()=>$(ae,"id","del_"+c(N))),D(()=>$(ae,"title",`Go to Preset ${(c(N)?o()?.find(u=>u.token===c(N))?.token:"")??""}`)),D(()=>$(ae,"show",c(gn)?"yes":"no")),$(ae,"confirmlabel","delete"),$(ae,"confirm_btn_class","danger"),z(ae,1,"svelte-eex92x");var Kr=O(ae),go=O(Kr);C(Kr),C(ae);var fe=A(ae,2);D(()=>$(fe,"id","goto_"+c(N))),D(()=>$(fe,"title",`Go to Preset ${(c(N)?o()?.find(u=>u.token===c(N))?.token:"")??""}`)),D(()=>$(fe,"show",c(xn)?"yes":"no")),$(fe,"confirmlabel","go"),$(fe,"confirm_btn_class","light"),z(fe,1,"svelte-eex92x");var Xr=O(fe),xo=O(Xr);C(Xr),C(fe);var Ft=A(fe,2),qe=O(Ft);$(qe,"no_controls","yes"),$(qe,"id","player"),D(()=>$(qe,"mediauri",s())),D(()=>$(qe,"media_type",a())),z(qe,1,"svelte-eex92x");var Qr=A(qe,2),ei=A(Qr,2),mo=A(ei,2);{var yo=u=>{var g=Ws(),M=mr(g);{var Vt=mn=>{var yn=Us(),ti=O(yn),wn=O(ti),$o=O(wn);{var ko=H=>{var Z=qs();D(()=>$(Z,"id","pad_"+c(Me))),$(Z,"pad_or_joystick","dpad"),$(Z,"size","60px"),z(Z,1,"svelte-eex92x"),W("sendDirection",Z,Rn=>{ao(Rn.detail)}),Re(H,Z)},Eo=H=>{var Z=Js();D(()=>$(Z,"id","pad_"+c(Me))),$(Z,"pad_or_joystick","joystick"),$(Z,"size","60px"),z(Z,1,"svelte-eex92x"),W("sendJoystickPosition",Z,Rn=>{lo(Rn.detail)}),Re(H,Z)};Ct($o,H=>{c(Me)==="dpad"?H(ko):H(Eo,-1)})}C(wn);var $n=A(wn,2),kn=O($n),En=O(kn),ni=A(En,2);C(kn);var Bt=A(kn,2),Tn=A(Bt,2);C($n);var Sn=A($n,2),ri=A(O(Sn),2);Br(ri),C(Sn);var Pn=A(Sn,2),ii=A(O(Pn),2);Br(ii),C(Pn);var An=A(Pn,2),Nn=O(An),Yt=A(Nn,2),To=A(Yt,2);C(An);var Cn=A(An,2),On=O(Cn),vt=A(On,2),So=O(vt);Un(),C(vt),C(Cn);var si=A(Cn,2),Je=O(si),Po=O(Je);C(Je);var Ue=A(Je,2),Ao=O(Ue);C(Ue);var Gt=A(Ue,2),oi=A(O(Gt),2),li=O(oi),No=O(li,!0);C(li),C(oi),C(Gt),C(si),C(ti),C(yn),D(H=>{En.disabled=!l()?.zoom?.in,ni.disabled=!l()?.zoom?.out,Bt.disabled=!l()?.home,z(Bt,1,`btn btn-sm btn-${b()?"primary":"light"}`,"svelte-eex92x"),Tn.disabled=!l()?.clickToCenter,z(Tn,1,`btn btn-sm btn-${c(ye)?"primary":"light"}`,"svelte-eex92x"),z(Nn,1,`btn btn-sm btn-${c(Lt)?"primary":"light"}`,"svelte-eex92x"),Yt.disabled=!l()?.joystick,z(Yt,1,`btn btn-sm btn-${c(Me)&&c(Me)==="dpad"?"light":"primary"}`,"svelte-eex92x"),On.disabled=!l()?.addPreset,vt.disabled=!l()?.presets,z(vt,1,`btn btn-sm btn-${d()?"primary":"light"}`,"svelte-eex92x"),At(So,`${H??""} `),Je.disabled=!c(dt),z(Je,1,`btn btn-sm btn-${c(dt)?c(_)?.muted?"warning":"primary":"light"}`,"svelte-eex92x"),ct(Je,"aria-label",c(_)?.muted?"Unmute video":"Mute video"),z(Po,1,`bi bi-${c(_)?.muted||!c(_)?"volume-mute-fill":"volume-up-fill"}`,"svelte-eex92x"),Ue.disabled=!c(dt),z(Ue,1,`btn btn-sm btn-${c(dt)?c(Dt)?"primary":"warning":"light"}`,"svelte-eex92x"),ct(Ue,"aria-label",c(Dt)?"Pause video":"Play video"),z(Ao,1,`bi bi-${c(pn)||!c(_)?"pause-fill":"play"}`,"svelte-eex92x"),Gt.disabled=!l()?.settings,At(No,c(le))},[()=>d()&&o()?.find(H=>H.token===d())?o()?.find(H=>H.token===d())?.name:""]),q("click",En,()=>Ur("in")),q("click",ni,()=>Ur("out")),q("click",Bt,()=>ro()),q("click",Tn,()=>uo()),Gr(ri,()=>S.speed,H=>S.speed=H),Gr(ii,()=>S.precision,H=>S.precision=H),q("click",Nn,()=>fo()),q("click",Yt,()=>co()),q("click",To,()=>c(_)?.requestFullscreen()),q("click",On,()=>no()),q("click",vt,()=>{to()}),q("click",Je,()=>{c(_)&&(c(_).muted=!c(_).muted)}),q("click",Ue,()=>vo()),q("click",Gt,()=>void 0),Re(mn,yn)};Ct(M,mn=>{v()&&mn(Vt)})}var Ht=A(M,2),wo=O(Ht);C(Ht),D(()=>{Ot(Ht,`left:${v()?"500":"0"}px;`),z(wo,1,`bi-${v()?"caret-left-fill":"caret-right-fill"}`,"svelte-eex92x")}),q("click",Ht,()=>{v(!v()),n("panelMove",{id:i(),opened:v()})}),Re(u,g)};Ct(mo,u=>{h()&&u(yo)})}return C(Ft),D((u,g)=>{At(go,`Are You sure to DELETE preset ${u??""}?`),At(xo,`Are You sure to GO to preset "${g??""}"?`),Ot(Ft,`cursor: ${c(ye)?"crosshair":""};`),Ot(Qr,`display:${c(ye)?"inherit":"none"}; width:${c(je).width??""}px; height:${c(je).height??""}px;top:${c(je).top??""}px;left:${c(je).left??""}px;`),Ot(ei,`display:${c(Lt)?"inherit":"none"}`)},[()=>c(N)?o()?.find(u=>u.token===c(N))?.token:"",()=>c(N)?o()?.find(u=>u.token===c(N))?.token:""]),W("modalShow",De,u=>{m(ht,u.detail.show,!0)}),W("modalShow",nt,u=>{m(It,u.detail.show,!0)}),W("modalConfirm",nt,u=>{u?.detail?.confirm&&Qs()}),W("modalShow",Ge,u=>{m(zt,u.detail.show,!0)}),W("modalConfirm",Ge,u=>{u?.detail?.confirm&&Xs()}),W("modalShow",ae,u=>{m(gn,u.detail.show,!0)}),W("modalConfirm",ae,u=>{console.log(u.detail,"detail"),u?.detail?.confirm&&oo(u.detail.id.split("del_")[1])}),W("modalShow",fe,u=>{m(xn,u.detail.show,!0)}),W("modalConfirm",fe,u=>{console.log(u.detail.id.split("goto")[1],"detail"),u?.detail?.confirm&&io(u.detail.id.split("goto_")[1])}),q("mousemove",Ft,u=>{if(c(ye)){const g=c(_)?.getBoundingClientRect(),M={x:u.clientX-g?.left,y:u.clientY-g?.top};w.start&&(w={start:w.start,end:M},m(je,{top:w.start.y>w.end.y?w.end.y:w.start.y,left:w.start.x>w.end.x?w.end.x:w.start.x,width:Math.abs((w?.start?.x||0)-(w?.end?.x||0)),height:Math.abs((w?.start?.y||0)-(w?.end?.y||0))},!0))}}),W("htmlVideoInit",qe,u=>{console.log(u.detail,"detailvid"),m(_,u.detail.video,!0),so()}),Re(e,Wr),Qn(bo)}$s(["mousemove","click"]),customElements.define("hb-player-live-camera-ptz",Bs(Jr,{id:{},live_uri:{},media_type:{},presets:{},position:{},configuration:{},current_preset:{},is_home:{},is_ptz_connected:{},is_ptz_panel_opened:{}},[],[],{mode:"open"})),Mn.Component=Jr,Object.defineProperty(Mn,Symbol.toStringTag,{value:"Module"})})(this["player-live-camera-ptz"]=this["player-live-camera-ptz"]||{});
76
76
  //# sourceMappingURL=main.iife.js.map