@mantou/gem 1.7.10 → 1.7.11
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 +1788 -2574
- package/dist/gem.umd.js +24 -24
- package/elements/base/gesture.d.ts +1 -3
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +2 -3
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +2 -0
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +2 -0
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +20 -20
- package/elements/base/reflect.d.ts +5 -0
- package/elements/base/reflect.d.ts.map +1 -1
- package/elements/base/reflect.js +26 -7
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +9 -7
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +23 -7
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +1 -1
- package/elements/base/title.js +1 -1
- package/elements/base/unsafe.d.ts +1 -2
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +1 -2
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts +1 -1
- package/elements/base/use.js +1 -1
- package/helper/i18n.d.ts +1 -1
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +2 -3
- package/helper/i18n.js.map +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +3 -1
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +2 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -1
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/src/elements/base/gesture.ts +3 -3
- package/src/elements/base/link.ts +2 -0
- package/src/elements/base/reflect.ts +18 -6
- package/src/elements/base/route.ts +32 -11
- package/src/elements/base/title.ts +1 -1
- package/src/elements/base/unsafe.ts +1 -2
- package/src/elements/base/use.ts +1 -1
- package/src/helper/i18n.ts +2 -4
- package/src/lib/store.ts +3 -1
- package/src/lib/utils.ts +3 -3
- package/src/lib/version.ts +1 -1
package/dist/gem.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Cn=(o,v,L)=>{if(!v.has(o))throw TypeError("Cannot "+L)};var g=(o,v,L)=>(Cn(o,v,"read from private field"),L?L.call(o):v.get(o)),N=(o,v,L)=>{if(v.has(o))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(o):v.set(o,L)},Y=(o,v,L,Z)=>(Cn(o,v,"write to private field"),Z?Z.call(o,L):v.set(o,L),L);var kn=(o,v,L)=>(Cn(o,v,"access private method"),L);(function(o,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(o=typeof globalThis<"u"?globalThis:o||self,v(o.Gem={}))})(this,function(o){var oe,X,ae,Qe,Ln,ke,Mt,Xe,Nt,js,Le,At,Ot,Bs,Rt,Fs,de,Ze,Te,Ht;"use strict";const v=Object.freeze(Object.defineProperty({__proto__:null,get GemElement(){return R},get SVGTemplateResult(){return It},get TemplateResult(){return Ne},get defineAttribute(){return pt},get defineCSSState(){return gt},get defineProperty(){return we},get defineRef(){return mt},get directive(){return Z},get guard(){return es},get html(){return V},get ifDefined(){return Qt},get nativeDefineElement(){return yt},get render(){return qt},get repeat(){return Zn},get svg(){return Dn}},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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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
|
|
13
|
+
*/const L=new WeakMap,Z=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t},$e=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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 Tn=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,$n=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},Gt=(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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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
|
|
37
|
+
*/const x={},Mn={};/**
|
|
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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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
|
|
49
|
+
*/const ee=`{{lit-${String(Math.random()).slice(2)}}}`,Nn=`<!--${ee}-->`,On=new RegExp(`${ee}|${Nn}`),Me="$lit$";class Ks{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:m}}=e;for(;l<m;){const d=r.nextNode();if(d===null){r.currentNode=i.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){const b=d.attributes,{length:f}=b;let w=0;for(let p=0;p<f;p++)Rn(b[p].name,Me)&&w++;for(;w-- >0;){const p=u[l],E=Wt.exec(p)[2],S=E.toLowerCase()+Me,B=d.getAttribute(S);d.removeAttribute(S);const I=B.split(On);this.parts.push({type:"attribute",index:c,name:E,strings:I}),l+=I.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const b=d.data;if(b.indexOf(ee)>=0){const f=d.parentNode,w=b.split(On),p=w.length-1;for(let E=0;E<p;E++){let S,B=w[E];if(B==="")S=F();else{const I=Wt.exec(B);I!==null&&Rn(I[2],Me)&&(B=B.slice(0,I.index)+I[1]+I[2].slice(0,-Me.length)+I[3]),S=document.createTextNode(B)}f.insertBefore(S,d),this.parts.push({type:"node",index:++c})}w[p]===""?(f.insertBefore(F(),d),s.push(d)):d.data=w[p],l+=p}}else if(d.nodeType===8)if(d.data===ee){const b=d.parentNode;(d.previousSibling===null||c===a)&&(c++,b.insertBefore(F(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(s.push(d),c--),l++}else{let b=-1;for(;(b=d.data.indexOf(ee,b+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const d of s)d.parentNode.removeChild(d)}}const Rn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},zs=n=>n.index!==-1,F=()=>document.createComment(""),Wt=/([ \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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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
|
|
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=Tn?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],!zs(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 Tn&&(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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 Hn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),Js=` ${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=Wt.exec(r);c===null?t+=r+(s?Js:Nn):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 Hn!==void 0&&(t=Hn.createHTML(t)),e.innerHTML=t,e}}class It extends Ne{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),$n(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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 xt=n=>n===null||!(typeof n=="object"||typeof n=="function"),
|
|
85
|
+
*/const xt=n=>n===null||!(typeof n=="object"||typeof n=="function"),Vt=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class Gn{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 Dt(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"||!Vt(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(xt(c)||!Vt(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 Dt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==x&&(!xt(e)||e!==this.value)&&(this.value=e,$e(e)||(this.committer.dirty=!0))}commit(){for(;$e(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(;$e(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=x,t(this)}const e=this.__pendingValue;e!==x&&(xt(e)?e!==this.value&&this.__commitText(e):e instanceof Ne?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Vt(e)?this.__commitIterable(e):e===Mn?(this.value=Mn,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){Gt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Qs{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(;$e(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 Xs extends Gn{constructor(e,t,s){super(e,t,s),this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new Ys(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Ys extends Dt{}let Wn=!1;(()=>{try{const n={get capture(){return Wn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class Zs{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(;$e(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=ei(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 ei=n=>n&&(Wn?{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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 ti{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new Xs(e,t.slice(1),s).parts:r==="@"?[new Zs(e,t.slice(1),i.eventContext)]:r==="?"?[new Qs(e,t.slice(1),s)]:new Gn(e,t,s).parts}handleTextExpression(e){return new fe(e)}}const In=new ti;/**
|
|
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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 ni(n){let e=xn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},xn.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 Ks(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const xn=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 gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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 Vn=new WeakMap,qt=(n,e,t)=>{let s=Vn.get(e);s===void 0&&(Gt(e,e.firstChild),Vn.set(e,s=new fe(Object.assign({templateFactory:ni},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,8 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(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
|
|
134
|
-
)*)}`,"g");function
|
|
133
|
+
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ne(n,e,"html",In),Dn=(n,...e)=>new It(n,e,"svg",In),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 Re=[];function si(){for(let n=Re.length-1;n>=0;n--)Re[n]();Re.length=0}function ii(n){Re.length||H(si),Re.push(n)}function Ut(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 qn extends EventTarget{constructor(){super(...arguments);N(this,Qe);N(this,oe,new Map);N(this,X,void 0);N(this,ae,void 0)}get size(){return g(this,oe).size}get first(){return g(this,X)}get last(){return g(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 g(this,oe).get(t)}add(t){g(this,ae)||this.dispatchEvent(new CustomEvent("start"));const s=kn(this,Qe,Ln).call(this,t)||{value:t};s.prev=g(this,ae),s.prev&&(s.prev.next=s),s.next=void 0,Y(this,ae,s),g(this,X)||Y(this,X,s),g(this,oe).set(t,s)}delete(t){const s=kn(this,Qe,Ln).call(this,t);return g(this,X)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=g(this,X);if(t)return this.delete(t.value),t.value}}oe=new WeakMap,X=new WeakMap,ae=new WeakMap,Qe=new WeakSet,Ln=function(t){const s=g(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),g(this,oe).delete(t)),s};class Un 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,ke,t=>typeof t=="string"?t:JSON.stringify(t));N(this,Mt,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,g(this,ke).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,g(this,ke).call(this,i)));else{const i=g(this,ke).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=>g(this,Mt).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}ke=new WeakMap,Mt=new WeakMap;function Ae(n,...e){return n.reduce((t,s,i)=>t+(e[i-1]??"")+s)}function ri(n,...e){return Ae(n,...e)}const Bt=Symbol.for("gem@sheetToken");function oi(n,e=""){const t=new CSSStyleSheet,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${He()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Bt]=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 ai=new RegExp(`&.*{((.|
|
|
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"}));/**
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
137
137
|
* This code may only be used under the BSD style license found at
|
|
@@ -143,7 +143,7 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
143
143
|
* Code distributed by Google as part of the polymer project is also
|
|
144
144
|
* subject to an additional IP rights grant found at
|
|
145
145
|
* http://polymer.github.io/PATENTS.txt
|
|
146
|
-
*/const
|
|
146
|
+
*/const Jn=(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),Ft=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&$n(s,e.startNode,r,i)},Kt=n=>{Gt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},Qn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Xn=new WeakMap,Yn=new WeakMap,Zn=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=Xn.get(i)||[],a=Yn.get(i)||[],c=[],l=[],u=[];let m=0;for(const S of n)u[m]=s?s(S,m):m,l[m]=t(S,m),m++;let d,b,f=0,w=r.length-1,p=0,E=l.length-1;for(;f<=w&&p<=E;)if(r[f]===null)f++;else if(r[w]===null)w--;else if(a[f]===u[p])c[p]=ce(r[f],l[p]),f++,p++;else if(a[w]===u[E])c[E]=ce(r[w],l[E]),w--,E--;else if(a[f]===u[E])c[E]=ce(r[f],l[E]),Ft(i,r[f],c[E+1]),f++,E--;else if(a[w]===u[p])c[p]=ce(r[w],l[p]),Ft(i,r[w],r[f]),w--,p++;else if(d===void 0&&(d=Qn(u,p,E),b=Qn(a,f,w)),!d.has(a[f]))Kt(r[f]),f++;else if(!d.has(a[w]))Kt(r[w]),w--;else{const S=b.get(u[p]),B=S!==void 0?r[S]:null;if(B===null){const I=Jn(i,r[f]);ce(I,l[p]),c[p]=I}else c[p]=ce(B,l[p]),Ft(i,B,r[f]),r[S]=null;p++}for(;p<=E;){const S=Jn(i,c[E+1]);ce(S,l[p]),c[p++]=S}for(;f<=w;){const S=r[f++];S!==null&&Kt(S)}Xn.set(i,c),Yn.set(i,u)}});/**
|
|
147
147
|
* @license
|
|
148
148
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
149
149
|
* This code may only be used under the BSD style license found at
|
|
@@ -155,7 +155,7 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
155
155
|
* Code distributed by Google as part of the polymer project is also
|
|
156
156
|
* subject to an additional IP rights grant found at
|
|
157
157
|
* http://polymer.github.io/PATENTS.txt
|
|
158
|
-
*/const
|
|
158
|
+
*/const zt=new WeakMap,es=Z((n,e)=>t=>{const s=zt.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||zt.has(t)))return;t.setValue(e()),zt.set(t,Array.isArray(n)?Array.from(n):n)});/**
|
|
159
159
|
* @license
|
|
160
160
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
161
161
|
* This code may only be used under the BSD style license found at
|
|
@@ -167,15 +167,15 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
167
167
|
* Code distributed by Google as part of the polymer project is also
|
|
168
168
|
* subject to an additional IP rights grant found at
|
|
169
169
|
* http://polymer.github.io/PATENTS.txt
|
|
170
|
-
*/const Kt=new WeakMap,zt=te(n=>e=>{const t=Kt.get(e);if(n===void 0&&e instanceof Wt){if(t!==void 0||!Kt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Kt.set(e,n)});var Bn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},u=(n,e,t)=>(Bn(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)},A=(n,e,t,s)=>(Bn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),we,Ge,re,xe,X,Ie,Y,oe,nt,st,Jt,Qt,Xt,it,Yt,rt,le,Zt,ot,at,ct;function si(){}function en(n){typeof n=="function"&&n()}const lt=new Rn,tn=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(tn);const e=lt.get();e&&(e(),tn(n))};lt.addEventListener("start",()=>G(tn));const ht=Symbol("constructor"),ut=Symbol("init"),Kn=Symbol("update"),We=class extends HTMLElement{constructor(n={}){super(),_(this,Ge,void 0),_(this,re,void 0),_(this,xe,void 0),_(this,X,void 0),_(this,Ie,void 0),_(this,Y,void 0),_(this,oe,void 0),_(this,nt,void 0),this.setState=s=>{if(!this.state)throw new J("`state` not initialized");Object.assign(this.state,s),G(u(this,le))},_(this,st,s=>{s==null||s.forEach(i=>{const{callback:r,getDep:a,values:c,preCallback:l}=i,h=a==null?void 0:a();(!a||!c||Gn(c,h))&&(en(l),i.preCallback=r(h,c),i.values=h)})}),_(this,Jt,()=>{u(this,st).call(this,u(this,Y))}),_(this,Qt,()=>{u(this,st).call(this,u(this,oe))}),this.effect=(s,i)=>{u(this,Y)||A(this,Y,[]);const r={callback:s,getDep:i,initialized:u(this,X),inConstructor:this[ht]};u(this,X)&&(r.values=i==null?void 0:i(),r.preCallback=s(r.values)),u(this,Y).push(r)},this.memo=(s,i)=>{u(this,oe)||A(this,oe,[]),u(this,oe).push({callback:s,getDep:i,inConstructor:this[ht]})},_(this,Xt,()=>{var s;(s=u(this,Y))==null||s.forEach(i=>{const{callback:r,getDep:a,initialized:c}=i;c||(i.values=a==null?void 0:a(),i.preCallback=r(i.values),i.initialized=!0)})}),_(this,it,()=>{u(this,Qt).call(this);const s=u(this,Ge)===this,i=this.render?this.render():s?void 0:z`<slot></slot>`;i!==void 0&&Vt(i,u(this,Ge))}),_(this,Yt,()=>this.shouldUpdate?this.shouldUpdate():!0),_(this,rt,()=>{u(this,X)&&u(this,Yt).call(this)&&(u(this,it).call(this),G(u(this,Zt)),G(u(this,Jt)))}),_(this,le,()=>{u(this,Ie)?lt.add(u(this,rt)):u(this,rt).call(this)}),this.update=()=>{G(u(this,le))},_(this,Zt,()=>{var s;(s=this.updated)==null||s.call(this)}),_(this,ot,void 0),_(this,at,()=>{var r,a,c;if(u(this,xe)){A(this,xe,!1);return}Reflect.set(this,ht,!1),(r=this.willMount)==null||r.call(this);const{observedStores:s,rootElement:i}=this.constructor;if(A(this,ot,s==null?void 0:s.map(l=>ie(l,u(this,le)))),u(this,it).call(this),A(this,X,!0),A(this,nt,(a=this.mounted)==null?void 0:a.call(this)),u(this,Xt).call(this),i&&this.isConnected&&((c=this.getRootNode().host)==null?void 0:c.tagName)!==i.toUpperCase())throw new J("not allow current root type")}),_(this,ct,s=>s==null?void 0:s.filter(i=>(en(i.preCallback),i.initialized=!1,i.inConstructor))),G(()=>Reflect.set(this,ut,!1)),Reflect.set(this,ht,!0),Reflect.set(this,ut,!0),Reflect.set(this,Kn,()=>{u(this,X)&&G(u(this,le))}),A(this,Ie,n.isAsync),A(this,Ge,n.isLight?this:this.attachShadow({mode:n.mode||"open",delegatesFocus:n.delegatesFocus,slotAssignment:n.slotAssignment}));let e;this.effect(([s=!1])=>{if(e===void 0&&(e=this.hasAttribute("tabindex")),this.internals.ariaDisabled=String(s),n.focusable&&!e&&(this.tabIndex=-Number(s)),(n.focusable||n.delegatesFocus)&&s)return jt(this,"click",i=>i.isTrusted&&i.stopImmediatePropagation(),{capture:!0})},()=>[Reflect.get(this,"disabled")]);const{adoptedStyleSheets:t}=new.target;if(t){const s=t.map(i=>i[Ut]||i);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=s:this.effect(()=>{const i=this.getRootNode();return i.adoptedStyleSheets=[...i.adoptedStyleSheets,...s],()=>{i.adoptedStyleSheets=xn(i.adoptedStyleSheets,s)}},()=>[])}}get internals(){if(!u(this,re)){A(this,re,this.attachInternals());try{u(this,re).states.add("foo"),u(this,re).states.delete("foo")}catch{Reflect.defineProperty(u(this,re),"states",{value:{has:n=>se(n)in this.dataset,add:n=>this.dataset[se(n)]="",delete:n=>delete this.dataset[se(n)]}})}}return u(this,re)}attributeChangedCallback(){return u(this,X)&&G(u(this,le)),u(We,we)}closestElement(n){const e=typeof n=="function",t=typeof n=="string"&&n.toUpperCase(),s=i=>{const r=i.parentElement||i.getRootNode().host;if(!r)return null;if(e){if(r.constructor===n)return r}else if(r.tagName===t)return r;return s(r)};return s(this)}connectedCallback(){return this.isConnected&&u(this,Ie)?lt.add(u(this,at)):u(this,at).call(this),u(We,we)}adoptedCallback(){return u(We,we)}disconnectedCallback(){var n,e;if(this.isConnected){A(this,xe,!0);return}return A(this,X,!1),(n=u(this,ot))==null||n.forEach(t=>t()),en(u(this,nt)),(e=this.unmounted)==null||e.call(this),A(this,Y,u(this,ct).call(this,u(this,Y))),A(this,oe,u(this,ct).call(this,u(this,oe))),u(We,we)}};let N=We;we=new WeakMap,Ge=new WeakMap,re=new WeakMap,xe=new WeakMap,X=new WeakMap,Ie=new WeakMap,Y=new WeakMap,oe=new WeakMap,nt=new WeakMap,st=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,it=new WeakMap,Yt=new WeakMap,rt=new WeakMap,le=new WeakMap,Zt=new WeakMap,ot=new WeakMap,at=new WeakMap,ct=new WeakMap,_(N,we,Symbol());const dt=new An;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],h=a.getAttribute(t);if(this[ut]&&h!==null&&!l)return;c[e]=!0;const g=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):g?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const zn=Symbol("event handle");function _e(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=dt.get(this)[e];return i||!t?i:(this[e]=si,this[e])},set(i){const r=this,a=dt.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[zn]?i:(c,l)=>{const h=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(h),i(c,l)},Reflect.set(a[e],zn,!0)):(a[e]=i,this[Kn]()))}})}function pt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=dt.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 h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}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 N){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>ft(e.prototype,se(l),l)),i==null||i.forEach(l=>_e(e.prototype,l)),r==null||r.forEach(l=>_e(e.prototype,se(l),l)),a==null||a.forEach(l=>mt(e.prototype,se(l),l)),c==null||c.forEach(l=>pt(e.prototype,se(l),l))}gt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...S,...ni});function U(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 ii(n,e){const t=`${j(e)}-${He()}`;U(n,"defineRefs",t),pt(n,e,t)}function nn(n,e,t){U(n,"observedAttributes",t),ft(n,e,t)}function $(n,e){nn(n,e,j(e))}function sn(n,e){const t=j(e);U(n,"booleanAttributes",t,!0),nn(n,e,t)}function ri(n,e){const t=j(e);U(n,"numberAttributes",t,!0),nn(n,e,t)}function O(n,e){U(n,"observedProperties",e),_e(n,e)}function yt(n,e){const t=j(e);U(n,"defineCSSStates",t),mt(n,e,t)}function oi(n,e){const t=j(n[e]||e);n[e]=t,U(n instanceof N?n:n.prototype,"defineSlots",t)}function Jn(n,e){const t=j(n[e]||e);n[e]=t,U(n instanceof N?n:n.prototype,"defineParts",t)}function Ve(n,e){Qn(n,e)}function ai(n,e){Qn(n,e,{bubbles:!0,composed:!0})}function Qn(n,e,t){const s=j(e);U(n,"defineEvents",s),_e(n,e,s,t)}function ci(n){return function(e){U(e.prototype,"adoptedStyleSheets",n)}}function wt(n){return function(e){U(e.prototype,"observedStores",n)}}function li(n){return function(e){const t=e;t.rootElement=n}}function hi(n){return function(e){gt(n,e)}}const x=window.history,Xn=x.pushState.bind(x),Yn=x.replaceState.bind(x);let ui=0;const rn=()=>`${performance.now()}-${++ui}`,[P,ve]=tt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),R=new Map;function Zn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(P.$key!==e){if(e)throw new J("`$key` is not allowed");if(t)throw new J("`$hasCloseHandle` is not allowed");if(s)throw new J("`$hasOpenHandle` is not allowed");if(i)throw new J("`$hasShouldCloseHandle` is not allowed")}}function es(n){return I.basePath?I.basePath+n:n}function on(n){return n===I.basePath?"/":n.replace(new RegExp(`^${I.basePath}/`),"/")}function an(){I.dispatchEvent(new CustomEvent("beforechange"))}function _t(n){var g,f;const e=R.get(P.$key)||{path:on(location.pathname),query:new me},t=n.path?Dt(e.path,n.path):on(location.pathname),s=new me((g=n.query)!=null?g: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,h=decodeURIComponent((f=n.hash)!=null?f:!a&&l?location.hash:"");return{...n,title:c,path:t,query:r,hash:h}}function ts(n,e){Zn(n.data);const t=_t(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:g}=t,f={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:rn(),$title:s,...g};R.set(f.$key,t),an(),Ze(P),ve(f);const M=es(i)+new me(r)+a,m=decodeURIComponent(location.hash);e(f,s,M),m!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function ns(n,e,t,s){Zn(n);const i={$key:rn(),$title:e,...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=_t({path:r,query:new me(a),hash:c,title:e,data:n});R.set(i.$key,l),an(),Ze(P),ve(i);const h=es(r)+l.query+c,g=location.hash;s(i,e,h),g!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const[ss,di]=tt({basePath:""});class fi extends EventTarget{get store(){return P}get currentKey(){return P.$key}get basePath(){return ss.basePath}set basePath(e){di({basePath:e}),Object.assign(R.get(P.$key),{path:on(location.pathname)})}getParams(){return R.get(P.$key)}updateParams(e){Object.assign(R.get(P.$key),e),ve()}push(e){ts(e,Xn)}replace(e){ts(e,Yn)}pushIgnoreCloseHandle(e){var t,s;P.$hasCloseHandle?((s=(t=R.get(P.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){x.forward()}back(){x.back()}}const I=new fi,[vt,pi]=tt({title:""}),mi={history:I,titleStore:vt,basePathStore:ss};if(!window._GEMHISTORY){if(window._GEMHISTORY=mi,x.pushState=function(e,t,s){ns(e,t,s,Xn)},x.replaceState=function(e,t,s){ns(e,t,s,Yn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&I.replace({hash:location.hash})}),x.state)if(x.state.$hasCloseHandle){ve(x.state);const e=_t({title:document.title});R.set(P.$key,e),I.back()}else{const e=_t({title:document.title,hash:location.hash});ve({$key:rn(),...x.state||{}}),R.set(P.$key,e)}else{const{pathname:e,search:t,hash:s}=location;I.replace({path:e,query:t,hash:s})}ie(vt,()=>{const e=R.get(P.$key);e&&(e.title=vt.title)}),ie(P,()=>{const{title:e}=I.getParams();e!==vt.title&&pi({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(!R.has(t.$key)){const{pathname:c,search:l,hash:h}=location;R.set(t.$key,{path:c,query:new me(l),hash:decodeURIComponent(h),title:t.$title,data:t})}const s=P;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=R.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=R.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,I.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,I.back())}an(),Ze(P),ve(t)})}const{history:y,titleStore:Se,basePathStore:is}=window._GEMHISTORY;var gi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,q=(n,e,t,s)=>{for(var i=s>1?void 0:s?yi(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},rs=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},F=(n,e,t)=>(rs(n,e,"read from private field"),t?t.call(n):e.get(n)),De=(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)},os=(n,e,t,s)=>(rs(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,he,Ee,St,cn,Et;const as="_";class wi extends RegExp{constructor(e){let t=0;super(`^${e.replace(/((:[^/$]+)|(\*))/g,(s,i)=>i==="*"?`(?<${as}${t++}>.*)`:`(?<${i.slice(1)}>[^/]+)`)}$`)}}function ln(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 wi(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(as)?r.slice(1):r]=a}),i}function bt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function cs(n,e){return{path:bt(n,e),...e}}const ls=new Map,hs=class extends N{constructor({isLight:n,routes:e}={}){super({isLight:n}),De(this,he),this.trigger=y,this.currentParams={},De(this,je,void 0),this.state={content:void 0},De(this,St,()=>{if(!this.locationStore)return;const{path:t,query:s,hash:i,data:r}=y.getParams();Q(this.locationStore,{path:t,params:this.currentParams,query:s,hash:i,data:r})}),De(this,cn,()=>{if(!F(this,he,Ee))return;const t=ls.get(y.currentKey);t?F(this,he,Ee).scroll(0,t):(this.scrollIgnoreHash||!y.getParams().hash)&&F(this,he,Ee).scroll(0,0)}),De(this,Et,(t,s,i)=>{this.beforeroutechange(t),os(this,je,void 0),this.currentRoute=t,this.currentParams=s;const r=async()=>{this.setState({content:i}),F(this,St).call(this),await Promise.resolve(),F(this,cn).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()}),this.update=()=>{const{route:t,params:s={}}=hs.findRoute(this.routes,this.trigger.getParams().path),{redirect:i,content:r,getContent:a}=t||{};if(i){this.trigger.replace({path:bt({pattern:i},{params:s})});return}this.trigger===y&&Q(Se,{title:t==null?void 0:t.title});const c=r||(a==null?void 0:a(s));if(this.loading(t),c instanceof Promise){os(this,je,c);const l=()=>F(this,je)===c;c.then(h=>{l()&&F(this,Et).call(this,t,s,h)}).catch(h=>{l()&&this.error(h)});return}F(this,Et).call(this,t,s,c)},this.routes=e}mounted(){this.effect(()=>{if(!!F(this,he,Ee))return jt(y,"beforechange",()=>ls.set(y.currentKey,F(this,he,Ee).scrollTop))},()=>[this.scrollContainer]),this.effect(()=>ie(this.trigger.store,()=>this.setState({})),()=>[this.trigger]),this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){F(this,St).call(this);return}this.update()},()=>{const{path:n,query:e,hash:t}=this.trigger.getParams();return[this.key,n,e,t]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?z`
|
|
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`
|
|
171
171
|
<style>
|
|
172
172
|
:host(:where(:not([hidden]))),
|
|
173
173
|
:not(:defined) {
|
|
174
174
|
display: contents;
|
|
175
175
|
}
|
|
176
176
|
</style>
|
|
177
|
-
${
|
|
178
|
-
`:
|
|
177
|
+
${e===dn?V`<slot></slot>`:e}
|
|
178
|
+
`:e===dn?void 0:V`${e}`}};De=new WeakMap,he=new WeakSet,Ee=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},St=new WeakMap,hn=new WeakMap,bt=new WeakMap,M.createLocationStore=()=>{const{path:n,query:e,hash:t,data:s}=y.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=un(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},U([on],M.prototype,"transition",2),U([T],M.prototype,"routes",2),U([T],M.prototype,"locationStore",2),U([T],M.prototype,"key",2),U([xe],M.prototype,"loading",2),U([xe],M.prototype,"beforeroutechange",2),U([xe],M.prototype,"routechange",2),U([xe],M.prototype,"error",2),U([T],M.prototype,"scrollContainer",2),U([T],M.prototype,"scrollIgnoreHash",2),U([T],M.prototype,"trigger",2);let fn=M;class vs extends fn{constructor(e={}){super({...e,isLight:!0})}}var Mi=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,k=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ni(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&&Mi(e,t,i),i},Oi=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},re=(n,e,t)=>(Oi(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,Ue,pn,Es,mn,gn,yn;function Ss(n){return!n.startsWith("/")}o.GemLinkElement=class extends R{constructor(){super({focusable:!0}),qe(this,Se),qe(this,pn),qe(this,mn,async()=>{var r;const e=this.getLocationString();if(!e)return;if(Ss(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}=y.getParams();if(t+s+i!==e)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)y.pushIgnoreCloseHandle({...ws(this.route,re(this,Se,Ue)),title:this.route.title||this.docTitle});else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);y.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else y.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})}),qe(this,gn,e=>{e.preventDefault()}),qe(this,yn,()=>{const e=this.getLocationString();return Ss(e)?e:new URL(y.basePath+e,location.origin).toString()}),this.addEventListener("click",re(this,mn))}render(){return V`
|
|
179
179
|
<style>
|
|
180
180
|
:host {
|
|
181
181
|
/* link default style */
|
|
@@ -193,12 +193,12 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
193
193
|
</style>
|
|
194
194
|
<a
|
|
195
195
|
part=${this.link}
|
|
196
|
-
@click=${
|
|
197
|
-
href=${
|
|
196
|
+
@click=${re(this,gn)}
|
|
197
|
+
href=${Qt(re(this,pn,Es)==="off"?void 0:re(this,yn).call(this))}
|
|
198
198
|
>
|
|
199
199
|
<slot></slot>
|
|
200
200
|
</a>
|
|
201
|
-
`}getLocationString(){var e,t;if(this.route){const s=((e=
|
|
201
|
+
`}getLocationString(){var e,t;if(this.route){const s=((e=re(this,Se,Ue))==null?void 0:e.query)||"",i=((t=re(this,Se,Ue))==null?void 0:t.hash)||"";return Pt(this.route,re(this,Se,Ue))+s+i}else{const s=this.href||this.path+this.query+this.hash,{path:i,query:r}=y.getParams();return s.startsWith("#")?`${i}${r}${s}`:s.startsWith("?")?`${i}${s}`:s.startsWith(".")?Ut(i,s):s}}},Se=new WeakSet,Ue=function(){return this.routeOptions||this.options},pn=new WeakSet,Es=function(){return this.hint||"on"},mn=new WeakMap,gn=new WeakMap,yn=new WeakMap,k([C],o.GemLinkElement.prototype,"href",2),k([C],o.GemLinkElement.prototype,"target",2),k([C],o.GemLinkElement.prototype,"path",2),k([C],o.GemLinkElement.prototype,"query",2),k([C],o.GemLinkElement.prototype,"hash",2),k([C],o.GemLinkElement.prototype,"docTitle",2),k([C],o.GemLinkElement.prototype,"hint",2),k([T],o.GemLinkElement.prototype,"route",2),k([T],o.GemLinkElement.prototype,"options",2),k([T],o.GemLinkElement.prototype,"routeOptions",2),k([T],o.GemLinkElement.prototype,"prepare",2),k([rs],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=k([_t(ps)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{constructor(){super(),this.effect(()=>{const{path:e,query:t,hash:s}=y.getParams(),i=this.pattern&&un(this.pattern,e);this.active=!!i||e+t+s===this.getLocationString()})}},k([C],o.GemActiveLinkElement.prototype,"pattern",2),k([wt],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=k([_t(y.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",fn),customElements.define("gem-light-route",vs);var Ri=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,wn=(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&&Ri(e,t,i),i};const Ct=document.title;let _n="";const Hi=()=>document.title=_n;function bs(n,e="",t=""){const s=ve.title||n;s&&s!==Ct?(be.title=s,_n=e+be.title+t):(be.title=Ct,_n=be.title),H(Hi)}ne(ve,bs);const Ps=`${Ct} | `,Cs=` - ${Ct}`,ue=class Us extends R{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 bs((e=this.textContent)==null?void 0:e.trim(),this.prefix,this.suffix),V`${Us.title}`}};ue.title=document.title,ue.defaultPrefix=Ps,ue.defaultSuffix=Cs,wn([C],ue.prototype,"prefix",2),wn([C],ue.prototype,"suffix",2),wn([on],ue.prototype,"inert",2);let be=ue;customElements.define("gem-title",be);var Gi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,kt=(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 ks=new Map;class Pe extends R{constructor(){super(...arguments);N(this,Xe,void 0);Y(this,Xe,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let s=ks.get(t);return s||(s=document.createElement("template"),s.innerHTML=t,ks.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
202
|
<style>
|
|
203
203
|
:host(:where(:not([hidden]))) {
|
|
204
204
|
position: relative;
|
|
@@ -210,9 +210,9 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
210
210
|
height: 100%;
|
|
211
211
|
}
|
|
212
212
|
</style>
|
|
213
|
-
${
|
|
213
|
+
${g(this,Xe).call(this)}
|
|
214
214
|
<slot></slot>
|
|
215
|
-
`}}
|
|
215
|
+
`}}Xe=new WeakMap,kt([C],Pe.prototype,"selector",2),kt([T],Pe.prototype,"root",2),kt([T],Pe.prototype,"element",2),kt([wt],Pe.prototype,"active",2),customElements.define("gem-use",Pe);var Ii=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,Ls=(n,e,t,s)=>{for(var i=s>1?void 0:s?xi(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&&Ii(e,t,i),i};class Lt extends R{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
|
|
216
216
|
<style>
|
|
217
217
|
:host(:where(:not([hidden]))) {
|
|
218
218
|
display: contents;
|
|
@@ -220,4 +220,4 @@ var gn=(o,S,k)=>{if(!S.has(o))throw TypeError("Cannot "+k)};var d=(o,S,k)=>(gn(o
|
|
|
220
220
|
${this.contentcss}
|
|
221
221
|
</style>
|
|
222
222
|
${this.content}
|
|
223
|
-
`)},()=>[this.content,this.contentcss])}render(){}}ws([$],Lt.prototype,"content",2),ws([$],Lt.prototype,"contentcss",2),customElements.define("gem-unsafe",Lt);var ki=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,Mi=(n,e,t,s)=>{for(var i=s>1?void 0:s?$i(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&&ki(e,t,i),i};const Ni="gem-reflect-start",_s="gem-reflect-end",vs=n=>new Comment(n),Oi=n=>{const e=[];let t=n;for(;t&&(e.push(t),t.nodeValue!==_s);)t=t.nextSibling;return e};class dn extends N{constructor(){super({isLight:!0}),this.target=document.head,this.effect(()=>{this.hidden=!0,this.dataset.gemReflect=""},()=>[]);const e=vs(Ni),t=vs(_s);let s;this.effect(()=>(s?s.forEach(i=>this.target.append(i)):[e,...this.childNodes,t].forEach(i=>this.target.append(i)),()=>{s=Oi(e),s.forEach(i=>i.remove())}),()=>[this.target])}}Mi([O],dn.prototype,"target",2),customElements.define("gem-reflect",dn);const Tt=Symbol("open mark");function Ri(n){var e;const t=Symbol();return e=class extends N{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[Tt]}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=()=>Q(this.store,{[Tt]:!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(),Q(this.store,{[Tt]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=ye({[Tt]:!1,...n}),e}var Ai=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,fn=(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&&Ai(e,t,i),i};const Ue=Symbol();o.GemDialogBaseElement=(Os=class extends N{constructor(){super();v(this,Ce,void 0);v(this,Le,void 0);v(this,de,void 0);C(this,de,[]),this.closeHandle=()=>{var e;return this.inert=!0,d(this,de).forEach(t=>t.inert=!1),d(this,Ce)?d(this,Ce).before(this):d(this,Le)&&((e=d(this,Le))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ue},this.openHandle=()=>(this.hidden=!1,this.inert=!1,C(this,Ce,this.nextSibling),C(this,Le,this.parentElement||this.getRootNode()),C(this,de,[...document.body.children].filter(e=>!e.inert)),d(this,de).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ue),this.open=()=>{if(!this.opened)return this.openHandle(),y.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ue},this.close=()=>(y.back(),Ue),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ue),this.effect(()=>this.inert=!0,()=>[]),this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},Ce=new WeakMap,Le=new WeakMap,de=new WeakMap,Os),fn([$],o.GemDialogBaseElement.prototype,"label",2),fn([yt],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=fn([wt(y.store)],o.GemDialogBaseElement);const Ss=new WeakMap;function Es(n){return Ss.get(n)}const bs=new WeakMap;function Gi(n){return bs.get(n)}const Ps=new WeakMap;function Cs(n){const e=He(),t=document.createElement("style"),s=ye(n),i={},r={};bs.set(i,r),Ss.set(i,s);const a=()=>Object.keys(s).forEach(h=>{r[h]||(r[h]=`--${j(h)}-${e}`,i[h]=`var(${r[h]})`)});Ps.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((h,g)=>h+`${r[g]}:${s[g]};`,"")}}`,l=()=>t.textContent=c();return ie(s,l),l(),(document.head||document.documentElement).append(t),i}function Ls(n,e){Q(Es(n),e),Ps.get(n)()}function xi(n){const e=Cs(n);return[e,t=>Ls(e,t)]}class Ii{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 Wi=new Ii("GEM"),Vi=/\$\d(?:<[^>]*>)?/,Di=/\$(\d)(<([^>]*)>)?/g,ji=3;function Ts(n,...e){const t=n.split(Vi),s=[];let i;for(;i=Di.exec(n);){const r=i[ji],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return z(t,...s)}const qe=new Set,mn=class{constructor(e){v(this,Te);v(this,Mt);v(this,Nt);v(this,fe);v(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 J("i18n: fallbackLanguage invalid");this.store=ye(this),Object.assign(this,e);let t=d(this,Mt,As)||this.currentLanguage||d(this,Nt,Hs);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?(C(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?Ts(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){d(this,fe,Ye)&&qe.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return Wi.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 h=0;h<localStorage.length;h++){const g=localStorage.key(h);g.startsWith(i)&&localStorage.removeItem(g)}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,Q(this.store),e!==this.currentLanguage&&C(this,ke,e,Rt),this.cache===!0&&this.setCache(),e}resetLanguage(){return d(this,fe,Ye)&&qe.forEach(e=>e.resetLanguage()),C(this,ke,this.fallbackLanguage,Rt),this.cache&&localStorage.removeItem(d(this,Te,Ot)),this.setLanguage(this.detectLanguage())}setCache(){d(this,fe,Ye)&&qe.forEach(e=>e.setCache()),localStorage.setItem(d(this,Te,Ot),this.currentLanguage)}createSubModule(e,t){const s=new mn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return qe.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let pn=mn;Te=new WeakSet,Ot=function(){return`${this.cachePrefix}:current`},Mt=new WeakSet,As=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:""}},Nt=new WeakSet,Hs=function(){return this.cache&&localStorage.getItem(d(this,Te,Ot))||""},fe=new WeakSet,Ye=function(){return!qe.has(this)},ke=new WeakSet,Rt=function(e){var t;d(this,fe,Ye)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const ks={headers:{"Content-Type":"application/json"}};async function Fe(n,e={}){const t=await fetch(n,{...ks,...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 Ui=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function $s(n){return n instanceof FormData||n instanceof Blob||n instanceof Ui||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function Ms(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 qi(n,e){return Fe(Ms(n,e),{method:"GET"})}function Fi(n,e){return Fe(Ms(n,e),{method:"DELETE"})}function Bi(n,e){return Fe(n,{method:"PUT",body:$s(e)})}function Ki(n,e){return Fe(n,{method:"POST",body:$s(e)})}const H=n=>window.matchMedia(n).matches,zi={PRINT:"print",get isPrint(){return H(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return H(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return H(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return H(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return H(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return H(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return H(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return H(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return H(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return H(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return H(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return H(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return H(this.WIDTHSCREEN)}};o.GemElement=N,o.GemError=J,o.GemLightRouteElement=us,o.GemReflectElement=dn,o.GemRouteElement=L,o.GemTitleElement=W,o.GemUnsafeElement=Lt,o.GemUseElement=be,o.I18n=pn,o.LinkedList=Rn,o.PREFIX=ps,o.PropProxyMap=An,o.QueryString=me,o.SUFFIX=ms,o.SVGTemplateResult=Gt,o.SheetToken=Ut,o.StoreListenerMap=ge,o.TemplateResult=Ne,o.absoluteLocation=Dt,o.addListener=jt,o.addMicrotask=G,o.addMicrotaskToStack=Ks,o.adoptedStyle=ci,o.attribute=$,o.basePathStore=is,o.boolattribute=sn,o.camelToKebabCase=j,o.classMap=In,o.cleanObject=Ze,o.connect=ie,o.connectStore=wt,o.createCSSSheet=Js,o.createHistoryParams=cs,o.createModalClass=Ri,o.createPath=bt,o.createStore=ye,o.createTheme=Cs,o.css=zs,o.customElement=hi,o.defaultReqInit=ks,o.defineAttribute=ft,o.defineCSSState=mt,o.defineProperty=_e,o.defineRef=pt,o.del=Fi,o.directive=te,o.disconnect=ti,o.emitter=Ve,o.exportPartsMap=ei,o.get=qi,o.getThemeProps=Gi,o.getThemeStore=Es,o.globalemitter=ai,o.guard=Fn,o.history=y,o.html=z,o.ifDefined=zt,o.isArrayChange=Gn,o.kebabToCamelCase=se,o.matchPath=ln,o.mediaQuery=zi,o.nativeDefineElement=gt,o.numattribute=ri,o.objectMapToString=et,o.part=Jn,o.partMap=Zs,o.post=Ki,o.property=O,o.put=Bi,o.randomStr=He,o.raw=Ae,o.refobject=ii,o.removeItems=xn,o.render=Vt,o.repeat=qn,o.request=Fe,o.rootElement=li,o.slot=oi,o.splice=Ts,o.state=yt,o.styleMap=Ys,o.styled=Xs,o.svg=On,o.titleStore=Se,o.updateStore=Q,o.updateTheme=Ls,o.useStore=tt,o.useTheme=xi,o.version=Wn,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
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"})});
|
|
@@ -26,11 +26,9 @@ export interface RotateEventDetail {
|
|
|
26
26
|
/**
|
|
27
27
|
* 块级元素,如果要设置成 `contents`,则内容块要设置 `touch-action: none`
|
|
28
28
|
* https://javascript.info/pointer-events#event-pointercancel
|
|
29
|
-
*
|
|
30
29
|
* 在移动端上,必须设置 `touch-action` 以允许滚动等原生动作
|
|
31
30
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* @customElement gem-gesture
|
|
34
32
|
* @event pan
|
|
35
33
|
* @event pinch
|
|
36
34
|
* @event rotate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAsB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG;IAE3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,O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AE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AAiBD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;;IACtC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;;IAmB/B,eAAe;IACf,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;IAuKpD,MAAM;CAYP"}
|
package/elements/base/gesture.js
CHANGED
|
@@ -26,11 +26,9 @@ function angleAB(a, b, c, { clientX: x1, clientY: y1 }, { clientX: x2, clientY:
|
|
|
26
26
|
/**
|
|
27
27
|
* 块级元素,如果要设置成 `contents`,则内容块要设置 `touch-action: none`
|
|
28
28
|
* https://javascript.info/pointer-events#event-pointercancel
|
|
29
|
-
*
|
|
30
29
|
* 在移动端上,必须设置 `touch-action` 以允许滚动等原生动作
|
|
31
30
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* @customElement gem-gesture
|
|
34
32
|
* @event pan
|
|
35
33
|
* @event pinch
|
|
36
34
|
* @event rotate
|
|
@@ -197,6 +195,7 @@ export class GemGestureElement extends GemElement {
|
|
|
197
195
|
this.addEventListener('pointermove', __classPrivateFieldGet(this, _GemGestureElement_onMoveSet, "f"));
|
|
198
196
|
this.addEventListener('pointerup', __classPrivateFieldGet(this, _GemGestureElement_onEnd, "f"));
|
|
199
197
|
this.addEventListener('pointerleave', __classPrivateFieldGet(this, _GemGestureElement_onEnd, "f")); // 有时候 up 没有触发?
|
|
198
|
+
// 为什么空白区域会自动触发 `pointercancel`?
|
|
200
199
|
this.addEventListener('pointercancel', __classPrivateFieldGet(this, _GemGestureElement_onEnd, "f"));
|
|
201
200
|
this.addEventListener('dragstart', (evt) => evt.preventDefault());
|
|
202
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAW,MAAM,sBAAsB,CAAC;AA6BnE,SAAS,OAAO,CACd,CAAS,EACT,CAAS,EACT,CAAS,EACT,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAkB,EAC5C,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAkB,EAC5C,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAkB;IAE5C,+CAA+C;IAC/C,4DAA4D;IAC5D,OAAO,CACL,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CACrH,CAAC;AACJ,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,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CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GemElement } from '../../lib/element';
|
|
2
2
|
import { RouteItem, RouteOptions } from './route';
|
|
3
3
|
/**
|
|
4
|
+
* @customElement gem-link
|
|
4
5
|
* @attr href
|
|
5
6
|
* @attr target
|
|
6
7
|
* @attr doc-title
|
|
@@ -36,6 +37,7 @@ export declare class GemLinkElement extends GemElement {
|
|
|
36
37
|
getLocationString(): string;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
40
|
+
* @customElement gem-active-link
|
|
39
41
|
* @attr pattern
|
|
40
42
|
* @state active
|
|
41
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAa,SAAS,EAAE,YAAY,EAAmC,MAAM,SAAS,CAAC;AAM9F
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAa,SAAS,EAAE,YAAY,EAAmC,MAAM,SAAS,CAAC;AAM9F;;;;;;;;;;;;;GAaG;AACH,qBACa,cAAe,SAAQ,UAAU;;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAGpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAC5B,iBAAiB;IACP,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAI,EAAE,MAAM,CAAC;;IAgFnB,MAAM;IA2BN;;OAEG;IACH,iBAAiB;CAmBlB;AAED;;;;GAIG;AACH,qBACa,oBAAqB,SAAQ,cAAc;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;;CAUxB"}
|
package/elements/base/link.js
CHANGED
|
@@ -19,6 +19,7 @@ function isExternal(path) {
|
|
|
19
19
|
return !path.startsWith('/');
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
+
* @customElement gem-link
|
|
22
23
|
* @attr href
|
|
23
24
|
* @attr target
|
|
24
25
|
* @attr doc-title
|
|
@@ -203,6 +204,7 @@ GemLinkElement = __decorate([
|
|
|
203
204
|
], GemLinkElement);
|
|
204
205
|
export { GemLinkElement };
|
|
205
206
|
/**
|
|
207
|
+
* @customElement gem-active-link
|
|
206
208
|
* @attr pattern
|
|
207
209
|
* @state active
|
|
208
210
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAA2B,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9F,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED
|
|
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