@ezeep/ezeep-js 1.0.272 → 1.0.284
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/cjs/{app-globals-D7ISNeUi.js → app-globals-L_3XPZxT.js} +7 -1
- package/dist/cjs/ezeep.cjs.js +4 -4
- package/dist/cjs/ezp-auth_15.cjs.entry.js +7338 -3700
- package/dist/cjs/{index-dv_gozsq.js → index-DM5v_sge.js} +3 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
- package/dist/collection/components/ezp-auth/ezp-auth.js +78 -18
- package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +5 -5
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +85 -13
- package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
- package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
- package/dist/collection/components/ezp-icon/ezp-icon.js +8 -3
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +5 -2
- package/dist/collection/components/ezp-input/ezp-input.css +19 -38
- package/dist/collection/components/ezp-input/ezp-input.js +16 -14
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +215 -329
- package/dist/collection/components/ezp-printing/ezp-printing.css +23 -23
- package/dist/collection/components/ezp-printing/ezp-printing.js +119 -35
- package/dist/collection/components/ezp-select/ezp-select.css +56 -38
- package/dist/collection/components/ezp-select/ezp-select.js +93 -14
- package/dist/collection/components/ezp-status/ezp-status.css +94 -9
- package/dist/collection/components/ezp-status/ezp-status.js +42 -13
- package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +14 -7
- package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
- package/dist/collection/components/ezp-upload/ezp-upload.css +243 -77
- package/dist/collection/components/ezp-upload/ezp-upload.js +80 -10
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +2 -1
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +15 -15
- package/dist/collection/services/auth.js +37 -36
- package/dist/collection/services/http.js +11 -0
- package/dist/collection/services/print-job.js +72 -0
- package/dist/collection/services/print.js +21 -69
- package/dist/collection/services/user.js +2 -9
- package/dist/collection/shared/constants.js +55 -0
- package/dist/collection/shared/global.js +7 -1
- package/dist/collection/shared/storage.js +71 -0
- package/dist/collection/types/shared/types.d.ts +42 -9
- package/dist/collection/utils/printer.js +68 -0
- package/dist/collection/utils/utils.js +24 -9
- package/dist/components/auth.js +1 -1
- package/dist/components/ezp-auth2.js +1 -1
- package/dist/components/ezp-backdrop2.js +1 -1
- package/dist/components/ezp-dialog2.js +1 -1
- package/dist/components/ezp-icon-button2.js +1 -1
- package/dist/components/ezp-icon2.js +1 -1
- package/dist/components/ezp-input2.js +1 -1
- package/dist/components/ezp-printer-selection2.js +1 -1
- package/dist/components/ezp-printing.js +1 -1
- package/dist/components/ezp-select2.js +1 -1
- package/dist/components/ezp-status2.js +1 -1
- package/dist/components/ezp-stepper2.js +1 -1
- package/dist/components/ezp-text-button2.js +1 -1
- package/dist/components/ezp-upload2.js +1 -1
- package/dist/components/ezp-user-menu.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/utils.js +1 -0
- package/dist/directives/proxies.ts +74 -47
- package/dist/esm/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +7 -1
- package/dist/esm/ezeep.js +5 -5
- package/dist/esm/ezp-auth_15.entry.js +7338 -3700
- package/dist/esm/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm-es5/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
- package/dist/ezeep/assets/glyph-file.svg +3 -0
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +1 -1
- package/dist/ezeep/p-1e286bd1.system.entry.js +7 -0
- package/dist/ezeep/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
- package/dist/ezeep/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
- package/{www/build/p-DhXN1yGM.system.js → dist/ezeep/p-CYpousxy.system.js} +2 -2
- package/dist/ezeep/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -0
- package/dist/ezeep/p-a2b688f0.entry.js +1 -0
- package/dist/ezeep/types/shared/types.d.ts +42 -9
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +8 -5
- package/dist/types/components/ezp-backdrop/ezp-backdrop.d.ts +2 -2
- package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +14 -3
- package/dist/types/components/ezp-input/ezp-input.d.ts +17 -14
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +23 -7
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +26 -2
- package/dist/types/components/ezp-select/ezp-select.d.ts +10 -4
- package/dist/types/components/ezp-status/ezp-status.d.ts +7 -4
- package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +1 -1
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +13 -1
- package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +5 -2
- package/dist/types/components.d.ts +47 -39
- package/dist/types/services/auth.d.ts +10 -0
- package/dist/types/services/http.d.ts +4 -0
- package/dist/types/services/print-job.d.ts +48 -0
- package/dist/types/services/print.d.ts +10 -9
- package/dist/types/services/user.d.ts +13 -2
- package/dist/types/shared/constants.d.ts +51 -0
- package/dist/types/shared/storage.d.ts +24 -0
- package/dist/types/shared/types.d.ts +42 -9
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/utils/printer.d.ts +22 -0
- package/dist/types/utils/utils.d.ts +22 -10
- package/package.json +30 -18
- package/readme.md +1 -0
- package/www/build/assets/glyph-cloud-upload.svg +4 -0
- package/www/build/assets/glyph-file.svg +3 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-1e286bd1.system.entry.js +7 -0
- package/www/build/p-544b7033.js +1 -0
- package/www/build/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
- package/www/build/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
- package/{dist/ezeep/p-DhXN1yGM.system.js → www/build/p-CYpousxy.system.js} +2 -2
- package/www/build/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
- package/www/build/p-DCznw2Ee.system.js +1 -0
- package/www/build/p-a2b688f0.entry.js +1 -0
- package/www/data/locales/de.json +14 -5
- package/www/data/locales/en.json +14 -5
- package/www/index.html +2 -5
- package/dist/components/i18next.js +0 -1
- package/dist/ezeep/p-2177b8f4.system.entry.js +0 -7
- package/dist/ezeep/p-CfQRcOh8.system.js +0 -1
- package/dist/ezeep/p-de8f6583.entry.js +0 -1
- package/www/build/p-2177b8f4.system.entry.js +0 -7
- package/www/build/p-256870db.js +0 -1
- package/www/build/p-CfQRcOh8.system.js +0 -1
- package/www/build/p-de8f6583.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as o,Host as c,transformTag as r}from"@stencil/core/internal/client";import{a as p,E as s,s as i,i as l}from"./auth.js";import{a as n,p as d,d as z}from"./ezp-printer-selection2.js";import{u,d as g}from"./ezp-user-menu2.js";import{i as h}from"./i18next.js";import{d as b}from"./ezp-auth2.js";import{d as y}from"./ezp-backdrop2.js";import{d as m}from"./ezp-dialog2.js";import{d as f}from"./ezp-icon2.js";import{d as k}from"./ezp-icon-button2.js";import{d as w}from"./ezp-input2.js";import{d as x}from"./ezp-label2.js";import{d as v}from"./ezp-select2.js";import{d as S}from"./ezp-status2.js";import{d as E}from"./ezp-stepper2.js";import{d as A}from"./ezp-text-button2.js";import{d as U}from"./ezp-upload2.js";const j=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.printFinished=a(this,"printFinished",7),this.filename="",this.hidemenu=!1,this.hideheader=!1,this.theme="cyan",this.appearance="system",this.language="",this.seamless=!1,this.printOpen=!1,this.authOpen=!1,this.onlyGetSasUri=!1,this.noDocumentOpen=!1,this.files=[]}watchFileData(e,t){if(console.log(e),e!==t&&e.length>0){let t=new Uint8Array(e.length);for(let a=0;a<e.length;a++)t[a]=e.charCodeAt(a);this.files=[new File([t],this.filename)]}}watchFilename(e,t){e!==t&&e.length>0&&(this.filename=e)}watchFileUrl(e,t){e!==t&&e.length>0&&(this.fileurl=e)}watchLanguage(e,t){e!==t&&e.length>0&&(this.language=e)}listenPrintCancel(){this.printOpen=!1,this.files=[],this.filename="";const e=new CustomEvent("printCancel",{bubbles:!0,detail:{}});document.dispatchEvent(e),this.printFinished.emit()}listenPrintSubmit(){this.printOpen=!1,this.printFinished.emit(),this.checkAuth()}listenAuthCancel(){this.authOpen=!1,this.checkAuth()}listenUserCancel(){this.authOpen=!1,this.files=[],this.filename="";const e=new CustomEvent("printCancel",{bubbles:!0,detail:{}});document.dispatchEvent(e),this.checkAuth()}listenAuthSuccess(){this.onlyGetSasUri?(this.printOpen=!1,this.onlyGetSasUri=!1):""!=this.filename?this.printOpen=!0:this.noDocumentOpen=!0}listenUploadFile(e){this.files=e.detail,this.filename=this.files.length>0?this.files[0].name:"",this.open()}listenDialogClose(e){"no-document-selected"===e.detail&&(this.noDocumentOpen=!1)}listenDialogAction(e){"no-document-selected"===e.detail&&(this.noDocumentOpen=!1)}listenLogout(){this.logOut()}async open(){this.authOpen=!0}async logOut(){this.auth.revokeRefreshToken(),localStorage.removeItem("properties"),localStorage.removeItem("refreshToken"),localStorage.removeItem("access_token"),localStorage.removeItem("printer"),localStorage.removeItem("isAuthorized"),this.printOpen=!1}async getSasUri(){this.onlyGetSasUri=!0;const e=new n(this.redirecturi,this.clientid);let t=await e.prepareFileUpload(p.state.accessToken).catch((()=>(this.open(),null)));if(t)return t.sasUri}async getAuthUri(){return this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(p.state.codeVerifier),this.auth.buildAuthURI(),p.state.authUri}async setAuthRefreshToken(e){p.state.refreshToken=e,localStorage.setItem("refreshToken",e),await this.auth.refreshTokens()}async checkAuth(){const e=new n(this.redirecturi,this.clientid);let t=p.state.accessToken;return""===t&&(t=localStorage.getItem("access_token"),p.state.accessToken=t),localStorage.getItem("isAuthorized")&&(p.state.isAuthorized="true"===localStorage.getItem("isAuthorized")),await e.getConfig(p.state.accessToken).then((e=>{if(e.ok&&(p.state.isAuthorized=!0),!e.ok)throw p.state.isAuthorized=!1,Error("http status "+e.status)})).catch((()=>{p.state.isAuthorized=!1})),localStorage.setItem("isAuthorized",""+p.state.isAuthorized),p.state.isAuthorized}normalizeHostUrl(e){if(!e)return e;try{if(e.startsWith("http://")||e.startsWith("https://"))return new URL(e).host}catch(t){console.warn("Failed to parse URL:",e,t)}return e}refreshTokensPeriodically(e){const t=new s(this.redirecturi,this.clientid);setInterval((()=>{t.refreshTokens()}),1e3*e)}async componentWillLoad(){const e=window.matchMedia("(prefers-color-scheme: dark)");this.systemAppearance=e.matches?"dark":"light",e.addEventListener("change",(e=>{this.systemAppearance=e.matches?"dark":"light"})),p.state.redirectUri=this.redirecturi,u.state.theme=this.theme,u.state.appearance=this.appearance,p.state.authApiHostUrl=this.authapihosturl?this.normalizeHostUrl(this.authapihosturl):"account.ezeep.com",d.state.printApiHostUrl=this.printapihosturl?this.normalizeHostUrl(this.printapihosturl):"printapi.ezeep.com",this.auth=new s(this.redirecturi,this.clientid),i(),l(this.language),this.checkAuth()}componentDidLoad(){this.refreshTokensPeriodically(1800)}render(){return o(c,{key:"d18dece1239b7557c5f80198637a828cbb4e820d",class:`${u.state.theme} ${"system"===u.state.appearance?this.systemAppearance:u.state.appearance} ${this.seamless?"seamless":""}`},"custom"===this.trigger?o("slot",null):"file"===this.trigger?o("ezp-upload",null):"button"===this.trigger&&o("ezp-icon-button",{id:"print-trigger",icon:"printer",slot:"trigger",type:"button",onClick:()=>this.open()}),this.authOpen?o("ezp-auth",{clientID:this.clientid,redirectURI:this.redirecturi,hidelogin:this.hidelogin,trigger:this.trigger,code:this.code}):this.printOpen?o("ezp-printer-selection",{clientID:this.clientid,redirectURI:this.redirecturi,filename:this.filename,fileurl:this.fileurl,filetype:this.filetype,fileid:this.fileid,files:this.files,hidemenu:this.hidemenu,hideheader:this.hideheader,seamless:this.seamless}):this.noDocumentOpen?o("ezp-dialog",{heading:h.t("no_document_dialog.heading"),description:h.t("no_document_dialog.description"),action:h.t("no_document_dialog.action"),iconName:"question-mark",instance:"no-document-selected"}):null)}static get watchers(){return{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}}static get style(){return':host{--ezp-black-5:rgba(0, 0, 0, 0.05);--ezp-black-10:rgba(0, 0, 0, 0.1);--ezp-black-20:rgba(0, 0, 0, 0.2);--ezp-black-30:rgba(0, 0, 0, 0.3);--ezp-black-40:rgba(0, 0, 0, 0.4);--ezp-black-50:rgba(0, 0, 0, 0.5);--ezp-black-60:rgba(0, 0, 0, 0.6);--ezp-black-70:rgba(0, 0, 0, 0.7);--ezp-black-80:rgba(0, 0, 0, 0.8);--ezp-black-90:rgba(0, 0, 0, 0.9);--ezp-black-95:rgba(0, 0, 0, 0.95);--ezp-black-100:rgb(0, 0, 0)}:host{--ezp-white-5:rgba(255, 255, 255, 0.05);--ezp-white-10:rgba(255, 255, 255, 0.1);--ezp-white-20:rgba(255, 255, 255, 0.2);--ezp-white-30:rgba(255, 255, 255, 0.3);--ezp-white-40:rgba(255, 255, 255, 0.4);--ezp-white-50:rgba(255, 255, 255, 0.5);--ezp-white-60:rgba(255, 255, 255, 0.6);--ezp-white-70:rgba(255, 255, 255, 0.7);--ezp-white-80:rgba(255, 255, 255, 0.8);--ezp-white-90:rgba(255, 255, 255, 0.9);--ezp-white-95:rgba(255, 255, 255, 0.95);--ezp-white-100:rgb(255, 255, 255)}:host{font-family:"Inter", sans-serif;-webkit-font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;-webkit-box-sizing:border-box;box-sizing:border-box;--ezp-duration-1:0.1s;--ezp-duration-2:0.16s;--ezp-duration-3:0.26s;--ezp-duration-4:0.42s;--ezp-duration-5:0.68s;--ezp-duration-6:1s;--ezp-spacing-1:4px;--ezp-spacing-2:6px;--ezp-spacing-3:10px;--ezp-spacing-4:16px;--ezp-spacing-5:26px;--ezp-spacing-6:42px;--ezp-spacing-7:68px;--ezp-spacing-8:110px;--ezp-easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--ezp-easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--ezp-easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--ezp-easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--ezp-easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--ezp-easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1)}:host([fit-parent]){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;min-height:0}:host([fit-parent]) ezp-upload{-ms-flex:1 1 auto;flex:1 1 auto;min-height:0}:host([fit-parent]) ezp-auth{-ms-flex-negative:0;flex-shrink:0}:host(.light){--ezp-accent-pink-solid:rgb(242, 50, 103);--ezp-accent-pink-solid-alt:rgb(223, 21, 89);--ezp-accent-pink-translucent:rgba(242, 50, 103, 0.16);--ezp-accent-pink-faded:rgba(242, 50, 103, 0.1);--ezp-accent-red-solid:rgb(242, 59, 34);--ezp-accent-red-solid-alt:rgb(222, 35, 19);--ezp-accent-red-translucent:rgba(242, 59, 34, 0.16);--ezp-accent-red-faded:rgba(242, 59, 34, 0.1);--ezp-accent-orange-solid:rgb(254, 114, 0);--ezp-accent-orange-solid-alt:rgb(245, 98, 0);--ezp-accent-orange-translucent:rgba(254, 114, 0, 0.16);--ezp-accent-orange-faded:rgba(254, 114, 0, 0.1);--ezp-accent-yellow-solid:rgb(255, 162, 0);--ezp-accent-yellow-solid-alt:rgb(254, 144, 0);--ezp-accent-yellow-translucent:rgba(255, 162, 0, 0.16);--ezp-accent-yellow-faded:rgba(255, 162, 0, 0.1);--ezp-accent-green-solid:rgb(93, 146, 0);--ezp-accent-green-solid-alt:rgb(81, 129, 0);--ezp-accent-green-translucent:rgba(93, 146, 0, 0.16);--ezp-accent-green-faded:rgba(93, 146, 0, 0.1);--ezp-accent-teal-solid:rgb(0, 150, 124);--ezp-accent-teal-solid-alt:rgb(0, 132, 110);--ezp-accent-teal-translucent:rgba(0, 150, 124, 0.16);--ezp-accent-teal-faded:rgba(0, 150, 124, 0.1);--ezp-accent-cyan-solid:rgb(0, 145, 180);--ezp-accent-cyan-solid-alt:rgb(0, 128, 160);--ezp-accent-cyan-translucent:rgba(0, 145, 180, 0.16);--ezp-accent-cyan-faded:rgba(0, 145, 180, 0.1);--ezp-accent-blue-solid:rgb(80, 129, 241);--ezp-accent-blue-solid-alt:rgb(59, 114, 223);--ezp-accent-blue-translucent:rgba(80, 129, 241, 0.16);--ezp-accent-blue-faded:rgba(80, 129, 241, 0.1);--ezp-accent-dark-blue-solid:rgb(0, 47, 109);--ezp-accent-dark-blue-solid-alt:rgb(0, 35, 84);--ezp-accent-dark-blue-translucent:rgba(0, 47, 109, 0.16);--ezp-accent-dark-blue-faded:rgba(0, 47, 109, 0.1);--ezp-accent-violet-solid:rgb(174, 94, 243);--ezp-accent-violet-solid-alt:rgb(157, 78, 226);--ezp-accent-violet-translucent:rgba(174, 94, 243, 0.16);--ezp-accent-violet-faded:rgba(174, 94, 243, 0.1)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-accent-pink-solid:color(display-p3 0.949 0.196 0.404 / 100%);--ezp-accent-pink-solid-alt:color(display-p3 0.875 0.082 0.349 / 100%);--ezp-accent-pink-translucent:color(display-p3 0.949 0.196 0.404 / 16%);--ezp-accent-pink-faded:color(display-p3 0.949 0.196 0.404 / 10%);--ezp-accent-red-solid:color(display-p3 0.949 0.231 0.133 / 100%);--ezp-accent-red-solid-alt:color(display-p3 0.871 0.137 0.075 / 100%);--ezp-accent-red-translucent:color(display-p3 0.949 0.231 0.133 / 16%);--ezp-accent-red-faded:color(display-p3 0.949 0.231 0.133 / 10%);--ezp-accent-orange-solid:color(display-p3 0.996 0.447 0 / 100%);--ezp-accent-orange-solid-alt:color(display-p3 0.961 0.384 0 / 100%);--ezp-accent-orange-translucent:color(display-p3 0.996 0.447 0 / 16%);--ezp-accent-orange-faded:color(display-p3 0.996 0.447 0 / 10%);--ezp-accent-yellow-solid:color(display-p3 1 0.635 0 / 100%);--ezp-accent-yellow-solid-alt:color(display-p3 0.996 0.565 0 / 100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.635 0 / 16%);--ezp-accent-yellow-faded:color(display-p3 1 0.635 0 / 10%);--ezp-accent-green-solid:color(display-p3 0.365 0.573 0 / 100%);--ezp-accent-green-solid-alt:color(display-p3 0.318 0.506 0 / 100%);--ezp-accent-green-translucent:color(display-p3 0.365 0.573 0 / 16%);--ezp-accent-green-faded:color(display-p3 0.365 0.573 0 / 10%);--ezp-accent-teal-solid:color(display-p3 0 0.588 0.486 / 100%);--ezp-accent-teal-solid-alt:color(display-p3 0 0.518 0.431 / 100%);--ezp-accent-teal-translucent:color(display-p3 0 0.588 0.486 / 16%);--ezp-accent-teal-faded:color(display-p3 0 0.588 0.486 / 10%);--ezp-accent-cyan-solid:color(display-p3 0 0.569 0.706 / 100%);--ezp-accent-cyan-solid-alt:color(display-p3 0 0.502 0.627 / 100%);--ezp-accent-cyan-translucent:color(display-p3 0 0.569 0.706 / 16%);--ezp-accent-cyan-faded:color(display-p3 0 0.569 0.706 / 10%);--ezp-accent-blue-solid:color(display-p3 0.314 0.506 0.945 / 100%);--ezp-accent-blue-solid-alt:color(display-p3 0.231 0.447 0.875 / 100%);--ezp-accent-blue-translucent:color(display-p3 0.314 0.506 0.945 / 16%);--ezp-accent-blue-faded:color(display-p3 0.314 0.506 0.945 / 10%);--ezp-accent-dark-blue-solid:color(display-p3 0 0.184 0.427 / 100%);--ezp-accent-dark-blue-solid-alt:color(display-p3 0 0.137 0.329 / 100%);--ezp-accent-dark-blue-translucent:color(display-p3 0 0.184 0.427 / 16%);--ezp-accent-dark-blue-faded:color(display-p3 0 0.184 0.427 / 10%);--ezp-accent-violet-solid:color(display-p3 0.682 0.369 0.953 / 100%);--ezp-accent-violet-solid-alt:color(display-p3 0.616 0.306 0.886 / 100%);--ezp-accent-violet-translucent:color(display-p3 0.682 0.369 0.953 / 16%);--ezp-accent-violet-faded:color(display-p3 0.682 0.369 0.953 / 10%)}}}:host(.light){--ezp-core-surface-primary:rgb(255, 255, 255);--ezp-core-surface-secondary:rgb(243, 243, 243);--ezp-core-surface-secondary-alt:rgb(249, 249, 249);--ezp-core-surface-tertiary:rgb(255, 255, 255);--ezp-core-foreground-primary:rgba(0, 0, 0, 0.94);--ezp-core-foreground-secondary:rgba(62, 62, 62, 0.68);--ezp-core-foreground-tertiary:rgba(62, 62, 62, 0.42);--ezp-core-shade-primary:rgba(139, 139, 139, 0.1);--ezp-core-shade-secondary:rgba(139, 139, 139, 0.16);--ezp-core-shade-tertiary:rgba(139, 139, 139, 0.22);--ezp-core-outline:rgba(99, 99, 99, 0.16);--ezp-core-edge:rgba(0, 0, 0, 0.1);--ezp-core-backdrop:rgba(0, 0, 0, 0.26)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-core-surface-primary:color(display-p3 1 1 1 / 100%);--ezp-core-surface-secondary:color(display-p3 0.953 0.953 0.953 / 100%);--ezp-core-surface-secondary-alt:color(display-p3 0.976 0.976 0.976 / 100%);--ezp-core-surface-tertiary:color(display-p3 1 1 1 / 100%);--ezp-core-foreground-primary:color(display-p3 0 0 0 / 94%);--ezp-core-foreground-secondary:color(display-p3 0.243 0.243 0.243 / 68%);--ezp-core-foreground-tertiary:color(display-p3 0.243 0.243 0.243 / 42%);--ezp-core-shade-primary:color(display-p3 0.545 0.545 0.545 / 10%);--ezp-core-shade-secondary:color(display-p3 0.545 0.545 0.545 / 16%);--ezp-core-shade-tertiary:color(display-p3 0.545 0.545 0.545 / 22%);--ezp-core-outline:color(display-p3 0.388 0.388 0.388 / 16%);--ezp-core-edge:color(display-p3 0 0 0 / 10%);--ezp-core-backdrop:color(display-p3 0 0 0 / 26%)}}}:host(.dark){--ezp-dialog-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-body-boxShadow:inset 1px 0 0 0 var(--ezp-core-outline), inset -1px 0 0 0 var(--ezp-core-outline);--ezp-printerSelection-box-boxShadow:0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-footer-boxShadowPosition:inset 0 0 0 1px;--ezp-printerSelection-header-boxShadowPosition:inset 0 0 0 1px;--ezp-select-wrap-boxShadowPositionBottom:inset 0 -1px 0 0;--ezp-select-wrap-boxShadowPositionLeft:inset 1px 0 0 0;--ezp-select-wrap-boxShadowPositionRight:inset -1px 0 0 0;--ezp-select-wrap-boxShadowPositionTop:inset 0 1px 0 0;--ezp-status-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-stepper-boxShadowPosition:inset 0 0 0 1px;--ezp-userMenu-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-userMenu-header-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-links-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-theme-boxShadowPosition:inset 0 -1px 0 0;--ezp-input-box-shadow-position-top:inset 0 1px 0 0;--ezp-input-box-shadow-position-right:inset -1px 0 0 0;--ezp-input-box-shadow-position-bottom:inset 0 -1px 0 0;--ezp-input-box-shadow-position-left:inset 1px 0 0 0;--ezp-accent-pink-solid:rgb(255, 65, 113);--ezp-accent-pink-translucent:rgba(255, 65, 113, 0.26);--ezp-accent-pink-faded:rgba(255, 65, 113, 0.16);--ezp-accent-red-solid:rgb(255, 72, 44);--ezp-accent-red-translucent:rgba(255, 72, 44, 0.26);--ezp-accent-red-faded:rgba(255, 72, 44, 0.16);--ezp-accent-orange-solid:rgb(255, 129, 28);--ezp-accent-orange-translucent:rgba(255, 129, 28, 0.26);--ezp-accent-orange-faded:rgba(255, 129, 28, 0.16);--ezp-accent-yellow-solid:rgb(255, 175, 58);--ezp-accent-yellow-translucent:rgba(255, 175, 58, 0.26);--ezp-accent-yellow-faded:rgba(255, 175, 58, 0.16);--ezp-accent-green-solid:rgb(103, 156, 21);--ezp-accent-green-translucent:rgba(103, 156, 21, 0.26);--ezp-accent-green-faded:rgba(103, 156, 21, 0.16);--ezp-accent-teal-solid:rgb(29, 160, 134);--ezp-accent-teal-translucent:rgba(29, 160, 134, 0.26);--ezp-accent-teal-faded:rgba(29, 160, 134, 0.16);--ezp-accent-cyan-solid:rgb(32, 155, 191);--ezp-accent-cyan-translucent:rgba(32, 155, 191, 0.26);--ezp-accent-cyan-faded:rgba(32, 155, 191, 0.16);--ezp-accent-blue-solid:rgb(93, 139, 253);--ezp-accent-blue-translucent:rgba(93, 139, 253, 0.26);--ezp-accent-blue-faded:rgba(93, 139, 253, 0.16);--ezp-accent-dark-blue-solid:rgb(20, 56, 119);--ezp-accent-dark-blue-translucent:rgba(20, 56, 119, 0.26);--ezp-accent-dark-blue-faded:rgba(20, 56, 119, 0.16);--ezp-accent-violet-solid:rgb(186, 105, 255);--ezp-accent-violet-translucent:rgba(186, 105, 255, 0.26);--ezp-accent-violet-faded:rgba(186, 105, 255, 0.16)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-accent-pink-solid:color(display-p3 1 0.255 0.443 / 100%);--ezp-accent-pink-translucent:color(display-p3 1 0.255 0.443 / 26%);--ezp-accent-pink-faded:color(display-p3 1 0.255 0.443 / 16%);--ezp-accent-red-solid:color(display-p3 1 0.282 0.173 / 100%);--ezp-accent-red-translucent:color(display-p3 1 0.282 0.173 / 26%);--ezp-accent-red-faded:color(display-p3 1 0.282 0.173 / 16%);--ezp-accent-orange-solid:color(display-p3 1 0.506 0.11 / 100%);--ezp-accent-orange-translucent:color(display-p3 1 0.506 0.11 / 26%);--ezp-accent-orange-faded:color(display-p3 1 0.506 0.11 / 16%);--ezp-accent-yellow-solid:color(display-p3 1 0.686 0.227 / 100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.686 0.227 / 26%);--ezp-accent-yellow-faded:color(display-p3 1 0.686 0.227 / 16%);--ezp-accent-green-solid:color(display-p3 0.404 0.612 0.082 / 100%);--ezp-accent-green-translucent:color(display-p3 0.404 0.612 0.082 / 26%);--ezp-accent-green-faded:color(display-p3 0.404 0.612 0.082 / 16%);--ezp-accent-teal-solid:color(display-p3 0.114 0.627 0.525 / 100%);--ezp-accent-teal-translucent:color(display-p3 0.114 0.627 0.525 / 26%);--ezp-accent-teal-faded:color(display-p3 0.114 0.627 0.525 / 16%);--ezp-accent-cyan-solid:color(display-p3 0.125 0.608 0.749 / 100%);--ezp-accent-cyan-translucent:color(display-p3 0.125 0.608 0.749 / 26%);--ezp-accent-cyan-faded:color(display-p3 0.125 0.608 0.749 / 16%);--ezp-accent-blue-solid:color(display-p3 0.365 0.545 0.992 / 100%);--ezp-accent-blue-translucent:color(display-p3 0.365 0.545 0.992 / 26%);--ezp-accent-blue-faded:color(display-p3 0.365 0.545 0.992 / 16%);--ezp-accent-dark-blue-solid:color(display-p3 0.078 0.22 0.467 / 100%);--ezp-accent-dark-blue-translucent:color(display-p3 0.078 0.22 0.467 / 26%);--ezp-accent-dark-blue-faded:color(display-p3 0.078 0.22 0.467 / 16%);--ezp-accent-violet-solid:color(display-p3 0.729 0.412 1 / 100%);--ezp-accent-violet-translucent:color(display-p3 0.729 0.412 1 / 26%);--ezp-accent-violet-faded:color(display-p3 0.729 0.412 1 / 16%)}}}:host(.dark){--ezp-core-surface-primary:rgb(0, 0, 0);--ezp-core-surface-secondary:rgb(27, 27, 27);--ezp-core-surface-secondary-alt:rgb(19, 19, 19);--ezp-core-surface-tertiary:rgb(40, 40, 40);--ezp-core-foreground-primary:rgba(255, 255, 255, 0.94);--ezp-core-foreground-secondary:rgba(182, 182, 182, 0.68);--ezp-core-foreground-tertiary:rgba(182, 182, 182, 0.42);--ezp-core-shade-primary:rgba(99, 99, 99, 0.26);--ezp-core-shade-secondary:rgba(99, 99, 99, 0.32);--ezp-core-shade-tertiary:rgba(99, 99, 99, 0.38);--ezp-core-outline:rgba(139, 139, 139, 0.26);--ezp-core-edge:rgba(255, 255, 255, 0.16);--ezp-core-backdrop:rgba(0, 0, 0, 0.68)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-core-surface-primary:color(display-p3 0 0 0 / 100%);--ezp-core-surface-secondary:color(display-p3 0.106 0.106 0.106 / 100%);--ezp-core-surface-secondary-alt:color(display-p3 0.075 0.075 0.075 / 100%);--ezp-core-surface-tertiary:color(display-p3 0.157 0.157 0.157 / 100%);--ezp-core-foreground-primary:color(display-p3 1 1 1 / 94%);--ezp-core-foreground-secondary:color(display-p3 0.714 0.714 0.714 / 68%);--ezp-core-foreground-tertiary:color(display-p3 0.714 0.714 0.714 / 42%);--ezp-core-shade-primary:color(display-p3 0.388 0.388 0.388 / 26%);--ezp-core-shade-secondary:color(display-p3 0.388 0.388 0.388 / 32%);--ezp-core-shade-tertiary:color(display-p3 0.388 0.388 0.388 / 38%);--ezp-core-outline:color(display-p3 0.545 0.545 0.545 / 26%);--ezp-core-edge:color(display-p3 1 1 1 / 16%);--ezp-core-backdrop:color(display-p3 0 0 0 / 68%)}}}:host(.seamless){--ezp-status-border-radius:0;--ezp-backdrop-border-radius:0}:host(.blue){--ezp-theme-solid:var(--ezp-accent-blue-solid);--ezp-theme-translucent:var(--ezp-accent-blue-translucent)}:host(.cyan){--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent)}:host(.green){--ezp-theme-solid:var(--ezp-accent-green-solid);--ezp-theme-translucent:var(--ezp-accent-green-translucent)}:host(.teal){--ezp-theme-solid:var(--ezp-accent-teal-solid);--ezp-theme-translucent:var(--ezp-accent-teal-translucent)}:host(.orange){--ezp-theme-solid:var(--ezp-accent-orange-solid);--ezp-theme-translucent:var(--ezp-accent-orange-translucent)}:host(.pink){--ezp-theme-solid:var(--ezp-accent-pink-solid);--ezp-theme-translucent:var(--ezp-accent-pink-translucent)}:host(.red){--ezp-theme-solid:var(--ezp-accent-red-solid);--ezp-theme-translucent:var(--ezp-accent-red-translucent)}:host(.violet){--ezp-theme-solid:var(--ezp-accent-violet-solid);--ezp-theme-translucent:var(--ezp-accent-violet-translucent)}'}},[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}]),C=j,F=function(){"undefined"!=typeof customElements&&["ezp-printing","ezp-auth","ezp-backdrop","ezp-dialog","ezp-icon","ezp-icon-button","ezp-input","ezp-label","ezp-printer-selection","ezp-select","ezp-status","ezp-stepper","ezp-text-button","ezp-upload","ezp-user-menu"].forEach((e=>{switch(e){case"ezp-printing":customElements.get(r(e))||customElements.define(r(e),j);break;case"ezp-auth":customElements.get(r(e))||b();break;case"ezp-backdrop":customElements.get(r(e))||y();break;case"ezp-dialog":customElements.get(r(e))||m();break;case"ezp-icon":customElements.get(r(e))||f();break;case"ezp-icon-button":customElements.get(r(e))||k();break;case"ezp-input":customElements.get(r(e))||w();break;case"ezp-label":customElements.get(r(e))||x();break;case"ezp-printer-selection":customElements.get(r(e))||z();break;case"ezp-select":customElements.get(r(e))||v();break;case"ezp-status":customElements.get(r(e))||S();break;case"ezp-stepper":customElements.get(r(e))||E();break;case"ezp-text-button":customElements.get(r(e))||A();break;case"ezp-upload":customElements.get(r(e))||U();break;case"ezp-user-menu":customElements.get(r(e))||g()}}))};export{C as EzpPrinting,F as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as c,Host as o,transformTag as r}from"@stencil/core/internal/client";import{s,a as i,E as p,b as n}from"./auth.js";import{a as l,p as d,d as z}from"./ezp-printer-selection2.js";import{u,E as h,d as g}from"./ezp-user-menu2.js";import{i as b,s as y,a as m,T as f}from"./utils.js";import{d as k}from"./ezp-auth2.js";import{d as w}from"./ezp-backdrop2.js";import{d as x}from"./ezp-dialog2.js";import{d as v}from"./ezp-icon2.js";import{d as S}from"./ezp-icon-button2.js";import{d as C}from"./ezp-input2.js";import{d as E}from"./ezp-label2.js";import{d as U}from"./ezp-select2.js";import{d as j}from"./ezp-status2.js";import{d as P}from"./ezp-stepper2.js";import{d as A}from"./ezp-text-button2.js";import{d as F}from"./ezp-upload2.js";const D=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.printFinished=a(this,"printFinished",7),this.filename="",this.hidemenu=!1,this.hideheader=!1,this.theme="cyan",this.appearance="system",this.language="",this.seamless=!1,this.printOpen=!1,this.authOpen=!1,this.onlyGetSasUri=!1,this.noDocumentOpen=!1,this.files=[]}watchFileData(e,t){if(e!==t&&e.length>0){const t=new Uint8Array(e.length);for(let a=0;a<e.length;a++)t[a]=e.charCodeAt(a);this.files=[new File([t],this.filename)]}}watchFilename(e,t){e!==t&&e.length>0&&(this.filename=e)}watchFileUrl(e,t){e!==t&&e.length>0&&(this.fileurl=e)}watchLanguage(e,t){e!==t&&e.length>0&&(this.language=e,b.changeLanguage(e))}listenPrintCancel(){this.printOpen=!1,this.files=[],this.filename="";const e=new CustomEvent("printCancel",{bubbles:!0,detail:{}});document.dispatchEvent(e),this.printFinished.emit()}listenPrintSubmit(){this.printOpen=!1,this.printFinished.emit(),this.checkAuth()}listenAuthCancel(){this.authOpen=!1,this.checkAuth()}listenUserCancel(){this.authOpen=!1,this.files=[],this.filename="";const e=new CustomEvent("printCancel",{bubbles:!0,detail:{}});document.dispatchEvent(e),this.checkAuth()}async listenAuthSuccess(){await this.syncPreferredLanguage(),this.onlyGetSasUri?(this.printOpen=!1,this.onlyGetSasUri=!1):""!=this.filename?this.printOpen=!0:this.noDocumentOpen=!0}listenUploadFile(e){this.files=e.detail,this.filename=this.files.length>0?this.files[0].name:""}listenUploadContinue(e){this.files=e.detail,this.filename=this.files.length>0?this.files[0].name:"",this.open()}listenDialogClose(e){"no-document-selected"===e.detail&&(this.noDocumentOpen=!1)}listenDialogAction(e){"no-document-selected"===e.detail&&(this.noDocumentOpen=!1)}listenLogout(){this.logOut()}async open(){this.authOpen=!0}async logOut(){this.auth.revokeRefreshToken(),s.clearSession(),this.printOpen=!1}ensureAccessToken(){return""===i.state.accessToken&&""!==i.state.refreshToken&&this.auth?(this.refreshInFlight||(this.refreshInFlight=this.auth.refreshTokens().catch((()=>{})).finally((()=>{this.refreshInFlight=void 0}))),this.refreshInFlight):Promise.resolve()}async getSasUri(){this.onlyGetSasUri=!0,await this.ensureAccessToken();const e=new l(this.redirecturi,this.clientid),t=await e.prepareFileUpload(i.state.accessToken).catch((()=>(this.open(),null)));return t?t.sasUri:void 0}async getAuthUri(){return this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(i.state.codeVerifier),this.auth.buildAuthURI(),i.state.authUri}async setAuthRefreshToken(e){i.state.refreshToken=e,s.setRefreshToken(e),await this.auth.refreshTokens()}async checkAuth(){const e=new l(this.redirecturi,this.clientid);return await this.ensureAccessToken(),s.hasIsAuthorized()&&(i.state.isAuthorized=s.getIsAuthorized()),await e.getConfig(i.state.accessToken).then((e=>{if(e.ok&&(i.state.isAuthorized=!0),!e.ok)throw i.state.isAuthorized=!1,Error("http status "+e.status)})).catch((()=>{i.state.isAuthorized=!1})),s.setIsAuthorized(i.state.isAuthorized),i.state.isAuthorized}normalizeHostUrl(e){if(!e)return e;try{if(e.startsWith("http://")||e.startsWith("https://"))return new URL(e).host}catch(e){}return e}refreshTokensPeriodically(e){const t=new p(this.redirecturi,this.clientid);this.tokenRefreshInterval=setInterval((()=>{t.refreshTokens()}),1e3*e)}connectedCallback(){this.unsubscribeLanguage=y(this)}async componentWillLoad(){const e=window.matchMedia("(prefers-color-scheme: dark)");this.systemAppearance=e.matches?"dark":"light",this.systemAppearanceQuery=e,this.systemAppearanceListener=e=>{this.systemAppearance=e.matches?"dark":"light"},e.addEventListener("change",this.systemAppearanceListener),i.state.redirectUri=this.redirecturi,u.state.theme=this.theme,u.state.appearance=this.appearance,i.state.authApiHostUrl=this.authapihosturl?this.normalizeHostUrl(this.authapihosturl):"account.ezeep.com",d.state.printApiHostUrl=this.printapihosturl?this.normalizeHostUrl(this.printapihosturl):"printapi.ezeep.com",this.auth=new p(this.redirecturi,this.clientid),n(),m(this.language),this.checkAuth().then((()=>this.syncPreferredLanguage()))}async syncPreferredLanguage(){if(!this.language&&i.state.accessToken)try{const e=await(new h).getUserInfo(),t=null==e?void 0:e.preferred_language;t&&t!==b.language&&await b.changeLanguage(t)}catch(e){}}componentDidLoad(){this.refreshTokensPeriodically(f)}disconnectedCallback(){var e;this.tokenRefreshInterval&&clearInterval(this.tokenRefreshInterval),this.systemAppearanceQuery&&this.systemAppearanceListener&&this.systemAppearanceQuery.removeEventListener("change",this.systemAppearanceListener),null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}render(){return c(o,{key:"e25b56d55da0fdcc0485d5e07e176397f2503dde",class:`${u.state.theme} ${"system"===u.state.appearance?this.systemAppearance:u.state.appearance} ${this.seamless?"seamless":""}`},"custom"===this.trigger?c("slot",null):"file"===this.trigger?c("ezp-upload",null):"button"===this.trigger&&c("ezp-icon-button",{id:"print-trigger",icon:"printer",slot:"trigger",type:"button",onClick:()=>this.open()}),this.authOpen?c("ezp-auth",{clientID:this.clientid,redirectURI:this.redirecturi,hidelogin:this.hidelogin,trigger:this.trigger,code:this.code}):this.printOpen?c("ezp-printer-selection",{clientID:this.clientid,redirectURI:this.redirecturi,filename:this.filename,fileurl:this.fileurl,filetype:this.filetype,fileid:this.fileid,files:this.files,hidemenu:this.hidemenu,hideheader:this.hideheader,seamless:this.seamless}):this.noDocumentOpen?c("ezp-dialog",{heading:b.t("no_document_dialog.heading"),description:b.t("no_document_dialog.description"),action:b.t("no_document_dialog.action"),iconName:"question-mark",instance:"no-document-selected"}):null)}static get watchers(){return{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}}static get style(){return':host{--ezp-black-5:rgba(0, 0, 0, 0.05);--ezp-black-10:rgba(0, 0, 0, 0.1);--ezp-black-20:rgba(0, 0, 0, 0.2);--ezp-black-30:rgba(0, 0, 0, 0.3);--ezp-black-40:rgba(0, 0, 0, 0.4);--ezp-black-50:rgba(0, 0, 0, 0.5);--ezp-black-60:rgba(0, 0, 0, 0.6);--ezp-black-70:rgba(0, 0, 0, 0.7);--ezp-black-80:rgba(0, 0, 0, 0.8);--ezp-black-90:rgba(0, 0, 0, 0.9);--ezp-black-95:rgba(0, 0, 0, 0.95);--ezp-black-100:rgb(0, 0, 0)}:host{--ezp-white-5:rgba(255, 255, 255, 0.05);--ezp-white-10:rgba(255, 255, 255, 0.1);--ezp-white-20:rgba(255, 255, 255, 0.2);--ezp-white-30:rgba(255, 255, 255, 0.3);--ezp-white-40:rgba(255, 255, 255, 0.4);--ezp-white-50:rgba(255, 255, 255, 0.5);--ezp-white-60:rgba(255, 255, 255, 0.6);--ezp-white-70:rgba(255, 255, 255, 0.7);--ezp-white-80:rgba(255, 255, 255, 0.8);--ezp-white-90:rgba(255, 255, 255, 0.9);--ezp-white-95:rgba(255, 255, 255, 0.95);--ezp-white-100:rgb(255, 255, 255)}:host{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", sans-serif;-webkit-font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;--ezp-duration-1:0.1s;--ezp-duration-2:0.16s;--ezp-duration-3:0.26s;--ezp-duration-4:0.42s;--ezp-duration-5:0.68s;--ezp-duration-6:1s;--ezp-spacing-1:4px;--ezp-spacing-2:6px;--ezp-spacing-3:10px;--ezp-spacing-4:16px;--ezp-spacing-5:26px;--ezp-spacing-6:42px;--ezp-spacing-7:68px;--ezp-spacing-8:110px;--ezp-easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--ezp-easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--ezp-easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--ezp-easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--ezp-easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--ezp-easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1)}:host([fit-parent]){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;min-height:0}:host([fit-parent]) ezp-upload{-ms-flex:1 1 auto;flex:1 1 auto;min-height:0}:host([fit-parent]) ezp-auth{-ms-flex-negative:0;flex-shrink:0}:host(.light){--ezp-accent-pink-solid:rgb(242, 50, 103);--ezp-accent-pink-solid-alt:rgb(223, 21, 89);--ezp-accent-pink-translucent:rgba(242, 50, 103, 0.16);--ezp-accent-pink-faded:rgba(242, 50, 103, 0.1);--ezp-accent-red-solid:rgb(242, 59, 34);--ezp-accent-red-solid-alt:rgb(222, 35, 19);--ezp-accent-red-translucent:rgba(242, 59, 34, 0.16);--ezp-accent-red-faded:rgba(242, 59, 34, 0.1);--ezp-accent-orange-solid:rgb(254, 114, 0);--ezp-accent-orange-solid-alt:rgb(245, 98, 0);--ezp-accent-orange-translucent:rgba(254, 114, 0, 0.16);--ezp-accent-orange-faded:rgba(254, 114, 0, 0.1);--ezp-accent-yellow-solid:rgb(255, 162, 0);--ezp-accent-yellow-solid-alt:rgb(254, 144, 0);--ezp-accent-yellow-translucent:rgba(255, 162, 0, 0.16);--ezp-accent-yellow-faded:rgba(255, 162, 0, 0.1);--ezp-accent-green-solid:rgb(93, 146, 0);--ezp-accent-green-solid-alt:rgb(81, 129, 0);--ezp-accent-green-translucent:rgba(93, 146, 0, 0.16);--ezp-accent-green-faded:rgba(93, 146, 0, 0.1);--ezp-accent-teal-solid:rgb(0, 150, 124);--ezp-accent-teal-solid-alt:rgb(0, 132, 110);--ezp-accent-teal-translucent:rgba(0, 150, 124, 0.16);--ezp-accent-teal-faded:rgba(0, 150, 124, 0.1);--ezp-accent-cyan-solid:rgb(0, 143, 178);--ezp-accent-cyan-solid-alt:rgb(0, 126, 158);--ezp-accent-cyan-translucent:rgba(0, 143, 178, 0.1);--ezp-accent-cyan-faded:rgba(0, 143, 178, 0.1);--ezp-accent-blue-solid:rgb(80, 129, 241);--ezp-accent-blue-solid-alt:rgb(59, 114, 223);--ezp-accent-blue-translucent:rgba(80, 129, 241, 0.16);--ezp-accent-blue-faded:rgba(80, 129, 241, 0.1);--ezp-accent-dark-blue-solid:rgb(0, 47, 109);--ezp-accent-dark-blue-solid-alt:rgb(0, 35, 84);--ezp-accent-dark-blue-translucent:rgba(0, 47, 109, 0.16);--ezp-accent-dark-blue-faded:rgba(0, 47, 109, 0.1);--ezp-accent-violet-solid:rgb(174, 94, 243);--ezp-accent-violet-solid-alt:rgb(157, 78, 226);--ezp-accent-violet-translucent:rgba(174, 94, 243, 0.16);--ezp-accent-violet-faded:rgba(174, 94, 243, 0.1)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-accent-pink-solid:color(display-p3 0.949 0.196 0.404 / 100%);--ezp-accent-pink-solid-alt:color(display-p3 0.875 0.082 0.349 / 100%);--ezp-accent-pink-translucent:color(display-p3 0.949 0.196 0.404 / 16%);--ezp-accent-pink-faded:color(display-p3 0.949 0.196 0.404 / 10%);--ezp-accent-red-solid:color(display-p3 0.949 0.231 0.133 / 100%);--ezp-accent-red-solid-alt:color(display-p3 0.871 0.137 0.075 / 100%);--ezp-accent-red-translucent:color(display-p3 0.949 0.231 0.133 / 16%);--ezp-accent-red-faded:color(display-p3 0.949 0.231 0.133 / 10%);--ezp-accent-orange-solid:color(display-p3 0.996 0.447 0 / 100%);--ezp-accent-orange-solid-alt:color(display-p3 0.961 0.384 0 / 100%);--ezp-accent-orange-translucent:color(display-p3 0.996 0.447 0 / 16%);--ezp-accent-orange-faded:color(display-p3 0.996 0.447 0 / 10%);--ezp-accent-yellow-solid:color(display-p3 1 0.635 0 / 100%);--ezp-accent-yellow-solid-alt:color(display-p3 0.996 0.565 0 / 100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.635 0 / 16%);--ezp-accent-yellow-faded:color(display-p3 1 0.635 0 / 10%);--ezp-accent-green-solid:color(display-p3 0.365 0.573 0 / 100%);--ezp-accent-green-solid-alt:color(display-p3 0.318 0.506 0 / 100%);--ezp-accent-green-translucent:color(display-p3 0.365 0.573 0 / 16%);--ezp-accent-green-faded:color(display-p3 0.365 0.573 0 / 10%);--ezp-accent-teal-solid:color(display-p3 0 0.588 0.486 / 100%);--ezp-accent-teal-solid-alt:color(display-p3 0 0.518 0.431 / 100%);--ezp-accent-teal-translucent:color(display-p3 0 0.588 0.486 / 16%);--ezp-accent-teal-faded:color(display-p3 0 0.588 0.486 / 10%);--ezp-accent-cyan-solid:color(display-p3 0 0.561 0.698 / 100%);--ezp-accent-cyan-solid-alt:color(display-p3 0 0.494 0.62 / 100%);--ezp-accent-cyan-translucent:color(display-p3 0 0.561 0.698 / 10%);--ezp-accent-cyan-faded:color(display-p3 0 0.561 0.698 / 10%);--ezp-accent-blue-solid:color(display-p3 0.314 0.506 0.945 / 100%);--ezp-accent-blue-solid-alt:color(display-p3 0.231 0.447 0.875 / 100%);--ezp-accent-blue-translucent:color(display-p3 0.314 0.506 0.945 / 16%);--ezp-accent-blue-faded:color(display-p3 0.314 0.506 0.945 / 10%);--ezp-accent-dark-blue-solid:color(display-p3 0 0.184 0.427 / 100%);--ezp-accent-dark-blue-solid-alt:color(display-p3 0 0.137 0.329 / 100%);--ezp-accent-dark-blue-translucent:color(display-p3 0 0.184 0.427 / 16%);--ezp-accent-dark-blue-faded:color(display-p3 0 0.184 0.427 / 10%);--ezp-accent-violet-solid:color(display-p3 0.682 0.369 0.953 / 100%);--ezp-accent-violet-solid-alt:color(display-p3 0.616 0.306 0.886 / 100%);--ezp-accent-violet-translucent:color(display-p3 0.682 0.369 0.953 / 16%);--ezp-accent-violet-faded:color(display-p3 0.682 0.369 0.953 / 10%)}}}:host(.light){--ezp-core-surface-primary:rgb(255, 255, 255);--ezp-core-surface-secondary:rgb(243, 243, 243);--ezp-core-surface-secondary-alt:rgb(249, 249, 249);--ezp-core-surface-tertiary:rgb(255, 255, 255);--ezp-core-foreground-primary:rgba(0, 0, 0, 0.94);--ezp-core-foreground-secondary:rgba(62, 62, 62, 0.68);--ezp-core-foreground-tertiary:rgba(62, 62, 62, 0.42);--ezp-core-shade-primary:rgba(139, 139, 139, 0.1);--ezp-core-shade-secondary:rgba(139, 139, 139, 0.16);--ezp-core-shade-tertiary:rgba(139, 139, 139, 0.22);--ezp-core-outline:rgba(99, 99, 99, 0.16);--ezp-core-edge:rgba(0, 0, 0, 0.1);--ezp-core-backdrop:rgba(0, 0, 0, 0.26)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-core-surface-primary:color(display-p3 1 1 1 / 100%);--ezp-core-surface-secondary:color(display-p3 0.953 0.953 0.953 / 100%);--ezp-core-surface-secondary-alt:color(display-p3 0.976 0.976 0.976 / 100%);--ezp-core-surface-tertiary:color(display-p3 1 1 1 / 100%);--ezp-core-foreground-primary:color(display-p3 0 0 0 / 94%);--ezp-core-foreground-secondary:color(display-p3 0.243 0.243 0.243 / 68%);--ezp-core-foreground-tertiary:color(display-p3 0.243 0.243 0.243 / 42%);--ezp-core-shade-primary:color(display-p3 0.545 0.545 0.545 / 10%);--ezp-core-shade-secondary:color(display-p3 0.545 0.545 0.545 / 16%);--ezp-core-shade-tertiary:color(display-p3 0.545 0.545 0.545 / 22%);--ezp-core-outline:color(display-p3 0.388 0.388 0.388 / 16%);--ezp-core-edge:color(display-p3 0 0 0 / 10%);--ezp-core-backdrop:color(display-p3 0 0 0 / 26%)}}}:host(.dark){--ezp-dialog-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-body-boxShadow:inset 1px 0 0 0 var(--ezp-core-outline), inset -1px 0 0 0 var(--ezp-core-outline);--ezp-printerSelection-box-boxShadow:0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-footer-boxShadowPosition:inset 0 0 0 1px;--ezp-printerSelection-header-boxShadowPosition:inset 0 0 0 1px;--ezp-select-wrap-boxShadowPositionBottom:inset 0 -1px 0 0;--ezp-select-wrap-boxShadowPositionLeft:inset 1px 0 0 0;--ezp-select-wrap-boxShadowPositionRight:inset -1px 0 0 0;--ezp-select-wrap-boxShadowPositionTop:inset 0 1px 0 0;--ezp-status-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-stepper-boxShadowPosition:inset 0 0 0 1px;--ezp-userMenu-boxShadow:inset 0 0 0 1px var(--ezp-core-outline), 0 0 0 1px var(--ezp-black-60);--ezp-userMenu-header-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-links-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-theme-boxShadowPosition:inset 0 -1px 0 0;--ezp-input-box-shadow-position-top:inset 0 1px 0 0;--ezp-input-box-shadow-position-right:inset -1px 0 0 0;--ezp-input-box-shadow-position-bottom:inset 0 -1px 0 0;--ezp-input-box-shadow-position-left:inset 1px 0 0 0;--ezp-accent-pink-solid:rgb(255, 65, 113);--ezp-accent-pink-translucent:rgba(255, 65, 113, 0.26);--ezp-accent-pink-faded:rgba(255, 65, 113, 0.16);--ezp-accent-red-solid:rgb(255, 72, 44);--ezp-accent-red-translucent:rgba(255, 72, 44, 0.26);--ezp-accent-red-faded:rgba(255, 72, 44, 0.16);--ezp-accent-orange-solid:rgb(255, 129, 28);--ezp-accent-orange-translucent:rgba(255, 129, 28, 0.26);--ezp-accent-orange-faded:rgba(255, 129, 28, 0.16);--ezp-accent-yellow-solid:rgb(255, 175, 58);--ezp-accent-yellow-translucent:rgba(255, 175, 58, 0.26);--ezp-accent-yellow-faded:rgba(255, 175, 58, 0.16);--ezp-accent-green-solid:rgb(103, 156, 21);--ezp-accent-green-translucent:rgba(103, 156, 21, 0.26);--ezp-accent-green-faded:rgba(103, 156, 21, 0.16);--ezp-accent-teal-solid:rgb(29, 160, 134);--ezp-accent-teal-translucent:rgba(29, 160, 134, 0.26);--ezp-accent-teal-faded:rgba(29, 160, 134, 0.16);--ezp-accent-cyan-solid:rgb(32, 153, 189);--ezp-accent-cyan-translucent:rgba(32, 153, 189, 0.26);--ezp-accent-cyan-faded:rgba(32, 153, 189, 0.16);--ezp-accent-blue-solid:rgb(93, 139, 253);--ezp-accent-blue-translucent:rgba(93, 139, 253, 0.26);--ezp-accent-blue-faded:rgba(93, 139, 253, 0.16);--ezp-accent-dark-blue-solid:rgb(20, 56, 119);--ezp-accent-dark-blue-translucent:rgba(20, 56, 119, 0.26);--ezp-accent-dark-blue-faded:rgba(20, 56, 119, 0.16);--ezp-accent-violet-solid:rgb(186, 105, 255);--ezp-accent-violet-translucent:rgba(186, 105, 255, 0.26);--ezp-accent-violet-faded:rgba(186, 105, 255, 0.16)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-accent-pink-solid:color(display-p3 1 0.255 0.443 / 100%);--ezp-accent-pink-translucent:color(display-p3 1 0.255 0.443 / 26%);--ezp-accent-pink-faded:color(display-p3 1 0.255 0.443 / 16%);--ezp-accent-red-solid:color(display-p3 1 0.282 0.173 / 100%);--ezp-accent-red-translucent:color(display-p3 1 0.282 0.173 / 26%);--ezp-accent-red-faded:color(display-p3 1 0.282 0.173 / 16%);--ezp-accent-orange-solid:color(display-p3 1 0.506 0.11 / 100%);--ezp-accent-orange-translucent:color(display-p3 1 0.506 0.11 / 26%);--ezp-accent-orange-faded:color(display-p3 1 0.506 0.11 / 16%);--ezp-accent-yellow-solid:color(display-p3 1 0.686 0.227 / 100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.686 0.227 / 26%);--ezp-accent-yellow-faded:color(display-p3 1 0.686 0.227 / 16%);--ezp-accent-green-solid:color(display-p3 0.404 0.612 0.082 / 100%);--ezp-accent-green-translucent:color(display-p3 0.404 0.612 0.082 / 26%);--ezp-accent-green-faded:color(display-p3 0.404 0.612 0.082 / 16%);--ezp-accent-teal-solid:color(display-p3 0.114 0.627 0.525 / 100%);--ezp-accent-teal-translucent:color(display-p3 0.114 0.627 0.525 / 26%);--ezp-accent-teal-faded:color(display-p3 0.114 0.627 0.525 / 16%);--ezp-accent-cyan-solid:color(display-p3 0.125 0.6 0.741 / 100%);--ezp-accent-cyan-translucent:color(display-p3 0.125 0.6 0.741 / 26%);--ezp-accent-cyan-faded:color(display-p3 0.125 0.6 0.741 / 16%);--ezp-accent-blue-solid:color(display-p3 0.365 0.545 0.992 / 100%);--ezp-accent-blue-translucent:color(display-p3 0.365 0.545 0.992 / 26%);--ezp-accent-blue-faded:color(display-p3 0.365 0.545 0.992 / 16%);--ezp-accent-dark-blue-solid:color(display-p3 0.078 0.22 0.467 / 100%);--ezp-accent-dark-blue-translucent:color(display-p3 0.078 0.22 0.467 / 26%);--ezp-accent-dark-blue-faded:color(display-p3 0.078 0.22 0.467 / 16%);--ezp-accent-violet-solid:color(display-p3 0.729 0.412 1 / 100%);--ezp-accent-violet-translucent:color(display-p3 0.729 0.412 1 / 26%);--ezp-accent-violet-faded:color(display-p3 0.729 0.412 1 / 16%)}}}:host(.dark){--ezp-core-surface-primary:rgb(0, 0, 0);--ezp-core-surface-secondary:rgb(27, 27, 27);--ezp-core-surface-secondary-alt:rgb(19, 19, 19);--ezp-core-surface-tertiary:rgb(40, 40, 40);--ezp-core-foreground-primary:rgba(255, 255, 255, 0.94);--ezp-core-foreground-secondary:rgba(182, 182, 182, 0.68);--ezp-core-foreground-tertiary:rgba(182, 182, 182, 0.42);--ezp-core-shade-primary:rgba(99, 99, 99, 0.26);--ezp-core-shade-secondary:rgba(99, 99, 99, 0.32);--ezp-core-shade-tertiary:rgba(99, 99, 99, 0.38);--ezp-core-outline:rgba(139, 139, 139, 0.26);--ezp-core-edge:rgba(255, 255, 255, 0.16);--ezp-core-backdrop:rgba(0, 0, 0, 0.68)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-core-surface-primary:color(display-p3 0 0 0 / 100%);--ezp-core-surface-secondary:color(display-p3 0.106 0.106 0.106 / 100%);--ezp-core-surface-secondary-alt:color(display-p3 0.075 0.075 0.075 / 100%);--ezp-core-surface-tertiary:color(display-p3 0.157 0.157 0.157 / 100%);--ezp-core-foreground-primary:color(display-p3 1 1 1 / 94%);--ezp-core-foreground-secondary:color(display-p3 0.714 0.714 0.714 / 68%);--ezp-core-foreground-tertiary:color(display-p3 0.714 0.714 0.714 / 42%);--ezp-core-shade-primary:color(display-p3 0.388 0.388 0.388 / 26%);--ezp-core-shade-secondary:color(display-p3 0.388 0.388 0.388 / 32%);--ezp-core-shade-tertiary:color(display-p3 0.388 0.388 0.388 / 38%);--ezp-core-outline:color(display-p3 0.545 0.545 0.545 / 26%);--ezp-core-edge:color(display-p3 1 1 1 / 16%);--ezp-core-backdrop:color(display-p3 0 0 0 / 68%)}}}:host(.seamless){--ezp-status-border-radius:0;--ezp-backdrop-border-radius:0}:host(.blue){--ezp-theme-solid:var(--ezp-accent-blue-solid);--ezp-theme-translucent:var(--ezp-accent-blue-translucent)}:host(.cyan){--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent)}:host(.green){--ezp-theme-solid:var(--ezp-accent-green-solid);--ezp-theme-translucent:var(--ezp-accent-green-translucent)}:host(.teal){--ezp-theme-solid:var(--ezp-accent-teal-solid);--ezp-theme-translucent:var(--ezp-accent-teal-translucent)}:host(.orange){--ezp-theme-solid:var(--ezp-accent-orange-solid);--ezp-theme-translucent:var(--ezp-accent-orange-translucent)}:host(.pink){--ezp-theme-solid:var(--ezp-accent-pink-solid);--ezp-theme-translucent:var(--ezp-accent-pink-translucent)}:host(.red){--ezp-theme-solid:var(--ezp-accent-red-solid);--ezp-theme-translucent:var(--ezp-accent-red-translucent)}:host(.violet){--ezp-theme-solid:var(--ezp-accent-violet-solid);--ezp-theme-translucent:var(--ezp-accent-violet-translucent)}'}},[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}]),L=D,I=function(){"undefined"!=typeof customElements&&["ezp-printing","ezp-auth","ezp-backdrop","ezp-dialog","ezp-icon","ezp-icon-button","ezp-input","ezp-label","ezp-printer-selection","ezp-select","ezp-status","ezp-stepper","ezp-text-button","ezp-upload","ezp-user-menu"].forEach((e=>{switch(e){case"ezp-printing":customElements.get(r(e))||customElements.define(r(e),D);break;case"ezp-auth":customElements.get(r(e))||k();break;case"ezp-backdrop":customElements.get(r(e))||w();break;case"ezp-dialog":customElements.get(r(e))||x();break;case"ezp-icon":customElements.get(r(e))||v();break;case"ezp-icon-button":customElements.get(r(e))||S();break;case"ezp-input":customElements.get(r(e))||C();break;case"ezp-label":customElements.get(r(e))||E();break;case"ezp-printer-selection":customElements.get(r(e))||z();break;case"ezp-select":customElements.get(r(e))||U();break;case"ezp-status":customElements.get(r(e))||j();break;case"ezp-stepper":customElements.get(r(e))||P();break;case"ezp-text-button":customElements.get(r(e))||A();break;case"ezp-upload":customElements.get(r(e))||F();break;case"ezp-user-menu":customElements.get(r(e))||g()}}))};export{L as EzpPrinting,I as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as i,Host as s,transformTag as r}from"@stencil/core/internal/client";import{d as o}from"./ezp-backdrop2.js";import{d as l}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.selectToggle=a(this,"selectToggle",7),this.selectSelection=a(this,"selectSelection",7),this.backdrop=document.createElement("ezp-backdrop"),this.containerHeight=0,this.expandCover=!1,this.expandRise=!1,this.listHeight=0,this.spacing=6,this.toggleHeight=0,this.wrapDiff=0,this.wrapHeight=0,this.wrapTop=0,this.duration=0,this.label="Label",this.placeholder="Placeholder",this.toggleFlow="horizontal",this.disabled=!1,this.expanded=!1,this.selected={id:!1,title:"",meta:""},this.toggle=()=>{this.containerHeight=this.container.clientHeight-2*this.spacing,this.listHeight=this.list.scrollHeight,this.wrapTop=this.component.offsetTop,this.wrapHeight=this.toggleHeight+this.listHeight,this.expandCover=this.wrapHeight>this.containerHeight,this.expandRise=this.wrapHeight>this.containerHeight-this.wrapTop,this.wrapDiff=this.containerHeight-this.wrapHeight-this.wrapTop,this.expanded=!this.expanded,this.selectToggle.emit(this.expanded)},this.select=e=>{var t;const a=(null===(t=this.selected)||void 0===t?void 0:t.id)===e?0:1e3*this.duration;this.selected=this.options.find((t=>t.id===e)),this.selectSelection.emit(this.selected),window.setTimeout((()=>{this.toggle()}),a)},this.preSelect=()=>{var e;this.selected=null===(e=this.options)||void 0===e?void 0:e.find((e=>"number"==typeof this.preSelected?e.id===this.preSelected:"string"==typeof this.preSelected?e.title===this.preSelected:null))}}watchExpanded(){this.expandCover?(this.component.style.setProperty("--ezp-select-list-height",this.expanded?this.containerHeight-this.toggleHeight+"px":"0px"),this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?`${-1*this.wrapTop+this.spacing}px`:"0px")):this.expandRise?(this.component.style.setProperty("--ezp-select-list-height",this.expanded?`${this.listHeight}px`:"0px"),this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?`${this.wrapDiff+this.spacing}px`:"0px")):this.component.style.setProperty("--ezp-select-list-height",this.expanded?`${this.listHeight}px`:"0px"),this.expanded?(this.backdrop.visible=!0,this.container.appendChild(this.backdrop)):this.backdrop.visible=!1}preSelectedChanged(){this.preSelect()}componentWillLoad(){this.container=this.component.closest("[data-backdrop-surface]"),this.backdrop.addEventListener("backdropHideStart",(()=>{this.expanded=!1})),this.backdrop.addEventListener("backdropHideEnd",(()=>{this.container.removeChild(this.backdrop)})),void 0!==this.preSelected&&""!==this.preSelected&&null!==this.preSelected&&this.preSelect()}componentDidLoad(){const e=getComputedStyle(this.component);this.toggleHeight=parseInt(e.getPropertyValue("--ezp-select-toggle-height")),this.duration=parseFloat(e.getPropertyValue("--ezp-select-duration"))}componentWillUpdate(){var e;!1===(null===(e=this.selected)||void 0===e?void 0:e.id)&&void 0!==this.preSelected&&""!==this.preSelected&&null!==this.preSelected&&this.preSelect()}render(){var e,t,a;const r="horizontal"===this.toggleFlow?"secondary":"tertiary";return i(s,{key:"83c7b61b1b9362a970ba6813a1bb5e906ee56141",class:[this.expanded?"is-expanded":"",this.icon?"has-icon":"",`toggle-${this.toggleFlow}`,this.optionFlow?`option-${this.optionFlow}`:"",this.disabled?"disabled":""].join(" ")},i("div",{key:"df54f1cd115d4d7ca46c6d4719909747769a0b33",id:"wrap"},i("div",{key:"a5beb6bdb7918ee120f7e09b70a9e0cbcd15b309",id:"toggle",onClick:()=>!this.disabled&&this.toggle()},this.icon?i("ezp-icon",{id:"icon",name:this.icon}):null,i("ezp-label",{key:"25e7315afd533ae3aeb6455aa95cfe9acb4f8448",id:"label",noWrap:!0,level:r,text:this.label}),i("ezp-label",{key:"ed4c2a0eb21930de52b1a1b5462d2e6fb78f4c0a",id:"value",ellipsis:!0,text:""!==(null===(e=this.selected)||void 0===e?void 0:e.title)?null===(t=this.selected)||void 0===t?void 0:t.title:this.placeholder}),i("ezp-icon",{key:"46dacc59d23f3f8fb52181e6d23ac75ba4fd0ada",id:"accessory",name:"expand"})),i("div",{key:"0ca5ee65dc954ee6893e8f55b3529001654bb467",id:"list",ref:e=>this.list=e},null===(a=this.options)||void 0===a?void 0:a.map((e=>{var t;if(""!==e.title)return i("div",{class:`option ${e.id===(null===(t=this.selected)||void 0===t?void 0:t.id)?"is-selected":""} ${""!==e.meta?"has-meta":""} `,onClick:()=>this.select(e.id)},i("ezp-icon",{name:"checkmark",class:"indicator"}),i("div",{class:"details"},i("ezp-label",{class:"title",ellipsis:!0,text:e.title}),""!==e.meta?i("ezp-label",{level:"tertiary",class:"meta",text:e.meta,ellipsis:!0}):null))})))))}get component(){return this}static get watchers(){return{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}}static get style(){return":host{--ezp-select-duration:var(--ezp-duration-3);display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(:first-child){--ezp-select-wrap-borderRadius:3px 3px 0 0}:host(:last-child){--ezp-select-wrap-borderRadius:0 0 3px 3px}:host(:first-child:last-child){--ezp-select-wrap-borderRadius:3px}:host(:not(:last-child):not(.is-expanded)){--ezp-select-wrap-boxShadowPositionBottom:0 0 0 0}:host(.toggle-horizontal){--ezp-select-label-alignSelf:start;--ezp-select-toggle-gridTemplateAreas:'label value accessory';--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:30px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:end}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label accessory' 'value accessory';--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:48px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label accessory' 'icon value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:30px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:48px}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-icon-color:var(--ezp-theme-solid);--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-wrap-borderRadius:3px}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-icon-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-core-surface-tertiary);border-radius:var(--ezp-select-wrap-borderRadius, 0);-webkit-box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:var(--ezp-spacing-2) var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-3)}#toggle:hover{--ezp-select-toggle-background:var( --ezp-select-toggle-background-hover, var(--ezp-core-shade-primary) )}#icon{align-self:center;color:var(--ezp-select-icon-color, var(--ezp-core-foreground-secondary));grid-area:icon;margin:calc(var(--ezp-spacing-2) * -1) 0}#label{align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-secondary));grid-area:label}#value{align-self:var(--ezp-select-value-alignSelf, auto);color:var(--value-color, var(--ezp-core-foreground-primary));grid-area:value}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-secondary));grid-area:accessory;margin:calc(var(--ezp-spacing-2) * -1) 0}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}"}},[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},void 0,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}]);function n(){"undefined"!=typeof customElements&&["ezp-select","ezp-backdrop","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-select":customElements.get(r(e))||customElements.define(r(e),c);break;case"ezp-backdrop":customElements.get(r(e))||o();break;case"ezp-icon":customElements.get(r(e))||l();break;case"ezp-label":customElements.get(r(e))||p()}}))}export{c as E,n as d}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as r,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as o}from"./ezp-backdrop2.js";import{d as l}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";const n={id:!1,title:"",meta:""},c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.selectToggle=a(this,"selectToggle",7),this.selectSelection=a(this,"selectSelection",7),this.backdrop=document.createElement("ezp-backdrop"),this.containerHeight=0,this.expandCover=!1,this.expandRise=!1,this.listHeight=0,this.spacing=6,this.toggleHeight=0,this.wrapDiff=0,this.wrapHeight=0,this.wrapTop=0,this.duration=0,this.label="Label",this.placeholder="Placeholder",this.toggleFlow="horizontal",this.disabled=!1,this.expanded=!1,this.selected=n,this.toggle=()=>{this.containerHeight=this.container.clientHeight-2*this.spacing,this.listHeight=this.list.scrollHeight,this.wrapTop=this.component.offsetTop,this.wrapHeight=this.toggleHeight+this.listHeight,this.expandCover=this.wrapHeight>this.containerHeight,this.expandRise=this.wrapHeight>this.containerHeight-this.wrapTop,this.wrapDiff=this.containerHeight-this.wrapHeight-this.wrapTop,this.expanded=!this.expanded,this.selectToggle.emit(this.expanded)},this.select=e=>{var t;const a=(null===(t=this.selected)||void 0===t?void 0:t.id)===e?0:1e3*this.duration;this.selected=this.options.find((t=>t.id===e)),this.selectSelection.emit(this.selected),window.setTimeout((()=>{this.toggle()}),a)},this.preSelect=()=>{var e;const t=null===(e=this.options)||void 0===e?void 0:e.find((e=>"number"==typeof this.preSelected?e.id===this.preSelected:"string"==typeof this.preSelected?e.title===this.preSelected:null));this.selected=null!=t?t:n},this.handleToggleKeydown=e=>{this.disabled||("Enter"===e.key||" "===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.expanded||(this.toggle(),window.setTimeout((()=>this.focusOption(0)),0))):"Escape"===e.key&&this.expanded&&this.toggle())},this.handleOptionKeydown=(e,t)=>{var a;const r=this.getOptionElements(),i=r.indexOf(e.currentTarget);switch(e.key){case"Enter":case" ":e.preventDefault(),this.select(t);break;case"ArrowDown":e.preventDefault(),this.focusOption(i+1);break;case"ArrowUp":e.preventDefault(),this.focusOption(i-1);break;case"Home":e.preventDefault(),this.focusOption(0);break;case"End":e.preventDefault(),this.focusOption(r.length-1);break;case"Escape":this.expanded&&(this.toggle(),null===(a=this.toggleEl)||void 0===a||a.focus())}}}watchExpanded(){this.expandCover?(this.component.style.setProperty("--ezp-select-list-height",this.expanded?this.containerHeight-this.toggleHeight+"px":"0px"),this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?`${-1*this.wrapTop+this.spacing}px`:"0px")):this.expandRise?(this.component.style.setProperty("--ezp-select-list-height",this.expanded?`${this.listHeight}px`:"0px"),this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?`${this.wrapDiff+this.spacing}px`:"0px")):this.component.style.setProperty("--ezp-select-list-height",this.expanded?`${this.listHeight}px`:"0px"),this.expanded?(this.backdrop.visible=!0,this.container.appendChild(this.backdrop)):this.backdrop.visible=!1}preSelectedChanged(){this.preSelect()}getOptionElements(){return this.list?Array.from(this.list.querySelectorAll('[role="option"]')):[]}focusOption(e){const t=this.getOptionElements(),a=t[Math.max(0,Math.min(e,t.length-1))];null==a||a.focus()}componentWillLoad(){this.container=this.component.closest("[data-backdrop-surface]"),this.backdrop.addEventListener("backdropHideStart",(()=>{this.expanded=!1})),this.backdrop.addEventListener("backdropHideEnd",(()=>{this.container.removeChild(this.backdrop)})),void 0!==this.preSelected&&""!==this.preSelected&&null!==this.preSelected&&this.preSelect()}componentDidLoad(){const e=getComputedStyle(this.component);this.toggleHeight=parseInt(e.getPropertyValue("--ezp-select-toggle-height")),this.duration=parseFloat(e.getPropertyValue("--ezp-select-duration"))}componentWillUpdate(){var e;!1===(null===(e=this.selected)||void 0===e?void 0:e.id)&&void 0!==this.preSelected&&""!==this.preSelected&&null!==this.preSelected&&this.preSelect()}render(){var e,t,a;const s="horizontal"===this.toggleFlow?"secondary":"tertiary";return r(i,{key:"feebc96701d65827e984b1d75d9ef96974ae6df3",class:[this.expanded?"is-expanded":"",this.icon?"has-icon":"",`toggle-${this.toggleFlow}`,this.optionFlow?`option-${this.optionFlow}`:"",this.disabled?"disabled":""].join(" ")},r("div",{key:"ef9d6ac76f626f74d0dfc0cff7e1747afae0df1b",id:"wrap"},r("div",{key:"3a18e8c059d93be76f72b0244133b7dbddba5d0d",id:"toggle",role:"combobox","aria-haspopup":"listbox","aria-controls":"list","aria-expanded":this.expanded?"true":"false","aria-label":this.label,"aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?-1:0,ref:e=>this.toggleEl=e,onClick:()=>!this.disabled&&this.toggle(),onKeyDown:this.handleToggleKeydown},this.icon?r("ezp-icon",{id:"icon",name:this.icon}):null,r("ezp-label",{key:"fda5f7c7f33343634df401890b1c580369273568",id:"label",noWrap:!0,level:s,text:this.label}),r("ezp-label",{key:"2cad104bb14338efaf165c7edff5a7226b9f8a8c",id:"value",ellipsis:!0,text:""!==(null===(e=this.selected)||void 0===e?void 0:e.title)?null===(t=this.selected)||void 0===t?void 0:t.title:this.placeholder}),r("ezp-icon",{key:"e4e3a59e2ee36ee9d07232ca03e540b4e7dad6ba",id:"accessory",name:"expand"})),r("div",{key:"3f3c5bc0202985d4f64ba9df828c877df1240f6f",id:"list",role:"listbox","aria-label":this.label,ref:e=>this.list=e},null===(a=this.options)||void 0===a?void 0:a.map((e=>{var t,a;if(""!==e.title)return r("div",{class:`option ${e.id===(null===(t=this.selected)||void 0===t?void 0:t.id)?"is-selected":""} ${""!==e.meta?"has-meta":""} `,role:"option","aria-selected":e.id===(null===(a=this.selected)||void 0===a?void 0:a.id)?"true":"false",tabindex:this.expanded?0:-1,onClick:()=>this.select(e.id),onKeyDown:t=>this.handleOptionKeydown(t,e.id)},r("ezp-icon",{name:"checkmark",class:"indicator"}),r("div",{class:"details"},r("ezp-label",{class:"title",ellipsis:!0,text:e.title}),""!==e.meta?r("ezp-label",{level:"tertiary",class:"meta",text:e.meta,ellipsis:!0}):null))})))))}get component(){return this}static get watchers(){return{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}}static get style(){return":host{--ezp-select-duration:var(--ezp-duration-3);--ezp-badge-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(.toggle-horizontal){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label value accessory';--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:56px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:center}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label accessory' 'value accessory';--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:64px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label accessory' 'icon value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:44px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:52px}:host(.toggle-vertical.has-icon){--ezp-select-badge-background:var(--ezp-badge-gradient);--ezp-select-badge-color:var(--ezp-white-100);--ezp-select-badge-height:44px;--ezp-select-badge-width:44px;--ezp-select-label-textTransform:uppercase;--ezp-select-label-letterSpacing:0.08em;--ezp-select-label-fontSize:11px;--ezp-select-value-fontSize:16px;--ezp-select-value-fontWeight:600;--ezp-select-value-color:var(--ezp-core-foreground-primary)}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-toggle-background:var(--ezp-theme-translucent);--ezp-select-wrap-background:var(--ezp-core-surface-tertiary);--ezp-select-wrap-borderRadius:12px;--ezp-select-wrap-boxShadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop)}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-badge-background:var(--ezp-core-shade-primary);--ezp-select-badge-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--ezp-select-value-color:var(--ezp-core-foreground-tertiary);--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-select-wrap-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-shadow:var(--ezp-select-wrap-boxShadow, none);box-shadow:var(--ezp-select-wrap-boxShadow, none);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:2px var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart)}#toggle:hover{--ezp-select-toggle-background:var( --ezp-select-toggle-background-hover, var(--ezp-core-shade-primary) )}#icon{--ezp-icon-background:var(--ezp-select-badge-background, var(--ezp-theme-translucent));--ezp-icon-borderRadius:50%;--ezp-icon-height:var(--ezp-select-badge-height, 40px);--ezp-icon-width:var(--ezp-select-badge-width, 40px);align-self:center;color:var(--ezp-select-badge-color, var(--ezp-theme-solid));grid-area:icon}#label{--ezp-label-fontSize:var(--ezp-select-label-fontSize, 14px);--ezp-label-letterSpacing:var(--ezp-select-label-letterSpacing, normal);align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-primary));grid-area:label;text-transform:var(--ezp-select-label-textTransform, none)}#value{--ezp-label-fontSize:var(--ezp-select-value-fontSize, 14px);--ezp-label-fontWeight:var(--ezp-select-value-fontWeight, 400);align-self:var(--ezp-select-value-alignSelf, auto);color:var(--ezp-select-value-color, var(--value-color, var(--ezp-core-foreground-secondary)));grid-area:value;text-align:right}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-tertiary));grid-area:accessory}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}"}},[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},void 0,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["ezp-select","ezp-backdrop","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-select":customElements.get(s(e))||customElements.define(s(e),c);break;case"ezp-backdrop":customElements.get(s(e))||o();break;case"ezp-icon":customElements.get(s(e))||l();break;case"ezp-label":customElements.get(s(e))||p()}}))}export{c as E,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as r,transformTag as s}from"@stencil/core/internal/client";import{s as o,i as n}from"./utils.js";import{d as c}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";import{d as l}from"./ezp-text-button2.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.statusCancel=i(this,"statusCancel",7),this.statusClose=i(this,"statusClose",7),this.statusRetry=i(this,"statusRetry",7),this.description="Description",this.processing=!1,this.handleCancel=()=>{this.statusCancel.emit(this.instance)},this.handleClose=()=>{this.statusClose.emit(this.instance)},this.handleRetry=()=>{this.statusRetry.emit(this.instance)}}connectedCallback(){this.unsubscribeLanguage=o(this)}disconnectedCallback(){var e;null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}render(){return a(r,{key:"5956a42fc8d74042fe88418c5f98011d0bf728c8",role:"status","aria-live":"polite"},a("div",{key:"b1aebc3725a621c0e4474481064988167ca80328",id:"box"},this.processing?a("svg",{id:"indicator",viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("circle",{id:"track",cx:"21",cy:"21",r:"18"}),a("circle",{id:"value",cx:"21",cy:"21",r:"18"})):this.icon?a("div",{id:"icon"},a("div",{id:"icon-inner"},a("ezp-icon",{name:this.icon}))):null,a("ezp-label",{key:"34baad28a5ffc3fac42eef6a886ae52f772e3576",id:"description",weight:"heavy",text:this.description}),this.subtext&&a("ezp-label",{key:"321659cc9ae7a40f62c8fc6447556d1aa026a9dc",id:"subtext",level:"secondary",text:this.subtext}),(this.cancel||this.close||this.retry)&&a("div",{key:"ce83d1db0aad512f282f1a2bbfbf112a3d2f7aed",id:"footer"},this.cancel&&a("ezp-text-button",{key:"9eb72f9e158b1e2c6a4fd2d2755705c2041b67f5",class:"action secondary",level:"secondary",onClick:this.handleCancel,label:"string"==typeof this.cancel?this.cancel:n.t("button_actions.cancel")}),this.close&&a("ezp-text-button",{key:"9a10f49011bf0f0cba24905e82574199837e122a",class:"action "+(this.retry?"secondary":"primary"),level:this.retry?"secondary":"primary",onClick:this.handleClose,label:"string"==typeof this.close?this.close:n.t("button_actions.close")}),this.retry&&a("ezp-text-button",{key:"2522cfae37af2c9e8800af545f04b986affac356",class:"action primary",level:"primary",onClick:this.handleRetry,label:"string"==typeof this.retry?this.retry:n.t("button_actions.retry")}))))}static get style(){return":host{--ezp-status-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );-ms-flex-align:center;align-items:center;background:var(--ezp-core-backdrop);border-radius:var(--ezp-status-border-radius, 16px);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;height:100%;-ms-flex-pack:center;justify-content:center;left:0;padding:var(--ezp-spacing-5);position:absolute;top:0;width:100%;z-index:9999}@media (prefers-color-scheme: dark){:host{--box-separator-position:inset 0 0 0 var(--hairline-width-positive)}}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#box{-ms-flex-align:center;align-items:center;background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);max-width:360px;padding:var(--ezp-spacing-6) var(--ezp-spacing-5) var(--ezp-spacing-5);text-align:center;width:100%}#icon{-ms-flex-align:center;align-items:center;background:var(--ezp-theme-translucent);border-radius:50%;display:-ms-flexbox;display:flex;height:132px;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ezp-spacing-2);width:132px}#icon-inner{-ms-flex-align:center;align-items:center;background:var(--ezp-status-gradient);border-radius:50%;-webkit-box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:84px;-ms-flex-pack:center;justify-content:center;width:84px}#icon-inner ezp-icon{--ezp-icon-size:40px;--ezp-icon-gridTemplate:40px}#indicator{-webkit-animation:rotate var(--ezp-duration-6) linear infinite;animation:rotate var(--ezp-duration-6) linear infinite;display:block;height:48px;-webkit-transform:rotate(0);transform:rotate(0);width:48px}#track{fill:none;stroke:var(--ezp-core-outline);stroke-width:4px}#value{-webkit-animation:offset var(--ezp-duration-6) linear alternate infinite;animation:offset var(--ezp-duration-6) linear alternate infinite;fill:none;stroke:var(--ezp-theme-solid);stroke-dasharray:110;stroke-dashoffset:110;stroke-linecap:round;stroke-width:4px}#description{--ezp-label-fontSize:22px;--ezp-label-lineHeight:28px;color:var(--ezp-core-foreground-primary)}#subtext{color:var(--ezp-core-foreground-secondary);margin-top:calc(var(--ezp-spacing-4) * -1 + var(--ezp-spacing-2))}#footer{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);margin-top:var(--ezp-spacing-3);width:100%}.action{--ezp-textButton-borderRadius:999px;--ezp-textButton-padding:var(--ezp-spacing-4);-ms-flex:1;flex:1}ezp-text-button.action.primary{--ezp-textButton-background-init:var(--ezp-status-gradient)}ezp-text-button.action.secondary{--ezp-textButton-background-init:transparent;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary)}@-webkit-keyframes offset{100%{stroke-dashoffset:55}}@keyframes offset{100%{stroke-dashoffset:55}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"}},[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}]);function x(){"undefined"!=typeof customElements&&["ezp-status","ezp-icon","ezp-label","ezp-text-button"].forEach((e=>{switch(e){case"ezp-status":customElements.get(s(e))||customElements.define(s(e),d);break;case"ezp-icon":customElements.get(s(e))||c();break;case"ezp-label":customElements.get(s(e))||p();break;case"ezp-text-button":customElements.get(s(e))||l()}}))}export{d as E,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as o,transformTag as a}from"@stencil/core/internal/client";import{d as n}from"./ezp-icon2.js";import{d as s}from"./ezp-label2.js";const p=e(class e extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stepperChanged=i(this,"stepperChanged",7),this.label="Label",this.min=1,this.canDecrease=!0,this.canIncrease=!0,this.focused=!1,this.value=1,this.handleDecrease=()=>{const e=this.value-1;e>=Number.MIN_SAFE_INTEGER&&(void 0===this.min||e>=this.min)&&(this.value=e)},this.handleIncrease=()=>{const e=this.value+1,t=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;e<=Number.MAX_SAFE_INTEGER&&e<=t&&(this.value=e)},this.handleInput=()=>{if(!this.input)return;const e=this.input.value.trim();if(""===e)return this.value=this.min,void(this.input.value=this.value.toString());const t=e.replace(/\D/g,"");if(""===t)return void(this.input.value=this.value.toString());const i=Number.MAX_SAFE_INTEGER.toString().length,r=t.slice(0,i);let o=Number(r);o>Number.MAX_SAFE_INTEGER&&(o=Number.MAX_SAFE_INTEGER),void 0!==this.min&&o<this.min&&(o=this.min);const a=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;o>a&&(o=a),this.value=o,this.input.value=o.toString()},this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0},this.handleKeyDown=t=>{e.ALLOWED_KEYS.includes(t.key)||(t.ctrlKey||t.metaKey)&&e.CTRL_CMD_KEYS.includes(t.key.toLowerCase())||/^\d$/.test(t.key)||t.preventDefault()}}watchValue(){const e=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;this.canIncrease=this.value<e,this.canDecrease=void 0===this.min||this.value>this.min,this.stepperChanged.emit(this.value)}componentWillLoad(){void 0!==this.min&&this.value<this.min&&(this.value=this.min),this.watchValue()}render(){return r(o,{key:"ef15da0203857706cd220bd932fe25fb20f9a876",class:`${this.focused?"focused":""} ${this.icon?"has-icon":""}`},r("div",{key:"c36d83b93752da6678184e6e5d449e7422d0dd10",id:"toggle",onClick:this.setFocus}),this.icon?r("ezp-icon",{id:"icon",name:this.icon}):null,r("ezp-label",{key:"14e07c854636dfce079c349dd245fa8c7fc3025d",id:"label",noWrap:!0,text:this.label}),r("div",{key:"11eef956e9f5dbb0feffa5fd2aed60dae7d80035",class:"buttons"},r("button",{key:"e328929f56a3aebeff825a711674a9e3d9e91ab0",class:"button",type:"button","aria-label":`Decrease ${this.label}`,disabled:!this.canDecrease,onClick:this.handleDecrease},r("ezp-icon",{key:"d1af53b4ab9e22c28bd16325851f01e7c551de94",name:"minus"})),r("input",{key:"3591c3060576cf1abdc1187e20aa97b901589a92",id:"input",type:"number",ref:e=>this.input=e,min:this.min.toString(),max:void 0!==this.max?this.max.toString():void 0,value:this.value.toString(),"aria-label":this.label,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),r("button",{key:"c081e7190bbea2f2d75cf81394c781ade876dce6",class:"button",type:"button","aria-label":`Increase ${this.label}`,disabled:!this.canIncrease,onClick:this.handleIncrease},r("ezp-icon",{key:"d3a1ddde274537dec1f5a17c0cdf5afdd40fe24f",name:"plus"}))))}static get watchers(){return{value:[{watchValue:0}]}}static get style(){return':host{-ms-flex-align:center;align-items:center;background:transparent;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/1fr auto);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-label-color:var(--ezp-core-foreground-primary)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / auto 1fr auto}#toggle{background:transparent;border-radius:12px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-stepper-icon-color, var(--ezp-theme-solid));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));pointer-events:none}#input{-moz-appearance:textfield;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:16px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0109597786em;margin:0;min-width:28px;outline:none;padding:0;text-align:center;width:28px}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3)}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;height:32px;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:32px}.button ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-theme-translucent);--ezp-stepper-button-border:var(--ezp-theme-solid);--ezp-stepper-button-color:var(--ezp-theme-solid)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-border:var(--ezp-core-shade-primary);--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}'}},[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},void 0,{value:[{watchValue:0}]}]);function c(){"undefined"!=typeof customElements&&["ezp-stepper","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-stepper":customElements.get(a(e))||customElements.define(a(e),p);break;case"ezp-icon":customElements.get(a(e))||n();break;case"ezp-label":customElements.get(a(e))||s()}}))}p.ALLOWED_KEYS=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowUp","ArrowRight","ArrowDown"],p.CTRL_CMD_KEYS=["a","c","v","x"];export{p as E,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as a,transformTag as r}from"@stencil/core/internal/client";import{d as n}from"./ezp-label2.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.blank=!1,this.disabled=!1,this.level="primary",this.small=!1}render(){return o(a,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as a,transformTag as r}from"@stencil/core/internal/client";import{d as n}from"./ezp-label2.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.blank=!1,this.disabled=!1,this.level="primary",this.small=!1}render(){return o(a,{key:"e4d814429f79e8c7043ac26f44ebab08ba119cb4",class:`${this.level}`},o(void 0!==this.type?"button":"a",Object.assign({key:"e3f66d16f69c8abc1f073558b6547644340dcb6b",id:"button","aria-label":this.label},void 0!==this.type?{type:this.type,disabled:this.disabled}:{href:this.href,target:this.blank?"_blank":"_self"}),o("ezp-label",{key:"c091e210993059cdf044863fe600212ec04c44b7",id:"label",weight:"heavy",text:this.label,level:this.small?"tertiary":"secondary"})))}static get style(){return":host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:var(--ezp-textButton-borderRadius, 3px);-webkit-box-shadow:var(--ezp-textButton-boxShadow, none);box-shadow:var(--ezp-textButton-boxShadow, none);color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-textButton-padding, var(--ezp-spacing-3));white-space:nowrap;width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var( --ezp-textButton-background-hover, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var( --ezp-textButton-background-active, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}"}},[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}]);function p(){"undefined"!=typeof customElements&&["ezp-text-button","ezp-label"].forEach((t=>{switch(t){case"ezp-text-button":customElements.get(r(t))||customElements.define(r(t),i);break;case"ezp-label":customElements.get(r(t))||n()}}))}export{i as E,p as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as a,createEvent as t,h as r,Host as i,Fragment as o,transformTag as l}from"@stencil/core/internal/client";import{i as n}from"./i18next.js";import{d as p}from"./ezp-icon2.js";import{d as s}from"./ezp-icon-button2.js";import{d}from"./ezp-label2.js";const c=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uploadFile=t(this,"uploadFile",7),this.selectedFiles=[],this.dragging=!1,this.handleInput=()=>{const e=Array.from(this.input.files);this.selectedFiles=[...this.selectedFiles,...e],this.uploadFile.emit(this.selectedFiles),this.input&&(this.input.value="")},this.removeFile=(e,a)=>{e.preventDefault(),e.stopPropagation(),this.selectedFiles=this.selectedFiles.filter(((e,t)=>t!==a)),this.uploadFile.emit(this.selectedFiles),this.input&&(this.input.value="")}}handleDragEnter(){this.dragging=!0}handleDragOver(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}handleDragLeave(){this.dragging=!1}handleDrop(e){e.stopPropagation(),e.preventDefault(),this.dragging=!1;const a=Array.from(e.dataTransfer.files);this.selectedFiles=[...this.selectedFiles,...a],this.uploadFile.emit(this.selectedFiles)}listenPrintCancel(){this.form.reset(),this.selectedFiles=[]}render(){return r(i,{key:"4711c053e354bac32778220913800e9ddbeea4ae",class:{dragging:this.dragging}},r("form",{key:"bc38c6da6d342dbec11724ada061a136ce5e8ec9",id:"form",ref:e=>this.form=e},r("div",{key:"7823a9d8b9687a3dd4614a6de2d8ce9ed9e105a9",id:"header"},r("ezp-icon",{key:"0cfe322cd35d84ca5dd55d03c2e9f485d61c36fc",name:"drag-drop",size:"huge",framed:!0}),r("ezp-label",{key:"54408d9e0b2bc3837dbda634c8f0d1980cd9ca13",weight:"strong",text:n.t("upload.description")}),r("div",{key:"2c205310172c020fff181af64aa2b2d01b8c14a3",id:"meta"},r("ezp-label",{key:"5d66adb460bcaa82a0f2bdff02e4bef61c926471",level:"tertiary",text:n.t("upload.meta_leading")}),r("label",{key:"eb84ebab2edf72fabab9c818d609a93a0dd531d5",htmlFor:"input",id:"select"},r("ezp-label",{key:"8daed6c65c7ba63b741d958e824e2c5e5cdc402f",level:"tertiary",weight:"strong",text:n.t("upload.meta_select")})),r("input",{key:"bdc526e6393100006423e1e7fe2eacc4c7ba1984",type:"file",name:"input",id:"input",multiple:!0,ref:e=>this.input=e,onInput:this.handleInput}),r("ezp-label",{key:"7126b66e7fa542bb4566e1b2af1a03357da08cf3",level:"tertiary",text:n.t("upload.meta_trailing")})),this.selectedFiles.length>0&&r(o,null,r("ezp-label",{key:"e0334c3a4378db13dbcf755b79564b7ecbe3630e",level:"secondary",text:n.t("upload.selected_files")}),r("div",{key:"aaa7963218870cd372b67b48d7e73945f39b062a",id:"file-list"},this.selectedFiles.map(((e,a)=>r("div",{key:a,class:"file-item"},r("div",{class:"file-name"},r("ezp-label",{level:"tertiary",text:e.name})),r("div",{class:"file-remove"},r("ezp-icon-button",{icon:"close",type:"button",level:"tertiary",onClick:e=>this.removeFile(e,a)}))))))))))}static get style(){return'@charset "UTF-8";:host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);}#header:has(#file-list){gap:var(--ezp-spacing-3)}#header:has(#file-list)>ezp-icon{display:none}#header:has(#file-list)>ezp-label:first-of-type{display:none}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);width:100%;max-height:var(--ezp-upload-fileList-maxHeight, 35vh);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ezp-core-foreground-tertiary) transparent;}#file-list::-webkit-scrollbar{width:8px;height:8px}#file-list::-webkit-scrollbar-thumb{background:var(--ezp-core-foreground-tertiary);border-radius:4px}#file-list::-webkit-scrollbar-track{background:transparent}.file-item{display:grid;grid-template-columns:1fr auto;-ms-flex-align:center;align-items:center;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);background:var(--ezp-core-background-secondary);border-radius:3px;min-height:32px}.file-name{grid-column:1;min-width:0}.file-name ezp-label{--ezp-label-minWidth:0}.file-remove{grid-column:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}'}},[1,"ezp-upload",{selectedFiles:[32],dragging:[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]]);function u(){"undefined"!=typeof customElements&&["ezp-upload","ezp-icon","ezp-icon-button","ezp-label"].forEach((e=>{switch(e){case"ezp-upload":customElements.get(l(e))||customElements.define(l(e),c);break;case"ezp-icon":customElements.get(l(e))||p();break;case"ezp-icon-button":customElements.get(l(e))||s();break;case"ezp-label":customElements.get(l(e))||d()}}))}export{c as E,u as d}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as a,createEvent as t,h as o,Host as r,transformTag as i}from"@stencil/core/internal/client";import{s as n,i as d}from"./utils.js";import{d as l}from"./ezp-icon2.js";import{d as p}from"./ezp-icon-button2.js";import{d as s}from"./ezp-label2.js";import{d as c}from"./ezp-text-button2.js";const b=["PDF","DOCX","PNG","JPG","XLSX"],u=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uploadFile=t(this,"uploadFile",7),this.uploadContinue=t(this,"uploadContinue",7),this.selectedFiles=[],this.dragging=!1,this.handleInput=()=>{var e,a;const t=Array.from(null!==(a=null===(e=this.input)||void 0===e?void 0:e.files)&&void 0!==a?a:[]);this.selectedFiles=[...this.selectedFiles,...t],this.uploadFile.emit(this.selectedFiles),this.input&&(this.input.value="")},this.removeFile=(e,a)=>{e.preventDefault(),e.stopPropagation(),this.selectedFiles=this.selectedFiles.filter(((e,t)=>t!==a)),this.uploadFile.emit(this.selectedFiles),this.input&&(this.input.value="")},this.clearSelection=()=>{var e;null===(e=this.form)||void 0===e||e.reset(),this.selectedFiles=[],this.uploadFile.emit(this.selectedFiles)},this.handleContinue=()=>{0!==this.selectedFiles.length&&this.uploadContinue.emit(this.selectedFiles)}}connectedCallback(){this.unsubscribeLanguage=n(this)}disconnectedCallback(){var e;null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}handleDragEnter(){this.dragging=!0}handleDragOver(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")}handleDragLeave(){this.dragging=!1}handleDrop(e){var a,t;e.stopPropagation(),e.preventDefault(),this.dragging=!1;const o=Array.from(null!==(t=null===(a=e.dataTransfer)||void 0===a?void 0:a.files)&&void 0!==t?t:[]);this.selectedFiles=[...this.selectedFiles,...o],this.uploadFile.emit(this.selectedFiles)}listenPrintCancel(){var e;null===(e=this.form)||void 0===e||e.reset(),this.selectedFiles=[]}fileType(e){const a=e.split(".").pop();return a&&a!==e?a.toUpperCase():d.t("upload.file_type_fallback")}formatSize(e){if(e<1024)return`${e} B`;const a=["KB","MB","GB"];let t=e/1024,o=0;for(;t>=1024&&o<a.length-1;)t/=1024,o++;return`${t.toFixed(1)} ${a[o]}`}render(){const e=this.selectedFiles.length>0;return o(r,{key:"80a675de624854f74f5996c37d24aff661d5f9e3",class:{dragging:this.dragging}},o("form",{key:"4d301b144501b7ec147942a9e17f3bf25dea2d11",id:"form",ref:e=>this.form=e},o("input",{key:"65a6ba2d294fb77c8de9dba0ea9a5174b44d21a2",type:"file",name:"input",id:"input",multiple:!0,"aria-label":d.t("upload.description"),ref:e=>this.input=e,onInput:this.handleInput}),o("div",{key:"42837b813a19478cc44007e05c1171a0cd8569a6",id:"modal"},o("div",{key:"23243241f17024bde96c98f415dca2696f34d4ee",id:"header"},o("ezp-label",{key:"f3b41b967b6632e79d8bee2af682fc6d97685223",id:"heading",weight:"heavy",text:d.t("upload.heading")}),o("ezp-icon-button",{key:"9b239f06f0c75cede6a5312f2913f002441064a4",icon:"close",type:"button",level:"tertiary",onClick:this.clearSelection})),o("div",{key:"3c04a276ef24b3763a3ca0638d031dd8c1705300",id:"dropzone"},e&&o("div",{key:"95610c71e57beccf2f6457dee6120952a1f924c7",id:"thumbs"},this.selectedFiles.map(((e,a)=>o("div",{key:a,class:"thumb"},o("button",{type:"button",class:"thumb-remove","aria-label":d.t("button_actions.close"),onClick:e=>this.removeFile(e,a)},o("ezp-icon",{name:"close"})),o("div",{class:"thumb-icon"},o("ezp-icon",{name:"file"})),o("ezp-label",{class:"thumb-name",ellipsis:!0,text:e.name}),o("ezp-label",{class:"thumb-meta",level:"tertiary",weight:"strong",text:`${this.fileType(e.name)} · ${this.formatSize(e.size)}`})))),o("label",{key:"f4126b83f2947acbe861febb7a36a3adb9083022",htmlFor:"input",class:"thumb thumb-add"},o("div",{key:"74d6094429e62377fa64a6b9dd69fb112f61807e",class:"thumb-add-icon"},o("ezp-icon",{key:"ed4ba315c9f03f63c3a459d887df2fa0d151339a",name:"plus"})),o("ezp-label",{key:"945c95ded15e1449c0c07fab74fa8bddfc1f712a",class:"thumb-name",level:"tertiary",text:d.t("upload.add_more")}))),!e&&o("div",{key:"3f177a95ddb406beaf4590d14e80979d61f47ef0",id:"cloud"},o("ezp-icon",{key:"df1646e18945ed7ae06e5768aa38ac5a41ece898",name:"cloud-upload"})),o("ezp-label",{key:"ac690849856ef1f333ac07977bf037c50bf932b2",id:"dropzone-title",weight:"heavy",text:d.t("upload.dropzone_title")}),o("div",{key:"75450a0a252eb1d89f712694b5a2c53f2af49716",id:"meta"},o("ezp-label",{key:"f2a47822f778492be7dae45b34201b42b11529e2",level:"secondary",text:d.t("upload.meta_leading")}),o("label",{key:"1da677a25803eb46551dc6073af83ab2280f0f25",htmlFor:"input",id:"browse"},o("ezp-label",{key:"f3ccd35677e9c982455f7cc0602e82722f181912",level:"secondary",weight:"strong",text:d.t("upload.browse")})),o("ezp-label",{key:"72033ea8583a30304523156e70db582dea34949a",level:"secondary",text:d.t("upload.meta_multiple")})),o("div",{key:"e366576f4a0f553b879e15596eaa8abee39268b4",id:"formats"},b.map((e=>o("span",{class:"format",key:e},e))))),e&&o("ezp-label",{key:"1d3286a144d9a18117b5c8ff656df8ca60d14287",id:"ready",level:"secondary",weight:"strong",text:d.t("upload.files_ready",{count:this.selectedFiles.length})}),o("div",{key:"9508e04611014e3308b3552ac022dd35fe089f94",id:"footer"},o("ezp-text-button",{key:"140f08816c3ed3474dd1485d07635090a55f6042",type:"button",level:"secondary",onClick:this.clearSelection,label:d.t("button_actions.cancel"),class:"action"}),o("ezp-text-button",{key:"edd9ecceff3efa596bc2fb1073a26b1e8915b283",id:"continue",type:"button",disabled:!e,onClick:this.handleContinue,label:d.t("upload.continue"),class:"action"})))))}static get style(){return":host{--ezp-upload-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;width:var(--ezp-upload-width, auto);height:var(--ezp-upload-height, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);height:100%;padding:var(--ezp-spacing-5)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding-bottom:var(--ezp-spacing-4)}#heading{--ezp-label-fontSize:22px;--ezp-label-lineHeight:28px}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-background, transparent);border:1.5px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:0;padding:var(--ezp-spacing-6) var(--ezp-spacing-5);text-align:center;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-solid)}#cloud{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:20px;-webkit-box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:84px;-ms-flex-pack:center;justify-content:center;width:84px}#cloud ezp-icon{--ezp-icon-size:40px;--ezp-icon-gridTemplate:40px}#dropzone-title{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#meta{-ms-flex-align:baseline;align-items:baseline;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px;-ms-flex-pack:center;justify-content:center}#browse{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-browse-opacity, 1)}@media (hover: hover){#browse:hover{--ezp-upload-browse-opacity:0.6}}#formats{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center}.format{background:transparent;border:1px solid var(--ezp-core-outline);border-radius:999px;color:var(--ezp-core-foreground-secondary);font-size:12px;font-weight:600;letter-spacing:0.02em;line-height:1;padding:7px 14px}#thumbs{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;max-height:40vh;overflow-y:auto;padding:var(--ezp-spacing-1);scrollbar-width:thin;width:100%}.thumb{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:6px;position:relative;width:88px}.thumb-icon{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:50%;color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;width:56px}.thumb-icon ezp-icon{--ezp-icon-size:26px;--ezp-icon-gridTemplate:26px}.thumb-name{--ezp-label-minWidth:0;max-width:100%}.thumb-meta{letter-spacing:0.02em}.thumb-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-core-surface-tertiary);border:1px solid var(--ezp-core-outline);border-radius:50%;color:var(--ezp-core-foreground-secondary);cursor:pointer;display:-ms-flexbox;display:flex;height:20px;-ms-flex-pack:center;justify-content:center;padding:0;position:absolute;right:8px;top:-4px;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:20px;z-index:1}.thumb-remove ezp-icon{--ezp-icon-size:12px;--ezp-icon-gridTemplate:12px}@media (hover: hover){.thumb-remove:hover{color:var(--ezp-core-foreground-primary)}}.thumb-add{cursor:pointer}.thumb-add .thumb-add-icon{-ms-flex-align:center;align-items:center;border:1.5px dashed var(--ezp-core-foreground-tertiary);border-radius:50%;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;-webkit-transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:56px}.thumb-add .thumb-add-icon ezp-icon{--ezp-icon-size:24px;--ezp-icon-gridTemplate:24px}@media (hover: hover){.thumb-add:hover .thumb-add-icon{border-color:var(--ezp-theme-solid);color:var(--ezp-theme-solid)}}#ready{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;text-align:center;text-transform:uppercase}#footer{display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr}.action{--ezp-textButton-borderRadius:999px;--ezp-textButton-padding:var(--ezp-spacing-4)}#continue{--ezp-textButton-background-init:var(--ezp-upload-gradient)}"}},[1,"ezp-upload",{selectedFiles:[32],dragging:[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]]);function f(){"undefined"!=typeof customElements&&["ezp-upload","ezp-icon","ezp-icon-button","ezp-label","ezp-text-button"].forEach((e=>{switch(e){case"ezp-upload":customElements.get(i(e))||customElements.define(i(e),u);break;case"ezp-icon":customElements.get(i(e))||l();break;case"ezp-icon-button":customElements.get(i(e))||p();break;case"ezp-label":customElements.get(i(e))||s();break;case"ezp-text-button":customElements.get(i(e))||c()}}))}export{u as E,f as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as s,d as e}from"./ezp-user-menu2.js";const o=s,r=e;export{o as EzpUserMenu,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as a,createEvent as t,h as r,Host as s,transformTag as n}from"@stencil/core/internal/client";import{c as o,a as i}from"./auth.js";import{i as c}from"./i18next.js";import{d as p}from"./ezp-backdrop2.js";import{d as u}from"./ezp-icon2.js";import{d}from"./ezp-icon-button2.js";import{d as l}from"./ezp-label2.js";class h{getUserInfo(){return fetch(`https://${i.state.authApiHostUrl}/v1/users/me`,{headers:{Authorization:"Bearer "+i.state.accessToken,"Content-Type":"application/json"},method:"GET"}).then((e=>e.json()))}}const z=o({user:null,theme:"",appearance:""}),b=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.userMenuClosure=t(this,"userMenuClosure",7),this.logoutEmitter=t(this,"logoutEmitter",7),this.backdrop=document.createElement("ezp-backdrop"),this.links=[{title:c.t("user_menu.account"),icon:"account",href:"https://app.ezeep.com"},{title:c.t("user_menu.help"),icon:"help",href:"https://support.ezeep.com"}],this.themes=["pink","red","orange","green","teal","cyan","blue","violet"],this.appearances=[{title:c.t("user_menu.system"),name:"system"},{title:c.t("user_menu.light"),name:"light"},{title:c.t("user_menu.dark"),name:"dark"}],this.name="John Doe",this.open=!1,this.handleClose=()=>{this.userMenuClosure.emit()},this.logOut=()=>{localStorage.removeItem("properties"),localStorage.removeItem("refreshToken"),localStorage.removeItem("access_token"),localStorage.removeItem("printer"),localStorage.removeItem("isAuthorized"),i.state.isAuthorized=!1,this.logoutEmitter.emit()},this.handleTheme=e=>{z.state.theme=e},this.handleAppearance=e=>{z.state.appearance=e}}watchOpen(){this.open?(this.backdrop.visible=!0,this.container.appendChild(this.backdrop)):(this.backdrop.visible=!1,this.userMenuClosure.emit())}componentWillLoad(){this.container=this.component.closest("[data-backdrop-surface]"),this.backdrop.addEventListener("backdropHideStart",(()=>{this.open=!1})),this.backdrop.addEventListener("backdropHideEnd",(()=>{this.container.removeChild(this.backdrop)}))}render(){return r(s,{key:"0be3d9326b2fd15cbb61e5b9eae17e0e8c64fefd",class:this.open?"is-open":""},r("div",{key:"a9c3690514cf71adb590395dc4bc71c5a5f35fce",id:"header"},r("ezp-label",{key:"cac928c398257f57ace98662049caee2ed992aa6",ellipsis:!0,id:"name",weight:"heavy",text:this.name}),r("ezp-icon-button",{key:"5d237bee7dc3d48120a3b042a25bf392965b56a3",id:"close",level:"tertiary",icon:"close",onClick:this.handleClose})),r("div",{key:"2edf3724b7590665fbd4baf27c14fdfe5e623537",id:"links"},this.links.map((e=>r("a",{class:"link",href:e.href,target:"_blank",rel:"noopener noreferrer"},r("ezp-icon",{class:"link__icon",name:e.icon}),r("ezp-label",{text:e.title})))),r("a",{key:"363e6574e75c9cc2aeaa4707f3798e8c2c0f5fd4",class:"link",onClick:this.logOut},r("ezp-icon",{key:"b444802cd837572f61dabb28416931498db83f0e",class:"link__icon",name:"logout"}),r("ezp-label",{key:"02958987257786688345e0da79e10f0535b41dc0",text:c.t("user_menu.logout")}))),r("div",{key:"e404081c99dd59cbd3d86a502fa24a76e459718d",id:"theme"},r("ezp-label",{key:"3a8719b3ca0d6e078fb4add24efea9b28c8e8882",class:"caption",text:`${c.t("user_menu.theme")}:`,weight:"heavy"}),r("div",{key:"01c030aa8e66ba2fdfe968588e7c7dd3a6a7fe09",id:"swatches"},this.themes.map((e=>r("button",{class:`swatch swatch--${e} ${e===z.state.theme?"selected":""}`,onClick:()=>this.handleTheme(e)},r("span",{class:"dot"})))))),r("div",{key:"4a04a1ed776aed50e94394ca91aa91c85002d90f",id:"appearance"},r("ezp-label",{key:"36427d1dea114b47dc6d6b86da80c68388c3b4c2",class:"caption",text:`${c.t("user_menu.appearance")}:`,weight:"heavy"}),r("div",{key:"5729ca40b8228644637106f728d90b53da6c09dc",id:"tabs"},this.appearances.map((e=>r("button",{class:"tab "+(e.name===z.state.appearance?"selected":""),onClick:()=>this.handleAppearance(e.name)},r("ezp-icon",{name:e.name}),r("ezp-label",{text:e.title,level:"tertiary",weight:"strong"})))))))}get component(){return this}static get watchers(){return{open:[{watchOpen:0}]}}static get style(){return":host{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));display:block;opacity:var(--ezp-userMenu-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));visibility:var(--ezp-userMenu-visibility, hidden);z-index:5}:host(.is-open){--ezp-userMenu-opacity:1;--ezp-userMenu-scale:1, 1;--ezp-userMenu-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-userMenu-visibility:visible}@media (prefers-color-scheme: dark){:host{--ezp-userMenu-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4)}#name{color:var(--ezp-core-foreground-primary)}#close{margin:calc(var(--ezp-spacing-3) * -1) 0}#links{-webkit-box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:var(--ezp-spacing-2)}.link{-ms-flex-align:center;align-items:center;background:var(--ezp-userMenu-link-background, transparent);border-radius:3px;color:var(--ezp-core-foreground-primary);cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;padding:var(--ezp-spacing-3);text-decoration:none}.link:hover{--ezp-userMenu-link-background:var(--ezp-core-shade-primary)}.link__icon{color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0}.caption{color:var(--ezp-core-foreground-primary)}#theme{-webkit-box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#swatches{display:-ms-flexbox;display:flex;margin:0 calc(var(--ezp-spacing-2) * -1)}.swatch{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-swatch-background, transparent);border:0;border-radius:50%;color:var(--ezp-userMenu-swatch-color);cursor:var(--ezp-userMenu-swatch-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-userMenu-swatch-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){.swatch:not(.selected):hover{--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent)}.swatch:not(.selected):active{--ezp-userMenu-swatch-opacity:0.74}}.swatch.selected{--ezp-userMenu-dot-boxShadowSize:10px;--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent);--ezp-userMenu-swatch-cursor:normal}.swatch.selected>.dot{-webkit-animation:dot-bounce var(--ezp-duration-2) ease-in-out;animation:dot-bounce var(--ezp-duration-2) ease-in-out}.swatch--blue{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-blue-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-blue-translucent)}.swatch--cyan{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-cyan-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-cyan-translucent)}.swatch--green{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-green-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-green-translucent)}.swatch--teal{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-teal-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-teal-translucent)}.swatch--orange{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-orange-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-orange-translucent)}.swatch--pink{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-pink-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-pink-translucent)}.swatch--red{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-red-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-red-translucent)}.swatch--violet{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-violet-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-violet-translucent)}.dot{background:var(--ezp-userMenu-dot-background, transparent);border-radius:50%;-webkit-box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);height:18px;-webkit-transition:-webkit-box-shadow var(--ezp-duration-2);transition:-webkit-box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2), -webkit-box-shadow var(--ezp-duration-2);width:18px}#appearance{display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#tabs{display:grid;grid-template:auto/repeat(3, 1fr);margin:0 calc(var(--ezp-spacing-2) * -1)}.tab{--ezp-icon-height:8px;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-tab-background, transparent);border:0;border-radius:14px;color:var(--ezp-userMenu-tab-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-userMenu-tab-cursor, pointer);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-2)}@media (hover: hover){.tab:not(.selected):hover{--ezp-userMenu-tab-background:var(--ezp-core-shade-primary)}.tab:not(.selected):active{--ezp-userMenu-tab-background:var(--ezp-core-shade-secondary)}}.tab.selected{--ezp-userMenu-tab-background:var(--ezp-theme-translucent);--ezp-userMenu-tab-color:var(--ezp-theme-solid);--ezp-userMenu-tab-cursor:normal}@-webkit-keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}"}},[1,"ezp-user-menu",{name:[1],open:[1028]},void 0,{open:[{watchOpen:0}]}]);function m(){"undefined"!=typeof customElements&&["ezp-user-menu","ezp-backdrop","ezp-icon","ezp-icon-button","ezp-label"].forEach((e=>{switch(e){case"ezp-user-menu":customElements.get(n(e))||customElements.define(n(e),b);break;case"ezp-backdrop":customElements.get(n(e))||p();break;case"ezp-icon":customElements.get(n(e))||u();break;case"ezp-icon-button":customElements.get(n(e))||d();break;case"ezp-label":customElements.get(n(e))||l()}}))}export{h as E,b as a,m as d,z as u}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as a,createEvent as t,h as r,Host as s,transformTag as n}from"@stencil/core/internal/client";import{c as o,a as i,s as c}from"./auth.js";import{i as p,s as u}from"./utils.js";import{d}from"./ezp-backdrop2.js";import{d as l}from"./ezp-icon2.js";import{d as h}from"./ezp-icon-button2.js";import{d as z}from"./ezp-label2.js";function b(e){return{Authorization:"Bearer "+e}}function m(e,a){return fetch(e,{method:"GET",headers:b(a)}).then((e=>e.json()))}class v{getUserInfo(){return m(`https://${i.state.authApiHostUrl}/v1/users/me`,i.state.accessToken)}}const g=o({user:null,theme:"",appearance:""}),w=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.userMenuClosure=t(this,"userMenuClosure",7),this.logoutEmitter=t(this,"logoutEmitter",7),this.backdrop=document.createElement("ezp-backdrop"),this.links=[{title:p.t("user_menu.account"),icon:"account",href:"https://app.ezeep.com"},{title:p.t("user_menu.help"),icon:"help",href:"https://support.ezeep.com"}],this.themes=["pink","red","orange","green","teal","cyan","blue","violet"],this.appearances=[{title:p.t("user_menu.system"),name:"system"},{title:p.t("user_menu.light"),name:"light"},{title:p.t("user_menu.dark"),name:"dark"}],this.name="John Doe",this.open=!1,this.handleClose=()=>{this.userMenuClosure.emit()},this.logOut=()=>{c.clearSession(),i.state.isAuthorized=!1,this.logoutEmitter.emit()},this.handleTheme=e=>{g.state.theme=e},this.handleAppearance=e=>{g.state.appearance=e}}watchOpen(){this.open?(this.backdrop.visible=!0,this.container.appendChild(this.backdrop)):(this.backdrop.visible=!1,this.userMenuClosure.emit())}connectedCallback(){this.unsubscribeLanguage=u(this)}componentWillLoad(){this.container=this.component.closest("[data-backdrop-surface]"),this.backdrop.addEventListener("backdropHideStart",(()=>{this.open=!1})),this.backdrop.addEventListener("backdropHideEnd",(()=>{this.container.removeChild(this.backdrop)}))}disconnectedCallback(){var e;null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}render(){return r(s,{key:"ce0f05bb5ae8d4350d688b234c0a913b338a39c1",class:this.open?"is-open":""},r("div",{key:"58448dac0a9d08e7d1bdaaaefae308dc32792837",id:"header"},r("ezp-label",{key:"741b8f779bd0365452f83cd51030c621b87d9112",ellipsis:!0,id:"name",weight:"heavy",text:this.name}),r("ezp-icon-button",{key:"7bb08461ef32207f533abfae0c11fa1b35796ad5",id:"close",level:"tertiary",icon:"close",onClick:this.handleClose})),r("div",{key:"047a83ce4d3f7ae3f955dfb078effd95d151b0c1",id:"links"},this.links.map((e=>r("a",{class:"link",href:e.href,target:"_blank",rel:"noopener noreferrer"},r("ezp-icon",{class:"link__icon",name:e.icon}),r("ezp-label",{text:e.title})))),r("a",{key:"b8d940d65aa2602c6b6c227ab13eb20b9047ae26",class:"link",onClick:this.logOut},r("ezp-icon",{key:"dc72f40d565077333ae95520ae156669c1aa41a9",class:"link__icon",name:"logout"}),r("ezp-label",{key:"b9aef15622e67f60c7948dca008a2724be44c680",text:p.t("user_menu.logout")}))),r("div",{key:"a4d0768275f2f9546381ba0cad73357c5e8b37e5",id:"theme"},r("ezp-label",{key:"0b934d478dfb405b5349a782ea5f47f6b8ae6082",class:"caption",text:`${p.t("user_menu.theme")}:`,weight:"heavy"}),r("div",{key:"7c1665c4dcea007dd605229e001676312ef90f04",id:"swatches"},this.themes.map((e=>r("button",{class:`swatch swatch--${e} ${e===g.state.theme?"selected":""}`,onClick:()=>this.handleTheme(e)},r("span",{class:"dot"})))))),r("div",{key:"68d4809c7872102eed4cbd104e1c42ad324c66b1",id:"appearance"},r("ezp-label",{key:"2886504538c9dbfb1b92539f9ed85f604a2b834d",class:"caption",text:`${p.t("user_menu.appearance")}:`,weight:"heavy"}),r("div",{key:"e614f865638be0007e726d02934a34c54e9f6e58",id:"tabs"},this.appearances.map((e=>r("button",{class:"tab "+(e.name===g.state.appearance?"selected":""),onClick:()=>this.handleAppearance(e.name)},r("ezp-icon",{name:e.name}),r("ezp-label",{text:e.title,level:"tertiary",weight:"strong"})))))))}get component(){return this}static get watchers(){return{open:[{watchOpen:0}]}}static get style(){return":host{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));display:block;opacity:var(--ezp-userMenu-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));visibility:var(--ezp-userMenu-visibility, hidden);z-index:5}:host(.is-open){--ezp-userMenu-opacity:1;--ezp-userMenu-scale:1, 1;--ezp-userMenu-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-userMenu-visibility:visible}@media (prefers-color-scheme: dark){:host{--ezp-userMenu-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4)}#name{color:var(--ezp-core-foreground-primary)}#close{margin:calc(var(--ezp-spacing-3) * -1) 0}#links{-webkit-box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:var(--ezp-spacing-2)}.link{-ms-flex-align:center;align-items:center;background:var(--ezp-userMenu-link-background, transparent);border-radius:3px;color:var(--ezp-core-foreground-primary);cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;padding:var(--ezp-spacing-3);text-decoration:none}.link:hover{--ezp-userMenu-link-background:var(--ezp-core-shade-primary)}.link__icon{color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0}.caption{color:var(--ezp-core-foreground-primary)}#theme{-webkit-box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#swatches{display:-ms-flexbox;display:flex;margin:0 calc(var(--ezp-spacing-2) * -1)}.swatch{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-swatch-background, transparent);border:0;border-radius:50%;color:var(--ezp-userMenu-swatch-color);cursor:var(--ezp-userMenu-swatch-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-userMenu-swatch-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){.swatch:not(.selected):hover{--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent)}.swatch:not(.selected):active{--ezp-userMenu-swatch-opacity:0.74}}.swatch.selected{--ezp-userMenu-dot-boxShadowSize:10px;--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent);--ezp-userMenu-swatch-cursor:normal}.swatch.selected>.dot{-webkit-animation:dot-bounce var(--ezp-duration-2) ease-in-out;animation:dot-bounce var(--ezp-duration-2) ease-in-out}.swatch--blue{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-blue-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-blue-translucent)}.swatch--cyan{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-cyan-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-cyan-translucent)}.swatch--green{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-green-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-green-translucent)}.swatch--teal{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-teal-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-teal-translucent)}.swatch--orange{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-orange-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-orange-translucent)}.swatch--pink{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-pink-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-pink-translucent)}.swatch--red{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-red-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-red-translucent)}.swatch--violet{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-violet-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-violet-translucent)}.dot{background:var(--ezp-userMenu-dot-background, transparent);border-radius:50%;-webkit-box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);height:18px;-webkit-transition:-webkit-box-shadow var(--ezp-duration-2);transition:-webkit-box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2), -webkit-box-shadow var(--ezp-duration-2);width:18px}#appearance{display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#tabs{display:grid;grid-template:auto/repeat(3, 1fr);margin:0 calc(var(--ezp-spacing-2) * -1)}.tab{--ezp-icon-height:8px;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-tab-background, transparent);border:0;border-radius:14px;color:var(--ezp-userMenu-tab-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-userMenu-tab-cursor, pointer);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-2)}@media (hover: hover){.tab:not(.selected):hover{--ezp-userMenu-tab-background:var(--ezp-core-shade-primary)}.tab:not(.selected):active{--ezp-userMenu-tab-background:var(--ezp-core-shade-secondary)}}.tab.selected{--ezp-userMenu-tab-background:var(--ezp-theme-translucent);--ezp-userMenu-tab-color:var(--ezp-theme-solid);--ezp-userMenu-tab-cursor:normal}@-webkit-keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}"}},[1,"ezp-user-menu",{name:[1],open:[1028]},void 0,{open:[{watchOpen:0}]}]);function f(){"undefined"!=typeof customElements&&["ezp-user-menu","ezp-backdrop","ezp-icon","ezp-icon-button","ezp-label"].forEach((e=>{switch(e){case"ezp-user-menu":customElements.get(n(e))||customElements.define(n(e),w);break;case"ezp-backdrop":customElements.get(n(e))||d();break;case"ezp-icon":customElements.get(n(e))||l();break;case"ezp-icon-button":customElements.get(n(e))||h();break;case"ezp-label":customElements.get(n(e))||z()}}))}export{v as E,m as a,b,w as c,f as d,g as u}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";((async()=>{const t=new FontFace("Inter","url(https://rsms.me/inter/font-files/Inter-roman.var.woff2)",{style:"normal",weight:"400 600"});t.load().then((()=>{document.fonts.add(t)}))})||(()=>{}))();
|
|
1
|
+
export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";((async()=>{const t=new FontFace("Inter","url(https://rsms.me/inter/font-files/Inter-roman.var.woff2)",{style:"normal",weight:"400 600"});t.load().then((()=>{document.fonts.add(t)})).catch((()=>{}))})||(()=>{}))();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{forceUpdate as t}from"@stencil/core/internal/client";const e=t=>"string"==typeof t,s=()=>{let t,e;const s=new Promise(((s,i)=>{t=s,e=i}));return s.resolve=t,s.reject=e,s},i=t=>null==t?"":String(t),n=/###/g,r=t=>t&&t.includes("###")?t.replace(n,"."):t,o=t=>!t||e(t),a=(t,s,i)=>{const n=e(s)?s.split("."):s;let a=0;for(;a<n.length-1;){if(o(t))return{};const e=r(n[a]);!t[e]&&i&&(t[e]=new i),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++a}return o(t)?{}:{obj:t,k:r(n[a])}},h=(t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);if(void 0!==i||1===e.length)return void(i[n]=s);let r=e[e.length-1],o=e.slice(0,e.length-1),h=a(t,o,Object);for(;void 0===h.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),h=a(t,o,Object),h?.obj&&void 0!==h.obj[`${h.k}.${r}`]&&(h.obj=void 0);h.obj[`${h.k}.${r}`]=s},l=(t,e)=>{const{obj:s,k:i}=a(t,e);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},c=(t,s,i)=>{for(const n in s)"__proto__"!==n&&"constructor"!==n&&(Object.prototype.hasOwnProperty.call(t,n)?e(t[n])||t[n]instanceof String||e(s[n])||s[n]instanceof String?i&&(t[n]=s[n]):c(t[n],s[n],i):t[n]=s[n]);return t},u=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},p=t=>e(t)?t.replace(/[&<>"'\/]/g,(t=>d[t])):t,f=[" ",",","?","!",";"],g=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}(20),y=(t,e,s=".")=>{if(!t)return;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return;return t[e]}const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||"object"!=typeof n)return;let e,r="";for(let o=t;o<i.length;++o)if(o!==t&&(r+=s),r+=i[o],e=n[r],void 0!==e){if(["string","number","boolean"].includes(typeof e)&&o<i.length-1)continue;t+=o-t+1;break}n=e}return n},m=t=>t?.replace(/_/g,"-"),b={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class v{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:",this.logger=t||b,this.options=e,this.debug=e.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,i,n){return n&&!this.debug?null:(t=t.map((t=>e(t)?t.replace(/[\r\n\x00-\x1F\x7F]/g," "):t)),e(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new v(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new v(this.logger,t)}}var $=new v;class _{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}once(t,e){const s=(...i)=>{e(...i),this.off(t,s)};return this.on(t,s),this}emit(t,...e){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,s])=>{for(let i=0;i<s;i++)t(...e)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([s,i])=>{for(let n=0;n<i;n++)s(t,...e)}))}}class w extends _{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,s,i,n={}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,s],i&&(Array.isArray(i)?a.push(...i):e(i)&&r?a.push(...i.split(r)):a.push(i)));const h=l(this.data,a);return h||s||i||!t.includes(".")||(t=a[0],s=a[1],i=a.slice(2).join(".")),!h&&o&&e(i)?y(this.data?.[t]?.[s],i,r):h}addResource(t,e,s,i,n={silent:!1}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let o=[t,e];s&&(o=o.concat(r?s.split(r):s)),t.includes(".")&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),h(this.data,o,i),n.silent||this.emit("added",t,e,s,i)}addResources(t,s,i,n={silent:!1}){for(const n in i)(e(i[n])||Array.isArray(i[n]))&&this.addResource(t,s,n,i[n],{silent:!0});n.silent||this.emit("added",t,s,i)}addResourceBundle(t,e,s,i,n,r={silent:!1,skipCopy:!1}){let o=[t,e];t.includes(".")&&(o=t.split("."),i=s,s=e,e=o[1]),this.addNamespaces(e);let a=l(this.data,o)||{};r.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?c(a,s,n):a={...a,...s},h(this.data,o,a),r.silent||this.emit("added",t,e,s)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var k={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){return t.forEach((t=>{e=this.processors[t]?.process(e,s,i,n)??e})),e}};const x=Symbol("i18next/PATH_KEY");function S(t,e){const{[x]:s}=t(function(){const t=[],e=Object.create(null);let s;return e.get=(i,n)=>(s?.revoke?.(),n===x?t:(t.push(n),s=Proxy.revocable(i,e),s.proxy)),Proxy.revocable(Object.create(null),e).proxy}()),i=e?.keySeparator??".",n=e?.nsSeparator??":",r="strict"===e?.enableSelector;if(s.length>1&&n){const t=e?.ns,o=r?Array.isArray(t)?t:t?[t]:null:Array.isArray(t)?t:null;if(o&&(r?o:o.length>1?o.slice(1):[]).includes(s[0]))return`${s[0]}${n}${s.slice(1).join(i)}`}return s.join(i)}const j=t=>!e(t)&&"boolean"!=typeof t&&"number"!=typeof t;class O extends _{constructor(t,e={}){var s,i;super(),s=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{s[t]&&(i[t]=s[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,e={interpolation:{}}){const s={...e};if(null==t)return!1;const i=this.resolve(t,s);if(void 0===i?.res)return!1;const n=j(i.res);return!1!==s.returnObjects||!n}extractFromKey(t,s){let i=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let r=s.ns||this.options.defaultNS||[];const o=i&&t.includes(i),a=!(this.options.userDefinedKeySeparator||s.keySeparator||this.options.userDefinedNsSeparator||s.nsSeparator||((t,e,s)=>{e=e||"",s=s||"";const i=f.filter((t=>!e.includes(t)&&!s.includes(t)));if(0===i.length)return!0;const n=g.getRegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(s);e>0&&!n.test(t.substring(0,e))&&(r=!0)}return r})(t,i,n));if(o&&!a){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:e(r)?[r]:r};const o=t.split(i);(i!==n||i===n&&this.options.ns.includes(o[0]))&&(r=o.shift()),t=o.join(n)}return{key:t,namespaces:e(r)?[r]:r}}translate(t,s,i){let n="object"==typeof s?{...s}:s;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==t)return"";"function"==typeof t&&(t=S(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?S(t,{...this.options,...n}):String(t)));const r=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:h}=this.extractFromKey(t[t.length-1],n),l=h[h.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?r?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;const p=this.resolve(t,n);let f=p?.res;const g=p?.usedKey||a,y=p?.exactUsedKey||a,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!e(n.count),$=O.hasDefaultValue(n),_=v?this.pluralResolver.getSuffix(u,n.count,n):"",w=n.ordinal&&v?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",k=v&&!n.ordinal&&0===n.count,x=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${w}`]||n.defaultValue;let P=f;b&&!f&&$&&(P=x);const N=j(P),D=Object.prototype.toString.apply(P);if(!(b&&P&&N)||["[object Number]","[object Function]","[object RegExp]"].includes(D)||e(m)&&Array.isArray(P))if(b&&e(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,i));else{let e=!1,s=!1;!this.isValidLookup(f)&&$&&(e=!0,f=x),this.isValidLookup(f)||(s=!0,f=a);const r=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:f,h=$&&x!==f&&this.options.updateMissing;if(s||e||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,v&&!h?`${a}${this.pluralResolver.getSuffix(u,n.count,n)}`:a,h?x:f),o){const t=this.resolve(a,{...n,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&e&&e[0])for(let s=0;s<e.length;s++)t.push(e[s]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(n.lng||this.language):t.push(n.lng||this.language);const s=(t,e,s)=>{const i=$&&s!==f?s:r;this.options.missingKeyHandler?this.options.missingKeyHandler(t,l,e,i,h,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,l,e,i,h,n),this.emit("missingKey",t,l,e,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!e.includes(`${this.options.pluralSeparator}zero`)&&e.push(`${this.options.pluralSeparator}zero`),e.forEach((e=>{s([t],a+e,n[`defaultValue${e}`]||x)}))})):s(t,a,x))}f=this.extendTranslation(f,t,n,p,i),s&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(s||e)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,e?f:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,P,{...n,ns:h}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=t,p.usedParams=this.getUsedParamsDetails(n),p):t}if(o){const t=Array.isArray(P),e=t?[]:{},s=t?y:g;for(const t in P)if(Object.prototype.hasOwnProperty.call(P,t)){const i=`${s}${o}${t}`;e[t]=this.translate(i,$&&!f?{...n,defaultValue:j(x)?x[t]:void 0,joinArrays:!1,ns:h}:{...n,joinArrays:!1,ns:h}),e[t]===i&&(e[t]=P[t])}f=e}}return r?(p.res=f,p.usedParams=this.getUsedParamsDetails(n),p):f}extendTranslation(t,s,i,n,r){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const o=e(t)&&(void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let h=i.replace&&!e(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||n.usedLng,i),o){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(t=this.interpolator.nest(t,((...t)=>r?.[0]!==t[0]||i.context?this.translate(...t,s):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${s[0]}`),null)),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,a=e(o)?[o]:o;return null!=t&&a?.length&&!1!==i.applyPostProcessor&&(t=k.handle(a,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,s={}){let i,n,r,o,a;return e(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?S(t,{...this.options,...s}):t))),t.forEach((t=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(t,s),l=h.key;n=l;let c=h.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!e(s.count),d=u&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(e(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(i)||(a=t,this.checkedLoadedFor[`${f[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(this.checkedLoadedFor[`${f[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((e=>{if(this.isValidLookup(i))return;o=e;const n=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,l,e,t,s);else{let t;u&&(t=this.pluralResolver.getSuffix(e,s.count,s));const i=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(s.ordinal&&t.startsWith(r)&&n.push(l+t.replace(r,this.options.pluralSeparator)),n.push(l+t),d&&n.push(l+i)),p){const e=`${l}${this.options.contextSeparator||"_"}${s.context}`;n.push(e),u&&(s.ordinal&&t.startsWith(r)&&n.push(e+t.replace(r,this.options.pluralSeparator)),n.push(e+t),d&&n.push(e+i))}}let a;for(;a=n.pop();)this.isValidLookup(i)||(r=a,i=this.getResource(e,t,a,s))})))}))})),{res:i,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,e,s,i):this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!e(t.replace);let n=i?t.replace:t;if(i&&void 0!==t.count&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const t of s)delete n[t]}return n}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&e.startsWith("defaultValue")&&void 0!==t[e])return!0;return!1}}class P{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(t){if(!(t=m(t))||!t.includes("-"))return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=m(t))||!t.includes("-"))return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(e(t)&&t.includes("-")){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(s)||(e=s)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const s=this.getScriptPartFromCode(t);if(this.isSupportedCode(s))return e=s;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>!(t!==i&&(!t.includes("-")&&!i.includes("-")||(!t.includes("-")||i.includes("-")||t.slice(0,t.indexOf("-"))!==i)&&!(t.startsWith(i)&&i.length>1)))))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,s){if(!t)return[];if("function"==typeof t&&(t=t(s)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.getFallbackCodes((!1===s?[]:s)||this.options.fallbackLng||[],t),n=[],r=t=>{t&&(this.isSupportedCode(t)?n.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return e(t)&&(t.includes("-")||t.includes("_"))?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(t))):e(t)&&r(this.formatLanguageCode(t)),i.forEach((t=>{n.includes(t)||r(this.formatLanguageCode(t))})),n}}const N={zero:0,one:1,two:2,few:3,many:4,other:5},D={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class L{constructor(t,e={}){this.languageUtils=t,this.options=e,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const s=m("dev"===t?"en":t),i=e.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),D;if(!t.match(/-|_/))return D;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}return this.pluralRulesCache[n]=r,r}needsPlural(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,s={}){return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?s.resolvedOptions().pluralCategories.sort(((t,e)=>N[t]-N[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,e,s={}){const i=this.getRule(t,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,s))}}const R=(t,s,i,n=".",r=!0)=>{let o=((t,e,s)=>{const i=l(t,s);return void 0!==i?i:l(e,s)})(t,s,i);return!o&&r&&e(i)&&(o=y(t,i,n),void 0===o&&(o=y(s,i,n))),o},z=t=>t.replace(/\$/g,"$$$$");class A{constructor(t={}){this.logger=$.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=void 0!==e?e:p,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=n?u(n):r||"{{",this.suffix=o?u(o):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":c?u(c):"-",this.unescapeSuffix=this.unescapePrefix?"":l?u(l):"",this.nestingPrefix=d?u(d):f||u("$t("),this.nestingSuffix=g?u(g):y||u(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=b||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t?.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,s,n,r){let o,a,h;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=t=>{if(!t.includes(this.formatSeparator)){const e=R(s,l,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,void 0,n,{...r,...s,interpolationkey:t}):e}const e=t.split(this.formatSeparator),i=e.shift().trim(),o=e.join(this.formatSeparator).trim();return this.format(R(s,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...s,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&"string"==typeof t&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>z(t)},{regex:this.regexp,safeValue:t=>z(this.escapeValue?this.escape(t):t)}].forEach((s=>{for(h=0;o=s.regex.exec(t);){const n=o[1].trim();if(a=c(n),void 0===a)if("function"==typeof u){const s=u(t,o,r);a=e(s)?s:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),a=""}else e(a)||this.useRawValueToEscape||(a=i(a));const l=s.safeValue(a);if(t=t.replace(o[0],l),d?(s.regex.lastIndex+=a.length,s.regex.lastIndex-=o[0].length):s.regex.lastIndex=0,h++,h>=this.maxReplaces)break}})),t}nest(t,s,n={}){let r,o,a;const h=(t,e)=>{const s=this.nestingOptionsSeparator;if(!t.includes(s))return t;const i=t.split(new RegExp(`${u(s)}[ ]*{`));let n=`{${i[1]}`;t=i[0],n=this.interpolate(n,a);const r=n.match(/'/g),o=n.match(/"/g);((r?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(n=n.replace(/'/g,'"'));try{a=JSON.parse(n),e&&(a={...e,...a})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${s}${n}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,t};for(;r=this.nestingRegexp.exec(t);){let l=[];a={...n},a=a.replace&&!e(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(l=r[1].slice(c).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),r[1]=r[1].slice(0,c)),o=s(h.call(this,r[1].trim(),a),a),o&&r[0]===t&&!e(o))return o;e(o)||(o=i(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:r[1].trim()})),o.trim())),t=t.replace(r[0],o),this.regexp.lastIndex=0}return t}}const C=t=>{const e={};return(s,i,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const o=i+JSON.stringify(r);let a=e[o];return a||(a=t(m(i),n),e[o]=a),a(s)}},I=t=>(e,s,i)=>t(m(s),i)(e);class E{constructor(t={}){this.logger=$.create("formatter"),this.options=t,this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const s=e.cacheInBuiltFormats?C:I;this.formats={number:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:s(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:s(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:s(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=C(e)}format(t,e,s,i={}){if(!e)return t;if(null==t)return t;const n=e.split(this.formatSeparator),r=[];for(let t=0;t<n.length;t++){let e=n[t];for(;e.indexOf("(")>-1&&!e.includes(")")&&t+1<n.length;)e=`${e}${this.formatSeparator}${n[++t]}`;r.push(e)}return r.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=(t=>{let e=t.toLowerCase().trim();const s={};if(t.includes("(")){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].slice(0,-1);"currency"!==e||n.includes(":")?"relativetime"!==e||n.includes(":")?n.split(";").forEach((t=>{if(t){const[e,...i]=t.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,""),r=e.trim();s[r]||(s[r]=n),"false"===n&&(s[r]=!1),"true"===n&&(s[r]=!0),isNaN(n)||(s[r]=parseInt(n,10))}})):s.range||(s.range=n.trim()):s.currency||(s.currency=n.trim())}return{formatName:e,formatOptions:s}})(e);if(this.formats[n]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};e=this.formats[n](t,o.locale||o.lng||i.locale||i.lng||s,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${n}`),t}),t)}}class B extends _{constructor(t,e,s,i={}){super(),this.backend=t,this.store=e,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(t,e,s,i){const n={},r={},o={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const o=`${t}|${e}`;!s.reload&&this.store.hasResourceBundle(t,e)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,i=!1,void 0===r[o]&&(r[o]=!0),void 0===n[o]&&(n[o]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(o[t]=!0)})),(Object.keys(n).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|"),n=i[0],r=i[1];e&&this.emit("failedLoading",n,r,e),!e&&s&&this.store.addResourceBundle(n,r,s,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&s&&(this.state[t]=0);const o={};this.queue.forEach((s=>{((t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);i[n]=i[n]||[],i[n].push(s)})(s.loaded,[n],r),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(s,t),e&&s.errors.push(e),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((t=>{o[t]||(o[t]={});const e=s.loaded[t];e.length&&e.forEach((e=>{void 0===o[t][e]&&(o[t][e]=!0)}))})),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((t=>!t.done))}read(t,e,s,i=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}o&&a&&i<this.maxRetries?setTimeout((()=>{this.read(t,e,s,i+1,2*n,r)}),n):r(o,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(t,e,o);try{const s=a(t,e);s&&"function"==typeof s.then?s.then((t=>o(null,t))).catch(o):o(null,s)}catch(t){o(t)}}prepareLoading(t,s,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(s)&&(s=[s]);const r=this.queueLoad(t,s,i,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:!0},s)}loadOne(t,e=""){const s=t.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,((s,r)=>{s&&this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s),!s&&r&&this.logger.log(`${e}loaded namespace ${n} for language ${i}`,r),this.loaded(t,s,r)}))}saveMissing(t,e,s,i,n,r={},o=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(e)){if(null!=s&&""!==s){if(this.backend?.create){const a={...r,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let n;n=5===h.length?h(t,e,s,i,a):h(t,e,s,i),n&&"function"==typeof n.then?n.then((t=>o(null,t))).catch(o):o(null,n)}catch(t){o(t)}else h(t,e,s,i,o,a)}t&&t[0]&&this.store.addResource(t[0],e,s,i)}}else this.logger.warn(`did not save key "${s}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const K=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let s={};if("object"==typeof t[1]&&(s=t[1]),e(t[1])&&(s.defaultValue=t[1]),e(t[2])&&(s.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{s[t]=e[t]}))}return s},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),T=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),F=()=>{};class V extends _{constructor(t={},e){var s;if(super(),this.options=T(t),this.services={},this.logger=$,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((t=>{"function"==typeof s[t]&&(s[t]=s[t].bind(s))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(e(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const n=K();this.options={...n,...this.options,...T(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const r=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;$.init(this.modules.logger?r(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:E;const e=new P(this.options);this.store=new w(this.options.resources,this.options);const s=this.services;s.logger=$,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new L(e,{prepend:this.options.pluralSeparator}),t&&(s.formatter=r(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new A(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new B(r(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=F),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...e)=>this.store[t](...e)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...e)=>(this.store[t](...e),this)}));const o=s(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(e),i(t,e)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),o}loadResources(t,s=F){let i=s;const n=e(t)?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const t=[],e=e=>{e&&"cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&(t.includes(e)||t.push(e))}))};n?e(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>e(t))),this.options.preload?.forEach?.((t=>e(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(t)}))}else i(null)}reloadResources(t,e,i){const n=s();return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),i||(i=F),this.services.backendConnector.reload(t,e,(t=>{n.resolve(),i(t)})),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&k.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!["cimode","dev"].includes(t)){for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!["cimode","dev"].includes(e)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}this.resolvedLanguage||this.languages.includes(t)||!this.store.hasLanguageSomeTranslations(t)||(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const n=s();this.emit("languageChanging",t);const r=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(e,s)=>{s?this.isLanguageChangingTo===t&&(r(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,n.resolve(((...t)=>this.t(...t))),i&&i(e,((...t)=>this.t(...t)))},a=s=>{t||s||!this.services.languageDetector||(s=[]);const i=e(s)?s:s&&s[0],n=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(e(s)?[s]:s);n&&(this.language||r(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),n}getFixedT(t,s,i,n){const r=n?.scopeNs,o=(t,e,...s)=>{let n;n="object"!=typeof e?this.options.overloadTranslationOptionHandler([t,e].concat(s)):{...e},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs;const a=null!=n.ns;n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||i||o.keyPrefix);const h={...this.options,...n};Array.isArray(r)&&!a&&(h.ns=r),"function"==typeof n.keyPrefix&&(n.keyPrefix=S(n.keyPrefix,h));const l=this.options.keySeparator||".";let c;return n.keyPrefix&&Array.isArray(t)?c=t.map((t=>("function"==typeof t&&(t=S(t,h)),`${n.keyPrefix}${l}${t}`))):("function"==typeof t&&(t=S(t,h)),c=n.keyPrefix?`${n.keyPrefix}${l}${t}`:t),this.t(c,n)};return e(t)?o.lng=t:o.lngs=t,o.ns=s,o.keyPrefix=i,o}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const r=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return-1===s||0===s||2===s};if(e.precheck){const t=e.precheck(this,r);if(void 0!==t)return t}return!(!this.hasResourceBundle(s,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(s,t)||i&&!r(n,t)))}loadNamespaces(t,i){const n=s();return this.options.ns?(e(t)&&(t=[t]),t.forEach((t=>{this.options.ns.includes(t)||this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}loadLanguages(t,i){const n=s();e(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter((t=>!r.includes(t)&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=r.concat(o),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=this.services?.languageUtils||new P(K());return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(e.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){const s=new V(t,e);return s.createInstance=V.createInstance,s}cloneInstance(t={},e=F){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},n=new V(i);if(void 0===t.debug&&void 0===t.prefix||(n.logger=n.logger.clone(t)),["store","services","language"].forEach((t=>{n[t]=this[t]})),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const t=Object.keys(this.store.data).reduce(((t,e)=>(t[e]={...this.store.data[e]},t[e]=Object.keys(t[e]).reduce(((s,i)=>(s[i]={...t[e][i]},s)),t[e]),t)),{});n.store=new w(t,i),n.services.resourceStore=n.store}if(t.interpolation){const e={...K().interpolation,...this.options.interpolation,...t.interpolation},s={...i,interpolation:e};n.services.interpolator=new A(s)}return n.translator=new O(n.services,i),n.translator.on("*",((t,...e)=>{n.emit(t,...e)})),n.init(i,e),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const W=V.createInstance();var M,H={login_dialog:{heading:"Drucke mit ezeep Blue",description:"Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",action:"Anmelden"},no_document_dialog:{heading:"Keine Datei ausgewählt",description:"Wähle zunächst eine Datei zum Drucken aus.",action:"OK"},printer_selection:{loading:"Lade meine Drucker…",print:"Drucken",printer:"Drucker",print_processing:"Drucken…",print_success:"Erfolgreich gedruckt.",print_success_sub:"Dein Dokument ist auf dem Weg zum Drucker.",print_failed:"Druck fehlgeschlagen",print_timeout:"Das dauert länger als erwartet. Der Auftrag wird möglicherweise noch auf dem Drucker fertiggestellt.",not_supported:"Der ausgewählte Dateityp wird nicht unterstützt.",color:"Farbe",orientation:"Ausrichtung",size:"Papierformat",duplex:"Beidseitig",quality:"Druckqualität",select_printer:"Wähle einen Drucker",select_color:"Wähle Farbe/Graustufen",select_size:"Wähle Papierformat",select_orientation:"Wähle Ausrichtung",select_quality:"Wähle Druckqualität",select_duplex:"Wähle Beidseitig",color_color:"Farbe",color_grayscale:"Graustufen",orientation_portrait:"Hochformat",orientation_landscape:"Querformat",unknown_location:"Unbekannter Standort",no_printers:"Keine Drucker gefunden.",prepare_upload:"Vorbereiten…",uploading:"Hochladen…",duplex_none:"Keine",copies:"Kopien",duplex_long:"auf der langen Seite umdrehen",duplex_short:"auf der kurzen Seite umdrehen",pull_print_success:"Bereit zum Auslösen.",width:"Breite",length:"Länge",trays:"Papierfach",select_trays:"Wähle Papierfach",page_ranges:"Druckbereich",paper_ranges:"Papier-Ranges",files:"Dateien",file_count_one:"{{count}} Datei",file_count_other:"{{count}} Dateien"},button_actions:{login:"Anmelden",print:"Drucken",cancel:"Abbrechen",close:"Schließen",retry:"Wiederholen",select_printer:"Wähle Drucker"},upload:{description:"Ziehe Dateien hier in den Browser ",meta_leading:"oder",heading:"Jetzt drucken",dropzone_title:"Dateien hier ablegen",browse:"vom Gerät auswählen",file_type_fallback:"DATEI",meta_multiple:"— mehrere Dateien möglich",add_more:"Hinzufügen",files_ready_one:"{{count}} Datei bereit",files_ready_other:"{{count}} Dateien bereit",continue:"Weiter zu Druckoptionen"},user_menu:{theme:"Farbschema",appearance:"Darstellung",system:"System",light:"Hell",dark:"Dunkel",account:"Konto verwalten",help:"Hilfe & Unterstützung",logout:"Ausloggen"}},U={login_dialog:{heading:"Print with ezeep Blue",description:"Sign in with your ezeep Blue account to print.",action:"Sign in"},no_document_dialog:{heading:"No file selected",description:"Select a file first to print.",action:"OK"},printer_selection:{loading:"Loading My Printers…",print_processing:"Printing…",print_success:"Successfully printed.",print_success_sub:"Your document is on its way to the printer.",pull_print_success:"Ready to be released.",print_failed:"Print failed",print_timeout:"This is taking longer than expected. The job may still finish on the printer.",not_supported:"The selected file type is not supported.",prepare_upload:"Preparing…",uploading:"Uploading…",print:"Print",printer:"Printer",color:"Color",orientation:"Orientation",size:"Paper Size",duplex:"Double-sided",duplex_none:"None",duplex_long:"flip on long side",duplex_short:"flip on short side",quality:"Print Quality",select_printer:"Select a printer",select_color:"Select Color/Grayscale",select_orientation:"Select Orientation",select_size:"Select Paper Size",select_quality:"Select Print Quality",select_duplex:"Select Double-sided",color_color:"Color",color_grayscale:"Grayscale",orientation_portrait:"Portrait",orientation_landscape:"Landscape",unknown_location:"Unknown location",no_printers:"No printers found.",copies:"Copies",width:"Width",length:"Length",trays:"Tray",select_trays:"Select Tray",page_ranges:"Page Ranges",paper_ranges:"Paper Ranges",files:"files",file_count_one:"{{count}} file",file_count_other:"{{count}} files"},button_actions:{login:"Sign In",print:"Print",cancel:"Cancel",close:"Close",retry:"Retry",select_printer:"Select Printer"},upload:{description:"Drop files here into the browser ",meta_leading:"or",heading:"Print Now",dropzone_title:"Drop files here",browse:"select from device",file_type_fallback:"FILE",meta_multiple:"— multiple files supported",add_more:"Add",files_ready_one:"{{count}} file ready",files_ready_other:"{{count}} files ready",continue:"Continue to print options"},user_menu:{theme:"Color theme",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",account:"Manage Account",help:"Help & Support",logout:"Logout"}};!function(t){t[t.Success=0]="Success",t[t.Processing=1246]="Processing",t[t.Rendering=129]="Rendering",t[t.Failed=3011]="Failed",t[t.Error=2]="Error"}(M||(M={}));const q=[M.Processing,M.Rendering],J=[M.Failed,M.Error],G=[412,500,503,1048579],Y=412,Q=804,Z=201,X=256,tt=2e3,et=Math.ceil(300),st=3e4,it=1800;function nt(e){const s=()=>t(e);return W.on("languageChanged",s),()=>W.off("languageChanged",s)}function rt(t){return Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&")}function ot(t){const e={en:{translation:U},de:{translation:H}};W.init(""!=t?{resources:e,lng:t,nsSeparator:!1,fallbackLng:"en"}:{resources:e,lng:navigator.language,nsSeparator:!1,fallbackLng:"en"})}const at=async({fn:t,validate:e,interval:s,maxAttempts:i})=>{let n=0;const r=async(o,a)=>{const h=await t();return n++,e(h)?o(h):i&&n===i?a(new Error("Exceeded max attempts.")):void setTimeout(r,s,o,a)};return new Promise(r)},ht=t=>{const e={};return Object.keys(t).forEach((s=>{""!==t[s]&&(e[s]=t[s])})),e},lt=t=>(256!=t.paperid&&(delete t.paperlength,delete t.paperwidth),t.paperlength&&t.paperwidth&&(t.paperlength=10*+t.paperlength,t.paperwidth=10*+t.paperwidth),t),ct=t=>t.replace(/,/g,";"),ut=t=>{if(!t)return!0;if(!/^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/.test(t))return!1;const e=t.split(",");for(let t=0;t<e.length;t++){const s=e[t].trim();if(s.includes("-")){const[t,e]=s.split("-"),i=parseInt(t),n=parseInt(e);if(isNaN(i)||isNaN(n)||i>n||i<=0)return!1}else{const t=parseInt(s);if(isNaN(t)||t<=0)return!1}}return!0};export{Z as B,J as F,G as H,M as J,et as M,q as P,it as T,ot as a,Q as b,tt as c,st as d,Y as e,ct as f,X as g,rt as h,W as i,lt as m,at as p,ht as r,nt as s,ut as v}
|