@mantou/gem 1.7.11 → 1.7.12
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 +1164 -1136
- package/dist/gem.umd.js +23 -24
- package/elements/base/modal-factory.d.ts +3 -1
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/helper/request.d.ts +17 -7
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js +103 -53
- package/helper/request.js.map +1 -1
- package/lib/decorators.d.ts +1 -0
- package/lib/decorators.d.ts.map +1 -1
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +16 -18
- package/lib/element.js.map +1 -1
- package/lib/utils.d.ts +5 -5
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +18 -29
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/helper/request.ts +122 -53
- package/src/lib/decorators.ts +1 -1
- package/src/lib/element.ts +18 -17
- package/src/lib/utils.ts +27 -34
- package/src/lib/version.ts +1 -1
- package/src/test/utils.test.ts +12 -4
package/dist/gem.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o,b,"read from private field"),L?L.call(o):b.get(o)),N=(o,b,L)=>{if(b.has(o))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(o):b.set(o,L)},Y=(o,b,L,Z)=>(Pn(o,b,"write to private field"),Z?Z.call(o,L):b.set(o,L),L);var Cn=(o,b,L)=>(Pn(o,b,"access private method"),L);(function(o,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(o=typeof globalThis<"u"?globalThis:o||self,b(o.Gem={}))})(this,function(o){var oe,X,ae,Je,$n,$e,Tt,Qe,Mt,Ds,Le,At,Nt,qs,Ot,js,de,Ye,ke,Rt;"use strict";const b=Object.freeze(Object.defineProperty({__proto__:null,get GemElement(){return A},get SVGTemplateResult(){return Wt},get TemplateResult(){return Ne},get defineAttribute(){return ft},get defineCSSState(){return mt},get defineProperty(){return we},get defineRef(){return pt},get directive(){return Z},get guard(){return Yn},get html(){return V},get ifDefined(){return Jt},get nativeDefineElement(){return gt},get render(){return Dt},get repeat(){return Xn},get svg(){return Vn}},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4
4
|
* This code may only be used under the BSD style license found at
|
|
@@ -10,7 +10,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
10
10
|
* Code distributed by Google as part of the polymer project is also
|
|
11
11
|
* subject to an additional IP rights grant found at
|
|
12
12
|
* http://polymer.github.io/PATENTS.txt
|
|
13
|
-
*/const L=new WeakMap,Z=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t}
|
|
13
|
+
*/const L=new WeakMap,Z=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t},Te=n=>typeof n=="function"&&L.has(n);/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
16
16
|
* This code may only be used under the BSD style license found at
|
|
@@ -22,7 +22,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
22
22
|
* Code distributed by Google as part of the polymer project is also
|
|
23
23
|
* subject to an additional IP rights grant found at
|
|
24
24
|
* http://polymer.github.io/PATENTS.txt
|
|
25
|
-
*/const
|
|
25
|
+
*/const Ln=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,kn=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},Ht=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
28
28
|
* This code may only be used under the BSD style license found at
|
|
@@ -34,7 +34,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
34
34
|
* Code distributed by Google as part of the polymer project is also
|
|
35
35
|
* subject to an additional IP rights grant found at
|
|
36
36
|
* http://polymer.github.io/PATENTS.txt
|
|
37
|
-
*/const x={},
|
|
37
|
+
*/const x={},Tn={};/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
40
40
|
* This code may only be used under the BSD style license found at
|
|
@@ -46,7 +46,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
46
46
|
* Code distributed by Google as part of the polymer project is also
|
|
47
47
|
* subject to an additional IP rights grant found at
|
|
48
48
|
* http://polymer.github.io/PATENTS.txt
|
|
49
|
-
*/const ee=`{{lit-${String(Math.random()).slice(2)}}}`,
|
|
49
|
+
*/const ee=`{{lit-${String(Math.random()).slice(2)}}}`,Mn=`<!--${ee}-->`,Nn=new RegExp(`${ee}|${Mn}`),Me="$lit$";class Us{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let a=0,c=-1,l=0;const{strings:u,values:{length:p}}=e;for(;l<p;){const h=r.nextNode();if(h===null){r.currentNode=i.pop();continue}if(c++,h.nodeType===1){if(h.hasAttributes()){const g=h.attributes,{length:d}=g;let m=0;for(let y=0;y<d;y++)On(g[y].name,Me)&&m++;for(;m-- >0;){const y=u[l],E=Gt.exec(y)[2],_=E.toLowerCase()+Me,B=h.getAttribute(_);h.removeAttribute(_);const I=B.split(Nn);this.parts.push({type:"attribute",index:c,name:E,strings:I}),l+=I.length-1}}h.tagName==="TEMPLATE"&&(i.push(h),r.currentNode=h.content)}else if(h.nodeType===3){const g=h.data;if(g.indexOf(ee)>=0){const d=h.parentNode,m=g.split(Nn),y=m.length-1;for(let E=0;E<y;E++){let _,B=m[E];if(B==="")_=F();else{const I=Gt.exec(B);I!==null&&On(I[2],Me)&&(B=B.slice(0,I.index)+I[1]+I[2].slice(0,-Me.length)+I[3]),_=document.createTextNode(B)}d.insertBefore(_,h),this.parts.push({type:"node",index:++c})}m[y]===""?(d.insertBefore(F(),h),s.push(h)):h.data=m[y],l+=y}}else if(h.nodeType===8)if(h.data===ee){const g=h.parentNode;(h.previousSibling===null||c===a)&&(c++,g.insertBefore(F(),h)),a=c,this.parts.push({type:"node",index:c}),h.nextSibling===null?h.data="":(s.push(h),c--),l++}else{let g=-1;for(;(g=h.data.indexOf(ee,g+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const h of s)h.parentNode.removeChild(h)}}const On=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},Bs=n=>n.index!==-1,F=()=>document.createComment(""),Gt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
52
52
|
* This code may only be used under the BSD style license found at
|
|
@@ -58,7 +58,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
58
58
|
* Code distributed by Google as part of the polymer project is also
|
|
59
59
|
* subject to an additional IP rights grant found at
|
|
60
60
|
* http://polymer.github.io/PATENTS.txt
|
|
61
|
-
*/class An{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=
|
|
61
|
+
*/class An{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=Ln?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,a=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!Bs(c)){this.__parts.push(void 0),r++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const u=this.processor.handleTextExpression(this.options);u.insertAfterNode(l.previousSibling),this.__parts.push(u)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return Ln&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
64
64
|
* This code may only be used under the BSD style license found at
|
|
@@ -70,7 +70,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
70
70
|
* Code distributed by Google as part of the polymer project is also
|
|
71
71
|
* subject to an additional IP rights grant found at
|
|
72
72
|
* http://polymer.github.io/PATENTS.txt
|
|
73
|
-
*/const
|
|
73
|
+
*/const Rn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),Fs=` ${ee} `;class Ne{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=Gt.exec(r);c===null?t+=r+(s?Fs:Mn):t+=r.substr(0,c.index)+c[1]+c[2]+Me+c[3]+ee}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return Rn!==void 0&&(t=Rn.createHTML(t)),e.innerHTML=t,e}}class Wt extends Ne{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),kn(t,s.firstChild),e}}/**
|
|
74
74
|
* @license
|
|
75
75
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
76
76
|
* This code may only be used under the BSD style license found at
|
|
@@ -82,7 +82,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
82
82
|
* Code distributed by Google as part of the polymer project is also
|
|
83
83
|
* subject to an additional IP rights grant found at
|
|
84
84
|
* http://polymer.github.io/PATENTS.txt
|
|
85
|
-
*/const
|
|
85
|
+
*/const It=n=>n===null||!(typeof n=="object"||typeof n=="function"),xt=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class Hn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new Vt(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!xt(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const a=s[r];if(a!==void 0){const c=a.value;if(It(c)||!xt(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Vt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==x&&(!It(e)||e!==this.value)&&(this.value=e,Te(e)||(this.committer.dirty=!0))}commit(){for(;Te(this.value);){const e=this.value;this.value=x,e(this)}this.value!==x&&this.committer.commit()}}class fe{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(F()),this.endNode=e.appendChild(F())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=F()),e.__insert(this.endNode=F())}insertAfterPart(e){e.__insert(this.startNode=F()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=x,t(this)}const e=this.__pendingValue;e!==x&&(It(e)?e!==this.value&&this.__commitText(e):e instanceof Ne?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):xt(e)?this.__commitIterable(e):e===Tn?(this.value=Tn,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e??"";const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof An&&this.value.template===t)this.value.update(e.values);else{const s=new An(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new fe(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){Ht(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Ks{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=x,t(this)}if(this.__pendingValue===x)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=x}}class zs extends Hn{constructor(e,t,s){super(e,t,s),this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new Js(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Js extends Vt{}let Gn=!1;(()=>{try{const n={get capture(){return Gn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class Qs{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=x,r(this)}if(this.__pendingValue===x)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=Xs(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=x}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const Xs=n=>n&&(Gn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
|
|
86
86
|
* @license
|
|
87
87
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
88
88
|
* This code may only be used under the BSD style license found at
|
|
@@ -94,7 +94,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
94
94
|
* Code distributed by Google as part of the polymer project is also
|
|
95
95
|
* subject to an additional IP rights grant found at
|
|
96
96
|
* http://polymer.github.io/PATENTS.txt
|
|
97
|
-
*/class
|
|
97
|
+
*/class Ys{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new zs(e,t.slice(1),s).parts:r==="@"?[new Qs(e,t.slice(1),i.eventContext)]:r==="?"?[new Ks(e,t.slice(1),s)]:new Hn(e,t,s).parts}handleTextExpression(e){return new fe(e)}}const Wn=new Ys;/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
100
100
|
* This code may only be used under the BSD style license found at
|
|
@@ -106,7 +106,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
106
106
|
* Code distributed by Google as part of the polymer project is also
|
|
107
107
|
* subject to an additional IP rights grant found at
|
|
108
108
|
* http://polymer.github.io/PATENTS.txt
|
|
109
|
-
*/function
|
|
109
|
+
*/function Zs(n){let e=In.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},In.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(ee);return t=e.keyString.get(s),t===void 0&&(t=new Us(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const In=new Map;/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
112
112
|
* This code may only be used under the BSD style license found at
|
|
@@ -118,7 +118,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
118
118
|
* Code distributed by Google as part of the polymer project is also
|
|
119
119
|
* subject to an additional IP rights grant found at
|
|
120
120
|
* http://polymer.github.io/PATENTS.txt
|
|
121
|
-
*/const
|
|
121
|
+
*/const xn=new WeakMap,Dt=(n,e,t)=>{let s=xn.get(e);s===void 0&&(Ht(e,e.firstChild),xn.set(e,s=new fe(Object.assign({templateFactory:Zs},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
|
|
122
122
|
* @license
|
|
123
123
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
124
124
|
* This code may only be used under the BSD style license found at
|
|
@@ -130,8 +130,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
130
130
|
* Code distributed by Google as part of the polymer project is also
|
|
131
131
|
* subject to an additional IP rights grant found at
|
|
132
132
|
* http://polymer.github.io/PATENTS.txt
|
|
133
|
-
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ne(n,e,"html",
|
|
134
|
-
)*)}`,"g");function jn(n,e){const t=[];let s=`& {${n.replace(ai,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const ci={class:(n,...e)=>{const t=Ae(n,...e);return jn(t,"class")},id:(n,...e)=>{const t=Ae(n,...e);return jn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Ae(n,...e)}}`,type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function te(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function et(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class K extends Error{constructor(e){super(e),this.message=`gem: ${this.message}`}}function Bn(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function Fn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function tt(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function li(n){return tt(n,";",(e,t)=>t||t===0?`${D(e)}:${t}`:"")}function Kn(n){return tt(n," ",(e,t)=>t?e:"")}const hi=Kn;function ui(n){return tt(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const me=new WeakMap;function ge(n){if(me.has(n))throw new K("argument error");return me.set(n,new Set),n}function z(n,e){var t;Object.assign(n,e),(t=me.get(n))==null||t.forEach(s=>{H(s)})}function nt(n){const e=ge(n);return[e,t=>z(e,t)]}function ne(n,e){const t=me.get(n);return t==null||t.add(e),()=>{t==null||t.delete(e)}}function di(n,e){const t=me.get(n);t==null||t.delete(e)}const zn="1.7.11",fi=Object.freeze(Object.defineProperty({__proto__:null,version:zn},Symbol.toStringTag,{value:"Module"}));/**
|
|
133
|
+
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ne(n,e,"html",Wn),Vn=(n,...e)=>new Wt(n,e,"svg",Wn),Oe=new Set;function H(n){typeof n=="function"&&(Oe.size||globalThis.queueMicrotask(()=>{Oe.forEach(e=>e()),Oe.clear()}),Oe.delete(n),Oe.add(n))}const Ae=[];function ei(){for(let n=Ae.length-1;n>=0;n--)Ae[n]();Ae.length=0}function ti(n){Ae.length||H(ei),Ae.push(n)}function qt(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+decodeURIComponent(i)}function jt(n,e,t,s){return n.addEventListener(e,t,s),()=>n.removeEventListener(e,t,s)}class Dn extends EventTarget{constructor(){super(...arguments);N(this,Je);N(this,oe,new Map);N(this,X,void 0);N(this,ae,void 0)}get size(){return w(this,oe).size}get first(){return w(this,X)}get last(){return w(this,ae)}isSuperLinkOf(t){let s=t.first;if(!s)return!0;let i=this.find(s.value);for(;i&&i.value===s.value;){if(s=s.next,!s)return!0;i=i.next}return!1}find(t){return w(this,oe).get(t)}add(t){w(this,ae)||this.dispatchEvent(new CustomEvent("start"));const s=Cn(this,Je,$n).call(this,t)||{value:t};s.prev=w(this,ae),s.prev&&(s.prev.next=s),s.next=void 0,Y(this,ae,s),w(this,X)||Y(this,X,s),w(this,oe).set(t,s)}delete(t){const s=Cn(this,Je,$n).call(this,t);return w(this,X)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=w(this,X);if(t)return this.delete(t.value),t.value}}oe=new WeakMap,X=new WeakMap,ae=new WeakMap,Je=new WeakSet,$n=function(t){const s=w(this,oe).get(t);return s&&(s.prev?s.prev.next=s.next:Y(this,X,s.next),s.next?s.next.prev=s.prev:Y(this,ae,s.prev),w(this,oe).delete(t)),s};class qn extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class pe extends URLSearchParams{constructor(t){super(t);N(this,$e,t=>typeof t=="string"?t:JSON.stringify(t));N(this,Tt,t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}})}concat(t){let s;typeof t=="string"?s=Object.fromEntries(new URLSearchParams(t).entries()):s=t,Object.entries(s).forEach(([i,r])=>{this.append(i,w(this,$e).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,w(this,$e).call(this,i)));else{const i=w(this,$e).call(this,s);i?this.set(t,i):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(s=>s!=="").map(s=>w(this,Tt).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}$e=new WeakMap,Tt=new WeakMap;function Re(n,...e){return n.reduce((t,s,i)=>t+(e[i-1]??"")+s)}function ni(n,...e){return Re(n,...e)}const Ut=Symbol.for("gem@sheetToken");function si(n,e){const t=new CSSStyleSheet({media:e}),s={};let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{switch(s[r]=`${r}-${He()}`,n[r].type){case"class":i+=`.${s[r]} {${n[r].styledContent}}`;break;case"id":i+=`#${s[r]} {${n[r].styledContent}}`;break;default:i+=`@keyframes ${r} {${n[r].styledContent}}`}}),t.replaceSync(i),s[Ut]=t,s}function He(n=5){const e=Math.random().toString(36).slice(2).slice(0,n);return e.length<n?e+He(n-e.length):e}const ii={class:(n,...e)=>({styledContent:Re(n,...e),type:"class"}),id:(n,...e)=>({styledContent:Re(n,...e),type:"id"}),keyframes:(n,...e)=>({styledContent:Re(n,...e),type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function te(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Ze(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class K extends Error{constructor(e){super(e),this.message=`gem: ${this.message}`}}function jn(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function Un(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function et(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function ri(n){return et(n,";",(e,t)=>t||t===0?`${D(e)}:${t}`:"")}function Bn(n){return et(n," ",(e,t)=>t?e:"")}const oi=Bn;function ai(n){return et(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const me=new WeakMap;function ge(n){if(me.has(n))throw new K("argument error");return me.set(n,new Set),n}function z(n,e){var t;Object.assign(n,e),(t=me.get(n))==null||t.forEach(s=>{H(s)})}function tt(n){const e=ge(n);return[e,t=>z(e,t)]}function ne(n,e){const t=me.get(n);return t==null||t.add(e),()=>{t==null||t.delete(e)}}function ci(n,e){const t=me.get(n);t==null||t.delete(e)}const Fn="1.7.12",li=Object.freeze(Object.defineProperty({__proto__:null,version:Fn},Symbol.toStringTag,{value:"Module"}));/**
|
|
135
134
|
* @license
|
|
136
135
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
137
136
|
* This code may only be used under the BSD style license found at
|
|
@@ -143,7 +142,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
143
142
|
* Code distributed by Google as part of the polymer project is also
|
|
144
143
|
* subject to an additional IP rights grant found at
|
|
145
144
|
* http://polymer.github.io/PATENTS.txt
|
|
146
|
-
*/const
|
|
145
|
+
*/const Kn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(F(),s);t.insertBefore(F(),s);const r=new fe(n.options);return r.insertAfterNode(i),r},ce=(n,e)=>(n.setValue(e),n.commit(),n),Bt=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&kn(s,e.startNode,r,i)},Ft=n=>{Ht(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},zn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Jn=new WeakMap,Qn=new WeakMap,Xn=Z((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof fe))throw new Error("repeat can only be used in text bindings");const r=Jn.get(i)||[],a=Qn.get(i)||[],c=[],l=[],u=[];let p=0;for(const _ of n)u[p]=s?s(_,p):p,l[p]=t(_,p),p++;let h,g,d=0,m=r.length-1,y=0,E=l.length-1;for(;d<=m&&y<=E;)if(r[d]===null)d++;else if(r[m]===null)m--;else if(a[d]===u[y])c[y]=ce(r[d],l[y]),d++,y++;else if(a[m]===u[E])c[E]=ce(r[m],l[E]),m--,E--;else if(a[d]===u[E])c[E]=ce(r[d],l[E]),Bt(i,r[d],c[E+1]),d++,E--;else if(a[m]===u[y])c[y]=ce(r[m],l[y]),Bt(i,r[m],r[d]),m--,y++;else if(h===void 0&&(h=zn(u,y,E),g=zn(a,d,m)),!h.has(a[d]))Ft(r[d]),d++;else if(!h.has(a[m]))Ft(r[m]),m--;else{const _=g.get(u[y]),B=_!==void 0?r[_]:null;if(B===null){const I=Kn(i,r[d]);ce(I,l[y]),c[y]=I}else c[y]=ce(B,l[y]),Bt(i,B,r[d]),r[_]=null;y++}for(;y<=E;){const _=Kn(i,c[E+1]);ce(_,l[y]),c[y++]=_}for(;d<=m;){const _=r[d++];_!==null&&Ft(_)}Jn.set(i,c),Qn.set(i,u)}});/**
|
|
147
146
|
* @license
|
|
148
147
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
149
148
|
* This code may only be used under the BSD style license found at
|
|
@@ -155,7 +154,7 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
155
154
|
* Code distributed by Google as part of the polymer project is also
|
|
156
155
|
* subject to an additional IP rights grant found at
|
|
157
156
|
* http://polymer.github.io/PATENTS.txt
|
|
158
|
-
*/const
|
|
157
|
+
*/const Kt=new WeakMap,Yn=Z((n,e)=>t=>{const s=Kt.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Kt.has(t)))return;t.setValue(e()),Kt.set(t,Array.isArray(n)?Array.from(n):n)});/**
|
|
159
158
|
* @license
|
|
160
159
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
161
160
|
* This code may only be used under the BSD style license found at
|
|
@@ -167,15 +166,15 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
167
166
|
* Code distributed by Google as part of the polymer project is also
|
|
168
167
|
* subject to an additional IP rights grant found at
|
|
169
168
|
* http://polymer.github.io/PATENTS.txt
|
|
170
|
-
*/const Jt=new WeakMap,Qt=Z(n=>e=>{const t=Jt.get(e);if(n===void 0&&e instanceof Dt){if(t!==void 0||!Jt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Jt.set(e,n)});var ts=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},h=(n,e,t)=>(ts(n,e,"read from private field"),t?t.call(n):e.get(n)),_=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},O=(n,e,t,s)=>(ts(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Ge,se,We,J,Ie,Q,ie,st,it,Xt,Yt,Zt,rt,en,ot,le,tn,at,ct,lt;function pi(){}function nn(n){typeof n=="function"&&n()}const ht=new qn,sn=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(sn);const e=ht.get();e&&(e(),sn(n))};ht.addEventListener("start",()=>H(sn));const ut=Symbol("constructor"),dt=Symbol("init"),ns=Symbol("update"),ss=class Ye extends HTMLElement{constructor(e={}){super(),_(this,Ge,void 0),_(this,se,void 0),_(this,We,void 0),_(this,J,void 0),_(this,Ie,void 0),_(this,Q,void 0),_(this,ie,void 0),_(this,st,void 0),this.setState=i=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,i),H(h(this,le))},_(this,it,i=>{i==null||i.forEach(r=>{const{callback:a,getDep:c,values:l,preCallback:u}=r,m=c==null?void 0:c();(!c||!l||Bn(l,m))&&(nn(u),r.preCallback=a(m,l),r.values=m)})}),_(this,Xt,()=>{h(this,it).call(this,h(this,Q))}),_(this,Yt,()=>{h(this,it).call(this,h(this,ie))}),this.effect=(i,r)=>{h(this,Q)||O(this,Q,[]);const a={callback:i,getDep:r,initialized:h(this,J),inConstructor:this[ut]};h(this,J)&&(a.values=r==null?void 0:r(),a.preCallback=i(a.values)),h(this,Q).push(a)},this.memo=(i,r)=>{h(this,ie)||O(this,ie,[]),h(this,ie).push({callback:i,getDep:r,inConstructor:this[ut]})},_(this,Zt,()=>{var i;(i=h(this,Q))==null||i.forEach(r=>{const{callback:a,getDep:c,initialized:l}=r;l||(r.values=c==null?void 0:c(),r.preCallback=a(r.values),r.initialized=!0)})}),_(this,rt,()=>{h(this,Yt).call(this);const i=h(this,Ge)===this,r=this.render?this.render():i?void 0:V`<slot></slot>`;r!==void 0&&qt(r,h(this,Ge))}),_(this,en,()=>this.shouldUpdate?this.shouldUpdate():!0),_(this,ot,()=>{h(this,J)&&h(this,en).call(this)&&(h(this,rt).call(this),H(h(this,tn)),H(h(this,Xt)))}),_(this,le,()=>{h(this,Ie)?ht.add(h(this,ot)):h(this,ot).call(this)}),this.update=()=>{H(h(this,le))},_(this,tn,()=>{var i;(i=this.updated)==null||i.call(this)}),_(this,at,void 0),_(this,ct,()=>{var a,c,l;if(h(this,We)){O(this,We,!1);return}Reflect.set(this,ut,!1),(a=this.willMount)==null||a.call(this);const{observedStores:i,rootElement:r}=this.constructor;if(O(this,at,i==null?void 0:i.map(u=>ne(u,h(this,le)))),h(this,rt).call(this),O(this,J,!0),O(this,st,(c=this.mounted)==null?void 0:c.call(this)),h(this,Zt).call(this),r&&this.isConnected&&((l=this.getRootNode().host)==null?void 0:l.tagName)!==r.toUpperCase())throw new K("not allow current root type")}),_(this,lt,i=>i==null?void 0:i.filter(r=>(nn(r.preCallback),r.initialized=!1,r.inConstructor))),H(()=>Reflect.set(this,dt,!1)),Reflect.set(this,ut,!0),Reflect.set(this,dt,!0),Reflect.set(this,ns,()=>{h(this,J)&&H(h(this,le))}),O(this,Ie,e.isAsync),O(this,Ge,e.isLight?this:this.attachShadow({mode:e.mode||"open",delegatesFocus:e.delegatesFocus,slotAssignment:e.slotAssignment}));let t;this.effect(([i=!1])=>{if(t===void 0&&(t=this.hasAttribute("tabindex")),this.internals.ariaDisabled=String(i),e.focusable&&!t&&(this.tabIndex=-Number(i)),(e.focusable||e.delegatesFocus)&&i)return jt(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})},()=>[Reflect.get(this,"disabled")]);const{adoptedStyleSheets:s}=new.target;if(s){const i=s.map(r=>r[Bt]||r);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=i:this.effect(()=>{const r=this.getRootNode();return r.adoptedStyleSheets=[...r.adoptedStyleSheets,...i],()=>{r.adoptedStyleSheets=Fn(r.adoptedStyleSheets,i)}},()=>[])}}get internals(){if(!h(this,se)){O(this,se,this.attachInternals());try{h(this,se).states.add("foo"),h(this,se).states.delete("foo")}catch{Reflect.defineProperty(h(this,se),"states",{value:{has:e=>te(e)in this.dataset,add:e=>this.dataset[te(e)]="",delete:e=>delete this.dataset[te(e)]}})}}return h(this,se)}attributeChangedCallback(){return h(this,J)&&H(h(this,le)),h(Ye,ye)}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=r=>{const a=r.parentElement||r.getRootNode().host;if(!a)return null;if(t){if(a.constructor===e)return a}else if(a.tagName===s)return a;return i(a)};return i(this)}connectedCallback(){return this.isConnected&&h(this,Ie)?ht.add(h(this,ct)):h(this,ct).call(this),h(Ye,ye)}adoptedCallback(){return h(Ye,ye)}disconnectedCallback(){var e,t;if(this.isConnected){O(this,We,!0);return}return O(this,J,!1),(e=h(this,at))==null||e.forEach(s=>s()),nn(h(this,st)),(t=this.unmounted)==null||t.call(this),O(this,Q,h(this,lt).call(this,h(this,Q))),O(this,ie,h(this,lt).call(this,h(this,ie))),h(Ye,ye)}};ye=new WeakMap,Ge=new WeakMap,se=new WeakMap,We=new WeakMap,J=new WeakMap,Ie=new WeakMap,Q=new WeakMap,ie=new WeakMap,st=new WeakMap,it=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,Zt=new WeakMap,rt=new WeakMap,en=new WeakMap,ot=new WeakMap,le=new WeakMap,tn=new WeakMap,at=new WeakMap,ct=new WeakMap,lt=new WeakMap,_(ss,ye,Symbol());let R=ss;const ft=new Un;function pt(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(dt in this))return;const a=this.getAttribute(t);return s!=null&&s.has(t)?a!==null:i!=null&&i.has(t)?Number(a):a||""},set(r){const a=this,c=ft.get(this),l=c[e],u=a.getAttribute(t);if(this[dt]&&u!==null&&!l)return;c[e]=!0;const m=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):m?a.toggleAttribute(t,!!r):u!==String(r)&&a.setAttribute(t,String(r))}})}const is=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=ft.get(this)[e];return i||!t?i:(this[e]=pi,this[e])},set(i){const r=this,a=ft.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[is]?i:(c,l)=>{const u=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(u),i(c,l)},Reflect.set(a[e],is,!0)):(a[e]=i,this[ns]()))}})}function mt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=ft.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gem-reflect]")].map(l=>l.target);for(const l of[a,...c]){const u=l.querySelector(`[ref=${t}]`);if(u)return u}}},s[e]=i}return i}})}function gt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const yt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof R){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>pt(e.prototype,te(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,te(l),l)),a==null||a.forEach(l=>gt(e.prototype,te(l),l)),c==null||c.forEach(l=>mt(e.prototype,te(l),l))}yt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...v,...fi});function q(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function mi(n,e){const t=`${D(e)}-${He()}`;q(n,"defineRefs",t),mt(n,e,t)}function rn(n,e,t){q(n,"observedAttributes",t),pt(n,e,t)}function C(n,e){rn(n,e,D(e))}function on(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),rn(n,e,t)}function gi(n,e){const t=D(e);q(n,"numberAttributes",t,!0),rn(n,e,t)}function T(n,e){q(n,"observedProperties",e),we(n,e)}function wt(n,e){const t=D(e);q(n,"defineCSSStates",t),gt(n,e,t)}function yi(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof R?n:n.prototype,"defineSlots",t)}function rs(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof R?n:n.prototype,"defineParts",t)}function xe(n,e){os(n,e)}function wi(n,e){os(n,e,{bubbles:!0,composed:!0})}function os(n,e,t){const s=D(e);q(n,"defineEvents",s),we(n,e,s,t)}function _i(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function _t(n){return function(e){q(e.prototype,"observedStores",n)}}function vi(n){return function(e){const t=e;t.rootElement=n}}function Ei(n){return function(e){yt(n,e)}}const G=window.history,as=G.pushState.bind(G),cs=G.replaceState.bind(G);let Si=0;const an=()=>`${performance.now()}-${++Si}`,[P,_e]=nt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),$=new Map;function ls(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(P.$key!==e){if(e)throw new K("`$key` is not allowed");if(t)throw new K("`$hasCloseHandle` is not allowed");if(s)throw new K("`$hasOpenHandle` is not allowed");if(i)throw new K("`$hasShouldCloseHandle` is not allowed")}}function hs(n){return W.basePath?W.basePath+n:n}function cn(n){return n===W.basePath?"/":n.replace(new RegExp(`^${W.basePath}/`),"/")}function ln(){W.dispatchEvent(new CustomEvent("beforechange"))}function vt(n){const e=$.get(P.$key)||{path:cn(location.pathname),query:new pe},t=n.path?Ut(e.path,n.path):cn(location.pathname),s=new pe(n.query??(n.path?"":location.search)),i=String(s)!==String(e.query),r=i?s:e.query,a=t!==e.path||i,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:t,query:r,hash:u}}function us(n,e){ls(n.data);const t=vt(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:u,data:m}=t,d={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:an(),$title:s,...m};$.set(d.$key,t),ln(),et(P),_e(d);const b=hs(i)+new pe(r)+a,f=decodeURIComponent(location.hash);e(d,s,b),f!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function ds(n,e,t,s){ls(n);const i={$key:an(),$title:e,...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=vt({path:r,query:new pe(a),hash:c,title:e,data:n});$.set(i.$key,l),ln(),et(P),_e(i);const u=hs(r)+l.query+c,m=location.hash;s(i,e,u),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const[fs,bi]=nt({basePath:""});class Pi extends EventTarget{get store(){return P}get currentKey(){return P.$key}get basePath(){return fs.basePath}set basePath(e){bi({basePath:e}),Object.assign($.get(P.$key),{path:cn(location.pathname)})}getParams(){return $.get(P.$key)}updateParams(e){Object.assign($.get(P.$key),e),_e()}push(e){us(e,as)}replace(e){us(e,cs)}pushIgnoreCloseHandle(e){var t,s;P.$hasCloseHandle?((s=(t=$.get(P.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const W=new Pi,[Et,Ci]=nt({title:""}),ki={history:W,titleStore:Et,basePathStore:fs};if(!window._GEMHISTORY){if(window._GEMHISTORY=ki,G.pushState=function(e,t,s){ds(e,t,s,as)},G.replaceState=function(e,t,s){ds(e,t,s,cs)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&W.replace({hash:location.hash})}),G.state)if(G.state.$hasCloseHandle){_e(G.state);const e=vt({title:document.title});$.set(P.$key,e),W.back()}else{const e=vt({title:document.title,hash:location.hash});_e({$key:an(),...G.state||{}}),$.set(P.$key,e)}else{const{pathname:e,search:t,hash:s}=location;W.replace({path:e,query:t,hash:s})}ne(Et,()=>{const e=$.get(P.$key);e&&(e.title=Et.title)}),ne(P,()=>{const{title:e}=W.getParams();e!==Et.title&&Ci({title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t!=null&&t.$key))return;if(n){n=!1;return}if(!$.has(t.$key)){const{pathname:c,search:l,hash:u}=location;$.set(t.$key,{path:c,query:new pe(l),hash:decodeURIComponent(u),title:t.$title,data:t})}const s=P;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=$.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=$.get(s.$key),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,W.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,W.back())}ln(),et(P),_e(t)})}const{history:y,titleStore:ve,basePathStore:ps}=window._GEMHISTORY;var Li=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,U=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ti(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Li(e,t,i),i},ms=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},j=(n,e,t)=>(ms(n,e,"read from private field"),t?t.call(n):e.get(n)),Ve=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},gs=(n,e,t,s)=>(ms(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),De,he,Ee,St,hn,bt;const ys="_";class $i extends RegExp{constructor(e){let t=0;super(`^${e.replace(/((:[^/$]+)|(\*))/g,(s,i)=>i==="*"?`(?<${ys}${t++}>.*)`:`(?<${i.slice(1)}>[^/]+)`)}$`)}}function un(n,e){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:e})||r.exec({pathname:`${e}/`});return a?a.pathname.groups:null}const t=new $i(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s.groups&&Object.entries(s.groups).forEach(([r,a])=>{i[r.startsWith(ys)?r.slice(1):r]=a}),i}function Pt(n,e){let t=0,s=n.pattern.replaceAll("*",()=>`:${t++}`);const i=e==null?void 0:e.params;return i&&Object.keys(i).forEach(r=>{s=s.replace(new RegExp(`:${r}`,"g"),i[r])}),s}function ws(n,e){return{path:Pt(n,e),...e}}const dn=V``,_s=new Map,M=class qs extends R{constructor({isLight:e,routes:t}={}){super({isLight:e}),Ve(this,he),this.trigger=y,this.currentParams={},Ve(this,De,void 0),this.state={content:dn},Ve(this,St,()=>{if(!this.locationStore)return;const{path:s,query:i,hash:r,data:a}=y.getParams();z(this.locationStore,{path:s,params:this.currentParams,query:i,hash:r,data:a})}),Ve(this,hn,()=>{if(!j(this,he,Ee))return;const s=_s.get(y.currentKey);s?j(this,he,Ee).scroll(0,s):(this.scrollIgnoreHash||!y.getParams().hash)&&j(this,he,Ee).scroll(0,0)}),Ve(this,bt,(s,i,r)=>{this.beforeroutechange(s),gs(this,De,void 0),this.currentRoute=s,this.currentParams=i;const a=async()=>{this.setState({content:r}),j(this,St).call(this),await Promise.resolve(),j(this,hn).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>a()):a()}),this.update=()=>{const{path:s,hash:i,query:r}=this.trigger.getParams(),{route:a,params:c={}}=qs.findRoute(this.routes,s),{redirect:l,content:u,getContent:m}=a||{};if(l){this.trigger.replace({path:Pt({pattern:l},{params:c}),query:r,hash:i});return}this.trigger===y&&z(ve,{title:a==null?void 0:a.title});const d=u||(m==null?void 0:m(c,this.shadowRoot||this));if(this.loading(a),d instanceof Promise){gs(this,De,d);const b=()=>j(this,De)===d;d.then(f=>{b()&&j(this,bt).call(this,a,c,f)}).catch(f=>{b()&&this.error(f)});return}j(this,bt).call(this,a,c,d)},this.routes=this.routes||t}mounted(){this.effect(()=>{if(j(this,he,Ee))return jt(y,"beforechange",()=>_s.set(y.currentKey,j(this,he,Ee).scrollTop))},()=>[this.scrollContainer]),this.effect(()=>ne(this.trigger.store,()=>this.setState({})),()=>[this.trigger]),this.effect(([e,t],s)=>{if(s&&e===s[0]&&t===s[1]){j(this,St).call(this);return}this.update()},()=>{const{path:e,query:t,hash:s}=this.trigger.getParams();return[this.key,e,t,s]})}shouldUpdate(){return!this.inert}render(){const{content:e}=this.state;if(e!==void 0)return this.shadowRoot?V`
|
|
169
|
+
*/const zt=new WeakMap,Jt=Z(n=>e=>{const t=zt.get(e);if(n===void 0&&e instanceof Vt){if(t!==void 0||!zt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);zt.set(e,n)});var Zn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},f=(n,e,t)=>(Zn(n,e,"read from private field"),t?t.call(n):e.get(n)),S=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},O=(n,e,t,s)=>(Zn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Ge,se,We,J,Ie,Q,ie,nt,st,Qt,Xt,Yt,it,Zt,rt,le,en,ot,at,ct;function hi(){}function tn(n){typeof n=="function"&&n()}const lt=new Dn,nn=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(nn);const e=lt.get();e&&(e(),nn(n))};lt.addEventListener("start",()=>H(nn));const ht=Symbol("constructor"),ut=Symbol("init"),es=Symbol("update"),ts=class Xe extends HTMLElement{constructor(e={}){super(),S(this,Ge,void 0),S(this,se,void 0),S(this,We,void 0),S(this,J,void 0),S(this,Ie,void 0),S(this,Q,void 0),S(this,ie,void 0),S(this,nt,void 0),this.setState=i=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,i),H(f(this,le))},S(this,st,i=>{i==null||i.forEach(r=>{const{callback:a,getDep:c,values:l,preCallback:u}=r,p=c==null?void 0:c();(!c||!l||jn(l,p))&&(tn(u),r.preCallback=a(p,l),r.values=p)})}),S(this,Qt,()=>{f(this,st).call(this,f(this,Q))}),S(this,Xt,()=>{f(this,st).call(this,f(this,ie))}),this.effect=(i,r)=>{f(this,Q)||O(this,Q,[]);const a={callback:i,getDep:r,initialized:f(this,J),inConstructor:this[ht]};f(this,J)&&(a.values=r==null?void 0:r(),a.preCallback=i(a.values)),f(this,Q).push(a)},this.memo=(i,r)=>{f(this,ie)||O(this,ie,[]),f(this,ie).push({callback:i,getDep:r,inConstructor:this[ht]})},S(this,Yt,()=>{var i;(i=f(this,Q))==null||i.forEach(r=>{const{callback:a,getDep:c,initialized:l}=r;l||(r.values=c==null?void 0:c(),r.preCallback=a(r.values),r.initialized=!0)})}),S(this,it,()=>{f(this,Xt).call(this);const i=f(this,Ge)===this,r=this.render?this.render():i?void 0:V`<slot></slot>`;r!==void 0&&Dt(r,f(this,Ge))}),S(this,Zt,()=>this.shouldUpdate?this.shouldUpdate():!0),S(this,rt,()=>{f(this,J)&&f(this,Zt).call(this)&&(f(this,it).call(this),H(f(this,en)),H(f(this,Qt)))}),S(this,le,()=>{f(this,Ie)?lt.add(f(this,rt)):f(this,rt).call(this)}),this.update=()=>{H(f(this,le))},S(this,en,()=>{var i;(i=this.updated)==null||i.call(this)}),S(this,ot,void 0),S(this,at,()=>{var a,c,l;if(f(this,We)){O(this,We,!1);return}Reflect.set(this,ht,!1),(a=this.willMount)==null||a.call(this);const{observedStores:i,rootElement:r}=this.constructor;if(O(this,ot,i==null?void 0:i.map(u=>ne(u,f(this,le)))),f(this,it).call(this),O(this,J,!0),O(this,nt,(c=this.mounted)==null?void 0:c.call(this)),f(this,Yt).call(this),r&&this.isConnected&&((l=this.getRootNode().host)==null?void 0:l.tagName)!==r.toUpperCase())throw new K("not allow current root type")}),S(this,ct,i=>i==null?void 0:i.filter(r=>(tn(r.preCallback),r.initialized=!1,r.inConstructor))),H(()=>Reflect.set(this,ut,!1)),Reflect.set(this,ht,!0),Reflect.set(this,ut,!0),Reflect.set(this,es,()=>{f(this,J)&&H(f(this,le))}),O(this,Ie,e.isAsync),O(this,Ge,e.isLight?this:this.attachShadow({mode:e.mode||"open",delegatesFocus:e.delegatesFocus,slotAssignment:e.slotAssignment}));let t;this.effect(([i=!1])=>{if(t===void 0&&(t=this.hasAttribute("tabindex")),this.internals.ariaDisabled=String(i),e.focusable&&!t&&(this.tabIndex=-Number(i)),(e.focusable||e.delegatesFocus)&&i)return jt(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})},()=>[Reflect.get(this,"disabled")]);const{adoptedStyleSheets:s}=new.target;if(s){const i=s.map(r=>r[Ut]||r);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=i:this.effect(()=>{const r=this.getRootNode();return r.adoptedStyleSheets=[...r.adoptedStyleSheets,...i],()=>{r.adoptedStyleSheets=Un(r.adoptedStyleSheets,i)}},()=>[])}}get internals(){if(!f(this,se)){O(this,se,this.attachInternals());try{f(this,se).states.add("foo"),f(this,se).states.delete("foo")}catch{Reflect.defineProperty(f(this,se),"states",{value:{has:e=>te(e)in this.dataset,add:e=>this.dataset[te(e)]="",delete:e=>delete this.dataset[te(e)]}})}}return f(this,se)}attributeChangedCallback(){return f(this,J)&&H(f(this,le)),f(Xe,ye)}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=a=>t?a.constructor===e:a.tagName===s;let r=this;for(;r&&!i(r);)r=r.parentElement||r.getRootNode().host;return r}connectedCallback(){return this.isConnected&&f(this,Ie)?lt.add(f(this,at)):f(this,at).call(this),f(Xe,ye)}adoptedCallback(){return f(Xe,ye)}disconnectedCallback(){var e,t;if(this.isConnected){O(this,We,!0);return}return O(this,J,!1),(e=f(this,ot))==null||e.forEach(s=>s()),tn(f(this,nt)),(t=this.unmounted)==null||t.call(this),O(this,Q,f(this,ct).call(this,f(this,Q))),O(this,ie,f(this,ct).call(this,f(this,ie))),f(Xe,ye)}};ye=new WeakMap,Ge=new WeakMap,se=new WeakMap,We=new WeakMap,J=new WeakMap,Ie=new WeakMap,Q=new WeakMap,ie=new WeakMap,nt=new WeakMap,st=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,it=new WeakMap,Zt=new WeakMap,rt=new WeakMap,le=new WeakMap,en=new WeakMap,ot=new WeakMap,at=new WeakMap,ct=new WeakMap,S(ts,ye,Symbol());let A=ts;const dt=new qn;function ft(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(ut in this))return;const a=this.getAttribute(t);return s!=null&&s.has(t)?a!==null:i!=null&&i.has(t)?Number(a):a||""},set(r){const a=this,c=dt.get(this),l=c[e],u=a.getAttribute(t);if(this[ut]&&u!==null&&!l)return;c[e]=!0;const p=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):p?a.toggleAttribute(t,!!r):u!==String(r)&&a.setAttribute(t,String(r))}})}const ns=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=dt.get(this)[e];return i||!t?i:(this[e]=hi,this[e])},set(i){const r=this,a=dt.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[ns]?i:(c,l)=>{const u=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(u),i(c,l)},Reflect.set(a[e],ns,!0)):(a[e]=i,this[es]()))}})}const ss=n=>[...n.querySelectorAll("[data-gem-reflect]")].map(e=>e.target);function pt(n,e,t){const s=`[ref=${t}]`;Object.defineProperty(n,e,{configurable:!0,get(){const i=dt.get(this);let r=i[e];if(!r){const a=this,c=a.shadowRoot||a;r={get ref(){return t},get element(){for(const l of[c,...ss(c)]){const u=l.querySelector(s);if(u)return u}},get elements(){return[c,...ss(c)].map(l=>[...l.querySelectorAll(s)]).flat()}},i[e]=r}return r}})}function mt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const gt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>ft(e.prototype,te(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,te(l),l)),a==null||a.forEach(l=>mt(e.prototype,te(l),l)),c==null||c.forEach(l=>pt(e.prototype,te(l),l))}gt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...b,...li});function q(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function ui(n,e){const t=`${D(e)}-${He()}`;q(n,"defineRefs",t),pt(n,e,t)}function sn(n,e,t){q(n,"observedAttributes",t),ft(n,e,t)}function C(n,e){sn(n,e,D(e))}function rn(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),sn(n,e,t)}function di(n,e){const t=D(e);q(n,"numberAttributes",t,!0),sn(n,e,t)}function k(n,e){q(n,"observedProperties",e),we(n,e)}function yt(n,e){const t=D(e);q(n,"defineCSSStates",t),mt(n,e,t)}function fi(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function is(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function xe(n,e){rs(n,e)}function pi(n,e){rs(n,e,{bubbles:!0,composed:!0})}function rs(n,e,t){const s=D(e);q(n,"defineEvents",s),we(n,e,s,t)}function mi(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function wt(n){return function(e){q(e.prototype,"observedStores",n)}}function gi(n){return function(e){const t=e;t.rootElement=n}}function yi(n){return function(e){gt(n,e)}}const G=window.history,os=G.pushState.bind(G),as=G.replaceState.bind(G);let wi=0;const on=()=>`${performance.now()}-${++wi}`,[P,_e]=tt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),T=new Map;function cs(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(P.$key!==e){if(e)throw new K("`$key` is not allowed");if(t)throw new K("`$hasCloseHandle` is not allowed");if(s)throw new K("`$hasOpenHandle` is not allowed");if(i)throw new K("`$hasShouldCloseHandle` is not allowed")}}function ls(n){return W.basePath?W.basePath+n:n}function an(n){return n===W.basePath?"/":n.replace(new RegExp(`^${W.basePath}/`),"/")}function cn(){W.dispatchEvent(new CustomEvent("beforechange"))}function _t(n){const e=T.get(P.$key)||{path:an(location.pathname),query:new pe},t=n.path?qt(e.path,n.path):an(location.pathname),s=new pe(n.query??(n.path?"":location.search)),i=String(s)!==String(e.query),r=i?s:e.query,a=t!==e.path||i,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:t,query:r,hash:u}}function hs(n,e){cs(n.data);const t=_t(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:u,data:p}=t,h={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:on(),$title:s,...p};T.set(h.$key,t),cn(),Ze(P),_e(h);const g=ls(i)+new pe(r)+a,d=decodeURIComponent(location.hash);e(h,s,g),d!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function us(n,e,t,s){cs(n);const i={$key:on(),$title:e,...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=_t({path:r,query:new pe(a),hash:c,title:e,data:n});T.set(i.$key,l),cn(),Ze(P),_e(i);const u=ls(r)+l.query+c,p=location.hash;s(i,e,u),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const[ds,_i]=tt({basePath:""});class vi extends EventTarget{get store(){return P}get currentKey(){return P.$key}get basePath(){return ds.basePath}set basePath(e){_i({basePath:e}),Object.assign(T.get(P.$key),{path:an(location.pathname)})}getParams(){return T.get(P.$key)}updateParams(e){Object.assign(T.get(P.$key),e),_e()}push(e){hs(e,os)}replace(e){hs(e,as)}pushIgnoreCloseHandle(e){var t,s;P.$hasCloseHandle?((s=(t=T.get(P.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const W=new vi,[vt,Ei]=tt({title:""}),Si={history:W,titleStore:vt,basePathStore:ds};if(!window._GEMHISTORY){if(window._GEMHISTORY=Si,G.pushState=function(e,t,s){us(e,t,s,os)},G.replaceState=function(e,t,s){us(e,t,s,as)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&W.replace({hash:location.hash})}),G.state)if(G.state.$hasCloseHandle){_e(G.state);const e=_t({title:document.title});T.set(P.$key,e),W.back()}else{const e=_t({title:document.title,hash:location.hash});_e({$key:on(),...G.state||{}}),T.set(P.$key,e)}else{const{pathname:e,search:t,hash:s}=location;W.replace({path:e,query:t,hash:s})}ne(vt,()=>{const e=T.get(P.$key);e&&(e.title=vt.title)}),ne(P,()=>{const{title:e}=W.getParams();e!==vt.title&&Ei({title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t!=null&&t.$key))return;if(n){n=!1;return}if(!T.has(t.$key)){const{pathname:c,search:l,hash:u}=location;T.set(t.$key,{path:c,query:new pe(l),hash:decodeURIComponent(u),title:t.$title,data:t})}const s=P;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=T.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=T.get(s.$key),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,W.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,W.back())}cn(),Ze(P),_e(t)})}const{history:v,titleStore:ve,basePathStore:fs}=window._GEMHISTORY;var bi=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,j=(n,e,t,s)=>{for(var i=s>1?void 0:s?Pi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&bi(e,t,i),i},ps=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},U=(n,e,t)=>(ps(n,e,"read from private field"),t?t.call(n):e.get(n)),Ve=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},ms=(n,e,t,s)=>(ps(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),De,he,Ee,Et,ln,St;const gs="_";class Ci extends RegExp{constructor(e){let t=0;super(`^${e.replace(/((:[^/$]+)|(\*))/g,(s,i)=>i==="*"?`(?<${gs}${t++}>.*)`:`(?<${i.slice(1)}>[^/]+)`)}$`)}}function hn(n,e){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:e})||r.exec({pathname:`${e}/`});return a?a.pathname.groups:null}const t=new Ci(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s.groups&&Object.entries(s.groups).forEach(([r,a])=>{i[r.startsWith(gs)?r.slice(1):r]=a}),i}function bt(n,e){let t=0,s=n.pattern.replaceAll("*",()=>`:${t++}`);const i=e==null?void 0:e.params;return i&&Object.keys(i).forEach(r=>{s=s.replace(new RegExp(`:${r}`,"g"),i[r])}),s}function ys(n,e){return{path:bt(n,e),...e}}const un=V``,ws=new Map,M=class xs extends A{constructor({isLight:e,routes:t}={}){super({isLight:e}),Ve(this,he),this.trigger=v,this.currentParams={},Ve(this,De,void 0),this.state={content:un},Ve(this,Et,()=>{if(!this.locationStore)return;const{path:s,query:i,hash:r,data:a}=v.getParams();z(this.locationStore,{path:s,params:this.currentParams,query:i,hash:r,data:a})}),Ve(this,ln,()=>{if(!U(this,he,Ee))return;const s=ws.get(v.currentKey);s?U(this,he,Ee).scroll(0,s):(this.scrollIgnoreHash||!v.getParams().hash)&&U(this,he,Ee).scroll(0,0)}),Ve(this,St,(s,i,r)=>{this.beforeroutechange(s),ms(this,De,void 0),this.currentRoute=s,this.currentParams=i;const a=async()=>{this.setState({content:r}),U(this,Et).call(this),await Promise.resolve(),U(this,ln).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>a()):a()}),this.update=()=>{const{path:s,hash:i,query:r}=this.trigger.getParams(),{route:a,params:c={}}=xs.findRoute(this.routes,s),{redirect:l,content:u,getContent:p}=a||{};if(l){this.trigger.replace({path:bt({pattern:l},{params:c}),query:r,hash:i});return}this.trigger===v&&z(ve,{title:a==null?void 0:a.title});const h=u||(p==null?void 0:p(c,this.shadowRoot||this));if(this.loading(a),h instanceof Promise){ms(this,De,h);const g=()=>U(this,De)===h;h.then(d=>{g()&&U(this,St).call(this,a,c,d)}).catch(d=>{g()&&this.error(d)});return}U(this,St).call(this,a,c,h)},this.routes=this.routes||t}mounted(){this.effect(()=>{if(U(this,he,Ee))return jt(v,"beforechange",()=>ws.set(v.currentKey,U(this,he,Ee).scrollTop))},()=>[this.scrollContainer]),this.effect(()=>ne(this.trigger.store,()=>this.setState({})),()=>[this.trigger]),this.effect(([e,t],s)=>{if(s&&e===s[0]&&t===s[1]){U(this,Et).call(this);return}this.update()},()=>{const{path:e,query:t,hash:s}=this.trigger.getParams();return[this.key,e,t,s]})}shouldUpdate(){return!this.inert}render(){const{content:e}=this.state;if(e!==void 0)return this.shadowRoot?V`
|
|
171
170
|
<style>
|
|
172
171
|
:host(:where(:not([hidden]))),
|
|
173
172
|
:not(:defined) {
|
|
174
173
|
display: contents;
|
|
175
174
|
}
|
|
176
175
|
</style>
|
|
177
|
-
${e===
|
|
178
|
-
`:e===
|
|
176
|
+
${e===un?V`<slot></slot>`:e}
|
|
177
|
+
`:e===un?void 0:V`${e}`}};De=new WeakMap,he=new WeakSet,Ee=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},Et=new WeakMap,ln=new WeakMap,St=new WeakMap,M.createLocationStore=()=>{const{path:n,query:e,hash:t,data:s}=v.getParams();return ge({path:n,query:e,hash:t,data:s,params:{}})},M.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=hn(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},j([rn],M.prototype,"transition",2),j([k],M.prototype,"routes",2),j([k],M.prototype,"locationStore",2),j([k],M.prototype,"key",2),j([xe],M.prototype,"loading",2),j([xe],M.prototype,"beforeroutechange",2),j([xe],M.prototype,"routechange",2),j([xe],M.prototype,"error",2),j([k],M.prototype,"scrollContainer",2),j([k],M.prototype,"scrollIgnoreHash",2),j([k],M.prototype,"trigger",2);let dn=M;class _s extends dn{constructor(e={}){super({...e,isLight:!0})}}var $i=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,$=(n,e,t,s)=>{for(var i=s>1?void 0:s?Li(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&$i(e,t,i),i},ki=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},re=(n,e,t)=>(ki(n,e,"read from private field"),t?t.call(n):e.get(n)),qe=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Se,je,fn,vs,pn,mn,gn;function Es(n){return!n.startsWith("/")}o.GemLinkElement=class extends A{constructor(){super({focusable:!0}),qe(this,Se),qe(this,fn),qe(this,pn,async()=>{var r;const e=this.getLocationString();if(!e)return;if(Es(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:t,query:s,hash:i}=v.getParams();if(t+s+i!==e)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)v.pushIgnoreCloseHandle({...ys(this.route,re(this,Se,je)),title:this.route.title||this.docTitle});else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);v.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else v.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})}),qe(this,mn,e=>{e.preventDefault()}),qe(this,gn,()=>{const e=this.getLocationString();return Es(e)?e:new URL(v.basePath+e,location.origin).toString()}),this.addEventListener("click",re(this,pn))}render(){return V`
|
|
179
178
|
<style>
|
|
180
179
|
:host {
|
|
181
180
|
/* link default style */
|
|
@@ -193,12 +192,12 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
193
192
|
</style>
|
|
194
193
|
<a
|
|
195
194
|
part=${this.link}
|
|
196
|
-
@click=${re(this,
|
|
197
|
-
href=${
|
|
195
|
+
@click=${re(this,mn)}
|
|
196
|
+
href=${Jt(re(this,fn,vs)==="off"?void 0:re(this,gn).call(this))}
|
|
198
197
|
>
|
|
199
198
|
<slot></slot>
|
|
200
199
|
</a>
|
|
201
|
-
`}getLocationString(){var e,t;if(this.route){const s=((e=re(this,Se,
|
|
200
|
+
`}getLocationString(){var e,t;if(this.route){const s=((e=re(this,Se,je))==null?void 0:e.query)||"",i=((t=re(this,Se,je))==null?void 0:t.hash)||"";return bt(this.route,re(this,Se,je))+s+i}else{const s=this.href||this.path+this.query+this.hash,{path:i,query:r}=v.getParams();return s.startsWith("#")?`${i}${r}${s}`:s.startsWith("?")?`${i}${s}`:s.startsWith(".")?qt(i,s):s}}},Se=new WeakSet,je=function(){return this.routeOptions||this.options},fn=new WeakSet,vs=function(){return this.hint||"on"},pn=new WeakMap,mn=new WeakMap,gn=new WeakMap,$([C],o.GemLinkElement.prototype,"href",2),$([C],o.GemLinkElement.prototype,"target",2),$([C],o.GemLinkElement.prototype,"path",2),$([C],o.GemLinkElement.prototype,"query",2),$([C],o.GemLinkElement.prototype,"hash",2),$([C],o.GemLinkElement.prototype,"docTitle",2),$([C],o.GemLinkElement.prototype,"hint",2),$([k],o.GemLinkElement.prototype,"route",2),$([k],o.GemLinkElement.prototype,"options",2),$([k],o.GemLinkElement.prototype,"routeOptions",2),$([k],o.GemLinkElement.prototype,"prepare",2),$([is],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=$([wt(fs)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{constructor(){super(),this.effect(()=>{const{path:e,query:t,hash:s}=v.getParams(),i=this.pattern&&hn(this.pattern,e);this.active=!!i||e+t+s===this.getLocationString()})}},$([C],o.GemActiveLinkElement.prototype,"pattern",2),$([yt],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=$([wt(v.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",dn),customElements.define("gem-light-route",_s);var Ti=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,yn=(n,e,t,s)=>{for(var i=s>1?void 0:s?Mi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ti(e,t,i),i};const Pt=document.title;let wn="";const Ni=()=>document.title=wn;function Ss(n,e="",t=""){const s=ve.title||n;s&&s!==Pt?(be.title=s,wn=e+be.title+t):(be.title=Pt,wn=be.title),H(Ni)}ne(ve,Ss);const bs=`${Pt} | `,Ps=` - ${Pt}`,ue=class Vs extends A{constructor(){super(),this.mounted=()=>{this.effect(()=>!this.inert&&ne(ve,this.update),()=>[this.inert])},new MutationObserver(()=>this.update()).observe(this,{characterData:!0,childList:!0,subtree:!0})}static setTitle(e){z(ve,{title:e})}render(){var e;return Ss((e=this.textContent)==null?void 0:e.trim(),this.prefix,this.suffix),V`${Vs.title}`}};ue.title=document.title,ue.defaultPrefix=bs,ue.defaultSuffix=Ps,yn([C],ue.prototype,"prefix",2),yn([C],ue.prototype,"suffix",2),yn([rn],ue.prototype,"inert",2);let be=ue;customElements.define("gem-title",be);var Oi=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,Ct=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ai(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Oi(e,t,i),i};const Cs=new Map;class Pe extends A{constructor(){super(...arguments);N(this,Qe,void 0);Y(this,Qe,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let s=Cs.get(t);return s||(s=document.createElement("template"),s.innerHTML=t,Cs.set(t,s)),s.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return V`
|
|
202
201
|
<style>
|
|
203
202
|
:host(:where(:not([hidden]))) {
|
|
204
203
|
position: relative;
|
|
@@ -210,9 +209,9 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
210
209
|
height: 100%;
|
|
211
210
|
}
|
|
212
211
|
</style>
|
|
213
|
-
${
|
|
212
|
+
${w(this,Qe).call(this)}
|
|
214
213
|
<slot></slot>
|
|
215
|
-
`}}
|
|
214
|
+
`}}Qe=new WeakMap,Ct([C],Pe.prototype,"selector",2),Ct([k],Pe.prototype,"root",2),Ct([k],Pe.prototype,"element",2),Ct([yt],Pe.prototype,"active",2),customElements.define("gem-use",Pe);var Ri=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,$s=(n,e,t,s)=>{for(var i=s>1?void 0:s?Hi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ri(e,t,i),i};class $t extends A{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
|
|
216
215
|
<style>
|
|
217
216
|
:host(:where(:not([hidden]))) {
|
|
218
217
|
display: contents;
|
|
@@ -220,4 +219,4 @@ var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o
|
|
|
220
219
|
${this.contentcss}
|
|
221
220
|
</style>
|
|
222
221
|
${this.content}
|
|
223
|
-
`)},()=>[this.content,this.contentcss])}render(){}}Ls([C],Lt.prototype,"content",2),Ls([C],Lt.prototype,"contentcss",2),customElements.define("gem-unsafe",Lt);var Vi=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Ts=(n,e,t,s)=>{for(var i=s>1?void 0:s?Di(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Vi(e,t,i),i};const qi="gem-reflect-start",$s="gem-reflect-end",Ms=n=>new Comment(n),Ui=n=>{const e=[];let t=n;for(;t&&(e.push(t),t.nodeValue!==$s);)t=t.nextSibling;return e};class Tt extends R{constructor(){super({isLight:!0});N(this,Nt);this.target=document.head,this.effect(()=>{this.hidden=!0,this.dataset.gemReflect=""},()=>[]);const t=Ms(qi),s=Ms($s);let i;this.effect(()=>((i||[t,...this.childNodes,s]).forEach((r,a,c)=>{const l=c[a-1];l?l.after(r):this.target[g(this,Nt,js)](r)}),()=>{i=Ui(t),i.forEach(r=>r.remove())}),()=>[this.target])}}Nt=new WeakSet,js=function(){return this.method||"append"},Ts([C],Tt.prototype,"method",2),Ts([T],Tt.prototype,"target",2),customElements.define("gem-reflect",Tt);const $t=Symbol("open mark");function ji(n){var e;const t=Symbol();return e=class extends R{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[$t]}static get observedStores(){return[y.store,this.store]}static open(s){const i=new this;this.instance=i,this.inertStore=[...document.body.children].filter(a=>!a.inert),this.inertStore.forEach(a=>a.inert=!0),document.body.append(i);const r=()=>z(this.store,{[$t]:!0,...s});return setTimeout(()=>{r(),y.push({title:i.label,open:r,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),t}static close(){return y.back(),t}static closeHandle(){var s;return this.inertStore.forEach(i=>i.inert=!1),(s=this.instance)==null||s.remove(),z(this.store,{[$t]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=ge({[$t]:!1,...n}),e}var Bi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,vn=(n,e,t,s)=>{for(var i=s>1?void 0:s?Fi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Bi(e,t,i),i},Ns=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ce=(n,e,t)=>(Ns(n,e,"read from private field"),t?t.call(n):e.get(n)),En=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Sn=(n,e,t,s)=>(Ns(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,Be,Fe;const Ke=Symbol();o.GemDialogBaseElement=class extends R{constructor(){super(),En(this,je,void 0),En(this,Be,void 0),En(this,Fe,[]),this.closeHandle=()=>{var e;return this.inert=!0,Ce(this,Fe).forEach(t=>t.inert=!1),Ce(this,je)?Ce(this,je).before(this):Ce(this,Be)&&((e=Ce(this,Be))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ke},this.openHandle=()=>(this.hidden=!1,this.inert=!1,Sn(this,je,this.nextSibling),Sn(this,Be,this.parentElement||this.getRootNode()),Sn(this,Fe,[...document.body.children].filter(e=>!e.inert)),Ce(this,Fe).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ke),this.open=()=>{if(!this.opened)return this.openHandle(),y.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ke},this.close=()=>(y.back(),Ke),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ke),this.effect(()=>this.inert=!0,()=>[]),this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},je=new WeakMap,Be=new WeakMap,Fe=new WeakMap,vn([C],o.GemDialogBaseElement.prototype,"label",2),vn([wt],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=vn([_t(y.store)],o.GemDialogBaseElement);const Os=new WeakMap;function Rs(n){return Os.get(n)}const As=new WeakMap;function Ki(n){return As.get(n)}const Hs=new WeakMap;function Gs(n){const e=He(),t=document.createElement("style"),s=ge(n),i={},r={};As.set(i,r),Os.set(i,s);const a=()=>Object.keys(s).forEach(u=>{r[u]||(r[u]=`--${D(u)}-${e}`,i[u]=`var(${r[u]})`)});Hs.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((u,m)=>u+`${r[m]}:${s[m]};`,"")}}`,l=()=>t.textContent=c();return ne(s,l),l(),(document.head||document.documentElement).append(t),i}function Ws(n,e){z(Rs(n),e),Hs.get(n)()}function zi(n){const e=Gs(n);return[e,t=>Ws(e,t)]}class Ji{constructor(e){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=e}}const Qi=new Ji("GEM"),Xi=/\$\d(?:<[^>]*>)?/,Yi=/\$(\d)(<([^>]*)>)?/g,Zi=3;function Is(n,...e){const t=n.split(Xi),s=[];let i;for(;i=Yi.exec(n);){const r=i[Zi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const ze=new Set,Pn=class Pn{constructor(e){N(this,Le);N(this,Ot);N(this,Rt);N(this,de);N(this,Te);if(this.cachePrefix="gem-i18n",this.replace=({path:i})=>this.setLanguage(i),this.getParams=()=>({path:this.currentLanguage}),!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=ge(this),Object.assign(this,e);let t=g(this,Ot,Bs)||this.currentLanguage||g(this,Rt,Fs);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(Y(this,Te,t,Ht),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?Is(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,de,Ze)&&ze.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return Qi.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let u=0;u<localStorage.length;u++){const m=localStorage.key(u);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,z(this.store),e!==this.currentLanguage&&Y(this,Te,e,Ht),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,de,Ze)&&ze.forEach(e=>e.resetLanguage()),Y(this,Te,this.fallbackLanguage,Ht),this.cache&&localStorage.removeItem(g(this,Le,At)),this.setLanguage(this.detectLanguage())}setCache(){g(this,de,Ze)&&ze.forEach(e=>e.setCache()),localStorage.setItem(g(this,Le,At),this.currentLanguage)}createSubModule(e,t){const s=new Pn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return ze.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};Le=new WeakSet,At=function(){return`${this.cachePrefix}:current`},Ot=new WeakSet,Bs=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},Rt=new WeakSet,Fs=function(){return this.cache&&localStorage.getItem(g(this,Le,At))||""},de=new WeakSet,Ze=function(){return!ze.has(this)},Te=new WeakSet,Ht=function(e){var t;g(this,de,Ze)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};let bn=Pn;const xs={headers:{"Content-Type":"application/json"}};async function Je(n,e={}){const t=await fetch(n,{...xs,...e});if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const er=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Vs(n){return n instanceof FormData||n instanceof Blob||n instanceof er||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function Ds(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function tr(n,e){return Je(Ds(n,e),{method:"GET"})}function nr(n,e){return Je(Ds(n,e),{method:"DELETE"})}function sr(n,e){return Je(n,{method:"PUT",body:Vs(e)})}function ir(n,e){return Je(n,{method:"POST",body:Vs(e)})}const A=n=>window.matchMedia(n).matches,rr={PRINT:"print",get isPrint(){return A(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return A(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return A(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return A(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return A(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return A(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return A(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return A(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return A(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return A(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return A(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return A(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return A(this.WIDTHSCREEN)}};o.GemElement=R,o.GemError=K,o.GemLightRouteElement=vs,o.GemReflectElement=Tt,o.GemRouteElement=fn,o.GemTitleElement=be,o.GemUnsafeElement=Lt,o.GemUseElement=Pe,o.I18n=bn,o.LinkedList=qn,o.PREFIX=Ps,o.PropProxyMap=Un,o.QueryString=pe,o.SUFFIX=Cs,o.SVGTemplateResult=It,o.SheetToken=Bt,o.StoreListenerMap=me,o.TemplateResult=Ne,o.absoluteLocation=Ut,o.addListener=jt,o.addMicrotask=H,o.addMicrotaskToStack=ii,o.adoptedStyle=_i,o.attribute=C,o.basePathStore=ps,o.boolattribute=on,o.camelToKebabCase=D,o.classMap=Kn,o.cleanObject=et,o.connect=ne,o.connectStore=_t,o.createCSSSheet=oi,o.createHistoryParams=ws,o.createModalClass=ji,o.createPath=Pt,o.createStore=ge,o.createTheme=Gs,o.css=ri,o.customElement=Ei,o.defaultReqInit=xs,o.defineAttribute=pt,o.defineCSSState=gt,o.defineProperty=we,o.defineRef=mt,o.del=nr,o.directive=Z,o.disconnect=di,o.emitter=xe,o.exportPartsMap=ui,o.get=tr,o.getThemeProps=Ki,o.getThemeStore=Rs,o.globalemitter=wi,o.guard=es,o.history=y,o.html=V,o.ifDefined=Qt,o.isArrayChange=Bn,o.kebabToCamelCase=te,o.matchPath=un,o.mediaQuery=rr,o.nativeDefineElement=yt,o.numattribute=gi,o.objectMapToString=tt,o.part=rs,o.partMap=hi,o.post=ir,o.property=T,o.put=sr,o.randomStr=He,o.raw=Ae,o.refobject=mi,o.removeItems=Fn,o.render=qt,o.repeat=Zn,o.request=Je,o.rootElement=vi,o.slot=yi,o.splice=Is,o.state=wt,o.styleMap=li,o.styled=ci,o.svg=Dn,o.titleStore=ve,o.updateStore=z,o.updateTheme=Ws,o.useStore=nt,o.useTheme=zi,o.version=zn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
222
|
+
`)},()=>[this.content,this.contentcss])}render(){}}$s([C],$t.prototype,"content",2),$s([C],$t.prototype,"contentcss",2),customElements.define("gem-unsafe",$t);var Gi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Ls=(n,e,t,s)=>{for(var i=s>1?void 0:s?Wi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Gi(e,t,i),i};const Ii="gem-reflect-start",ks="gem-reflect-end",Ts=n=>new Comment(n),xi=n=>{const e=[];let t=n;for(;t&&(e.push(t),t.nodeValue!==ks);)t=t.nextSibling;return e};class Lt extends A{constructor(){super({isLight:!0});N(this,Mt);this.target=document.head,this.effect(()=>{this.hidden=!0,this.dataset.gemReflect=""},()=>[]);const t=Ts(Ii),s=Ts(ks);let i;this.effect(()=>((i||[t,...this.childNodes,s]).forEach((r,a,c)=>{const l=c[a-1];l?l.after(r):this.target[w(this,Mt,Ds)](r)}),()=>{i=xi(t),i.forEach(r=>r.remove())}),()=>[this.target])}}Mt=new WeakSet,Ds=function(){return this.method||"append"},Ls([C],Lt.prototype,"method",2),Ls([k],Lt.prototype,"target",2),customElements.define("gem-reflect",Lt);const kt=Symbol("open mark");function Vi(n){var e;const t=Symbol();return e=class extends A{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[kt]}static get observedStores(){return[v.store,this.store]}static open(s){const i=new this;this.instance=i,this.inertStore=[...document.body.children].filter(a=>!a.inert),this.inertStore.forEach(a=>a.inert=!0),document.body.append(i);const r=()=>z(this.store,{[kt]:!0,...s});return setTimeout(()=>{r(),v.push({title:i.label,open:r,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),t}static close(){return v.back(),t}static closeHandle(){var s;return this.inertStore.forEach(i=>i.inert=!1),(s=this.instance)==null||s.remove(),z(this.store,{[kt]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=ge({[kt]:!1,...n}),e}var Di=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,_n=(n,e,t,s)=>{for(var i=s>1?void 0:s?qi(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Di(e,t,i),i},Ms=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ce=(n,e,t)=>(Ms(n,e,"read from private field"),t?t.call(n):e.get(n)),vn=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},En=(n,e,t,s)=>(Ms(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),Ue,Be,Fe;const Ke=Symbol();o.GemDialogBaseElement=class extends A{constructor(){super(),vn(this,Ue,void 0),vn(this,Be,void 0),vn(this,Fe,[]),this.closeHandle=()=>{var e;return this.inert=!0,Ce(this,Fe).forEach(t=>t.inert=!1),Ce(this,Ue)?Ce(this,Ue).before(this):Ce(this,Be)&&((e=Ce(this,Be))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ke},this.openHandle=()=>(this.hidden=!1,this.inert=!1,En(this,Ue,this.nextSibling),En(this,Be,this.parentElement||this.getRootNode()),En(this,Fe,[...document.body.children].filter(e=>!e.inert)),Ce(this,Fe).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ke),this.open=()=>{if(!this.opened)return this.openHandle(),v.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ke},this.close=()=>(v.back(),Ke),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ke),this.effect(()=>this.inert=!0,()=>[]),this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},Ue=new WeakMap,Be=new WeakMap,Fe=new WeakMap,_n([C],o.GemDialogBaseElement.prototype,"label",2),_n([yt],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=_n([wt(v.store)],o.GemDialogBaseElement);const Ns=new WeakMap;function Os(n){return Ns.get(n)}const As=new WeakMap;function ji(n){return As.get(n)}const Rs=new WeakMap;function Hs(n){const e=He(),t=document.createElement("style"),s=ge(n),i={},r={};As.set(i,r),Ns.set(i,s);const a=()=>Object.keys(s).forEach(u=>{r[u]||(r[u]=`--${D(u)}-${e}`,i[u]=`var(${r[u]})`)});Rs.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((u,p)=>u+`${r[p]}:${s[p]};`,"")}}`,l=()=>t.textContent=c();return ne(s,l),l(),(document.head||document.documentElement).append(t),i}function Gs(n,e){z(Os(n),e),Rs.get(n)()}function Ui(n){const e=Hs(n);return[e,t=>Gs(e,t)]}class Bi{constructor(e){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=e}}const Fi=new Bi("GEM"),Ki=/\$\d(?:<[^>]*>)?/,zi=/\$(\d)(<([^>]*)>)?/g,Ji=3;function Ws(n,...e){const t=n.split(Ki),s=[];let i;for(;i=zi.exec(n);){const r=i[Ji],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const ze=new Set,bn=class bn{constructor(e){N(this,Le);N(this,Nt);N(this,Ot);N(this,de);N(this,ke);if(this.cachePrefix="gem-i18n",this.replace=({path:i})=>this.setLanguage(i),this.getParams=()=>({path:this.currentLanguage}),!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=ge(this),Object.assign(this,e);let t=w(this,Nt,qs)||this.currentLanguage||w(this,Ot,js);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(Y(this,ke,t,Rt),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?Ws(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){w(this,de,Ye)&&ze.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return Fi.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let u=0;u<localStorage.length;u++){const p=localStorage.key(u);p.startsWith(i)&&localStorage.removeItem(p)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,z(this.store),e!==this.currentLanguage&&Y(this,ke,e,Rt),this.cache===!0&&this.setCache(),e}resetLanguage(){return w(this,de,Ye)&&ze.forEach(e=>e.resetLanguage()),Y(this,ke,this.fallbackLanguage,Rt),this.cache&&localStorage.removeItem(w(this,Le,At)),this.setLanguage(this.detectLanguage())}setCache(){w(this,de,Ye)&&ze.forEach(e=>e.setCache()),localStorage.setItem(w(this,Le,At),this.currentLanguage)}createSubModule(e,t){const s=new bn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return ze.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};Le=new WeakSet,At=function(){return`${this.cachePrefix}:current`},Nt=new WeakSet,qs=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},Ot=new WeakSet,js=function(){return this.cache&&localStorage.getItem(w(this,Le,At))||""},de=new WeakSet,Ye=function(){return!ze.has(this)},ke=new WeakSet,Rt=function(e){var t;w(this,de,Ye)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};let Sn=bn;const Qi=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Is(n={}){const{origin:e=location.origin,base:t="",appendHeaders:s=()=>({}),transformInput:i=h=>h,transformOutput:r=h=>h,...a}=n,c=h=>h instanceof FormData||h instanceof Blob||h instanceof Qi||h instanceof URLSearchParams||h instanceof ReadableStream||h instanceof ArrayBuffer?h:typeof h=="object"?JSON.stringify(h):h,l=(h,g)=>{if(new URL(h,location.origin).pathname!==h)throw new K("`path` format is incorrect");const d=new URLSearchParams(g).toString();return`${e}${t}${h}${d?"?":""}${d}`},u=h=>{if(!h)return{};if(h instanceof Headers)return Object.fromEntries(h);const g=Array.isArray(h)?h:Object.entries(h);return Object.fromEntries(g.map(([d,m])=>[d.toLowerCase(),m]))},p=async(h,g={})=>{const d=new Request(h,{...a,...g,headers:new Headers({"content-type":"application/json",...u(a.headers),...u(g.headers)})}),m=await fetch(d);if(m.status===0)throw new Error("Request fail");if(m.status>=500)throw new Error(m.statusText);const y=d.headers.get("content-type"),E=m.status>=400;try{let _;if(y.includes("json")?_=await m.json():y.includes("octet-stream")?_=await m.arrayBuffer():_=await m.text(),E)throw new Error(m.statusText,{cause:_});return r(_,d)}catch{throw new Error("Parse error")}};return{request:p,get(h,g){const d=i(g);return p(l(h,d),{method:"GET",headers:s(d)})},del(h,g){const d=i(g);return p(l(h,d),{method:"DELETE",headers:s(d)})},put(h,g){const d=i(g);return p(l(h),{method:"PUT",headers:s(d),body:c(d)})},post(h,g){const d=i(g);return p(l(h),{method:"POST",headers:s(d),body:c(d)})}}}const{request:Xi,del:Yi,get:Zi,post:er,put:tr}=Is(),R=n=>window.matchMedia(n).matches,nr={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return R(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return R(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return R(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return R(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)}};o.GemElement=A,o.GemError=K,o.GemLightRouteElement=_s,o.GemReflectElement=Lt,o.GemRouteElement=dn,o.GemTitleElement=be,o.GemUnsafeElement=$t,o.GemUseElement=Pe,o.I18n=Sn,o.LinkedList=Dn,o.PREFIX=bs,o.PropProxyMap=qn,o.QueryString=pe,o.SUFFIX=Ps,o.SVGTemplateResult=Wt,o.SheetToken=Ut,o.StoreListenerMap=me,o.TemplateResult=Ne,o.absoluteLocation=qt,o.addListener=jt,o.addMicrotask=H,o.addMicrotaskToStack=ti,o.adoptedStyle=mi,o.attribute=C,o.basePathStore=fs,o.boolattribute=rn,o.camelToKebabCase=D,o.classMap=Bn,o.cleanObject=Ze,o.connect=ne,o.connectStore=wt,o.createCSSSheet=si,o.createHistoryParams=ys,o.createModalClass=Vi,o.createPath=bt,o.createStore=ge,o.createTheme=Hs,o.css=ni,o.customElement=yi,o.defineAttribute=ft,o.defineCSSState=mt,o.defineProperty=we,o.defineRef=pt,o.del=Yi,o.directive=Z,o.disconnect=ci,o.emitter=xe,o.exportPartsMap=ai,o.get=Zi,o.getThemeProps=ji,o.getThemeStore=Os,o.globalemitter=pi,o.guard=Yn,o.history=v,o.html=V,o.ifDefined=Jt,o.initRequest=Is,o.isArrayChange=jn,o.kebabToCamelCase=te,o.matchPath=hn,o.mediaQuery=nr,o.nativeDefineElement=gt,o.numattribute=di,o.objectMapToString=et,o.part=is,o.partMap=oi,o.post=er,o.property=k,o.put=tr,o.randomStr=He,o.raw=Re,o.refobject=ui,o.removeItems=Un,o.render=Dt,o.repeat=Xn,o.request=Xi,o.rootElement=gi,o.slot=fi,o.splice=Ws,o.state=yt,o.styleMap=ri,o.styled=ii,o.svg=Vn,o.titleStore=ve,o.updateStore=z,o.updateTheme=Gs,o.useStore=tt,o.useTheme=Ui,o.version=Fn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -122,7 +122,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
|
|
|
122
122
|
click(): void;
|
|
123
123
|
hidePopover(): void;
|
|
124
124
|
showPopover(): void;
|
|
125
|
-
togglePopover(force?: boolean | undefined):
|
|
125
|
+
togglePopover(force?: boolean | undefined): boolean;
|
|
126
126
|
addEventListener<K_2 extends keyof HTMLElementEventMap>(type: K_2, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
127
127
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
128
128
|
removeEventListener<K_3 extends keyof HTMLElementEventMap>(type: K_3, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
@@ -258,6 +258,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
|
|
|
258
258
|
ariaColIndex: string | null;
|
|
259
259
|
ariaColSpan: string | null;
|
|
260
260
|
ariaCurrent: string | null;
|
|
261
|
+
ariaDescription: string | null;
|
|
261
262
|
ariaDisabled: string | null;
|
|
262
263
|
ariaExpanded: string | null;
|
|
263
264
|
ariaHasPopup: string | null;
|
|
@@ -328,6 +329,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
|
|
|
328
329
|
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
329
330
|
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
330
331
|
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
332
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
331
333
|
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
332
334
|
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
335
|
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-factory.d.ts","sourceRoot":"","sources":["../../src/elements/base/modal-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,QAAA,MAAM,IAAI,eAAsB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;;;;;;;;;;;;;;8CAiD1E;;;eAGG;;;;;;;;8CAHH;;;eAGG;;;;;;;;;;;8CAHH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAHH;;;eAGG;;;;;;;8CAHH;;;eAGG
|
|
1
|
+
{"version":3,"file":"modal-factory.d.ts","sourceRoot":"","sources":["../../src/elements/base/modal-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,QAAA,MAAM,IAAI,eAAsB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;;;;;;;;;;;;;;8CAiD1E;;;eAGG;;;;;;;;8CAHH;;;eAGG;;;;;;;;;;;8CAHH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAHH;;;eAGG;;;;;;;8CAHH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAhDgB,WAAW,EAAE;cACf,UAAU,GAAG,IAAI;IAClC;;;OAGG;;;;IAMH,YAAY;;IAKZ,YAAY;;;;IAKZ;;;;OAIG;eACe,CAAC;IAmBnB;;;OAGG;;IAMH;;;OAGG;;IAQH;;OAEG;;;;;;;;;;;;;EAaN"}
|
package/helper/request.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
export declare const defaultReqInit: RequestInit;
|
|
2
|
-
export declare function request<T>(uri: string, options?: RequestInit): Promise<T>;
|
|
3
1
|
type ReqBody = Record<string, unknown> | BodyInit;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
type ReqParams = Record<string, string | number>;
|
|
3
|
+
type Options = {
|
|
4
|
+
origin?: string;
|
|
5
|
+
base?: string;
|
|
6
|
+
appendHeaders?: (input?: any) => HeadersInit;
|
|
7
|
+
transformInput?: (input?: any) => any;
|
|
8
|
+
transformOutput?: (output: any, req: Request) => any;
|
|
9
|
+
} & RequestInit;
|
|
10
|
+
declare function initRequest(options?: Options): {
|
|
11
|
+
request: <T>(uri: string, reqOptions?: RequestInit) => Promise<T>;
|
|
12
|
+
get<T_1>(path: string, params?: ReqParams): Promise<T_1>;
|
|
13
|
+
del<T_2>(path: string, params?: ReqParams): Promise<T_2>;
|
|
14
|
+
put<T_3>(path: string, body?: ReqBody): Promise<T_3>;
|
|
15
|
+
post<T_4>(path: string, body?: ReqBody): Promise<T_4>;
|
|
16
|
+
};
|
|
17
|
+
declare const request: <T>(uri: string, reqOptions?: RequestInit) => Promise<T>, del: <T>(path: string, params?: ReqParams) => Promise<T>, get: <T>(path: string, params?: ReqParams) => Promise<T>, post: <T>(path: string, body?: ReqBody) => Promise<T>, put: <T>(path: string, body?: ReqBody) => Promise<T>;
|
|
18
|
+
export { initRequest, request, del, get, post, put };
|
|
9
19
|
//# sourceMappingURL=request.d.ts.map
|
package/helper/request.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/helper/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/helper/request.ts"],"names":[],"mappings":"AAEA,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;AAClD,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAGjD,KAAK,OAAO,GAAG;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,WAAW,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,KAAK,GAAG,CAAC;CACtD,GAAG,WAAW,CAAC;AAEhB,iBAAS,WAAW,CAAC,OAAO,GAAE,OAAY;sBA2CT,MAAM,eAAc,WAAW,KAAQ,QAAQ,CAAC,CAAC;mBAmCjE,MAAM,WAAW,SAAS;mBAO1B,MAAM,WAAW,SAAS;mBAO1B,MAAM,SAAS,OAAO;oBAQrB,MAAM,SAAS,OAAO;EASvC;AAED,QAAA,MAAQ,OAAO,WApEkB,MAAM,eAAc,WAAW,KAAQ,QAAQ,CAAC,CAAC,EAoEjE,GAAG,YA1BH,MAAM,WAAW,SAAS,iBA0BrB,GAAG,YAjCR,MAAM,WAAW,SAAS,iBAiChB,IAAI,YAXb,MAAM,SAAS,OAAO,iBAWP,GAAG,YAnBnB,MAAM,SAAS,OAAO,eAmBe,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC"}
|