@mantou/gem 2.2.0 → 2.2.2
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/dist/gem.es.js +2039 -2051
- package/dist/gem.umd.js +12 -32
- package/elements/base/dialog.d.ts +1 -1
- package/elements/base/dialog.d.ts.map +1 -1
- package/elements/base/dialog.js +2 -2
- package/elements/base/dialog.js.map +1 -1
- package/elements/base/gesture.d.ts +1 -1
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +5 -5
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +1 -1
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +18 -19
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +93 -57
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/modal-factory.js +4 -3
- package/elements/base/modal-factory.js.map +1 -1
- package/elements/base/reflect.d.ts +1 -2
- package/elements/base/reflect.d.ts.map +1 -1
- package/elements/base/reflect.js +8 -10
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +18 -8
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +17 -21
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +1 -1
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +5 -7
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.d.ts +4 -3
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +45 -24
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +1 -1
- package/elements/base/use.js.map +1 -1
- package/elements/link.js +1 -1
- package/elements/link.js.map +1 -1
- package/elements/route.js +1 -1
- package/elements/route.js.map +1 -1
- package/helper/hmr.d.ts +11 -0
- package/helper/hmr.d.ts.map +1 -0
- package/helper/hmr.js +255 -0
- package/helper/hmr.js.map +1 -0
- package/helper/i18n.d.ts +2 -2
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +5 -4
- package/helper/i18n.js.map +1 -1
- package/helper/logger.d.ts +1 -1
- package/helper/logger.d.ts.map +1 -1
- package/helper/logger.js +8 -5
- package/helper/logger.js.map +1 -1
- package/helper/mediaquery.js +1 -1
- package/helper/mediaquery.js.map +1 -1
- package/helper/react-utils.d.ts.map +1 -1
- package/helper/react-utils.js +2 -6
- package/helper/react-utils.js.map +1 -1
- package/helper/ssr-shim.d.ts.map +1 -1
- package/helper/ssr-shim.js +2 -1
- package/helper/ssr-shim.js.map +1 -1
- package/helper/theme.d.ts +17 -6
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +23 -8
- package/helper/theme.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.d.ts.map +1 -1
- package/index.js +1 -3
- package/index.js.map +1 -1
- package/lib/decorators.d.ts +54 -62
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +90 -91
- package/lib/decorators.js.map +1 -1
- package/lib/directive.d.ts +0 -18
- package/lib/directive.d.ts.map +1 -1
- package/lib/directive.js +1 -2
- package/lib/directive.js.map +1 -1
- package/lib/element.d.ts +8 -137
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +16 -481
- package/lib/element.js.map +1 -1
- package/lib/history.d.ts +68 -10
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +15 -15
- package/lib/history.js.map +1 -1
- package/lib/lit-html.d.ts +7 -109
- package/lib/lit-html.d.ts.map +1 -1
- package/lib/lit-html.js +75 -32
- package/lib/lit-html.js.map +1 -1
- package/lib/reactive.d.ts +130 -0
- package/lib/reactive.d.ts.map +1 -0
- package/lib/reactive.js +474 -0
- package/lib/reactive.js.map +1 -0
- package/lib/repeat.d.ts +3 -3
- package/lib/repeat.d.ts.map +1 -1
- package/lib/repeat.js +3 -3
- package/lib/repeat.js.map +1 -1
- package/lib/store.d.ts +15 -4
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +2 -0
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +26 -11
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +21 -14
- package/lib/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/dist.ts +6 -8
- package/src/elements/base/dialog.ts +2 -2
- package/src/elements/base/gesture.ts +6 -6
- package/src/elements/base/link.ts +18 -24
- package/src/elements/base/modal-factory.ts +4 -3
- package/src/elements/base/reflect.ts +2 -3
- package/src/elements/base/route.ts +21 -28
- package/src/elements/base/title.ts +6 -8
- package/src/elements/base/unsafe.ts +33 -14
- package/src/elements/base/use.ts +1 -1
- package/src/elements/link.ts +1 -1
- package/src/elements/route.ts +1 -1
- package/src/helper/hmr.ts +305 -0
- package/src/helper/i18n.ts +7 -7
- package/src/helper/logger.ts +9 -5
- package/src/helper/mediaquery.ts +1 -1
- package/src/helper/react-utils.ts +4 -12
- package/src/helper/ssr-shim.ts +3 -1
- package/src/helper/theme.ts +29 -14
- package/src/index.ts +1 -4
- package/src/lib/decorators.ts +107 -117
- package/src/lib/directive.ts +3 -5
- package/src/lib/element.ts +21 -600
- package/src/lib/history.ts +16 -18
- package/src/lib/lit-html.ts +89 -34
- package/src/lib/reactive.ts +620 -0
- package/src/lib/repeat.ts +5 -5
- package/src/lib/store.ts +4 -2
- package/src/lib/utils.ts +41 -29
- package/src/test/elements/link.test.ts +2 -2
- package/src/test/elements/reflect.test.ts +3 -3
- package/src/test/elements/title.test.ts +2 -2
- package/src/test/gem-element/advance.test.ts +11 -10
- package/src/test/gem-element/basic.test.ts +4 -5
- package/src/test/gem-element/decorators.test.ts +10 -10
- package/src/test/gem-element/multi.test.ts +2 -2
- package/src/test/history.test.ts +1 -2
- package/src/test/store.test.ts +2 -3
- package/src/test/utils.test.ts +5 -6
- package/src/test/utils.ts +2 -2
- package/helper/react-shim.d.ts +0 -15
- package/helper/react-shim.d.ts.map +0 -1
- package/helper/react-shim.js +0 -56
- package/helper/react-shim.js.map +0 -1
- package/lib/directives.d.ts +0 -4
- package/lib/directives.d.ts.map +0 -1
- package/lib/directives.js +0 -5
- package/lib/directives.js.map +0 -1
- package/lib/ref.d.ts +0 -1
- package/lib/ref.d.ts.map +0 -1
- package/lib/ref.js +0 -2
- package/lib/ref.js.map +0 -1
package/dist/gem.umd.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
(function(d,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(d=typeof globalThis<"u"?globalThis:d||self,O(d.Gem={}))})(this,function(d){"use strict";var Cl=Object.defineProperty;var nc=d=>{throw TypeError(d)};var bl=(d,O,z)=>O in d?Cl(d,O,{enumerable:!0,configurable:!0,writable:!0,value:z}):d[O]=z;var $=(d,O,z)=>bl(d,typeof O!="symbol"?O+"":O,z),Ls=(d,O,z)=>O.has(d)||nc("Cannot "+z);var f=(d,O,z)=>(Ls(d,O,"read from private field"),z?z.call(d):O.get(d)),C=(d,O,z)=>O.has(d)?nc("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(d):O.set(d,z),A=(d,O,z,$t)=>(Ls(d,O,"write to private field"),$t?$t.call(d,z):O.set(d,z),z),Ns=(d,O,z)=>(Ls(d,O,"access private method"),z);var At,gt,Lt,_n,Rs,$e,jn,ut,Bt,fn,ye,we,Se,Ee,it,_t,Kt,vt,Ce,ht,be,Te,jt,lt,Oe,Is,Qn,Jn,pn,Pe,Qt,mn,Yn,Zn,gn,ke,W,Xn,rc,oc,$n,ti,vn;const O=Object.freeze(Object.defineProperty({__proto__:null,get adoptedStyle(){return xe},get aria(){return qe},get async(){return kr},get attribute(){return U},get boolattribute(){return Ve},get connectStore(){return Ue},get customElement(){return Mr},get effect(){return pt},get emitter(){return ie},get fallback(){return Er},get globalemitter(){return Tr},get light(){return yi},get memo(){return vi},get mounted(){return ne},get numattribute(){return wr},get part(){return $i},get property(){return B},get shadow(){return bt},get slot(){return br},get state(){return De},get template(){return zt},get unmounted(){return Sr},get willMount(){return An}},Symbol.toStringTag,{value:"Module"}));/**
|
|
1
|
+
(function(l,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(l=typeof globalThis<"u"?globalThis:l||self,L(l.Gem={}))})(this,function(l){"use strict";var Dl=Object.defineProperty;var dc=l=>{throw TypeError(l)};var Ul=(l,L,I)=>L in l?Dl(l,L,{enumerable:!0,configurable:!0,writable:!0,value:I}):l[L]=I;var $=(l,L,I)=>Ul(l,typeof L!="symbol"?L+"":L,I),Us=(l,L,I)=>L.has(l)||dc("Cannot "+I);var f=(l,L,I)=>(Us(l,L,"read from private field"),I?I.call(l):L.get(l)),C=(l,L,I)=>L.has(l)?dc("Cannot add the same private member more than once"):L instanceof WeakSet?L.add(l):L.set(l,I),O=(l,L,I,vn)=>(Us(l,L,"write to private field"),vn?vn.call(l,I):L.set(l,I),I),qs=(l,L,I)=>(Us(l,L,"access private method"),I);var $t,ut,St,ln,Fs,ve,Qn,yt,Ft,dn,$e,Se,ye,it,_t,xt,wt,we,at,Ee,Ce,Bt,ct,Pe,xs,Jn,Yn,un,be,Kt,_n,Zn,Xn,fn,Te,pn,ke,ti,z,ei,pc,mc,gn,ni,mn;const{assign:L,fromEntries:I,entries:vn,keys:gc}=Object;function vc(n){Promise.resolve().then(n)}const ii=new Set;function ft(n,t=vc){ii.has(n)||(t(()=>{ii.delete(n),n()}),ii.add(n))}function Me(n,t){const e=t;return delete e.name,delete e.length,L(e,n),e}function si(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function ri(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Bs extends EventTarget{constructor(){super(...arguments);C(this,ln);C(this,$t,new Map);C(this,ut);C(this,St)}get size(){return f(this,$t).size}get first(){return f(this,ut)}get last(){return f(this,St)}isSuperLinkOf(e){let i=e.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(e){return f(this,$t).get(e)}add(e){f(this,St)||this.dispatchEvent(new CustomEvent("start"));const i=qs(this,ln,Fs).call(this,e)||{value:e};i.prev=f(this,St),i.prev&&(i.prev.next=i),i.next=void 0,O(this,St,i),f(this,ut)||O(this,ut,i),f(this,$t).set(e,i)}delete(e){const i=qs(this,ln,Fs).call(this,e);return f(this,ut)||this.dispatchEvent(new CustomEvent("end")),i}clear(){f(this,$t).clear(),O(this,ut,O(this,St,void 0))}get(){const e=f(this,ut);if(e)return this.delete(e.value),e.value}}$t=new WeakMap,ut=new WeakMap,St=new WeakMap,ln=new WeakSet,Fs=function(e){const i=f(this,$t).get(e);return i&&(i.prev?i.prev.next=i.next:O(this,ut,i.next),i.next?i.next.prev=i.prev:O(this,St,i.prev),f(this,$t).delete(e)),i};class Ks extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class jt extends URLSearchParams{constructor(){super(...arguments);C(this,ve,e=>typeof e=="string"?e:JSON.stringify(e));C(this,Qn,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let i;typeof e=="string"?i=I(new URLSearchParams(e).entries()):i=e,vn(i).forEach(([s,o])=>{this.append(s,f(this,ve).call(this,o))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,f(this,ve).call(this,s)));else{const s=f(this,ve).call(this,i);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(i=>i!=="").map(i=>f(this,Qn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}ve=new WeakMap,Qn=new WeakMap;function $n(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const $c=$n;function Sn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+Sn(n-t.length):t}function At(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Sc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function yn(n){return gc(n).forEach(t=>{delete n[t]}),n}class pt extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function js(n,t){const e=n.length;if(t.length!==e)return!0;for(let i=0;i<e;i++)if(n[i]!==t[i])return!0;return!1}function wn(n,t,e){let i=t;for(const s in n){const o=e(s,n[s]);i+=o?o+t:""}return i}function yc(n){return wn(n,";",(t,e)=>e||e===0?`${At(t)}:${e}`:"")}function Qs(n){return wn(n," ",(t,e)=>e?t:"")}const wc=Qs;function Ec(n){return wn(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const Oe=new WeakMap;function Et(n){const t=Me(n,e=>{var i;Object.assign(t,e),(i=Oe.get(t))==null||i.forEach(s=>ft(s))});return Oe.set(t,new Set),t}function ht(n,t){const e=Oe.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const Cc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:Oe,connect:ht,createStore:Et},Symbol.toStringTag,{value:"Module"}));l.html=(n,...t)=>$n(n,...t.map(e=>e instanceof Element?e.outerHTML:e)),l.render=(n,t)=>t.innerHTML=n;function oi(n,t){l.html=n,l.render=t}const{assign:Js,defineProperty:bc}=Object;bc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const Ys=n=>typeof n=="function"&&n(),ai=globalThis.nQM,mt=Symbol.for("gem@sheetToken"),Le=Symbol.for("gem@update"),Zs="gem-style-boundary",En="gem@render-error",Tc=Le,ci=new WeakMap,Xs=new WeakMap;class kc extends CSSStyleSheet{constructor(){super(...arguments);C(this,yt);$(this,"cssText","")}get element(){return f(this,yt)||(O(this,yt,document.createElement("style")),f(this,yt).textContent=this.cssText),f(this,yt)}replaceSync(e){this.cssText=e,f(this,yt)&&(f(this,yt).textContent=e),super.replaceSync(e)}}yt=new WeakMap;class Pc{constructor(t=""){C(this,Ft,"");C(this,dn,"");C(this,$e,new Map);C(this,Se,new Map);O(this,dn,t)}setContent(t){O(this,Ft,t)}getStyle(t,e){var a;const i=t&&!((a=t.internals)!=null&&a.shadowRoot),s=i?t.constructor:this;if(!f(this,$e).has(s)){const c=new kc({media:f(this,dn)});f(this,$e).set(s,c)}const o=f(this,$e).get(s);if(!f(this,Se).has(o)){let c=f(this,Ft),d="";i&&(d=e?"@scope":`@scope (${t.tagName}) to (:state(${Zs}) > *)`,c=`${d}{ ${c} }`),o.replaceSync(c),f(this,Se).set(o,d)}return o}updateStyle(){f(this,Se).forEach((t,e)=>{e.replaceSync(t?`${t}{${f(this,Ft)}}`:f(this,Ft))})}}Ft=new WeakMap,dn=new WeakMap,$e=new WeakMap,Se=new WeakMap;function Nt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=$n(n,...t):s!==void 0?(e=n,i=s):i=n;const o=new Pc(e),a={[mt]:o};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(d=>{const u=d==="$";a[d]=u||d.includes("-")?d:`${d}-${Sn()}`,c+=`${u?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${a[d]}`} {${i[d]}}`}),o.setContent(c),a}const tr=(n,t,e)=>{let i=!1;t.forEach(s=>{const o=n.get(s)||0;i||(i=e===1&&o===0||e===-1&&o===1),n.set(s,o+e)}),i&&ft(Xs.get(n),ai)},Mc=(n,t)=>{const e=n.getRootNode();if(!ci.has(e)){const s=new Map;ci.set(e,s),Xs.set(s,()=>{const o=e.adoptedStyleSheets.filter(a=>!s.has(a));s.forEach((a,c)=>a&&o.push(c)),e.adoptedStyleSheets=o.reverse()})}const i=ci.get(e);return tr(i,t,1),()=>tr(i,t,-1)};l.createState=void 0;function er(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:o}=t,a=i==null?void 0:i();(!i||!s||js(s,a))&&(Ys(o),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function nr(n){return n.filter(t=>(Ys(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}l._createTemplate=void 0;const Qt=new Bs,hi=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(hi);const t=Qt.get();t&&(t(),hi(n))};Qt.addEventListener("start",()=>ft(hi));let ir;class J extends HTMLElement{constructor(){super();C(this,ct);C(this,ye);C(this,it);C(this,_t,[]);C(this,xt,[]);C(this,wt,[]);C(this,we);C(this,at);C(this,Ee);C(this,Ce);C(this,Bt);C(this,Jn,()=>{er(f(this,_t))});C(this,Yn,()=>{er(f(this,xt))});C(this,un,e=>{try{O(this,Ce,!0),f(this,Yn).call(this);const i=f(this,ye)===this,s=e?e.render():i?void 0:l.html`<slot></slot>`;if(s===void 0)return;l.render(s!==null?s:l.html`<style>${i?"@scope":":host"}{&{display:none!important;}}</style>`,f(this,ye))}catch(i){throw this.dispatchEvent(new CustomEvent(En,{bubbles:!0,composed:!0,detail:i})),i}finally{O(this,Ce,!1)}});C(this,be,()=>{const e=f(this,ct,xs);f(this,at)&&(e||!f(this,wt).length)&&(f(this,un).call(this,e),ft(f(this,Jn)))});C(this,Kt,()=>{f(this,ct,Pe).noBlocking?Qt.add(f(this,be)):f(this,be).call(this)});C(this,_n,()=>{const{adoptedStyleSheets:e=[]}=f(this,ct,Pe),{shadowRoot:i,sheets:s}=f(this,it),o=e.map(a=>a[mt].getStyle(this));if(i)i.adoptedStyleSheets=o.concat(s);else return this.prepend(...s.map(a=>a.element)),Mc(this,o)});C(this,Zn,()=>{var e;(e=f(this,_t))==null||e.forEach(i=>{const{callback:s,getDep:o,initialized:a}=i;a||(i.values=o==null?void 0:o(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,Xn,()=>{var e;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!f(this,wt).length&&this.render&&f(this,wt).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,fn);C(this,Te,async()=>{var o;if(f(this,we)){O(this,we,!1),(o=f(this,Bt))==null||o.call(this),O(this,Bt,f(this,_n).call(this));return}O(this,Ee,!0),f(this,Xn).call(this);const{observedStores:e,mode:i,penetrable:s}=f(this,ct,Pe);!i&&f(this,wt).length&&!s&&f(this,it).states.add(Zs),O(this,fn,e==null?void 0:e.map(a=>ht(a,f(this,Kt)))),f(this,un).call(this,f(this,ct,xs)),O(this,at,!0),O(this,Bt,f(this,_n).call(this)),ft(f(this,Zn))});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:f(this,at),fixed:!f(this,Ee)};f(this,at)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),f(this,_t).push(s)});$(this,"memo",(e,i)=>{f(this,xt).push({callback:e,getDep:i,fixed:!f(this,Ee)})});$(this,"update",()=>ft(f(this,Kt)));ir=this;const{mode:e,serializable:i,delegatesFocus:s,slotAssignment:o,aria:a}=f(this,ct,Pe),{focusable:c,...d}=a||{};O(this,ye,e?this.attachShadow({mode:e,serializable:i,delegatesFocus:s,slotAssignment:o}):this),O(this,it,this.attachInternals()),f(this,it).stateList=[],f(this,it).sheets=[],Js(f(this,it),d);let u;f(this,_t).push({fixed:!0,getDep:()=>[this.disabled],callback:([m=!1])=>{if(u===void 0&&(u=this.hasAttribute("tabindex")),f(this,it).ariaDisabled=String(m),c&&!u&&(this.tabIndex=-Number(m)),(c||s)&&m)return ri(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})}})}[Tc](){f(this,at)&&ft(f(this,Kt))}get internals(){return f(this,it)}connectedCallback(){f(this,ct,Pe).noBlocking?Qt.add(f(this,Te)):f(this,Te).call(this)}disconnectedCallback(){var e,i;if(this.isConnected){O(this,we,!0);return}Qt.delete(f(this,Te)),Qt.delete(f(this,be)),O(this,at,!1),(e=f(this,fn))==null||e.forEach(s=>s()),O(this,_t,nr(f(this,_t))),O(this,xt,nr(f(this,xt))),(i=f(this,Bt))==null||i.call(this)}}ye=new WeakMap,it=new WeakMap,_t=new WeakMap,xt=new WeakMap,wt=new WeakMap,we=new WeakMap,at=new WeakMap,Ee=new WeakMap,Ce=new WeakMap,Bt=new WeakMap,ct=new WeakSet,Pe=function(){return this.constructor[Symbol.metadata]},xs=function(){return f(this,wt).findLast(e=>!e.condition||e.condition())},Jn=new WeakMap,Yn=new WeakMap,un=new WeakMap,be=new WeakMap,Kt=new WeakMap,_n=new WeakMap,Zn=new WeakMap,Xn=new WeakMap,fn=new WeakMap,Te=new WeakMap,l.createState=e=>{const i=ir,s=Me(e,o=>{const a=f(i,_t).at(0);if(!ai&&f(i,at)&&a&&!a.initialized)throw new pt("Don't set state sync before insert the DOM");Js(s,o),!f(i,Ce)&&f(i,at)&&ft(f(i,Kt),ai)});return f(i,it).stateList.push(s),s},l._createTemplate=(e,i)=>f(e,wt).push(i);const Oc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:J,SheetToken:mt,UpdateToken:Le,_RenderErrorEvent:En,get _createTemplate(){return l._createTemplate},get createState(){return l.createState},css:Nt,get html(){return l.html},get render(){return l.render},setEngine:oi},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Lc,getOwnPropertyDescriptor:li,defineProperty:Cn}=Reflect,{getPrototypeOf:bn,assign:Ac,hasOwn:Tn}=Object,sr=new Ks;function Ct(n,t,e){var s;const i=n.metadata;li(i,t)||Cn(i,t,{value:((s=i[t])==null?void 0:s.filter(o=>o!==e))||[]}),i[t].push(e)}function kn(n,t){const{value:e}=li(n,t)||{};Lc(n,t),n[t]=e}const di=new WeakMap,{setAttribute:rr,toggleAttribute:Nc,removeAttribute:or}=Element.prototype,ui=(n,t)=>{var e;return(e=di.get(bn(n)))==null?void 0:e.get(t)};J.prototype.setAttribute=function(n,t){const e=ui(this,n);if(!e)return rr.call(this,n,t);this[e]=t},J.prototype.removeAttribute=function(n){const t=ui(this,n);if(!t)return or.call(this,n);this[t]=null},J.prototype.toggleAttribute=function(n,t){const e=ui(this,n);return e?this[e]=t??!this.hasAttribute(n):Nc.call(this,n,t)};function Rc(){}const ar=Symbol("event handle");function _i(n,t,{attr:e,attrType:i,event:s,eventOptions:o}={}){Cn(n,t,{configurable:!0,get(){const a=sr.get(this)[t];return s&&!a?(this[t]=Rc,this[t]):a},set(a){const c=this,d=sr.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?rr.call(this,e,i===Boolean?"":a):or.call(this,e)),a!==d[t]&&(s?(d[t]=a!=null&&a[ar]?a:async(u,m)=>{await Promise.resolve();const r=new CustomEvent(s,{...m,...o,detail:u});c.dispatchEvent(r),await a(u,m)},d[t][ar]=!0):(d[t]=a,this[Le]()))}})}const cr=new WeakMap;function Ae(n,{metadata:t}){const e=cr.get(t);if(e)return e;let i=n;do i=bn(i);while(i.constructor[Symbol.metadata]!==t);return cr.set(t,i),i}function fi(n,t){const e=n.name,i=At(e);return n.addInitializer(function(){const s=Ae(this,n);Tn(s,e)||(Ct(n,"observedAttributes",i),_i(s,e,{attr:i,attrType:t})),kn(this,e);const o=bn(this),a=di.get(o)||new Map;a.set(i,e),di.set(o,a)}),function(s){return this.getAttribute(i)??s}}function x(n,t){return fi(t,String)}function Ne(n,t){return fi(t,Boolean)}function hr(n,t){return fi(t,Number)}function U(n,t){const e=t.name;return t.addInitializer(function(){const i=Ae(this,t);Tn(i,e)||(Ct(t,"observedProperties",e),_i(i,e)),kn(this,e)}),function(i){return this[e]??i}}function pi(n){return(t,e)=>{const{addInitializer:i,name:s,access:o,kind:a}=e;i(function(){const c=n&&(()=>n(this));if(a==="getter"){if(e.private)throw new pt("not support");const d=Ae(this,e),u=li(d,s).get.bind(this);this.memo(()=>{Cn(this,s,{configurable:!0,value:u()})},c)}else this.memo(o.get.call(this,this).bind(this),c)})}}function lt(n){return(t,{addInitializer:e,access:i})=>{e(function(){this.effect(i.get.call(this,this).bind(this),n&&(()=>n(this)))})}}function lr(){return(n,{addInitializer:t,access:e})=>{t(function(){this.effect(()=>e.get.call(this,this).bind(this),()=>[])})}}function Pn(){return pi(()=>[])}function Jt(){return lt(()=>[])}function Rt(n){return(t,{addInitializer:e,access:i})=>{e(function(){l._createTemplate(this,{render:i.get.call(this,this).bind(this),condition:n&&(()=>n(this))})})}}function dr(){return(n,{addInitializer:t,access:e})=>{t(function(){this.addEventListener(En,({detail:i})=>{l.render(e.get.call(this,this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Ic(n,t,e){Cn(n,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(e)},set(i){const s=this,{states:o}=s.internals;i?o==null||o.add(e):o==null||o.delete(e)}})}function Re(n,t){const e=t.name,i=At(e);t.addInitializer(function(){const s=Ae(this,t);Tn(s,e)||(Ct(t,"definedCSSStates",i),Ic(s,e,i)),kn(this,e)})}function ur(n,t,e,i){const s=n.name,o=At(s);if(n.static)Ct(n,e,o);else{const a=bn(t);a[s]||(a[s]=o,Ct(n,e,o))}return i||o}function _r(n,t){return function(e){return ur(t,this,"definedSlots",e)}}function mi(n,t){return function(e){return ur(t,this,"definedParts",e)}}function Yt(n,t){pr(t)}function fr(n,t){pr(t,{bubbles:!0,composed:!0})}function pr(n,t){const e=n.name,i=At(e);n.addInitializer(function(){const s=Ae(this,n);Tn(s,e)||(Ct(n,"definedEvents",i),_i(s,e,{event:i,eventOptions:t})),kn(this,e)})}function Zt(n){return(t,e)=>{Ct(e,"adoptedStyleSheets",n)}}function Ie(n){return(t,e)=>{Ct(e,"observedStores",n)}}function bt({mode:n="open",serializable:t=!0,delegatesFocus:e,slotAssignment:i}={}){return(s,o)=>{const a=o.metadata;Ac(a,{mode:n,serializable:t,delegatesFocus:e,slotAssignment:i})}}function gi({penetrable:n}){return(t,e)=>{const i=e.metadata;i.penetrable=n}}function mr(){return(n,t)=>{const e=t.metadata;e.noBlocking=!0}}function He(n){return(t,e)=>{const i=e.metadata;i.aria={...i.aria,...n}}}function gr(n){return(t,{addInitializer:e})=>{e(()=>{customElements.define(n,t)})}}const Hc=Object.freeze(Object.defineProperty({__proto__:null,adoptedStyle:Zt,aria:He,async:mr,attribute:x,boolattribute:Ne,connectStore:Ie,customElement:gr,effect:lt,emitter:Yt,fallback:dr,globalemitter:fr,light:gi,memo:pi,mounted:Jt,numattribute:hr,part:mi,property:U,shadow:bt,slot:_r,state:Re,template:Rt,unmounted:lr,willMount:Pn},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
6
|
-
\f\r]`,
|
|
7
|
-
\f\r"'\`<>=]`,lc=`[^\\s"'>=/]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gs=1,ni=2,dc=3,Vs=/-->/g,Ds=/>/g,Rt=new RegExp(`>|${ei}(?:(${lc}+)(${ei}*=${ei}*(?:${hc}|("|')|))|$)`,"g"),uc=0,xs=1,_c=2,Us=3,qs=/'/g,Fs=/"/g,Bs=/^(?:script|style|textarea|title)$/i,ii=1,yn=2,fc=3,pc=4,mc=5,si=6,gc=7;class wn{constructor(t,e,i){$(this,"type");$(this,"strings");$(this,"values");this.type=t,this.strings=e,this.values=i}}const ri=n=>(t,...e)=>new wn(n,t,e),st=ri(0),Ks=ri(1),js=ri(2),oi=Symbol.for("lit-noChange"),Qs=new WeakMap,It=Nt.createTreeWalker(Nt,129);function vc(n,t){if(!Array.isArray(n))throw new Error("invalid template");return Hs!==void 0?Hs.createHTML(t):t}const $c=(n,t)=>{const e=n.length-1,i=[];let s=t===1?"<svg>":t===2?"<math>":"",r,a=Ne;for(let l=0;l<e;l++){const u=n[l];let m=-1,o,g=0,h;for(;g<u.length&&(a.lastIndex=g,h=a.exec(u),h!==null);)g=a.lastIndex,a===Ne?h[Gs]==="!--"?a=Vs:h[Gs]!==void 0?a=Ds:h[ni]!==void 0?(Bs.test(h[ni])&&(r=new RegExp(`</${h[ni]}`,"g")),a=Rt):h[dc]!==void 0&&(a=Rt):a===Rt?h[uc]===">"?(a=r??Ne,m=-1):h[xs]===void 0?m=-2:(m=a.lastIndex-h[_c].length,o=h[xs],a=h[Us]===void 0?Rt:h[Us]==='"'?Fs:qs):a===Fs||a===qs?a=Rt:a===Vs||a===Ds?a=Ne:(a=Rt,r=void 0);const v=a===Rt&&n[l+1].startsWith("/>")?" ":"";s+=a===Ne?u+ac:m>=0?(i.push(o),u.slice(0,m)+Ws+u.slice(m)+yt+v):u+yt+(m===-2?l:v)}const c=s+(n[e]||"<?>")+(t===1?"</svg>":t===2?"</math>":"");return[vc(n,c),i]};class ai{constructor({strings:t,type:e},i){$(this,"el");$(this,"parts",[]);let s,r=0,a=0;const c=t.length-1,l=this.parts,[u,m]=$c(t,e);if(this.el=ai.createElement(u,i),It.currentNode=this.el.content,e===1||e===2){const o=this.el.content.firstChild;o.replaceWith(...o.childNodes)}for(;(s=It.nextNode())!==null&&l.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const o of s.getAttributeNames())if(o.endsWith(Ws)){const g=m[a++],v=s.getAttribute(o).split(yt),y=/([.?@])?(.*)/.exec(g);l.push({type:ii,index:r,name:y[2],strings:v,ctor:y[1]==="."?wc:y[1]==="?"?Sc:y[1]==="@"?Ec:Sn}),s.removeAttribute(o)}else o.startsWith(yt)&&(l.push({type:si,index:r}),s.removeAttribute(o));if(Bs.test(s.tagName)){const o=s.textContent.split(yt),g=o.length-1;if(g>0){s.textContent=$t?$t.emptyScript:"";for(let h=0;h<g;h++)s.append(o[h],Ae()),It.nextNode(),l.push({type:yn,index:++r});s.append(o[g],Ae())}}}else if(s.nodeType===8)if(s.data===zs)l.push({type:yn,index:r});else{let g=-1;for(;(g=s.data.indexOf(yt,g+1))!==-1;)l.push({type:gc,index:r}),g+=yt.length-1}r++}}static createElement(t,e){const i=Nt.createElement("template");return i.innerHTML=t,i}}function Yt(n,t,e=n,i){var a,c;if(t===oi)return t;let s=i!==void 0?(a=e.__directives)==null?void 0:a[i]:e.__directive;const r=Le(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((c=s==null?void 0:s._$notifyDirectiveConnectionChanged)==null||c.call(s,!1),r===void 0?s=void 0:(s=new r(n),s._$initialize(n,e,i)),i!==void 0?(e.__directives??(e.__directives=[]))[i]=s:e.__directive=s),s!==void 0&&(t=Yt(n,s._$resolve(n,t.values),s,i)),t}class yc{constructor(t,e){$(this,"_$template");$(this,"_$parts",[]);$(this,"_$parent");$(this,"_$disconnectableChildren");this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=((t==null?void 0:t.creationScope)??Nt).importNode(e,!0);It.currentNode=s;let r=It.nextNode(),a=0,c=0,l=i[0];for(;l!==void 0;){if(a===l.index){let u;l.type===yn?u=new Re(r,r.nextSibling,this,t):l.type===ii?u=new l.ctor(r,l.name,l.strings,this,t):l.type===si&&(u=new Cc(r,this,t)),this._$parts.push(u),l=i[++c]}a!==(l==null?void 0:l.index)&&(r=It.nextNode(),a++)}return It.currentNode=Nt,s}_update(t){let e=0;for(const i of this._$parts)i!==void 0&&(i.strings!==void 0?(i._$setValue(t,i,e),e+=i.strings.length-2):i._$setValue(t[e])),e++}}class Re{constructor(t,e,i,s){$(this,"type",yn);$(this,"options");$(this,"_$committedValue");$(this,"__directive");$(this,"_$startNode");$(this,"_$endNode");$(this,"_$parent");$(this,"__isConnected");$(this,"_$disconnectableChildren");this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=(s==null?void 0:s.isConnected)??!0}get _$isConnected(){var t;return((t=this._$parent)==null?void 0:t._$isConnected)??this.__isConnected}get parentNode(){let t=this._$startNode.parentNode;const e=this._$parent;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(t=Yt(this,t,e),Le(t)?Jt(t)||t===""?(Jt(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==oi&&this._commitText(t):t instanceof wn?this._commitTemplateResult(t):t.nodeType!==void 0?this._commitNode(t):cc(t)?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){if(!Jt(this._$committedValue)&&Le(this._$committedValue)){const e=this._$startNode.nextSibling;e.data=t}else this._commitNode(Nt.createTextNode(t));this._$committedValue=t}_commitTemplateResult(t){var s;const{values:e}=t,i=this._$getTemplate(t);if(((s=this._$committedValue)==null?void 0:s._$template)===i)this._$committedValue._update(e);else{const r=new yc(i,this),a=r._clone(this.options);r._update(e),this._commitNode(a),this._$committedValue=r}}_$getTemplate(t){let e=Qs.get(t.strings);return e===void 0&&Qs.set(t.strings,e=new ai(t)),e}_commitIterable(t){Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i=0,s;for(const r of t)i===e.length?e.push(s=new Re(this._insert(Ae()),this._insert(Ae()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&s._$endNode.nextSibling,i),e.length=i)}_$clear(t=this._$startNode.nextSibling,e){var i;for((i=this._$notifyConnectionChanged)==null||i.call(this,!1,!0,e);t&&t!==this._$endNode;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$parent===void 0&&(this.__isConnected=t,(e=this._$notifyConnectionChanged)==null||e.call(this,t))}}class Sn{constructor(t,e,i,s,r){$(this,"type",ii);$(this,"element");$(this,"name");$(this,"options");$(this,"strings");$(this,"_$committedValue");$(this,"__directives");$(this,"_$parent");$(this,"_$disconnectableChildren");this.element=t,this.name=e,this._$parent=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t,e=this,i,s){const r=this.strings;let a=!1;if(r===void 0)t=Yt(this,t,e,0),a=!Le(t)||t!==this._$committedValue,a&&(this._$committedValue=t);else{const c=t;t=r[0];let l,u;for(l=0;l<r.length-1;l++)u=Yt(this,c[i+l],e,l),a||(a=!Le(u)||u!==this._$committedValue[l]),Jt(u)?t=void 0:Jt(t)||(t+=u+r[l+1]),this._$committedValue[l]=u}a&&!s&&this._commitValue(t)}_commitValue(t){Jt(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class wc extends Sn{constructor(){super(...arguments);$(this,"type",fc)}_commitValue(e){this.element[this.name]=e}}class Sc extends Sn{constructor(){super(...arguments);$(this,"type",pc)}_commitValue(e){this.element.toggleAttribute(this.name,!!e)}}class Ec extends Sn{constructor(e,i,s,r,a){super(e,i,s,r,a);$(this,"type",mc)}_$setValue(e,i=this){e=Yt(this,e,i,0);const s=this._$committedValue,r=s&&(!e||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive),a=e&&(!s||r);r&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var i;typeof this._$committedValue=="function"?this._$committedValue.call(((i=this.options)==null?void 0:i.host)??this.element,e):this._$committedValue.handleEvent(e)}}class Cc{constructor(t,e,i){$(this,"type",si);$(this,"__directive");$(this,"_$committedValue");$(this,"_$parent");$(this,"_$disconnectableChildren");$(this,"_$props");$(this,"options");this.element=t,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof Ys)t.value=this.element;else if(t._$litDirective$)Yt(this,t);else{if(this._$props)for(const e in this._$props)Reflect.set(this.element,e,void 0);Object.assign(this.element,t),this._$props=t}}}const Js=()=>new Ys;class Ys{constructor(){$(this,"value")}}const En=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const r=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new Re(t.insertBefore(Ae(),r),r,void 0,e??{})}return s._$setValue(n),s},{assign:bc,fromEntries:Tc,entries:Pc,keys:kc}=Object,ci=new Set;function wt(n){ci.has(n)||(queueMicrotask(()=>{ci.delete(n),n()}),ci.add(n))}function Ie(n,t){const e=t;return delete e.name,delete e.length,bc(e,n),e}function hi(n="",t=""){const{pathname:e,search:i,hash:s}=new URL(t,location.origin+n);return e+i+decodeURIComponent(s)}function li(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}class Zs extends EventTarget{constructor(){super(...arguments);C(this,_n);C(this,At,new Map);C(this,gt);C(this,Lt)}get size(){return f(this,At).size}get first(){return f(this,gt)}get last(){return f(this,Lt)}isSuperLinkOf(e){let i=e.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(e){return f(this,At).get(e)}add(e){f(this,Lt)||this.dispatchEvent(new CustomEvent("start"));const i=Ns(this,_n,Rs).call(this,e)||{value:e};i.prev=f(this,Lt),i.prev&&(i.prev.next=i),i.next=void 0,A(this,Lt,i),f(this,gt)||A(this,gt,i),f(this,At).set(e,i)}delete(e){const i=Ns(this,_n,Rs).call(this,e);return f(this,gt)||this.dispatchEvent(new CustomEvent("end")),i}get(){const e=f(this,gt);if(e)return this.delete(e.value),e.value}}At=new WeakMap,gt=new WeakMap,Lt=new WeakMap,_n=new WeakSet,Rs=function(e){const i=f(this,At).get(e);return i&&(i.prev?i.prev.next=i.next:A(this,gt,i.next),i.next?i.next.prev=i.prev:A(this,Lt,i.prev),f(this,At).delete(e)),i};class Xs extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class Zt extends URLSearchParams{constructor(e){super(e);C(this,$e,e=>typeof e=="string"?e:JSON.stringify(e));C(this,jn,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let i;typeof e=="string"?i=Tc(new URLSearchParams(e).entries()):i=e,Pc(i).forEach(([s,r])=>{this.append(s,f(this,$e).call(this,r))})}setAny(e,i){if(Array.isArray(i))this.delete(e),i.forEach(s=>this.append(e,f(this,$e).call(this,s)));else{const s=f(this,$e).call(this,i);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(i=>i!=="").map(i=>f(this,jn).call(this,i))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}$e=new WeakMap,jn=new WeakMap;function di(n,...t){return n.reduce((e,i,s)=>e+(t[s-1]??"")+i)}const Mc=di;function Cn(n=5){const t=Math.random().toString(36).slice(2,2+n);return t.length<n?t+Cn(n-t.length):t}function Ht(n){return n.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Oc(n){return n.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function bn(n){return kc(n).forEach(t=>{delete n[t]}),n}class ft extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function tr(n,t){const e=n.length;if(t.length!==e)return!0;for(let i=0;i<e;i++)if(n[i]!==t[i])return!0;return!1}function Tn(n,t,e){let i=t;for(const s in n){const r=e(s,n[s]);i+=r?r+t:""}return i}function Ac(n){return Tn(n,";",(t,e)=>e||e===0?`${Ht(t)}:${e}`:"")}function er(n){return Tn(n," ",(t,e)=>e?t:"")}const Lc=er;function Nc(n){return Tn(n,",",(t,e)=>e===!0||t===e?t:e?`${t}:${e}`:"")}const He=new WeakMap;function St(n){const t=Ie(n,e=>{var i;Object.assign(t,e),(i=He.get(t))==null||i.forEach(s=>wt(s))});return He.set(t,new Set),t}function dt(n,t){const e=He.get(n);return e==null||e.add(t),()=>e==null?void 0:e.delete(t)}const Rc=Object.freeze(Object.defineProperty({__proto__:null,_StoreListenerMap:He,connect:dt,createStore:St},Symbol.toStringTag,{value:"Module"}));/**
|
|
5
|
+
*/const We=globalThis.trustedTypes,vr=We==null?void 0:We.createPolicy("lit-html",{createHTML:n=>n}),$r="$lit$",Tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Sr="?"+Tt,Wc=`<${Sr}>`,It=document,Xt=()=>It.createComment(""),Ge=n=>n===null||typeof n!="object"&&typeof n!="function",te=n=>n==null,Gc=n=>Symbol.iterator in n,vi=`[
|
|
6
|
+
\f\r]`,zc=`[^
|
|
7
|
+
\f\r"'\`<>=]`,Vc=`[^\\s"'>=/]`,ze=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yr=1,$i=2,Dc=3,wr=/-->/g,Er=/>/g,Ht=new RegExp(`>|${vi}(?:(${Vc}+)(${vi}*=${vi}*(?:${zc}|("|')|))|$)`,"g"),Uc=0,Cr=1,qc=2,br=3,Tr=/'/g,kr=/"/g,Pr=/^(?:script|style|textarea|title)$/i,Fc=1,Mn=2,On=3,Si=1,Ln=2,xc=3,Bc=4,Kc=5,yi=6,jc=7,Mr="v-if",Or="v-else-if",Lr="v-else";class wi{constructor(t,e,i){$(this,"type");$(this,"strings");$(this,"values");this.type=t,this.strings=e,this.values=i}}const Ei=n=>(t,...e)=>new wi(n,t,e),Qc=Ei(Fc),Jc=Ei(Mn),Yc=Ei(On),Ci=Symbol.for("lit-noChange"),Ar=new WeakMap,Wt=It.createTreeWalker(It,129);function Zc(n,t){if(!Array.isArray(n))throw new Error("invalid template");return vr!==void 0?vr.createHTML(t):t}const Xc=(n,t)=>{const e=n.length-1,i=[];let s=t===Mn?"<svg>":t===On?"<math>":"",o,a=ze;for(let d=0;d<e;d++){const u=n[d];let m=-1,r,g=0,h;for(;g<u.length&&(a.lastIndex=g,h=a.exec(u),h!==null);)g=a.lastIndex,a===ze?h[yr]==="!--"?a=wr:h[yr]!==void 0?a=Er:h[$i]!==void 0?(Pr.test(h[$i])&&(o=new RegExp(`</${h[$i]}`,"g")),a=Ht):h[Dc]!==void 0&&(a=Ht):a===Ht?h[Uc]===">"?(a=o??ze,m=-1):h[Cr]===void 0?m=-2:(m=a.lastIndex-h[qc].length,r=h[Cr],a=h[br]===void 0?Ht:h[br]==='"'?kr:Tr):a===kr||a===Tr?a=Ht:a===wr||a===Er?a=ze:(a=Ht,o=void 0);const v=a===Ht&&n[d+1].startsWith("/>")?" ":"";s+=a===ze?u+Wc:m>=0?(i.push(r),u.slice(0,m)+$r+u.slice(m)+Tt+v):u+Tt+(m===-2?d:v)}const c=s+(n[e]||"<?>")+(t===Mn?"</svg>":t===On?"</math>":"");return[Zc(n,c),i]};class bi{constructor({strings:t,type:e},i){$(this,"el");$(this,"parts",[]);let s,o=0,a=0;const c=t.length-1,d=this.parts,[u,m]=Xc(t,e);if(this.el=bi.createElement(u,i),Wt.currentNode=this.el.content,e===Mn||e===On){const r=this.el.content.firstChild;r.replaceWith(...r.childNodes)}for(;(s=Wt.nextNode())!==null&&d.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const r of s.getAttributeNames())if(r.endsWith($r)){const g=m[a++],v=s.getAttribute(r).split(Tt),S=/([.?@])?(.*)/.exec(g);d.push({type:Si,index:o,name:S[2],strings:v,ctor:S[1]==="."?nh:S[1]==="?"?ih:S[1]==="@"?sh:An}),s.removeAttribute(r)}else r.startsWith(Tt)&&(d.push({type:yi,index:o}),s.removeAttribute(r));if(Pr.test(s.tagName)){const r=s.textContent.split(Tt),g=r.length-1;if(g>0){s.textContent=We?We.emptyScript:"";for(let h=0;h<g;h++)s.append(r[h],Xt()),Wt.nextNode(),d.push({type:Ln,index:++o});s.append(r[g],Xt())}}}else if(s.nodeType===8)if(s.data===Sr)d.push({type:Ln,index:o});else{let g=-1;for(;(g=s.data.indexOf(Tt,g+1))!==-1;)d.push({type:jc,index:o}),g+=Tt.length-1}o++}}static createElement(t,e){const i=It.createElement("template");return i.innerHTML=t,i}}function ee(n,t,e=n,i){var a,c;if(t===Ci)return t;let s=i!==void 0?(a=e.__directives)==null?void 0:a[i]:e.__directive;const o=Ge(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((c=s==null?void 0:s._$notifyDirectiveConnectionChanged)==null||c.call(s,!1),o===void 0?s=void 0:(s=new o(n),s._$initialize(n,e,i)),i!==void 0?(e.__directives??(e.__directives=[]))[i]=s:e.__directive=s),s!==void 0&&(t=ee(n,s._$resolve(n,t.values),s,i)),t}class th{constructor(t,e){$(this,"_$template");$(this,"_$parts",[]);$(this,"_$conditions",[]);$(this,"_$parent");$(this,"_$disconnectableChildren");this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=new Map,o=new Map,a=((t==null?void 0:t.creationScope)??It).importNode(e,!0);Wt.currentNode=a;let c=Wt.nextNode(),d=0,u=0,m=i[0];for(;m!==void 0;){if(d===m.index){let r;m.type===Ln?r=new Ve(c,c.nextSibling,this,t):m.type===Si?(m.name===Mr&&s.set(c,u),m.name===Or&&o.set(c,u),r=new m.ctor(c,m.name,m.strings,this,t)):m.type===yi&&(r=new rh(c,this,t)),this._$parts.push(r),m=i[++u]}d!==(m==null?void 0:m.index)&&(c=Wt.nextNode(),d++)}return s.forEach((r,g)=>{const h=new eh(g,r);this._$conditions.push(h);let v=g;for(;v=v.nextElementSibling;){const S=o.get(v);if(S===void 0)break;h.push(v,S)}}),Wt.currentNode=It,a}_update(t){let e=0;for(const i of this._$parts)i!==void 0&&(i.strings!==void 0?(i._$setValue(t,i,e),e+=i.strings.length-2):i.name===Mr||i.name===Or||i._$setValue(t[e])),e++;this._$conditions.forEach(i=>i.update(t))}}class eh{constructor(t,e){$(this,"mark");$(this,"list");const i=Xt();t.before(i),this.mark=i,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){const t=this.next;t!=null&&t.attributes.getNamedItem(Lr)&&(this.list.push({ele:t}),t.removeAttribute(Lr))}update(t){const{mark:e,list:i}=this,s=i.find(({idx:o})=>o===void 0||!!t[o]);s&&!s.ele.parentNode&&e.after(s.ele),i.forEach(({ele:o})=>(!s||o!==s.ele)&&o.remove())}}class Ve{constructor(t,e,i,s){$(this,"type",Ln);$(this,"options");$(this,"_$committedValue");$(this,"__directive");$(this,"_$startNode");$(this,"_$endNode");$(this,"_$parent");$(this,"__isConnected");$(this,"_$disconnectableChildren");this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=(s==null?void 0:s.isConnected)??!0}get _$isConnected(){var t;return((t=this._$parent)==null?void 0:t._$isConnected)??this.__isConnected}get parentNode(){let t=this._$startNode.parentNode;const e=this._$parent;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(t=ee(this,t,e),Ge(t)?te(t)||t===""?(te(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==Ci&&this._commitText(t):t instanceof wi?this._commitTemplateResult(t):t.nodeType!==void 0?this._commitNode(t):Gc(t)?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){if(!te(this._$committedValue)&&Ge(this._$committedValue)){const e=this._$startNode.nextSibling;e.data=t}else this._commitNode(It.createTextNode(t));this._$committedValue=t}_commitTemplateResult(t){var s;const{values:e}=t,i=this._$getTemplate(t);if(((s=this._$committedValue)==null?void 0:s._$template)===i)this._$committedValue._update(e);else{const o=new th(i,this),a=o._clone(this.options);o._update(e),this._commitNode(a),this._$committedValue=o}}_$getTemplate(t){let e=Ar.get(t.strings);return e===void 0&&Ar.set(t.strings,e=new bi(t)),e}_commitIterable(t){Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i=0,s;for(const o of t)i===e.length?e.push(s=new Ve(this._insert(Xt()),this._insert(Xt()),this,this.options)):s=e[i],s._$setValue(o),i++;i<e.length&&(this._$clear(s&&s._$endNode.nextSibling,i),e.length=i)}_$clear(t=this._$startNode.nextSibling,e){var i;for((i=this._$notifyConnectionChanged)==null||i.call(this,!1,!0,e);t&&t!==this._$endNode;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$parent===void 0&&(this.__isConnected=t,(e=this._$notifyConnectionChanged)==null||e.call(this,t))}}class An{constructor(t,e,i,s,o){$(this,"type",Si);$(this,"element");$(this,"name");$(this,"options");$(this,"strings");$(this,"_$committedValue");$(this,"__directives");$(this,"_$parent");$(this,"_$disconnectableChildren");this.element=t,this.name=e,this._$parent=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=void 0}get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t,e=this,i,s){const o=this.strings;let a=!1;if(o===void 0)t=ee(this,t,e,0),a=!Ge(t)||t!==this._$committedValue,a&&(this._$committedValue=t);else{const c=t;t=o[0];let d,u;for(d=0;d<o.length-1;d++)u=ee(this,c[i+d],e,d),a||(a=!Ge(u)||u!==this._$committedValue[d]),te(u)?t=void 0:te(t)||(t+=u+o[d+1]),this._$committedValue[d]=u}a&&!s&&this._commitValue(t)}_commitValue(t){te(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class nh extends An{constructor(){super(...arguments);$(this,"type",xc)}_commitValue(e){this.element[this.name]=e}}class ih extends An{constructor(){super(...arguments);$(this,"type",Bc)}_commitValue(e){this.element.toggleAttribute(this.name,!!e)}}class sh extends An{constructor(){super(...arguments);$(this,"type",Kc)}_$setValue(e,i=this){e=ee(this,e,i,0);const s=this._$committedValue,o=s&&(!e||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive),a=e&&(!s||o);o&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){var i;typeof this._$committedValue=="function"?this._$committedValue.call(((i=this.options)==null?void 0:i.host)??this.element,e):this._$committedValue.handleEvent(e)}}class rh{constructor(t,e,i){$(this,"type",yi);$(this,"__directive");$(this,"_$committedValue");$(this,"_$parent");$(this,"_$disconnectableChildren");$(this,"_$props");$(this,"options");this.element=t,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof Nr)t.value=this.element;else if(t._$litDirective$)ee(this,t);else{if(this._$props)for(const e in this._$props)Reflect.set(this.element,e,void 0);Object.assign(this.element,t),this._$props=t}}}const oh=()=>new Nr;class Nr{constructor(){$(this,"value")}}const ah=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new Ve(t.insertBefore(Xt(),o),o,void 0,e??{})}return s._$setValue(n),s},Rr="0.0.0",ch=Object.freeze(Object.defineProperty({__proto__:null,version:Rr},Symbol.toStringTag,{value:"Module"}));/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const Ic={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ui=n=>(...t)=>({_$litDirective$:n,values:t});class Hc{constructor(t){$(this,"__part");$(this,"__attributeIndex");$(this,"__directive");$(this,"_$parent");$(this,"_$disconnectableChildren")}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,i){this.__part=t,this._$parent=e,this.__attributeIndex=i}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const nr=()=>document.createComment(""),We=(n,t,e)=>{var r;const i=n._$startNode.parentNode,s=t===void 0?n._$endNode:t._$startNode;if(e===void 0){const a=i.insertBefore(nr(),s),c=i.insertBefore(nr(),s);e=new Re(a,c,n,n.options)}else{const a=e._$endNode.nextSibling,c=e._$parent,l=c!==n;if(l){(r=e._$reparentDisconnectables)==null||r.call(e,n),e._$parent=n;let u;e._$notifyConnectionChanged!==void 0&&(u=n._$isConnected)!==c._$isConnected&&e._$notifyConnectionChanged(u)}if(a!==s||l){let u=e._$startNode;for(;u!==a;){const m=u.nextSibling;i.insertBefore(u,s),u=m}}}return e},Wt=(n,t,e=n)=>(n._$setValue(t,e),n),Wc={},zc=(n,t=Wc)=>n._$committedValue=t,Gc=n=>n._$committedValue,_i=n=>{var i;(i=n._$notifyConnectionChanged)==null||i.call(n,!1,!0);let t=n._$startNode;const e=n._$endNode.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}},ir=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i};class Vc extends Hc{constructor(e){super(e);$(this,"_itemKeys");if(e.type!==Ic.CHILD)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,i,s){let r;s===void 0?s=i:i!==void 0&&(r=i);const a=[],c=[];let l=0;for(const u of e)a[l]=r?r(u,l):l,c[l]=s(u,l),l++;return{values:c,keys:a}}render(e,i,s){return this._getValuesAndKeys(e,i,s).values}update(e,[i,s,r]){const a=Gc(e),{values:c,keys:l}=this._getValuesAndKeys(i,s,r);if(!Array.isArray(a))return this._itemKeys=l,c;const u=this._itemKeys??(this._itemKeys=[]),m=[];let o,g,h=0,v=a.length-1,y=0,E=c.length-1;for(;h<=v&&y<=E;)if(a[h]===null)h++;else if(a[v]===null)v--;else if(u[h]===l[y])m[y]=Wt(a[h],c[y]),h++,y++;else if(u[v]===l[E])m[E]=Wt(a[v],c[E]),v--,E--;else if(u[h]===l[E])m[E]=Wt(a[h],c[E]),We(e,m[E+1],a[h]),h++,E--;else if(u[v]===l[y])m[y]=Wt(a[v],c[y]),We(e,a[h],a[v]),v--,y++;else if(o===void 0&&(o=ir(l,y,E),g=ir(u,h,v)),!o.has(u[h]))_i(a[h]),h++;else if(!o.has(u[v]))_i(a[v]),v--;else{const k=g.get(l[y]),p=k!==void 0?a[k]:null;if(p===null){const T=We(e,a[h]);Wt(T,c[y]),m[y]=T}else m[y]=Wt(p,c[y]),We(e,a[h],p),a[k]=null;y++}for(;y<=E;){const k=We(e,m[E+1]);Wt(k,c[y]),m[y++]=k}for(;h<=v;){const k=a[h++];k!==null&&_i(k)}return this._itemKeys=l,zc(e,m),oi}}const sr=ui(Vc),{assign:rr,defineProperty:Dc}=Object;Dc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const or=n=>typeof n=="function"&&n(),Et=Symbol.for("gem@sheetToken"),ze=Symbol.for("gem@update"),ar="gem-style-boundary",Pn="gem@render-error",xc=ze,fi=new WeakMap,cr=new WeakMap;class Uc extends CSSStyleSheet{constructor(){super(...arguments);C(this,ut);$(this,"cssText","")}get element(){return f(this,ut)||(A(this,ut,document.createElement("style")),f(this,ut).textContent=this.cssText,f(this,ut).dataset.gemStyle=""),f(this,ut)}replaceSync(e){this.cssText=e,f(this,ut)&&(f(this,ut).textContent=e),super.replaceSync(e)}}ut=new WeakMap;class qc{constructor(t=""){C(this,Bt,"");C(this,fn,"");C(this,ye,new Map);C(this,we,new Map);A(this,fn,t)}setContent(t){A(this,Bt,t)}getStyle(t){var r;const e=t&&!((r=t.internals)!=null&&r.shadowRoot),i=e?t.constructor:this;if(!f(this,ye).has(i)){const a=new Uc({media:f(this,fn)});f(this,ye).set(i,a)}const s=f(this,ye).get(i);if(!f(this,we).has(s)){let a=f(this,Bt),c="";e&&(c=`@scope (${t.tagName}) to (:state(${ar}) > *)`,a=`${c}{ ${a} }`),s.replaceSync(a),f(this,we).set(s,c)}return s}updateStyle(){f(this,we).forEach((t,e)=>{e.replaceSync(t?`${t}{${f(this,Bt)}}`:f(this,Bt))})}}Bt=new WeakMap,fn=new WeakMap,ye=new WeakMap,we=new WeakMap;function Xt(n,...t){let e="",i="";const s=t.at(0);Array.isArray(n)?i=di(n,...t):s!==void 0?(e=n,i=s):i=n;const r=new qc(e),a={[Et]:r};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(l=>{const u=l==="$";a[l]=u||l.includes("-")?l:`${l}-${Cn()}`,c+=`${u?":where(:scope:not([hidden])),:host(:where(:not([hidden])))":`.${a[l]}`} {${i[l]}}`}),r.setContent(c),a}const hr=(n,t,e)=>{let i=!1;t.forEach(s=>{const r=n.get(s)||0;i||(i=e===1&&r===0||e===-1&&r===1),n.set(s,r+e)}),i&&wt(cr.get(n))},Fc=(n,t)=>{const e=n.getRootNode();if(!fi.has(e)){const s=new Map;fi.set(e,s),cr.set(s,()=>{const r=e.adoptedStyleSheets.filter(a=>!s.has(a));s.forEach((a,c)=>a&&r.push(c)),e.adoptedStyleSheets=r.reverse()})}const i=fi.get(e);return hr(i,t,1),()=>hr(i,t,-1)};d.createState=void 0;function lr(n){n==null||n.forEach(t=>{const{callback:e,getDep:i,values:s,preCallback:r}=t,a=i==null?void 0:i();(!i||!s||tr(s,a))&&(or(r),t.preCallback=e(a,s),t.values=a,t.initialized=!0)})}function dr(n){return n.filter(t=>(or(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}const Bc=st`
|
|
12
|
-
<style>
|
|
13
|
-
:host {
|
|
14
|
-
display: none !important;
|
|
15
|
-
}
|
|
16
|
-
@scope {
|
|
17
|
-
:scope {
|
|
18
|
-
display: none !important;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
22
|
-
`;d._createTemplate=void 0;const te=new Zs,pi=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(pi);const t=te.get();t&&(t(),pi(n))};te.addEventListener("start",()=>wt(pi));let ur;const Me=class Me extends HTMLElement{constructor(){super();C(this,lt);C(this,Ee);C(this,it);C(this,_t,[]);C(this,Kt,[]);C(this,vt,[]);C(this,Ce);C(this,ht);C(this,be);C(this,Te);C(this,jt);C(this,Qn,()=>{lr(f(this,_t))});C(this,Jn,()=>{lr(f(this,Kt))});C(this,pn,e=>{try{A(this,Te,!0),f(this,Jn).call(this);const i=f(this,Ee)===this,s=e?e.render():i?void 0:st`<slot></slot>`;if(A(this,Te,!1),s===void 0)return;En(s===null?Bc:s,f(this,Ee))}catch(i){throw this.dispatchEvent(new CustomEvent(Pn,{bubbles:!0,composed:!0,detail:i})),i}});C(this,Pe,()=>{const e=f(this,lt,Is);f(this,ht)&&(e||!f(this,vt).length)&&(f(this,pn).call(this,e),wt(f(this,Qn)))});C(this,Qt,()=>{f(this,lt,Oe).noBlocking?te.add(f(this,Pe)):f(this,Pe).call(this)});C(this,mn,()=>{const{adoptedStyleSheets:e=[]}=f(this,lt,Oe),{shadowRoot:i,sheets:s}=f(this,it),r=e.map(a=>a[Et].getStyle(this));if(i)i.adoptedStyleSheets=r.concat(s);else return this.prepend(...s.map(a=>a.element)),Fc(this,r)});C(this,Yn,()=>{var e;(e=f(this,_t))==null||e.forEach(i=>{const{callback:s,getDep:r,initialized:a}=i;a||(i.values=r==null?void 0:r(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,Zn,()=>{var e;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!f(this,vt).length&&this.render&&f(this,vt).push({render:this.render.bind(this),condition:(e=this.shouldUpdate)==null?void 0:e.bind(this)})});C(this,gn);C(this,ke,async()=>{var r;if(f(this,Ce)){A(this,Ce,!1),(r=f(this,jt))==null||r.call(this),A(this,jt,f(this,mn).call(this));return}A(this,be,!0),f(this,Zn).call(this);const{observedStores:e,mode:i,penetrable:s}=f(this,lt,Oe);!i&&f(this,vt).length&&!s&&f(this,it).states.add(ar),A(this,gn,e==null?void 0:e.map(a=>dt(a,f(this,Qt)))),f(this,pn).call(this,f(this,lt,Is)),A(this,ht,!0),A(this,jt,f(this,mn).call(this)),await Promise.resolve(),f(this,Yn).call(this)});$(this,"effect",(e,i)=>{const s={callback:e,getDep:i,initialized:f(this,ht),fixed:!f(this,be)};f(this,ht)&&(s.values=i==null?void 0:i(),s.preCallback=e(s.values)),f(this,_t).push(s)});$(this,"memo",(e,i)=>{f(this,Kt).push({callback:e,getDep:i,fixed:!f(this,be)})});$(this,"update",()=>wt(f(this,Qt)));ur=this;const{mode:e,serializable:i,delegatesFocus:s,slotAssignment:r,aria:a}=f(this,lt,Oe),{focusable:c,...l}=a||{};A(this,Ee,e?this.attachShadow({mode:e,serializable:i,delegatesFocus:s,slotAssignment:r}):this),A(this,it,this.attachInternals()),f(this,it).stateList=[],f(this,it).sheets=[],rr(f(this,it),l);let u;f(this,_t).push({fixed:!0,getDep:()=>[this.disabled],callback:([m=!1])=>{if(u===void 0&&(u=this.hasAttribute("tabindex")),f(this,it).ariaDisabled=String(m),c&&!u&&(this.tabIndex=-Number(m)),(c||s)&&m)return li(this,"click",o=>o.isTrusted&&o.stopImmediatePropagation(),{capture:!0})}})}[xc](){f(this,ht)&&wt(f(this,Qt))}get internals(){return f(this,it)}connectedCallback(){return f(this,lt,Oe).noBlocking?te.add(f(this,ke)):f(this,ke).call(this),f(Me,Se)}adoptedCallback(){return f(Me,Se)}disconnectedCallback(){var e,i;if(this.isConnected){A(this,Ce,!0);return}return te.delete(f(this,ke)),te.delete(f(this,Pe)),A(this,ht,!1),(e=f(this,gn))==null||e.forEach(s=>s()),A(this,_t,dr(f(this,_t))),A(this,Kt,dr(f(this,Kt))),(i=f(this,jt))==null||i.call(this),f(Me,Se)}};Se=new WeakMap,Ee=new WeakMap,it=new WeakMap,_t=new WeakMap,Kt=new WeakMap,vt=new WeakMap,Ce=new WeakMap,ht=new WeakMap,be=new WeakMap,Te=new WeakMap,jt=new WeakMap,lt=new WeakSet,Oe=function(){return this.constructor[Symbol.metadata]},Is=function(){return f(this,vt).findLast(e=>!e.condition||e.condition())},Qn=new WeakMap,Jn=new WeakMap,pn=new WeakMap,Pe=new WeakMap,Qt=new WeakMap,mn=new WeakMap,Yn=new WeakMap,Zn=new WeakMap,gn=new WeakMap,ke=new WeakMap,C(Me,Se,Symbol()),d.createState=e=>{const i=ur,s=Ie(e,r=>{const a=f(i,_t).at(0);if(f(i,ht)&&a&&!a.initialized)throw new ft("Do't set state sync before insert the DOM");rr(s,r),!f(i,Te)&&f(i,ht)&&wt(f(i,Qt))});return f(i,it).stateList.push(s),s},d._createTemplate=(e,i)=>f(e,vt).push(i);let F=Me;const Kc=Object.freeze(Object.defineProperty({__proto__:null,GemElement:F,SheetToken:Et,TemplateResult:wn,UpdateToken:ze,_RenderErrorEvent:Pn,get _createTemplate(){return d._createTemplate},createRef:Js,get createState(){return d.createState},css:Xt,directive:ui,html:st,mathml:js,render:En,repeat:sr,svg:Ks},Symbol.toStringTag,{value:"Module"})),_r="0.0.0",jc=Object.freeze(Object.defineProperty({__proto__:null,version:_r},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Qc,getOwnPropertyDescriptor:fr,defineProperty:kn}=Reflect,{getPrototypeOf:ee,assign:pr}=Object,mr=new Xs;function Ct(n,t,e){var s;const i=n.metadata;fr(i,t)||kn(i,t,{value:((s=i[t])==null?void 0:s.filter(r=>r!==e))||[]}),i[t].push(e)}function Mn(n,t){const{value:e}=fr(n,t);Qc(n,t),n[t]=e}const Ge=new WeakMap,{setAttribute:gr,toggleAttribute:Jc,removeAttribute:vr}=Element.prototype;F.prototype.setAttribute=function(n,t){var i;const e=(i=Ge.get(ee(this)))==null?void 0:i.get(n);if(!e)return gr.call(this,n,t);this[e]=t},F.prototype.removeAttribute=function(n){var e;const t=(e=Ge.get(ee(this)))==null?void 0:e.get(n);if(!t)return vr.call(this,n);this[t]=null},F.prototype.toggleAttribute=function(n,t){var i;const e=(i=Ge.get(ee(this)))==null?void 0:i.get(n);return e?this[e]=t??!this.hasAttribute(n):Jc.call(this,n,t)};function Yc(){}const $r=Symbol("event handle");function mi(n,t,{attr:e,attrType:i,event:s,eventOptions:r}={}){kn(n,t,{configurable:!0,get(){const a=mr.get(this)[t];return s&&!a?(this[t]=Yc,this[t]):a},set(a){const c=this,l=mr.get(c);e&&(a=i===Boolean&&a===""?!0:i(a||""),a?gr.call(this,e,i===Boolean?"":a):vr.call(this,e)),a!==l[t]&&(s?(l[t]=a!=null&&a[$r]?a:async(u,m)=>{await Promise.resolve();const o=new CustomEvent(s,{...m,...r,detail:u});c.dispatchEvent(o),await a(u,m)},l[t][$r]=!0):(l[t]=a,this[ze]()))}})}const yr=new WeakMap;function On(n,{metadata:t}){const e=yr.get(t);if(e)return e;let i=n;do i=ee(i);while(i.constructor[Symbol.metadata]!==t);return yr.set(t,i),i}function gi(n,t){const e=n.name,i=Ht(e);return n.addInitializer(function(){const s=On(this,n);s.hasOwnProperty(e)||(Ct(n,"observedAttributes",i),mi(s,e,{attr:i,attrType:t})),Mn(this,e);const r=ee(this),a=Ge.get(r)||new Map;a.set(i,e),Ge.set(r,a)}),function(s){return this.getAttribute(i)??s}}function U(n,t){return gi(t,String)}function Ve(n,t){return gi(t,Boolean)}function wr(n,t){return gi(t,Number)}function B(n,t){const e=t.name;return t.addInitializer(function(){const i=On(this,t);i.hasOwnProperty(e)||(Ct(t,"observedProperties",e),mi(i,e)),Mn(this,e)}),function(i){return this[e]??i}}function vi(n){return function(t,e){const{addInitializer:i,name:s,access:r,kind:a}=e;i(function(){const c=n&&(()=>n(this));if(a==="getter"){if(e.private)throw new ft("not support");this.memo(()=>kn(this,s,{configurable:!0,value:r.get(this)}),c)}else this.memo(r.get(this).bind(this),c)})}}function pt(n){return function(t,{addInitializer:e,access:i}){e(function(){this.effect(i.get(this).bind(this),n&&(()=>n(this)))})}}function Sr(){return function(n,{addInitializer:t,access:e}){t(function(){this.effect(()=>e.get(this).bind(this),()=>[])})}}function An(){return vi(()=>[])}function ne(){return pt(()=>[])}function zt(n){return function(t,{addInitializer:e,access:i}){e(function(){d._createTemplate(this,{render:i.get(this).bind(this),condition:n&&(()=>n(this))})})}}function Er(){return function(n,{addInitializer:t,access:e}){t(function(){this.addEventListener(Pn,({detail:i})=>{En(e.get(this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Zc(n,t,e){kn(n,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(e)},set(i){const s=this,{states:r}=s.internals;i?r==null||r.add(e):r==null||r.delete(e)}})}function De(n,t){const e=t.name,i=Ht(e);t.addInitializer(function(){const s=On(this,t);s.hasOwnProperty(e)||(Ct(t,"definedCSSStates",i),Zc(s,e,i)),Mn(this,e)})}function Cr(n,t,e,i){const s=n.name,r=Ht(s);if(n.static)Ct(n,e,r);else{const a=ee(t);a[s]||(a[s]=r,Ct(n,e,r))}return i||r}function br(n,t){return function(e){return Cr(t,this,"definedSlots",e)}}function $i(n,t){return function(e){return Cr(t,this,"definedParts",e)}}function ie(n,t){Pr(t)}function Tr(n,t){Pr(t,{bubbles:!0,composed:!0})}function Pr(n,t){const e=n.name,i=Ht(e);n.addInitializer(function(){const s=On(this,n);s.hasOwnProperty(e)||(Ct(n,"definedEvents",i),mi(s,e,{event:i,eventOptions:t})),Mn(this,e)})}function xe(n){return function(t,e){Ct(e,"adoptedStyleSheets",n)}}function Ue(n){return function(t,e){Ct(e,"observedStores",n)}}function bt({mode:n="open",serializable:t=!0,delegatesFocus:e,slotAssignment:i}={}){return function(s,r){const a=r.metadata;pr(a,{mode:n,serializable:t,delegatesFocus:e,slotAssignment:i})}}function yi({penetrable:n}){return function(t,e){const i=e.metadata;i.penetrable=n}}function kr(){return function(n,t){const e=t.metadata;e.noBlocking=!0}}function qe(n){return function(t,e){const i=e.metadata;i.aria={...i.aria,...n}}}function Mr(n){return function(t,{addInitializer:e}){e(function(){customElements.define(n,t)})}}window.__GEM_DEVTOOLS__HOOK__&&!window.__GEM_DEVTOOLS__HOOK__.GemElement&&pr(window.__GEM_DEVTOOLS__HOOK__,{...Kc,...O,...Rc,...jc});const Z=window.history,Or=Z.pushState.bind(Z),Ar=Z.replaceState.bind(Z);let Xc=0;const wi=()=>`${performance.now()}-${++Xc}`,L=St({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),K=new Map;function Lr(n){const{$key:t,$hasCloseHandle:e,$hasOpenHandle:i,$hasShouldCloseHandle:s}=n||{};if(L.$key!==t){if(t)throw new ft("`$key` is not allowed");if(e)throw new ft("`$hasCloseHandle` is not allowed");if(i)throw new ft("`$hasOpenHandle` is not allowed");if(s)throw new ft("`$hasShouldCloseHandle` is not allowed")}}function Nr(n){return X.basePath?X.basePath+n:n}function Si(n){return n===X.basePath?"/":n.replace(new RegExp(`^${X.basePath}/`),"/")}function Ei(){X.dispatchEvent(new CustomEvent("beforechange"))}function Ln(n){const t=K.get(L.$key)||{path:Si(location.pathname),query:new Zt},e=n.path?hi(t.path,n.path):Si(location.pathname),i=new Zt(n.query??(n.path?"":location.search)),s=String(i)!==String(t.query),r=s?i:t.query,a=e!==t.path||s,c=n.title||(a?"":document.title),l=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&l?location.hash:""));return{...n,title:c,path:e,query:r,hash:u}}function Rr(n,t){Lr(n.data);const e=Ln(n),{title:i,path:s,query:r,hash:a,close:c,open:l,shouldClose:u,data:m}=e,o={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:wi(),$title:i,...m};K.set(o.$key,e),Ei(),bn(L),L(o);const g=Nr(s)+new Zt(r)+a,h=decodeURIComponent(location.hash);t(o,i,g),h!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Ir(n,t,e,i){Lr(n);const s={$key:wi(),$title:t,...n||{}},{pathname:r,search:a,hash:c}=new URL(e,location.origin+location.pathname),l=Ln({path:r,query:new Zt(a),hash:c,title:t,data:n});K.set(s.$key,l),Ei(),bn(L),L(s);const u=Nr(r)+l.query+c,m=location.hash;i(s,t,u),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Ci=St({basePath:""});class th extends EventTarget{get store(){return L}get currentKey(){return L.$key}get basePath(){return Ci.basePath}set basePath(t){Ci({basePath:t}),Object.assign(K.get(L.$key),{path:Si(location.pathname)})}getParams(){return K.get(L.$key)}updateParams(t){Object.assign(K.get(L.$key),t),L()}push(t){Rr(t,Or)}replace(t){Rr(t,Ar)}pushIgnoreCloseHandle(t){var e,i;L.$hasCloseHandle?((i=(e=K.get(L.$key))==null?void 0:e.close)==null||i.call(e),this.replace(t)):this.push(t)}forward(){Z.forward()}back(){Z.back()}}const X=new th,Fe=St({defaultTitle:document.title,url:"",title:""}),eh={history:X,titleStore:Fe,basePathStore:Ci};if(!window._GEMHISTORY){if(window._GEMHISTORY=eh,Z.pushState=function(t,e,i){Ir(t,e,i,Or)},Z.replaceState=function(t,e,i){Ir(t,e,i,Ar)},window.addEventListener("hashchange",({isTrusted:t})=>{t&&X.replace({hash:location.hash})}),Z.state)if(Z.state.$hasCloseHandle){L(Z.state);const t=Ln({title:document.title});K.set(L.$key,t),X.back()}else{const t=Ln({title:document.title,hash:location.hash});L({$key:wi(),...Z.state||{}}),K.set(L.$key,t)}else{const{protocol:t,pathname:e,search:i,hash:s}=location;t.startsWith("http")&&X.replace({path:e,query:i,hash:s})}dt(Fe,()=>{const t=K.get(L.$key);t&&(t.title=Fe.title)}),dt(L,()=>{const{title:t}=X.getParams();t!==Fe.title&&Fe({title:t})});let n=!1;window.addEventListener("popstate",t=>{var r,a;const e=t.state;if(!(e!=null&&e.$key))return;if(n){n=!1;return}if(!K.has(e.$key)){const{pathname:c,search:l,hash:u}=location;K.set(e.$key,{path:c,query:new Zt(l),hash:decodeURIComponent(u),title:e.$title,data:e})}const i=L;if(parseFloat(e.$key)>parseFloat(i.$key)&&e.$hasOpenHandle)(a=(r=K.get(e.$key))==null?void 0:r.open)==null||a.call(r);else if(i.$hasCloseHandle){const c=K.get(i.$key),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,X.forward();return}else l?l():e.$hasCloseHandle&&(n=!0,X.back())}Ei(),bn(L),L(e)})}const{history:N,titleStore:Tt,basePathStore:Hr}=window._GEMHISTORY;var nh=Object.create,bi=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,Wr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),se=n=>{throw TypeError(n)},zr=(n,t,e)=>t in n?bi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Gr=(n,t)=>bi(n,"name",{value:t,configurable:!0}),Vr=n=>[,,,nh((n==null?void 0:n[Wr("metadata")])??null)],Dr=["class","method","getter","setter","accessor","field","value","get","set"],Be=n=>n!==void 0&&typeof n!="function"?se("Function expected"):n,sh=(n,t,e,i,s)=>({kind:Dr[n],name:t,metadata:i,addInitializer:r=>e._?se("Already initialized"):s.push(Be(r||null))}),rh=(n,t)=>zr(t,Wr("metadata"),n[3]),P=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},D=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Dr[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&ih(o<4?s:{get[e](){return x(this,r)},set[e](_){return Nn(this,r,_)}},e));o?h&&o<4&&Gr(r,(o>2?"set ":o>1?"get ":"")+e):Gr(s,e);for(var T=i.length-1;T>=0;T--)u=sh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>oh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?x:ah)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>Nn(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Be(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?se("Object expected"):(Be(a=c.get)&&(p.get=a),Be(a=c.set)&&(p.set=a),Be(a=c.init)&&E.unshift(a));return o||rh(n,s),p&&bi(s,e,p),h?o^4?r:p:s},q=(n,t,e)=>zr(n,typeof t!="symbol"?t+"":t,e),Ti=(n,t,e)=>t.has(n)||se("Cannot "+e),oh=(n,t)=>Object(t)!==t?se('Cannot use the "in" operator on this value'):n.has(t),x=(n,t,e)=>(Ti(n,t,"read from private field"),e?e.call(n):t.get(n)),rt=(n,t,e)=>t.has(n)?se("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Nn=(n,t,e,i)=>(Ti(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),ah=(n,t,e)=>(Ti(n,t,"access private method"),e),xr,Ur,qr,Fr,Br,Kr,jr,Qr,Jr,Yr,Zr,Xr,to,eo,no,Pi,io,w,Gt,re,Ke,Rn,ki,je,In,Mi,Oi,Ai,Li,Ni,so,Ri,ro;const oo="_";class ch extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${oo}${e++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Ii(n,t){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:t})||r.exec({pathname:`${t}/`});return a?a.pathname.groups:null}const e=new ch(n),i=t.match(e)||`${t}/`.match(e);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([r,a])=>{s[r.startsWith(oo)?r.slice(1):r]=a}),s}function Hn(n,t){let e=0,i=n.pattern.replaceAll("*",()=>`:${e++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(r=>{i=i.replace(new RegExp(`:${r}`,"g"),s[r])}),i}function ao(n,t){return{path:Hn(n,t),...t}}const Hi=st``,co=new Map;io=[yi({penetrable:!0})];class I extends(Pi=F,no=[Ve],eo=[B],to=[B],Xr=[B],Zr=[ie],Yr=[ie],Jr=[ie],Qr=[ie],jr=[B],Kr=[B],Br=[B],Fr=[pt(t=>[t.scrollContainer])],qr=[pt(t=>[t.scrollContainer])],Ur=[pt(t=>{var e;return x(e=t,Ai).call(e)})],xr=[zt(t=>!t.inert)],Pi){constructor(){super(...arguments),rt(this,Gt),q(this,"transition",P(w,8,this)),P(w,11,this),q(this,"routes",P(w,12,this)),P(w,15,this),q(this,"locationStore",P(w,16,this)),P(w,19,this),q(this,"key",P(w,20,this)),P(w,23,this),q(this,"loading",P(w,24,this)),P(w,27,this),q(this,"beforeroutechange",P(w,28,this)),P(w,31,this),q(this,"routechange",P(w,32,this)),P(w,35,this),q(this,"error",P(w,36,this)),P(w,39,this),q(this,"scrollContainer",P(w,40,this)),P(w,43,this),q(this,"scrollIgnoreHash",P(w,44,this)),P(w,47,this),q(this,"trigger",P(w,48,this,N)),P(w,51,this),q(this,"currentRoute"),q(this,"currentParams",{}),rt(this,Ke,d.createState({content:Hi})),rt(this,Rn,()=>{if(!this.locationStore)return;const{path:t,query:e,hash:i,data:s}=N.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:i,data:s})}),rt(this,ki,()=>{if(!x(this,Gt,re))return;const t=co.get(N.currentKey);t?x(this,Gt,re).scroll(0,t):(this.scrollIgnoreHash||!N.getParams().hash)&&x(this,Gt,re).scroll(0,0)}),rt(this,je),rt(this,In,(t,e,i)=>{this.beforeroutechange(t),Nn(this,je,void 0),this.currentRoute=t,this.currentParams=e;const s=async()=>{x(this,Ke).call(this,{content:i}),x(this,Rn).call(this),await Promise.resolve(),x(this,ki).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),rt(this,Mi,P(w,52,this,()=>{if(x(this,Gt,re))return li(N,"beforechange",()=>co.set(N.currentKey,x(this,Gt,re).scrollTop))})),P(w,55,this),rt(this,Oi,P(w,56,this,()=>this.trigger.store&&dt(this.trigger.store,()=>x(this,Ke).call(this)))),P(w,59,this),rt(this,Ai,()=>{const{path:t,query:e,hash:i}=this.trigger.getParams();return[this.key,t,e,i]}),rt(this,Li,P(w,60,this,([t,e],i)=>{if(i&&t===i[0]&&e===i[1]){x(this,Rn).call(this);return}this.update()})),P(w,63,this),rt(this,Ni,P(w,64,this,()=>{const{content:t}=x(this,Ke);if(t!==void 0)return this.shadowRoot?t===Hi?st`<slot></slot>`:t:t===Hi?void 0:st`${t}`})),P(w,67,this),q(this,"update",()=>{const{path:t,hash:e,query:i}=this.trigger.getParams(),{route:s,params:r={}}=oe.findRoute(this.routes,t),{redirect:a,content:c,getContent:l}=s||{};if(a){this.trigger.replace({path:Hn({pattern:a},{params:r}),query:i,hash:e});return}this.trigger===N&&(location.href!==Tt.url||s!=null&&s.title)&&Tt({url:location.href,title:s==null?void 0:s.title});const u=c||(l==null?void 0:l(r,this.shadowRoot||this));if(this.loading(s),u instanceof Promise){Nn(this,je,u);const m=()=>x(this,je)===u;u.then(o=>{m()&&x(this,In).call(this,s,r,o)}).catch(o=>{m()&&this.error(o)});return}x(this,In).call(this,s,r,u)})}}w=Vr(Pi),Gt=new WeakSet,re=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Ke=new WeakMap,Rn=new WeakMap,ki=new WeakMap,je=new WeakMap,In=new WeakMap,Mi=new WeakMap,Oi=new WeakMap,Ai=new WeakMap,Li=new WeakMap,Ni=new WeakMap,D(w,5,"transition",no,I),D(w,5,"routes",eo,I),D(w,5,"locationStore",to,I),D(w,5,"key",Xr,I),D(w,5,"loading",Zr,I),D(w,5,"beforeroutechange",Yr,I),D(w,5,"routechange",Jr,I),D(w,5,"error",Qr,I),D(w,5,"scrollContainer",jr,I),D(w,5,"scrollIgnoreHash",Kr,I),D(w,5,"trigger",Br,I),D(w,21,"#rememberScrollPosition",Fr,Mi),D(w,21,"#connectTriggerStore",qr,Oi),D(w,21,"#updateContent",Ur,Li),D(w,21,"#content",xr,Ni),I=D(w,0,"GemLightRouteElement",io,I),q(I,"createLocationStore",()=>{const{path:n,query:t,hash:e,data:i}=N.getParams();return St({path:n,query:t,hash:e,data:i,params:{}})}),q(I,"findRoute",(n=[],t)=>{let e=null,i;n instanceof Array?i=n:i=Object.values(n);for(const s of i)if(s.pattern==="*")e=s;else{const r=Ii(s.pattern,t);if(r)return{route:s,params:r}}return{route:e}}),P(w,1,I);const hh=Xt`
|
|
11
|
+
*/const hh={CHILD:2},Ir=n=>(...t)=>({_$litDirective$:n,values:t});class lh{constructor(){$(this,"__part");$(this,"__attributeIndex");$(this,"__directive");$(this,"_$parent");$(this,"_$disconnectableChildren")}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,i){this.__part=t,this._$parent=e,this.__attributeIndex=i}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Hr=()=>document.createComment(""),De=(n,t,e)=>{var o;const i=n._$startNode.parentNode,s=t===void 0?n._$endNode:t._$startNode;if(e===void 0){const a=i.insertBefore(Hr(),s),c=i.insertBefore(Hr(),s);e=new Ve(a,c,n,n.options)}else{const a=e._$endNode.nextSibling,c=e._$parent,d=c!==n;if(d){(o=e._$reparentDisconnectables)==null||o.call(e,n),e._$parent=n;let u;e._$notifyConnectionChanged!==void 0&&(u=n._$isConnected)!==c._$isConnected&&e._$notifyConnectionChanged(u)}if(a!==s||d){let u=e._$startNode;for(;u!==a;){const m=u.nextSibling;i.insertBefore(u,s),u=m}}}return e},Gt=(n,t,e=n)=>(n._$setValue(t,e),n),dh={},uh=(n,t=dh)=>n._$committedValue=t,_h=n=>n._$committedValue,Ti=n=>{var i;(i=n._$notifyConnectionChanged)==null||i.call(n,!1,!0);let t=n._$startNode;const e=n._$endNode.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}},Wr=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i};class fh extends lh{constructor(e){super();$(this,"_itemKeys");if(e.type!==hh.CHILD)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,i,s){let o;s===void 0?s=i:i!==void 0&&(o=i);const a=[],c=[];let d=0;for(const u of e)a[d]=o?o(u,d):d,c[d]=s(u,d),d++;return{values:c,keys:a}}render(e,i,s){return this._getValuesAndKeys(e,i,s).values}update(e,[i,s,o]){const a=_h(e),{values:c,keys:d}=this._getValuesAndKeys(i,s,o);if(!Array.isArray(a))return this._itemKeys=d,c;const u=this._itemKeys??(this._itemKeys=[]),m=[];let r,g,h=0,v=a.length-1,S=0,E=c.length-1;for(;h<=v&&S<=E;)if(a[h]===null)h++;else if(a[v]===null)v--;else if(u[h]===d[S])m[S]=Gt(a[h],c[S]),h++,S++;else if(u[v]===d[E])m[E]=Gt(a[v],c[E]),v--,E--;else if(u[h]===d[E])m[E]=Gt(a[h],c[E]),De(e,m[E+1],a[h]),h++,E--;else if(u[v]===d[S])m[S]=Gt(a[v],c[S]),De(e,a[h],a[v]),v--,S++;else if(r===void 0&&(r=Wr(d,S,E),g=Wr(u,h,v)),!r.has(u[h]))Ti(a[h]),h++;else if(!r.has(u[v]))Ti(a[v]),v--;else{const P=g.get(d[S]),p=P!==void 0?a[P]:null;if(p===null){const T=De(e,a[h]);Gt(T,c[S]),m[S]=T}else m[S]=Gt(p,c[S]),De(e,a[h],p),a[P]=null;S++}for(;S<=E;){const P=De(e,m[E+1]);Gt(P,c[S]),m[S++]=P}for(;h<=v;){const P=a[h++];P!==null&&Ti(P)}return this._itemKeys=d,uh(e,m),Ci}}const ph=Ir(fh);oi(Qc,ah),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...Oc,...Hc,...Cc,...ch});const X=globalThis.history,Gr=X.pushState.bind(X),zr=X.replaceState.bind(X);let mh=0;const ki=()=>`${performance.now()}-${++mh}`,A=Et({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),K=new Map;function Vr(n){const{$key:t,$hasCloseHandle:e,$hasOpenHandle:i,$hasShouldCloseHandle:s}=n||{};if(A.$key!==t){if(t)throw new pt("`$key` is not allowed");if(e)throw new pt("`$hasCloseHandle` is not allowed");if(i)throw new pt("`$hasOpenHandle` is not allowed");if(s)throw new pt("`$hasShouldCloseHandle` is not allowed")}}function Dr(n){return tt.basePath?tt.basePath+n:n}function Nn(n){return n===tt.basePath?"/":n.replace(new RegExp(`^${tt.basePath}/`),"/")}function Pi(){tt.dispatchEvent(new CustomEvent("beforechange"))}function Rn(n){const t=K.get(A.$key)||{path:Nn(location.pathname),query:new jt},e=n.path?si(t.path,n.path):Nn(location.pathname),i=new jt(n.query??(n.path?"":location.search)),s=String(i)!==String(t.query),o=s?i:t.query,a=e!==t.path||s,c=n.title||(a?"":document.title),d=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&d?location.hash:""));return{...n,title:c,path:e,query:o,hash:u}}function Ur(n,t){Vr(n.data);const e=Rn(n),{title:i,path:s,query:o,hash:a,close:c,open:d,shouldClose:u,data:m}=e,r={$hasCloseHandle:!!c,$hasOpenHandle:!!d,$hasShouldCloseHandle:!!u,$key:ki(),$title:i,...m};K.set(r.$key,e),Pi(),yn(A),A(r);const g=Dr(s)+new jt(o)+a,h=decodeURIComponent(location.hash);t(r,i,g),h!==a&&dispatchEvent(new CustomEvent("hashchange"))}function qr(n,t,e,i){Vr(n);const s={$key:ki(),$title:t,...n||{}},{pathname:o,search:a,hash:c}=new URL(e,location.origin+location.pathname),d=Rn({path:o,query:new jt(a),hash:c,title:t,data:n});K.set(s.$key,d),Pi(),yn(A),A(s);const u=Dr(o)+d.query+c,m=location.hash;i(s,t,u),m!==c&&dispatchEvent(new CustomEvent("hashchange"))}const Mi=Et({basePath:""});class gh extends EventTarget{get store(){return A}get currentKey(){return A.$key}get basePath(){return Mi.basePath}set basePath(t){Mi({basePath:t}),Object.assign(K.get(A.$key),{path:Nn(location.pathname)})}getParams(){return K.get(A.$key)}updateParams(t){Object.assign(K.get(A.$key),t),A()}push(t){Ur(t,Gr)}replace(t){Ur(t,zr)}pushIgnoreCloseHandle(t){var e,i;A.$hasCloseHandle?((i=(e=K.get(A.$key))==null?void 0:e.close)==null||i.call(e),this.replace(t)):this.push(t)}forward(){X.forward()}back(){X.back()}}const tt=new gh,ne=Et({defaultTitle:document.title,url:"",title:""}),vh={history:tt,titleStore:ne,basePathStore:Mi};if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY=vh,X.pushState=(t,e,i)=>{qr(t,e,i,Gr)},X.replaceState=(t,e,i)=>{qr(t,e,i,zr)},addEventListener("hashchange",({isTrusted:t})=>{t&&tt.replace({hash:location.hash})}),X.state)if(X.state.$hasCloseHandle){A(X.state);const t=Rn({title:document.title});K.set(A.$key,t),tt.back()}else{const t=Rn({title:document.title,hash:location.hash});A({$key:ki(),...X.state||{}}),K.set(A.$key,t)}else{const{protocol:t,pathname:e,search:i,hash:s}=location;t.startsWith("http")&&tt.replace({path:e,query:i,hash:s})}ht(ne,()=>{const t=K.get(A.$key);t&&(t.title=ne.title)}),ht(A,()=>{const{title:t}=tt.getParams();t!==ne.title&&ne({title:t})});let n=!1;addEventListener("popstate",t=>{var o,a;const e=t.state;if(!(e!=null&&e.$key))return;if(n){n=!1;return}if(!K.has(e.$key)){const{pathname:c,search:d,hash:u}=location;K.set(e.$key,{path:Nn(c),query:new jt(d),hash:decodeURIComponent(u),title:ne.title||e.$title,data:e})}const i=A;if(parseFloat(e.$key)>parseFloat(i.$key)&&e.$hasOpenHandle)(a=(o=K.get(e.$key))==null?void 0:o.open)==null||a.call(o);else if(i.$hasCloseHandle){const c=K.get(i.$key),d=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,tt.forward();return}else d?d():e.$hasCloseHandle&&(n=!0,tt.back())}Pi(),yn(A),A(e)})}const{history:N,titleStore:kt,basePathStore:Fr}=globalThis._GEMHISTORY;var $h=Object.create,Oi=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,xr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ie=n=>{throw TypeError(n)},Br=(n,t,e)=>t in n?Oi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Kr=(n,t)=>Oi(n,"name",{value:t,configurable:!0}),yh=n=>[,,,$h((n==null?void 0:n[xr("metadata")])??null)],jr=["class","method","getter","setter","accessor","field","value","get","set"],Ue=n=>n!==void 0&&typeof n!="function"?ie("Function expected"):n,wh=(n,t,e,i,s)=>({kind:jr[n],name:t,metadata:i,addInitializer:o=>e._?ie("Already initialized"):s.push(Ue(o||null))}),Eh=(n,t)=>Br(t,xr("metadata"),n[3]),zt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},In=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=jr[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&Sh(r<4?s:{get[e](){return st(this,o)},set[e](_){return Fe(this,o,_)}},e));r?h&&r<4&&Kr(o,(r>2?"set ":r>1?"get ":"")+e):Kr(s,e);for(var T=i.length-1;T>=0;T--)u=wh(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Ch(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?st:bh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>Fe(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?Ue(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?ie("Object expected"):(Ue(a=c.get)&&(p.get=a),Ue(a=c.set)&&(p.set=a),Ue(a=c.init)&&E.unshift(a));return r||Eh(n,s),p&&Oi(s,e,p),h?r^4?o:p:s},qe=(n,t,e)=>Br(n,typeof t!="symbol"?t+"":t,e),Li=(n,t,e)=>t.has(n)||ie("Cannot "+e),Ch=(n,t)=>Object(t)!==t?ie('Cannot use the "in" operator on this value'):n.has(t),st=(n,t,e)=>(Li(n,t,"read from private field"),e?e.call(n):t.get(n)),se=(n,t,e)=>t.has(n)?ie("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Fe=(n,t,e,i)=>(Li(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),bh=(n,t,e)=>(Li(n,t,"access private method"),e),Qr,Jr,Yr,Ai,Zr,et,xe,Be,Ke,Ni,Hn,Ri;const Ii=Symbol();Zr=[Ie(N.store),He({role:"dialog",ariaModal:"true"})];class re extends(Ai=J,Yr=[x],Jr=[Re],Qr=[Pn()],Ai){constructor(){super(...arguments),qe(this,"label",zt(et,8,this)),zt(et,11,this),qe(this,"opened",zt(et,12,this)),zt(et,15,this),se(this,xe),se(this,Be),se(this,Ke,[]),se(this,Ni,()=>{var t;this.inert=!0,st(this,Ke).forEach(e=>e.inert=!1),st(this,xe)?st(this,xe).before(this):st(this,Be)&&((t=st(this,Be))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),se(this,Hn,()=>{this.hidden=!1,this.inert=!1,Fe(this,xe,this.nextSibling),Fe(this,Be,this.parentElement||this.getRootNode()),Fe(this,Ke,[...document.body.children].filter(t=>!t.inert)),st(this,Ke).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),se(this,Ri,zt(et,16,this,()=>this.inert=!0)),zt(et,19,this),qe(this,"open",()=>{if(!this.opened)return st(this,Hn).call(this),N.push({title:this.label,open:st(this,Hn),close:st(this,Ni),shouldClose:this.shouldClose}),Ii}),qe(this,"close",()=>(N.back(),Ii)),qe(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),Ii))}shouldClose(){return!0}}et=yh(Ai),xe=new WeakMap,Be=new WeakMap,Ke=new WeakMap,Ni=new WeakMap,Hn=new WeakMap,Ri=new WeakMap,In(et,5,"label",Yr,re),In(et,5,"opened",Jr,re),In(et,21,"#init",Qr,Ri),re=In(et,0,"GemDialogBaseElement",Zr,re),zt(et,1,re);var Th=Object.create,Hi=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,Xr=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),oe=n=>{throw TypeError(n)},to=(n,t,e)=>t in n?Hi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,eo=(n,t)=>Hi(n,"name",{value:t,configurable:!0}),Ph=n=>[,,,Th((n==null?void 0:n[Xr("metadata")])??null)],no=["class","method","getter","setter","accessor","field","value","get","set"],je=n=>n!==void 0&&typeof n!="function"?oe("Function expected"):n,Mh=(n,t,e,i,s)=>({kind:no[n],name:t,metadata:i,addInitializer:o=>e._?oe("Already initialized"):s.push(je(o||null))}),Oh=(n,t)=>to(t,Xr("metadata"),n[3]),Qe=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Wi=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=no[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&kh(r<4?s:{get[e](){return io(this,o)},set[e](_){return ro(this,o,_)}},e));r?h&&r<4&&eo(o,(r>2?"set ":r>1?"get ":"")+e):eo(s,e);for(var T=i.length-1;T>=0;T--)u=Mh(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Lh(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?io:Ah)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>ro(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?je(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?oe("Object expected"):(je(a=c.get)&&(p.get=a),je(a=c.set)&&(p.set=a),je(a=c.init)&&E.unshift(a));return r||Oh(n,s),p&&Hi(s,e,p),h?r^4?o:p:s},Wn=(n,t,e)=>to(n,typeof t!="symbol"?t+"":t,e),Gi=(n,t,e)=>t.has(n)||oe("Cannot "+e),Lh=(n,t)=>Object(t)!==t?oe('Cannot use the "in" operator on this value'):n.has(t),io=(n,t,e)=>(Gi(n,t,"read from private field"),e?e.call(n):t.get(n)),so=(n,t,e)=>t.has(n)?oe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ro=(n,t,e,i)=>(Gi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Ah=(n,t,e)=>(Gi(n,t,"access private method"),e);const Gn=Symbol("open mark");function Nh(n){var t,e,i,s,o,a,c;const d=Symbol();s=[bt(),He({role:"alertdialog",ariaModal:"true"})];let u=class uc extends(i=J,e=[Jt()],t=[Jt()],i){constructor(){super(...arguments),Wn(this,"label",""),so(this,a,Qe(o,8,this,()=>ht(N.store,this.update))),Qe(o,11,this),so(this,c,Qe(o,12,this,()=>ht(uc.store,this.update))),Qe(o,15,this)}static get isOpen(){return this.store[Gn]}static open(g){const h=new this;this.instance=h,this.inertStore=[...document.body.children].filter(S=>!S.inert),this.inertStore.forEach(S=>S.inert=!0),document.body.append(h);const v=()=>this.store({[Gn]:!0,...g});return setTimeout(()=>{v(),N.push({title:h.label,open:v,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return N.back(),d}static closeHandle(){var g;return this.inertStore.forEach(h=>h.inert=!1),(g=this.instance)==null||g.remove(),this.store({[Gn]:!1,...n}),d}static shouldClose(){return!0}};return o=Ph(i),a=new WeakMap,c=new WeakMap,Wi(o,21,"#connectHistory",e,a),Wi(o,21,"#connectStore",t,c),u=Wi(o,0,"ModalElement",s,u),Wn(u,"inertStore",[]),Wn(u,"instance",null),Wn(u,"store",Et({[Gn]:!1,...n})),Qe(o,1,u),u}var Rh=Object.create,zi=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,oo=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ae=n=>{throw TypeError(n)},ao=(n,t,e)=>t in n?zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,co=(n,t)=>zi(n,"name",{value:t,configurable:!0}),ho=n=>[,,,Rh((n==null?void 0:n[oo("metadata")])??null)],lo=["class","method","getter","setter","accessor","field","value","get","set"],Je=n=>n!==void 0&&typeof n!="function"?ae("Function expected"):n,Hh=(n,t,e,i,s)=>({kind:lo[n],name:t,metadata:i,addInitializer:o=>e._?ae("Already initialized"):s.push(Je(o||null))}),Wh=(n,t)=>ao(t,oo("metadata"),n[3]),k=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},D=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=lo[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&Ih(r<4?s:{get[e](){return F(this,o)},set[e](_){return zn(this,o,_)}},e));r?h&&r<4&&co(o,(r>2?"set ":r>1?"get ":"")+e):co(s,e);for(var T=i.length-1;T>=0;T--)u=Hh(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Gh(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?F:zh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>zn(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?Je(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?ae("Object expected"):(Je(a=c.get)&&(p.get=a),Je(a=c.set)&&(p.set=a),Je(a=c.init)&&E.unshift(a));return r||Wh(n,s),p&&zi(s,e,p),h?r^4?o:p:s},q=(n,t,e)=>ao(n,typeof t!="symbol"?t+"":t,e),Vi=(n,t,e)=>t.has(n)||ae("Cannot "+e),Gh=(n,t)=>Object(t)!==t?ae('Cannot use the "in" operator on this value'):n.has(t),F=(n,t,e)=>(Vi(n,t,"read from private field"),e?e.call(n):t.get(n)),rt=(n,t,e)=>t.has(n)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),zn=(n,t,e,i)=>(Vi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),zh=(n,t,e)=>(Vi(n,t,"access private method"),e),uo,_o,fo,po,mo,go,vo,$o,So,yo,wo,Eo,Co,bo,To,Di,ko,y,Vt,ce,Ye,Vn,Ui,Ze,qi,Fi,xi,Bi,Ki,ji,Po,Qi,Mo;const Oo="_";class Vh extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${Oo}${e++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Ji(n,t){if(globalThis.URLPattern){const o=new URLPattern({pathname:n}),a=o.exec({pathname:t})||o.exec({pathname:`${t}/`});return a?a.pathname.groups:null}const e=new Vh(n),i=t.match(e)||`${t}/`.match(e);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([o,a])=>{s[o.startsWith(Oo)?o.slice(1):o]=a}),s}function Dn(n,t){let e=0,i=n.pattern.replaceAll("*",()=>`:${e++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(o=>{i=i.replace(new RegExp(`:${o}`,"g"),s[o])}),i}function Lo(n,t){return{path:Dn(n,t),...t}}const Yi=l.html``,Ao=new Map;ko=[gi({penetrable:!0})];class H extends(Di=J,To=[Ne],bo=[U],Co=[U],Eo=[U],wo=[Yt],yo=[Yt],So=[Yt],$o=[Yt],vo=[U],go=[U],mo=[U],po=[lt(t=>[t.scrollContainer])],fo=[lt(t=>[t.scrollContainer])],_o=[lt(t=>{var e;return F(e=t,Bi).call(e)})],uo=[Rt(t=>!t.inert)],Di){constructor(){super(...arguments),rt(this,Vt),q(this,"transition",k(y,8,this)),k(y,11,this),q(this,"routes",k(y,12,this)),k(y,15,this),q(this,"locationStore",k(y,16,this)),k(y,19,this),q(this,"key",k(y,20,this)),k(y,23,this),q(this,"loading",k(y,24,this)),k(y,27,this),q(this,"beforeroutechange",k(y,28,this)),k(y,31,this),q(this,"routechange",k(y,32,this)),k(y,35,this),q(this,"error",k(y,36,this)),k(y,39,this),q(this,"scrollContainer",k(y,40,this)),k(y,43,this),q(this,"scrollIgnoreHash",k(y,44,this)),k(y,47,this),q(this,"trigger",k(y,48,this,N)),k(y,51,this),q(this,"currentRoute"),q(this,"currentParams",{}),rt(this,Ye,l.createState({content:Yi})),rt(this,Vn,()=>{if(!this.locationStore)return;const{path:t,query:e,hash:i,data:s}=N.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:i,data:s})}),rt(this,Ui,()=>{if(!F(this,Vt,ce))return;const t=Ao.get(N.currentKey);t?F(this,Vt,ce).scroll(0,t):(this.scrollIgnoreHash||!N.getParams().hash)&&F(this,Vt,ce).scroll(0,0)}),rt(this,Ze),rt(this,qi,(t,e,i)=>{this.beforeroutechange(t),zn(this,Ze,void 0),this.currentRoute=t,this.currentParams=e;const s=async()=>{F(this,Ye).call(this,{content:i}),F(this,Vn).call(this),await Promise.resolve(),F(this,Ui).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),rt(this,Fi,k(y,52,this,()=>{if(F(this,Vt,ce))return ri(N,"beforechange",()=>Ao.set(N.currentKey,F(this,Vt,ce).scrollTop))})),k(y,55,this),rt(this,xi,k(y,56,this,()=>this.trigger.store&&ht(this.trigger.store,()=>F(this,Ye).call(this)))),k(y,59,this),rt(this,Bi,()=>{const{path:t,query:e,hash:i}=this.trigger.getParams();return[this.key,t,e,i]}),rt(this,Ki,k(y,60,this,([t,e],i)=>{if(i&&t===i[0]&&e===i[1]){F(this,Vn).call(this);return}this.update()})),k(y,63,this),rt(this,ji,k(y,64,this,()=>{const{content:t}=F(this,Ye);if(t!==void 0)return this.shadowRoot?t===Yi?l.html`<slot></slot>`:t:t===Yi?void 0:l.html`${t}`})),k(y,67,this),q(this,"update",async()=>{const{path:t,hash:e,query:i}=this.trigger.getParams(),{route:s,params:o={}}=he.findRoute(this.routes,t),{redirect:a,content:c,getContent:d}=s||{};if(a){this.trigger.replace({path:Dn({pattern:a},{params:o}),query:i,hash:e});return}this.trigger===N&&(location.href!==kt.url||s!=null&&s.title)&&kt({url:location.href,title:s==null?void 0:s.title});const u=c||(d==null?void 0:d(o,this.shadowRoot||this));this.loading(s),zn(this,Ze,u);const m=()=>F(this,Ze)===u;try{const r=await u;m()&&F(this,qi).call(this,s,o,r)}catch(r){m()&&this.error(r)}})}}y=ho(Di),Vt=new WeakSet,ce=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Ye=new WeakMap,Vn=new WeakMap,Ui=new WeakMap,Ze=new WeakMap,qi=new WeakMap,Fi=new WeakMap,xi=new WeakMap,Bi=new WeakMap,Ki=new WeakMap,ji=new WeakMap,D(y,5,"transition",To,H),D(y,5,"routes",bo,H),D(y,5,"locationStore",Co,H),D(y,5,"key",Eo,H),D(y,5,"loading",wo,H),D(y,5,"beforeroutechange",yo,H),D(y,5,"routechange",So,H),D(y,5,"error",$o,H),D(y,5,"scrollContainer",vo,H),D(y,5,"scrollIgnoreHash",go,H),D(y,5,"trigger",mo,H),D(y,21,"#rememberScrollPosition",po,Fi),D(y,21,"#connectTriggerStore",fo,xi),D(y,21,"#updateContent",_o,Ki),D(y,21,"#content",uo,ji),H=D(y,0,"GemLightRouteElement",ko,H),q(H,"createLocationStore",()=>{const{path:n,query:t,hash:e,data:i}=N.getParams();return Et({path:n,query:t,hash:e,data:i,params:{}})}),q(H,"findRoute",(n=[],t)=>{let e=null,i;Array.isArray(n)?i=n:i=Object.values(n);for(const s of i)if(s.pattern==="*")e=s;else{const o=Ji(s.pattern,t);if(o)return{route:s,params:o}}return{route:e}}),k(y,1,H);const Dh=Nt`
|
|
23
12
|
:host(:where(:not([hidden]))),
|
|
24
13
|
:not(:defined) {
|
|
25
14
|
display: contents;
|
|
26
15
|
}
|
|
27
|
-
`;
|
|
16
|
+
`;Po=[bt(),Zt(Dh)];class he extends(Mo=H){}Qi=ho(Mo),he=D(Qi,0,"GemRouteElement",Po,he),k(Qi,1,he);var Uh=Object.create,Zi=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,No=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),le=n=>{throw TypeError(n)},Ro=(n,t,e)=>t in n?Zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Io=(n,t)=>Zi(n,"name",{value:t,configurable:!0}),Ho=n=>[,,,Uh((n==null?void 0:n[No("metadata")])??null)],Wo=["class","method","getter","setter","accessor","field","value","get","set"],Xe=n=>n!==void 0&&typeof n!="function"?le("Function expected"):n,Fh=(n,t,e,i,s)=>({kind:Wo[n],name:t,metadata:i,addInitializer:o=>e._?le("Already initialized"):s.push(Xe(o||null))}),xh=(n,t)=>Ro(t,No("metadata"),n[3]),b=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},W=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Wo[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&qh(r<4?s:{get[e](){return dt(this,o)},set[e](_){return Go(this,o,_)}},e));r?h&&r<4&&Io(o,(r>2?"set ":r>1?"get ":"")+e):Io(s,e);for(var T=i.length-1;T>=0;T--)u=Fh(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Bh(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?dt:Kh)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>Go(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?Xe(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?le("Object expected"):(Xe(a=c.get)&&(p.get=a),Xe(a=c.set)&&(p.set=a),Xe(a=c.init)&&E.unshift(a));return r||xh(n,s),p&&Zi(s,e,p),h?r^4?o:p:s},j=(n,t,e)=>Ro(n,typeof t!="symbol"?t+"":t,e),Xi=(n,t,e)=>t.has(n)||le("Cannot "+e),Bh=(n,t)=>Object(t)!==t?le('Cannot use the "in" operator on this value'):n.has(t),dt=(n,t,e)=>(Xi(n,t,"read from private field"),e?e.call(n):t.get(n)),de=(n,t,e)=>t.has(n)?le("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Go=(n,t,e,i)=>(Xi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Kh=(n,t,e)=>(Xi(n,t,"access private method"),e),zo,Vo,Do,Uo,qo,Fo,xo,Bo,Ko,jo,Qo,Jo,Yo,Zo,ts,Xo,w,Pt,tn,ta,es,ns,is,ss,rs,ea,na,ia,os,sa,nt,as;function ra(n){return!n.startsWith("/")}const jh=Nt`
|
|
28
17
|
:host {
|
|
29
18
|
/* link default style */
|
|
30
19
|
cursor: pointer;
|
|
@@ -38,13 +27,11 @@
|
|
|
38
27
|
a:visited {
|
|
39
28
|
color: unset;
|
|
40
29
|
}
|
|
41
|
-
`;Oo=[Ue(Hr),xe(mh),bt(),qe({focusable:!0})];class G extends(Gi=F,Mo=[U],ko=[U],Po=[U],To=[U],bo=[U],Co=[U],Eo=[Ve],So=[B],wo=[B],yo=[B],$o=[B],vo=[$i],go=[ne()],mo=[zt()],Gi){constructor(){super(...arguments),b(S,5,this),Vt(this,Pt),j(this,"href",b(S,8,this)),b(S,11,this),j(this,"target",b(S,12,this)),b(S,15,this),j(this,"path",b(S,16,this)),b(S,19,this),j(this,"query",b(S,20,this)),b(S,23,this),j(this,"hash",b(S,24,this)),b(S,27,this),j(this,"hint",b(S,28,this)),b(S,31,this),j(this,"preload",b(S,32,this)),b(S,35,this),j(this,"route",b(S,36,this)),b(S,39,this),j(this,"options",b(S,40,this)),b(S,43,this),j(this,"routeOptions",b(S,44,this)),b(S,47,this),j(this,"prepare",b(S,48,this)),b(S,51,this),j(this,"link",b(S,52,this)),b(S,55,this),Vt(this,Vi,async()=>{var r;const t=this._getLocationString();if(!t)return;if(Ho(t))switch(this.target){case"_self":window.location.href=t;return;case"_parent":window.parent.location.href=t;return;case"_top":window.top.location.href=t;return;default:window.open(t);return}const{path:e,query:i,hash:s}=N.getParams();if(e+i+s!==t)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)N.pushIgnoreCloseHandle(ao(this.route,ot(this,Pt,Je)));else if(this.href){const a=new URL(t,location.origin);N.pushIgnoreCloseHandle({path:a.pathname,query:a.search,hash:a.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),Vt(this,Di,t=>t.preventDefault()),Vt(this,xi,()=>{const t=this._getLocationString();return Ho(t)?t:new URL(N.basePath+t,location.origin).toString()}),Vt(this,Ui,()=>{var t,e,i;(t=this.route)==null||t.content,(i=(e=this.route)==null?void 0:e.getContent)==null||i.call(e,{},this.shadowRoot)}),Vt(this,Fi,b(S,56,this,()=>st`<a
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
><slot></slot
|
|
47
|
-
></a>`)),b(S,59,this)}_getLocationString(){var t,e;if(this.route){const i=((t=ot(this,Pt,Je))==null?void 0:t.query)||"",s=((e=ot(this,Pt,Je))==null?void 0:e.hash)||"";return Hn(this.route,ot(this,Pt,Je))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:r}=N.getParams();return i.startsWith("#")?`${s}${r}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?hi(s,i):i}}}S=_o(Gi),Pt=new WeakSet,Je=function(){return this.routeOptions||this.options},Ao=function(){return this.hint||"on"},Vi=new WeakMap,Di=new WeakMap,xi=new WeakMap,Ui=new WeakMap,qi=function(){this.addEventListener("click",ot(this,Vi)),this.addEventListener("pointerenter",ot(this,Ui))},Fi=new WeakMap,qi=H(S,17,"#init",go,Pt,qi),H(S,5,"href",Mo,G),H(S,5,"target",ko,G),H(S,5,"path",Po,G),H(S,5,"query",To,G),H(S,5,"hash",bo,G),H(S,5,"hint",Co,G),H(S,5,"preload",Eo,G),H(S,5,"route",So,G),H(S,5,"options",wo,G),H(S,5,"routeOptions",yo,G),H(S,5,"prepare",$o,G),H(S,5,"link",vo,G),H(S,21,"#content",mo,Fi),G=H(S,0,"GemLinkElement",Oo,G),b(S,1,G),Io=[Ue(N.store)];class Dt extends(Bi=G,Ro=[U],No=[De],Lo=[pt()],Bi){constructor(){super(...arguments),j(this,"pattern",b(tt,8,this)),b(tt,11,this),j(this,"active",b(tt,12,this)),b(tt,15,this),Vt(this,Ki,b(tt,16,this,()=>{const{path:t,query:e,hash:i}=N.getParams(),s=this.pattern&&Ii(this.pattern,t);this.active=!!s||t+e+i===this._getLocationString()})),b(tt,19,this)}}tt=_o(Bi),Ki=new WeakMap,H(tt,5,"pattern",Ro,Dt),H(tt,5,"active",No,Dt),H(tt,21,"#updateState",Lo,Ki),Dt=H(tt,0,"GemActiveLinkElement",Io,Dt),b(tt,1,Dt),customElements.define("gem-link",G),customElements.define("gem-active-link",Dt),customElements.define("gem-route",oe),customElements.define("gem-light-route",I);var gh=Object.create,ji=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Wo=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ce=n=>{throw TypeError(n)},zo=(n,t,e)=>t in n?ji(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Go=(n,t)=>ji(n,"name",{value:t,configurable:!0}),$h=n=>[,,,gh((n==null?void 0:n[Wo("metadata")])??null)],Vo=["class","method","getter","setter","accessor","field","value","get","set"],Ye=n=>n!==void 0&&typeof n!="function"?ce("Function expected"):n,yh=(n,t,e,i,s)=>({kind:Vo[n],name:t,metadata:i,addInitializer:r=>e._?ce("Already initialized"):s.push(Ye(r||null))}),wh=(n,t)=>zo(t,Wo("metadata"),n[3]),J=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},xt=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Vo[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&vh(o<4?s:{get[e](){return Ji(this,r)},set[e](_){return Do(this,r,_)}},e));o?h&&o<4&&Go(r,(o>2?"set ":o>1?"get ":"")+e):Go(s,e);for(var T=i.length-1;T>=0;T--)u=yh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>Sh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?Ji:Eh)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>Do(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Ye(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?ce("Object expected"):(Ye(a=c.get)&&(p.get=a),Ye(a=c.set)&&(p.set=a),Ye(a=c.init)&&E.unshift(a));return o||wh(n,s),p&&ji(s,e,p),h?o^4?r:p:s},Wn=(n,t,e)=>zo(n,typeof t!="symbol"?t+"":t,e),Qi=(n,t,e)=>t.has(n)||ce("Cannot "+e),Sh=(n,t)=>Object(t)!==t?ce('Cannot use the "in" operator on this value'):n.has(t),Ji=(n,t,e)=>(Qi(n,t,"read from private field"),e?e.call(n):t.get(n)),zn=(n,t,e)=>t.has(n)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Do=(n,t,e,i)=>(Qi(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Eh=(n,t,e)=>(Qi(n,t,"access private method"),e),xo,Uo,qo,Fo,Bo,Ko,Yi,jo,R,Zi,Xi,ts,es;let Qo=0;const Jo=n=>{clearTimeout(Qo),Qo=window.setTimeout(()=>document.title=n)};function Ch(n,t="",e=""){const i=Tt.title||n;i&&i!==Tt.defaultTitle?(he.title=i,Jo(t+he.title+e)):(he.title=Tt.defaultTitle,Jo(he.title))}jo=[bt()];let kt=class ic extends(Yi=F,Ko=[U],Bo=[U],Fo=[Ve],qo=[pt(t=>[t.inert])],Uo=[ne()],xo=[zt()],Yi){constructor(){super(...arguments),Wn(this,"prefix",J(R,8,this)),J(R,11,this),Wn(this,"suffix",J(R,12,this)),J(R,15,this),Wn(this,"inert",J(R,16,this)),J(R,19,this),zn(this,Zi,J(R,20,this,()=>!this.inert&&dt(Tt,this.update))),J(R,23,this),zn(this,Xi,new MutationObserver(()=>this.update())),zn(this,ts,J(R,24,this,()=>{Ji(this,Xi).observe(this,{characterData:!0,childList:!0,subtree:!0})})),J(R,27,this),zn(this,es,J(R,28,this,()=>{var t;return Ch((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),st`${ic.title}`})),J(R,31,this)}static setTitle(t){Tt({title:t})}};R=$h(Yi),Zi=new WeakMap,Xi=new WeakMap,ts=new WeakMap,es=new WeakMap,xt(R,5,"prefix",Ko,kt),xt(R,5,"suffix",Bo,kt),xt(R,5,"inert",Fo,kt),xt(R,21,"#connectStore",qo,Zi),xt(R,21,"#obTextContent",Uo,ts),xt(R,21,"#content",xo,es),kt=xt(R,0,"GemTitleElement",jo,kt),Wn(kt,"title",document.title),J(R,1,kt);let he=kt;customElements.define("gem-title",he);var bh=Object.create,ns=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Yo=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),le=n=>{throw TypeError(n)},Zo=(n,t,e)=>t in n?ns(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Xo=(n,t)=>ns(n,"name",{value:t,configurable:!0}),Ph=n=>[,,,bh((n==null?void 0:n[Yo("metadata")])??null)],ta=["class","method","getter","setter","accessor","field","value","get","set"],Ze=n=>n!==void 0&&typeof n!="function"?le("Function expected"):n,kh=(n,t,e,i,s)=>({kind:ta[n],name:t,metadata:i,addInitializer:r=>e._?le("Already initialized"):s.push(Ze(r||null))}),Mh=(n,t)=>Zo(t,Yo("metadata"),n[3]),at=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},de=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=ta[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Th(o<4?s:{get[e](){return ss(this,r)},set[e](_){return na(this,r,_)}},e));o?h&&o<4&&Xo(r,(o>2?"set ":o>1?"get ":"")+e):Xo(s,e);for(var T=i.length-1;T>=0;T--)u=kh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>Oh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?ss:Ah)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>na(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Ze(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?le("Object expected"):(Ze(a=c.get)&&(p.get=a),Ze(a=c.set)&&(p.set=a),Ze(a=c.init)&&E.unshift(a));return o||Mh(n,s),p&&ns(s,e,p),h?o^4?r:p:s},Gn=(n,t,e)=>Zo(n,typeof t!="symbol"?t+"":t,e),is=(n,t,e)=>t.has(n)||le("Cannot "+e),Oh=(n,t)=>Object(t)!==t?le('Cannot use the "in" operator on this value'):n.has(t),ss=(n,t,e)=>(is(n,t,"read from private field"),e?e.call(n):t.get(n)),ea=(n,t,e)=>t.has(n)?le("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),na=(n,t,e,i)=>(is(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Ah=(n,t,e)=>(is(n,t,"access private method"),e),ia,sa,ra,oa,aa,rs,ca,V,os,as;const Lh=Xt`
|
|
30
|
+
`;Xo=[Ie(Fr),Zt(jh),bt(),He({focusable:!0})];let G=class _c extends(ts=J,Zo=[mi],Yo=[x],Jo=[x],Qo=[x],jo=[x],Ko=[x],Bo=[x],xo=[Ne],Fo=[U],qo=[U],Uo=[U],Do=[U],Vo=[Jt()],zo=[Rt()],ts){constructor(){super(...arguments),b(w,5,this),de(this,Pt),j(this,"href",b(w,12,this)),b(w,15,this),j(this,"target",b(w,16,this)),b(w,19,this),j(this,"path",b(w,20,this)),b(w,23,this),j(this,"query",b(w,24,this)),b(w,27,this),j(this,"hash",b(w,28,this)),b(w,31,this),j(this,"hint",b(w,32,this)),b(w,35,this),j(this,"preload",b(w,36,this)),b(w,39,this),j(this,"route",b(w,40,this)),b(w,43,this),j(this,"options",b(w,44,this)),b(w,47,this),j(this,"routeOptions",b(w,48,this)),b(w,51,this),j(this,"prepare",b(w,52,this)),b(w,55,this),de(this,es,async t=>{var a;t.preventDefault();const e=this._getLocationString();if(!e)return;if(ra(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:i,query:s,hash:o}=N.getParams();if(i+s+o!==e)if(await((a=this.prepare)==null?void 0:a.call(this)),this.route)N.pushIgnoreCloseHandle(Lo(this.route,dt(this,Pt,tn)));else if(this.href){const c=new URL(e,location.origin);N.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else N.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),de(this,ns,()=>{const t=this._getLocationString();return ra(t)?t:new URL(N.basePath+t,location.origin).toString()}),de(this,is,()=>{var t,e,i;(t=this.route)==null||t.content,(i=(e=this.route)==null?void 0:e.getContent)==null||i.call(e,{},this.shadowRoot)}),de(this,rs,b(w,56,this,()=>{const t=dt(this,Pt,ta)==="off"?null:dt(this,ns).call(this);return l.html`<a part=${_c.link} href=${t} tabindex="-1"><slot></slot></a>`})),b(w,59,this)}_getLocationString(){var t,e;if(this.route){const i=((t=dt(this,Pt,tn))==null?void 0:t.query)||"",s=((e=dt(this,Pt,tn))==null?void 0:e.hash)||"";return Dn(this.route,dt(this,Pt,tn))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:o}=N.getParams();return i.startsWith("#")?`${s}${o}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?si(s,i):i}}};w=Ho(ts),Pt=new WeakSet,tn=function(){return this.routeOptions||this.options},ta=function(){return this.hint||"on"},es=new WeakMap,ns=new WeakMap,is=new WeakMap,ss=function(){this.addEventListener("click",dt(this,es)),this.addEventListener("pointerenter",dt(this,is))},rs=new WeakMap,ss=W(w,17,"#init",Vo,Pt,ss),W(w,13,"link",Zo,G),W(w,5,"href",Yo,G),W(w,5,"target",Jo,G),W(w,5,"path",Qo,G),W(w,5,"query",jo,G),W(w,5,"hash",Ko,G),W(w,5,"hint",Bo,G),W(w,5,"preload",xo,G),W(w,5,"route",Fo,G),W(w,5,"options",qo,G),W(w,5,"routeOptions",Uo,G),W(w,5,"prepare",Do,G),W(w,21,"#content",zo,rs),G=W(w,0,"GemLinkElement",Xo,G),j(G,"link",b(w,8,G)),b(w,11,G),b(w,1,G);let cs=G;sa=[Ie(N.store)];class Dt extends(os=cs,ia=[x],na=[Re],ea=[lt()],os){constructor(){super(...arguments),j(this,"pattern",b(nt,8,this)),b(nt,11,this),j(this,"active",b(nt,12,this)),b(nt,15,this),de(this,as,b(nt,16,this,()=>{const{path:t,query:e,hash:i}=N.getParams(),s=this.pattern&&Ji(this.pattern,t);this.active=!!s||t+e+i===this._getLocationString()})),b(nt,19,this)}}nt=Ho(os),as=new WeakMap,W(nt,5,"pattern",ia,Dt),W(nt,5,"active",na,Dt),W(nt,21,"#updateState",ea,as),Dt=W(nt,0,"GemActiveLinkElement",sa,Dt),b(nt,1,Dt),customElements.define("gem-link",cs),customElements.define("gem-active-link",Dt);var Qh=Object.create,hs=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,oa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ue=n=>{throw TypeError(n)},aa=(n,t,e)=>t in n?hs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ca=(n,t)=>hs(n,"name",{value:t,configurable:!0}),Yh=n=>[,,,Qh((n==null?void 0:n[oa("metadata")])??null)],ha=["class","method","getter","setter","accessor","field","value","get","set"],en=n=>n!==void 0&&typeof n!="function"?ue("Function expected"):n,Zh=(n,t,e,i,s)=>({kind:ha[n],name:t,metadata:i,addInitializer:o=>e._?ue("Already initialized"):s.push(en(o||null))}),la=(n,t)=>aa(t,oa("metadata"),n[3]),Mt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Un=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=ha[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&Jh(r<4?s:{get[e](){return Ot(this,o)},set[e](_){return ds(this,o,_)}},e));r?h&&r<4&&ca(o,(r>2?"set ":r>1?"get ":"")+e):ca(s,e);for(var T=i.length-1;T>=0;T--)u=Zh(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Xh(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?Ot:tl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>ds(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?en(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?ue("Object expected"):(en(a=c.get)&&(p.get=a),en(a=c.set)&&(p.set=a),en(a=c.init)&&E.unshift(a));return r||la(n,s),p&&hs(s,e,p),h?r^4?o:p:s},da=(n,t,e)=>aa(n,typeof t!="symbol"?t+"":t,e),ls=(n,t,e)=>t.has(n)||ue("Cannot "+e),Xh=(n,t)=>Object(t)!==t?ue('Cannot use the "in" operator on this value'):n.has(t),Ot=(n,t,e)=>(ls(n,t,"read from private field"),e?e.call(n):t.get(n)),_e=(n,t,e)=>t.has(n)?ue("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ds=(n,t,e,i)=>(ls(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),tl=(n,t,e)=>(ls(n,t,"access private method"),e),ua,_a,fa,pa,us,Q,_s,ma,fs,qn,ps,nn,ms;const el="gem-reflect-start",ga="gem-reflect-end",va=n=>new Comment(n),nl=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==ga);)e=e.nextSibling;return t};class sn extends(us=J,pa=[x],fa=[U],_a=[Pn()],ua=[lt(t=>[t.target])],us){constructor(){super(...arguments),_e(this,_s),da(this,"method",Mt(Q,8,this)),Mt(Q,11,this),da(this,"target",Mt(Q,12,this,document.head)),Mt(Q,15,this),_e(this,fs,Mt(Q,16,this,()=>{this.hidden=!0})),Mt(Q,19,this),_e(this,qn,va(el)),_e(this,ps,va(ga)),_e(this,nn),_e(this,ms,Mt(Q,20,this,()=>((Ot(this,nn)||[Ot(this,qn),...this.childNodes,Ot(this,ps)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[Ot(this,_s,ma)](t)}),()=>{ds(this,nn,nl(Ot(this,qn))),Ot(this,nn).forEach(t=>t.remove())}))),Mt(Q,23,this)}}Q=Yh(us),_s=new WeakSet,ma=function(){return this.method||"append"},fs=new WeakMap,qn=new WeakMap,ps=new WeakMap,nn=new WeakMap,ms=new WeakMap,Un(Q,5,"method",pa,sn),Un(Q,5,"target",fa,sn),Un(Q,21,"#init",_a,fs),Un(Q,21,"#changeTarget",ua,ms),la(Q,sn),customElements.define("gem-reflect",sn),customElements.define("gem-route",he),customElements.define("gem-light-route",H);var il=Object.create,gs=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,$a=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),fe=n=>{throw TypeError(n)},Sa=(n,t,e)=>t in n?gs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ya=(n,t)=>gs(n,"name",{value:t,configurable:!0}),rl=n=>[,,,il((n==null?void 0:n[$a("metadata")])??null)],wa=["class","method","getter","setter","accessor","field","value","get","set"],rn=n=>n!==void 0&&typeof n!="function"?fe("Function expected"):n,ol=(n,t,e,i,s)=>({kind:wa[n],name:t,metadata:i,addInitializer:o=>e._?fe("Already initialized"):s.push(rn(o||null))}),al=(n,t)=>Sa(t,$a("metadata"),n[3]),Y=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},Ut=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=wa[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&sl(r<4?s:{get[e](){return $s(this,o)},set[e](_){return Ea(this,o,_)}},e));r?h&&r<4&&ya(o,(r>2?"set ":r>1?"get ":"")+e):ya(s,e);for(var T=i.length-1;T>=0;T--)u=ol(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>cl(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?$s:hl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>Ea(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?rn(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?fe("Object expected"):(rn(a=c.get)&&(p.get=a),rn(a=c.set)&&(p.set=a),rn(a=c.init)&&E.unshift(a));return r||al(n,s),p&&gs(s,e,p),h?r^4?o:p:s},Fn=(n,t,e)=>Sa(n,typeof t!="symbol"?t+"":t,e),vs=(n,t,e)=>t.has(n)||fe("Cannot "+e),cl=(n,t)=>Object(t)!==t?fe('Cannot use the "in" operator on this value'):n.has(t),$s=(n,t,e)=>(vs(n,t,"read from private field"),e?e.call(n):t.get(n)),xn=(n,t,e)=>t.has(n)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ea=(n,t,e,i)=>(vs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),hl=(n,t,e)=>(vs(n,t,"access private method"),e),Ca,ba,Ta,ka,Pa,Ma,Ss,Oa,R,ys,ws,Es,Cs;let La=0;const Aa=n=>{clearTimeout(La),La=setTimeout(()=>document.title=n)};function ll(n,t="",e=""){const i=kt.title||n;i&&i!==kt.defaultTitle?Aa(t+(Bn.title=i)+e):Aa(Bn.title=kt.defaultTitle)}Oa=[bt()];let Lt=class fc extends(Ss=J,Ma=[x],Pa=[x],ka=[Ne],Ta=[lt(t=>[t.inert])],ba=[Jt()],Ca=[Rt()],Ss){constructor(){super(...arguments),Fn(this,"prefix",Y(R,8,this)),Y(R,11,this),Fn(this,"suffix",Y(R,12,this)),Y(R,15,this),Fn(this,"inert",Y(R,16,this)),Y(R,19,this),xn(this,ys,Y(R,20,this,()=>!this.inert&&ht(kt,this.update))),Y(R,23,this),xn(this,ws,new MutationObserver(()=>this.update())),xn(this,Es,Y(R,24,this,()=>{$s(this,ws).observe(this,{characterData:!0,childList:!0,subtree:!0})})),Y(R,27,this),xn(this,Cs,Y(R,28,this,()=>{var t;return ll((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),l.html`${fc.title}`})),Y(R,31,this)}static setTitle(t){kt({title:t})}};R=rl(Ss),ys=new WeakMap,ws=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Ut(R,5,"prefix",Ma,Lt),Ut(R,5,"suffix",Pa,Lt),Ut(R,5,"inert",ka,Lt),Ut(R,21,"#connectStore",Ta,ys),Ut(R,21,"#obTextContent",ba,Es),Ut(R,21,"#content",Ca,Cs),Lt=Ut(R,0,"GemTitleElement",Oa,Lt),Fn(Lt,"title",document.title),Y(R,1,Lt);let Bn=Lt;customElements.define("gem-title",Bn);var dl=Object.create,bs=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Na=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},Ra=(n,t,e)=>t in n?bs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ia=(n,t)=>bs(n,"name",{value:t,configurable:!0}),_l=n=>[,,,dl((n==null?void 0:n[Na("metadata")])??null)],Ha=["class","method","getter","setter","accessor","field","value","get","set"],on=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,fl=(n,t,e,i,s)=>({kind:Ha[n],name:t,metadata:i,addInitializer:o=>e._?pe("Already initialized"):s.push(on(o||null))}),pl=(n,t)=>Ra(t,Na("metadata"),n[3]),gt=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},an=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=Ha[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&ul(r<4?s:{get[e](){return ks(this,o)},set[e](_){return Ga(this,o,_)}},e));r?h&&r<4&&Ia(o,(r>2?"set ":r>1?"get ":"")+e):Ia(s,e);for(var T=i.length-1;T>=0;T--)u=fl(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>ml(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?ks:gl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>Ga(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?on(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(on(a=c.get)&&(p.get=a),on(a=c.set)&&(p.set=a),on(a=c.init)&&E.unshift(a));return r||pl(n,s),p&&bs(s,e,p),h?r^4?o:p:s},Wa=(n,t,e)=>Ra(n,typeof t!="symbol"?t+"":t,e),Ts=(n,t,e)=>t.has(n)||pe("Cannot "+e),ml=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),ks=(n,t,e)=>(Ts(n,t,"read from private field"),e?e.call(n):t.get(n)),Ps=(n,t,e)=>t.has(n)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ga=(n,t,e,i)=>(Ts(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),gl=(n,t,e)=>(Ts(n,t,"access private method"),e),za,Va,Da,Ua,Ms,qa,B,Os,Fa,Ls,As;const vl=Nt`
|
|
31
|
+
:host(:where(:not([hidden]))) {
|
|
32
|
+
display: contents;
|
|
33
|
+
}
|
|
34
|
+
`;qa=[bt(),Zt(vl)];class qt extends(Ms=J,Ua=[x],Da=[U],Va=[lt()],za=[Rt()],Ms){constructor(){super(...arguments),Ps(this,Os),Wa(this,"html",gt(B,8,this)),gt(B,11,this),Wa(this,"styles",gt(B,12,this)),gt(B,15,this),Ps(this,Ls,gt(B,16,this,()=>{const t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(ks(this,Os,Fa)),()=>{this.shadowRoot.adoptedStyleSheets=t}})),gt(B,19,this),Ps(this,As,gt(B,20,this,()=>{this.shadowRoot.innerHTML=this.html})),gt(B,23,this)}}B=_l(Ms),Os=new WeakSet,Fa=function(){if(!this.styles)return[];if(typeof this.styles=="string"){const n=new CSSStyleSheet;return n.replaceSync(this.styles),[n]}else return[this.styles].flat().map(n=>n[mt].getStyle())},Ls=new WeakMap,As=new WeakMap,an(B,5,"html",Ua,qt),an(B,5,"styles",Da,qt),an(B,21,"#adoptStyles",Va,Ls),an(B,21,"#content",za,As),qt=an(B,0,"GemUnsafeElement",qa,qt),gt(B,1,qt),customElements.define("gem-unsafe",qt);var $l=Object.create,Ns=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,xa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},Ba=(n,t,e)=>t in n?Ns(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ka=(n,t)=>Ns(n,"name",{value:t,configurable:!0}),yl=n=>[,,,$l((n==null?void 0:n[xa("metadata")])??null)],ja=["class","method","getter","setter","accessor","field","value","get","set"],cn=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,wl=(n,t,e,i,s)=>({kind:ja[n],name:t,metadata:i,addInitializer:o=>e._?me("Already initialized"):s.push(cn(o||null))}),El=(n,t)=>Ba(t,xa("metadata"),n[3]),ot=(n,t,e,i)=>{for(var s=0,o=n[t>>1],a=o&&o.length;s<a;s++)t&1?o[s].call(e):i=o[s].call(e,i);return i},ge=(n,t,e,i,s,o)=>{var a,c,d,u,m,r=t&7,g=!!(t&8),h=!!(t&16),v=r>3?n.length+1:r?g?1:2:0,S=ja[r+5],E=r>3&&(n[v-1]=[]),P=n[v]||(n[v]=[]),p=r&&(!h&&!g&&(s=s.prototype),r<5&&(r>3||!h)&&Sl(r<4?s:{get[e](){return Is(this,o)},set[e](_){return Ja(this,o,_)}},e));r?h&&r<4&&Ka(o,(r>2?"set ":r>1?"get ":"")+e):Ka(s,e);for(var T=i.length-1;T>=0;T--)u=wl(r,e,d={},n[3],P),r&&(u.static=g,u.private=h,m=u.access={has:h?_=>Cl(s,_):_=>e in _},r^3&&(m.get=h?_=>(r^1?Is:bl)(_,s,r^4?o:p.get):_=>_[e]),r>2&&(m.set=h?(_,M)=>Ja(_,s,M,r^4?o:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(r?r<4?h?o:p[S]:r>4?void 0:{get:p.get,set:p.set}:s,u),d._=1,r^4||c===void 0?cn(c)&&(r>4?E.unshift(c):r?h?o=c:p[S]=c:s=c):typeof c!="object"||c===null?me("Object expected"):(cn(a=c.get)&&(p.get=a),cn(a=c.set)&&(p.set=a),cn(a=c.init)&&E.unshift(a));return r||El(n,s),p&&Ns(s,e,p),h?r^4?o:p:s},Kn=(n,t,e)=>Ba(n,typeof t!="symbol"?t+"":t,e),Rs=(n,t,e)=>t.has(n)||me("Cannot "+e),Cl=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),Is=(n,t,e)=>(Rs(n,t,"read from private field"),e?e.call(n):t.get(n)),Qa=(n,t,e)=>t.has(n)?me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ja=(n,t,e,i)=>(Rs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),bl=(n,t,e)=>(Rs(n,t,"access private method"),e),Ya,Za,Xa,tc,ec,Hs,nc,V,Ws,Gs;const Tl=Nt`
|
|
48
35
|
:host(:where(:not([hidden]))) {
|
|
49
36
|
position: relative;
|
|
50
37
|
display: inline-flex;
|
|
@@ -54,11 +41,4 @@
|
|
|
54
41
|
width: 100%;
|
|
55
42
|
height: 100%;
|
|
56
43
|
}
|
|
57
|
-
`,ha=new Map;ca=[bt(),xe(Lh)];class mt extends(rs=F,aa=[U],oa=[B],ra=[B],sa=[De],ia=[zt()],rs){constructor(){super(...arguments),Gn(this,"selector",at(V,8,this)),at(V,11,this),Gn(this,"root",at(V,12,this)),at(V,15,this),Gn(this,"element",at(V,16,this)),at(V,19,this),Gn(this,"active",at(V,20,this)),at(V,23,this),ea(this,os,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=ha.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,ha.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),ea(this,as,at(V,24,this,()=>st`${ss(this,os).call(this)}<slot></slot>`)),at(V,27,this)}}V=Ph(rs),os=new WeakMap,as=new WeakMap,de(V,5,"selector",aa,mt),de(V,5,"root",oa,mt),de(V,5,"element",ra,mt),de(V,5,"active",sa,mt),de(V,21,"#content",ia,as),mt=de(V,0,"GemUseElement",ca,mt),at(V,1,mt),customElements.define("gem-use",mt);var Nh=Object.create,cs=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,la=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),ue=n=>{throw TypeError(n)},da=(n,t,e)=>t in n?cs(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ua=(n,t)=>cs(n,"name",{value:t,configurable:!0}),Ih=n=>[,,,Nh((n==null?void 0:n[la("metadata")])??null)],_a=["class","method","getter","setter","accessor","field","value","get","set"],Xe=n=>n!==void 0&&typeof n!="function"?ue("Function expected"):n,Hh=(n,t,e,i,s)=>({kind:_a[n],name:t,metadata:i,addInitializer:r=>e._?ue("Already initialized"):s.push(Xe(r||null))}),Wh=(n,t)=>da(t,la("metadata"),n[3]),Ut=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Vn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=_a[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Rh(o<4?s:{get[e](){return pa(this,r)},set[e](_){return ma(this,r,_)}},e));o?h&&o<4&&ua(r,(o>2?"set ":o>1?"get ":"")+e):ua(s,e);for(var T=i.length-1;T>=0;T--)u=Hh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>zh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?pa:Vh)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>ma(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?Xe(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?ue("Object expected"):(Xe(a=c.get)&&(p.get=a),Xe(a=c.set)&&(p.set=a),Xe(a=c.init)&&E.unshift(a));return o||Wh(n,s),p&&cs(s,e,p),h?o^4?r:p:s},fa=(n,t,e)=>da(n,typeof t!="symbol"?t+"":t,e),hs=(n,t,e)=>t.has(n)||ue("Cannot "+e),zh=(n,t)=>Object(t)!==t?ue('Cannot use the "in" operator on this value'):n.has(t),pa=(n,t,e)=>(hs(n,t,"read from private field"),e?e.call(n):t.get(n)),Gh=(n,t,e)=>t.has(n)?ue("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),ma=(n,t,e,i)=>(hs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Vh=(n,t,e)=>(hs(n,t,"access private method"),e),ga,va,$a,ls,ya,et,ds;ya=[bt()];class qt extends(ls=F,$a=[U],va=[U],ga=[zt()],ls){constructor(){super(...arguments),fa(this,"content",Ut(et,8,this)),Ut(et,11,this),fa(this,"contentcss",Ut(et,12,this)),Ut(et,15,this),Gh(this,ds,Ut(et,16,this,()=>{const t=`
|
|
58
|
-
<style>
|
|
59
|
-
:host(:where(:not([hidden]))) {
|
|
60
|
-
display: contents;
|
|
61
|
-
}
|
|
62
|
-
${this.contentcss}
|
|
63
|
-
</style>
|
|
64
|
-
`;this.shadowRoot.innerHTML=this.content+t.trim()})),Ut(et,19,this)}}et=Ih(ls),ds=new WeakMap,Vn(et,5,"content",$a,qt),Vn(et,5,"contentcss",va,qt),Vn(et,21,"#content",ga,ds),qt=Vn(et,0,"GemUnsafeElement",ya,qt),Ut(et,1,qt),customElements.define("gem-unsafe",qt);var Dh=Object.create,us=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,wa=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),_e=n=>{throw TypeError(n)},Sa=(n,t,e)=>t in n?us(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ea=(n,t)=>us(n,"name",{value:t,configurable:!0}),Uh=n=>[,,,Dh((n==null?void 0:n[wa("metadata")])??null)],Ca=["class","method","getter","setter","accessor","field","value","get","set"],tn=n=>n!==void 0&&typeof n!="function"?_e("Function expected"):n,qh=(n,t,e,i,s)=>({kind:Ca[n],name:t,metadata:i,addInitializer:r=>e._?_e("Already initialized"):s.push(tn(r||null))}),ba=(n,t)=>Sa(t,wa("metadata"),n[3]),Mt=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Dn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Ca[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&xh(o<4?s:{get[e](){return Ot(this,r)},set[e](_){return fs(this,r,_)}},e));o?h&&o<4&&Ea(r,(o>2?"set ":o>1?"get ":"")+e):Ea(s,e);for(var T=i.length-1;T>=0;T--)u=qh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>Fh(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?Ot:Bh)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>fs(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?tn(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?_e("Object expected"):(tn(a=c.get)&&(p.get=a),tn(a=c.set)&&(p.set=a),tn(a=c.init)&&E.unshift(a));return o||ba(n,s),p&&us(s,e,p),h?o^4?r:p:s},Ta=(n,t,e)=>Sa(n,typeof t!="symbol"?t+"":t,e),_s=(n,t,e)=>t.has(n)||_e("Cannot "+e),Fh=(n,t)=>Object(t)!==t?_e('Cannot use the "in" operator on this value'):n.has(t),Ot=(n,t,e)=>(_s(n,t,"read from private field"),e?e.call(n):t.get(n)),fe=(n,t,e)=>t.has(n)?_e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),fs=(n,t,e,i)=>(_s(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),Bh=(n,t,e)=>(_s(n,t,"access private method"),e),Pa,ka,Ma,Oa,ps,Q,ms,Aa,gs,xn,vs,en,$s;const Kh="gem-reflect-start",La="gem-reflect-end",Na=n=>new Comment(n),jh=n=>{const t=[];let e=n;for(;e&&(t.push(e),e.nodeValue!==La);)e=e.nextSibling;return t};class nn extends(ps=F,Oa=[U],Ma=[B],ka=[An()],Pa=[pt(t=>[t.target])],ps){constructor(){super(...arguments),fe(this,ms),Ta(this,"method",Mt(Q,8,this)),Mt(Q,11,this),Ta(this,"target",Mt(Q,12,this,document.head)),Mt(Q,15,this),fe(this,gs,Mt(Q,16,this,()=>{this.hidden=!0,this.dataset.gemReflect=""})),Mt(Q,19,this),fe(this,xn,Na(Kh)),fe(this,vs,Na(La)),fe(this,en),fe(this,$s,Mt(Q,20,this,()=>((Ot(this,en)||[Ot(this,xn),...this.childNodes,Ot(this,vs)]).forEach((t,e,i)=>{const s=i[e-1];s?s.after(t):this.target[Ot(this,ms,Aa)](t)}),()=>{fs(this,en,jh(Ot(this,xn))),Ot(this,en).forEach(t=>t.remove())}))),Mt(Q,23,this)}}Q=Uh(ps),ms=new WeakSet,Aa=function(){return this.method||"append"},gs=new WeakMap,xn=new WeakMap,vs=new WeakMap,en=new WeakMap,$s=new WeakMap,Dn(Q,5,"method",Oa,nn),Dn(Q,5,"target",Ma,nn),Dn(Q,21,"#init",ka,gs),Dn(Q,21,"#changeTarget",Pa,$s),ba(Q,nn),customElements.define("gem-reflect",nn);var Qh=Object.create,ys=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Ra=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),pe=n=>{throw TypeError(n)},Ia=(n,t,e)=>t in n?ys(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ha=(n,t)=>ys(n,"name",{value:t,configurable:!0}),Yh=n=>[,,,Qh((n==null?void 0:n[Ra("metadata")])??null)],Wa=["class","method","getter","setter","accessor","field","value","get","set"],sn=n=>n!==void 0&&typeof n!="function"?pe("Function expected"):n,Zh=(n,t,e,i,s)=>({kind:Wa[n],name:t,metadata:i,addInitializer:r=>e._?pe("Already initialized"):s.push(sn(r||null))}),Xh=(n,t)=>Ia(t,Ra("metadata"),n[3]),rn=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},ws=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=Wa[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&Jh(o<4?s:{get[e](){return za(this,r)},set[e](_){return Va(this,r,_)}},e));o?h&&o<4&&Ha(r,(o>2?"set ":o>1?"get ":"")+e):Ha(s,e);for(var T=i.length-1;T>=0;T--)u=Zh(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>tl(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?za:el)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>Va(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?sn(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?pe("Object expected"):(sn(a=c.get)&&(p.get=a),sn(a=c.set)&&(p.set=a),sn(a=c.init)&&E.unshift(a));return o||Xh(n,s),p&&ys(s,e,p),h?o^4?r:p:s},Un=(n,t,e)=>Ia(n,typeof t!="symbol"?t+"":t,e),Ss=(n,t,e)=>t.has(n)||pe("Cannot "+e),tl=(n,t)=>Object(t)!==t?pe('Cannot use the "in" operator on this value'):n.has(t),za=(n,t,e)=>(Ss(n,t,"read from private field"),e?e.call(n):t.get(n)),Ga=(n,t,e)=>t.has(n)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Va=(n,t,e,i)=>(Ss(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),el=(n,t,e)=>(Ss(n,t,"access private method"),e);const qn=Symbol("open mark");function nl(n){var t,e,i,s,r,a,c;const l=Symbol();s=[bt(),qe({role:"alertdialog",ariaModal:"true"})];let u=class sc extends(i=F,e=[ne()],t=[ne()],i){constructor(){super(...arguments),Un(this,"label",""),Ga(this,a,rn(r,8,this,()=>dt(N.store,this.update))),rn(r,11,this),Ga(this,c,rn(r,12,this,()=>dt(sc.store,this.update))),rn(r,15,this)}static get isOpen(){return this.store[qn]}static open(g){const h=new this;this.instance=h,this.inertStore=[...document.body.children].filter(y=>!y.inert),this.inertStore.forEach(y=>y.inert=!0),document.body.append(h);const v=()=>this.store({[qn]:!0,...g});return setTimeout(()=>{v(),N.push({title:h.label,open:v,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),l}static close(){return N.back(),l}static closeHandle(){var g;return this.inertStore.forEach(h=>h.inert=!1),(g=this.instance)==null||g.remove(),this.store({[qn]:!1,...n}),l}static shouldClose(){return!0}};return r=Yh(i),a=new WeakMap,c=new WeakMap,ws(r,21,"#connectHistory",e,a),ws(r,21,"#connectStore",t,c),u=ws(r,0,"ModalElement",s,u),Un(u,"inertStore",[]),Un(u,"instance",null),Un(u,"store",St({[qn]:!1,...n})),rn(r,1,u),u}var il=Object.create,Es=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,Da=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n),me=n=>{throw TypeError(n)},xa=(n,t,e)=>t in n?Es(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ua=(n,t)=>Es(n,"name",{value:t,configurable:!0}),rl=n=>[,,,il((n==null?void 0:n[Da("metadata")])??null)],qa=["class","method","getter","setter","accessor","field","value","get","set"],on=n=>n!==void 0&&typeof n!="function"?me("Function expected"):n,ol=(n,t,e,i,s)=>({kind:qa[n],name:t,metadata:i,addInitializer:r=>e._?me("Already initialized"):s.push(on(r||null))}),al=(n,t)=>xa(t,Da("metadata"),n[3]),Ft=(n,t,e,i)=>{for(var s=0,r=n[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(e):i=r[s].call(e,i);return i},Fn=(n,t,e,i,s,r)=>{var a,c,l,u,m,o=t&7,g=!!(t&8),h=!!(t&16),v=o>3?n.length+1:o?g?1:2:0,y=qa[o+5],E=o>3&&(n[v-1]=[]),k=n[v]||(n[v]=[]),p=o&&(!h&&!g&&(s=s.prototype),o<5&&(o>3||!h)&&sl(o<4?s:{get[e](){return ct(this,r)},set[e](_){return cn(this,r,_)}},e));o?h&&o<4&&Ua(r,(o>2?"set ":o>1?"get ":"")+e):Ua(s,e);for(var T=i.length-1;T>=0;T--)u=ol(o,e,l={},n[3],k),o&&(u.static=g,u.private=h,m=u.access={has:h?_=>cl(s,_):_=>e in _},o^3&&(m.get=h?_=>(o^1?ct:hl)(_,s,o^4?r:p.get):_=>_[e]),o>2&&(m.set=h?(_,M)=>cn(_,s,M,o^4?r:p.set):(_,M)=>_[e]=M)),c=(0,i[T])(o?o<4?h?r:p[y]:o>4?void 0:{get:p.get,set:p.set}:s,u),l._=1,o^4||c===void 0?on(c)&&(o>4?E.unshift(c):o?h?r=c:p[y]=c:s=c):typeof c!="object"||c===null?me("Object expected"):(on(a=c.get)&&(p.get=a),on(a=c.set)&&(p.set=a),on(a=c.init)&&E.unshift(a));return o||al(n,s),p&&Es(s,e,p),h?o^4?r:p:s},an=(n,t,e)=>xa(n,typeof t!="symbol"?t+"":t,e),Cs=(n,t,e)=>t.has(n)||me("Cannot "+e),cl=(n,t)=>Object(t)!==t?me('Cannot use the "in" operator on this value'):n.has(t),ct=(n,t,e)=>(Cs(n,t,"read from private field"),e?e.call(n):t.get(n)),ge=(n,t,e)=>t.has(n)?me("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),cn=(n,t,e,i)=>(Cs(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e),hl=(n,t,e)=>(Cs(n,t,"access private method"),e),Fa,Ba,Ka,bs,ja,nt,hn,ln,dn,Ts,Bn,Ps;const ks=Symbol();ja=[Ue(N.store),qe({role:"dialog",ariaModal:"true"})];class ve extends(bs=F,Ka=[U],Ba=[De],Fa=[An()],bs){constructor(){super(...arguments),an(this,"label",Ft(nt,8,this)),Ft(nt,11,this),an(this,"opened",Ft(nt,12,this)),Ft(nt,15,this),ge(this,hn),ge(this,ln),ge(this,dn,[]),ge(this,Ts,()=>{var t;this.inert=!0,ct(this,dn).forEach(e=>e.inert=!1),ct(this,hn)?ct(this,hn).before(this):ct(this,ln)&&((t=ct(this,ln))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),ge(this,Bn,()=>{this.hidden=!1,this.inert=!1,cn(this,hn,this.nextSibling),cn(this,ln,this.parentElement||this.getRootNode()),cn(this,dn,[...document.body.children].filter(t=>!t.inert)),ct(this,dn).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),ge(this,Ps,Ft(nt,16,this,()=>this.inert=!0)),Ft(nt,19,this),an(this,"open",()=>{if(!this.opened)return ct(this,Bn).call(this),N.push({title:this.label,open:ct(this,Bn),close:ct(this,Ts),shouldClose:this.shouldClose}),ks}),an(this,"close",()=>(N.back(),ks)),an(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),ks))}shouldClose(){return!0}}nt=rl(bs),hn=new WeakMap,ln=new WeakMap,dn=new WeakMap,Ts=new WeakMap,Bn=new WeakMap,Ps=new WeakMap,Fn(nt,5,"label",Ka,ve),Fn(nt,5,"opened",Ba,ve),Fn(nt,21,"#init",Fa,Ps),ve=Fn(nt,0,"GemDialogBaseElement",ja,ve),Ft(nt,1,ve);class Qa{constructor(t){$(this,"_type");$(this,"info",(...t)=>{console.log(`[${this._type}]:`,...t)});$(this,"warn",(...t)=>{console.warn(`[${this._type}]:`,...t)});$(this,"error",(...t)=>{console.error(`[${this._type}]:`,...t)});this._type=t}}const Ja=new Qa("GEM"),ll=/\$\d(?:<[^>]*>)?/,dl=/\$(\d)(<([^>]*)>)?/g,ul=3;function Ya(n,...t){const e=n.split(ll),i=[];let s;for(;s=dl.exec(n);){const r=s[ul],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(r):c)}return st(e,...i)}const un=new Set,As=class As{constructor(t){C(this,W);$(this,"resources");$(this,"fallbackLanguage");$(this,"currentLanguage");$(this,"cache");$(this,"cachePrefix","gem-i18n");$(this,"urlParamsType");$(this,"urlParamsName");$(this,"onChange");$(this,"replace",({path:t})=>this.setLanguage(t));$(this,"getParams",()=>({path:this.currentLanguage}));C(this,vn,!0);if(!t.resources[t.fallbackLanguage])throw new ft("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=f(this,W,rc)||this.currentLanguage||f(this,W,oc);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");e=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}e?(A(this,W,e,ti),this.setLanguage(e)):this.resetLanguage(),A(this,vn,!1)}get(t,...e){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],r=i[t]||s[t],a=(r==null?void 0:r.message)||r||`[${t}]`;return e.length?Ya(a,...e):a}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of e){const s=t.find(r=>r===i||i.startsWith(`${r}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var s,r;f(this,W,$n)&&un.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return Ja.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,l=localStorage.getItem(c),u=async()=>{const m=await(await fetch(i)).json();if(this.cache){for(let o=0;o<localStorage.length;o++){const g=localStorage.key(o);g.startsWith(a)&&localStorage.removeItem(g)}localStorage.setItem(c,JSON.stringify(m))}return m};if(l)try{e=JSON.parse(l)}catch{e=await u()}else e=await u()}else e=i;if(this.resources[t]=e,!f(this,vn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[ze])==null||s.call(c),a.push(...[...c.children,...((r=c.shadowRoot)==null?void 0:r.children)||[]].reverse())}}return t!==this.currentLanguage&&A(this,W,t,ti),this.cache===!0&&this.setCache(),t}resetLanguage(){return f(this,W,$n)&&un.forEach(t=>t.resetLanguage()),A(this,W,this.fallbackLanguage,ti),this.cache&&localStorage.removeItem(f(this,W,Xn)),this.setLanguage(this.detectLanguage())}setCache(){f(this,W,$n)&&un.forEach(t=>t.setCache()),localStorage.setItem(f(this,W,Xn),this.currentLanguage)}createSubModule(t,e){const i=new As({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return un.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};W=new WeakSet,Xn=function(){return`${this.cachePrefix}:current`},rc=function(){const{hostname:t,pathname:e,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return r in this.resources?r:""}},oc=function(){return this.cache&&localStorage.getItem(f(this,W,Xn))||""},$n=function(){return!un.has(this)},ti=function(t){var e;f(this,W,$n)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},vn=new WeakMap;let Ms=As;const Y=n=>window.matchMedia(n).matches,_l={PRINT:"print",get isPrint(){return Y(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Y(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Y(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Y(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Y(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Y(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Y(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Y(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Y(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Y(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Y(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Y(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Y(this.WIDTHSCREEN)}},fl=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Za(n={}){const{origin:t=location.origin,base:e="",appendHeaders:i=()=>({}),transformInput:s=o=>o,transformOutput:r=o=>o,...a}=n,c=o=>o instanceof FormData||o instanceof Blob||o instanceof fl||o instanceof URLSearchParams||o instanceof ReadableStream||o instanceof ArrayBuffer?o:typeof o=="object"?JSON.stringify(o):o,l=(o,g)=>{if(new URL(o,location.origin).pathname!==o)throw new ft("`path` format is incorrect");const h=new URLSearchParams(g).toString();return`${t}${e}${o}${h?"?":""}${h}`},u=o=>{if(!o)return{};if(o instanceof Headers)return Object.fromEntries(o);const g=Array.isArray(o)?o:Object.entries(o);return Object.fromEntries(g.map(([h,v])=>[h.toLowerCase(),v]))},m=async(o,g={})=>{const h=new Request(o,{...a,...g,headers:new Headers({"content-type":"application/json",...u(a.headers),...u(g.headers)})}),v=await fetch(h);if(v.status===0)throw new Error("Request fail");if(v.status>=500)throw new Error(v.statusText);const y=h.headers.get("content-type"),E=v.status>=400;try{let k;if(y.includes("json")?k=await v.json():y.includes("octet-stream")?k=await v.arrayBuffer():k=await v.text(),E)throw new Error(v.statusText,{cause:k});return r(k,h)}catch{throw new Error("Parse error")}};return{request:m,get(o,g){const h=s(g);return m(l(o,h),{method:"GET",headers:i(h)})},del(o,g){const h=s(g);return m(l(o,h),{method:"DELETE",headers:i(h)})},put(o,g){const h=s(g);return m(l(o),{method:"PUT",headers:i(h),body:c(h)})},post(o,g){const h=s(g);return m(l(o),{method:"POST",headers:i(h),body:c(h)})}}}const{request:pl,del:ml,get:gl,post:vl,put:$l}=Za(),Xa=new WeakMap,tc=new WeakMap;function yl(n){return Xa.get(n)}function Os(n){return tc.get(n)}function Kn(n,t={}){const e=Cn(),i=Xt({})[Et],s=St(n),r=new Proxy(Ie({[Et]:i},c=>s(c)),{get(c,l){if(!c[l]){const[u,m,o]=l.match(/^(\w*Color)(\d+)$/)||[];m&&(c[l]=`oklch(from ${c[m]} calc(l - ${(Number(o)-400)/1e3}) c h)`)}return c[l]}});tc.set(r,t),Xa.set(r,s);const a=()=>{let c="";Object.keys(s).forEach(l=>{t[l]||(t[l]=`--${Ht(l)}-${e}`,r[l]=`var(${t[l]})`),c+=`${t[l]}:${s[l]};`}),i.setContent(`:scope,:host{${c}}`)};return a(),dt(s,()=>{a(),i.updateStyle()}),r}function ec(n){return Kn(n)}function wl(n){const t=ec(n);return document.adoptedStyleSheets.push(t[Et].getStyle()),t}function Sl(n,t){return Kn(t,Os(n))}function El(n){const t=Kn(n),e=Os(t);return Ie(t,s=>(r,{addInitializer:a,access:c})=>{a(function(){const l=Kn({...n},e);this.internals.sheets.push(l[Et].getStyle(this)),this.memo(()=>l(c.get(this).apply(this)),s&&(()=>s(this)))})})}d.GemActiveLinkElement=Dt,d.GemDialogBaseElement=ve,d.GemElement=F,d.GemError=ft,d.GemLightRouteElement=I,d.GemLinkElement=G,d.GemReflectElement=nn,d.GemRouteElement=oe,d.GemTitleElement=he,d.GemUnsafeElement=qt,d.GemUseElement=mt,d.I18n=Ms,d.LinkedList=Zs,d.Logger=Qa,d.PropProxyMap=Xs,d.QueryString=Zt,d.SheetToken=Et,d.TemplateResult=wn,d.UpdateToken=ze,d._RenderErrorEvent=Pn,d._StoreListenerMap=He,d.absoluteLocation=hi,d.addListener=li,d.addMicrotask=wt,d.adoptedStyle=xe,d.aria=qe,d.async=kr,d.attribute=U,d.basePathStore=Hr,d.boolattribute=Ve,d.camelToKebabCase=Ht,d.classMap=er,d.cleanObject=bn,d.connect=dt,d.connectStore=Ue,d.createDecoratorTheme=El,d.createHistoryParams=ao,d.createModalClass=nl,d.createOverrideTheme=Sl,d.createPath=Hn,d.createRef=Js,d.createScopedTheme=ec,d.createStore=St,d.createTheme=wl,d.createUpdater=Ie,d.css=Xt,d.customElement=Mr,d.del=ml,d.directive=ui,d.effect=pt,d.emitter=ie,d.exportPartsMap=Nc,d.fallback=Er,d.get=gl,d.getThemeProps=Os,d.getThemeStore=yl,d.globalemitter=Tr,d.history=N,d.html=st,d.initRequest=Za,d.isArrayChange=tr,d.kebabToCamelCase=Oc,d.light=yi,d.logger=Ja,d.matchPath=Ii,d.mathml=js,d.mediaQuery=_l,d.memo=vi,d.mounted=ne,d.numattribute=wr,d.objectMapToString=Tn,d.part=$i,d.partMap=Lc,d.post=vl,d.property=B,d.put=$l,d.randomStr=Cn,d.raw=di,d.render=En,d.repeat=sr,d.request=pl,d.shadow=bt,d.slot=br,d.splice=Ya,d.state=De,d.styleMap=Ac,d.styled=Mc,d.svg=Ks,d.template=zt,d.titleStore=Tt,d.unmounted=Sr,d.version=_r,d.willMount=An,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
44
|
+
`,ic=new Map;nc=[bt(),Zt(Tl)];class vt extends(Hs=J,ec=[x],tc=[U],Xa=[U],Za=[Re],Ya=[Rt()],Hs){constructor(){super(...arguments),Kn(this,"selector",ot(V,8,this)),ot(V,11,this),Kn(this,"root",ot(V,12,this)),ot(V,15,this),Kn(this,"element",ot(V,16,this)),ot(V,19,this),Kn(this,"active",ot(V,20,this)),ot(V,23,this),Qa(this,Ws,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let e=ic.get(t);return e||(e=document.createElement("template"),e.innerHTML=t,ic.set(t,e)),e.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)}),Qa(this,Gs,ot(V,24,this,()=>l.html`${Is(this,Ws).call(this)}<slot></slot>`)),ot(V,27,this)}}V=yl(Hs),Ws=new WeakMap,Gs=new WeakMap,ge(V,5,"selector",ec,vt),ge(V,5,"root",tc,vt),ge(V,5,"element",Xa,vt),ge(V,5,"active",Za,vt),ge(V,21,"#content",Ya,Gs),vt=ge(V,0,"GemUseElement",nc,vt),ot(V,1,vt),customElements.define("gem-use",vt);class sc{constructor(t){C(this,ke);C(this,pn);$(this,"info",(...t)=>{console.log(f(this,ke,ti),...t)});$(this,"warn",(...t)=>{console.warn(f(this,ke,ti),...t)});$(this,"error",(...t)=>{console.error(f(this,ke,ti),...t)});O(this,pn,t)}}pn=new WeakMap,ke=new WeakSet,ti=function(){return`[${f(this,pn)}]`};const rc=new sc("GEM"),kl=/\$\d(?:<[^>]*>)?/,Pl=/\$(\d)(<([^>]*)>)?/g,Ml=3;function oc(n,...t){const e=n.split(kl),i=[];let s;for(;s=Pl.exec(n);){const o=s[Ml],a=Number(s[1])-1,c=t[a];i.push(typeof c=="function"?c(o):c)}return l.html(e,...i)}const hn=new Set,Ds=class Ds{constructor(t){C(this,z);$(this,"resources");$(this,"fallbackLanguage");$(this,"currentLanguage");$(this,"cache");$(this,"cachePrefix","gem-i18n");$(this,"urlParamsType");$(this,"urlParamsName");$(this,"onChange");$(this,"replace",({path:t})=>this.setLanguage(t));$(this,"getParams",()=>({path:this.currentLanguage}));C(this,mn,!0);if(!t.resources[t.fallbackLanguage])throw new pt("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=f(this,z,pc)||this.currentLanguage||f(this,z,mc);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");e=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}e?(O(this,z,e,ni),this.setLanguage(e)):this.resetLanguage(),O(this,mn,!1)}get(t,...e){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],o=i[t]||s[t],a=(o==null?void 0:o.message)||o||`[${t}]`;return e.length?oc(a,...e):a}detectLanguage(){const t=Object.keys(this.resources),e=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of e){const s=t.find(o=>o===i||i.startsWith(`${o}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var s,o;f(this,z,gn)&&hn.forEach(async a=>await a.setLanguage(t));let e;const i=this.resources[t];if(!i)return rc.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,c=`${a}${i}`,d=localStorage.getItem(c),u=async()=>{const m=await(await fetch(i)).json();if(this.cache){for(let r=0;r<localStorage.length;r++){const g=localStorage.key(r);g.startsWith(a)&&localStorage.removeItem(g)}localStorage.setItem(c,JSON.stringify(m))}return m};if(d)try{e=JSON.parse(d)}catch{e=await u()}else e=await u()}else e=i;if(this.resources[t]=e,!f(this,mn)){const a=[document.documentElement];for(;a.length;){const c=a.pop();(s=c[Le])==null||s.call(c),a.push(...[...c.children,...((o=c.shadowRoot)==null?void 0:o.children)||[]].reverse())}}return t!==this.currentLanguage&&O(this,z,t,ni),this.cache===!0&&this.setCache(),t}resetLanguage(){return f(this,z,gn)&&hn.forEach(t=>t.resetLanguage()),O(this,z,this.fallbackLanguage,ni),this.cache&&localStorage.removeItem(f(this,z,ei)),this.setLanguage(this.detectLanguage())}setCache(){f(this,z,gn)&&hn.forEach(t=>t.setCache()),localStorage.setItem(f(this,z,ei),this.currentLanguage)}createSubModule(t,e){const i=new Ds({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return hn.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};z=new WeakSet,ei=function(){return`${this.cachePrefix}:current`},pc=function(){const{hostname:t,pathname:e,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return e.split("/")[1];default:{const o=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return o in this.resources?o:""}}},mc=function(){return this.cache&&localStorage.getItem(f(this,z,ei))||""},gn=function(){return!hn.has(this)},ni=function(t){var e;f(this,z,gn)&&(document.documentElement.lang=t),this.currentLanguage=t,(e=this.onChange)==null||e.call(this,t)},mn=new WeakMap;let zs=Ds;const Z=n=>matchMedia(n).matches,Ol={PRINT:"print",get isPrint(){return Z(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Z(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Z(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Z(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Z(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Z(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Z(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Z(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Z(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Z(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Z(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Z(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Z(this.WIDTHSCREEN)}},Ll=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function ac(n={}){const{origin:t=location.origin,base:e="",appendHeaders:i=()=>({}),transformInput:s=r=>r,transformOutput:o=r=>r,...a}=n,c=r=>r instanceof FormData||r instanceof Blob||r instanceof Ll||r instanceof URLSearchParams||r instanceof ReadableStream||r instanceof ArrayBuffer?r:typeof r=="object"?JSON.stringify(r):r,d=(r,g)=>{if(new URL(r,location.origin).pathname!==r)throw new pt("`path` format is incorrect");const h=new URLSearchParams(g).toString();return`${t}${e}${r}${h?"?":""}${h}`},u=r=>{if(!r)return{};if(r instanceof Headers)return Object.fromEntries(r);const g=Array.isArray(r)?r:Object.entries(r);return Object.fromEntries(g.map(([h,v])=>[h.toLowerCase(),v]))},m=async(r,g={})=>{const h=new Request(r,{...a,...g,headers:new Headers({"content-type":"application/json",...u(a.headers),...u(g.headers)})}),v=await fetch(h);if(v.status===0)throw new Error("Request fail");if(v.status>=500)throw new Error(v.statusText);const S=h.headers.get("content-type"),E=v.status>=400;try{let P;if(S.includes("json")?P=await v.json():S.includes("octet-stream")?P=await v.arrayBuffer():P=await v.text(),E)throw new Error(v.statusText,{cause:P});return o(P,h)}catch{throw new Error("Parse error")}};return{request:m,get(r,g){const h=s(g);return m(d(r,h),{method:"GET",headers:i(h)})},del(r,g){const h=s(g);return m(d(r,h),{method:"DELETE",headers:i(h)})},put(r,g){const h=s(g);return m(d(r),{method:"PUT",headers:i(h),body:c(h)})},post(r,g){const h=s(g);return m(d(r),{method:"POST",headers:i(h),body:c(h)})}}}const{request:Al,del:Nl,get:Rl,post:Il,put:Hl}=ac(),cc=new WeakMap,hc=new WeakMap;function Wl(n){return cc.get(n)}function Vs(n){return hc.get(n)}function jn(n,t={}){const e=Sn(),i=Nt({})[mt],s=Et(n),o=new Proxy(Me({[mt]:i},c=>s(c)),{get(c,d){if(!c[d]){const[u,m,r]=d.match(/^(\w*Color)(\d+)$/)||[];m&&(c[d]=`oklch(from ${c[m]} calc(l - ${(Number(r)-400)/1e3}) c h)`)}return c[d]}});hc.set(o,t),cc.set(o,s);const a=()=>{let c="";Object.keys(s).forEach(d=>{t[d]||(t[d]=`--${At(d)}-${e}`,o[d]=`var(${t[d]})`),c+=`${t[d]}:${s[d]};`}),i.setContent(`&,:host{${c}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),o}function lc(n){return jn(n)}function Gl(n){const t=lc(n);return document.adoptedStyleSheets.push(t[mt].getStyle()),t}function zl(n,t){return jn(t,Vs(n))}function Vl(n){const t=jn(n),e=Vs(t);return Me(t,s=>(o,{addInitializer:a,access:c})=>{a(function(){const d=jn({...n},e);this.internals.sheets.push(d[mt].getStyle(this,!0)),this.memo(()=>d(c.get(this).apply(this)),s&&(()=>s(this)))})})}l.GemActiveLinkElement=Dt,l.GemDialogBaseElement=re,l.GemElement=J,l.GemError=pt,l.GemLightRouteElement=H,l.GemLinkElement=cs,l.GemReflectElement=sn,l.GemRouteElement=he,l.GemTitleElement=Bn,l.GemUnsafeElement=qt,l.GemUseElement=vt,l.I18n=zs,l.LinkedList=Bs,l.Logger=sc,l.PropProxyMap=Ks,l.QueryString=jt,l.SheetToken=mt,l.TemplateResult=wi,l.UpdateToken=Le,l._RenderErrorEvent=En,l._StoreListenerMap=Oe,l.absoluteLocation=si,l.addListener=ri,l.addMicrotask=ft,l.adoptedStyle=Zt,l.aria=He,l.async=mr,l.attribute=x,l.basePathStore=Fr,l.boolattribute=Ne,l.camelToKebabCase=At,l.classMap=Qs,l.cleanObject=yn,l.connect=ht,l.connectStore=Ie,l.createDecoratorTheme=Vl,l.createHistoryParams=Lo,l.createModalClass=Nh,l.createOverrideTheme=zl,l.createPath=Dn,l.createRef=oh,l.createScopedTheme=lc,l.createStore=Et,l.createTheme=Gl,l.createUpdater=Me,l.css=Nt,l.customElement=gr,l.del=Nl,l.directive=Ir,l.effect=lt,l.emitter=Yt,l.exportPartsMap=Ec,l.fallback=dr,l.get=Rl,l.getThemeProps=Vs,l.getThemeStore=Wl,l.globalemitter=fr,l.history=N,l.initRequest=ac,l.isArrayChange=js,l.kebabToCamelCase=Sc,l.light=gi,l.logger=rc,l.matchPath=Ji,l.mathml=Yc,l.mediaQuery=Ol,l.memo=pi,l.mounted=Jt,l.numattribute=hr,l.objectMapToString=wn,l.part=mi,l.partMap=wc,l.post=Il,l.property=U,l.put=Hl,l.randomStr=Sn,l.raw=$n,l.repeat=ph,l.request=Al,l.setEngine=oi,l.shadow=bt,l.slot=_r,l.splice=oc,l.state=Re,l.styleMap=yc,l.styled=$c,l.svg=Jc,l.template=Rt,l.titleStore=kt,l.unmounted=lr,l.version=Rr,l.willMount=Pn,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,KAAK,eAAW,CAAC;AAEvB;;;GAGG;AACH,8BAEsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAuCvB,YAAY;IACZ,IAAI,iCAUF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,eAGH;IAEF;;;;;OAKG;IACH,UAAU,eAIR;CACH"}
|
package/elements/base/dialog.js
CHANGED
|
@@ -32,9 +32,9 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import {
|
|
36
|
-
import { attribute, state, connectStore, aria, willMount } from '../../lib/decorators';
|
|
35
|
+
import { aria, attribute, connectStore, state, willMount } from '../../lib/decorators';
|
|
37
36
|
import { history } from '../../lib/history';
|
|
37
|
+
import { GemElement } from '../../lib/reactive';
|
|
38
38
|
const final = Symbol();
|
|
39
39
|
/**
|
|
40
40
|
* 在模版中声明的 dialog,使用 `open` 方法 打开;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAEvB;;;GAGG;IAGmB,oBAAoB;4BAFzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAC3B,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;;;;sBACO,UAAU;;;;;;;;;;oCAAlB,SAAQ,WAAU;;;;iCAC1D,SAAS;kCACT,KAAK;wCAoCL,SAAS,EAAE;YArCD,iKAAA,KAAK,6BAAL,KAAK,qFAAS;YAClB,oKAAA,MAAM,6BAAN,MAAM,uFAAU;YAqCvB,uIAAA,KAAK,yBAAL,KAAK,6BAAL,KAAK,mGAA6B;YAvCpC,6KA2EC;;;YA3EqB,uDAAoB;;QAC7B,KAAK,wDAAS;QAClB,MAAM,8GAAU;QAEvB,YAAY,sDAAmB;QAC/B,cAAc,CAAc;QAC5B,WAAW,GAAkB,EAAE,CAAC;QAEhC;;WAEG;QACH,YAAY,GAAG,GAAG,EAAE;YAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;iBAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC/B,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QAEF;;WAEG;QACH,WAAW,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;YACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/D,IAAI,CAAC,WAAW,GAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC1F,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;QAGF,KAAK,uDAAG,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,EAAC;QAElC,YAAY;QACZ,IAAI,8DAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,WAAW;gBACtB,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC,EAAC;QAEF,WAAW;YACT,OAAO,IAAI,CAAC;QACd,CAAC;QAED,YAAY;QACZ,KAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;;;WAKG;QACH,UAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;;;;SA1EkB,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAE/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,iBAAiB;IAEhC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AA2BD;;;;GAIG;AACH,qBACa,iBAAkB,SAAQ,UAAU;;IACtC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB,WAAW,EAAE,MAAM,CAAC;IAExB,QAAQ,EAAE,OAAO,CAAC;IAgMzB,oBAAoB;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;CACrD"}
|
package/elements/base/gesture.js
CHANGED
|
@@ -32,8 +32,8 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import { css, GemElement } from '../../lib/element';
|
|
36
35
|
import { adoptedStyle, attribute, emitter, mounted, state } from '../../lib/decorators';
|
|
36
|
+
import { css, GemElement } from '../../lib/reactive';
|
|
37
37
|
function angleAB(a, b, c, { clientX: x1, clientY: y1 }, { clientX: x2, clientY: y2 }, { clientX: x3, clientY: y3 }) {
|
|
38
38
|
// https://en.wikipedia.org/wiki/Law_of_cosines
|
|
39
39
|
// https://blog.csdn.net/z278930050/article/details/53319091
|
|
@@ -41,7 +41,7 @@ function angleAB(a, b, c, { clientX: x1, clientY: y1 }, { clientX: x2, clientY:
|
|
|
41
41
|
}
|
|
42
42
|
const style = css `
|
|
43
43
|
@layer {
|
|
44
|
-
|
|
44
|
+
&:where(:not([hidden])) {
|
|
45
45
|
display: block;
|
|
46
46
|
user-select: none;
|
|
47
47
|
touch-action: attr(touch-action, none);
|
|
@@ -174,7 +174,7 @@ let GemGestureElement = (() => {
|
|
|
174
174
|
this.#startEventMap.set(evt.pointerId, evt);
|
|
175
175
|
if (evt.isPrimary) {
|
|
176
176
|
this.#pressed = false;
|
|
177
|
-
this.#pressTimer =
|
|
177
|
+
this.#pressTimer = setTimeout(() => {
|
|
178
178
|
this.press(evt);
|
|
179
179
|
this.#pressed = true;
|
|
180
180
|
}, 251);
|
|
@@ -219,7 +219,7 @@ let GemGestureElement = (() => {
|
|
|
219
219
|
Math.abs(movementY) > accuracy ||
|
|
220
220
|
Math.abs(move.clientX - startEvent.clientX) > accuracy ||
|
|
221
221
|
Math.abs(move.clientY - startEvent.clientY) > accuracy) {
|
|
222
|
-
|
|
222
|
+
clearTimeout(this.#pressTimer);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
};
|
|
@@ -236,7 +236,7 @@ let GemGestureElement = (() => {
|
|
|
236
236
|
#onEnd = async (evt) => {
|
|
237
237
|
evt.stopPropagation();
|
|
238
238
|
const { pointerId } = evt;
|
|
239
|
-
|
|
239
|
+
clearTimeout(this.#pressTimer);
|
|
240
240
|
if (this.movesMap.size === 1) {
|
|
241
241
|
this.grabbing = false;
|
|
242
242
|
this.end(evt);
|