From f7a3a824bab858ff3187b996c91c3247ecb5c589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20de=20la=20Pen=CC=83a?=
Date: Tue, 29 Sep 2026 16:55:11 +0100
Subject: [PATCH] fix: read timezone catalogue from window.NAILS
EZ-2639
---
assets/js/admin.plugins.min.js | 2 +-
assets/js/components/DateTime.js | 17 +++++------------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/assets/js/admin.plugins.min.js b/assets/js/admin.plugins.min.js
index faeb0c46..59d2db34 100644
--- a/assets/js/admin.plugins.min.js
+++ b/assets/js/admin.plugins.min.js
@@ -1,2 +1,2 @@
/*! For license information please see admin.plugins.min.js.LICENSE.txt */
-(()=>{var e={576(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return w}});var r=n(279),i=n.n(r),o=n(370),s=n.n(o),a=n(817),l=n.n(a);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=l()(e);return c("cut"),t},d=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=l()(n);return c("copy"),n.remove(),r},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=d(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=d(e.value,t):(n=l()(e),c("copy")),n};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function g(e,t){for(var n=0;n {const{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);const d=s(e),p=h(o(e),t,d,n,r,i,a);return p&&yi(p)&&"]"===p.data?o(t.anchor=p):(mi(),l(t.anchor=c("]"),d,p),p)},f=(e,t,r,i,l,c)=>{if(function(e,t){return Oi(e.parentElement,1)||function(e){return 1===e.nodeType&&Ri(e.getAttribute(ki),1)}(e)||function({props:e}){const t=e&&e[ki];return"string"==typeof t&&Ri(t,1)}(t)}(e,t)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Un("Hydration node mismatch:\n- rendered on server:",e,3===e.nodeType?"(text)":yi(e)&&"["===e.data?"(start of fragment)":"","\n- expected on client:",t.type),mi()),t.el=null,c){const t=g(e);for(;;){const n=o(e);if(!n||n===t)break;a(n)}}const u=o(e),d=s(e);return a(e),n(null,t,d,u,r,i,vi(d),l),r&&(r.vnode.el=t.el,fs(r,t.el)),u},g=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=o(e))&&yi(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return o(e);r--}return e},m=(e,t,n)=>{const r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},v=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Un("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),n(null,e,t),ar(),void(t._vnode=e);u(t.firstChild,e,null,null,null),ar(),t._vnode=e},u]}const wi=new Set(["src","srcset","href","poster"]);function xi(e,t,n){return!!wi.has(t)&&e.getAttribute(t)===(null==n?null:`${n}`)}function _i(e,t,n,r,i){let o,s,a,l;if("class"===t)e.$cls?(a=e.$cls,delete e.$cls):a=e.getAttribute("class"),l=ge(n),function(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}(Ei(a||""),Ei(l))||(o=2,s="class");else if("style"===t){a=e.getAttribute("style")||"",l=z(n)?n:function(e){if(!e)return"";if(z(e))return e;let t="";for(const n in e){const r=e[n];(z(r)||"number"==typeof r)&&(t+=`${n.startsWith("--")?n:Q(n)}:${r};`)}return t}(ue(n));const t=Ci(a),c=Ci(l);if(r.dirs)for(const{dir:e,value:t}of r.dirs)"show"!==e.name||t||c.set("display","none");i&&Ti(i,r,c),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e)if(r!==t.get(n))return!1;return!0}(t,c)||(o=3,s="style")}else(e instanceof SVGElement&&Te(t)||e instanceof HTMLElement&&(Se(t)||Ce(t)))&&("hidden"===t?(a=Si(e.getAttribute(t)),l=Si(n)):Se(t)?(a=e.hasAttribute(t),l=Ee(n)):null==n?(a=e.hasAttribute(t),l=!1):(a=e.hasAttribute(t)?e.getAttribute(t):"value"===t&&"TEXTAREA"===e.tagName&&e.value,l=!!ke(n)&&String(n)),a!==l&&(o=4,s=t));if(null!=o&&!Oi(e,o)){const t=e=>!1===e?"(not rendered)":`${s}="${e}"`;return Un(`Hydration ${Ai[o]} mismatch on`,e,`\n - rendered on server: ${t(a)}\n - expected on client: ${t(l)}\n Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n You should fix the source of the mismatch.`),!0}return!1}function Si(e){return!!ke(e)&&(z(e)?"until-found"===e.toLowerCase()?"until-found":"":!!Ee(e)&&"")}function Ei(e){return new Set(e.trim().split(/\s+/))}function Ci(e){const t=new Map;for(const n of e.split(";")){let[e,r]=n.split(":");e=e.trim(),r=r&&r.trim(),e&&r&&t.set(e,r)}return t}function Ti(e,t,n){const r=e.subTree;if(e.getCssVars&&(t===r||r&&r.type===Js&&r.children.includes(t))){const t=e.getCssVars();for(const e in t){const r=De(t[e]);n.set(`--${Oe(e,!1)}`,r)}}t===r&&e.parent&&Ti(e.parent,e.vnode,n)}const ki="data-allow-mismatch",Ai={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Oi(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(ki);)e=e.parentElement;return Ri(e&&e.getAttribute(ki),t)}function Ri(e,t){if(null==e)return!1;if(""===e)return!0;{const n=e.split(",");return!(0!==t||!n.includes("children"))||n.includes(Ai[t])}}const Pi=le().requestIdleCallback||(e=>setTimeout(e,1)),Ii=le().cancelIdleCallback||(e=>clearTimeout(e)),Ni=(e=1e4)=>t=>{const n=Pi(t,{timeout:e});return()=>Ii(n)},Li=e=>(t,n)=>{const r=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element)return function(e){const{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t Loading... Loading... Remove the "+this.escapeHtml(t)+" widget from your dashboard? You can add it again later. This does not delete any underlying data. No comparison timezones. Add one to see this time in another zone. ${e} ${n}0&&ir.disconnect()},Mi=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},$i=(e=[])=>(t,n)=>{z(e)&&(e=[e]);let r=!1;const i=e=>{r||(r=!0,o(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},o=()=>{n(t=>{for(const n of e)t.removeEventListener(n,i)})};return n(t=>{for(const n of e)t.addEventListener(n,i,{once:!0})}),o},Di=e=>!!e.type.__asyncLoader;function zi(e){D(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:o,timeout:s,suspensible:a=!0,onError:l}=e;let c,u=null,d=0;const h=()=>{let e;return u||(e=u=t().catch(e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise((t,n)=>{l(e,()=>t((d++,u=null,h())),()=>n(e),d+1)});throw e}).then(t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t)))};return ai({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(e,t,n){const r=e.isConnected;let i=!1;(t.bu||(t.bu=[])).push(()=>i=!0);const s=()=>{i||!e.parentNode||r&&!e.isConnected||n()},a=o?()=>{const n=o(s,t=>function(e,t){if(yi(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(yi(r))if("]"===r.data){if(0===--n)break}else"["===r.data&&n++;r=r.nextSibling}}else t(e)}(e,t));n&&(t.bum||(t.bum=[])).push(n)}:s;c?a():h().then(()=>!t.isUnmounted&&a())},get __asyncResolved(){return c},setup(){const e=Pa;if(ci(e),c)return()=>Fi(c,e);const t=t=>{u=null,Xn(t,e,13,!r)};if(a&&e.suspense||ja)return h().then(t=>()=>Fi(t,e)).catch(e=>(t(e),()=>r?va(r,{error:e}):null));const o=fn(!1),l=fn(),d=fn(!!i);let p,f;return ro(()=>{null!=p&&clearTimeout(p),null!=f&&clearTimeout(f)}),i&&(f=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),null!=s&&(p=setTimeout(()=>{if(!e.isUnmounted&&!o.value&&!l.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),l.value=e}},s)),h().then(()=>{e.isUnmounted||(o.value=!0,e.parent&&ji(e.parent.vnode)&&e.parent.update())}).catch(n=>{e.isUnmounted?u=null:(t(n),l.value=n)}),()=>o.value&&c?Fi(c,e):l.value&&r?va(r,{error:l.value}):n&&!d.value?Fi(n,e):void 0}})}function Fi(e,t){const{ref:n,props:r,children:i,ce:o}=t.vnode,s=va(e,r,i);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const ji=e=>e.type.__isKeepAlive,Ui={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ia(),r=n.ctx;if(!r.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const i=new Map,o=new Set;let s=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=r,h=d("div");function p(e){Xi(e),u(e,n,a,!0)}function f(e){i.forEach((t,n)=>{const r=Ja(Di(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&g(n)})}function g(e){const t=i.get(e);!t||s&&ha(t,s)?s&&Xi(s):p(t),i.delete(e),o.delete(e)}r.activate=(e,t,n,r,i)=>{const o=e.component;c(e,t,n,0,a),l(o.vnode,e,t,n,o,a,r,e.slotScopeIds,i),Ps(()=>{o.isDeactivated=!1,o.a&&re(o.a);const t=e.props&&e.props.onVnodeMounted;t&&ka(t,o.parent,e)},a)},r.deactivate=e=>{const t=e.component;js(t.m),js(t.a),c(e,h,null,1,a),Ps(()=>{t.da&&re(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ka(n,t.parent,e),t.isDeactivated=!0},a)},Pr(()=>[e.include,e.exclude],([e,t])=>{e&&f(t=>Hi(e,t)),t&&f(e=>!Hi(t,e))},{flush:"post",deep:!0});let m=null;const v=()=>{null!=m&&(Bs(n.subTree.type)?Ps(()=>{const e=Gi(n.subTree);e.component&&i.set(m,e)},n.subTree.suspense):i.set(m,Gi(n.subTree)))};return Qi(v),to(v),no(()=>{i.forEach(e=>{const{subTree:t,suspense:r}=n,i=Gi(t);if(e.type===i.type&&e.key===i.key){Xi(i);const e=i.component.da;return void(e&&Ps(e,r))}p(e)})}),()=>{if(m=null,!t.default)return s=null;const n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!da(r)||!(4&r.shapeFlag||128&r.shapeFlag))return s=null,r;let a=Gi(r);if(a.type===Qs)return s=null,a;const l=a.type,c=Ja(Di(a)?a.type.__asyncResolved||{}:l),{include:u,exclude:d,max:h}=e;if(u&&(!c||!Hi(u,c))||d&&c&&Hi(d,c))return a.shapeFlag&=-257,s=a,r;const p=null==a.key?l:a.key,f=i.get(p);return a.el&&(a=ba(a),128&r.shapeFlag&&(r.ssContent=a)),m=p,f?(a.el=f.el,a.component=f.component,a.transition&&oi(a,a.transition),a.shapeFlag|=512,o.delete(p),o.add(p)):(o.add(p),h&&o.size>parseInt(h,10)&&g(o.values().next().value)),a.shapeFlag|=256,s=a,Bs(r.type)?r:a}}},Bi=Ui;function Hi(e,t){return I(e)?e.some(e=>Hi(e,t)):z(e)?e.split(",").includes(t):"[object RegExp]"===H(e)&&(e.lastIndex=0,e.test(t))}function qi(e,t){Wi(e,"a",t)}function Vi(e,t){Wi(e,"da",t)}function Wi(e,t,n=Pa){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Ki(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ji(e.parent.vnode)&&Yi(r,t,n,e),e=e.parent}}function Yi(e,t,n,r){const i=Ki(t,e,r,!0);ro(()=>{O(r[t],i)},n)}function Xi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Gi(e){return 128&e.shapeFlag?e.ssContent:e}function Ki(e,t,n=Pa,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{lt();const i=Ma(n),o=Yn(t,n,e,r);return i(),ct(),o});return r?i.unshift(o):i.push(o),o}}const Ji=e=>(t,n=Pa)=>{ja&&"sp"!==e||Ki(e,(...e)=>t(...e),n)},Zi=Ji("bm"),Qi=Ji("m"),eo=Ji("bu"),to=Ji("u"),no=Ji("bum"),ro=Ji("um"),io=Ji("sp"),oo=Ji("rtg"),so=Ji("rtc");function ao(e,t=Pa){Ki("ec",e,t)}const lo="components",co="directives";function uo(e,t){return go(lo,e,!0,t)||e}const ho=Symbol.for("v-ndc");function po(e){return z(e)?go(lo,e,!1)||e:e||ho}function fo(e){return go(co,e)}function go(e,t,n=!0,r=!1){const i=fr||Pa;if(i){const n=i.type;if(e===lo){const e=Ja(n,!1);if(e&&(e===t||e===J(t)||e===ee(J(t))))return n}const o=mo(i[e]||n[e],t)||mo(i.appContext[e],t);return!o&&r?n:o}}function mo(e,t){return e&&(e[t]||e[J(t)]||e[ee(J(t))])}function vo(e,t,n,r){let i;const o=n&&n[r],s=I(e);if(s||z(e)){let n=!1,r=!1;s&&on(e)&&(n=!an(e),r=sn(e),e=_t(e)),i=new Array(e.length);for(let s=0,a=e.length;st(e,n,void 0,o&&o[n]));else{const n=Object.keys(e);i=new Array(n.length);for(let r=0,s=n.length;r{const t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function bo(e,t,n,r,i,o){if(null==n&&(n={}),fr.ce||fr.parent&&Di(fr.parent)&&fr.parent.ce){const e=null!=o&&null==n.key?A({},n,{key:o}):n,i=Object.keys(e).length>0;return"default"!==t&&(e.name=t),ra(),ua(Js,null,[va("slot",e,r&&r())],i?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const a=ta.length;let l;ra();try{const i=s&&wo(s(n)),a=n.key||o||i&&i.key;l=ua(Js,{key:(a&&!F(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||(r?r():[]),i&&1===e._?64:-2)}catch(e){for(let e=ta.length;e>a;e--)ia();throw e}finally{s&&s._c&&(s._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),l}function wo(e){return e.some(e=>!da(e)||e.type!==Qs&&!(e.type===Js&&!wo(e.children)))?e:null}function xo(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:te(r)]=e[r];return n}const _o=e=>e?Da(e)?Xa(e):_o(e.parent):null,So=A(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>_o(e.parent),$root:e=>_o(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vo(e),$forceUpdate:e=>e.f||(e.f=()=>{rr(e.update)}),$nextTick:e=>e.n||(e.n=nr.bind(e.proxy)),$watch:e=>Nr.bind(e)}),Eo=(e,t)=>e!==_&&!e.__isScriptSetup&&P(e,t),Co={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:a,appContext:l}=e;if("$"!==t[0]){const e=s[t];if(void 0!==e)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(Eo(r,t))return s[t]=1,r[t];if(i!==_&&P(i,t))return s[t]=2,i[t];if(P(o,t))return s[t]=3,o[t];if(n!==_&&P(n,t))return s[t]=4,n[t];Bo&&(s[t]=0)}}const c=So[t];let u,d;return c?("$attrs"===t&&bt(e.attrs,0,""),c(e)):(u=a.__cssModules)&&(u=u[t])?u:n!==_&&P(n,t)?(s[t]=4,n[t]):(d=l.config.globalProperties,P(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return Eo(i,t)?(i[t]=n,!0):r!==_&&P(r,t)?(r[t]=n,!0):!(P(e.props,t)||"$"===t[0]&&t.slice(1)in e||(o[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:o,type:s}},a){let l;return!!(n[a]||e!==_&&"$"!==a[0]&&P(e,a)||Eo(t,a)||P(o,a)||P(r,a)||P(So,a)||P(i.config.globalProperties,a)||(l=s.__cssModules)&&l[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:P(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},To=A({},Co,{get(e,t){if(t!==Symbol.unscopables)return Co.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!ce(t)});function ko(){return null}function Ao(){return null}function Oo(e){}function Ro(e){}function Po(){return null}function Io(){}function No(e,t){return null}function Lo(){return $o().slots}function Mo(){return $o().attrs}function $o(e){const t=Ia();return t.setupContext||(t.setupContext=Ya(t))}function Do(e){return I(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function zo(e,t){const n=Do(e);for(const e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?I(r)||D(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Fo(e,t){return e&&t?I(e)&&I(t)?e.concat(t):A({},Do(e),Do(t)):e||t}function jo(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Uo(e){const t=Ia(),n=ja;let r=e();$a(),n&&La(!1);const i=()=>{Ma(t),n&&La(!0)},o=()=>{Ia()!==t&&t.scope.off(),$a(),n&&La(!1)};return U(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(o)),e})),[r,()=>{i(),Promise.resolve().then(o)}]}let Bo=!0;function Ho(e,t,n){Yn(I(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function qo(e,t,n,r){let i=r.includes(".")?Lr(n,r):()=>n[r];if(z(e)){const n=t[e];D(n)&&Pr(i,n)}else if(D(e))Pr(i,e.bind(n));else if(j(e))if(I(e))e.forEach(e=>qo(e,t,n,r));else{const r=D(e.handler)?e.handler.bind(n):t[e.handler];D(r)&&Pr(i,r,e)}}function Vo(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,a=o.get(t);let l;return a?l=a:i.length||n||r?(l={},i.length&&i.forEach(e=>Wo(l,e,s,!0)),Wo(l,t,s)):l=t,j(t)&&o.set(t,l),l}function Wo(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Wo(e,o,n,!0),i&&i.forEach(t=>Wo(e,t,n,!0));for(const i in t)if(r&&"expose"===i);else{const r=Yo[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const Yo={data:Xo,props:Zo,emits:Zo,methods:Jo,computed:Jo,beforeCreate:Ko,created:Ko,beforeMount:Ko,mounted:Ko,beforeUpdate:Ko,updated:Ko,beforeDestroy:Ko,beforeUnmount:Ko,destroyed:Ko,unmounted:Ko,activated:Ko,deactivated:Ko,errorCaptured:Ko,serverPrefetch:Ko,components:Jo,directives:Jo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=A(Object.create(null),e);for(const r in t)n[r]=Ko(e[r],t[r]);return n},provide:Xo,inject:function(e,t){return Jo(Go(e),Go(t))}};function Xo(e,t){return t?e?function(){return A(D(e)?e.call(this,this):e,D(t)?t.call(this,this):t)}:t:e}function Go(e){if(I(e)){const t={};for(let n=0;n${JSON.stringify(e.options,null,2)}`})),n.appendChild(this.createCell({class:"export-format",value:e.format?.label})),n.appendChild(this.createCell({class:this.getStatusCellClasses(e),value:this.getStatusCellHtml(e)})),n.appendChild(this.createCell({class:"export-requested",value:e.created.formatted})),n.appendChild(this.createCell({class:"export-expires",value:e.expires.formatted})),n.appendChild(this.createCell({class:"export-generated",value:this.getGeneratedCellHtml(e)})),n.appendChild(this.createCell({class:["export-actions","actions"],value:this.getActionsCellHtml(e)})),e.dom=n,this.recent.push(e),"PREPEND"===t?this.dom.recent.prepend(n):this.dom.recent.append(n)}getStatusCellClasses(e){let t=["export-status"];return"COMPLETE"===e.status?t.push("table-success"):"FAILED"===e.status?t.push("table-danger"):t.push("table-warning"),t}getStatusCellHtml(e){return"FAILED"===e.status&&e.error?`${e.status}${e.error}`:e.status}getGeneratedCellHtml(e){return"COMPLETE"===e.status?e.modified.formatted:'—'}getActionsCellHtml(e){return e.download?.url?`Download`:""}createCell(e){let t=document.createElement("td");return e.class&&(Array.isArray(e.class)?t.classList.add(...e.class):t.classList.add(e.class)),e.value&&(t.innerHTML=e.value),t}modalCloseBtn(){let e=document.createElement("button");e.innerText="Close",e.style.marginRight="0.5em",e.classList.add("btn","btn-primary","btn-block"),e.addEventListener("click",e=>{e.preventDefault(),this.modal.hide()});let t=document.createElement("p");return t.appendChild(e),t}},ab="nails.admin.datetime.alternateTimezones",lb="timezone-channel-wrap",cb="ui-datepicker-timezones",ub=class{constructor(e){return this.adminController=e,this.processing=!1,this.checkAgain=[],this.catalogue=null,this.timezoneFooterObserver=null,this.timezoneFooterInput=null,this.timezoneFooterTimer=null,this.processingFooter=!1,this.adminController.onRefreshUi((e,t)=>{this.init(t)}),this}init(e){this.adminController.log("Initiating new date/time inputs");let t=$(["input.date:not(.datetime--processed)","input.datetime:not(.datetime--processed)","input.time:not(.datetime--processed)"].join(","),e).addClass("datetime--processed");this.adminController.log(`Found ${t.length} unprocessed items`),t.each((e,t)=>{t.classList.contains("date")?this.initDate(t):t.classList.contains("datetime")?this.initDateTime(t):t.classList.contains("time")&&this.initTime(t)})}initDate(e){let t=$(e),n=t.data("datepicker-dateformat")||"yy-mm-dd",r=t.data("datepicker-yearrange")||"c-100:c+10";t.datepicker({dateFormat:n,changeMonth:!0,changeYear:!0,yearRange:r})}initDateTime(e){let t=$(e),n={dateFormat:t.data("datepicker-dateformat")||"yy-mm-dd",timeFormat:t.data("datepicker-timeformat")||"HH:mm:ss",changeMonth:!0,changeYear:!0,yearRange:t.data("datepicker-yearrange")||"c-100:c+10"};t.is("[data-timezone-aware]")&&(this.wrapTimezoneChannel(t),n.beforeShow=()=>this.scheduleTimezoneFooter(e),n.onSelect=()=>this.scheduleTimezoneFooter(e),n.onChangeMonthYear=()=>this.scheduleTimezoneFooter(e),n.onClose=()=>this.unmountTimezoneFooter(),t.on("input.tz change.tz keyup.tz",()=>this.refreshTimezoneFooter(e))),t.datetimepicker(n)}initTime(e){let t=$(e),n=t.data("datepicker-timeformat")||"HH:mm";t.datetimepicker({timeOnly:!0,timeFormat:n})}wrapTimezoneChannel(e){if(e.parent().hasClass(lb))return;let t=e.closest(".input").find("small.timezone-channel").first();e.wrap($("",{class:lb})),t.length&&e.parent().append(t)}getCatalogue(){if(this.catalogue)return this.catalogue;let e=document.getElementById("js-timezone-catalogue");if(!e)return this.catalogue={},this.catalogue;try{this.catalogue=JSON.parse(e.textContent)||{}}catch(e){this.catalogue={}}return this.catalogue}labelForZone(e){if("UTC"===e||"GMT"===e||"Etc/UTC"===e||"Etc/GMT"===e)return"UTC/GMT";let t=this.getCatalogue()[e]||e;return/Coordinated Universal Time/i.test(t)?"UTC/GMT":t}getAlternateZones(e){let t,n=e.getAttribute("data-user-timezone")||"";try{t=JSON.parse(window.localStorage.getItem(ab))}catch(e){t=null}return Array.isArray(t)||(t=[]),t.filter(e=>e&&e!==n)}setAlternateZones(e){window.localStorage.setItem(ab,JSON.stringify(e))}parseNaiveInZone(e,t){if(!e)return null;let n=String(e).match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})(?::(\d{2}))?/);if(!n)return null;let r=parseInt(n[1],10),i=parseInt(n[2],10),o=parseInt(n[3],10),s=parseInt(n[4],10),a=parseInt(n[5],10),l=parseInt(n[6]||"0",10),c=Date.UTC(r,i-1,o,s,a,l),u=c;for(let e=0;e<3;e++){let e=this.formatToParts(new Date(u),t);if(!e)return null;u+=c-Date.UTC(parseInt(e.year,10),parseInt(e.month,10)-1,parseInt(e.day,10),parseInt(e.hour,10),parseInt(e.minute,10),parseInt(e.second,10))}return new Date(u)}formatToParts(e,t){try{let n=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),r={};return n.formatToParts(e).forEach(({type:e,value:t})=>{r[e]=t}),"24"===r.hour&&(r.hour="00"),r}catch(e){return null}}formatInZone(e,t){let n=this.formatToParts(e,t);return n?[n.year,n.month,n.day].join("-")+" "+[n.hour,n.minute,n.second].join(":"):"—"}scheduleTimezoneFooter(e){window.clearTimeout(this.timezoneFooterTimer),this.timezoneFooterTimer=window.setTimeout(()=>{this.mountTimezoneFooter(e)},0)}mountTimezoneFooter(e){let t=$("#ui-datepicker-div");if(!t.length||!t.is(":visible"))return;this.processingFooter=!0,this.timezoneFooterInput=e,this.observeTimezoneFooter(e),this.destroyTimezoneSelect(t),t.find("."+cb).remove();let n=$(this.buildTimezoneFooterHtml(e)),r=t.find(".ui-timepicker-div");if(r.length)r.after(n);else{let e=t.find(".ui-datepicker-buttonpane");e.length?e.before(n):t.append(n)}this.bindTimezoneFooter(n,e),this.initTimezoneSelect(n),this.refreshTimezoneFooter(e),t.find(".ui-slider").off("slide.tz slidechange.tz").on("slide.tz slidechange.tz",()=>this.refreshTimezoneFooter(e)),t.find(".ui_tpicker_time_input").off("input.tz change.tz").on("input.tz change.tz",()=>this.refreshTimezoneFooter(e)),window.setTimeout(()=>{this.processingFooter=!1,this.fitElementInViewport($("#ui-datepicker-div"))},0)}observeTimezoneFooter(e){let t=document.getElementById("ui-datepicker-div");t&&(this.timezoneFooterObserver&&this.timezoneFooterObserver.disconnect(),this.timezoneFooterObserver=new MutationObserver(()=>{this.processingFooter||!t.querySelector("."+cb)&&$(t).is(":visible")&&this.scheduleTimezoneFooter(e)}),this.timezoneFooterObserver.observe(t,{childList:!0}))}unmountTimezoneFooter(){let e=$("#ui-datepicker-div");e.is(":visible")||(window.clearTimeout(this.timezoneFooterTimer),this.timezoneFooterTimer=null,this.timezoneFooterInput=null,this.processingFooter=!1,this.timezoneFooterObserver&&(this.timezoneFooterObserver.disconnect(),this.timezoneFooterObserver=null),this.destroyTimezoneSelect(e),e.find("."+cb).remove(),$(document).off("mousedown.tzSelect2"))}initTimezoneSelect(e){let t=e.find(".js-timezone-add");t.length&&$.fn.select2&&(t.select2({placeholder:"Add a timezone…",width:"100%",dropdownCssClass:"ui-datepicker-timezone-select2-drop"}),t.off("select2-open.tz").on("select2-open.tz",()=>{window.setTimeout(()=>{this.fitElementInViewport($("#select2-drop"))},0)}))}destroyTimezoneSelect(e){e.find(".js-timezone-add").each((e,t)=>{let n=$(t);n.data("select2")&&n.select2("destroy")})}buildTimezoneFooterHtml(e){let t=this.getAlternateZones(e),n=t.map(e=>{let t=this.escapeHtml(this.labelForZone(e)),n=this.escapeHtml(e);return`0?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,o=e.length;i