@mantou/gem 1.6.13 → 1.6.15
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 +3 -3
- package/dist/gem.umd.js +1 -1
- package/helper/i18n.js +1 -1
- package/helper/i18n.js.map +1 -1
- package/helper/request.js +1 -1
- package/helper/request.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/helper/i18n.ts +1 -1
- package/src/helper/request.ts +1 -1
- package/src/lib/version.ts +1 -1
package/dist/gem.es.js
CHANGED
|
@@ -2987,7 +2987,7 @@ function splice(rawValue, ...rest) {
|
|
|
2987
2987
|
const str = result[matchStrIndex];
|
|
2988
2988
|
const index = Number(result[1]) - 1;
|
|
2989
2989
|
const arg = rest[index];
|
|
2990
|
-
values.push(typeof arg === "
|
|
2990
|
+
values.push(typeof arg === "function" ? arg(str) : arg);
|
|
2991
2991
|
}
|
|
2992
2992
|
return html(templateArr, ...values);
|
|
2993
2993
|
}
|
|
@@ -3176,7 +3176,7 @@ async function request(uri, options = {}) {
|
|
|
3176
3176
|
throw new Error(await res.text() || res.statusText);
|
|
3177
3177
|
return await res.json();
|
|
3178
3178
|
}
|
|
3179
|
-
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array()));
|
|
3179
|
+
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())).constructor;
|
|
3180
3180
|
function serializationBody(body) {
|
|
3181
3181
|
if (body instanceof FormData || body instanceof Blob || body instanceof TypedArray || body instanceof URLSearchParams || body instanceof ReadableStream || body instanceof ArrayBuffer) {
|
|
3182
3182
|
return body;
|
|
@@ -3261,7 +3261,7 @@ const mediaQuery = {
|
|
|
3261
3261
|
return matche(this.DATA_REDUCE);
|
|
3262
3262
|
}
|
|
3263
3263
|
};
|
|
3264
|
-
const version = "1.6.
|
|
3264
|
+
const version = "1.6.15";
|
|
3265
3265
|
if (window.__GEM_DEVTOOLS__HOOK__) {
|
|
3266
3266
|
Object.assign(window.__GEM_DEVTOOLS__HOOK__, __spreadValues({}, Gem));
|
|
3267
3267
|
}
|
package/dist/gem.umd.js
CHANGED
|
@@ -226,4 +226,4 @@ var oi=Object.defineProperty,ai=Object.defineProperties;var ci=Object.getOwnProp
|
|
|
226
226
|
${this.contentcss}
|
|
227
227
|
</style>
|
|
228
228
|
${this.content}
|
|
229
|
-
`)},()=>[this.content,this.contentcss])}render(){}}is([k],ct.prototype,"content",2),is([k],ct.prototype,"contentcss",2),customElements.define("gem-unsafe",ct);var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,xs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ds(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&&js(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Ft extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}xs([x],Ft.prototype,"target",2),customElements.define("gem-reflect",Ft);const lt=Symbol("open mark");function qs(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[lt]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>P(this.store,C({[lt]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),P(this.store,C({[lt]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(C({[lt]:!1},n)),e}var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Jt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(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&&Us(e,t,i),i};o.GemDialogBaseElement=(hs=class extends A{constructor(){super();M(this,_e,void 0);M(this,ve,void 0);M(this,he,void 0);this.inert=!0,G(this,he,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,he).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,ve)&&((n=g(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,he,[...document.body.children].filter(n=>!n.inert)),g(this,he).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,he=new WeakMap,hs),Jt([k],o.GemDialogBaseElement.prototype,"label",2),Jt([Ge],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Jt([oe(E.store)],o.GemDialogBaseElement);const Qt=new WeakMap;function rs(n){return Qt.get(n)}const Yt=new WeakMap;function Ks(n){return Yt.get(n)}function zs(n,e){const t=Qt.get(e),s=Yt.get(e),i=Object.keys(t).reduce((r,a)=>t[a]?r+`${s[a]}:${t[a]};`:r,"");n.textContent=`:root, :host {${i}}`}function Fs(n){const e=Me(),t=document.createElement("style"),s=z(n),i={},r={};Yt.set(i,r),Qt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>zs(t,i);return se(s,a),a(),(document.head||document.documentElement).append(t),i}function Js(n,e){const t=rs(n);P(t,e)}const Qs=/\$\d(?:<[^>]*>)?/,Ys=/\$(\d)(<([^>]*)>)?/g,Zs=3;function os(n,...e){const t=n.split(Qs),s=[];let i;for(;i=Ys.exec(n);){const r=i[Zs],a=Number(i[1])-1,c=e[a];s.push(typeof c=="string"?c:c(r))}return N(t,...s)}const je=new Set,Zt=class{constructor(e){M(this,be);M(this,ut);M(this,dt);M(this,ue);M(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ut,ui)||this.currentLanguage||g(this,dt,di);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?(G(this,Pe,t,nn),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?os(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,ue,mt)&&je.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.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 m=localStorage.key(h);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,P(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,nn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,ue,mt)&&je.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,nn),this.cache&&localStorage.removeItem(g(this,be,tn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,ue,mt)&&je.forEach(e=>e.setCache()),localStorage.setItem(g(this,be,tn),this.currentLanguage)}createSubModule(e,t){const s=new Zt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return je.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let as=Zt;be=new WeakSet,tn=function(){return`${this.cachePrefix}:current`},ut=new WeakSet,ui=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:""}},dt=new WeakSet,di=function(){return this.cache&&localStorage.getItem(g(this,be,tn))||""},ue=new WeakSet,mt=function(){return!je.has(this)},Pe=new WeakSet,nn=function(e){var t;g(this,ue,mt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const Xs={credentials:"include",mode:"cors"};async function De(n,e={}){const t=await fetch(n,C(C({},Xs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);if(t.status>=400)throw new Error(await t.text()||t.statusText);return await t.json()}const ei=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array));function cs(n){return n instanceof FormData||n instanceof Blob||n instanceof ei||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function ti(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return De(`${t}${s}${i?`${i}&`:r?"?":""}${r}`,{method:"GET"})}function ni(n){return De(n,{method:"DELETE"})}function si(n,e){return De(n,{method:"PUT",body:cs(e)})}function ii(n,e){return De(n,{method:"POST",body:cs(e)})}const R=n=>window.matchMedia(n).matches,ri={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},ls="1.6.13";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ts,o.GemReflectElement=Ft,o.GemUnsafeElement=ct,o.GemUseElement=we,o.I18n=as,o.LinkedList=_t,o.PropProxyMap=vt,o.QueryString=fe,o.SVGTemplateResult=yt,o.SheetToken=Be,o.StoreListenerMap=ne,o.TemplateResult=ke,o.absoluteLocation=Ue,o.addMicrotask=H,o.addMicrotaskToStack=wn,o.adoptedStyle=xn,o.attribute=k,o.basePathStore=Ut,o.boolattribute=In,o.camelToKebabCase=I,o.classMap=Ct,o.cleanObject=Ne,o.connect=se,o.connectStore=oe,o.createCSSSheet=En,o.createHistoryParams=es,o.createModalClass=qs,o.createPath=zt,o.createStore=z,o.createStoreSet=Cn,o.createTheme=Fs,o.css=Sn,o.customElement=Un,o.defineAttribute=et,o.defineCSSState=nt,o.defineProperty=ye,o.defineRef=tt,o.del=ni,o.directive=J,o.disconnect=kt,o.emitter=He,o.exportPartsMap=Tn,o.get=ti,o.getThemeProp=Ks,o.getThemeStore=rs,o.globalemitter=jn,o.guard=On,o.history=E,o.html=N,o.ifDefined=Ot,o.isArrayChange=Pt,o.kebabToCamelCase=pe,o.matchPath=Kt,o.mediaQuery=ri,o.nativeDefineElement=st,o.numattribute=Vn,o.objectMapToString=Oe,o.part=Dt,o.partMap=Pn,o.post=ii,o.property=x,o.put=si,o.randomStr=Me,o.raw=me,o.refobject=Hn,o.removeItems=Tt,o.render=qe,o.repeat=Nn,o.request=De,o.rootElement=qn,o.slot=Wn,o.splice=os,o.state=Ge,o.styleMap=bn,o.styled=vn,o.svg=yn,o.titleStore=ae,o.updateStore=P,o.updateTheme=Js,o.version=ls,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
|
|
229
|
+
`)},()=>[this.content,this.contentcss])}render(){}}is([k],ct.prototype,"content",2),is([k],ct.prototype,"contentcss",2),customElements.define("gem-unsafe",ct);var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,xs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ds(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&&js(e,t,i),i};document.querySelectorAll("[data-reflect]").forEach(n=>n.remove());class Ft extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemreflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}xs([x],Ft.prototype,"target",2),customElements.define("gem-reflect",Ft);const lt=Symbol("open mark");function qs(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[lt]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>P(this.store,C({[lt]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),P(this.store,C({[lt]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(C({[lt]:!1},n)),e}var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Jt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(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&&Us(e,t,i),i};o.GemDialogBaseElement=(hs=class extends A{constructor(){super();M(this,_e,void 0);M(this,ve,void 0);M(this,he,void 0);this.inert=!0,G(this,he,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,he).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,ve)&&((n=g(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,he,[...document.body.children].filter(n=>!n.inert)),g(this,he).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,he=new WeakMap,hs),Jt([k],o.GemDialogBaseElement.prototype,"label",2),Jt([Ge],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Jt([oe(E.store)],o.GemDialogBaseElement);const Qt=new WeakMap;function rs(n){return Qt.get(n)}const Yt=new WeakMap;function Ks(n){return Yt.get(n)}function zs(n,e){const t=Qt.get(e),s=Yt.get(e),i=Object.keys(t).reduce((r,a)=>t[a]?r+`${s[a]}:${t[a]};`:r,"");n.textContent=`:root, :host {${i}}`}function Fs(n){const e=Me(),t=document.createElement("style"),s=z(n),i={},r={};Yt.set(i,r),Qt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>zs(t,i);return se(s,a),a(),(document.head||document.documentElement).append(t),i}function Js(n,e){const t=rs(n);P(t,e)}const Qs=/\$\d(?:<[^>]*>)?/,Ys=/\$(\d)(<([^>]*)>)?/g,Zs=3;function os(n,...e){const t=n.split(Qs),s=[];let i;for(;i=Ys.exec(n);){const r=i[Zs],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const je=new Set,Zt=class{constructor(e){M(this,be);M(this,ut);M(this,dt);M(this,ue);M(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ut,ui)||this.currentLanguage||g(this,dt,di);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?(G(this,Pe,t,nn),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?os(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,ue,mt)&&je.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.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 m=localStorage.key(h);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,P(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,nn),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,ue,mt)&&je.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,nn),this.cache&&localStorage.removeItem(g(this,be,tn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,ue,mt)&&je.forEach(e=>e.setCache()),localStorage.setItem(g(this,be,tn),this.currentLanguage)}createSubModule(e,t){const s=new Zt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return je.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let as=Zt;be=new WeakSet,tn=function(){return`${this.cachePrefix}:current`},ut=new WeakSet,ui=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:""}},dt=new WeakSet,di=function(){return this.cache&&localStorage.getItem(g(this,be,tn))||""},ue=new WeakSet,mt=function(){return!je.has(this)},Pe=new WeakSet,nn=function(e){var t;g(this,ue,mt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const Xs={credentials:"include",mode:"cors"};async function De(n,e={}){const t=await fetch(n,C(C({},Xs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);if(t.status>=400)throw new Error(await t.text()||t.statusText);return await t.json()}const ei=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function cs(n){return n instanceof FormData||n instanceof Blob||n instanceof ei||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function ti(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return De(`${t}${s}${i?`${i}&`:r?"?":""}${r}`,{method:"GET"})}function ni(n){return De(n,{method:"DELETE"})}function si(n,e){return De(n,{method:"PUT",body:cs(e)})}function ii(n,e){return De(n,{method:"POST",body:cs(e)})}const R=n=>window.matchMedia(n).matches,ri={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 767px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},ls="1.6.15";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ts,o.GemReflectElement=Ft,o.GemUnsafeElement=ct,o.GemUseElement=we,o.I18n=as,o.LinkedList=_t,o.PropProxyMap=vt,o.QueryString=fe,o.SVGTemplateResult=yt,o.SheetToken=Be,o.StoreListenerMap=ne,o.TemplateResult=ke,o.absoluteLocation=Ue,o.addMicrotask=H,o.addMicrotaskToStack=wn,o.adoptedStyle=xn,o.attribute=k,o.basePathStore=Ut,o.boolattribute=In,o.camelToKebabCase=I,o.classMap=Ct,o.cleanObject=Ne,o.connect=se,o.connectStore=oe,o.createCSSSheet=En,o.createHistoryParams=es,o.createModalClass=qs,o.createPath=zt,o.createStore=z,o.createStoreSet=Cn,o.createTheme=Fs,o.css=Sn,o.customElement=Un,o.defineAttribute=et,o.defineCSSState=nt,o.defineProperty=ye,o.defineRef=tt,o.del=ni,o.directive=J,o.disconnect=kt,o.emitter=He,o.exportPartsMap=Tn,o.get=ti,o.getThemeProp=Ks,o.getThemeStore=rs,o.globalemitter=jn,o.guard=On,o.history=E,o.html=N,o.ifDefined=Ot,o.isArrayChange=Pt,o.kebabToCamelCase=pe,o.matchPath=Kt,o.mediaQuery=ri,o.nativeDefineElement=st,o.numattribute=Vn,o.objectMapToString=Oe,o.part=Dt,o.partMap=Pn,o.post=ii,o.property=x,o.put=si,o.randomStr=Me,o.raw=me,o.refobject=Hn,o.removeItems=Tt,o.render=qe,o.repeat=Nn,o.request=De,o.rootElement=qn,o.slot=Wn,o.splice=os,o.state=Ge,o.styleMap=bn,o.styled=vn,o.svg=yn,o.titleStore=ae,o.updateStore=P,o.updateTheme=Js,o.version=ls,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
|
package/helper/i18n.js
CHANGED
|
@@ -27,7 +27,7 @@ export function splice(rawValue, ...rest) {
|
|
|
27
27
|
const str = result[matchStrIndex];
|
|
28
28
|
const index = Number(result[1]) - 1;
|
|
29
29
|
const arg = rest[index];
|
|
30
|
-
values.push(typeof arg === '
|
|
30
|
+
values.push(typeof arg === 'function' ? arg(str) : arg);
|
|
31
31
|
}
|
|
32
32
|
return html(templateArr, ...values);
|
|
33
33
|
}
|
package/helper/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/helper/i18n.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAS,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAkB,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,YAAY;AACZ,iBAAiB;AACjB,4CAA4C;AAC5C,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AACpC,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AACvC,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,UAAU,MAAM,CAAC,QAAgB,EAAE,GAAG,IAAkD;IAC5F,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAoC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AM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;YACnG,OAAO,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;KACrD;AACH,CAAC;IAGC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,YAAY,CAAC,OAAO,CAAC,uBAAA,IAAI,kDAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3E,CAAC;IAGC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,2CAES,IAAY;;IACpB,IAAI,uBAAA,IAAI,yCAAQ,EAAE;QAChB,QAAQ,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC;KACtC;IACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC5B,MAAA,IAAI,CAAC,QAAQ,+CAAb,IAAI,EAAY,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
package/helper/request.js
CHANGED
|
@@ -16,7 +16,7 @@ export async function request(uri, options = {}) {
|
|
|
16
16
|
throw new Error((await res.text()) || res.statusText);
|
|
17
17
|
return await res.json();
|
|
18
18
|
}
|
|
19
|
-
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array()));
|
|
19
|
+
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())).constructor;
|
|
20
20
|
function serializationBody(body) {
|
|
21
21
|
if (body instanceof FormData ||
|
|
22
22
|
body instanceof Blob ||
|
package/helper/request.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/helper/request.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,MAAM,UAAU,GAAgB;IAC9B,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAI,GAA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E,QAAQ,EAAE,CAAC,CAAC;AAC/C,CAAC;AACD,MAAM,UAAU,GAAG,CAAI,GAAW,EAAE,IAAc;IAChD,OAAO,OAAO,CAAI,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3E,CAAC;AACD,MAAM,UAAU,IAAI,CAAI,GAAW,EAAE,IAAc;IACjD,OAAO,OAAO,CAAI,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.6.
|
|
1
|
+
export declare const version = "1.6.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.6.
|
|
1
|
+
export const version = '1.6.15';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
package/src/helper/i18n.ts
CHANGED
|
@@ -17,7 +17,7 @@ export function splice(rawValue: string, ...rest: (((s: string) => TemplateResul
|
|
|
17
17
|
const str = result[matchStrIndex];
|
|
18
18
|
const index = Number(result[1]) - 1;
|
|
19
19
|
const arg = rest[index];
|
|
20
|
-
values.push(typeof arg === '
|
|
20
|
+
values.push(typeof arg === 'function' ? arg(str) : arg);
|
|
21
21
|
}
|
|
22
22
|
return html(templateArr, ...values);
|
|
23
23
|
}
|
package/src/helper/request.ts
CHANGED
|
@@ -16,7 +16,7 @@ export async function request<T>(uri: string, options: RequestInit = {}): Promis
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
type ReqBody = Record<string, unknown> | BodyInit;
|
|
19
|
-
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array()));
|
|
19
|
+
const TypedArray = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())).constructor;
|
|
20
20
|
|
|
21
21
|
function serializationBody(body?: ReqBody): BodyInit | undefined {
|
|
22
22
|
if (
|
package/src/lib/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.6.
|
|
1
|
+
export const version = '1.6.15';
|