@htmlbricks/hb-input-coords 0.61.40 → 0.61.42
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 +4 -4
- package/main.iife.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function($t){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Cr=1,Lr=2,xt="[",Et="[!",kt="]",he={},w=Symbol(),Ar="http://www.w3.org/1999/xhtml",Nt=!1;var qt=Array.isArray,Or=Array.prototype.indexOf,Rr=Array.from,Le=Object.keys,ve=Object.defineProperty,be=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyDescriptors,Dr=Object.prototype,Mr=Array.prototype,Tt=Object.getPrototypeOf,St=Object.isExtensible;function Ct(e){for(var t=0;t<e.length;t++)e[t]()}function Ir(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const C=2,ze=4,Je=8,pe=16,Y=32,G=64,Lt=128,A=256,Ae=512,E=1024,O=2048,K=4096,X=8192,ie=16384,Ge=32768,Ke=65536,At=1<<17,Fr=1<<18,_e=1<<19,jr=1<<20,Xe=1<<21,Ze=1<<22,se=1<<23,Qe=Symbol("$state"),Wr=Symbol("legacy props"),Br=Symbol(""),et=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ot=3,Oe=8;function Ur(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Vr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Hr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Yr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Jr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Kr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Re(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function Z(e){m=e}let $;function Q(e){if(e===null)throw Re(),he;return $=e}function tt(){return Q(me($))}function j(e){if(m){if(me($)!==null)throw Re(),he;$=e}}function Qr(){for(var e=0,t=$;;){if(t.nodeType===Oe){var r=t.data;if(r===kt){if(e===0)return t;e-=1}else(r===xt||r===Et)&&(e+=1)}var n=me(t);t.remove(),t=n}}function en(e){if(!e||e.nodeType!==Oe)throw Re(),he;return e.data}function Rt(e){return e===this.v}function tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function rn(e){return!tn(e,this.v)}let nn=!1,D=null;function Pe(e){D=e}function Pt(e,t=!1,r){D={p:D,c:null,e:null,s:e,x:null,l:null}}function Dt(e){var t=D,r=t.e;if(r!==null){t.e=null;for(var n of r)Qt(n)}return e!==void 0&&(t.x=e),D=t.p,e??{}}function Mt(){return!0}const sn=new WeakMap;function on(e){var t=p;if(t===null)return _.f|=se,e;if((t.f&Ge)===0){if((t.f&Lt)===0)throw!t.parent&&e instanceof Error&&It(e),e;t.b.error(e)}else rt(e,t)}function rt(e,t){for(;t!==null;){if((t.f&Lt)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&It(e),e}function It(e){const t=sn.get(e);t&&(ve(e,"message",{value:t.message}),ve(e,"stack",{value:t.stack}))}let Ee=[],nt=[];function Ft(){var e=Ee;Ee=[],Ct(e)}function an(){var e=nt;nt=[],Ct(e)}function ln(e){Ee.length===0&&queueMicrotask(Ft),Ee.push(e)}function un(){Ee.length>0&&Ft(),nt.length>0&&an()}function fn(){const e=p.b;return e===null&&Ur(),e}function it(e){var t=C|O,r=_!==null&&(_.f&C)!==0?_:null;return p===null||r!==null&&(r.f&A)!==0?t|=A:p.f|=_e,{ctx:D,deps:null,effects:null,equals:Rt,f:t,fn:e,reactions:null,rv:0,v:w,wv:0,parent:r??p,ac:null}}function cn(e,t){let r=p;r===null&&Vr();var n=r.b,i=void 0,s=lt(w),o=null,a=!_;return Nn(()=>{try{var l=e();o&&Promise.resolve(l).catch(()=>{})}catch(c){l=Promise.reject(c)}var u=()=>l;i=o?.then(u,u)??Promise.resolve(l),o=i;var f=x,d=n.is_pending();a&&(n.update_pending_count(1),d||f.increment());const h=(c,v=void 0)=>{o=null,d||f.activate(),v?v!==et&&(s.f|=se,ut(s,v)):((s.f&se)!==0&&(s.f^=se),ut(s,c)),a&&(n.update_pending_count(-1),d||f.decrement()),Bt()};if(i.then(h,c=>h(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function d(){f===i?l(s):u(i)}f.then(d,d)}u(i)})}function dn(e){const t=it(e);return lr(t),t}function jt(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)te(t[r])}}function hn(e){for(var t=e.parent;t!==null;){if((t.f&C)===0)return t;t=t.parent}return null}function st(e){var t,r=p;V(hn(e));try{jt(e),t=hr(e)}finally{V(r)}return t}function Wt(e){var t=st(e);if(e.equals(t)||(e.v=t,e.wv=cr()),!fe){var r=(re||(e.f&A)!==0)&&e.deps!==null?K:E;S(e,r)}}function vn(e,t,r){const n=it;if(t.length===0){r(e.map(n));return}var i=x,s=p,o=bn(),a=fn();Promise.all(t.map(l=>cn(l))).then(l=>{i?.activate(),o();try{r([...e.map(n),...l])}catch(u){(s.f&ie)===0&&rt(u,s)}i?.deactivate(),Bt()}).catch(l=>{a.error(l)})}function bn(){var e=p,t=_,r=D,n=x;return function(){V(e),R(t),Pe(r),n?.activate()}}function Bt(){V(null),R(null),Pe(null)}const ot=new Set;let x=null,Ut=new Set,De=[];function Vt(){const e=De.shift();De.length>0&&queueMicrotask(Vt),e()}let oe=[],Me=null,at=!1,Ie=!1;class ae{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#c=[];#d=[];skipped_effects=new Set;process(t){oe=[];for(const i of t)this.#v(i);if(this.#i.length===0&&this.#r===0){this.#h();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],x=null,Yt(r),Yt(n),x===null?x=this:ot.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#n),this.#l(this.#a);for(const i of this.#i)we(i);for(const i of this.#o)we(i);this.#i=[],this.#o=[]}#v(t){t.f^=E;for(var r=t.first;r!==null;){var n=r.f,i=(n&(Y|G))!==0,s=i&&(n&E)!==0,o=s||(n&X)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=E;else if((n&ze)!==0)this.#n.push(r);else if((n&E)===0)if((n&Ze)!==0){var a=r.b?.is_pending()?this.#o:this.#i;a.push(r)}else Fe(r)&&((r.f&pe)!==0&&this.#a.push(r),we(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&O)!==0?this.#c:this.#d).push(r),S(r,E);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){x=this}deactivate(){x=null;for(const t of Ut)if(Ut.delete(t),t(),x!==null)break}neuter(){this.#f=!0}flush(){oe.length>0?Ht():this.#h(),x===this&&(this.#r===0&&ot.delete(this),this.deactivate())}#h(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)S(t,O),ge(t);for(const t of this.#d)S(t,K),ge(t);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=Ir()).promise}static ensure(){if(x===null){const t=x=new ae;ot.add(x),Ie||ae.enqueue(()=>{x===t&&t.flush()})}return x}static enqueue(t){De.length===0&&queueMicrotask(Vt),De.unshift(t)}}function ke(e){var t=Ie;Ie=!0;try{for(var r;;){if(un(),oe.length===0&&(x?.flush(),oe.length===0))return Me=null,r;Ht()}}finally{Ie=t}}function Ht(){var e=ye;at=!0;try{var t=0;for(or(!0);oe.length>0;){var r=ae.ensure();if(t++>1e3){var n,i;pn()}r.process(oe),ee.clear()}}finally{at=!1,or(e),Me=null}}function pn(){try{Jr()}catch(e){rt(e,Me)}}let le=null;function Yt(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(ie|X))===0&&Fe(n)&&(le=[],we(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?rr(n):n.fn=null),le?.length>0)){ee.clear();for(const i of le)we(i);le=[]}}le=null}}function ge(e){for(var t=Me=e;t.parent!==null;){t=t.parent;var r=t.f;if(at&&t===p&&(r&pe)!==0)return;if((r&(G|Y))!==0){if((r&E)===0)return;t.f^=E}}oe.push(t)}const ee=new Map;function lt(e,t){var r={f:0,v:e,reactions:null,equals:Rt,rv:0,wv:0};return r}function T(e,t){const r=lt(e);return lr(r),r}function _n(e,t=!1,r=!0){const n=lt(e);return t||(n.equals=rn),n}function y(e,t,r=!1){_!==null&&(!ce||(_.f&At)!==0)&&Mt()&&(_.f&(C|pe|Ze|At))!==0&&!z?.includes(e)&&Zr();let n=r?ue(t):t;return ut(e,n)}function ut(e,t){if(!e.equals(t)){var r=e.v;fe?ee.set(e,t):ee.set(e,r),e.v=t;var n=ae.ensure();n.capture(e,r),(e.f&C)!==0&&((e.f&O)!==0&&st(e),S(e,(e.f&A)===0?E:K)),e.wv=cr(),zt(e,O),p!==null&&(p.f&E)!==0&&(p.f&(Y|G))===0&&(P===null?On([e]):P.push(e))}return t}function ft(e){y(e,e.v+1)}function zt(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,a=(o&O)===0;a&&S(s,t),(o&C)!==0?zt(s,K):a&&((o&pe)!==0&&le!==null&&le.push(s),ge(s))}}function ue(e){if(typeof e!="object"||e===null||Qe in e)return e;const t=Tt(e);if(t!==Dr&&t!==Mr)return e;var r=new Map,n=qt(e),i=T(0),s=de,o=a=>{if(de===s)return a();var l=_,u=de;R(null),fr(s);var f=a();return R(l),fr(u),f};return n&&r.set("length",T(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Kr();var f=r.get(l);return f===void 0?f=o(()=>{var d=T(u.value);return r.set(l,d),d}):y(f,u.value,!0),!0},deleteProperty(a,l){var u=r.get(l);if(u===void 0){if(l in a){const f=o(()=>T(w));r.set(l,f),ft(i)}}else y(u,w),ft(i);return!0},get(a,l,u){if(l===Qe)return e;var f=r.get(l),d=l in a;if(f===void 0&&(!d||be(a,l)?.writable)&&(f=o(()=>{var c=ue(d?a[l]:w),v=T(c);return v}),r.set(l,f)),f!==void 0){var h=b(f);return h===w?void 0:h}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=b(f))}else if(u===void 0){var d=r.get(l),h=d?.v;if(d!==void 0&&h!==w)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(a,l){if(l===Qe)return!0;var u=r.get(l),f=u!==void 0&&u.v!==w||Reflect.has(a,l);if(u!==void 0||p!==null&&(!f||be(a,l)?.writable)){u===void 0&&(u=o(()=>{var h=f?ue(a[l]):w,c=T(h);return c}),r.set(l,u));var d=b(u);if(d===w)return!1}return f},set(a,l,u,f){var d=r.get(l),h=l in a;if(n&&l==="length")for(var c=u;c<d.v;c+=1){var v=r.get(c+"");v!==void 0?y(v,w):c in a&&(v=o(()=>T(w)),r.set(c+"",v))}if(d===void 0)(!h||be(a,l)?.writable)&&(d=o(()=>T(void 0)),y(d,ue(u)),r.set(l,d));else{h=d.v!==w;var k=o(()=>ue(u));y(d,k)}var M=Reflect.getOwnPropertyDescriptor(a,l);if(M?.set&&M.set.call(f,u),!h){if(n&&typeof l=="string"){var I=r.get("length"),q=Number(l);Number.isInteger(q)&&q>=I.v&&y(I,q+1)}ft(i)}return!0},ownKeys(a){b(i);var l=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==w});for(var[u,f]of r)f.v!==w&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Xr()}})}var Jt,Gt,Kt,Xt;function ct(){if(Jt===void 0){Jt=window,Gt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Kt=be(t,"firstChild").get,Xt=be(t,"nextSibling").get,St(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),St(r)&&(r.__t=void 0)}}function Ne(e=""){return document.createTextNode(e)}function qe(e){return Kt.call(e)}function me(e){return Xt.call(e)}function W(e,t){if(!m)return qe(e);var r=qe($);if(r===null)r=$.appendChild(Ne());else if(t&&r.nodeType!==Ot){var n=Ne();return r?.before(n),Q(n),n}return Q(r),r}function Te(e,t=1,r=!1){let n=m?$:e;for(var i;t--;)i=n,n=me(n);if(!m)return n;if(r&&n?.nodeType!==Ot){var s=Ne();return n===null?i?.after(s):n.before(s),Q(s),s}return Q(n),n}function gn(e){e.textContent=""}function mn(){return!1}function dt(e){var t=_,r=p;R(null),V(null);try{return e()}finally{R(t),V(r)}}function yn(e){p===null&&_===null&&zr(),_!==null&&(_.f&A)!==0&&p===null&&Yr(),fe&&Hr()}function wn(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function B(e,t,r,n=!0){var i=p;i!==null&&(i.f&X)!==0&&(e|=X);var s={ctx:D,deps:null,nodes_start:null,nodes_end:null,f:e|O,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{we(s),s.f|=Ge}catch(l){throw te(s),l}else t!==null&&ge(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&_e)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&wn(o,i),_!==null&&(_.f&C)!==0&&(e&G)===0)){var a=_;(a.effects??=[]).push(o)}}return s}function $n(e){const t=B(Je,null,!1);return S(t,E),t.teardown=e,t}function Zt(e){yn();var t=p.f,r=!_&&(t&Y)!==0&&(t&Ge)===0;if(r){var n=D;(n.e??=[]).push(e)}else return Qt(e)}function Qt(e){return B(ze|jr,e,!1)}function xn(e){ae.ensure();const t=B(G|_e,e,!0);return()=>{te(t)}}function En(e){ae.ensure();const t=B(G|_e,e,!0);return(r={})=>new Promise(n=>{r.outro?nr(t,()=>{te(t),n(void 0)}):(te(t),n(void 0))})}function kn(e){return B(ze,e,!1)}function Nn(e){return B(Ze|_e,e,!0)}function qn(e,t=0){return B(Je|t,e,!0)}function U(e,t=[],r=[]){vn(t,r,n=>{B(Je,()=>e(...n.map(b)),!0)})}function Tn(e,t=0){var r=B(pe|t,e,!0);return r}function ht(e,t=!0){return B(Y|_e,e,!0,t)}function er(e){var t=e.teardown;if(t!==null){const r=fe,n=_;ar(!0),R(null);try{t.call(null)}finally{ar(r),R(n)}}}function tr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&dt(()=>{i.abort(et)});var n=r.next;(r.f&G)!==0?r.parent=null:te(r,t),r=n}}function Sn(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Y)===0&&te(t),t=r}}function te(e,t=!0){var r=!1;(t||(e.f&Fr)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Cn(e.nodes_start,e.nodes_end),r=!0),tr(e,t&&!r),je(e,0),S(e,ie);var n=e.transitions;if(n!==null)for(const s of n)s.stop();er(e);var i=e.parent;i!==null&&i.first!==null&&rr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Cn(e,t){for(;e!==null;){var r=e===t?null:me(e);e.remove(),e=r}}function rr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function nr(e,t){var r=[];ir(e,r,!0),Ln(r,()=>{te(e),t&&t()})}function Ln(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function ir(e,t,r){if((e.f&X)===0){if(e.f^=X,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Ke)!==0||(n.f&Y)!==0;ir(n,t,s?r:!1),n=i}}}function An(e){sr(e,!0)}function sr(e,t){if((e.f&X)!==0){e.f^=X,(e.f&E)===0&&(S(e,O),ge(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Ke)!==0||(r.f&Y)!==0;sr(r,i?t:!1),r=n}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}let ye=!1;function or(e){ye=e}let fe=!1;function ar(e){fe=e}let _=null,ce=!1;function R(e){_=e}let p=null;function V(e){p=e}let z=null;function lr(e){_!==null&&(z===null?z=[e]:z.push(e))}let N=null,L=0,P=null;function On(e){P=e}let ur=1,Se=0,de=Se;function fr(e){de=e}let re=!1;function cr(){return++ur}function Fe(e){var t=e.f;if((t&O)!==0)return!0;if((t&K)!==0){var r=e.deps,n=(t&A)!==0;if(r!==null){var i,s,o=(t&Ae)!==0,a=n&&p!==null&&!re,l=r.length;if((o||a)&&(p===null||(p.f&ie)===0)){var u=e,f=u.parent;for(i=0;i<l;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=Ae),a&&f!==null&&(f.f&A)===0&&(u.f^=A)}for(i=0;i<l;i++)if(s=r[i],Fe(s)&&Wt(s),s.wv>e.wv)return!0}(!n||p!==null&&!re)&&S(e,E)}return!1}function dr(e,t,r=!0){var n=e.reactions;if(n!==null&&!z?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&C)!==0?dr(s,t,!1):t===s&&(r?S(s,O):(s.f&E)!==0&&S(s,K),ge(s))}}function hr(e){var t=N,r=L,n=P,i=_,s=re,o=z,a=D,l=ce,u=de,f=e.f;N=null,L=0,P=null,re=(f&A)!==0&&(ce||!ye||_===null),_=(f&(Y|G))===0?e:null,z=null,Pe(e.ctx),ce=!1,de=++Se,e.ac!==null&&(dt(()=>{e.ac.abort(et)}),e.ac=null);try{e.f|=Xe;var d=e.fn,h=d(),c=e.deps;if(N!==null){var v;if(je(e,L),c!==null&&L>0)for(c.length=L+N.length,v=0;v<N.length;v++)c[L+v]=N[v];else e.deps=c=N;if(!re||(f&C)!==0&&e.reactions!==null)for(v=L;v<c.length;v++)(c[v].reactions??=[]).push(e)}else c!==null&&L<c.length&&(je(e,L),c.length=L);if(Mt()&&P!==null&&!ce&&c!==null&&(e.f&(C|K|O))===0)for(v=0;v<P.length;v++)dr(P[v],e);return i!==null&&i!==e&&(Se++,P!==null&&(n===null?n=P:n.push(...P))),(e.f&se)!==0&&(e.f^=se),h}catch(k){return on(k)}finally{e.f^=Xe,N=t,L=r,P=n,_=i,re=s,z=o,Pe(a),ce=l,de=u}}function Rn(e,t){let r=t.reactions;if(r!==null){var n=Or.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&C)!==0&&(N===null||!N.includes(t))&&(S(t,K),(t.f&(A|Ae))===0&&(t.f^=Ae),jt(t),je(t,0))}function je(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Rn(e,r[n])}function we(e){var t=e.f;if((t&ie)===0){S(e,E);var r=p,n=ye;p=e,ye=!0;try{(t&pe)!==0?Sn(e):tr(e),er(e);var i=hr(e);e.teardown=typeof i=="function"?i:null,e.wv=ur;var s;Nt&&nn&&(e.f&O)!==0&&e.deps}finally{ye=n,p=r}}}function b(e){var t=e.f,r=(t&C)!==0;if(_!==null&&!ce){var n=p!==null&&(p.f&ie)!==0;if(!n&&!z?.includes(e)){var i=_.deps;if((_.f&Xe)!==0)e.rv<Se&&(e.rv=Se,N===null&&i!==null&&i[L]===e?L++:N===null?N=[e]:(!re||!N.includes(e))&&N.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:s.includes(_)||s.push(_)}}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&A)===0&&(o.f^=A)}if(fe){if(ee.has(e))return ee.get(e);if(r){o=e;var l=o.v;return((o.f&E)===0&&o.reactions!==null||vr(o))&&(l=st(o)),ee.set(o,l),l}}else r&&(o=e,Fe(o)&&Wt(o));if((e.f&se)!==0)throw e.v;return e.v}function vr(e){if(e.v===w)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&C)!==0&&vr(t))return!0;return!1}const Pn=-7169;function S(e,t){e.f=e.f&Pn|t}const Dn=new Set,br=new Set;function Mn(e,t,r,n={}){function i(s){if(n.capture||Ce.call(t,s),!s.cancelBubble)return dt(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ln(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function vt(e,t,r,n,i){var s={capture:n,passive:i},o=Mn(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&$n(()=>{t.removeEventListener(e,o,s)})}let pr=null;function Ce(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;pr=e;var o=0,a=pr===e&&e.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||e.target,s!==t){ve(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=_,d=p;R(null),V(null);try{for(var h,c=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var k=s["__"+n];if(k!=null&&(!s.disabled||e.target===s))if(qt(k)){var[M,...I]=k;M.apply(s,[e,...I])}else k.call(s,e)}catch(q){h?c.push(q):h=q}if(e.cancelBubble||v===t||v===null)break;s=v}if(h){for(let q of c)queueMicrotask(()=>{throw q});throw h}}finally{e.__root=t,delete e.currentTarget,R(f),V(d)}}}function In(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function We(e,t){var r=p;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function _r(e,t){var r=(t&Cr)!==0,n=(t&Lr)!==0,i,s=!e.startsWith("<!>");return()=>{if(m)return We($,null),$;i===void 0&&(i=In(s?e:"<!>"+e),r||(i=qe(i)));var o=n||Gt?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=qe(o),l=o.lastChild;We(a,l)}else We(o,o);return o}}function bt(e,t){if(m){p.nodes_end=$,tt();return}e!==null&&e.before(t)}const Fn=["touchstart","touchmove"];function jn(e){return Fn.includes(e)}function pt(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function gr(e,t){return mr(e,t)}function Wn(e,t){ct(),t.intro=t.intro??!1;const r=t.target,n=m,i=$;try{for(var s=qe(r);s&&(s.nodeType!==Oe||s.data!==xt);)s=me(s);if(!s)throw he;Z(!0),Q(s),tt();const o=mr(e,{...t,anchor:s});if($===null||$.nodeType!==Oe||$.data!==kt)throw Re(),he;return Z(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==he&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Gr(),ct(),gn(r),Z(!1),gr(e,t)}finally{Z(n),Q(i)}}const $e=new Map;function mr(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0}){ct();var a=new Set,l=d=>{for(var h=0;h<d.length;h++){var c=d[h];if(!a.has(c)){a.add(c);var v=jn(c);t.addEventListener(c,Ce,{passive:v});var k=$e.get(c);k===void 0?(document.addEventListener(c,Ce,{passive:v}),$e.set(c,1)):$e.set(c,k+1)}}};l(Rr(Dn)),br.add(l);var u=void 0,f=En(()=>{var d=r??t.appendChild(Ne());return ht(()=>{if(s){Pt({});var h=D;h.c=s}i&&(n.$$events=i),m&&We(d,null),u=e(d,n)||{},m&&(p.nodes_end=$),s&&Dt()}),()=>{for(var h of a){t.removeEventListener(h,Ce);var c=$e.get(h);--c===0?(document.removeEventListener(h,Ce),$e.delete(h)):$e.set(h,c)}br.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return _t.set(u,f),u}let _t=new WeakMap;function Bn(e,t){const r=_t.get(e);return r?(_t.delete(e),r(t)):Promise.resolve()}function Un(e,t,r=!1){m&&tt();var n=e,i=null,s=null,o=w,a=r?Ke:0,l=!1;const u=(c,v=!0)=>{l=!0,h(v,c)};var f=null;function d(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var c=o?i:s,v=o?s:i;c&&An(c),v&&nr(v,()=>{o?s=null:i=null})}const h=(c,v)=>{if(o===(o=c))return;let k=!1;if(m){const Ve=en(n)===Et;!!o===Ve&&(n=Qr(),Q(n),Z(!1),k=!0)}var M=mn(),I=n;if(M&&(f=document.createDocumentFragment(),f.append(I=Ne())),o?i??=v&&ht(()=>v(I)):s??=v&&ht(()=>v(I)),M){var q=x,xe=o?i:s,F=o?s:i;xe&&q.skipped_effects.delete(xe),F&&q.skipped_effects.add(F),q.add_callback(d)}else d();k&&Z(!0)};Tn(()=>{l=!1,t(u),l||h(null,null)},a),m&&(n=$)}function Vn(e,t){kn(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function Hn(e,t,r){var n=""+e;return n}function Yn(e,t){return String(e)}function gt(e,t,r,n,i,s){var o=e.__className;if(m||o!==r||o===void 0){var a=Hn(r);(!m||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e.__className=r}return s}function zn(e,t,r,n){var i=e.__style;if(m||i!==t){var s=Yn(t);(!m||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return n}const Jn=Symbol("is custom element"),Gn=Symbol("is html");function Kn(e,t,r,n){var i=Xn(e);m&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Br]=r),r==null?e.removeAttribute(t):typeof r!="string"&&yr(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function J(e,t,r){var n=_,i=p;let s=m;m&&Z(!1),R(null),V(null);try{t!=="style"&&(mt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?yr(e).includes(t):r&&typeof r=="object")?e[t]=r:Kn(e,t,r==null?r:String(r))}finally{R(n),V(i),s&&Z(!0)}}function Xn(e){return e.__attributes??={[Jn]:e.nodeName.includes("-"),[Gn]:e.namespaceURI===Ar}}var mt=new Map;function yr(e){var t=e.getAttribute("is")||e.nodeName,r=mt.get(t);if(r)return r;mt.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Pr(i);for(var o in n)n[o].set&&r.push(o);i=Tt(i)}return r}function Be(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var l;l=()=>{var h=e[t];return h===void 0?o():(s=!0,h)};var u=!1,f=it(()=>(u=!1,l())),d=p;return(function(h,c){if(arguments.length>0){const v=c?b(f):h;return y(f,v),u=!0,i!==void 0&&(i=v),h}return fe&&u||(d.f&ie)!==0?f.v:b(f)})}function Zn(e){return new Qn(e)}class Qn{#t;#e;constructor(t){var r=new Map,n=(s,o)=>{var a=_n(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return b(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===Wr?!0:(b(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return y(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#e=(t.hydrate?Wn:gr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||ve(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Bn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let wr;typeof HTMLElement=="function"&&(wr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),bt(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ei(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ue(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Zn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xn(()=>{qn(()=>{this.$$r=!0;for(const n of Le(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ue(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ue(e,r,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 Le(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ue(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 ei(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ti(e,t,r,n,i,s){let o=class extends wr{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Le(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Le(t).forEach(a=>{ve(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Ue(a,l,t),this.$$d[a]=l;var u=this.$$c;if(u){var f=be(u,a)?.get;f?u[a]=l:u.$set({[a]:l})}}})}),n.forEach(a=>{ve(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}function $r(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 r=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const n=document.createElement("script");if(n.id=t+"-script",n.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${r}`,e?.local)n.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];n.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${r}`}document.head.appendChild(n)}catch(n){console.warn(n)}}class ne{dictionary;lang="";constructor(t){if(!t?.dictionary)throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(t?.lang)}setLang(t){t||(t=ne.getDefaultLang()),this.lang=t}translateWord(t,r){return ne.getDictionaryWord(t,this.dictionary,r||this.lang)}translateDate(t,r,n){return ne.formatDate(t,r,n||this.lang)}static getDefaultLang(){let t="en";return navigator?.languages&&navigator.languages[0]?.split("-")[0]?.toLowerCase()?.length&&(t=navigator.languages[0]?.split("-")[0]?.toLowerCase()),t}static getDictionaryWord(t,r,n){if(!t)throw new Error("no wordKey provided");if(!r)throw new Error("no dictionary provided");if(n&&r[n]?.[t])return r[n][t];let i="";const s=ne.getDefaultLang();if(!n||s!==n){const o=r?.[s];o?.[t]&&(i=o[t])}return i}static formatDate(t,r,n){if(!t)throw new Error("no date provided");if(typeof t.getMonth!="function")throw new Error("wrong date format");return new Intl.DateTimeFormat(n||ne.getDefaultLang(),r).format(t)}}const xr={en:{latitude:"Latitude",longitude:"Longitude",latitudePlaceholder:"Insert latitude...",longitudePlaceholder:"Insert longitude...",latitudeLabel:"Latitude",longitudeLabel:"Longitude"},it:{latitude:"Latitudine",longitude:"Longitudine",latitudePlaceholder:"Inserisci latitudine...",longitudePlaceholder:"Inserisci longitudine...",latitudeLabel:"Latitudine",longitudeLabel:"Longitudine"}},Er={version:"0.61.40"};var ri=_r('<div part="invalid-feedback" class="invalid-feedback mb-1 svelte-q2pihy"> </div>'),ni=_r('<div class="form-control svelte-q2pihy"><div class="container-fluid svelte-q2pihy"><div class="row svelte-q2pihy"><div class="col-6 svelte-q2pihy" style="padding: 0px;"><hb-map></hb-map></div> <div class="col-6 svelte-q2pihy" style="margin-bottom: 12px;"><div class="row coord svelte-q2pihy"><div class="col-12 svelte-q2pihy"> <hb-input-number></hb-input-number></div></div> <div class="row coord svelte-q2pihy"><div class="col-12 svelte-q2pihy"> <hb-input-number></hb-input-number></div></div> <!></div></div></div></div>',2);const ii={hash:"svelte-q2pihy",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(Et){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Sr=1,Ar=2,xt="[",kt="[!",Tt="]",he={},w=Symbol(),Or="http://www.w3.org/1999/xhtml",Nt=!1;var qt=Array.isArray,Rr=Array.prototype.indexOf,Pr=Array.from,Se=Object.keys,ve=Object.defineProperty,be=Object.getOwnPropertyDescriptor,Mr=Object.getOwnPropertyDescriptors,Dr=Object.prototype,Ir=Array.prototype,Ct=Object.getPrototypeOf,Lt=Object.isExtensible;function St(e){for(var t=0;t<e.length;t++)e[t]()}function jr(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const L=2,Je=4,Ge=8,_e=16,Y=32,G=64,At=128,A=256,Ae=512,x=1024,O=2048,K=4096,X=8192,ne=16384,Ke=32768,Xe=65536,Ot=1<<17,Fr=1<<18,ge=1<<19,Vr=1<<20,Ze=1<<21,Qe=1<<22,ie=1<<23,et=Symbol("$state"),Wr=Symbol("legacy props"),Br=Symbol(""),tt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Rt=3,Oe=8;function Ur(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Hr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Yr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function zr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Jr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Gr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Xr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Zr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Qr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Re(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function Z(e){m=e}let $;function Q(e){if(e===null)throw Re(),he;return $=e}function rt(){return Q(me($))}function F(e){if(m){if(me($)!==null)throw Re(),he;$=e}}function en(){for(var e=0,t=$;;){if(t.nodeType===Oe){var r=t.data;if(r===Tt){if(e===0)return t;e-=1}else(r===xt||r===kt)&&(e+=1)}var n=me(t);t.remove(),t=n}}function tn(e){if(!e||e.nodeType!==Oe)throw Re(),he;return e.data}function Pt(e){return e===this.v}function rn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function nn(e){return!rn(e,this.v)}let sn=!1,M=null;function Pe(e){M=e}function Mt(e,t=!1,r){M={p:M,c:null,e:null,s:e,x:null,l:null}}function Dt(e){var t=M,r=t.e;if(r!==null){t.e=null;for(var n of r)er(n)}return e!==void 0&&(t.x=e),M=t.p,e??{}}function It(){return!0}const on=new WeakMap;function an(e){var t=_;if(t===null)return g.f|=ie,e;if((t.f&Ke)===0){if((t.f&At)===0)throw!t.parent&&e instanceof Error&&jt(e),e;t.b.error(e)}else nt(e,t)}function nt(e,t){for(;t!==null;){if((t.f&At)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&jt(e),e}function jt(e){const t=on.get(e);t&&(ve(e,"message",{value:t.message}),ve(e,"stack",{value:t.stack}))}let xe=[],it=[];function Ft(){var e=xe;xe=[],St(e)}function ln(){var e=it;it=[],St(e)}function un(e){xe.length===0&&queueMicrotask(Ft),xe.push(e)}function fn(){xe.length>0&&Ft(),it.length>0&&ln()}function cn(){const e=_.b;return e===null&&Ur(),e}function st(e){var t=L|O,r=g!==null&&(g.f&L)!==0?g:null;return _===null||r!==null&&(r.f&A)!==0?t|=A:_.f|=ge,{ctx:M,deps:null,effects:null,equals:Pt,f:t,fn:e,reactions:null,rv:0,v:w,wv:0,parent:r??_,ac:null}}function dn(e,t){let r=_;r===null&&Hr();var n=r.b,i=void 0,s=ut(w),o=null,a=!g;return Nn(()=>{try{var l=e();o&&Promise.resolve(l).catch(()=>{})}catch(d){l=Promise.reject(d)}var u=()=>l;i=o?.then(u,u)??Promise.resolve(l),o=i;var f=E,h=n.is_pending();a&&(n.update_pending_count(1),h||f.increment());const c=(d,v=void 0)=>{o=null,h||f.activate(),v?v!==tt&&(s.f|=ie,ft(s,v)):((s.f&ie)!==0&&(s.f^=ie),ft(s,d)),a&&(n.update_pending_count(-1),h||f.decrement()),Bt()};if(i.then(c,d=>c(null,d||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function h(){f===i?l(s):u(i)}f.then(h,h)}u(i)})}function hn(e){const t=st(e);return ur(t),t}function Vt(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)te(t[r])}}function vn(e){for(var t=e.parent;t!==null;){if((t.f&L)===0)return t;t=t.parent}return null}function ot(e){var t,r=_;U(vn(e));try{Vt(e),t=vr(e)}finally{U(r)}return t}function Wt(e){var t=ot(e);if(e.equals(t)||(e.v=t,e.wv=dr()),!ue){var r=(re||(e.f&A)!==0)&&e.deps!==null?K:x;C(e,r)}}function bn(e,t,r){const n=st;if(t.length===0){r(e.map(n));return}var i=E,s=_,o=_n(),a=cn();Promise.all(t.map(l=>dn(l))).then(l=>{i?.activate(),o();try{r([...e.map(n),...l])}catch(u){(s.f&ne)===0&&nt(u,s)}i?.deactivate(),Bt()}).catch(l=>{a.error(l)})}function _n(){var e=_,t=g,r=M,n=E;return function(){U(e),R(t),Pe(r),n?.activate()}}function Bt(){U(null),R(null),Pe(null)}const at=new Set;let E=null,Ut=new Set,Me=[];function Ht(){const e=Me.shift();Me.length>0&&queueMicrotask(Ht),e()}let se=[],De=null,lt=!1,Ie=!1;class oe{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#c=[];#d=[];skipped_effects=new Set;process(t){se=[];for(const i of t)this.#v(i);if(this.#i.length===0&&this.#r===0){this.#h();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],E=null,zt(r),zt(n),E===null?E=this:at.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#n),this.#l(this.#a);for(const i of this.#i)we(i);for(const i of this.#o)we(i);this.#i=[],this.#o=[]}#v(t){t.f^=x;for(var r=t.first;r!==null;){var n=r.f,i=(n&(Y|G))!==0,s=i&&(n&x)!==0,o=s||(n&X)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=x;else if((n&Je)!==0)this.#n.push(r);else if((n&x)===0)if((n&Qe)!==0){var a=r.b?.is_pending()?this.#o:this.#i;a.push(r)}else je(r)&&((r.f&_e)!==0&&this.#a.push(r),we(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&O)!==0?this.#c:this.#d).push(r),C(r,x);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){E=this}deactivate(){E=null;for(const t of Ut)if(Ut.delete(t),t(),E!==null)break}neuter(){this.#f=!0}flush(){se.length>0?Yt():this.#h(),E===this&&(this.#r===0&&at.delete(this),this.deactivate())}#h(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)C(t,O),pe(t);for(const t of this.#d)C(t,K),pe(t);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=jr()).promise}static ensure(){if(E===null){const t=E=new oe;at.add(E),Ie||oe.enqueue(()=>{E===t&&t.flush()})}return E}static enqueue(t){Me.length===0&&queueMicrotask(Ht),Me.unshift(t)}}function ke(e){var t=Ie;Ie=!0;try{for(var r;;){if(fn(),se.length===0&&(E?.flush(),se.length===0))return De=null,r;Yt()}}finally{Ie=t}}function Yt(){var e=ye;lt=!0;try{var t=0;for(ar(!0);se.length>0;){var r=oe.ensure();if(t++>1e3){var n,i;gn()}r.process(se),ee.clear()}}finally{lt=!1,ar(e),De=null}}function gn(){try{Gr()}catch(e){nt(e,De)}}let ae=null;function zt(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(ne|X))===0&&je(n)&&(ae=[],we(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?nr(n):n.fn=null),ae?.length>0)){ee.clear();for(const i of ae)we(i);ae=[]}}ae=null}}function pe(e){for(var t=De=e;t.parent!==null;){t=t.parent;var r=t.f;if(lt&&t===_&&(r&_e)!==0)return;if((r&(G|Y))!==0){if((r&x)===0)return;t.f^=x}}se.push(t)}const ee=new Map;function ut(e,t){var r={f:0,v:e,reactions:null,equals:Pt,rv:0,wv:0};return r}function q(e,t){const r=ut(e);return ur(r),r}function pn(e,t=!1,r=!0){const n=ut(e);return t||(n.equals=nn),n}function y(e,t,r=!1){g!==null&&(!fe||(g.f&Ot)!==0)&&It()&&(g.f&(L|_e|Qe|Ot))!==0&&!z?.includes(e)&&Qr();let n=r?le(t):t;return ft(e,n)}function ft(e,t){if(!e.equals(t)){var r=e.v;ue?ee.set(e,t):ee.set(e,r),e.v=t;var n=oe.ensure();n.capture(e,r),(e.f&L)!==0&&((e.f&O)!==0&&ot(e),C(e,(e.f&A)===0?x:K)),e.wv=dr(),Jt(e,O),_!==null&&(_.f&x)!==0&&(_.f&(Y|G))===0&&(P===null?Rn([e]):P.push(e))}return t}function ct(e){y(e,e.v+1)}function Jt(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,a=(o&O)===0;a&&C(s,t),(o&L)!==0?Jt(s,K):a&&((o&_e)!==0&&ae!==null&&ae.push(s),pe(s))}}function le(e){if(typeof e!="object"||e===null||et in e)return e;const t=Ct(e);if(t!==Dr&&t!==Ir)return e;var r=new Map,n=qt(e),i=q(0),s=ce,o=a=>{if(ce===s)return a();var l=g,u=ce;R(null),cr(s);var f=a();return R(l),cr(u),f};return n&&r.set("length",q(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Xr();var f=r.get(l);return f===void 0?f=o(()=>{var h=q(u.value);return r.set(l,h),h}):y(f,u.value,!0),!0},deleteProperty(a,l){var u=r.get(l);if(u===void 0){if(l in a){const f=o(()=>q(w));r.set(l,f),ct(i)}}else y(u,w),ct(i);return!0},get(a,l,u){if(l===et)return e;var f=r.get(l),h=l in a;if(f===void 0&&(!h||be(a,l)?.writable)&&(f=o(()=>{var d=le(h?a[l]:w),v=q(d);return v}),r.set(l,f)),f!==void 0){var c=b(f);return c===w?void 0:c}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=b(f))}else if(u===void 0){var h=r.get(l),c=h?.v;if(h!==void 0&&c!==w)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(a,l){if(l===et)return!0;var u=r.get(l),f=u!==void 0&&u.v!==w||Reflect.has(a,l);if(u!==void 0||_!==null&&(!f||be(a,l)?.writable)){u===void 0&&(u=o(()=>{var c=f?le(a[l]):w,d=q(c);return d}),r.set(l,u));var h=b(u);if(h===w)return!1}return f},set(a,l,u,f){var h=r.get(l),c=l in a;if(n&&l==="length")for(var d=u;d<h.v;d+=1){var v=r.get(d+"");v!==void 0?y(v,w):d in a&&(v=o(()=>q(w)),r.set(d+"",v))}if(h===void 0)(!c||be(a,l)?.writable)&&(h=o(()=>q(void 0)),y(h,le(u)),r.set(l,h));else{c=h.v!==w;var k=o(()=>le(u));y(h,k)}var D=Reflect.getOwnPropertyDescriptor(a,l);if(D?.set&&D.set.call(f,u),!c){if(n&&typeof l=="string"){var I=r.get("length"),N=Number(l);Number.isInteger(N)&&N>=I.v&&y(I,N+1)}ct(i)}return!0},ownKeys(a){b(i);var l=Reflect.ownKeys(a).filter(h=>{var c=r.get(h);return c===void 0||c.v!==w});for(var[u,f]of r)f.v!==w&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Zr()}})}var Gt,Kt,Xt,Zt;function dt(){if(Gt===void 0){Gt=window,Kt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Xt=be(t,"firstChild").get,Zt=be(t,"nextSibling").get,Lt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Lt(r)&&(r.__t=void 0)}}function Te(e=""){return document.createTextNode(e)}function Ne(e){return Xt.call(e)}function me(e){return Zt.call(e)}function V(e,t){if(!m)return Ne(e);var r=Ne($);if(r===null)r=$.appendChild(Te());else if(t&&r.nodeType!==Rt){var n=Te();return r?.before(n),Q(n),n}return Q(r),r}function qe(e,t=1,r=!1){let n=m?$:e;for(var i;t--;)i=n,n=me(n);if(!m)return n;if(r&&n?.nodeType!==Rt){var s=Te();return n===null?i?.after(s):n.before(s),Q(s),s}return Q(n),n}function mn(e){e.textContent=""}function yn(){return!1}function ht(e){var t=g,r=_;R(null),U(null);try{return e()}finally{R(t),U(r)}}function wn(e){_===null&&g===null&&Jr(),g!==null&&(g.f&A)!==0&&_===null&&zr(),ue&&Yr()}function $n(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function W(e,t,r,n=!0){var i=_;i!==null&&(i.f&X)!==0&&(e|=X);var s={ctx:M,deps:null,nodes_start:null,nodes_end:null,f:e|O,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{we(s),s.f|=Ke}catch(l){throw te(s),l}else t!==null&&pe(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&ge)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&$n(o,i),g!==null&&(g.f&L)!==0&&(e&G)===0)){var a=g;(a.effects??=[]).push(o)}}return s}function En(e){const t=W(Ge,null,!1);return C(t,x),t.teardown=e,t}function Qt(e){wn();var t=_.f,r=!g&&(t&Y)!==0&&(t&Ke)===0;if(r){var n=M;(n.e??=[]).push(e)}else return er(e)}function er(e){return W(Je|Vr,e,!1)}function xn(e){oe.ensure();const t=W(G|ge,e,!0);return()=>{te(t)}}function kn(e){oe.ensure();const t=W(G|ge,e,!0);return(r={})=>new Promise(n=>{r.outro?ir(t,()=>{te(t),n(void 0)}):(te(t),n(void 0))})}function Tn(e){return W(Je,e,!1)}function Nn(e){return W(Qe|ge,e,!0)}function qn(e,t=0){return W(Ge|t,e,!0)}function B(e,t=[],r=[]){bn(t,r,n=>{W(Ge,()=>e(...n.map(b)),!0)})}function Cn(e,t=0){var r=W(_e|t,e,!0);return r}function vt(e,t=!0){return W(Y|ge,e,!0,t)}function tr(e){var t=e.teardown;if(t!==null){const r=ue,n=g;lr(!0),R(null);try{t.call(null)}finally{lr(r),R(n)}}}function rr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&ht(()=>{i.abort(tt)});var n=r.next;(r.f&G)!==0?r.parent=null:te(r,t),r=n}}function Ln(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Y)===0&&te(t),t=r}}function te(e,t=!0){var r=!1;(t||(e.f&Fr)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Sn(e.nodes_start,e.nodes_end),r=!0),rr(e,t&&!r),Fe(e,0),C(e,ne);var n=e.transitions;if(n!==null)for(const s of n)s.stop();tr(e);var i=e.parent;i!==null&&i.first!==null&&nr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Sn(e,t){for(;e!==null;){var r=e===t?null:me(e);e.remove(),e=r}}function nr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function ir(e,t){var r=[];sr(e,r,!0),An(r,()=>{te(e),t&&t()})}function An(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function sr(e,t,r){if((e.f&X)===0){if(e.f^=X,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Xe)!==0||(n.f&Y)!==0;sr(n,t,s?r:!1),n=i}}}function On(e){or(e,!0)}function or(e,t){if((e.f&X)!==0){e.f^=X,(e.f&x)===0&&(C(e,O),pe(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Xe)!==0||(r.f&Y)!==0;or(r,i?t:!1),r=n}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}let ye=!1;function ar(e){ye=e}let ue=!1;function lr(e){ue=e}let g=null,fe=!1;function R(e){g=e}let _=null;function U(e){_=e}let z=null;function ur(e){g!==null&&(z===null?z=[e]:z.push(e))}let T=null,S=0,P=null;function Rn(e){P=e}let fr=1,Ce=0,ce=Ce;function cr(e){ce=e}let re=!1;function dr(){return++fr}function je(e){var t=e.f;if((t&O)!==0)return!0;if((t&K)!==0){var r=e.deps,n=(t&A)!==0;if(r!==null){var i,s,o=(t&Ae)!==0,a=n&&_!==null&&!re,l=r.length;if((o||a)&&(_===null||(_.f&ne)===0)){var u=e,f=u.parent;for(i=0;i<l;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=Ae),a&&f!==null&&(f.f&A)===0&&(u.f^=A)}for(i=0;i<l;i++)if(s=r[i],je(s)&&Wt(s),s.wv>e.wv)return!0}(!n||_!==null&&!re)&&C(e,x)}return!1}function hr(e,t,r=!0){var n=e.reactions;if(n!==null&&!z?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&L)!==0?hr(s,t,!1):t===s&&(r?C(s,O):(s.f&x)!==0&&C(s,K),pe(s))}}function vr(e){var t=T,r=S,n=P,i=g,s=re,o=z,a=M,l=fe,u=ce,f=e.f;T=null,S=0,P=null,re=(f&A)!==0&&(fe||!ye||g===null),g=(f&(Y|G))===0?e:null,z=null,Pe(e.ctx),fe=!1,ce=++Ce,e.ac!==null&&(ht(()=>{e.ac.abort(tt)}),e.ac=null);try{e.f|=Ze;var h=e.fn,c=h(),d=e.deps;if(T!==null){var v;if(Fe(e,S),d!==null&&S>0)for(d.length=S+T.length,v=0;v<T.length;v++)d[S+v]=T[v];else e.deps=d=T;if(!re||(f&L)!==0&&e.reactions!==null)for(v=S;v<d.length;v++)(d[v].reactions??=[]).push(e)}else d!==null&&S<d.length&&(Fe(e,S),d.length=S);if(It()&&P!==null&&!fe&&d!==null&&(e.f&(L|K|O))===0)for(v=0;v<P.length;v++)hr(P[v],e);return i!==null&&i!==e&&(Ce++,P!==null&&(n===null?n=P:n.push(...P))),(e.f&ie)!==0&&(e.f^=ie),c}catch(k){return an(k)}finally{e.f^=Ze,T=t,S=r,P=n,g=i,re=s,z=o,Pe(a),fe=l,ce=u}}function Pn(e,t){let r=t.reactions;if(r!==null){var n=Rr.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&L)!==0&&(T===null||!T.includes(t))&&(C(t,K),(t.f&(A|Ae))===0&&(t.f^=Ae),Vt(t),Fe(t,0))}function Fe(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Pn(e,r[n])}function we(e){var t=e.f;if((t&ne)===0){C(e,x);var r=_,n=ye;_=e,ye=!0;try{(t&_e)!==0?Ln(e):rr(e),tr(e);var i=vr(e);e.teardown=typeof i=="function"?i:null,e.wv=fr;var s;Nt&&sn&&(e.f&O)!==0&&e.deps}finally{ye=n,_=r}}}function b(e){var t=e.f,r=(t&L)!==0;if(g!==null&&!fe){var n=_!==null&&(_.f&ne)!==0;if(!n&&!z?.includes(e)){var i=g.deps;if((g.f&Ze)!==0)e.rv<Ce&&(e.rv=Ce,T===null&&i!==null&&i[S]===e?S++:T===null?T=[e]:(!re||!T.includes(e))&&T.push(e));else{(g.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[g]:s.includes(g)||s.push(g)}}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&A)===0&&(o.f^=A)}if(ue){if(ee.has(e))return ee.get(e);if(r){o=e;var l=o.v;return((o.f&x)===0&&o.reactions!==null||br(o))&&(l=ot(o)),ee.set(o,l),l}}else r&&(o=e,je(o)&&Wt(o));if((e.f&ie)!==0)throw e.v;return e.v}function br(e){if(e.v===w)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&L)!==0&&br(t))return!0;return!1}const Mn=-7169;function C(e,t){e.f=e.f&Mn|t}const Dn=new Set,_r=new Set;function In(e,t,r,n={}){function i(s){if(n.capture||Le.call(t,s),!s.cancelBubble)return ht(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?un(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function bt(e,t,r,n,i){var s={capture:n,passive:i},o=In(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&En(()=>{t.removeEventListener(e,o,s)})}let gr=null;function Le(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;gr=e;var o=0,a=gr===e&&e.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||e.target,s!==t){ve(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=g,h=_;R(null),U(null);try{for(var c,d=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var k=s["__"+n];if(k!=null&&(!s.disabled||e.target===s))if(qt(k)){var[D,...I]=k;D.apply(s,[e,...I])}else k.call(s,e)}catch(N){c?d.push(N):c=N}if(e.cancelBubble||v===t||v===null)break;s=v}if(c){for(let N of d)queueMicrotask(()=>{throw N});throw c}}finally{e.__root=t,delete e.currentTarget,R(f),U(h)}}}function jn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ve(e,t){var r=_;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function pr(e,t){var r=(t&Sr)!==0,n=(t&Ar)!==0,i,s=!e.startsWith("<!>");return()=>{if(m)return Ve($,null),$;i===void 0&&(i=jn(s?e:"<!>"+e),r||(i=Ne(i)));var o=n||Kt?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ne(o),l=o.lastChild;Ve(a,l)}else Ve(o,o);return o}}function _t(e,t){if(m){_.nodes_end=$,rt();return}e!==null&&e.before(t)}const Fn=["touchstart","touchmove"];function Vn(e){return Fn.includes(e)}function gt(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function mr(e,t){return yr(e,t)}function Wn(e,t){dt(),t.intro=t.intro??!1;const r=t.target,n=m,i=$;try{for(var s=Ne(r);s&&(s.nodeType!==Oe||s.data!==xt);)s=me(s);if(!s)throw he;Z(!0),Q(s),rt();const o=yr(e,{...t,anchor:s});if($===null||$.nodeType!==Oe||$.data!==Tt)throw Re(),he;return Z(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==he&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Kr(),dt(),mn(r),Z(!1),mr(e,t)}finally{Z(n),Q(i)}}const $e=new Map;function yr(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0}){dt();var a=new Set,l=h=>{for(var c=0;c<h.length;c++){var d=h[c];if(!a.has(d)){a.add(d);var v=Vn(d);t.addEventListener(d,Le,{passive:v});var k=$e.get(d);k===void 0?(document.addEventListener(d,Le,{passive:v}),$e.set(d,1)):$e.set(d,k+1)}}};l(Pr(Dn)),_r.add(l);var u=void 0,f=kn(()=>{var h=r??t.appendChild(Te());return vt(()=>{if(s){Mt({});var c=M;c.c=s}i&&(n.$$events=i),m&&Ve(h,null),u=e(h,n)||{},m&&(_.nodes_end=$),s&&Dt()}),()=>{for(var c of a){t.removeEventListener(c,Le);var d=$e.get(c);--d===0?(document.removeEventListener(c,Le),$e.delete(c)):$e.set(c,d)}_r.delete(l),h!==r&&h.parentNode?.removeChild(h)}});return pt.set(u,f),u}let pt=new WeakMap;function Bn(e,t){const r=pt.get(e);return r?(pt.delete(e),r(t)):Promise.resolve()}function Un(e,t,r=!1){m&&rt();var n=e,i=null,s=null,o=w,a=r?Xe:0,l=!1;const u=(d,v=!0)=>{l=!0,c(v,d)};var f=null;function h(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var d=o?i:s,v=o?s:i;d&&On(d),v&&ir(v,()=>{o?s=null:i=null})}const c=(d,v)=>{if(o===(o=d))return;let k=!1;if(m){const He=tn(n)===kt;!!o===He&&(n=en(),Q(n),Z(!1),k=!0)}var D=yn(),I=n;if(D&&(f=document.createDocumentFragment(),f.append(I=Te())),o?i??=v&&vt(()=>v(I)):s??=v&&vt(()=>v(I)),D){var N=E,Ee=o?i:s,j=o?s:i;Ee&&N.skipped_effects.delete(Ee),j&&N.skipped_effects.add(j),N.add_callback(h)}else h();k&&Z(!0)};Cn(()=>{l=!1,t(u),l||c(null,null)},a),m&&(n=$)}function Hn(e,t){Tn(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function Yn(e,t,r){var n=""+e;return n}function zn(e,t){return String(e)}function mt(e,t,r,n,i,s){var o=e.__className;if(m||o!==r||o===void 0){var a=Yn(r);(!m||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e.__className=r}return s}function Jn(e,t,r,n){var i=e.__style;if(m||i!==t){var s=zn(t);(!m||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return n}const Gn=Symbol("is custom element"),Kn=Symbol("is html");function Xn(e,t,r,n){var i=Zn(e);m&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Br]=r),r==null?e.removeAttribute(t):typeof r!="string"&&wr(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function J(e,t,r){var n=g,i=_;let s=m;m&&Z(!1),R(null),U(null);try{t!=="style"&&(yt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?wr(e).includes(t):r&&typeof r=="object")?e[t]=r:Xn(e,t,r==null?r:String(r))}finally{R(n),U(i),s&&Z(!0)}}function Zn(e){return e.__attributes??={[Gn]:e.nodeName.includes("-"),[Kn]:e.namespaceURI===Or}}var yt=new Map;function wr(e){var t=e.getAttribute("is")||e.nodeName,r=yt.get(t);if(r)return r;yt.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Mr(i);for(var o in n)n[o].set&&r.push(o);i=Ct(i)}return r}function We(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var l;l=()=>{var c=e[t];return c===void 0?o():(s=!0,c)};var u=!1,f=st(()=>(u=!1,l())),h=_;return(function(c,d){if(arguments.length>0){const v=d?b(f):c;return y(f,v),u=!0,i!==void 0&&(i=v),c}return ue&&u||(h.f&ne)!==0?f.v:b(f)})}function Qn(e){return new ei(e)}class ei{#t;#e;constructor(t){var r=new Map,n=(s,o)=>{var a=pn(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return b(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===Wr?!0:(b(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return y(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#e=(t.hydrate?Wn:mr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||ve(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Bn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let $r;typeof HTMLElement=="function"&&($r=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),_t(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ti(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Be(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Qn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xn(()=>{qn(()=>{this.$$r=!0;for(const n of Se(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Be(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Be(e,r,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 Se(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Be(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 ti(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ri(e,t,r,n,i,s){let o=class extends $r{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Se(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Se(t).forEach(a=>{ve(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Be(a,l,t),this.$$d[a]=l;var u=this.$$c;if(u){var f=be(u,a)?.get;f?u[a]=l:u.$set({[a]:l})}}})}),n.forEach(a=>{ve(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}var de={},Er;function ni(){if(Er)return de;Er=1,Object.defineProperty(de,"__esModule",{value:!0}),de.LanguageTranslator=void 0,de.getChildStyleToPass=e,de.addComponent=t;function e(n,i){var s,o,a="";try{if(n&&i?.length&&(!((s=Object.keys(n))===null||s===void 0)&&s.length)&&(!((o=i?.filter(function(c){return Object.keys(n).includes(c.name)}))===null||o===void 0)&&o.length))for(var l=function(c){var d=i?.filter(function(v){return v.name===c&&v.defaultValue!==n[c]});d&&(a+="".concat(c,":").concat(n[c],";"))},u=0,f=Object.keys(n);u<f.length;u++){var h=f[u];l(h)}}catch(c){console.error("error getting child style to pass",c)}finally{return a}}function t(n){var i,s=((i=n?.repoName.split("/"))===null||i===void 0?void 0:i[1])||n?.repoName;if(!s)throw new Error("wrong componentPath "+n?.repoName);if(!n?.version)throw new Error("wrong version "+n?.version);var o=n?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var a=document.createElement("script");if(a.id=s+"-script",a.src="https://cdn.jsdelivr.net/npm/".concat(n.repoName,"@").concat(n.version,"/").concat(o),n?.local)a.src="".concat(n.local);else if(location.href.includes("localhost:6006")){var l=s.split("-")[0];a.src="http://localhost:6006/webcomponents/".concat(s.replace(l+"-",""),"/").concat(o)}document.head.appendChild(a)}catch(u){console.warn(u)}}var r=(function(){function n(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return n.prototype.setLang=function(i){i||(i=n.getDefaultLang()),this.lang=i},n.prototype.translateWord=function(i,s){return n.getDictionaryWord(i,this.dictionary,s||this.lang)},n.prototype.translateDate=function(i,s,o){return n.formatDate(i,s,o||this.lang)},n.getDefaultLang=function(){var i,s,o,a,l,u="en";return navigator?.languages&&(!((o=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||o===void 0)&&o.length)&&(u=(l=(a=navigator.languages[0])===null||a===void 0?void 0:a.split("-")[0])===null||l===void 0?void 0:l.toLowerCase()),u},n.getDictionaryWord=function(i,s,o){var a;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(o&&(!((a=s[o])===null||a===void 0)&&a[i]))return s[o][i];var l="",u=n.getDefaultLang();if(!o||u!==o){var f=s?.[u];f?.[i]&&(l=f[i])}return l},n.formatDate=function(i,s,o){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var a=new Intl.DateTimeFormat(o||n.getDefaultLang(),s);return a.format(i)},n})();return de.LanguageTranslator=r,de}var Ue=ni();const xr={en:{latitude:"Latitude",longitude:"Longitude",latitudePlaceholder:"Insert latitude...",longitudePlaceholder:"Insert longitude...",latitudeLabel:"Latitude",longitudeLabel:"Longitude"},it:{latitude:"Latitudine",longitude:"Longitudine",latitudePlaceholder:"Inserisci latitudine...",longitudePlaceholder:"Inserisci longitudine...",latitudeLabel:"Latitudine",longitudeLabel:"Longitudine"}},kr={version:"0.61.42"};var ii=pr('<div part="invalid-feedback" class="invalid-feedback mb-1 svelte-q2pihy"> </div>'),si=pr('<div class="form-control svelte-q2pihy"><div class="container-fluid svelte-q2pihy"><div class="row svelte-q2pihy"><div class="col-6 svelte-q2pihy" style="padding: 0px;"><hb-map></hb-map></div> <div class="col-6 svelte-q2pihy" style="margin-bottom: 12px;"><div class="row coord svelte-q2pihy"><div class="col-12 svelte-q2pihy"> <hb-input-number></hb-input-number></div></div> <div class="row coord svelte-q2pihy"><div class="col-12 svelte-q2pihy"> <hb-input-number></hb-input-number></div></div> <!></div></div></div></div>',2);const oi={hash:"svelte-q2pihy",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
|
/*!
|
|
4
4
|
* Bootstrap v5.1.2 (https://getbootstrap.com/)
|
|
5
5
|
* Copyright 2011-2021 The Bootstrap Authors
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
@media (min-width: 1200px) {
|
|
93
93
|
}
|
|
94
94
|
@media (min-width: 1400px) {
|
|
95
|
-
}:host {font-family:"Roboto", sans-serif;min-height:400px;width:auto;}hb-input-number.svelte-q2pihy {width:100%;display:block;}.coord.svelte-q2pihy {margin:10px 0px 0px 0px;}.form-control.svelte-q2pihy {padding:0px;}`};function
|
|
95
|
+
}:host {font-family:"Roboto", sans-serif;min-height:400px;width:auto;}hb-input-number.svelte-q2pihy {width:100%;display:block;}.coord.svelte-q2pihy {margin:10px 0px 0px 0px;}.form-control.svelte-q2pihy {padding:0px;}`};function Tr(e,t){Mt(t,!0),Hn(e,oi);/**
|
|
96
96
|
* Svelte Input Coords WebComponent
|
|
97
97
|
* =====================
|
|
98
98
|
*
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
*
|
|
101
101
|
* @license: MIT License
|
|
102
102
|
*
|
|
103
|
-
*/let r=
|
|
103
|
+
*/let r=We(t,"schemaentry"),n=We(t,"show_validation",7,"no"),i=We(t,"id",7,void 0),s=We(t,"i18nlang"),o=q(le(new Ue.LanguageTranslator({dictionary:xr,lang:s()}))),a=q(void 0),l=q(0),u=q(0),f=hn(()=>r()?r()?.required?!!(b(l)&&b(u)):!0:!1),h=q(0),c=q(le([0,0]));function d(p,H){t.$$host.dispatchEvent(new CustomEvent(p,{detail:H}))}Qt(()=>{if(typeof r()=="string")try{r(JSON.parse(r())),r()?.value?.lat&&r()?.value?.lon&&(y(l,r().value.lat,!0),y(u,r().value.lon,!0)),r()?.id&&i(r().id),y(h,b(h)||r()?.params?.zoom||14,!0),y(c,b(c)?.[0]?b(c):r()?.params?.center||[0,0],!0)}catch{}b(o)&&s()&&b(o).lang&&b(o).lang!==s()&&y(o,new Ue.LanguageTranslator({dictionary:xr,lang:s()}),!0),console.log("center",b(c)),console.log("zoom",b(h))}),Qt(()=>{console.log("setval",b(a)),d("setVal",{value:b(a),valid:b(f),id:i()})}),Ue.addComponent({repoName:"@htmlbricks/hb-input-number",version:kr.version}),Ue.addComponent({repoName:"@htmlbricks/hb-map",version:kr.version});function v(p,H){console.log("changeCoords",p,b(a)),y(p==="lat"?l:u,H||0,!0),y(a,{lat:b(l),lon:b(u)},!0),d("setVal",{value:b(a),valid:b(f),id:i()})}var k={get schemaentry(){return r()},set schemaentry(p){r(p),ke()},get show_validation(){return n()},set show_validation(p="no"){n(p),ke()},get id(){return i()},set id(p=void 0){i(p),ke()},get i18nlang(){return s()},set i18nlang(p){s(p),ke()}},D=si(),I=V(D),N=V(I),Ee=V(N),j=V(Ee);Jn(j,"width: 100%; height: 100%;"),J(j,"center",JSON.stringify([0,0])),B(()=>J(j,"zoom",b(h))),B(()=>J(j,"source",JSON.stringify(r()?.params?.source?r()?.params?.source:{type:"osm"}))),B(()=>J(j,"options",JSON.stringify(r()?.params?.options?r()?.params?.options:{centerFromGeometries:!0}))),B(()=>J(j,"data",JSON.stringify([{marker:{lngLat:[b(a)?.lon||0,b(a)?.lat||0]}}]))),mt(j,1,"svelte-q2pihy"),F(Ee);var He=qe(Ee,2),wt=V(He),Nr=V(wt),qr=V(Nr),Ye=qe(qr);B(()=>J(Ye,"schemaentry",JSON.stringify({id:"lat",value:b(l)||0,label:r()?.params?.latitudeLabel||b(o).translateWord("latitude"),placeholder:r()?.params?.latitudePlaceholder||b(o).translateWord("latitudePlaceholder"),required:!0}))),B(()=>J(Ye,"show_validation",n())),mt(Ye,1,"svelte-q2pihy"),F(Nr),F(wt);var $t=qe(wt,2),Cr=V($t),Lr=V(Cr),ze=qe(Lr);B(()=>J(ze,"schemaentry",JSON.stringify({id:"lon",value:b(u)||0,label:r()?.params?.longitudeLabel||b(o).translateWord("longitude"),placeholder:r()?.params?.longitudePlaceholder||b(o).translateWord("longitudePlaceholder"),required:!0}))),B(()=>J(ze,"show_validation",n())),mt(ze,1,"svelte-q2pihy"),F(Cr),F($t);var ai=qe($t,2);{var li=p=>{var H=ii(),ui=V(H,!0);F(H),B(()=>gt(ui,r().validationTip)),_t(p,H)};Un(ai,p=>{r()?.validationTip&&n()==="yes"&&p(li)})}return F(He),F(N),F(I),F(D),B((p,H)=>{gt(qr,`${p??""}:`),gt(Lr,`${H??""}: `)},[()=>b(o).translateWord("latitude"),()=>b(o).translateWord("longitude")]),bt("pointClickCoordinates",j,p=>{console.log("pointClickCoordinates",p.detail),y(l,p.detail.coordinates.latitude,!0),y(u,p.detail.coordinates.longitude,!0),y(h,p.detail.zoom,!0)}),bt("setVal",Ye,p=>{v("lat",p.detail.value)}),bt("setVal",ze,p=>{v("lon",p.detail.value)}),_t(e,D),Dt(k)}customElements.define("hb-input-coords",ri(Tr,{schemaentry:{},show_validation:{},id:{},i18nlang:{}},[],[],!0)),Et.Component=Tr,Object.defineProperty(Et,Symbol.toStringTag,{value:"Module"})})(this["input-coords"]=this["input-coords"]||{});
|
|
104
104
|
//# sourceMappingURL=main.iife.js.map
|