@opencitylabs/formio-custom-components 0.2.7 → 0.2.8
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/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3188 -3202
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var al=Object.defineProperty;var rl=(
|
|
1
|
+
"use strict";var al=Object.defineProperty;var rl=(f,i,g)=>i in f?al(f,i,{enumerable:!0,configurable:!0,writable:!0,value:g}):f[i]=g;var Ct=(f,i,g)=>rl(f,typeof i!="symbol"?i+"":i,g);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),ot=require("@formio/react"),Ft=require("react-dom/client"),va=require("react-day-picker"),Mn=require("react-countdown"),he=require("moment"),le=require("design-react-kit"),Je=require("sweetalert2");require("i18next");const Ye=require("dayjs"),cr=require("@formio/js"),Zr=require("@event-calendar/core"),nl=require("react-dropzone"),qt=require("axios"),il=require("mime"),xn=require("dompurify"),sl=require("jwt-decode"),Rt=require("leaflet"),en=require("lodash");function ol(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var pa={exports:{}},ea={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var tn;function ll(){if(tn)return ea;tn=1;var
|
|
9
|
+
*/var tn;function ll(){if(tn)return ea;tn=1;var f=q,i=Symbol.for("react.element"),g=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,V=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,B={key:!0,ref:!0,__self:!0,__source:!0};function X(s,x,a){var o,c={},d=null,p=null;a!==void 0&&(d=""+a),x.key!==void 0&&(d=""+x.key),x.ref!==void 0&&(p=x.ref);for(o in x)l.call(x,o)&&!B.hasOwnProperty(o)&&(c[o]=x[o]);if(s&&s.defaultProps)for(o in x=s.defaultProps,x)c[o]===void 0&&(c[o]=x[o]);return{$$typeof:i,type:s,key:d,ref:p,props:c,_owner:V.current}}return ea.Fragment=g,ea.jsx=X,ea.jsxs=X,ea}var ta={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var
|
|
18
|
-
`+Ne+w}}var Ce=!1,Re;{var ze=typeof WeakMap=="function"?WeakMap:Map;Re=new ze}function
|
|
17
|
+
*/var an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var f=q,i=Symbol.for("react.element"),g=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),s=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),o=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,T="@@iterator";function v(w){if(w===null||typeof w!="object")return null;var U=m&&w[m]||w[T];return typeof U=="function"?U:null}var D=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(w){{for(var U=arguments.length,K=new Array(U>1?U-1:0),oe=1;oe<U;oe++)K[oe-1]=arguments[oe];j("error",w,K)}}function j(w,U,K){{var oe=D.ReactDebugCurrentFrame,xe=oe.getStackAddendum();xe!==""&&(U+="%s",K=K.concat([xe]));var Oe=K.map(function(ke){return String(ke)});Oe.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Oe)}}var R=!1,N=!1,k=!1,y=!1,C=!1,_;_=Symbol.for("react.module.reference");function M(w){return!!(typeof w=="string"||typeof w=="function"||w===l||w===B||C||w===V||w===a||w===o||y||w===p||R||N||k||typeof w=="object"&&w!==null&&(w.$$typeof===d||w.$$typeof===c||w.$$typeof===X||w.$$typeof===s||w.$$typeof===x||w.$$typeof===_||w.getModuleId!==void 0))}function z(w,U,K){var oe=w.displayName;if(oe)return oe;var xe=U.displayName||U.name||"";return xe!==""?K+"("+xe+")":K}function H(w){return w.displayName||"Context"}function F(w){if(w==null)return null;if(typeof w.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case l:return"Fragment";case g:return"Portal";case B:return"Profiler";case V:return"StrictMode";case a:return"Suspense";case o:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case s:var U=w;return H(U)+".Consumer";case X:var K=w;return H(K._context)+".Provider";case x:return z(w,w.render,"ForwardRef");case c:var oe=w.displayName||null;return oe!==null?oe:F(w.type)||"Memo";case d:{var xe=w,Oe=xe._payload,ke=xe._init;try{return F(ke(Oe))}catch{return null}}}return null}var E=Object.assign,$=0,J,re,ee,fe,Q,ue,se;function ye(){}ye.__reactDisabledLog=!0;function ce(){{if($===0){J=console.log,re=console.info,ee=console.warn,fe=console.error,Q=console.group,ue=console.groupCollapsed,se=console.groupEnd;var w={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}$++}}function Z(){{if($--,$===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E({},w,{value:J}),info:E({},w,{value:re}),warn:E({},w,{value:ee}),error:E({},w,{value:fe}),group:E({},w,{value:Q}),groupCollapsed:E({},w,{value:ue}),groupEnd:E({},w,{value:se})})}$<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ve=D.ReactCurrentDispatcher,Ne;function be(w,U,K){{if(Ne===void 0)try{throw Error()}catch(xe){var oe=xe.stack.trim().match(/\n( *(at )?)/);Ne=oe&&oe[1]||""}return`
|
|
18
|
+
`+Ne+w}}var Ce=!1,Re;{var ze=typeof WeakMap=="function"?WeakMap:Map;Re=new ze}function P(w,U){if(!w||Ce)return"";{var K=Re.get(w);if(K!==void 0)return K}var oe;Ce=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Oe;Oe=ve.current,ve.current=null,ce();try{if(U){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(et){oe=et}Reflect.construct(w,[],ke)}else{try{ke.call()}catch(et){oe=et}w.call(ke.prototype)}}else{try{throw Error()}catch(et){oe=et}w()}}catch(et){if(et&&oe&&typeof et.stack=="string"){for(var De=et.stack.split(`
|
|
19
19
|
`),qe=oe.stack.split(`
|
|
20
20
|
`),We=De.length-1,Be=qe.length-1;We>=1&&Be>=0&&De[We]!==qe[Be];)Be--;for(;We>=1&&Be>=0;We--,Be--)if(De[We]!==qe[Be]){if(We!==1||Be!==1)do if(We--,Be--,Be<0||De[We]!==qe[Be]){var Ke=`
|
|
21
|
-
`+De[We].replace(" at new "," at ");return w.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",w.displayName)),typeof w=="function"&&Re.set(w,Ke),Ke}while(We>=1&&Be>=0);break}}}finally{Ce=!1,ve.current=Oe,
|
|
21
|
+
`+De[We].replace(" at new "," at ");return w.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",w.displayName)),typeof w=="function"&&Re.set(w,Ke),Ke}while(We>=1&&Be>=0);break}}}finally{Ce=!1,ve.current=Oe,Z(),Error.prepareStackTrace=xe}var dt=w?w.displayName||w.name:"",yt=dt?be(dt):"";return typeof w=="function"&&Re.set(w,yt),yt}function b(w,U,K){return P(w,!1)}function W(w){var U=w.prototype;return!!(U&&U.isReactComponent)}function Y(w,U,K){if(w==null)return"";if(typeof w=="function")return P(w,W(w));if(typeof w=="string")return be(w);switch(w){case a:return be("Suspense");case o:return be("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case x:return b(w.render);case c:return Y(w.type,U,K);case d:{var oe=w,xe=oe._payload,Oe=oe._init;try{return Y(Oe(xe),U,K)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,I={},te=D.ReactDebugCurrentFrame;function ie(w){if(w){var U=w._owner,K=Y(w.type,w._source,U?U.type:null);te.setExtraStackFrame(K)}else te.setExtraStackFrame(null)}function _e(w,U,K,oe,xe){{var Oe=Function.call.bind(A);for(var ke in w)if(Oe(w,ke)){var De=void 0;try{if(typeof w[ke]!="function"){var qe=Error((oe||"React class")+": "+K+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw qe.name="Invariant Violation",qe}De=w[ke](U,ke,oe,K,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(We){De=We}De&&!(De instanceof Error)&&(ie(xe),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",oe||"React class",K,ke,typeof De),ie(null)),De instanceof Error&&!(De.message in I)&&(I[De.message]=!0,ie(xe),O("Failed %s type: %s",K,De.message),ie(null))}}}var de=Array.isArray;function me(w){return de(w)}function Me(w){{var U=typeof Symbol=="function"&&Symbol.toStringTag,K=U&&w[Symbol.toStringTag]||w.constructor.name||"Object";return K}}function Ae(w){try{return $e(w),!1}catch{return!0}}function $e(w){return""+w}function Ie(w){if(Ae(w))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(w)),$e(w)}var Ge=D.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},ge,we;function Ze(w){if(A.call(w,"ref")){var U=Object.getOwnPropertyDescriptor(w,"ref").get;if(U&&U.isReactWarning)return!1}return w.ref!==void 0}function tt(w){if(A.call(w,"key")){var U=Object.getOwnPropertyDescriptor(w,"key").get;if(U&&U.isReactWarning)return!1}return w.key!==void 0}function ht(w,U){typeof w.ref=="string"&&Ge.current}function vt(w,U){{var K=function(){ge||(ge=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"key",{get:K,configurable:!0})}}function pt(w,U){{var K=function(){we||(we=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"ref",{get:K,configurable:!0})}}var lt=function(w,U,K,oe,xe,Oe,ke){var De={$$typeof:i,type:w,key:U,ref:K,props:ke,_owner:Oe};return De._store={},Object.defineProperty(De._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(De,"_self",{configurable:!1,enumerable:!1,writable:!1,value:oe}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function bt(w,U,K,oe,xe){{var Oe,ke={},De=null,qe=null;K!==void 0&&(Ie(K),De=""+K),tt(U)&&(Ie(U.key),De=""+U.key),Ze(U)&&(qe=U.ref,ht(U,xe));for(Oe in U)A.call(U,Oe)&&!Qe.hasOwnProperty(Oe)&&(ke[Oe]=U[Oe]);if(w&&w.defaultProps){var We=w.defaultProps;for(Oe in We)ke[Oe]===void 0&&(ke[Oe]=We[Oe])}if(De||qe){var Be=typeof w=="function"?w.displayName||w.name||"Unknown":w;De&&vt(ke,Be),qe&&pt(ke,Be)}return lt(w,De,qe,xe,oe,Ge.current,ke)}}var _t=D.ReactCurrentOwner,Ue=D.ReactDebugCurrentFrame;function gt(w){if(w){var U=w._owner,K=Y(w.type,w._source,U?U.type:null);Ue.setExtraStackFrame(K)}else Ue.setExtraStackFrame(null)}var ft;ft=!1;function ut(w){return typeof w=="object"&&w!==null&&w.$$typeof===i}function it(){{if(_t.current){var w=F(_t.current.type);if(w)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+w+"`."}return""}}function zt(w){return""}var
|
|
23
|
+
Check the render method of \``+w+"`."}return""}}function zt(w){return""}var ae={};function Na(w){{var U=it();if(!U){var K=typeof w=="string"?w:w.displayName||w.name;K&&(U=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+K+">.")}return U}}function ra(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var K=Na(U);if(
|
|
25
|
+
Check the top-level render call using <`+K+">.")}return U}}function ra(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var K=Na(U);if(ae[K])return;ae[K]=!0;var oe="";w&&w._owner&&w._owner!==_t.current&&(oe=" It was passed a child from "+F(w._owner.type)+"."),gt(w),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,oe),gt(null)}}function ct(w,U){{if(typeof w!="object")return;if(me(w))for(var K=0;K<w.length;K++){var oe=w[K];ut(oe)&&ra(oe,U)}else if(ut(w))w._store&&(w._store.validated=!0);else if(w){var xe=v(w);if(typeof xe=="function"&&xe!==w.entries)for(var Oe=xe.call(w),ke;!(ke=Oe.next()).done;)ut(ke.value)&&ra(ke.value,U)}}}function st(w){{var U=w.type;if(U==null||typeof U=="string")return;var K;if(typeof U=="function")K=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===x||U.$$typeof===c))K=U.propTypes;else return;if(K){var oe=F(U);_e(K,w.props,"prop",oe,w)}else if(U.PropTypes!==void 0&&!ft){ft=!0;var xe=F(U);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Se(w){{for(var U=Object.keys(w.props),K=0;K<U.length;K++){var oe=U[K];if(oe!=="children"&&oe!=="key"){gt(w),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",oe),gt(null);break}}w.ref!==null&&(gt(w),O("Invalid attribute `ref` supplied to `React.Fragment`."),gt(null))}}var Lt={};function Ee(w,U,K,oe,xe,Oe){{var ke=M(w);if(!ke){var De="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(De+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var qe=zt();qe?De+=qe:De+=it();var We;w===null?We="null":me(w)?We="array":w!==void 0&&w.$$typeof===i?(We="<"+(F(w.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):We=typeof w,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",We,De)}var Be=bt(w,U,K,xe,Oe);if(Be==null)return Be;if(ke){var Ke=U.children;if(Ke!==void 0)if(oe)if(me(Ke)){for(var dt=0;dt<Ke.length;dt++)ct(Ke[dt],w);Object.freeze&&Object.freeze(Ke)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ct(Ke,w)}if(A.call(U,"key")){var yt=F(w),et=Object.keys(U).filter(function(He){return He!=="key"}),Jt=et.length>0?"{key: someKey, "+et.join(": ..., ")+": ...}":"{key: someKey}";if(!Lt[yt+Jt]){var Ea=et.length>0?"{"+et.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Jt,yt,Ea,yt),Lt[yt+Jt]=!0}}return w===
|
|
30
|
+
<%s key={someKey} {...props} />`,Jt,yt,Ea,yt),Lt[yt+Jt]=!0}}return w===l?Se(Be):st(Be),Be}}function Pt(w,U,K){return Ee(w,U,K,!0)}function Pa(w,U,K){return Ee(w,U,K,!1)}var Wt=Pa,Xe=Pt;ta.Fragment=l,ta.jsx=Wt,ta.jsxs=Xe})()),ta}var rn;function cl(){return rn||(rn=1,process.env.NODE_ENV==="production"?pa.exports=ll():pa.exports=ul()),pa.exports}var h=cl();const dl=f=>{const i=q.useRef();return h.jsx("div",{ref:i,className:"row page-break-before pagebreak-container",children:h.jsx("div",{className:"col-12 text-center pagebreak-component",children:"Page break"})})},Da=class Da extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static schema(){return ot.ReactComponent.schema({type:"pagebreak"})}render(){return super.render("<div></div>")}attach(i){return super.attach(i)}getValue(){return""}setValue(i){}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dl,{ref:g,...this,current:this}))}};Ct(Da,"builderInfo",{title:"PageBreak",group:"basic",icon:"bi bi-file-break",weight:70,schema:Da.schema()});let ba=Da;const Fe=()=>{const f=window.location,i=new RegExp("qa.bugliano.pi.it|localhost|opencity-labs.gitlab.io","g");let g=null;if(i.test(f.hostname))g="https://servizi.comune-qa.bugliano.pi.it/lang";else if(window.BASE_URL)g=window.BASE_URL;else{const l=f.pathname.split("/");g=f.origin+"/"+l[1]}return g},hl=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_variable_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
31
31
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
32
32
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
33
33
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -58,14 +58,14 @@ if(data.calendarId && data.api_url){
|
|
|
58
58
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function fl(...y){return ot.Components.baseEditForm([{key:"display",components:hl}],...y)}function Yt(y){return(i={})=>{const g=i.width?String(i.width):y.defaultWidth;return y.formats[g]||y.formats[y.defaultWidth]}}function rt(y){return(i,g)=>{const d=g!=null&&g.context?String(g.context):"standalone";let z;if(d==="formatting"&&y.formattingValues){const X=y.defaultFormattingWidth||y.defaultWidth,o=g!=null&&g.width?String(g.width):X;z=y.formattingValues[o]||y.formattingValues[X]}else{const X=y.defaultWidth,o=g!=null&&g.width?String(g.width):y.defaultWidth;z=y.values[o]||y.values[X]}const $=y.argumentCallback?y.argumentCallback(i):i;return z[$]}}function nt(y){return(i,g={})=>{const d=g.width,z=d&&y.matchPatterns[d]||y.matchPatterns[y.defaultMatchWidth],$=i.match(z);if(!$)return null;const X=$[0],o=d&&y.parsePatterns[d]||y.parsePatterns[y.defaultParseWidth],x=Array.isArray(o)?pl(o,u=>u.test(X)):ml(o,u=>u.test(X));let a;a=y.valueCallback?y.valueCallback(x):x,a=g.valueCallback?g.valueCallback(a):a;const s=i.slice(X.length);return{value:a,rest:s}}}function ml(y,i){for(const g in y)if(Object.prototype.hasOwnProperty.call(y,g)&&i(y[g]))return g}function pl(y,i){for(let g=0;g<y.length;g++)if(i(y[g]))return g}function dr(y){return(i,g={})=>{const d=i.match(y.matchPattern);if(!d)return null;const z=d[0],$=i.match(y.parsePattern);if(!$)return null;let X=y.valueCallback?y.valueCallback($[0]):$[0];X=g.valueCallback?g.valueCallback(X):X;const o=i.slice(z.length);return{value:X,rest:o}}}const nn=Symbol.for("constructDateFrom");function Sn(y,i){return typeof y=="function"?y(i):y&&typeof y=="object"&&nn in y?y[nn](i):y instanceof Date?new y.constructor(i):new Date(i)}function gl(y,...i){const g=Sn.bind(null,y||i.find(d=>typeof d=="object"));return i.map(g)}let yl={};function vl(){return yl}function _l(y,i){return Sn(i||y,y)}function sn(y,i){var o,x,a,s;const g=vl(),d=(i==null?void 0:i.weekStartsOn)??((x=(o=i==null?void 0:i.locale)==null?void 0:o.options)==null?void 0:x.weekStartsOn)??g.weekStartsOn??((s=(a=g.locale)==null?void 0:a.options)==null?void 0:s.weekStartsOn)??0,z=_l(y,i==null?void 0:i.in),$=z.getDay(),X=($<d?7:0)+$-d;return z.setDate(z.getDate()-X),z.setHours(0,0,0,0),z}function on(y,i,g){const[d,z]=gl(g==null?void 0:g.in,y,i);return+sn(d,g)==+sn(z,g)}const ln={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},bl=(y,i,g)=>{let d;const z=g!=null&&g.addSuffix?ln[y].withPreposition:ln[y].standalone;return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",String(i)),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:"vor "+d:d},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},xl={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ml={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:xl,defaultWidth:"full"}),dateTime:Yt({formats:Ml,defaultWidth:"full"})},Dl={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},kl=(y,i,g,d)=>Dl[y],Yl={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},jl={narrow:nr.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nr.wide},Tl={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Cl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Nl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Pl=y=>Number(y)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:nr,formattingValues:jl,defaultWidth:"wide"}),day:rt({values:Tl,defaultWidth:"wide"}),dayPeriod:rt({values:Cl,defaultWidth:"wide",formattingValues:Nl,defaultFormattingWidth:"wide"})},Al=/^(\d+)(\.)?/i,Rl=/\d+/i,Il={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Fl={any:[/^v/i,/^n/i]},zl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ll={any:[/1/i,/2/i,/3/i,/4/i]},Wl={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Vl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hl={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$l={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Bl={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Ul={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ql={ordinalNumber:dr({matchPattern:Al,parsePattern:Rl,valueCallback:y=>parseInt(y)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any"}),day:nt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Bl,defaultMatchWidth:"wide",parsePatterns:Ul,defaultParseWidth:"any"})},Dn={code:"de",formatDistance:bl,formatLong:Sl,formatRelative:kl,localize:El,match:ql,options:{weekStartsOn:1,firstWeekContainsDate:4}},Jl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gl=(y,i,g)=>{let d;const z=Jl[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:d+" ago":d},Kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xl=(y,i,g,d)=>Kl[y],Ql={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},au={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nu=(y,i)=>{const g=Number(y),d=g%100;if(d>20||d<10)switch(d%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:eu,defaultWidth:"wide"}),day:rt({values:tu,defaultWidth:"wide"}),dayPeriod:rt({values:au,defaultWidth:"wide",formattingValues:ru,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,ou=/\d+/i,lu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uu={any:[/^b/i,/^(a|c)/i]},cu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vu={ordinalNumber:dr({matchPattern:su,parsePattern:ou,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any"}),day:nt({matchPatterns:mu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:gu,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})},_u={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bu={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xu={date:Yt({formats:_u,defaultWidth:"full"}),time:Yt({formats:bu,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},kn={code:"en-GB",formatDistance:Gl,formatLong:xu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Su=(y,i,g)=>{let d;const z=Mu[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"tra "+d:d+" fa":d},Du={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ku={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Yu={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Ou={date:Yt({formats:Du,defaultWidth:"full"}),time:Yt({formats:ku,defaultWidth:"full"}),dateTime:Yt({formats:Yu,defaultWidth:"full"})},hr=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function ju(y){switch(y){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[y]+" scorso alle' p"}}function un(y){return"'"+hr[y]+" alle' p"}function Tu(y){switch(y){case 0:return"'domenica prossima alle' p";default:return"'"+hr[y]+" prossimo alle' p"}}const Cu={lastWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):ju(d)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):Tu(d)},other:"P"},Nu=(y,i,g,d)=>{const z=Cu[y];return typeof z=="function"?z(i,g,d):z},Pu={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Eu={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Au={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},Ru={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},Iu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},Fu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},zu=(y,i)=>{const g=Number(y);return String(g)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:Au,defaultWidth:"wide"}),day:rt({values:Ru,defaultWidth:"wide"}),dayPeriod:rt({values:Iu,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})},Wu=/^(\d+)(º)?/i,Vu=/\d+/i,Hu={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},$u={any:[/^a/i,/^(d|e)/i]},Bu={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},Uu={any:[/1/i,/2/i,/3/i,/4/i]},qu={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},Ju={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},Ku={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},Xu={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Zu={ordinalNumber:dr({matchPattern:Wu,parsePattern:Vu,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),day:nt({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Xu,defaultMatchWidth:"any",parsePatterns:Qu,defaultParseWidth:"any"})},Yn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(y){throw new Error('Could not dynamically require "'+y+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ir={exports:{}},ga={exports:{}},ec=ga.exports,cn;function fr(){return cn||(cn=1,(function(y,i){(function(g,d){y.exports=d()})(ec,(function(){var g;function d(){return g.apply(null,arguments)}function z(e){g=e}function $(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function X(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function a(e){return e===void 0}function s(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function u(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function c(e,t){var r=[],n,l=e.length;for(n=0;n<l;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function j(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return e._pf==null&&(e._pf=j()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Y(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),r=D.call(t.parsedDateParts,function(l){return l!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function O(e){var t=f(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var I=d.momentProperties=[],N=!1;function S(e,t){var r,n,l,M=I.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=_(t)),a(t._locale)||(e._locale=t._locale),M>0)for(r=0;r<M;r++)n=I[r],l=t[n],a(l)||(e[n]=l);return e}function v(e){S(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,d.updateOffset(this),N=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function L(e){d.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function m(e,t){var r=!0;return p(function(){if(d.deprecationHandler!=null&&d.deprecationHandler(null,e),r){var n=[],l,M,W,ne=arguments.length;for(M=0;M<ne;M++){if(l="",typeof arguments[M]=="object"){l+=`
|
|
62
|
-
[`+
|
|
61
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function fl(...f){return ot.Components.baseEditForm([{key:"display",components:hl}],...f)}function Yt(f){return(i={})=>{const g=i.width?String(i.width):f.defaultWidth;return f.formats[g]||f.formats[f.defaultWidth]}}function rt(f){return(i,g)=>{const l=g!=null&&g.context?String(g.context):"standalone";let V;if(l==="formatting"&&f.formattingValues){const X=f.defaultFormattingWidth||f.defaultWidth,s=g!=null&&g.width?String(g.width):X;V=f.formattingValues[s]||f.formattingValues[X]}else{const X=f.defaultWidth,s=g!=null&&g.width?String(g.width):f.defaultWidth;V=f.values[s]||f.values[X]}const B=f.argumentCallback?f.argumentCallback(i):i;return V[B]}}function nt(f){return(i,g={})=>{const l=g.width,V=l&&f.matchPatterns[l]||f.matchPatterns[f.defaultMatchWidth],B=i.match(V);if(!B)return null;const X=B[0],s=l&&f.parsePatterns[l]||f.parsePatterns[f.defaultParseWidth],x=Array.isArray(s)?pl(s,c=>c.test(X)):ml(s,c=>c.test(X));let a;a=f.valueCallback?f.valueCallback(x):x,a=g.valueCallback?g.valueCallback(a):a;const o=i.slice(X.length);return{value:a,rest:o}}}function ml(f,i){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g)&&i(f[g]))return g}function pl(f,i){for(let g=0;g<f.length;g++)if(i(f[g]))return g}function dr(f){return(i,g={})=>{const l=i.match(f.matchPattern);if(!l)return null;const V=l[0],B=i.match(f.parsePattern);if(!B)return null;let X=f.valueCallback?f.valueCallback(B[0]):B[0];X=g.valueCallback?g.valueCallback(X):X;const s=i.slice(V.length);return{value:X,rest:s}}}const nn=Symbol.for("constructDateFrom");function Sn(f,i){return typeof f=="function"?f(i):f&&typeof f=="object"&&nn in f?f[nn](i):f instanceof Date?new f.constructor(i):new Date(i)}function gl(f,...i){const g=Sn.bind(null,f||i.find(l=>typeof l=="object"));return i.map(g)}let yl={};function vl(){return yl}function bl(f,i){return Sn(i||f,f)}function sn(f,i){var s,x,a,o;const g=vl(),l=(i==null?void 0:i.weekStartsOn)??((x=(s=i==null?void 0:i.locale)==null?void 0:s.options)==null?void 0:x.weekStartsOn)??g.weekStartsOn??((o=(a=g.locale)==null?void 0:a.options)==null?void 0:o.weekStartsOn)??0,V=bl(f,i==null?void 0:i.in),B=V.getDay(),X=(B<l?7:0)+B-l;return V.setDate(V.getDate()-X),V.setHours(0,0,0,0),V}function on(f,i,g){const[l,V]=gl(g==null?void 0:g.in,f,i);return+sn(l,g)==+sn(V,g)}const ln={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},_l=(f,i,g)=>{let l;const V=g!=null&&g.addSuffix?ln[f].withPreposition:ln[f].standalone;return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",String(i)),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+l:"vor "+l:l},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Ml={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},xl={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:Ml,defaultWidth:"full"}),dateTime:Yt({formats:xl,defaultWidth:"full"})},Dl={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},kl=(f,i,g,l)=>Dl[f],Yl={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},jl={narrow:nr.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nr.wide},Tl={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Cl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Nl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Pl=f=>Number(f)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:nr,formattingValues:jl,defaultWidth:"wide"}),day:rt({values:Tl,defaultWidth:"wide"}),dayPeriod:rt({values:Cl,defaultWidth:"wide",formattingValues:Nl,defaultFormattingWidth:"wide"})},Al=/^(\d+)(\.)?/i,Rl=/\d+/i,Il={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Fl={any:[/^v/i,/^n/i]},zl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ll={any:[/1/i,/2/i,/3/i,/4/i]},Wl={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Vl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hl={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$l={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Bl={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Ul={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ql={ordinalNumber:dr({matchPattern:Al,parsePattern:Rl,valueCallback:f=>parseInt(f)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any"}),day:nt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Bl,defaultMatchWidth:"wide",parsePatterns:Ul,defaultParseWidth:"any"})},Dn={code:"de",formatDistance:_l,formatLong:Sl,formatRelative:kl,localize:El,match:ql,options:{weekStartsOn:1,firstWeekContainsDate:4}},Jl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gl=(f,i,g)=>{let l;const V=Jl[f];return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+l:l+" ago":l},Kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xl=(f,i,g,l)=>Kl[f],Ql={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},au={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nu=(f,i)=>{const g=Number(f),l=g%100;if(l>20||l<10)switch(l%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:eu,defaultWidth:"wide"}),day:rt({values:tu,defaultWidth:"wide"}),dayPeriod:rt({values:au,defaultWidth:"wide",formattingValues:ru,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,ou=/\d+/i,lu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uu={any:[/^b/i,/^(a|c)/i]},cu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vu={ordinalNumber:dr({matchPattern:su,parsePattern:ou,valueCallback:f=>parseInt(f,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any"}),day:nt({matchPatterns:mu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:gu,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})},bu={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},_u={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mu={date:Yt({formats:bu,defaultWidth:"full"}),time:Yt({formats:_u,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},kn={code:"en-GB",formatDistance:Gl,formatLong:Mu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},xu={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Su=(f,i,g)=>{let l;const V=xu[f];return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"tra "+l:l+" fa":l},Du={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ku={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Yu={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Ou={date:Yt({formats:Du,defaultWidth:"full"}),time:Yt({formats:ku,defaultWidth:"full"}),dateTime:Yt({formats:Yu,defaultWidth:"full"})},hr=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function ju(f){switch(f){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[f]+" scorso alle' p"}}function un(f){return"'"+hr[f]+" alle' p"}function Tu(f){switch(f){case 0:return"'domenica prossima alle' p";default:return"'"+hr[f]+" prossimo alle' p"}}const Cu={lastWeek:(f,i,g)=>{const l=f.getDay();return on(f,i,g)?un(l):ju(l)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(f,i,g)=>{const l=f.getDay();return on(f,i,g)?un(l):Tu(l)},other:"P"},Nu=(f,i,g,l)=>{const V=Cu[f];return typeof V=="function"?V(i,g,l):V},Pu={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Eu={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Au={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},Ru={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},Iu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},Fu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},zu=(f,i)=>{const g=Number(f);return String(g)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:Au,defaultWidth:"wide"}),day:rt({values:Ru,defaultWidth:"wide"}),dayPeriod:rt({values:Iu,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})},Wu=/^(\d+)(º)?/i,Vu=/\d+/i,Hu={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},$u={any:[/^a/i,/^(d|e)/i]},Bu={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},Uu={any:[/1/i,/2/i,/3/i,/4/i]},qu={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},Ju={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},Ku={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},Xu={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Zu={ordinalNumber:dr({matchPattern:Wu,parsePattern:Vu,valueCallback:f=>parseInt(f,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),day:nt({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Xu,defaultMatchWidth:"any",parsePatterns:Qu,defaultParseWidth:"any"})},Yn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(f){throw new Error('Could not dynamically require "'+f+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ir={exports:{}},ga={exports:{}},ec=ga.exports,cn;function fr(){return cn||(cn=1,(function(f,i){(function(g,l){f.exports=l()})(ec,(function(){var g;function l(){return g.apply(null,arguments)}function V(e){g=e}function B(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function X(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(s(e,t))return!1;return!0}function a(e){return e===void 0}function o(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function c(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function d(e,t){var r=[],n,u=e.length;for(n=0;n<u;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function T(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(e){return e._pf==null&&(e._pf=T()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function O(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=v(e),r=D.call(t.parsedDateParts,function(u){return u!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function j(e){var t=m(NaN);return e!=null?p(v(t),e):v(t).userInvalidated=!0,t}var R=l.momentProperties=[],N=!1;function k(e,t){var r,n,u,S=R.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=v(t)),a(t._locale)||(e._locale=t._locale),S>0)for(r=0;r<S;r++)n=R[r],u=t[n],a(u)||(e[n]=u);return e}function y(e){k(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,l.updateOffset(this),N=!1)}function C(e){return e instanceof y||e!=null&&e._isAMomentObject!=null}function _(e){l.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var r=!0;return p(function(){if(l.deprecationHandler!=null&&l.deprecationHandler(null,e),r){var n=[],u,S,L,ne=arguments.length;for(S=0;S<ne;S++){if(u="",typeof arguments[S]=="object"){u+=`
|
|
62
|
+
[`+S+"] ";for(L in arguments[0])s(arguments[0],L)&&(u+=L+": "+arguments[0][L]+", ");u=u.slice(0,-2)}else u=arguments[S];n.push(u)}_(e+`
|
|
63
63
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
64
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var P={};function B(e,t){d.deprecationHandler!=null&&d.deprecationHandler(e,t),P[e]||(L(t),P[e]=!0)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;function R(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function A(e){var t,r;for(r in e)o(e,r)&&(t=e[r],R(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function H(e,t){var r=p({},e),n;for(n in t)o(t,n)&&(X(e[n])&&X(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&X(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var ie;Object.keys?ie=Object.keys:ie=function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function he(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return R(n)?n.call(t,r):n}function Z(e,t,r){var n=""+Math.abs(e),l=t-n.length,M=e>=0;return(M?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+n}var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Q(e,t,r,n){var l=n;typeof n=="string"&&(l=function(){return this[n]()}),e&&(ce[e]=l),t&&(ce[t[0]]=function(){return Z(l.apply(this,arguments),t[1],t[2])}),r&&(ce[r]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ne(e){var t=e.match(ue),r,n;for(r=0,n=t.length;r<n;r++)ce[t[r]]?t[r]=ce[t[r]]:t[r]=ve(t[r]);return function(l){var M="",W;for(W=0;W<n;W++)M+=R(t[W])?t[W].call(l,e):t[W];return M}}function _e(e,t){return e.isValid()?(t=Ce(t,e.localeData()),ye[t]=ye[t]||Ne(t),ye[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(l){return t.longDateFormat(l)||l}for(ae.lastIndex=0;r>=0&&ae.test(e);)e=e.replace(ae,n),ae.lastIndex=0,r-=1;return e}var Re={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ue).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var C="Invalid date";function b(){return this._invalidDate}var V="%d",k=/\d{1,2}/;function E(e){return this._ordinal.replace("%d",e)}var F={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,r,n){var l=this._relativeTime[r];return R(l)?l(e,t,r,n):l.replace(/%d/i,e)}function se(e,t){var r=this._relativeTime[e>0?"future":"past"];return R(r)?r(t):r.replace(/%s/i,t)}var be={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function de(e){return typeof e=="string"?be[e]||be[e.toLowerCase()]:void 0}function me(e){var t={},r,n;for(n in e)o(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var xe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(e){var t=[],r;for(r in e)o(e,r)&&t.push({unit:r,priority:xe[r]});return t.sort(function(n,l){return n.priority-l.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Ze=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,_t=/[+-]?\d+/,bt=/Z|[+-]\d\d:?\d\d/gi,Ue=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function re(e,t,r){zt[e]=R(t)?t:function(n,l){return n&&r?r:t}}function Na(e,t){return o(zt,e)?zt[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,l,M){return r||n||l||M}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Se(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=st(t)),r}var Lt={};function Ee(e,t){var r,n=t,l;for(typeof e=="string"&&(e=[e]),s(t)&&(n=function(M,W){W[t]=Se(M)}),l=e.length,r=0;r<l;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,l,M){l._w=l._w||{},t(r,l._w,l,M)})}function Pa(e,t,r){t!=null&&o(Lt,e)&&Lt[e](t,r._a,r,e)}function Wt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,w=1,U=2,K=3,oe=4,Me=5,Oe=6,ke=7,De=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Z(e,4):"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),re("Y",_t),re("YY",we,Ie),re("YYYY",vt,Qe),re("YYYYY",pt,ge),re("YYYYYY",pt,ge),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?d.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=d.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}d.parseTwoDigitYear=function(e){return Se(e)+(Se(e)>68?1900:2e3)};var We=Ke("FullYear",!0);function Be(){return Wt(this.year())}function Ke(e,t){return function(r){return r!=null?(yt(this,e,r),d.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function yt(e,t,r){var n,l,M,W,ne;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(l?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(l?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(l?n.setUTCHours(r):n.setHours(r));case"Date":return void(l?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}M=r,W=e.month(),ne=e.date(),ne=ne===29&&W===1&&!Wt(M)?28:ne,l?n.setUTCFullYear(M,W,ne):n.setFullYear(M,W,ne)}}function et(e){return e=de(e),R(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=me(e);var r=Ae(e),n,l=r.length;for(n=0;n<l;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),R(this[e]))return this[e](t);return this}function Ea(e,t){return(e%t+t)%t}var He;Array.prototype.indexOf?He=Array.prototype.indexOf:He=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Aa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Ea(t,12);return e+=(t-r)/12,r===1?Wt(e)?29:28:31-r%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),re("M",we,ut),re("MM",we,Ie),re("MMM",function(e,t){return t.monthsShortRegex(e)}),re("MMMM",function(e,t){return t.monthsRegex(e)}),Ee(["M","MM"],function(e,t){t[w]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var l=r._locale.monthsParse(e,n,r._strict);l!=null?t[w]=l:_(r).invalidMonth=e});var Cn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nn=ft,Pn=ft;function En(e,t){return e?$(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:$(this._months)?this._months:this._months.standalone}function An(e,t){return e?$(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:$(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Rn(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)M=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(M,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(M,"").toLocaleLowerCase();return r?t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:null):(l=He.call(this._longMonthsParse,W),l!==-1?l:null):t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:(l=He.call(this._longMonthsParse,W),l!==-1?l:null)):(l=He.call(this._longMonthsParse,W),l!==-1?l:(l=He.call(this._shortMonthsParse,W),l!==-1?l:null))}function In(e,t,r){var n,l,M;if(this._monthsParseExact)return Rn.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(l=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(M="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Se(t);else if(t=e.localeData().monthsParse(t),!s(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Aa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function _r(e){return e!=null?(vr(this,e),d.updateOffset(this,!0),this):dt(this,"Month")}function Fn(){return Aa(this.year(),this.month())}function zn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Nn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ln(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Pn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function br(){function e(pe,je){return je.length-pe.length}var t=[],r=[],n=[],l,M,W,ne;for(l=0;l<12;l++)M=f([2e3,l]),W=ct(this.monthsShort(M,"")),ne=ct(this.months(M,"")),t.push(W),r.push(ne),n.push(ne),n.push(W);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wn(e,t,r,n,l,M,W){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,r,n,l,M,W),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,r,n,l,M,W),ne}function Gt(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function na(e,t,r){var n=7+t-r,l=(7+Gt(e,0,n).getUTCDay()-t)%7;return-l+n-1}function wr(e,t,r,n,l){var M=(7+r-n)%7,W=na(e,n,l),ne=1+7*(t-1)+M+W,pe,je;return ne<=0?(pe=e-1,je=qe(pe)+ne):ne>qe(e)?(pe=e+1,je=ne-qe(e)):(pe=e,je=ne),{year:pe,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),l=Math.floor((e.dayOfYear()-n-1)/7)+1,M,W;return l<1?(W=e.year()-1,M=l+wt(W,t,r)):l>wt(e.year(),t,r)?(M=l-wt(e.year(),t,r),W=e.year()+1):(W=e.year(),M=l),{week:M,year:W}}function wt(e,t,r){var n=na(e,t,r),l=na(e+1,t,r);return(qe(e)-n+l)/7}Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),re("w",we,ut),re("ww",we,Ie),re("W",we,ut),re("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Vn(e){return Kt(e,this._week.dow,this._week.doy).week}var Hn={dow:0,doy:6};function $n(){return this._week.dow}function Bn(){return this._week.doy}function Un(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function qn(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),re("d",we),re("e",we),re("E",we),re("dd",function(e,t){return t.weekdaysMinRegex(e)}),re("ddd",function(e,t){return t.weekdaysShortRegex(e)}),re("dddd",function(e,t){return t.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var l=r._locale.weekdaysParse(e,n,r._strict);l!=null?t.d=l:_(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function Jn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Gn(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ra(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qn=ft,Zn=ft,ei=ft;function ti(e,t){var r=$(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ra(r,this._week.dow):e?r[e.day()]:r}function ai(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ri(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ni(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)M=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(M,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(M,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(M,"").toLocaleLowerCase();return r?t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1?l:null):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null):(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null):t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1||(l=He.call(this._shortWeekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):(l=He.call(this._minWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null))}function ii(e,t,r){var n,l,M;if(this._weekdaysParseExact)return ni.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(l=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(M="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function si(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=Jn(e,this.localeData()),this.add(e-t,"d")):t}function oi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function li(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Gn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ui(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Qn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ci(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function di(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ei),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],l=[],M,W,ne,pe,je;for(M=0;M<7;M++)W=f([2e3,1]).day(M),ne=ct(this.weekdaysMin(W,"")),pe=ct(this.weekdaysShort(W,"")),je=ct(this.weekdays(W,"")),t.push(ne),r.push(pe),n.push(je),l.push(ne),l.push(pe),l.push(je);t.sort(e),r.sort(e),n.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fa(){return this.hours()%12||12}function hi(){return this.hours()||24}Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Fa),Q("k",["kk",2],0,hi),Q("hmm",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)+Z(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+Z(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+Z(this.minutes(),2)+Z(this.seconds(),2)});function Mr(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Mr("a",!0),Mr("A",!1);function Sr(e,t){return t._meridiemParse}re("a",Sr),re("A",Sr),re("H",we,it),re("h",we,ut),re("k",we,ut),re("HH",we,Ie),re("hh",we,Ie),re("kk",we,Ie),re("hmm",Ze),re("hmmss",tt),re("Hmm",Ze),re("Hmmss",tt),Ee(["H","HH"],K),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[K]=n===24?0:n}),Ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,t,r){t[K]=Se(e),_(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n)),_(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l)),_(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l))});function fi(e){return(e+"").toLowerCase().charAt(0)==="p"}var mi=/[ap]\.?m?\.?/i,pi=Ke("Hours",!0);function gi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:C,ordinal:V,dayOfMonthOrdinalParse:k,relativeTime:F,months:Cn,monthsShort:gr,week:Hn,weekdays:Kn,weekdaysMin:Xn,weekdaysShort:xr,meridiemParse:mi},Ve={},Xt={},Qt;function yi(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function kr(e){return e&&e.toLowerCase().replace("_","-")}function vi(e){for(var t=0,r,n,l,M;t<e.length;){for(M=kr(e[t]).split("-"),r=M.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(l=ia(M.slice(0,r).join("-")),l)return l;if(n&&n.length>=r&&yi(M,n)>=r-1)break;r--}t++}return Qt}function _i(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&y&&y.exports&&_i(e))try{t=Qt._abbr,r=Ca,r("./locale/"+e),Ot(t)}catch{Ve[e]=null}return Ve[e]}function Ot(e,t){var r;return e&&(a(t)?r=xt(e):r=za(e,t),r?Qt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qt._abbr}function za(e,t){if(t!==null){var r,n=Dr;if(t.abbr=e,Ve[e]!=null)B("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ve[e]._config;else if(t.parentLocale!=null)if(Ve[t.parentLocale]!=null)n=Ve[t.parentLocale]._config;else if(r=ia(t.parentLocale),r!=null)n=r._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new J(H(n,t)),Xt[e]&&Xt[e].forEach(function(l){za(l.name,l.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function bi(e,t){if(t!=null){var r,n,l=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(H(Ve[e]._config,t)):(n=ia(e),n!=null&&(l=n._config),t=H(l,t),n==null&&(t.abbr=e),r=new J(t),r.parentLocale=Ve[e],Ve[e]=r),Ot(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Ot()&&Ot(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!$(e)){if(t=ia(e),t)return t;e=[e]}return vi(e)}function wi(){return ie(Ve)}function La(e){var t,r=e._a;return r&&_(e).overflow===-2&&(t=r[w]<0||r[w]>11?w:r[U]<1||r[U]>Aa(r[Xe],r[w])?U:r[K]<0||r[K]>24||r[K]===24&&(r[oe]!==0||r[Me]!==0||r[Oe]!==0)?K:r[oe]<0||r[oe]>59?oe:r[Me]<0||r[Me]>59?Me:r[Oe]<0||r[Oe]>999?Oe:-1,_(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=ke),_(e)._overflowWeekday&&t===-1&&(t=De),_(e).overflow=t),e}var xi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Si=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Wa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Di=/^\/?Date\((-?\d+)/i,ki=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Yi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yr(e){var t,r,n=e._i,l=xi.exec(n)||Mi.exec(n),M,W,ne,pe,je=sa.length,at=Wa.length;if(l){for(_(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(l[1])){W=sa[t][0],M=sa[t][2]!==!1;break}if(W==null){e._isValid=!1;return}if(l[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(l[3])){ne=(l[2]||" ")+Wa[t][0];break}if(ne==null){e._isValid=!1;return}}if(!M&&ne!=null){e._isValid=!1;return}if(l[4])if(Si.exec(l[4]))pe="Z";else{e._isValid=!1;return}e._f=W+(ne||"")+(pe||""),Ha(e)}else e._isValid=!1}function Oi(e,t,r,n,l,M){var W=[ji(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(l,10)];return M&&W.push(parseInt(M,10)),W}function ji(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ti(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,r){if(e){var n=xr.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(n!==l)return _(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ni(e,t,r){if(e)return Yi[e];if(t)return 0;var n=parseInt(r,10),l=n%100,M=(n-l)/100;return M*60+l}function Or(e){var t=ki.exec(Ti(e._i)),r;if(t){if(r=Oi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ci(t[1],r,e))return;e._a=r,e._tzm=Ni(t[8],t[9],t[10]),e._d=Gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Pi(e){var t=Di.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Yr(e),e._isValid===!1)delete e._isValid;else return;if(Or(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:d.createFromInputFallback(e)}d.createFromInputFallback=m("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Vt(e,t,r){return e??t??r}function Ei(e){var t=new Date(d.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],l,M,W;if(!e._d){for(l=Ei(e),e._w&&e._a[U]==null&&e._a[w]==null&&Ai(e),e._dayOfYear!=null&&(W=Vt(e._a[Xe],l[Xe]),(e._dayOfYear>qe(W)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),r=Gt(W,0,e._dayOfYear),e._a[w]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=l[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[K]===24&&e._a[oe]===0&&e._a[Me]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Gt:Wn).apply(null,n),M=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==M&&(_(e).weekdayMismatch=!0)}}function Ai(e){var t,r,n,l,M,W,ne,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(M=1,W=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),l=Vt(t.E,1),(l<1||l>7)&&(pe=!0)):(M=e._locale._week.dow,W=e._locale._week.doy,je=Kt(Le(),M,W),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(l=t.d,(l<0||l>6)&&(pe=!0)):t.e!=null?(l=t.e+M,(t.e<0||t.e>6)&&(pe=!0)):l=M),n<1||n>wt(r,M,W)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=wr(r,n,l,M,W),e._a[Xe]=ne.year,e._dayOfYear=ne.dayOfYear)}d.ISO_8601=function(){},d.RFC_2822=function(){};function Ha(e){if(e._f===d.ISO_8601){Yr(e);return}if(e._f===d.RFC_2822){Or(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,r,n,l,M,W,ne=t.length,pe=0,je,at;for(l=Ce(e._f,e._locale).match(ue)||[],at=l.length,r=0;r<at;r++)M=l[r],n=(t.match(Na(M,e))||[])[0],n&&(W=t.substr(0,t.indexOf(n)),W.length>0&&_(e).unusedInput.push(W),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),ce[M]?(n?_(e).empty=!1:_(e).unusedTokens.push(M),Pa(M,n,e)):e._strict&&!n&&_(e).unusedTokens.push(M);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[K]<=12&&_(e).bigHour===!0&&e._a[K]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[K]=Ri(e._locale,e._a[K],e._meridiem),je=_(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ri(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Ii(e){var t,r,n,l,M,W,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<pe;l++)M=0,W=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ha(t),Y(t)&&(W=!0),M+=_(t).charsLeftOver,M+=_(t).unusedTokens.length*10,_(t).score=M,ne?M<n&&(n=M,r=t):(n==null||M<n||W)&&(n=M,r=t,W&&(ne=!0));p(e,r||t)}function Fi(e){if(!e._d){var t=me(e._i),r=t.day===void 0?t.date:t.day;e._a=c([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function zi(e){var t=new v(La(jr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function jr(e){var t=e._i,r=e._f;return e._locale=e._locale||xt(e._l),t===null||r===void 0&&t===""?O({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(La(t)):(u(t)?e._d=t:$(r)?Ii(e):r?Ha(e):Li(e),Y(e)||(e._d=null),e))}function Li(e){var t=e._i;a(t)?e._d=new Date(d.now()):u(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pi(e):$(t)?(e._a=c(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):X(t)?Fi(e):s(t)?e._d=new Date(t):d.createFromInputFallback(e)}function Tr(e,t,r,n,l){var M={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(X(e)&&x(e)||$(e)&&e.length===0)&&(e=void 0),M._isAMomentObject=!0,M._useUTC=M._isUTC=l,M._l=r,M._i=e,M._f=t,M._strict=n,zi(M)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Wi=m("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:O()}),Vi=m("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:O()});function Cr(e,t){var r,n;if(t.length===1&&$(t[0])&&(t=t[0]),!t.length)return Le();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Hi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var Bi=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ui(e){var t,r=!1,n,l=Zt.length;for(t in e)if(o(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<l;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function qi(){return this._isValid}function Ji(){return mt(NaN)}function oa(e){var t=me(e),r=t.year||0,n=t.quarter||0,l=t.month||0,M=t.week||t.isoWeek||0,W=t.day||0,ne=t.hour||0,pe=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Ui(t),this._milliseconds=+at+je*1e3+pe*6e4+ne*1e3*60*60,this._days=+W+M*7,this._months=+l+n*3+r*12,this._data={},this._locale=xt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gi(e,t,r){var n=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),M=0,W;for(W=0;W<n;W++)Se(e[W])!==Se(t[W])&&M++;return M+l}function Nr(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Z(~~(r/60),2)+t+Z(~~r%60,2)})}Nr("Z",":"),Nr("ZZ",""),re("Z",Ue),re("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Ki=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,l,M;return r===null?null:(n=r[r.length-1]||[],l=(n+"").match(Ki)||["-",0,0],M=+(l[1]*60)+Se(l[2]),M===0?0:l[0]==="+"?M:-M)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(T(e)||u(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),d.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}d.updateOffset=function(){};function Xi(e,t,r){var n=this._offset||0,l;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ba(Ue,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(l=qa(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Qi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Zi(e){return this.utcOffset(0,e)}function es(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function ts(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function as(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ns(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=jr(e),e._a?(t=e._isUTC?f(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Gi(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function is(){return this.isValid()?!this._isUTC:!1}function ss(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var os=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var r=e,n=null,l,M,W;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=os.exec(e))?(l=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*l,h:Se(n[K])*l,m:Se(n[oe])*l,s:Se(n[Me])*l,ms:Se($a(n[Oe]*1e3))*l}):(n=ls.exec(e))?(l=n[1]==="-"?-1:1,r={y:Et(n[2],l),M:Et(n[3],l),w:Et(n[4],l),d:Et(n[5],l),h:Et(n[6],l),m:Et(n[7],l),s:Et(n[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(W=us(Le(r.from),Le(r.to)),r={},r.ms=W.milliseconds,r.M=W.months),M=new oa(r),la(e)&&o(e,"_locale")&&(M._locale=e._locale),la(e)&&o(e,"_isValid")&&(M._isValid=e._isValid),M}mt.fn=oa.prototype,mt.invalid=Ji;function Et(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Er(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function us(e,t){var r;return e.isValid()&&t.isValid()?(t=Ua(t,e),e.isBefore(t)?r=Er(e,t):(r=Er(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ar(e,t){return function(r,n){var l,M;return n!==null&&!isNaN(+n)&&(B(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),M=r,r=n,n=M),l=mt(r,n),Rr(this,l,e),this}}function Rr(e,t,r,n){var l=t._milliseconds,M=$a(t._days),W=$a(t._months);e.isValid()&&(n=n??!0,W&&vr(e,dt(e,"Month")+W*r),M&&yt(e,"Date",dt(e,"Date")+M*r),l&&e._d.setTime(e._d.valueOf()+l*r),n&&d.updateOffset(e,M||W))}var cs=Ar(1,"add"),ds=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function hs(e){return T(e)||u(e)||Ir(e)||s(e)||ms(e)||fs(e)||e===null||e===void 0}function fs(e){var t=X(e)&&!x(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,M,W=n.length;for(l=0;l<W;l+=1)M=n[l],r=r||o(e,M);return t&&r}function ms(e){var t=$(e),r=!1;return t&&(r=e.filter(function(n){return!s(n)&&Ir(e)}).length===0),t&&r}function ps(e){var t=X(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,M;for(l=0;l<n.length;l+=1)M=n[l],r=r||o(e,M);return t&&r}function gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function ys(e,t){arguments.length===1&&(arguments[0]?hs(arguments[0])?(e=arguments[0],t=void 0):ps(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),l=d.calendarFormat(this,n)||"sameElse",M=t&&(R(t[l])?t[l].call(this,r):t[l]);return this.format(M||this.localeData().calendar(l,this,Le(r)))}function vs(){return new v(this)}function _s(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function bs(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function ws(e,t,r,n){var l=T(e)?e:Le(e),M=T(t)?t:Le(t);return this.isValid()&&l.isValid()&&M.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(l,r):!this.isBefore(l,r))&&(n[1]===")"?this.isBefore(M,r):!this.isAfter(M,r))):!1}function xs(e,t){var r=T(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Ms(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ss(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ds(e,t,r){var n,l,M;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(l=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":M=ua(this,n)/12;break;case"month":M=ua(this,n);break;case"quarter":M=ua(this,n)/3;break;case"second":M=(this-n)/1e3;break;case"minute":M=(this-n)/6e4;break;case"hour":M=(this-n)/36e5;break;case"day":M=(this-n-l)/864e5;break;case"week":M=(this-n-l)/6048e5;break;default:M=this-n}return r?M:st(M)}function ua(e,t){if(e.date()<t.date())return-ua(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),l,M;return t-n<0?(l=e.clone().add(r-1,"months"),M=(t-n)/(n-l)):(l=e.clone().add(r+1,"months"),M=(t-n)/(l-n)),-(r+M)||0}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ks(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ys(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?_e(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(r,"Z")):_e(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Os(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,l,M;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",M=t+'[")]',this.format(r+n+l+M)}function js(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function Ts(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cs(e){return this.from(Le(),e)}function Ns(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ps(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=xt(e),t!=null&&(this._locale=t),this)}var zr=m("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Lr(){return this._locale}var ca=1e3,Ht=60*ca,da=60*Ht,Wr=(365*400+97)*24*da;function $t(e,t){return(e%t+t)%t}function Vr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Wr:new Date(e,t,r).valueOf()}function Hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Wr:Date.UTC(e,t,r)}function Es(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$t(t+(this._isUTC?0:this.utcOffset()*Ht),da);break;case"minute":t=this._d.valueOf(),t-=$t(t,Ht);break;case"second":t=this._d.valueOf(),t-=$t(t,ca);break}return this._d.setTime(t),d.updateOffset(this,!0),this}function As(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=da-$t(t+(this._isUTC?0:this.utcOffset()*Ht),da)-1;break;case"minute":t=this._d.valueOf(),t+=Ht-$t(t,Ht)-1;break;case"second":t=this._d.valueOf(),t+=ca-$t(t,ca)-1;break}return this._d.setTime(t),d.updateOffset(this,!0),this}function Rs(){return this._d.valueOf()-(this._offset||0)*6e4}function Is(){return Math.floor(this.valueOf()/1e3)}function Fs(){return new Date(this.valueOf())}function zs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ls(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ws(){return this.isValid()?this.toISOString():null}function Vs(){return Y(this)}function Hs(){return p({},_(this))}function $s(){return _(this).overflow}function Bs(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr"),Q("NN",0,0,"eraAbbr"),Q("NNN",0,0,"eraAbbr"),Q("NNNN",0,0,"eraName"),Q("NNNNN",0,0,"eraNarrow"),Q("y",["y",1],"yo","eraYear"),Q("y",["yy",2],0,"eraYear"),Q("y",["yyy",3],0,"eraYear"),Q("y",["yyyy",4],0,"eraYear"),re("N",Ja),re("NN",Ja),re("NNN",Ja),re("NNNN",ao),re("NNNNN",ro),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var l=r._locale.erasParse(e,n,r._strict);l?_(r).era=l:_(r).invalidEra=e}),re("y",lt),re("yy",lt),re("yyy",lt),re("yyyy",lt),re("yo",no),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,l):t[Xe]=parseInt(e,10)});function Us(e,t){var r,n,l,M=this._eras||xt("en")._eras;for(r=0,n=M.length;r<n;++r){switch(typeof M[r].since){case"string":l=d(M[r].since).startOf("day"),M[r].since=l.valueOf();break}switch(typeof M[r].until){case"undefined":M[r].until=1/0;break;case"string":l=d(M[r].until).startOf("day").valueOf(),M[r].until=l.valueOf();break}}return M}function qs(e,t,r){var n,l,M=this.eras(),W,ne,pe;for(e=e.toUpperCase(),n=0,l=M.length;n<l;++n)if(W=M[n].name.toUpperCase(),ne=M[n].abbr.toUpperCase(),pe=M[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ne===e)return M[n];break;case"NNNN":if(W===e)return M[n];break;case"NNNNN":if(pe===e)return M[n];break}else if([W,ne,pe].indexOf(e)>=0)return M[n]}function Js(e,t){var r=e.since<=e.until?1:-1;return t===void 0?d(e.since).year():d(e.since).year()+(t-e.offset)*r}function Gs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ks(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function Qs(){var e,t,r,n,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(r=l[e].since<=l[e].until?1:-1,n=this.clone().startOf("day").valueOf(),l[e].since<=n&&n<=l[e].until||l[e].until<=n&&n<=l[e].since)return(this.year()-d(l[e].since).year())*r+l[e].offset;return this.year()}function Zs(e){return o(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function eo(e){return o(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function to(e){return o(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function ao(e,t){return t.erasNameRegex(e)}function ro(e,t){return t.erasNarrowRegex(e)}function no(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],l,M,W,ne,pe,je=this.eras();for(l=0,M=je.length;l<M;++l)W=ct(je[l].name),ne=ct(je[l].abbr),pe=ct(je[l].narrow),t.push(W),e.push(ne),r.push(pe),n.push(W),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Q(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),re("G",_t),re("g",_t),re("GG",we,Ie),re("gg",we,Ie),re("GGGG",vt,Qe),re("gggg",vt,Qe),re("GGGGG",pt,ge),re("ggggg",pt,ge),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Se(e)}),Pt(["gg","GG"],function(e,t,r,n){t[n]=d.parseTwoDigitYear(e)});function io(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function so(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function oo(){return wt(this.year(),1,4)}function lo(){return wt(this.isoWeekYear(),1,4)}function uo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function co(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,l){var M;return e==null?Kt(this,n,l).year:(M=wt(e,n,l),t>M&&(t=M),ho.call(this,e,t,r,n,l))}function ho(e,t,r,n,l){var M=wr(e,t,r,n,l),W=Gt(M.year,0,M.dayOfYear);return this.year(W.getUTCFullYear()),this.month(W.getUTCMonth()),this.date(W.getUTCDate()),this}Q("Q",0,"Qo","quarter"),re("Q",$e),Ee("Q",function(e,t){t[w]=(Se(e)-1)*3});function fo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date"),re("D",we,ut),re("DD",we,Ie),re("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],U),Ee("Do",function(e,t){t[U]=Se(e.match(we)[0])});var Br=Ke("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),re("DDD",ht),re("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function mo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute"),re("m",we,it),re("mm",we,Ie),Ee(["m","mm"],oe);var po=Ke("Minutes",!1);Q("s",["ss",2],0,"second"),re("s",we,it),re("ss",we,Ie),Ee(["s","ss"],Me);var go=Ke("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return this.millisecond()*10}),Q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),re("S",ht,$e),re("SS",ht,Ie),re("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")re(jt,lt);function yo(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,yo);Ur=Ke("Milliseconds",!1),Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");function vo(){return this._isUTC?"UTC":""}function _o(){return this._isUTC?"Coordinated Universal Time":""}var G=v.prototype;G.add=cs,G.calendar=ys,G.clone=vs,G.diff=Ds,G.endOf=As,G.format=js,G.from=Ts,G.fromNow=Cs,G.to=Ns,G.toNow=Ps,G.get=et,G.invalidAt=$s,G.isAfter=_s,G.isBefore=bs,G.isBetween=ws,G.isSame=xs,G.isSameOrAfter=Ms,G.isSameOrBefore=Ss,G.isValid=Vs,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Vi,G.min=Wi,G.parsingFlags=Hs,G.set=Jt,G.startOf=Es,G.subtract=ds,G.toArray=zs,G.toObject=Ls,G.toDate=Fs,G.toISOString=Ys,G.inspect=Os,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ws,G.toString=ks,G.unix=Is,G.valueOf=Rs,G.creationData=Bs,G.eraName=Gs,G.eraNarrow=Ks,G.eraAbbr=Xs,G.eraYear=Qs,G.year=We,G.isLeapYear=Be,G.weekYear=io,G.isoWeekYear=so,G.quarter=G.quarters=fo,G.month=_r,G.daysInMonth=Fn,G.week=G.weeks=Un,G.isoWeek=G.isoWeeks=qn,G.weeksInYear=uo,G.weeksInWeekYear=co,G.isoWeeksInYear=oo,G.isoWeeksInISOWeekYear=lo,G.date=Br,G.day=G.days=si,G.weekday=oi,G.isoWeekday=li,G.dayOfYear=mo,G.hour=G.hours=pi,G.minute=G.minutes=po,G.second=G.seconds=go,G.millisecond=G.milliseconds=Ur,G.utcOffset=Xi,G.utc=Zi,G.local=es,G.parseZone=ts,G.hasAlignedHourOffset=as,G.isDST=rs,G.isLocal=is,G.isUtcOffset=ss,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=vo,G.zoneName=_o,G.dates=m("dates accessor is deprecated. Use date instead.",Br),G.months=m("months accessor is deprecated. Use month instead",_r),G.years=m("years accessor is deprecated. Use year instead",We),G.zone=m("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qi),G.isDSTShifted=m("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ns);function bo(e){return Le(e*1e3)}function wo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=he,Pe.longDateFormat=ze,Pe.invalidDate=b,Pe.ordinal=E,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=se,Pe.set=A,Pe.eras=Us,Pe.erasParse=qs,Pe.erasConvertYear=Js,Pe.erasAbbrRegex=eo,Pe.erasNameRegex=Zs,Pe.erasNarrowRegex=to,Pe.months=En,Pe.monthsShort=An,Pe.monthsParse=In,Pe.monthsRegex=Ln,Pe.monthsShortRegex=zn,Pe.week=Vn,Pe.firstDayOfYear=Bn,Pe.firstDayOfWeek=$n,Pe.weekdays=ti,Pe.weekdaysMin=ri,Pe.weekdaysShort=ai,Pe.weekdaysParse=ii,Pe.weekdaysRegex=ui,Pe.weekdaysShortRegex=ci,Pe.weekdaysMinRegex=di,Pe.isPM=fi,Pe.meridiem=gi;function fa(e,t,r,n){var l=xt(),M=f().set(n,t);return l[r](M,e)}function Jr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,l=[];for(n=0;n<12;n++)l[n]=fa(e,n,r,"month");return l}function Ka(e,t,r,n){typeof e=="boolean"?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var l=xt(),M=e?l._week.dow:0,W,ne=[];if(r!=null)return fa(t,(r+M)%7,n,"day");for(W=0;W<7;W++)ne[W]=fa(t,(W+M)%7,n,"day");return ne}function xo(e,t){return Jr(e,t,"months")}function Mo(e,t){return Jr(e,t,"monthsShort")}function So(e,t,r){return Ka(e,t,r,"weekdays")}function Do(e,t,r){return Ka(e,t,r,"weekdaysShort")}function ko(e,t,r){return Ka(e,t,r,"weekdaysMin")}Ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),d.lang=m("moment.lang is deprecated. Use moment.locale instead.",Ot),d.langData=m("moment.langData is deprecated. Use moment.localeData instead.",xt);var Mt=Math.abs;function Yo(){var e=this._data;return this._milliseconds=Mt(this._milliseconds),this._days=Mt(this._days),this._months=Mt(this._months),e.milliseconds=Mt(e.milliseconds),e.seconds=Mt(e.seconds),e.minutes=Mt(e.minutes),e.hours=Mt(e.hours),e.months=Mt(e.months),e.years=Mt(e.years),this}function Gr(e,t,r,n){var l=mt(t,r);return e._milliseconds+=n*l._milliseconds,e._days+=n*l._days,e._months+=n*l._months,e._bubble()}function Oo(e,t){return Gr(this,e,t,1)}function jo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,l,M,W,ne,pe;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kr(Xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,l=st(e/1e3),n.seconds=l%60,M=st(l/60),n.minutes=M%60,W=st(M/60),n.hours=W%24,t+=st(W/24),pe=st(Xr(t)),r+=pe,t-=Kr(Xa(pe)),ne=st(r/12),r%=12,n.days=t,n.months=r,n.years=ne,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function Co(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Xr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function St(e){return function(){return this.as(e)}}var Qr=St("ms"),No=St("s"),Po=St("m"),Eo=St("h"),Ao=St("d"),Ro=St("w"),Io=St("M"),Fo=St("Q"),zo=St("y"),Lo=Qr;function Wo(){return mt(this)}function Vo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=At("milliseconds"),$o=At("seconds"),Bo=At("minutes"),Uo=At("hours"),qo=At("days"),Jo=At("months"),Go=At("years");function Ko(){return st(this.days()/7)}var Dt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xo(e,t,r,n,l){return l.relativeTime(t||1,!!r,e,n)}function Qo(e,t,r,n){var l=mt(e).abs(),M=Dt(l.as("s")),W=Dt(l.as("m")),ne=Dt(l.as("h")),pe=Dt(l.as("d")),je=Dt(l.as("M")),at=Dt(l.as("w")),kt=Dt(l.as("y")),Tt=M<=r.ss&&["s",M]||M<r.s&&["ss",M]||W<=1&&["m"]||W<r.m&&["mm",W]||ne<=1&&["h"]||ne<r.h&&["hh",ne]||pe<=1&&["d"]||pe<r.d&&["dd",pe];return r.w!=null&&(Tt=Tt||at<=1&&["w"]||at<r.w&&["ww",at]),Tt=Tt||je<=1&&["M"]||je<r.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Tt[2]=t,Tt[3]=+e>0,Tt[4]=n,Xo.apply(null,Tt)}function Zo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function el(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function tl(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,l,M;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),l=this.localeData(),M=Qo(this,!r,n,l),r&&(M=l.pastFuture(+this,M)),l.postformat(M)}var Qa=Math.abs;function Ut(e){return(e>0)-(e<0)||+e}function ma(){if(!this.isValid())return this.localeData().invalidDate();var e=Qa(this._milliseconds)/1e3,t=Qa(this._days),r=Qa(this._months),n,l,M,W,ne=this.asSeconds(),pe,je,at,kt;return ne?(n=st(e/60),l=st(n/60),e%=60,n%=60,M=st(r/12),r%=12,W=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",je=Ut(this._months)!==Ut(ne)?"-":"",at=Ut(this._days)!==Ut(ne)?"-":"",kt=Ut(this._milliseconds)!==Ut(ne)?"-":"",pe+"P"+(M?je+M+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(l||n||e?"T":"")+(l?kt+l+"H":"")+(n?kt+n+"M":"")+(e?kt+W+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=qi,Te.abs=Yo,Te.add=Oo,Te.subtract=jo,Te.as=Co,Te.asMilliseconds=Qr,Te.asSeconds=No,Te.asMinutes=Po,Te.asHours=Eo,Te.asDays=Ao,Te.asWeeks=Ro,Te.asMonths=Io,Te.asQuarters=Fo,Te.asYears=zo,Te.valueOf=Lo,Te._bubble=To,Te.clone=Wo,Te.get=Vo,Te.milliseconds=Ho,Te.seconds=$o,Te.minutes=Bo,Te.hours=Uo,Te.days=qo,Te.weeks=Ko,Te.months=Jo,Te.years=Go,Te.humanize=tl,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=m("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),re("x",_t),re("X",gt),Ee("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,t,r){r._d=new Date(Se(e))});//! moment.js
|
|
65
|
-
return
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
function d($,X,o,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[$+" Tage",$+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[$+" Monate",$+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[$+" Jahre",$+" Jahren"]};return X?a[o][0]:a[o][1]}var z=g.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:d,mm:"%d Minuten",h:d,hh:"%d Stunden",d,dd:d,w:d,ww:"%d Wochen",M:d,MM:d,y:d,yy:d},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return z}))})()),or.exports}sc();const Nt=y=>{let i="";return y.split(":").forEach(g=>{i+=g}),parseInt(i)},mn=y=>y.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=y=>{const i=y.address;if(y.addresstype==="county"&&i.country)return i.county;if(y.addresstype==="village"&&i.village)return i.village;const g=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach($=>{i.hasOwnProperty($)&&i[$]&&g.push(i[$])}),i.road?g.push(i.road):i.pedestrian?g.push(i.pedestrian):i.suburb?g.push(i.suburb):i.square?g.push(i.square):(i.neighbourhood&&g.push(i.neighbourhood),i.hamlet?g.push(i.hamlet):i.isolated_dwelling?g.push(i.isolated_dwelling):i.locality?g.push(i.locality):i.croft&&g.push(i.croft)),i.house_number&&g.push(i.house_number),i.postcode&&g.push(i.postcode),i.village&&g.push(i.village),i.town?g.push(i.town):i.city&&g.push(i.city);var z=g.join(", ").substr(0,150);return z};function aa(y){let i=window.sessionStorage.getItem(y);if(i!==null){let g=JSON.parse(i);if(new Date(g.expirationDate)>new Date)return g.value;window.sessionStorage.removeItem(y)}return null}function oc(y,i,g){let d=g?new Date(g*1e3):null;if(d){let z={value:i,expirationDate:d.toISOString()};window.sessionStorage.setItem(y,JSON.stringify(z))}}function pn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=k=>{let E=fe(k).format("YYYY-MM-DD");fetch(Z(E)).then(F=>F.json()).then(F=>{let te=he(k||new Date);const se=F.filter(Ae=>Ae.available==!0);se.length===0&&C();let de=[];te.forEach(Ae=>{F.some($e=>$e.date===Ae&&$e.available==!0)?de.push({available:!0,date:Ae}):de.push({available:!1,date:Ae})});const me=de.map(Ae=>{if(Ae.available===!1)return fe(Ae.date,"YYYY-MM-DD").toDate()});o(me);const xe=se.length?se[0].date:k;ie(xe)}).catch(F=>console.error(F))},ie=k=>{O(null),D(null),a([]);let E=fe(k).format("YYYY-MM-DD");fetch(ue(E)).then(F=>F.json()).then(F=>{const te=F.filter(se=>se.availability==!0);N(te[0]),te.length>0?(a(F),u(!1),D(fe(k).format("L")),$(fe(k,"YYYY-MM-DD").toDate())):(F.length>0&&$(fe(F[0].date,"YYYY-MM-DD").toDate()),a([]),C())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let k=[];i.dataValue.map(E=>{k.push({...E,date:fe(E.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(k)}}else if(!y.multiple&&typeof i.dataValue=="object"){const k={date:i.dataValue.date,slot:i.dataValue.slot},E={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([E]),v(k)}else{let k=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),E=k[2].split("#");const F={date:fe(k[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k[1]};y.multiple?(g([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}]),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])):(g({date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])),v(F)}};q.useEffect(()=>{var k;(k=window.FormioInstance)==null||k.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=k=>{let F=fe(k,"YYYY-MM").daysInMonth(),te=[];for(;F;){let se=fe(k).date(F);te.push(se.format("YYYY-MM-DD")),F--}return te},Z=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${F}/availabilities`,me=[`from_time=${fe(k).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(k).endOf("month").format("YYYY-MM-DD")}`];return E&&me.push(`available=${E}`),te&&se&&me.push(`opening_hours=${se.join()}`),`${de}?${me.join("&")}`},ue=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const de=fe(k).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${F}/availabilities/${de}`,xe=[];return E&&xe.push(`available=${E}`),te&&se&&xe.push(`opening_hours=${se.join()}`),xe&&(me=`${me}?${xe.join("&")}`),me},ae=k=>{J(k)},ye=k=>{setTimeout(()=>{L(!T)},1e3),ie(k)},ce=k=>{O(null),setTimeout(()=>{k&&(j(k.target.dataset),O(k.target.id))},300)},Q=k=>{p(null);let E=`${Fe()}/it/meetings/new-draft`,F={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(k.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:k.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:k.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(E,{method:"POST",body:JSON.stringify(F),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const se={date:F.date,slot:F.slot,calendar_id:F.calendar[0],opening_hour_id:F.opening_hour||F.opening_hour_id,meeting_id:te.id};P([...m,se])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:k,seconds:E,completed:F})=>F?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[k," ",d.t("minuti")," ",E," ",d.t("secondi")]})]})]})}),Ce=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E>Nt(f.end)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_start:k.target.value})},Re=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E<Nt(f.start)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_end:k.target.value})},ze=k=>{if(k===null||k==="")g("");else if(Array.isArray(k)&&k.length>0){let E=[];m.map(F=>{E.push({date:fe(F.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:F.slot,calendar_id:F.calendar_id||F.calendar[0],meeting_id:F.meeting_id,opening_hour_id:F.opening_hour||F.opening_hour_id})}),y.multiple?g(E):g(E[0])}else g("")},C=()=>{u(!0),p(null),D(null),ze(null)},b=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{ze(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const V=(k,E)=>{let F=`${Fe()}/api/meetings/${E.meeting_id}`;fetch(F,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...m.slice(0,k),...m.slice(k+1)];P(se),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(k=>h.jsx(pn,{day:fe(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:k.slot})):h.jsx(pn,{day:fe(S.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ae,onDayClick:ye}),h.jsx("p",{children:d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ae,onDayClick:ye}),h.jsxs("p",{children:[" ",d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((k,E)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[k.date," ",f||k.slot?`${d.t("alle")} ${k.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>V(E,k),role:"button"})]})})},"li"+E))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),s?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",d.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((k,E)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+E,onClick:ce,ref:A,className:Y==="slot-"+E?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":k.date,"data-start":k.start_time,"data-end":k.end_time,"data-value_start":k.start_time,"data-value_end":k.end_time,"data-slots":k.start_time+"-"+k.end_time,"data-opening_hour":k.opening_hour,"data-min_duration":k.min_duration,disabled:k.slots_available==0,children:[k.start_time," - ",k.end_time]})},"slot-"+E)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:f!=null&&f.value_start&&Y?h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-12 mb-3",children:h.jsx("p",{className:"mb-3",children:h.jsx("b",{children:d.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("Dalle"),className:"active",defaultValue:f.value_start||f.start,min:f.start,max:f.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("alle"),className:"active",defaultValue:f.value_end||f.end,onBlur:Re,min:f.start,max:f.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})};var It;let On=(It=class extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ct(It,"editForm",fl),It);const uc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
64
|
+
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var z={};function H(e,t){l.deprecationHandler!=null&&l.deprecationHandler(e,t),z[e]||(_(t),z[e]=!0)}l.suppressDeprecationWarnings=!1,l.deprecationHandler=null;function F(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function E(e){var t,r;for(r in e)s(e,r)&&(t=e[r],F(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function $(e,t){var r=p({},e),n;for(n in t)s(t,n)&&(X(e[n])&&X(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&X(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var re;Object.keys?re=Object.keys:re=function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return F(n)?n.call(t,r):n}function Q(e,t,r){var n=""+Math.abs(e),u=t-n.length,S=e>=0;return(S?r?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+n}var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Z(e,t,r,n){var u=n;typeof n=="string"&&(u=function(){return this[n]()}),e&&(ce[e]=u),t&&(ce[t[0]]=function(){return Q(u.apply(this,arguments),t[1],t[2])}),r&&(ce[r]=function(){return this.localeData().ordinal(u.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ne(e){var t=e.match(ue),r,n;for(r=0,n=t.length;r<n;r++)ce[t[r]]?t[r]=ce[t[r]]:t[r]=ve(t[r]);return function(u){var S="",L;for(L=0;L<n;L++)S+=F(t[L])?t[L].call(u,e):t[L];return S}}function be(e,t){return e.isValid()?(t=Ce(t,e.localeData()),ye[t]=ye[t]||Ne(t),ye[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(u){return t.longDateFormat(u)||u}for(se.lastIndex=0;r>=0&&se.test(e);)e=e.replace(se,n),se.lastIndex=0,r-=1;return e}var Re={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ue).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var P="Invalid date";function b(){return this._invalidDate}var W="%d",Y=/\d{1,2}/;function A(e){return this._ordinal.replace("%d",e)}var I={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,r,n){var u=this._relativeTime[r];return F(u)?u(e,t,r,n):u.replace(/%d/i,e)}function ie(e,t){var r=this._relativeTime[e>0?"future":"past"];return F(r)?r(t):r.replace(/%s/i,t)}var _e={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function de(e){return typeof e=="string"?_e[e]||_e[e.toLowerCase()]:void 0}function me(e){var t={},r,n;for(n in e)s(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var Me={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(e){var t=[],r;for(r in e)s(e,r)&&t.push({unit:r,priority:Me[r]});return t.sort(function(n,u){return n.priority-u.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Ze=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,bt=/[+-]?\d+/,_t=/Z|[+-]\d\d:?\d\d/gi,Ue=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function ae(e,t,r){zt[e]=F(t)?t:function(n,u){return n&&r?r:t}}function Na(e,t){return s(zt,e)?zt[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,u,S){return r||n||u||S}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Se(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=st(t)),r}var Lt={};function Ee(e,t){var r,n=t,u;for(typeof e=="string"&&(e=[e]),o(t)&&(n=function(S,L){L[t]=Se(S)}),u=e.length,r=0;r<u;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,u,S){u._w=u._w||{},t(r,u._w,u,S)})}function Pa(e,t,r){t!=null&&s(Lt,e)&&Lt[e](t,r._a,r,e)}function Wt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,w=1,U=2,K=3,oe=4,xe=5,Oe=6,ke=7,De=8;Z("Y",0,0,function(){var e=this.year();return e<=9999?Q(e,4):"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),ae("Y",bt),ae("YY",we,Ie),ae("YYYY",vt,Qe),ae("YYYYY",pt,ge),ae("YYYYYY",pt,ge),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?l.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=l.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}l.parseTwoDigitYear=function(e){return Se(e)+(Se(e)>68?1900:2e3)};var We=Ke("FullYear",!0);function Be(){return Wt(this.year())}function Ke(e,t){return function(r){return r!=null?(yt(this,e,r),l.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function yt(e,t,r){var n,u,S,L,ne;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,u=e._isUTC,t){case"Milliseconds":return void(u?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(u?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(u?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(u?n.setUTCHours(r):n.setHours(r));case"Date":return void(u?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}S=r,L=e.month(),ne=e.date(),ne=ne===29&&L===1&&!Wt(S)?28:ne,u?n.setUTCFullYear(S,L,ne):n.setFullYear(S,L,ne)}}function et(e){return e=de(e),F(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=me(e);var r=Ae(e),n,u=r.length;for(n=0;n<u;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),F(this[e]))return this[e](t);return this}function Ea(e,t){return(e%t+t)%t}var He;Array.prototype.indexOf?He=Array.prototype.indexOf:He=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Aa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Ea(t,12);return e+=(t-r)/12,r===1?Wt(e)?29:28:31-r%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",we,ut),ae("MM",we,Ie),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Ee(["M","MM"],function(e,t){t[w]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var u=r._locale.monthsParse(e,n,r._strict);u!=null?t[w]=u:v(r).invalidMonth=e});var Cn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nn=ft,Pn=ft;function En(e,t){return e?B(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:B(this._months)?this._months:this._months.standalone}function An(e,t){return e?B(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:B(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Rn(e,t,r){var n,u,S,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)S=m([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(S,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(S,"").toLocaleLowerCase();return r?t==="MMM"?(u=He.call(this._shortMonthsParse,L),u!==-1?u:null):(u=He.call(this._longMonthsParse,L),u!==-1?u:null):t==="MMM"?(u=He.call(this._shortMonthsParse,L),u!==-1?u:(u=He.call(this._longMonthsParse,L),u!==-1?u:null)):(u=He.call(this._longMonthsParse,L),u!==-1?u:(u=He.call(this._shortMonthsParse,L),u!==-1?u:null))}function In(e,t,r){var n,u,S;if(this._monthsParseExact)return Rn.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(u=m([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(S="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[n]=new RegExp(S.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Se(t);else if(t=e.localeData().monthsParse(t),!o(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Aa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function br(e){return e!=null?(vr(this,e),l.updateOffset(this,!0),this):dt(this,"Month")}function Fn(){return Aa(this.year(),this.month())}function zn(e){return this._monthsParseExact?(s(this,"_monthsRegex")||_r.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Nn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ln(e){return this._monthsParseExact?(s(this,"_monthsRegex")||_r.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Pn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function _r(){function e(pe,je){return je.length-pe.length}var t=[],r=[],n=[],u,S,L,ne;for(u=0;u<12;u++)S=m([2e3,u]),L=ct(this.monthsShort(S,"")),ne=ct(this.months(S,"")),t.push(L),r.push(ne),n.push(ne),n.push(L);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wn(e,t,r,n,u,S,L){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,r,n,u,S,L),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,r,n,u,S,L),ne}function Gt(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function na(e,t,r){var n=7+t-r,u=(7+Gt(e,0,n).getUTCDay()-t)%7;return-u+n-1}function wr(e,t,r,n,u){var S=(7+r-n)%7,L=na(e,n,u),ne=1+7*(t-1)+S+L,pe,je;return ne<=0?(pe=e-1,je=qe(pe)+ne):ne>qe(e)?(pe=e+1,je=ne-qe(e)):(pe=e,je=ne),{year:pe,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),u=Math.floor((e.dayOfYear()-n-1)/7)+1,S,L;return u<1?(L=e.year()-1,S=u+wt(L,t,r)):u>wt(e.year(),t,r)?(S=u-wt(e.year(),t,r),L=e.year()+1):(L=e.year(),S=u),{week:S,year:L}}function wt(e,t,r){var n=na(e,t,r),u=na(e+1,t,r);return(qe(e)-n+u)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),ae("w",we,ut),ae("ww",we,Ie),ae("W",we,ut),ae("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Vn(e){return Kt(e,this._week.dow,this._week.doy).week}var Hn={dow:0,doy:6};function $n(){return this._week.dow}function Bn(){return this._week.doy}function Un(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function qn(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),ae("d",we),ae("e",we),ae("E",we),ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ae("dddd",function(e,t){return t.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var u=r._locale.weekdaysParse(e,n,r._strict);u!=null?t.d=u:v(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function Jn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Gn(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ra(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qn=ft,Zn=ft,ei=ft;function ti(e,t){var r=B(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ra(r,this._week.dow):e?r[e.day()]:r}function ai(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ri(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ni(e,t,r){var n,u,S,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)S=m([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(S,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(S,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(S,"").toLocaleLowerCase();return r?t==="dddd"?(u=He.call(this._weekdaysParse,L),u!==-1?u:null):t==="ddd"?(u=He.call(this._shortWeekdaysParse,L),u!==-1?u:null):(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null):t==="dddd"?(u=He.call(this._weekdaysParse,L),u!==-1||(u=He.call(this._shortWeekdaysParse,L),u!==-1)?u:(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null)):t==="ddd"?(u=He.call(this._shortWeekdaysParse,L),u!==-1||(u=He.call(this._weekdaysParse,L),u!==-1)?u:(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null)):(u=He.call(this._minWeekdaysParse,L),u!==-1||(u=He.call(this._weekdaysParse,L),u!==-1)?u:(u=He.call(this._shortWeekdaysParse,L),u!==-1?u:null))}function ii(e,t,r){var n,u,S;if(this._weekdaysParseExact)return ni.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(u=m([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(u,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(u,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(u,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(S="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[n]=new RegExp(S.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function si(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=Jn(e,this.localeData()),this.add(e-t,"d")):t}function oi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function li(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Gn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ui(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Qn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ci(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function di(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ei),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],u=[],S,L,ne,pe,je;for(S=0;S<7;S++)L=m([2e3,1]).day(S),ne=ct(this.weekdaysMin(L,"")),pe=ct(this.weekdaysShort(L,"")),je=ct(this.weekdays(L,"")),t.push(ne),r.push(pe),n.push(je),u.push(ne),u.push(pe),u.push(je);t.sort(e),r.sort(e),n.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fa(){return this.hours()%12||12}function hi(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Fa),Z("k",["kk",2],0,hi),Z("hmm",0,0,function(){return""+Fa.apply(this)+Q(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Fa.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)});function xr(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xr("a",!0),xr("A",!1);function Sr(e,t){return t._meridiemParse}ae("a",Sr),ae("A",Sr),ae("H",we,it),ae("h",we,ut),ae("k",we,ut),ae("HH",we,Ie),ae("hh",we,Ie),ae("kk",we,Ie),ae("hmm",Ze),ae("hmmss",tt),ae("Hmm",Ze),ae("Hmmss",tt),Ee(["H","HH"],K),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[K]=n===24?0:n}),Ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,t,r){t[K]=Se(e),v(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n)),v(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,u=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[xe]=Se(e.substr(u)),v(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,u=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[xe]=Se(e.substr(u))});function fi(e){return(e+"").toLowerCase().charAt(0)==="p"}var mi=/[ap]\.?m?\.?/i,pi=Ke("Hours",!0);function gi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:P,ordinal:W,dayOfMonthOrdinalParse:Y,relativeTime:I,months:Cn,monthsShort:gr,week:Hn,weekdays:Kn,weekdaysMin:Xn,weekdaysShort:Mr,meridiemParse:mi},Ve={},Xt={},Qt;function yi(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function kr(e){return e&&e.toLowerCase().replace("_","-")}function vi(e){for(var t=0,r,n,u,S;t<e.length;){for(S=kr(e[t]).split("-"),r=S.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(u=ia(S.slice(0,r).join("-")),u)return u;if(n&&n.length>=r&&yi(S,n)>=r-1)break;r--}t++}return Qt}function bi(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&f&&f.exports&&bi(e))try{t=Qt._abbr,r=Ca,r("./locale/"+e),Ot(t)}catch{Ve[e]=null}return Ve[e]}function Ot(e,t){var r;return e&&(a(t)?r=Mt(e):r=za(e,t),r?Qt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qt._abbr}function za(e,t){if(t!==null){var r,n=Dr;if(t.abbr=e,Ve[e]!=null)H("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ve[e]._config;else if(t.parentLocale!=null)if(Ve[t.parentLocale]!=null)n=Ve[t.parentLocale]._config;else if(r=ia(t.parentLocale),r!=null)n=r._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new J($(n,t)),Xt[e]&&Xt[e].forEach(function(u){za(u.name,u.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function _i(e,t){if(t!=null){var r,n,u=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set($(Ve[e]._config,t)):(n=ia(e),n!=null&&(u=n._config),t=$(u,t),n==null&&(t.abbr=e),r=new J(t),r.parentLocale=Ve[e],Ve[e]=r),Ot(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Ot()&&Ot(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function Mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!B(e)){if(t=ia(e),t)return t;e=[e]}return vi(e)}function wi(){return re(Ve)}function La(e){var t,r=e._a;return r&&v(e).overflow===-2&&(t=r[w]<0||r[w]>11?w:r[U]<1||r[U]>Aa(r[Xe],r[w])?U:r[K]<0||r[K]>24||r[K]===24&&(r[oe]!==0||r[xe]!==0||r[Oe]!==0)?K:r[oe]<0||r[oe]>59?oe:r[xe]<0||r[xe]>59?xe:r[Oe]<0||r[Oe]>999?Oe:-1,v(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),v(e)._overflowWeeks&&t===-1&&(t=ke),v(e)._overflowWeekday&&t===-1&&(t=De),v(e).overflow=t),e}var Mi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Si=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Wa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Di=/^\/?Date\((-?\d+)/i,ki=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Yi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yr(e){var t,r,n=e._i,u=Mi.exec(n)||xi.exec(n),S,L,ne,pe,je=sa.length,at=Wa.length;if(u){for(v(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(u[1])){L=sa[t][0],S=sa[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(u[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(u[3])){ne=(u[2]||" ")+Wa[t][0];break}if(ne==null){e._isValid=!1;return}}if(!S&&ne!=null){e._isValid=!1;return}if(u[4])if(Si.exec(u[4]))pe="Z";else{e._isValid=!1;return}e._f=L+(ne||"")+(pe||""),Ha(e)}else e._isValid=!1}function Oi(e,t,r,n,u,S){var L=[ji(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(u,10)];return S&&L.push(parseInt(S,10)),L}function ji(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ti(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,r){if(e){var n=Mr.indexOf(e),u=new Date(t[0],t[1],t[2]).getDay();if(n!==u)return v(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ni(e,t,r){if(e)return Yi[e];if(t)return 0;var n=parseInt(r,10),u=n%100,S=(n-u)/100;return S*60+u}function Or(e){var t=ki.exec(Ti(e._i)),r;if(t){if(r=Oi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ci(t[1],r,e))return;e._a=r,e._tzm=Ni(t[8],t[9],t[10]),e._d=Gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function Pi(e){var t=Di.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Yr(e),e._isValid===!1)delete e._isValid;else return;if(Or(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:l.createFromInputFallback(e)}l.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Vt(e,t,r){return e??t??r}function Ei(e){var t=new Date(l.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],u,S,L;if(!e._d){for(u=Ei(e),e._w&&e._a[U]==null&&e._a[w]==null&&Ai(e),e._dayOfYear!=null&&(L=Vt(e._a[Xe],u[Xe]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(v(e)._overflowDayOfYear=!0),r=Gt(L,0,e._dayOfYear),e._a[w]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=u[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[K]===24&&e._a[oe]===0&&e._a[xe]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Gt:Wn).apply(null,n),S=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==S&&(v(e).weekdayMismatch=!0)}}function Ai(e){var t,r,n,u,S,L,ne,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(S=1,L=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),u=Vt(t.E,1),(u<1||u>7)&&(pe=!0)):(S=e._locale._week.dow,L=e._locale._week.doy,je=Kt(Le(),S,L),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(u=t.d,(u<0||u>6)&&(pe=!0)):t.e!=null?(u=t.e+S,(t.e<0||t.e>6)&&(pe=!0)):u=S),n<1||n>wt(r,S,L)?v(e)._overflowWeeks=!0:pe!=null?v(e)._overflowWeekday=!0:(ne=wr(r,n,u,S,L),e._a[Xe]=ne.year,e._dayOfYear=ne.dayOfYear)}l.ISO_8601=function(){},l.RFC_2822=function(){};function Ha(e){if(e._f===l.ISO_8601){Yr(e);return}if(e._f===l.RFC_2822){Or(e);return}e._a=[],v(e).empty=!0;var t=""+e._i,r,n,u,S,L,ne=t.length,pe=0,je,at;for(u=Ce(e._f,e._locale).match(ue)||[],at=u.length,r=0;r<at;r++)S=u[r],n=(t.match(Na(S,e))||[])[0],n&&(L=t.substr(0,t.indexOf(n)),L.length>0&&v(e).unusedInput.push(L),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),ce[S]?(n?v(e).empty=!1:v(e).unusedTokens.push(S),Pa(S,n,e)):e._strict&&!n&&v(e).unusedTokens.push(S);v(e).charsLeftOver=ne-pe,t.length>0&&v(e).unusedInput.push(t),e._a[K]<=12&&v(e).bigHour===!0&&e._a[K]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[K]=Ri(e._locale,e._a[K],e._meridiem),je=v(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ri(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Ii(e){var t,r,n,u,S,L,ne=!1,pe=e._f.length;if(pe===0){v(e).invalidFormat=!0,e._d=new Date(NaN);return}for(u=0;u<pe;u++)S=0,L=!1,t=k({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[u],Ha(t),O(t)&&(L=!0),S+=v(t).charsLeftOver,S+=v(t).unusedTokens.length*10,v(t).score=S,ne?S<n&&(n=S,r=t):(n==null||S<n||L)&&(n=S,r=t,L&&(ne=!0));p(e,r||t)}function Fi(e){if(!e._d){var t=me(e._i),r=t.day===void 0?t.date:t.day;e._a=d([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function zi(e){var t=new y(La(jr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function jr(e){var t=e._i,r=e._f;return e._locale=e._locale||Mt(e._l),t===null||r===void 0&&t===""?j({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),C(t)?new y(La(t)):(c(t)?e._d=t:B(r)?Ii(e):r?Ha(e):Li(e),O(e)||(e._d=null),e))}function Li(e){var t=e._i;a(t)?e._d=new Date(l.now()):c(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pi(e):B(t)?(e._a=d(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):X(t)?Fi(e):o(t)?e._d=new Date(t):l.createFromInputFallback(e)}function Tr(e,t,r,n,u){var S={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(X(e)&&x(e)||B(e)&&e.length===0)&&(e=void 0),S._isAMomentObject=!0,S._useUTC=S._isUTC=u,S._l=r,S._i=e,S._f=t,S._strict=n,zi(S)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Wi=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:j()}),Vi=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:j()});function Cr(e,t){var r,n;if(t.length===1&&B(t[0])&&(t=t[0]),!t.length)return Le();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Hi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var Bi=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ui(e){var t,r=!1,n,u=Zt.length;for(t in e)if(s(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<u;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function qi(){return this._isValid}function Ji(){return mt(NaN)}function oa(e){var t=me(e),r=t.year||0,n=t.quarter||0,u=t.month||0,S=t.week||t.isoWeek||0,L=t.day||0,ne=t.hour||0,pe=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Ui(t),this._milliseconds=+at+je*1e3+pe*6e4+ne*1e3*60*60,this._days=+L+S*7,this._months=+u+n*3+r*12,this._data={},this._locale=Mt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gi(e,t,r){var n=Math.min(e.length,t.length),u=Math.abs(e.length-t.length),S=0,L;for(L=0;L<n;L++)Se(e[L])!==Se(t[L])&&S++;return S+u}function Nr(e,t){Z(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Q(~~(r/60),2)+t+Q(~~r%60,2)})}Nr("Z",":"),Nr("ZZ",""),ae("Z",Ue),ae("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Ki=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,u,S;return r===null?null:(n=r[r.length-1]||[],u=(n+"").match(Ki)||["-",0,0],S=+(u[1]*60)+Se(u[2]),S===0?0:u[0]==="+"?S:-S)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(C(e)||c(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),l.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}l.updateOffset=function(){};function Xi(e,t,r){var n=this._offset||0,u;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ba(Ue,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(u=qa(this)),this._offset=e,this._isUTC=!0,u!=null&&this.add(u,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Qi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Zi(e){return this.utcOffset(0,e)}function es(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function ts(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(_t,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function as(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ns(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return k(e,this),e=jr(e),e._a?(t=e._isUTC?m(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Gi(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function is(){return this.isValid()?!this._isUTC:!1}function ss(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var os=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var r=e,n=null,u,S,L;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:o(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=os.exec(e))?(u=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*u,h:Se(n[K])*u,m:Se(n[oe])*u,s:Se(n[xe])*u,ms:Se($a(n[Oe]*1e3))*u}):(n=ls.exec(e))?(u=n[1]==="-"?-1:1,r={y:Et(n[2],u),M:Et(n[3],u),w:Et(n[4],u),d:Et(n[5],u),h:Et(n[6],u),m:Et(n[7],u),s:Et(n[8],u)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(L=us(Le(r.from),Le(r.to)),r={},r.ms=L.milliseconds,r.M=L.months),S=new oa(r),la(e)&&s(e,"_locale")&&(S._locale=e._locale),la(e)&&s(e,"_isValid")&&(S._isValid=e._isValid),S}mt.fn=oa.prototype,mt.invalid=Ji;function Et(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Er(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function us(e,t){var r;return e.isValid()&&t.isValid()?(t=Ua(t,e),e.isBefore(t)?r=Er(e,t):(r=Er(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ar(e,t){return function(r,n){var u,S;return n!==null&&!isNaN(+n)&&(H(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),S=r,r=n,n=S),u=mt(r,n),Rr(this,u,e),this}}function Rr(e,t,r,n){var u=t._milliseconds,S=$a(t._days),L=$a(t._months);e.isValid()&&(n=n??!0,L&&vr(e,dt(e,"Month")+L*r),S&&yt(e,"Date",dt(e,"Date")+S*r),u&&e._d.setTime(e._d.valueOf()+u*r),n&&l.updateOffset(e,S||L))}var cs=Ar(1,"add"),ds=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function hs(e){return C(e)||c(e)||Ir(e)||o(e)||ms(e)||fs(e)||e===null||e===void 0}function fs(e){var t=X(e)&&!x(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u,S,L=n.length;for(u=0;u<L;u+=1)S=n[u],r=r||s(e,S);return t&&r}function ms(e){var t=B(e),r=!1;return t&&(r=e.filter(function(n){return!o(n)&&Ir(e)}).length===0),t&&r}function ps(e){var t=X(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],u,S;for(u=0;u<n.length;u+=1)S=n[u],r=r||s(e,S);return t&&r}function gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function ys(e,t){arguments.length===1&&(arguments[0]?hs(arguments[0])?(e=arguments[0],t=void 0):ps(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),u=l.calendarFormat(this,n)||"sameElse",S=t&&(F(t[u])?t[u].call(this,r):t[u]);return this.format(S||this.localeData().calendar(u,this,Le(r)))}function vs(){return new y(this)}function bs(e,t){var r=C(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function _s(e,t){var r=C(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function ws(e,t,r,n){var u=C(e)?e:Le(e),S=C(t)?t:Le(t);return this.isValid()&&u.isValid()&&S.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(u,r):!this.isBefore(u,r))&&(n[1]===")"?this.isBefore(S,r):!this.isAfter(S,r))):!1}function Ms(e,t){var r=C(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function xs(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ss(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ds(e,t,r){var n,u,S;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(u=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":S=ua(this,n)/12;break;case"month":S=ua(this,n);break;case"quarter":S=ua(this,n)/3;break;case"second":S=(this-n)/1e3;break;case"minute":S=(this-n)/6e4;break;case"hour":S=(this-n)/36e5;break;case"day":S=(this-n-u)/864e5;break;case"week":S=(this-n-u)/6048e5;break;default:S=this-n}return r?S:st(S)}function ua(e,t){if(e.date()<t.date())return-ua(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),u,S;return t-n<0?(u=e.clone().add(r-1,"months"),S=(t-n)/(n-u)):(u=e.clone().add(r+1,"months"),S=(t-n)/(u-n)),-(r+S)||0}l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ks(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ys(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?be(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):F(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",be(r,"Z")):be(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Os(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,u,S;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",u="-MM-DD[T]HH:mm:ss.SSS",S=t+'[")]',this.format(r+n+u+S)}function js(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=be(this,e);return this.localeData().postformat(t)}function Ts(e,t){return this.isValid()&&(C(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cs(e){return this.from(Le(),e)}function Ns(e,t){return this.isValid()&&(C(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ps(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=Mt(e),t!=null&&(this._locale=t),this)}var zr=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Lr(){return this._locale}var ca=1e3,Ht=60*ca,da=60*Ht,Wr=(365*400+97)*24*da;function $t(e,t){return(e%t+t)%t}function Vr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Wr:new Date(e,t,r).valueOf()}function Hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Wr:Date.UTC(e,t,r)}function Es(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$t(t+(this._isUTC?0:this.utcOffset()*Ht),da);break;case"minute":t=this._d.valueOf(),t-=$t(t,Ht);break;case"second":t=this._d.valueOf(),t-=$t(t,ca);break}return this._d.setTime(t),l.updateOffset(this,!0),this}function As(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=da-$t(t+(this._isUTC?0:this.utcOffset()*Ht),da)-1;break;case"minute":t=this._d.valueOf(),t+=Ht-$t(t,Ht)-1;break;case"second":t=this._d.valueOf(),t+=ca-$t(t,ca)-1;break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Rs(){return this._d.valueOf()-(this._offset||0)*6e4}function Is(){return Math.floor(this.valueOf()/1e3)}function Fs(){return new Date(this.valueOf())}function zs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ls(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ws(){return this.isValid()?this.toISOString():null}function Vs(){return O(this)}function Hs(){return p({},v(this))}function $s(){return v(this).overflow}function Bs(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),ae("N",Ja),ae("NN",Ja),ae("NNN",Ja),ae("NNNN",ao),ae("NNNNN",ro),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var u=r._locale.erasParse(e,n,r._strict);u?v(r).era=u:v(r).invalidEra=e}),ae("y",lt),ae("yy",lt),ae("yyy",lt),ae("yyyy",lt),ae("yo",no),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var u;r._locale._eraYearOrdinalRegex&&(u=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,u):t[Xe]=parseInt(e,10)});function Us(e,t){var r,n,u,S=this._eras||Mt("en")._eras;for(r=0,n=S.length;r<n;++r){switch(typeof S[r].since){case"string":u=l(S[r].since).startOf("day"),S[r].since=u.valueOf();break}switch(typeof S[r].until){case"undefined":S[r].until=1/0;break;case"string":u=l(S[r].until).startOf("day").valueOf(),S[r].until=u.valueOf();break}}return S}function qs(e,t,r){var n,u,S=this.eras(),L,ne,pe;for(e=e.toUpperCase(),n=0,u=S.length;n<u;++n)if(L=S[n].name.toUpperCase(),ne=S[n].abbr.toUpperCase(),pe=S[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ne===e)return S[n];break;case"NNNN":if(L===e)return S[n];break;case"NNNNN":if(pe===e)return S[n];break}else if([L,ne,pe].indexOf(e)>=0)return S[n]}function Js(e,t){var r=e.since<=e.until?1:-1;return t===void 0?l(e.since).year():l(e.since).year()+(t-e.offset)*r}function Gs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ks(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function Qs(){var e,t,r,n,u=this.localeData().eras();for(e=0,t=u.length;e<t;++e)if(r=u[e].since<=u[e].until?1:-1,n=this.clone().startOf("day").valueOf(),u[e].since<=n&&n<=u[e].until||u[e].until<=n&&n<=u[e].since)return(this.year()-l(u[e].since).year())*r+u[e].offset;return this.year()}function Zs(e){return s(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function eo(e){return s(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function to(e){return s(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function ao(e,t){return t.erasNameRegex(e)}function ro(e,t){return t.erasNarrowRegex(e)}function no(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],u,S,L,ne,pe,je=this.eras();for(u=0,S=je.length;u<S;++u)L=ct(je[u].name),ne=ct(je[u].abbr),pe=ct(je[u].narrow),t.push(L),e.push(ne),r.push(pe),n.push(L),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Z(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),ae("G",bt),ae("g",bt),ae("GG",we,Ie),ae("gg",we,Ie),ae("GGGG",vt,Qe),ae("gggg",vt,Qe),ae("GGGGG",pt,ge),ae("ggggg",pt,ge),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Se(e)}),Pt(["gg","GG"],function(e,t,r,n){t[n]=l.parseTwoDigitYear(e)});function io(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function so(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function oo(){return wt(this.year(),1,4)}function lo(){return wt(this.isoWeekYear(),1,4)}function uo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function co(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,u){var S;return e==null?Kt(this,n,u).year:(S=wt(e,n,u),t>S&&(t=S),ho.call(this,e,t,r,n,u))}function ho(e,t,r,n,u){var S=wr(e,t,r,n,u),L=Gt(S.year,0,S.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Z("Q",0,"Qo","quarter"),ae("Q",$e),Ee("Q",function(e,t){t[w]=(Se(e)-1)*3});function fo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),ae("D",we,ut),ae("DD",we,Ie),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],U),Ee("Do",function(e,t){t[U]=Se(e.match(we)[0])});var Br=Ke("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",ht),ae("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function mo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute"),ae("m",we,it),ae("mm",we,Ie),Ee(["m","mm"],oe);var po=Ke("Minutes",!1);Z("s",["ss",2],0,"second"),ae("s",we,it),ae("ss",we,Ie),Ee(["s","ss"],xe);var go=Ke("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",ht,$e),ae("SS",ht,Ie),ae("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")ae(jt,lt);function yo(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,yo);Ur=Ke("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function vo(){return this._isUTC?"UTC":""}function bo(){return this._isUTC?"Coordinated Universal Time":""}var G=y.prototype;G.add=cs,G.calendar=ys,G.clone=vs,G.diff=Ds,G.endOf=As,G.format=js,G.from=Ts,G.fromNow=Cs,G.to=Ns,G.toNow=Ps,G.get=et,G.invalidAt=$s,G.isAfter=bs,G.isBefore=_s,G.isBetween=ws,G.isSame=Ms,G.isSameOrAfter=xs,G.isSameOrBefore=Ss,G.isValid=Vs,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Vi,G.min=Wi,G.parsingFlags=Hs,G.set=Jt,G.startOf=Es,G.subtract=ds,G.toArray=zs,G.toObject=Ls,G.toDate=Fs,G.toISOString=Ys,G.inspect=Os,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ws,G.toString=ks,G.unix=Is,G.valueOf=Rs,G.creationData=Bs,G.eraName=Gs,G.eraNarrow=Ks,G.eraAbbr=Xs,G.eraYear=Qs,G.year=We,G.isLeapYear=Be,G.weekYear=io,G.isoWeekYear=so,G.quarter=G.quarters=fo,G.month=br,G.daysInMonth=Fn,G.week=G.weeks=Un,G.isoWeek=G.isoWeeks=qn,G.weeksInYear=uo,G.weeksInWeekYear=co,G.isoWeeksInYear=oo,G.isoWeeksInISOWeekYear=lo,G.date=Br,G.day=G.days=si,G.weekday=oi,G.isoWeekday=li,G.dayOfYear=mo,G.hour=G.hours=pi,G.minute=G.minutes=po,G.second=G.seconds=go,G.millisecond=G.milliseconds=Ur,G.utcOffset=Xi,G.utc=Zi,G.local=es,G.parseZone=ts,G.hasAlignedHourOffset=as,G.isDST=rs,G.isLocal=is,G.isUtcOffset=ss,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=vo,G.zoneName=bo,G.dates=M("dates accessor is deprecated. Use date instead.",Br),G.months=M("months accessor is deprecated. Use month instead",br),G.years=M("years accessor is deprecated. Use year instead",We),G.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qi),G.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ns);function _o(e){return Le(e*1e3)}function wo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=fe,Pe.longDateFormat=ze,Pe.invalidDate=b,Pe.ordinal=A,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=ie,Pe.set=E,Pe.eras=Us,Pe.erasParse=qs,Pe.erasConvertYear=Js,Pe.erasAbbrRegex=eo,Pe.erasNameRegex=Zs,Pe.erasNarrowRegex=to,Pe.months=En,Pe.monthsShort=An,Pe.monthsParse=In,Pe.monthsRegex=Ln,Pe.monthsShortRegex=zn,Pe.week=Vn,Pe.firstDayOfYear=Bn,Pe.firstDayOfWeek=$n,Pe.weekdays=ti,Pe.weekdaysMin=ri,Pe.weekdaysShort=ai,Pe.weekdaysParse=ii,Pe.weekdaysRegex=ui,Pe.weekdaysShortRegex=ci,Pe.weekdaysMinRegex=di,Pe.isPM=fi,Pe.meridiem=gi;function fa(e,t,r,n){var u=Mt(),S=m().set(n,t);return u[r](S,e)}function Jr(e,t,r){if(o(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,u=[];for(n=0;n<12;n++)u[n]=fa(e,n,r,"month");return u}function Ka(e,t,r,n){typeof e=="boolean"?(o(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,o(t)&&(r=t,t=void 0),t=t||"");var u=Mt(),S=e?u._week.dow:0,L,ne=[];if(r!=null)return fa(t,(r+S)%7,n,"day");for(L=0;L<7;L++)ne[L]=fa(t,(L+S)%7,n,"day");return ne}function Mo(e,t){return Jr(e,t,"months")}function xo(e,t){return Jr(e,t,"monthsShort")}function So(e,t,r){return Ka(e,t,r,"weekdays")}function Do(e,t,r){return Ka(e,t,r,"weekdaysShort")}function ko(e,t,r){return Ka(e,t,r,"weekdaysMin")}Ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),l.lang=M("moment.lang is deprecated. Use moment.locale instead.",Ot),l.langData=M("moment.langData is deprecated. Use moment.localeData instead.",Mt);var xt=Math.abs;function Yo(){var e=this._data;return this._milliseconds=xt(this._milliseconds),this._days=xt(this._days),this._months=xt(this._months),e.milliseconds=xt(e.milliseconds),e.seconds=xt(e.seconds),e.minutes=xt(e.minutes),e.hours=xt(e.hours),e.months=xt(e.months),e.years=xt(e.years),this}function Gr(e,t,r,n){var u=mt(t,r);return e._milliseconds+=n*u._milliseconds,e._days+=n*u._days,e._months+=n*u._months,e._bubble()}function Oo(e,t){return Gr(this,e,t,1)}function jo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,u,S,L,ne,pe;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kr(Xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,u=st(e/1e3),n.seconds=u%60,S=st(u/60),n.minutes=S%60,L=st(S/60),n.hours=L%24,t+=st(L/24),pe=st(Xr(t)),r+=pe,t-=Kr(Xa(pe)),ne=st(r/12),r%=12,n.days=t,n.months=r,n.years=ne,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function Co(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Xr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function St(e){return function(){return this.as(e)}}var Qr=St("ms"),No=St("s"),Po=St("m"),Eo=St("h"),Ao=St("d"),Ro=St("w"),Io=St("M"),Fo=St("Q"),zo=St("y"),Lo=Qr;function Wo(){return mt(this)}function Vo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=At("milliseconds"),$o=At("seconds"),Bo=At("minutes"),Uo=At("hours"),qo=At("days"),Jo=At("months"),Go=At("years");function Ko(){return st(this.days()/7)}var Dt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xo(e,t,r,n,u){return u.relativeTime(t||1,!!r,e,n)}function Qo(e,t,r,n){var u=mt(e).abs(),S=Dt(u.as("s")),L=Dt(u.as("m")),ne=Dt(u.as("h")),pe=Dt(u.as("d")),je=Dt(u.as("M")),at=Dt(u.as("w")),kt=Dt(u.as("y")),Tt=S<=r.ss&&["s",S]||S<r.s&&["ss",S]||L<=1&&["m"]||L<r.m&&["mm",L]||ne<=1&&["h"]||ne<r.h&&["hh",ne]||pe<=1&&["d"]||pe<r.d&&["dd",pe];return r.w!=null&&(Tt=Tt||at<=1&&["w"]||at<r.w&&["ww",at]),Tt=Tt||je<=1&&["M"]||je<r.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Tt[2]=t,Tt[3]=+e>0,Tt[4]=n,Xo.apply(null,Tt)}function Zo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function el(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function tl(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,u,S;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),u=this.localeData(),S=Qo(this,!r,n,u),r&&(S=u.pastFuture(+this,S)),u.postformat(S)}var Qa=Math.abs;function Ut(e){return(e>0)-(e<0)||+e}function ma(){if(!this.isValid())return this.localeData().invalidDate();var e=Qa(this._milliseconds)/1e3,t=Qa(this._days),r=Qa(this._months),n,u,S,L,ne=this.asSeconds(),pe,je,at,kt;return ne?(n=st(e/60),u=st(n/60),e%=60,n%=60,S=st(r/12),r%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",je=Ut(this._months)!==Ut(ne)?"-":"",at=Ut(this._days)!==Ut(ne)?"-":"",kt=Ut(this._milliseconds)!==Ut(ne)?"-":"",pe+"P"+(S?je+S+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(u||n||e?"T":"")+(u?kt+u+"H":"")+(n?kt+n+"M":"")+(e?kt+L+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=qi,Te.abs=Yo,Te.add=Oo,Te.subtract=jo,Te.as=Co,Te.asMilliseconds=Qr,Te.asSeconds=No,Te.asMinutes=Po,Te.asHours=Eo,Te.asDays=Ao,Te.asWeeks=Ro,Te.asMonths=Io,Te.asQuarters=Fo,Te.asYears=zo,Te.valueOf=Lo,Te._bubble=To,Te.clone=Wo,Te.get=Vo,Te.milliseconds=Ho,Te.seconds=$o,Te.minutes=Bo,Te.hours=Uo,Te.days=qo,Te.weeks=Ko,Te.months=Jo,Te.years=Go,Te.humanize=tl,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),ae("x",bt),ae("X",gt),Ee("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,t,r){r._d=new Date(Se(e))});//! moment.js
|
|
65
|
+
return l.version="2.30.1",V(Le),l.fn=G,l.min=Hi,l.max=$i,l.now=Bi,l.utc=m,l.unix=_o,l.months=Mo,l.isDate=c,l.locale=Ot,l.invalid=j,l.duration=mt,l.isMoment=C,l.weekdays=So,l.parseZone=wo,l.localeData=Mt,l.isDuration=la,l.monthsShort=xo,l.weekdaysMin=ko,l.defineLocale=za,l.updateLocale=_i,l.locales=wi,l.weekdaysShort=Do,l.normalizeUnits=de,l.relativeTimeRounding=Zo,l.relativeTimeThreshold=el,l.calendarFormat=gs,l.prototype=G,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l}))})(ga)),ga.exports}var tc=ir.exports,dn;function ac(){return dn||(dn=1,(function(f,i){(function(g,l){l(typeof Ca=="function"?fr():g.moment)})(tc,(function(g){//! moment.js locale configuration
|
|
66
|
+
var l=g.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return l}))})()),ir.exports}ac();var sr={exports:{}},rc=sr.exports,hn;function nc(){return hn||(hn=1,(function(f,i){(function(g,l){l(typeof Ca=="function"?fr():g.moment)})(rc,(function(g){//! moment.js locale configuration
|
|
67
|
+
var l=g.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(V){var B=V%10,X=~~(V%100/10)===1?"th":B===1?"st":B===2?"nd":B===3?"rd":"th";return V+X},week:{dow:1,doy:4}});return l}))})()),sr.exports}nc();var or={exports:{}},ic=or.exports,fn;function sc(){return fn||(fn=1,(function(f,i){(function(g,l){l(typeof Ca=="function"?fr():g.moment)})(ic,(function(g){//! moment.js locale configuration
|
|
68
|
+
function l(B,X,s,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[B+" Tage",B+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[B+" Monate",B+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[B+" Jahre",B+" Jahren"]};return X?a[s][0]:a[s][1]}var V=g.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:l,mm:"%d Minuten",h:l,hh:"%d Stunden",d:l,dd:l,w:l,ww:"%d Wochen",M:l,MM:l,y:l,yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return V}))})()),or.exports}sc();const Nt=f=>{let i="";return f.split(":").forEach(g=>{i+=g}),parseInt(i)},mn=f=>f.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=f=>{const i=f.address;if(f.addresstype==="county"&&i.country)return i.county;if(f.addresstype==="village"&&i.village)return i.village;const g=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach(B=>{i.hasOwnProperty(B)&&i[B]&&g.push(i[B])}),i.road?g.push(i.road):i.pedestrian?g.push(i.pedestrian):i.suburb?g.push(i.suburb):i.square?g.push(i.square):(i.neighbourhood&&g.push(i.neighbourhood),i.hamlet?g.push(i.hamlet):i.isolated_dwelling?g.push(i.isolated_dwelling):i.locality?g.push(i.locality):i.croft&&g.push(i.croft)),i.house_number&&g.push(i.house_number),i.postcode&&g.push(i.postcode),i.village&&g.push(i.village),i.town?g.push(i.town):i.city&&g.push(i.city);var V=g.join(", ").substr(0,150);return V};function aa(f){let i=window.sessionStorage.getItem(f);if(i!==null){let g=JSON.parse(i);if(new Date(g.expirationDate)>new Date)return g.value;window.sessionStorage.removeItem(f)}return null}function oc(f,i,g){let l=g?new Date(g*1e3):null;if(l){let V={value:i,expirationDate:l.toISOString()};window.sessionStorage.setItem(f,JSON.stringify(V))}}function pn({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState(),[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(null),[m,T]=q.useState(null),[v,D]=q.useState(null),[O,j]=q.useState(null),[R,N]=q.useState({}),[k,y]=q.useState(null),[C,_]=q.useState(!1),[M,z]=q.useState([]),[H,F]=q.useState(!1),E=q.useRef(),$=f.calendarId;he.locale(l.language);const J=Y=>{let A=he(Y).format("YYYY-MM-DD");fetch(Q(A)).then(I=>I.json()).then(I=>{let te=fe(Y||new Date);const ie=I.filter(Ae=>Ae.available==!0);ie.length===0&&P();let de=[];te.forEach(Ae=>{I.some($e=>$e.date===Ae&&$e.available==!0)?de.push({available:!0,date:Ae}):de.push({available:!1,date:Ae})});const me=de.map(Ae=>{if(Ae.available===!1)return he(Ae.date,"YYYY-MM-DD").toDate()});s(me);const Me=ie.length?ie[0].date:Y;re(Me)}).catch(I=>console.error(I))},re=Y=>{j(null),D(null),a([]);let A=he(Y).format("YYYY-MM-DD");fetch(ue(A)).then(I=>I.json()).then(I=>{const te=I.filter(ie=>ie.availability==!0);N(te[0]),te.length>0?(a(I),c(!1),D(he(Y).format("L")),B(he(Y,"YYYY-MM-DD").toDate())):(I.length>0&&B(he(I[0].date,"YYYY-MM-DD").toDate()),a([]),P())})},ee=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(f.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let Y=[];i.dataValue.map(A=>{Y.push({...A,date:he(A.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),z(Y)}}else if(!f.multiple&&typeof i.dataValue=="object"){const Y={date:i.dataValue.date,slot:i.dataValue.slot},A={...i.dataValue,date:he(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};z([A]),y(Y)}else{let Y=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),A=Y[2].split("#");const I={date:he(Y[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:Y[1]};f.multiple?(g([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}]),z([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])):(g({date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}),z([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])),y(I)}};q.useEffect(()=>{var Y;(Y=window.FormioInstance)==null||Y.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=Y=>{let I=he(Y,"YYYY-MM").daysInMonth(),te=[];for(;I;){let ie=he(Y).date(I);te.push(ie.format("YYYY-MM-DD")),I--}return te},Q=(Y,A=!1)=>{let I=f.calendarId,te=f.select_opening_hours,ie=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${I}/availabilities`,me=[`from_time=${he(Y).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(Y).endOf("month").format("YYYY-MM-DD")}`];return A&&me.push(`available=${A}`),te&&ie&&me.push(`opening_hours=${ie.join()}`),`${de}?${me.join("&")}`},ue=(Y,A=!1)=>{let I=f.calendarId,te=f.select_opening_hours,ie=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");const de=he(Y).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${I}/availabilities/${de}`,Me=[];return A&&Me.push(`available=${A}`),te&&ie&&Me.push(`opening_hours=${ie.join()}`),Me&&(me=`${me}?${Me.join("&")}`),me},se=Y=>{J(Y)},ye=Y=>{setTimeout(()=>{_(!C)},1e3),re(Y)},ce=Y=>{j(null),setTimeout(()=>{Y&&(T(Y.target.dataset),j(Y.target.id))},300)},Z=Y=>{p(null);let A=`${Fe()}/it/meetings/new-draft`,I={date:m!=null&&m.date?he(m==null?void 0:m.date).format("DD-MM-YYYY"):he(Y.target.dataset.date).format("DD-MM-YYYY"),slot:m!=null&&m.value_start&&(m!=null&&m.value_end)?m.value_start+"-"+m.value_end:Y.target.dataset.slots,calendar:f.calendarId,opening_hour:m!=null&&m.opening_hour?m==null?void 0:m.opening_hour:Y.target.dataset.opening_hour,meeting:d?d.id:"",first_available_date:R.date,first_available_start_time:R.start_time,first_available_end_time:R.end_time,first_availability_updated_at:he().format()};fetch(A,{method:"POST",body:JSON.stringify(I),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(l.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const ie={date:I.date,slot:I.slot,calendar_id:I.calendar[0],opening_hour_id:I.opening_hour||I.opening_hour_id,meeting_id:te.id};z([...M,ie])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{m&&(Z(),_(!C))},Ne=()=>h.jsx("span",{children:l.t("Tempo prenotazione scaduto!")}),be=({minutes:Y,seconds:A,completed:I})=>I?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[l.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[Y," ",l.t("minuti")," ",A," ",l.t("secondi")]})]})]})}),Ce=Y=>{const A=Nt(Y.target.value),I=Nt(Y.target.min),te=Nt(Y.target.max);A<I||A>te||A>Nt(m.end)?(Je.fire({title:"",html:`<p>${l.t("l'orario")} <b>${mn(A)}</b> ${l.t("non è valido")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):T({...m,value_start:Y.target.value})},Re=Y=>{const A=Nt(Y.target.value),I=Nt(Y.target.min),te=Nt(Y.target.max);A<I||A>te||A<Nt(m.start)?(Je.fire({title:"",html:`<p>${l.t("l'orario")} <b>${mn(A)}</b> ${l.t("non è valido")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):T({...m,value_end:Y.target.value})},ze=Y=>{if(Y===null||Y==="")g("");else if(Array.isArray(Y)&&Y.length>0){let A=[];M.map(I=>{A.push({date:he(I.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:I.slot,calendar_id:I.calendar_id||I.calendar[0],meeting_id:I.meeting_id,opening_hour_id:I.opening_hour||I.opening_hour_id})}),f.multiple?g(A):g(A[0])}else g("")},P=()=>{c(!0),p(null),D(null),ze(null)},b=()=>{if(l.language==="it")return Yn;if(l.language==="en")return kn;if(l.language==="de")return Dn};q.useEffect(()=>{ze(M)},[M]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&H===!1?(F(!0),setTimeout(()=>{ee()},1e3)):(F(!1),setTimeout(()=>{ee()},1e3))},[]);const W=(Y,A)=>{let I=`${Fe()}/api/meetings/${A.meeting_id}`;fetch(I,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const ie=[...M.slice(0,Y),...M.slice(Y+1)];z(ie),J(new Date)}})};return h.jsxs(h.Fragment,{children:[H&&k?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(k)&&k.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(k)?k.map(Y=>h.jsx(pn,{day:he(Y.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:Y.slot})):h.jsx(pn,{day:he(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:k.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[f.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:b(),disabled:X,onMonthChange:se,onDayClick:ye}),h.jsx("p",{children:l.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):M.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:b(),disabled:X,onMonthChange:se,onDayClick:ye}),h.jsxs("p",{children:[" ",l.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:M.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[M.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:M.map((Y,A)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[Y.date," ",m||Y.slot?`${l.t("alle")} ${Y.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>W(A,Y),role:"button"})]})})},"li"+A))})})}),d?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(Mn,{date:d.expiration_time,renderer:be})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:C,toggle:()=>_(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>_(!C),id:"daySelected",children:l.t("Seleziona una fascia oraria")}),o?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",l.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[M.length>=1?h.jsxs("div",{children:[v&&!o?h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",l.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:o,children:M[M.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&M.length>=1?h.jsx("h6",{children:l.t("Seleziona altri orari")}):o?null:h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((Y,A)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+A,onClick:ce,ref:E,className:O==="slot-"+A?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":Y.date,"data-start":Y.start_time,"data-end":Y.end_time,"data-value_start":Y.start_time,"data-value_end":Y.end_time,"data-slots":Y.start_time+"-"+Y.end_time,"data-opening_hour":Y.opening_hour,"data-min_duration":Y.min_duration,disabled:Y.slots_available==0,children:[Y.start_time," - ",Y.end_time]})},"slot-"+A)),o?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),l.t("Attenzione")]}),h.jsxs("p",{children:[" ",l.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:m!=null&&m.value_start&&O?h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-12 mb-3",children:h.jsx("p",{className:"mb-3",children:h.jsx("b",{children:l.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:l.t("Dalle"),className:"active",defaultValue:m.value_start||m.start,min:m.start,max:m.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:l.t("alle"),className:"active",defaultValue:m.value_end||m.end,onBlur:Re,min:m.start,max:m.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(m!=null&&m.value_start),children:l.t("Conferma")})})]})]})};var It;let On=(It=class extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),l=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=l[1],this.meeting_expiration_time=null,this.opening_hour=l.length===3?l[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ct(It,"editForm",fl),It);const uc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
69
69
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
70
70
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
71
71
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -96,12 +96,12 @@ if(data.calendarId && data.api_url){
|
|
|
96
96
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function cc(...y){return ot.Components.baseEditForm([{key:"display",components:uc}],...y)}function gn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=b=>{let V=fe(b).format("YYYY-MM-DD");fetch(Z(V)).then(k=>k.json()).then(k=>{let E=he(b||new Date);const F=k.filter(me=>me.available==!0);F.length===0&&Re();let se=[];E.forEach(me=>{k.some(xe=>xe.date===me&&xe.available==!0)?se.push({available:!0,date:me}):se.push({available:!1,date:me})});const be=se.map(me=>{if(me.available===!1)return fe(me.date,"YYYY-MM-DD").toDate()});o(be);const de=F.length?F[0].date:b;ie(de)}).catch(k=>console.error(k))},ie=b=>{O(null),D(null),a([]);let V=fe(b).format("YYYY-MM-DD");fetch(ue(V)).then(k=>k.json()).then(k=>{const E=k.filter(F=>F.availability==!0);N(E[0]),E.length>0?(a(k),u(!1),D(fe(b).format("L")),$(fe(b,"YYYY-MM-DD").toDate())):(k.length>0&&$(fe(k[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let b=[];i.dataValue.map(V=>{b.push({...V,date:fe(V.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(b)}}else if(!y.multiple&&typeof i.dataValue=="object"){const b={date:i.dataValue.date,slot:i.dataValue.slot},V={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([V]),v(b)}else{let b=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),V=b[2].split("#");const k={date:fe(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};y.multiple?(g([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}]),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])):(g({date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])),v(k)}};q.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=b=>{let k=fe(b,"YYYY-MM").daysInMonth(),E=[];for(;k;){let F=fe(b).date(k);E.push(F.format("YYYY-MM-DD")),k--}return E},Z=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let se=`${Fe()}/api/calendars/${k}/availabilities`,be=[`from_time=${fe(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(b).endOf("month").format("YYYY-MM-DD")}`];return V&&be.push(`available=${V}`),E&&F&&be.push(`opening_hours=${F.join()}`),`${se}?${be.join("&")}`},ue=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const se=fe(b).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${k}/availabilities/${se}`,de=[];return V&&de.push(`available=${V}`),E&&F&&de.push(`opening_hours=${F.join()}`),de&&(be=`${be}?${de.join("&")}`),be},ae=b=>{J(b)},ye=b=>{setTimeout(()=>{L(!T)},1e3),ie(b)},ce=b=>{O(null),setTimeout(()=>{b&&(j(b.target.dataset),O(b.target.id))},300)},Q=b=>{p(null);let V=`${Fe()}/it/meetings/new-draft`,k={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(b.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:b.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:b.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(V,{method:"POST",body:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(E=>{if(!E.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return E.json()}).then(E=>{p(E);const F={date:k.date,slot:k.slot,calendar_id:k.calendar[0],opening_hour_id:k.opening_hour||k.opening_hour_id,meeting_id:E.id};P([...m,F])}).catch(E=>{console.log(E),Je.fire({title:"",html:"<p>"+E+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:b,seconds:V,completed:k})=>k?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[b," ",d.t("minuti")," ",V," ",d.t("secondi")]})]})]})}),Ce=b=>{if(b===null||b==="")g("");else if(Array.isArray(b)&&b.length>0){let V=[];m.map(k=>{V.push({date:fe(k.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k.slot,calendar_id:k.calendar_id||k.calendar[0],meeting_id:k.meeting_id,opening_hour_id:k.opening_hour||k.opening_hour_id})}),y.multiple?g(V):g(V[0])}else g("")},Re=()=>{u(!0),p(null),D(null),Ce(null)},ze=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{Ce(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const C=(b,V)=>{let k=`${Fe()}/api/meetings/${V.meeting_id}`;fetch(k,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(E=>{if(E&&E.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const F=[...m.slice(0,b),...m.slice(b+1)];P(F),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(b=>h.jsx(gn,{day:fe(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:b.slot})):h.jsx(gn,{day:Ye(S.date).format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ae,onDayClick:ye})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ae,onDayClick:ye})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((b,V)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[b.date," ",f||b.slot?`${d.t("alle")} ${b.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>C(V,b),role:"button"})]})})},"li"+V))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((b,V)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+V,onClick:ce,ref:A,className:Y==="slot-"+V?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+V)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:ka.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let ba=ka;const hc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function fc(...y){return ot.Components.baseEditForm([{key:"display",components:hc}],...y)}function mc({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text-paragraph pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(y,i){if(!i||i.length===0)return;const g=i.map(X=>{const o=new Date(X.start);return(new Date(X.end)-o)/6e4}),d=Math.min(...g),z=g.reduce((X,o)=>X+o,0)/g.length;let $=0;d<=30&&d>15?$=z*1:d<=15?$=z*24:$=z*4,y.setOption("slotHeight",$),document.documentElement.style.setProperty("--slot-height",`${$}px`)}const jn={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(y,i,g)=>{const d={data:g,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(d)),console.log(`✅ Cache salvato: ${y}`)},tr=(y,i)=>{try{const g=sessionStorage.getItem(i);if(!g)return null;const d=JSON.parse(g),z=Ye().diff(Ye(d.timestamp),"minutes");return z>jn[y].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${y}`),null):(console.log(`✅ Cache letto: ${y} (${z} minuti fa)`),d.data)}catch(g){return console.error(`Errore nel leggere il cache (${y}):`,g),null}},ar=(y,...i)=>jn[y].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(y,i)=>{try{sessionStorage.setItem(mr,y),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(g){console.error("Errore nel salvare lo stato della view:",g)}},yc=()=>{try{const y=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:y||"timeGridWeek",date:i?new Date(i):new Date}}catch(y){return console.error("Errore nel leggere lo stato della view:",y),{viewType:"timeGridWeek",date:new Date}}},Tn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(y){console.error("Errore nel pulire lo stato della view:",y)}},yn=cr.Formio.Components.components.field,vc=({component:y,current:i,onChange:g,i18next:d})=>{var Re,ze;const[z,$]=q.useState(null),[X,o]=q.useState(null),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(!1),[f,j]=q.useState(null),[_,D]=q.useState([]),[Y,O]=q.useState([]),[I,N]=q.useState([]),[S,v]=q.useState(null),[T,L]=q.useState(null),[m,P]=q.useState(null),B=q.useRef(null),R=q.useRef(null);d.language,fe.locale(d.language),Ye.locale(d.language);function A(C){if(!C||C.length===0)return null;const b=C.map(E=>({start:E.start_time,end:E.end_time})),V=b.reduce((E,F)=>F.start<E?F.start:E,b[0].start),k=b.reduce((E,F)=>F.end>E?F.end:E,b[0].end);return{earliestStartTime:V,latestEndTime:k}}function H(C){const b=C.map(E=>fe(E.date).isoWeekday()),k=[1,2,3,4,5,6,7].filter(E=>!b.includes(E));k.length>0?R.current.setOption("hiddenDays",k):R.current.setOption("hiddenDays",[])}function J(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}/${b}/${V}`;return`${k.origin}${F}${k.search}`}function ie(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}`;return`${k.origin}${F}${k.search}&from_to=${b}&to_date=${V}`}function ee(C,b,V){return`${Fe()}/api/availabilities/${C}/${b}?calendar_ids=${V}&available=true`}const he=C=>{N([]),O([]),g({}),C&&O(z.filter(b=>b.date.startsWith(C)))},Z=async(C,b)=>{const V=JSON.parse(C),k=ar("SLOTS",V.date,V.calendar_ids);if(b==="manual")N([]),P(null),j(null),g({});else{const E=tr("SLOTS",k);if(E){N(E);return}}try{const E=await window.FormioHelper.anonymousCall(`availabilities/${V.date}?calendar_ids=${V.calendar_ids}`);er("SLOTS",k,E.data),N(E.data)}catch(E){console.error("Errore nel caricamento degli slot:",E),Je.fire({icon:"error",title:d.t("Errore"),text:d.t("Errore nel caricamento degli orari")})}},ue=C=>{var k,E,F,te,se,be,de,me;const b=JSON.parse(C),V={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${b.date}T${b.start_time}`).toISOString(),to_time:Ye(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(E=(k=i==null?void 0:i.data)==null?void 0:k.service_data)==null?void 0:E.id,calendar_group_office_id:(te=(F=i==null?void 0:i.data)==null?void 0:F.user_group)==null?void 0:te.id,calendar_group_place_id:(be=(se=i==null?void 0:i.data)==null?void 0:se.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(me=i==null?void 0:i.dataValue)!=null&&me.id?`meetings/${i.dataValue.id}`:"meetings",V).then(xe=>{j({day:Ye(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),g(xe!=null&&xe.id?xe:xe?{...xe,id:i.dataValue.id}:i.dataValue.id?{...V,id:i.dataValue.id}:{...V})}).catch(xe=>{var Ae,$e;console.error(xe),xe.status===400&&(($e=(Ae=xe==null?void 0:xe.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+xe+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ae=C=>{const b=new Set,V=[];return C.forEach(k=>{const E=Ye(k.date),F=E.format("YYYY-MM");b.has(F)||(b.add(F),V.push({value:F,label:E.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),V},ye=async()=>{var se,be,de,me,xe,Ae,$e,Ie,Ge,Qe;const C=(de=(be=(se=i==null?void 0:i.root)==null?void 0:se.data)==null?void 0:be.place)!=null&&de.merge_availabilities?(Ae=(xe=(me=i==null?void 0:i.root)==null?void 0:me.data)==null?void 0:xe.place)==null?void 0:Ae.merged_availabilities_link:null,b=fe().format("YYYY-MM-DD"),V=fe().add(1,"month").format("YYYY-MM-DD"),k=((Qe=(Ge=(Ie=($e=i==null?void 0:i.root)==null?void 0:$e.data)==null?void 0:Ie.place)==null?void 0:Ge.calendars[0])==null?void 0:Qe.id)||null,E=C?ie(C,b,V):ee(b,V,k),F=ar("AVAILABILITY",E),te=tr("AVAILABILITY",F);if(te){$(te),D(ae(te));return}else g({});u(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(E);if(u(!1),!(ge!=null&&ge.length)){Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}er("AVAILABILITY",F,ge),$(ge),D(ae(ge))}catch(ge){u(!1),console.error("Errore nel caricamento disponibilità:",ge)}};q.useEffect(()=>{if(z!=null&&z.length){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(C!=null&&C.from_time&&(C!=null&&C.to_time)&&!Ye().isAfter(C==null?void 0:C.draft_expiration)){const b=Ye(C.from_time).format("YYYY-MM");v(b),b&&O&&(O(z.filter(V=>V.date.startsWith(b))),L(Ye(C.from_time).format("YYYY-MM-DD")))}else C!=null&&C.draft_expiration&&Ye().isAfter(C==null?void 0:C.draft_expiration)&&Je.fire({icon:"warning",title:d.t("warning"),html:d.t("expired_meeting")})}},[z]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!_.length||S||C!=null&&C.from_time||C!=null&&C.to_time)return;const b=_[0];b&&(v(b.value),he(b.value))},[_,S,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(T&&c===!1){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Z(JSON.stringify({date:T,calendar_ids:C.calendar.id}))}},[T]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const C=()=>{const b=R.current;if(!b)return;const V=ce(),k=b.getView().type;V!==k&&b.setOption("view",V)};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());I!=null&&I.length&&(C!=null&&C.from_time)&&(P(Ye(C.from_time).format("HH:mm")+" - "+Ye(C.to_time).format("HH:mm")),j({day:Ye(C.from_time).format("dddd D MMM YYYY"),startDate:Ye(C.from_time).format("HH:mm"),endDate:Ye(C.to_time).format("HH:mm")}))},[I]);const Q=()=>{const C=yc();R.current=Zr.createCalendar(B.current,[Zr.TimeGrid],{events:[],buttonText:{today:d.t("Oggi")},allDaySlot:!1,firstDay:1,date:C.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{gc(b.view.type,b.start)},eventClick({event:b,el:V}){var de,me,xe,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),V.classList.add("highlighted-event");const k=new Date(b.start),E=new Date(b.end),F=k.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=k.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),se=E.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:k,to_time:E,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ae=(xe=i==null?void 0:i.data)==null?void 0:xe.user_group)==null?void 0:Ae.id,calendar_group_place_id:(Ie=($e=i==null?void 0:i.data)==null?void 0:$e.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Ge=i==null?void 0:i.dataValue)!=null&&Ge.id?"PATCH":"POST",(Qe=i==null?void 0:i.dataValue)!=null&&Qe.id?`meetings/${i.dataValue.id}`:"meetings",be).then(ge=>{var Ze;let we;!ge||ge===""?we={...be,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ge=="object"&&(we=ge),j({day:F,startDate:te,endDate:se}),g(we)}).catch(ge=>{var we,Ze;console.error(ge),ge.status===400&&((Ze=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:V,el:k}=b,E=V.extendedProps;k.setAttribute("data-event-id",V.id+"-"+E.date+"-"+E.start_time)},loading:b=>{u(b)}})},ve=C=>{var b,V;(V=(b=i==null?void 0:i.root)==null?void 0:b.data)!=null&&V.place&&R.current.setOption("eventSources",[{events:Ne}])};async function Ne(C,b,V){var k,E,F,te,se,be;try{R.current.setOption("events",[]);const de=fe(C.start).format("YYYY-MM-DD"),me=new Date(C.end);me.setDate(me.getDate()-1);const xe=fe(me).format("YYYY-MM-DD"),Ae=null,$e=(F=(E=(k=i==null?void 0:i.root)==null?void 0:k.data)==null?void 0:E.place)!=null&&F.merge_availabilities?(be=(se=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:se.place)==null?void 0:be.merged_availabilities_link:null,Ie=$e?J($e,de,xe):ee(de,xe,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ge;if(Qe?(ge=Qe,u(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ge)),!(ge!=null&&ge.length)){b([]),Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Ze=A(ge);R.current.setOption("slotMinTime",Ze.earliestStartTime),R.current.setOption("slotMaxTime",Ze.latestEndTime),H(ge),pc(R.current,we),b(we),setTimeout(()=>{_e(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),V==null||V(de)}}q.useEffect(()=>{let C,b=!1;async function V(){var k,E,F,te,se;try{if(await((k=window.FormioInstance)==null?void 0:k.formReady),b)return;if(!B.current){console.warn("Elemento calendario non trovato");return}const be=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());be&&(be!=null&&be.draft_expiration)&&Ye().isAfter(be.draft_expiration)&&(g({}),Tn()),((F=(E=i==null?void 0:i.data)==null?void 0:E.service_data)==null?void 0:F.view_type)==="calendar"?R!=null&&R.current||Q():((se=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:se.view_type)==="select"?ye():alert(d.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return C=setTimeout(V,500),()=>{var k,E;b=!0,C&&clearTimeout(C),R.current&&((E=(k=B.current)==null?void 0:k.destroy)==null||E.call(k),R.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function _e(C){const b=i==null?void 0:i.dataValue;if(!(b!=null&&b.from_time))return;const V=Ye(b.from_time).format("DD-MM-YYYY HH:mm"),k=Ye(b.to_time).format("DD-MM-YYYY HH:mm"),E=C.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===V&&Ye(te.end).format("DD-MM-YYYY HH:mm")===k);if(!E)return;const F=document.querySelector(`.ec-event[data-event-id="${E.id}-${Ye(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Ye(b==null?void 0:b.from_time).format("HH:mm")}"]`);F&&(F.classList.add("highlighted-event"),F.scrollIntoView({behavior:"smooth",block:"center"}),j({day:Ye(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(b==null?void 0:b.from_time).format("HH:mm"),endDate:Ye(b==null?void 0:b.to_time).format("HH:mm")}))}const Ce=({day:C,startDate:b,endDate:V})=>h.jsx("div",{className:"mt-3",children:h.jsxs("div",{className:"row align-items-center gy-3",children:[h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:C})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[b," - ",V]})})]})]})});return q.useEffect(()=>{var C,b,V,k;document.querySelector(".formio-read-only")&&c===!1?p(!0):(((b=(C=i==null?void 0:i.data)==null?void 0:C.service_data)==null?void 0:b.view_type)==="select"?ye():((k=(V=i==null?void 0:i.data)==null?void 0:V.service_data)==null?void 0:k.view_type)==="calendar"&&Q(),p(!1))},[]),q.useEffect(()=>{c&&setTimeout(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",C,c),C&&o(C)},500)},[c]),h.jsx(h.Fragment,{children:c&&X?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:h.jsx(mc,{day:Ye(X.from_time).format("dddd D MMM YYYY"),i18next:d,slot:`${Ye(X.from_time).format("HH:mm")} - ${Ye(X.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:B}),_.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:he,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),_.map(C=>h.jsx("option",{value:C.value,selected:C.value===S,children:C.label},C.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:C=>Z(C,"manual"),disabled:Y.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),Y.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.date===T,children:Ye(C.date).format("dddd,DD MMMM YYYY")},C.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:I.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),I.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.start_time+" - "+C.end_time===m,children:C.start_time+" - "+C.end_time},C.start_time+" - "+C.end_time))]})]}):null,f?Ce({day:f.day,startDate:f.startDate,endDate:f.endDate}):null,s?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(le.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ya.schema()}}static schema(){return yn.schema({type:"calendar-advanced"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Ya,"editForm",fc);let wa=Ya;const _c=[{key:"defaultValue",ignore:!0}],bc=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],wc=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
99
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function cc(...f){return ot.Components.baseEditForm([{key:"display",components:uc}],...f)}function gn({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState(),[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(null),[m,T]=q.useState(null),[v,D]=q.useState(null),[O,j]=q.useState(null),[R,N]=q.useState({}),[k,y]=q.useState(null),[C,_]=q.useState(!1),[M,z]=q.useState([]),[H,F]=q.useState(!1),E=q.useRef(),$=f.calendarId;he.locale(l.language);const J=b=>{let W=he(b).format("YYYY-MM-DD");fetch(Q(W)).then(Y=>Y.json()).then(Y=>{let A=fe(b||new Date);const I=Y.filter(me=>me.available==!0);I.length===0&&Re();let ie=[];A.forEach(me=>{Y.some(Me=>Me.date===me&&Me.available==!0)?ie.push({available:!0,date:me}):ie.push({available:!1,date:me})});const _e=ie.map(me=>{if(me.available===!1)return he(me.date,"YYYY-MM-DD").toDate()});s(_e);const de=I.length?I[0].date:b;re(de)}).catch(Y=>console.error(Y))},re=b=>{j(null),D(null),a([]);let W=he(b).format("YYYY-MM-DD");fetch(ue(W)).then(Y=>Y.json()).then(Y=>{const A=Y.filter(I=>I.availability==!0);N(A[0]),A.length>0?(a(Y),c(!1),D(he(b).format("L")),B(he(b,"YYYY-MM-DD").toDate())):(Y.length>0&&B(he(Y[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(f.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let b=[];i.dataValue.map(W=>{b.push({...W,date:he(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),z(b)}}else if(!f.multiple&&typeof i.dataValue=="object"){const b={date:i.dataValue.date,slot:i.dataValue.slot},W={...i.dataValue,date:he(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};z([W]),y(b)}else{let b=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=b[2].split("#");const Y={date:he(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};f.multiple?(g([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),z([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(g({date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),z([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),y(Y)}};q.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=b=>{let Y=he(b,"YYYY-MM").daysInMonth(),A=[];for(;Y;){let I=he(b).date(Y);A.push(I.format("YYYY-MM-DD")),Y--}return A},Q=(b,W=!1)=>{let Y=f.calendarId,A=f.select_opening_hours,I=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");let ie=`${Fe()}/api/calendars/${Y}/availabilities`,_e=[`from_time=${he(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(b).endOf("month").format("YYYY-MM-DD")}`];return W&&_e.push(`available=${W}`),A&&I&&_e.push(`opening_hours=${I.join()}`),`${ie}?${_e.join("&")}`},ue=(b,W=!1)=>{let Y=f.calendarId,A=f.select_opening_hours,I=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");const ie=he(b).format("YYYY-MM-DD");let _e=`${Fe()}/api/calendars/${Y}/availabilities/${ie}`,de=[];return W&&de.push(`available=${W}`),A&&I&&de.push(`opening_hours=${I.join()}`),de&&(_e=`${_e}?${de.join("&")}`),_e},se=b=>{J(b)},ye=b=>{setTimeout(()=>{_(!C)},1e3),re(b)},ce=b=>{j(null),setTimeout(()=>{b&&(T(b.target.dataset),j(b.target.id))},300)},Z=b=>{p(null);let W=`${Fe()}/it/meetings/new-draft`,Y={date:m!=null&&m.date?he(m==null?void 0:m.date).format("DD-MM-YYYY"):he(b.target.dataset.date).format("DD-MM-YYYY"),slot:m!=null&&m.value_start&&(m!=null&&m.value_end)?m.value_start+"-"+m.value_end:b.target.dataset.slots,calendar:f.calendarId,opening_hour:m!=null&&m.opening_hour?m==null?void 0:m.opening_hour:b.target.dataset.opening_hour,meeting:d?d.id:"",first_available_date:R.date,first_available_start_time:R.start_time,first_available_end_time:R.end_time,first_availability_updated_at:he().format()};fetch(W,{method:"POST",body:JSON.stringify(Y),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(A=>{if(!A.ok)throw new Error(l.t("Intervallo selezionato non disponibile!"));return A.json()}).then(A=>{p(A);const I={date:Y.date,slot:Y.slot,calendar_id:Y.calendar[0],opening_hour_id:Y.opening_hour||Y.opening_hour_id,meeting_id:A.id};z([...M,I])}).catch(A=>{console.log(A),Je.fire({title:"",html:"<p>"+A+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{m&&(Z(),_(!C))},Ne=()=>h.jsx("span",{children:l.t("Tempo prenotazione scaduto!")}),be=({minutes:b,seconds:W,completed:Y})=>Y?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[l.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[b," ",l.t("minuti")," ",W," ",l.t("secondi")]})]})]})}),Ce=b=>{if(b===null||b==="")g("");else if(Array.isArray(b)&&b.length>0){let W=[];M.map(Y=>{W.push({date:he(Y.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:Y.slot,calendar_id:Y.calendar_id||Y.calendar[0],meeting_id:Y.meeting_id,opening_hour_id:Y.opening_hour||Y.opening_hour_id})}),f.multiple?g(W):g(W[0])}else g("")},Re=()=>{c(!0),p(null),D(null),Ce(null)},ze=()=>{if(l.language==="it")return Yn;if(l.language==="en")return kn;if(l.language==="de")return Dn};q.useEffect(()=>{Ce(M)},[M]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&H===!1?(F(!0),setTimeout(()=>{ee()},1e3)):(F(!1),setTimeout(()=>{ee()},1e3))},[]);const P=(b,W)=>{let Y=`${Fe()}/api/meetings/${W.meeting_id}`;fetch(Y,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(A=>{if(A&&A.status>400)Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const I=[...M.slice(0,b),...M.slice(b+1)];z(I),J(new Date)}})};return h.jsxs(h.Fragment,{children:[H&&k?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(k)&&k.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(k)?k.map(b=>h.jsx(gn,{day:he(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:b.slot})):h.jsx(gn,{day:Ye(k.date).format("DD/MM/YYYY"),i18next:l,slot:k.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[f.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:ze(),disabled:X,onMonthChange:se,onDayClick:ye})]})}):M.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:ze(),disabled:X,onMonthChange:se,onDayClick:ye})]})}):null,h.jsx("div",{className:"col-12",children:M.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[M.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:M.map((b,W)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[b.date," ",m||b.slot?`${l.t("alle")} ${b.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>P(W,b),role:"button"})]})})},"li"+W))})})}),d?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(Mn,{date:d.expiration_time,renderer:be})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:C,toggle:()=>_(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>_(!C),id:"daySelected",children:l.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[M.length>=1?h.jsxs("div",{children:[v&&!o?h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",l.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:o,children:M[M.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&M.length>=1?h.jsx("h6",{children:l.t("Seleziona altri orari")}):o?null:h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((b,W)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+W,onClick:ce,ref:E,className:O==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+W)),o?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),l.t("Attenzione")]}),h.jsxs("p",{children:[" ",l.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(m!=null&&m.value_start),children:l.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:ka.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),l=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=l[1],this.meeting_expiration_time=null,this.opening_hour=l.length===3?l[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let _a=ka;const hc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function fc(...f){return ot.Components.baseEditForm([{key:"display",components:hc}],...f)}function mc({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text-paragraph pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(f,i){if(!i||i.length===0)return;const g=i.map(X=>{const s=new Date(X.start);return(new Date(X.end)-s)/6e4}),l=Math.min(...g),V=g.reduce((X,s)=>X+s,0)/g.length;let B=0;l<=30&&l>15?B=V*1:l<=15?B=V*24:B=V*4,f.setOption("slotHeight",B),document.documentElement.style.setProperty("--slot-height",`${B}px`)}const jn={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(f,i,g)=>{const l={data:g,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(l)),console.log(`✅ Cache salvato: ${f}`)},tr=(f,i)=>{try{const g=sessionStorage.getItem(i);if(!g)return null;const l=JSON.parse(g),V=Ye().diff(Ye(l.timestamp),"minutes");return V>jn[f].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${f}`),null):(console.log(`✅ Cache letto: ${f} (${V} minuti fa)`),l.data)}catch(g){return console.error(`Errore nel leggere il cache (${f}):`,g),null}},ar=(f,...i)=>jn[f].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(f,i)=>{try{sessionStorage.setItem(mr,f),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(g){console.error("Errore nel salvare lo stato della view:",g)}},yc=()=>{try{const f=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:f||"timeGridWeek",date:i?new Date(i):new Date}}catch(f){return console.error("Errore nel leggere lo stato della view:",f),{viewType:"timeGridWeek",date:new Date}}},Tn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(f){console.error("Errore nel pulire lo stato della view:",f)}},yn=cr.Formio.Components.components.field,vc=({component:f,current:i,onChange:g,i18next:l})=>{var Re,ze;const[V,B]=q.useState(null),[X,s]=q.useState(null),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(!1),[m,T]=q.useState(null),[v,D]=q.useState([]),[O,j]=q.useState([]),[R,N]=q.useState([]),[k,y]=q.useState(null),[C,_]=q.useState(null),[M,z]=q.useState(null),H=q.useRef(null),F=q.useRef(null);l.language,he.locale(l.language),Ye.locale(l.language);function E(P){if(!P||P.length===0)return null;const b=P.map(A=>({start:A.start_time,end:A.end_time})),W=b.reduce((A,I)=>I.start<A?I.start:A,b[0].start),Y=b.reduce((A,I)=>I.end>A?I.end:A,b[0].end);return{earliestStartTime:W,latestEndTime:Y}}function $(P){const b=P.map(A=>he(A.date).isoWeekday()),Y=[1,2,3,4,5,6,7].filter(A=>!b.includes(A));Y.length>0?F.current.setOption("hiddenDays",Y):F.current.setOption("hiddenDays",[])}function J(P,b,W){const Y=new URL(P),I=`${Y.pathname.split("/").slice(0,4).join("/")}/${b}/${W}`;return`${Y.origin}${I}${Y.search}`}function re(P,b,W){const Y=new URL(P),I=`${Y.pathname.split("/").slice(0,4).join("/")}`;return`${Y.origin}${I}${Y.search}&from_to=${b}&to_date=${W}`}function ee(P,b,W){return`${Fe()}/api/availabilities/${P}/${b}?calendar_ids=${W}&available=true`}const fe=P=>{N([]),j([]),g({}),P&&j(V.filter(b=>b.date.startsWith(P)))},Q=async(P,b)=>{const W=JSON.parse(P),Y=ar("SLOTS",W.date,W.calendar_ids);if(b==="manual")N([]),z(null),T(null),g({});else{const A=tr("SLOTS",Y);if(A){N(A);return}}try{const A=await window.FormioHelper.anonymousCall(`availabilities/${W.date}?calendar_ids=${W.calendar_ids}`);er("SLOTS",Y,A.data),N(A.data)}catch(A){console.error("Errore nel caricamento degli slot:",A),Je.fire({icon:"error",title:l.t("Errore"),text:l.t("Errore nel caricamento degli orari")})}},ue=P=>{var Y,A,I,te,ie,_e,de,me;const b=JSON.parse(P),W={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${b.date}T${b.start_time}`).toISOString(),to_time:Ye(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(A=(Y=i==null?void 0:i.data)==null?void 0:Y.service_data)==null?void 0:A.id,calendar_group_office_id:(te=(I=i==null?void 0:i.data)==null?void 0:I.user_group)==null?void 0:te.id,calendar_group_place_id:(_e=(ie=i==null?void 0:i.data)==null?void 0:ie.place)==null?void 0:_e.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(me=i==null?void 0:i.dataValue)!=null&&me.id?`meetings/${i.dataValue.id}`:"meetings",W).then(Me=>{T({day:Ye(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),g(Me!=null&&Me.id?Me:Me?{...Me,id:i.dataValue.id}:i.dataValue.id?{...W,id:i.dataValue.id}:{...W})}).catch(Me=>{var Ae,$e;console.error(Me),Me.status===400&&(($e=(Ae=Me==null?void 0:Me.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+l.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+Me+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},se=P=>{const b=new Set,W=[];return P.forEach(Y=>{const A=Ye(Y.date),I=A.format("YYYY-MM");b.has(I)||(b.add(I),W.push({value:I,label:A.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),W},ye=async()=>{var ie,_e,de,me,Me,Ae,$e,Ie,Ge,Qe;const P=(de=(_e=(ie=i==null?void 0:i.root)==null?void 0:ie.data)==null?void 0:_e.place)!=null&&de.merge_availabilities?(Ae=(Me=(me=i==null?void 0:i.root)==null?void 0:me.data)==null?void 0:Me.place)==null?void 0:Ae.merged_availabilities_link:null,b=he().format("YYYY-MM-DD"),W=he().add(1,"month").format("YYYY-MM-DD"),Y=((Qe=(Ge=(Ie=($e=i==null?void 0:i.root)==null?void 0:$e.data)==null?void 0:Ie.place)==null?void 0:Ge.calendars[0])==null?void 0:Qe.id)||null,A=P?re(P,b,W):ee(b,W,Y),I=ar("AVAILABILITY",A),te=tr("AVAILABILITY",I);if(te){B(te),D(se(te));return}else g({});c(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(A);if(c(!1),!(ge!=null&&ge.length)){Je.fire({icon:"warning",title:l.t("warning"),html:l.t("no_meetings")});return}er("AVAILABILITY",I,ge),B(ge),D(se(ge))}catch(ge){c(!1),console.error("Errore nel caricamento disponibilità:",ge)}};q.useEffect(()=>{if(V!=null&&V.length){const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(P!=null&&P.from_time&&(P!=null&&P.to_time)&&!Ye().isAfter(P==null?void 0:P.draft_expiration)){const b=Ye(P.from_time).format("YYYY-MM");y(b),b&&j&&(j(V.filter(W=>W.date.startsWith(b))),_(Ye(P.from_time).format("YYYY-MM-DD")))}else P!=null&&P.draft_expiration&&Ye().isAfter(P==null?void 0:P.draft_expiration)&&Je.fire({icon:"warning",title:l.t("warning"),html:l.t("expired_meeting")})}},[V]),q.useEffect(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!v.length||k||P!=null&&P.from_time||P!=null&&P.to_time)return;const b=v[0];b&&(y(b.value),fe(b.value))},[v,k,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(C&&d===!1){const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Q(JSON.stringify({date:C,calendar_ids:P.calendar.id}))}},[C]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const P=()=>{const b=F.current;if(!b)return;const W=ce(),Y=b.getView().type;W!==Y&&b.setOption("view",W)};return window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]),q.useEffect(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());R!=null&&R.length&&(P!=null&&P.from_time)&&(z(Ye(P.from_time).format("HH:mm")+" - "+Ye(P.to_time).format("HH:mm")),T({day:Ye(P.from_time).format("dddd D MMM YYYY"),startDate:Ye(P.from_time).format("HH:mm"),endDate:Ye(P.to_time).format("HH:mm")}))},[R]);const Z=()=>{const P=yc();F.current=Zr.createCalendar(H.current,[Zr.TimeGrid],{events:[],buttonText:{today:l.t("Oggi")},allDaySlot:!1,firstDay:1,date:P.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{gc(b.view.type,b.start)},eventClick({event:b,el:W}){var de,me,Me,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),W.classList.add("highlighted-event");const Y=new Date(b.start),A=new Date(b.end),I=Y.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=Y.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ie=A.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),_e={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Y,to_time:A,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ae=(Me=i==null?void 0:i.data)==null?void 0:Me.user_group)==null?void 0:Ae.id,calendar_group_place_id:(Ie=($e=i==null?void 0:i.data)==null?void 0:$e.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Ge=i==null?void 0:i.dataValue)!=null&&Ge.id?"PATCH":"POST",(Qe=i==null?void 0:i.dataValue)!=null&&Qe.id?`meetings/${i.dataValue.id}`:"meetings",_e).then(ge=>{var Ze;let we;!ge||ge===""?we={..._e,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ge=="object"&&(we=ge),T({day:I,startDate:te,endDate:ie}),g(we)}).catch(ge=>{var we,Ze;console.error(ge),ge.status===400&&((Ze=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+l.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:W,el:Y}=b,A=W.extendedProps;Y.setAttribute("data-event-id",W.id+"-"+A.date+"-"+A.start_time)},loading:b=>{c(b)}})},ve=P=>{var b,W;(W=(b=i==null?void 0:i.root)==null?void 0:b.data)!=null&&W.place&&F.current.setOption("eventSources",[{events:Ne}])};async function Ne(P,b,W){var Y,A,I,te,ie,_e;try{F.current.setOption("events",[]);const de=he(P.start).format("YYYY-MM-DD"),me=new Date(P.end);me.setDate(me.getDate()-1);const Me=he(me).format("YYYY-MM-DD"),Ae=null,$e=(I=(A=(Y=i==null?void 0:i.root)==null?void 0:Y.data)==null?void 0:A.place)!=null&&I.merge_availabilities?(_e=(ie=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:ie.place)==null?void 0:_e.merged_availabilities_link:null,Ie=$e?J($e,de,Me):ee(de,Me,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ge;if(Qe?(ge=Qe,c(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ge)),!(ge!=null&&ge.length)){b([]),Je.fire({icon:"warning",title:l.t("warning"),html:l.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Ze=E(ge);F.current.setOption("slotMinTime",Ze.earliestStartTime),F.current.setOption("slotMaxTime",Ze.latestEndTime),$(ge),pc(F.current,we),b(we),setTimeout(()=>{be(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),W==null||W(de)}}q.useEffect(()=>{let P,b=!1;async function W(){var Y,A,I,te,ie;try{if(await((Y=window.FormioInstance)==null?void 0:Y.formReady),b)return;if(!H.current){console.warn("Elemento calendario non trovato");return}const _e=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());_e&&(_e!=null&&_e.draft_expiration)&&Ye().isAfter(_e.draft_expiration)&&(g({}),Tn()),((I=(A=i==null?void 0:i.data)==null?void 0:A.service_data)==null?void 0:I.view_type)==="calendar"?F!=null&&F.current||Z():((ie=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:ie.view_type)==="select"?ye():alert(l.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(_e){console.error("Errore durante l'inizializzazione del calendario:",_e)}}return P=setTimeout(W,500),()=>{var Y,A;b=!0,P&&clearTimeout(P),F.current&&((A=(Y=H.current)==null?void 0:Y.destroy)==null||A.call(Y),F.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function be(P){const b=i==null?void 0:i.dataValue;if(!(b!=null&&b.from_time))return;const W=Ye(b.from_time).format("DD-MM-YYYY HH:mm"),Y=Ye(b.to_time).format("DD-MM-YYYY HH:mm"),A=P.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===W&&Ye(te.end).format("DD-MM-YYYY HH:mm")===Y);if(!A)return;const I=document.querySelector(`.ec-event[data-event-id="${A.id}-${Ye(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Ye(b==null?void 0:b.from_time).format("HH:mm")}"]`);I&&(I.classList.add("highlighted-event"),I.scrollIntoView({behavior:"smooth",block:"center"}),T({day:Ye(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(b==null?void 0:b.from_time).format("HH:mm"),endDate:Ye(b==null?void 0:b.to_time).format("HH:mm")}))}const Ce=({day:P,startDate:b,endDate:W})=>h.jsx("div",{className:"mt-3",children:h.jsxs("div",{className:"row align-items-center gy-3",children:[h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:l.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:P})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:l.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[b," - ",W]})})]})]})});return q.useEffect(()=>{var P,b,W,Y;document.querySelector(".formio-read-only")&&d===!1?p(!0):(((b=(P=i==null?void 0:i.data)==null?void 0:P.service_data)==null?void 0:b.view_type)==="select"?ye():((Y=(W=i==null?void 0:i.data)==null?void 0:W.service_data)==null?void 0:Y.view_type)==="calendar"&&Z(),p(!1))},[]),q.useEffect(()=>{d&&setTimeout(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",P,d),P&&s(P)},500)},[d]),h.jsx(h.Fragment,{children:d&&X?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:h.jsx(mc,{day:Ye(X.from_time).format("dddd D MMM YYYY"),i18next:l,slot:`${Ye(X.from_time).format("HH:mm")} - ${Ye(X.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:H}),v.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),v.map(P=>h.jsx("option",{value:P.value,selected:P.value===k,children:P.label},P.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:P=>Q(P,"manual"),disabled:O.length===0,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),O.map(P=>h.jsx("option",{value:JSON.stringify(P),selected:P.date===C,children:Ye(P.date).format("dddd,DD MMMM YYYY")},P.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:R.length===0,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),R.map(P=>h.jsx("option",{value:JSON.stringify(P),selected:P.start_time+" - "+P.end_time===M,children:P.start_time+" - "+P.end_time},P.start_time+" - "+P.end_time))]})]}):null,m?Ce({day:m.day,startDate:m.startDate,endDate:m.endDate}):null,o?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(le.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ya.schema()}}static schema(){return yn.schema({type:"calendar-advanced"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Ya,"editForm",fc);let wa=Ya;const bc=[{key:"defaultValue",ignore:!0}],_c=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],wc=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
100
100
|
"withCredentials": true,
|
|
101
101
|
"headers": {
|
|
102
102
|
"Authorization": "Basic <key>"
|
|
103
103
|
}
|
|
104
|
-
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],xc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Mc(...y){return ot.Components.baseEditForm([{key:"display",components:bc},{key:"data",components:_c},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:xc}],...y)}document.documentElement.lang.toString();class Sc{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let i=this;await qt.get(i.basePath+"/api/session-auth").then(g=>{i.token=g.data.token}).catch(g=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(g,d)=>{aa("auth-token")?g({token:aa("auth-token")}):await qt.get(i.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(z=>{const $=sl.jwtDecode(z.data.token);$.exp&&oc("auth-token",z.data.token,$.exp)}).catch(z=>{console.log(z)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(g=>{this.token=g.token,i(this.token)})}}const vn=cr.Formio.Components.components.file;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=y=>{const{component:i,current:g,onChange:d,i18next:z}=y,[$,X]=q.useState([]),[o,x]=q.useState(new Map),[a,s]=q.useState(!1),u=new Sc;q.useEffect(()=>{u.getSessionAuthTokenPromise()},[]);const c=(m,P)=>{x(B=>{const R=new Map(B);return R.set(m,P),R})};function p(m){return m.size>(T(i.fileMaxSize)||T("1GB"))?{code:"size-files",message:`${z.t("I file non possono superare le dimensioni di")} ${i.fileMaxSize?i.fileMaxSize:"1GB"}`}:$.length>=(i.maxFiles?parseInt(i.maxFiles):i.multiple?100:1)?{code:"too-many-files",message:`${z.t("Puoi caricare massimo ")} ${i.maxFiles||100} ${z.t("file")}`}:m.size<T(i.fileMinSize)?{code:"file-too-small",message:`${z.t("I file devono avare una dimensione superiore a ")} ${i.fileMinSize}`}:null}function f(){if(i.filePattern){const m=i.filePattern.split(",");let P={};return m.map(B=>{const R=il.getType(B);P[R]=[],P[R].push(B)}),P}else return!0}const j=m=>{let P={};return P.originalName=m.originalName?m.originalName:m.name,P.name=m.name,P.url=m.url,P.data=m.data,P.signature_validation=m.signature_validation,P.mime_type=m.mime_type,P.storage="url",P.size=m.size,P},{getRootProps:_,getInputProps:D,fileRejections:Y,isDragActive:O,open:I}=nl.useDropzone({onDrop:m=>{m.map(P=>{v(P).then(B=>{})})},maxFiles:i.maxFiles?parseInt(i.maxFiles)-$.length:i.multiple?100:1,validator:p,accept:f()}),N=m=>{const P=Fe()+"/api/attachments/"+m.data.id;fetch(P,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{X(B=>{let R=B.filter(A=>A.data.id!==m.data.id);return d(R),R})}).catch(B=>{Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(B)})},S=()=>{const m=g!=null&&g.dataValue?g.dataValue:null;(m==null?void 0:m.length)>0&&(X(m),setTimeout(()=>{d(m)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&a===!1?(s(!0),setTimeout(()=>{S()},1e3)):(s(!1),setTimeout(()=>{S()},1e3))},[]);async function v(m){let P;const B=Fe()+"/it/upload";let R={mime_type:m.type,name:m.name,original_filename:m.name,protocol_required:i.protocol_required,size:m.size};return await qt.post(B,R,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(P=A.data.id,m.url=Fe()+"/it/allegati/"+P,m.storage="url",m.mime_type=m.type,m.protocol_required=i.protocol_required,m.data={...A.data,baseUrl:Fe()+"/it/allegati/"+P},c(P,m),await qt.put(A.data.uri,m,{onUploadProgress:H=>{let J=Math.round(H.loaded*100/H.total);x(ie=>{const ee=new Map(ie),he=m;return he.progress=parseInt(J),ee.has(P)&&ee.set(P,he),ee})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async H=>{const J=/\\|"/gi,ie=H.headers.etag.replace(J,"")||null;return await qt.put(Fe()+"/it/upload/"+P,{file_hash:ie,check_signature:i.check_signature}).then(async ee=>{x(ue=>{const ae=new Map(ue);return ae.delete(P),ae});let he=g.dataValue||[],Z=null;if(X(ue=>{const ae=[...ue,j(m)];return Z=ae.length-1,d(ae),ae}),i.check_signature&&ee.data.url&&lr)return await qt.post(lr,{url:ee.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(ue=>{m.signature_validation=ue.data.sign,he[Z].signature_validation=ue.data.sign}).catch(ue=>{he[Z].signature_validation="File validation error: "+ue});x(ue=>{const ae=new Map(ue);return ae.delete(P),ae})}).catch(ee=>{x(he=>{const Z=new Map(he);return Z.delete(P),Z}),console.log(ee),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(H=>{x(J=>{const ie=new Map(J);return ie.delete(P),ie}),console.log(H),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),x(H=>{const J=new Map(H);return J.delete(P),J})})}function T(m){if(typeof m=="string"){if(m.search(/kb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024);if(m.search(/mb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024);if(m.search(/gb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024*1024);if(m.search(/b/i)===m.length-1||m.search(/s/i)===m.length-1)return parseFloat(m.substring(0,m.length-1));if(m.search(/m/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*60);if(m.search(/h/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*3600)}return m}function L(m,P=2){if(!+m)return"0 Bytes";const B=1024,R=P<0?0:P,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],H=Math.floor(Math.log(m)/Math.log(B));return`${parseFloat((m/Math.pow(B,H)).toFixed(R))} ${A[H]}`}return g.conditionallyHidden()||g.visible===!1?null:h.jsx(h.Fragment,{children:a?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]},m.size+P)),$.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:z.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[i.hideLabel||i.hidden?"":h.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${i.id}-${i.key}`,title:i.tooltip||void 0,children:[i.label,i.validate.required&&h.jsx("span",{className:"text-danger"}),i.tooltip&&h.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":i.tooltip,"aria-expanded":"false"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${O?" dragover":""}`,style:{border:"dashed"},..._({onClick:m=>m.stopPropagation()}),children:[h.jsx("input",{id:`${i.id}-${i.key}`,"aria-describedby":`file-uploader-description-${i.id}-${i.key}`,...D()}),h.jsxs("div",{className:`upload-dragdrop${O?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:z.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${i.id}-${i.key}`,children:z.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[z.t("oppure"),h.jsx(le.Button,{tag:"input",type:"button",value:z.t("selezionalo dal dispositivo"),onClick:I,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsx("div",{dangerouslySetInnerHTML:{__html:Mn.sanitize(i.description||"")}}),h.jsxs("ul",{className:"upload-file-list my-0",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>N(m),children:h.jsx(le.Icon,{title:`${z.t("Elimina file caricato")} ${m.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},m.size+P)),Array.from(o.entries()).map(([m,P])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("Caricamento file:")}),P.name,h.jsx("span",{className:"upload-file-weight",children:L(P.size)})]}),h.jsx(le.Progress,{value:P.progress})]},m))]}),!!(Y&&Y.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:Y.map(({file:m,errors:P},B)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),h.jsxs("p",{className:"text-wrap error",children:[h.jsx("span",{className:"visually-hidden",children:z.t("Errore caricamento file:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]}),h.jsx("div",{children:P.map(R=>R.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("I file possono essere di tipo "),i.filePattern]}):R.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("Puoi caricare massimo ")," ",i.maxFiles?i.maxFiles:i.multiple?100:1," ",z.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:R.message}))})]},m.size+B))})})]})})},Oa=class Oa extends vn{constructor(i,g,d){super({...i,multiple:i.multiple},g,d),this.reactRef=null,this.lastRenderedVisible=void 0}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Oa.schema()}}static schema(){return vn.schema({type:"sdcfile"})}renderReact(i=this.reactRef){this.rootComponent&&this.rootComponent.render(h.jsx(Dc,{ref:i,component:this.component,onChange:g=>this.setValue(g),...this,current:this}))}attach(i,g){this.reactRef=g,this.rootComponent=Ft.createRoot(i),this.lastRenderedVisible=this.visible,this.renderReact(g)}setValue(i,g={}){const d=this.updateValue(i,g);return this.shouldSetValue=!0,d}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}checkCondition(i,g){const d=super.checkCondition(i,g),z=this.visible;return this.lastRenderedVisible!==z&&(this.lastRenderedVisible=z,this.renderReact()),d}};Ct(Oa,"editForm",Mc);let xa=Oa;const kc=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function Yc(...y){return ot.Components.baseEditForm([{key:"display",components:kc}],...y)}var ya={exports:{}},Oc=ya.exports,_n;function jc(){return _n||(_n=1,(function(y,i){(function(g,d){y.exports=d(q)})(Oc,(function(g){return(function(){var d={680:function(o){o.exports=g},8952:function(o,x,a){var s=a(4328),u=a(36),c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not a function")}},2096:function(o,x,a){var s=a(2424),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c("Can't set "+u(p)+" as a prototype")}},4764:function(o,x,a){var s=a(9764).charAt;o.exports=function(u,c,p){return c+(p?s(u,c).length:1)}},6100:function(o,x,a){var s=a(7e3),u=TypeError;o.exports=function(c,p){if(s(p,c))return c;throw new u("Incorrect invocation")}},3951:function(o,x,a){var s=a(1632),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not an object")}},2504:function(o,x,a){var s=a(4096),u=a(2495),c=a(3556),p=function(f){return function(j,_,D){var Y=s(j),O=c(Y);if(O===0)return!f&&-1;var I,N=u(D,O);if(f&&_!=_){for(;O>N;)if((I=Y[N++])!=I)return!0}else for(;O>N;N++)if((f||N in Y)&&Y[N]===_)return f||N||0;return!f&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,x,a){var s=a(8992),u=a(1664),c=a(5712),p=a(4356),f=a(3556),j=a(2568),_=u([].push),D=function(Y){var O=Y===1,I=Y===2,N=Y===3,S=Y===4,v=Y===6,T=Y===7,L=Y===5||v;return function(m,P,B,R){for(var A,H,J=p(m),ie=c(J),ee=f(ie),he=s(P,B),Z=0,ue=R||j,ae=O?ue(m,ee):I||T?ue(m,0):void 0;ee>Z;Z++)if((L||Z in ie)&&(H=he(A=ie[Z],Z,J),Y))if(O)ae[Z]=H;else if(H)switch(Y){case 3:return!0;case 5:return A;case 6:return Z;case 2:_(ae,A)}else switch(Y){case 4:return!1;case 7:_(ae,A)}return v?-1:N||S?S:ae}};o.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},953:function(o,x,a){var s=a(9957),u=a(9972),c=a(8504),p=u("species");o.exports=function(f){return c>=51||!s((function(){var j=[];return(j.constructor={})[p]=function(){return{foo:1}},j[f](Boolean).foo!==1}))}},1496:function(o,x,a){var s=a(9957);o.exports=function(u,c){var p=[][u];return!!p&&s((function(){p.call(null,c||function(){return 1},1)}))}},6728:function(o,x,a){var s=a(3476),u=a(1432),c=TypeError,p=Object.getOwnPropertyDescriptor,f=s&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(j){return j instanceof TypeError}})();o.exports=f?function(j,_){if(u(j)&&!p(j,"length").writable)throw new c("Cannot set read only .length");return j.length=_}:function(j,_){return j.length=_}},6736:function(o,x,a){var s=a(1432),u=a(6072),c=a(1632),p=a(9972)("species"),f=Array;o.exports=function(j){var _;return s(j)&&(_=j.constructor,(u(_)&&(_===f||s(_.prototype))||c(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?f:_}},2568:function(o,x,a){var s=a(6736);o.exports=function(u,c){return new(s(u))(c===0?0:c)}},8696:function(o,x,a){var s=a(3951),u=a(3112);o.exports=function(c,p,f,j){try{return j?p(s(f)[0],f[1]):p(f)}catch(_){u(c,"throw",_)}}},1888:function(o,x,a){var s=a(1664),u=s({}.toString),c=s("".slice);o.exports=function(p){return c(u(p),8,-1)}},4427:function(o,x,a){var s=a(16),u=a(4328),c=a(1888),p=a(9972)("toStringTag"),f=Object,j=c((function(){return arguments})())==="Arguments";o.exports=s?c:function(_){var D,Y,O;return _===void 0?"Undefined":_===null?"Null":typeof(Y=(function(I,N){try{return I[N]}catch{}})(D=f(_),p))=="string"?Y:j?c(D):(O=c(D))==="Object"&&u(D.callee)?"Arguments":O}},9968:function(o,x,a){var s=a(5152),u=a(9252),c=a(9444),p=a(8352);o.exports=function(f,j,_){for(var D=u(j),Y=p.f,O=c.f,I=0;I<D.length;I++){var N=D[I];s(f,N)||_&&s(_,N)||Y(f,N,O(j,N))}}},2272:function(o,x,a){var s=a(9957);o.exports=!s((function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype}))},3336:function(o){o.exports=function(x,a){return{value:x,done:a}}},3440:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=s?function(p,f,j){return u.f(p,f,c(1,j))}:function(p,f,j){return p[f]=j,p}},9728:function(o){o.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=function(p,f,j){s?u.f(p,f,c(0,j)):p[f]=j}},2544:function(o,x,a){var s=a(5312),u=a(8352);o.exports=function(c,p,f){return f.get&&s(f.get,p,{getter:!0}),f.set&&s(f.set,p,{setter:!0}),u.f(c,p,f)}},6076:function(o,x,a){var s=a(4328),u=a(8352),c=a(5312),p=a(4636);o.exports=function(f,j,_,D){D||(D={});var Y=D.enumerable,O=D.name!==void 0?D.name:j;if(s(_)&&c(_,O,D),D.global)Y?f[j]=_:p(j,_);else{try{D.unsafe?f[j]&&(Y=!0):delete f[j]}catch{}Y?f[j]=_:u.f(f,j,{value:_,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return f}},4036:function(o,x,a){var s=a(6076);o.exports=function(u,c,p){for(var f in c)s(u,f,c[f],p);return u}},4636:function(o,x,a){var s=a(6420),u=Object.defineProperty;o.exports=function(c,p){try{u(s,c,{value:p,configurable:!0,writable:!0})}catch{s[c]=p}return p}},3476:function(o,x,a){var s=a(9957);o.exports=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,x,a){var s=a(6420),u=a(1632),c=s.document,p=u(c)&&u(c.createElement);o.exports=function(f){return p?c.createElement(f):{}}},4316:function(o){var x=TypeError;o.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,x,a){var s,u,c=a(6420),p=a(6064),f=c.process,j=c.Deno,_=f&&f.versions||j&&j.version,D=_&&_.v8;D&&(u=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!u&&p&&(!(s=p.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=p.match(/Chrome\/(\d+)/))&&(u=+s[1]),o.exports=u},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,x,a){var s=a(1664),u=Error,c=s("".replace),p=String(new u("zxcasd").stack),f=/\n\s*at [^:]*:[^\n]*/,j=f.test(p);o.exports=function(_,D){if(j&&typeof _=="string"&&!u.prepareStackTrace)for(;D--;)_=c(_,f,"");return _}},3696:function(o,x,a){var s=a(3440),u=a(6520),c=a(9184),p=Error.captureStackTrace;o.exports=function(f,j,_,D){c&&(p?p(f,j):s(f,"stack",u(_,D)))}},9184:function(o,x,a){var s=a(9957),u=a(9728);o.exports=!s((function(){var c=new Error("a");return!("stack"in c)||(Object.defineProperty(c,"stack",u(1,7)),c.stack!==7)}))},9160:function(o,x,a){var s=a(6420),u=a(9444).f,c=a(3440),p=a(6076),f=a(4636),j=a(9968),_=a(6704);o.exports=function(D,Y){var O,I,N,S,v,T=D.target,L=D.global,m=D.stat;if(O=L?s:m?s[T]||f(T,{}):s[T]&&s[T].prototype)for(I in Y){if(S=Y[I],N=D.dontCallGetSet?(v=u(O,I))&&v.value:O[I],!_(L?I:T+(m?".":"#")+I,D.forced)&&N!==void 0){if(typeof S==typeof N)continue;j(S,N)}(D.sham||N&&N.sham)&&c(S,"sham",!0),p(O,I,S,D)}}},9957:function(o){o.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(o,x,a){a(880);var s=a(8448),u=a(6076),c=a(7680),p=a(9957),f=a(9972),j=a(3440),_=f("species"),D=RegExp.prototype;o.exports=function(Y,O,I,N){var S=f(Y),v=!p((function(){var P={};return P[S]=function(){return 7},""[Y](P)!==7})),T=v&&!p((function(){var P=!1,B=/a/;return Y==="split"&&((B={}).constructor={},B.constructor[_]=function(){return B},B.flags="",B[S]=/./[S]),B.exec=function(){return P=!0,null},B[S](""),!P}));if(!v||!T||I){var L=/./[S],m=O(S,""[Y],(function(P,B,R,A,H){var J=B.exec;return J===c||J===D.exec?v&&!H?{done:!0,value:s(L,B,R,A)}:{done:!0,value:s(P,R,B,A)}:{done:!1}}));u(String.prototype,Y,m[0]),u(D,S,m[1])}N&&j(D[S],"sham",!0)}},908:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.apply,p=u.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(s?p.bind(c):function(){return p.apply(c,arguments)})},8992:function(o,x,a){var s=a(3180),u=a(8952),c=a(7332),p=s(s.bind);o.exports=function(f,j){return u(f),j===void 0?f:c?p(f,j):function(){return f.apply(j,arguments)}}},7332:function(o,x,a){var s=a(9957);o.exports=!s((function(){var u=(function(){}).bind();return typeof u!="function"||u.hasOwnProperty("prototype")}))},8448:function(o,x,a){var s=a(7332),u=Function.prototype.call;o.exports=s?u.bind(u):function(){return u.apply(u,arguments)}},6208:function(o,x,a){var s=a(3476),u=a(5152),c=Function.prototype,p=s&&Object.getOwnPropertyDescriptor,f=u(c,"name"),j=f&&(function(){}).name==="something",_=f&&(!s||s&&p(c,"name").configurable);o.exports={EXISTS:f,PROPER:j,CONFIGURABLE:_}},5288:function(o,x,a){var s=a(1664),u=a(8952);o.exports=function(c,p,f){try{return s(u(Object.getOwnPropertyDescriptor(c,p)[f]))}catch{}}},3180:function(o,x,a){var s=a(1888),u=a(1664);o.exports=function(c){if(s(c)==="Function")return u(c)}},1664:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.call,p=s&&u.bind.bind(c,c);o.exports=s?p:function(f){return function(){return c.apply(f,arguments)}}},5232:function(o,x,a){var s=a(6420),u=a(4328);o.exports=function(c,p){return arguments.length<2?(f=s[c],u(f)?f:void 0):s[c]&&s[c][p];var f}},6752:function(o){o.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(o,x,a){var s=a(8952),u=a(9760);o.exports=function(c,p){var f=c[p];return u(f)?void 0:s(f)}},6420:function(o,x,a){var s=function(u){return u&&u.Math===Math&&u};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a.g=="object"&&a.g)||s(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,x,a){var s=a(1664),u=a(4356),c=s({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,f){return c(u(p),f)}},2560:function(o){o.exports={}},4168:function(o,x,a){var s=a(5232);o.exports=s("document","documentElement")},9888:function(o,x,a){var s=a(3476),u=a(9957),c=a(8168);o.exports=!s&&!u((function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,x,a){var s=a(1664),u=a(9957),c=a(1888),p=Object,f=s("".split);o.exports=u((function(){return!p("z").propertyIsEnumerable(0)}))?function(j){return c(j)==="String"?f(j,""):p(j)}:p},7512:function(o,x,a){var s=a(4328),u=a(1632),c=a(4024);o.exports=function(p,f,j){var _,D;return c&&s(_=f.constructor)&&_!==j&&u(D=_.prototype)&&D!==j.prototype&&c(p,D),p}},9112:function(o,x,a){var s=a(1664),u=a(4328),c=a(3976),p=s(Function.toString);u(c.inspectSource)||(c.inspectSource=function(f){return p(f)}),o.exports=c.inspectSource},3480:function(o,x,a){var s=a(1632),u=a(3440);o.exports=function(c,p){s(p)&&"cause"in p&&u(c,"cause",p.cause)}},9104:function(o,x,a){var s,u,c,p=a(4288),f=a(6420),j=a(1632),_=a(3440),D=a(5152),Y=a(3976),O=a(6504),I=a(2560),N="Object already initialized",S=f.TypeError,v=f.WeakMap;if(p||Y.state){var T=Y.state||(Y.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,s=function(m,P){if(T.has(m))throw new S(N);return P.facade=m,T.set(m,P),P},u=function(m){return T.get(m)||{}},c=function(m){return T.has(m)}}else{var L=O("state");I[L]=!0,s=function(m,P){if(D(m,L))throw new S(N);return P.facade=m,_(m,L,P),P},u=function(m){return D(m,L)?m[L]:{}},c=function(m){return D(m,L)}}o.exports={set:s,get:u,has:c,enforce:function(m){return c(m)?u(m):s(m,{})},getterFor:function(m){return function(P){var B;if(!j(P)||(B=u(P)).type!==m)throw new S("Incompatible receiver, "+m+" required");return B}}}},1432:function(o,x,a){var s=a(1888);o.exports=Array.isArray||function(u){return s(u)==="Array"}},4328:function(o){var x=typeof document=="object"&&document.all;o.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(4427),f=a(5232),j=a(9112),_=function(){},D=f("Reflect","construct"),Y=/^\s*(?:class|function)\b/,O=s(Y.exec),I=!Y.test(_),N=function(v){if(!c(v))return!1;try{return D(_,[],v),!0}catch{return!1}},S=function(v){if(!c(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!O(Y,j(v))}catch{return!0}};S.sham=!0,o.exports=!D||u((function(){var v;return N(N.call)||!N(Object)||!N((function(){v=!0}))||v}))?S:N},6704:function(o,x,a){var s=a(9957),u=a(4328),c=/#|\.prototype\./,p=function(Y,O){var I=j[f(Y)];return I===D||I!==_&&(u(O)?s(O):!!O)},f=p.normalize=function(Y){return String(Y).replace(c,".").toLowerCase()},j=p.data={},_=p.NATIVE="N",D=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(x){return x==null}},1632:function(o,x,a){var s=a(4328);o.exports=function(u){return typeof u=="object"?u!==null:s(u)}},2424:function(o,x,a){var s=a(1632);o.exports=function(u){return s(u)||u===null}},7048:function(o){o.exports=!1},7728:function(o,x,a){var s=a(5232),u=a(4328),c=a(7e3),p=a(6536),f=Object;o.exports=p?function(j){return typeof j=="symbol"}:function(j){var _=s("Symbol");return u(_)&&c(_.prototype,f(j))}},3112:function(o,x,a){var s=a(8448),u=a(3951),c=a(4504);o.exports=function(p,f,j){var _,D;u(p);try{if(!(_=c(p,"return"))){if(f==="throw")throw j;return j}_=s(_,p)}catch(Y){D=!0,_=Y}if(f==="throw")throw j;if(D)throw _;return u(_),j}},9724:function(o,x,a){var s=a(8448),u=a(9368),c=a(3440),p=a(4036),f=a(9972),j=a(9104),_=a(4504),D=a(336).IteratorPrototype,Y=a(3336),O=a(3112),I=f("toStringTag"),N="IteratorHelper",S="WrapForValidIterator",v=j.set,T=function(P){var B=j.getterFor(P?S:N);return p(u(D),{next:function(){var R=B(this);if(P)return R.nextHandler();try{var A=R.done?void 0:R.nextHandler();return Y(A,R.done)}catch(H){throw R.done=!0,H}},return:function(){var R=B(this),A=R.iterator;if(R.done=!0,P){var H=_(A,"return");return H?s(H,A):Y(void 0,!0)}if(R.inner)try{O(R.inner.iterator,"normal")}catch(J){return O(A,"throw",J)}return O(A,"normal"),Y(void 0,!0)}})},L=T(!0),m=T(!1);c(m,I,"Iterator Helper"),o.exports=function(P,B){var R=function(A,H){H?(H.iterator=A.iterator,H.next=A.next):H=A,H.type=B?S:N,H.nextHandler=P,H.counter=0,H.done=!1,v(this,H)};return R.prototype=B?L:m,R}},5792:function(o,x,a){var s=a(8448),u=a(8952),c=a(3951),p=a(6752),f=a(9724),j=a(8696),_=f((function(){var D=this.iterator,Y=c(s(this.next,D));if(!(this.done=!!Y.done))return j(D,this.mapper,[Y.value,this.counter++],!0)}));o.exports=function(D){return c(this),u(D),new _(p(this),{mapper:D})}},336:function(o,x,a){var s,u,c,p=a(9957),f=a(4328),j=a(1632),_=a(9368),D=a(7796),Y=a(6076),O=a(9972),I=a(7048),N=O("iterator"),S=!1;[].keys&&("next"in(c=[].keys())?(u=D(D(c)))!==Object.prototype&&(s=u):S=!0),!j(s)||p((function(){var v={};return s[N].call(v)!==v}))?s={}:I&&(s=_(s)),f(s[N])||Y(s,N,(function(){return this})),o.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:S}},3556:function(o,x,a){var s=a(7584);o.exports=function(u){return s(u.length)}},5312:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(5152),f=a(3476),j=a(6208).CONFIGURABLE,_=a(9112),D=a(9104),Y=D.enforce,O=D.get,I=String,N=Object.defineProperty,S=s("".slice),v=s("".replace),T=s([].join),L=f&&!u((function(){return N((function(){}),"length",{value:8}).length!==8})),m=String(String).split("String"),P=o.exports=function(B,R,A){S(I(R),0,7)==="Symbol("&&(R="["+v(I(R),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(R="get "+R),A&&A.setter&&(R="set "+R),(!p(B,"name")||j&&B.name!==R)&&(f?N(B,"name",{value:R,configurable:!0}):B.name=R),L&&A&&p(A,"arity")&&B.length!==A.arity&&N(B,"length",{value:A.arity});try{A&&p(A,"constructor")&&A.constructor?f&&N(B,"prototype",{writable:!1}):B.prototype&&(B.prototype=void 0)}catch{}var H=Y(B);return p(H,"source")||(H.source=T(m,typeof R=="string"?R:"")),B};Function.prototype.toString=P((function(){return c(this)&&O(this).source||_(this)}),"toString")},1748:function(o){var x=Math.ceil,a=Math.floor;o.exports=Math.trunc||function(s){var u=+s;return(u>0?a:x)(u)}},8948:function(o,x,a){var s=a(5016);o.exports=function(u,c){return u===void 0?arguments.length<2?"":c:s(u)}},9292:function(o,x,a){var s=a(3476),u=a(1664),c=a(8448),p=a(9957),f=a(1531),j=a(9392),_=a(8912),D=a(4356),Y=a(5712),O=Object.assign,I=Object.defineProperty,N=u([].concat);o.exports=!O||p((function(){if(s&&O({b:1},O(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},v={},T=Symbol("assign detection"),L="abcdefghijklmnopqrst";return S[T]=7,L.split("").forEach((function(m){v[m]=m})),O({},S)[T]!==7||f(O({},v)).join("")!==L}))?function(S,v){for(var T=D(S),L=arguments.length,m=1,P=j.f,B=_.f;L>m;)for(var R,A=Y(arguments[m++]),H=P?N(f(A),P(A)):f(A),J=H.length,ie=0;J>ie;)R=H[ie++],s&&!c(B,A,R)||(T[R]=A[R]);return T}:O},9368:function(o,x,a){var s,u=a(3951),c=a(2056),p=a(8256),f=a(2560),j=a(4168),_=a(8168),D=a(6504),Y="prototype",O="script",I=D("IE_PROTO"),N=function(){},S=function(L){return"<"+O+">"+L+"</"+O+">"},v=function(L){L.write(S("")),L.close();var m=L.parentWindow.Object;return L=null,m},T=function(){try{s=new ActiveXObject("htmlfile")}catch{}var L,m,P;T=typeof document<"u"?document.domain&&s?v(s):(m=_("iframe"),P="java"+O+":",m.style.display="none",j.appendChild(m),m.src=String(P),(L=m.contentWindow.document).open(),L.write(S("document.F=Object")),L.close(),L.F):v(s);for(var B=p.length;B--;)delete T[Y][p[B]];return T()};f[I]=!0,o.exports=Object.create||function(L,m){var P;return L!==null?(N[Y]=u(L),P=new N,N[Y]=null,P[I]=L):P=T(),m===void 0?P:c.f(P,m)}},2056:function(o,x,a){var s=a(3476),u=a(1576),c=a(8352),p=a(3951),f=a(4096),j=a(1531);x.f=s&&!u?Object.defineProperties:function(_,D){p(_);for(var Y,O=f(D),I=j(D),N=I.length,S=0;N>S;)c.f(_,Y=I[S++],O[Y]);return _}},8352:function(o,x,a){var s=a(3476),u=a(9888),c=a(1576),p=a(3951),f=a(88),j=TypeError,_=Object.defineProperty,D=Object.getOwnPropertyDescriptor,Y="enumerable",O="configurable",I="writable";x.f=s?c?function(N,S,v){if(p(N),S=f(S),p(v),typeof N=="function"&&S==="prototype"&&"value"in v&&I in v&&!v[I]){var T=D(N,S);T&&T[I]&&(N[S]=v.value,v={configurable:O in v?v[O]:T[O],enumerable:Y in v?v[Y]:T[Y],writable:!1})}return _(N,S,v)}:_:function(N,S,v){if(p(N),S=f(S),p(v),u)try{return _(N,S,v)}catch{}if("get"in v||"set"in v)throw new j("Accessors not supported");return"value"in v&&(N[S]=v.value),N}},9444:function(o,x,a){var s=a(3476),u=a(8448),c=a(8912),p=a(9728),f=a(4096),j=a(88),_=a(5152),D=a(9888),Y=Object.getOwnPropertyDescriptor;x.f=s?Y:function(O,I){if(O=f(O),I=j(I),D)try{return Y(O,I)}catch{}if(_(O,I))return p(!u(c.f,O,I),O[I])}},5048:function(o,x,a){var s=a(9008),u=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(c){return s(c,u)}},9392:function(o,x){x.f=Object.getOwnPropertySymbols},7796:function(o,x,a){var s=a(5152),u=a(4328),c=a(4356),p=a(6504),f=a(2272),j=p("IE_PROTO"),_=Object,D=_.prototype;o.exports=f?_.getPrototypeOf:function(Y){var O=c(Y);if(s(O,j))return O[j];var I=O.constructor;return u(I)&&O instanceof I?I.prototype:O instanceof _?D:null}},7e3:function(o,x,a){var s=a(1664);o.exports=s({}.isPrototypeOf)},9008:function(o,x,a){var s=a(1664),u=a(5152),c=a(4096),p=a(2504).indexOf,f=a(2560),j=s([].push);o.exports=function(_,D){var Y,O=c(_),I=0,N=[];for(Y in O)!u(f,Y)&&u(O,Y)&&j(N,Y);for(;D.length>I;)u(O,Y=D[I++])&&(~p(N,Y)||j(N,Y));return N}},1531:function(o,x,a){var s=a(9008),u=a(8256);o.exports=Object.keys||function(c){return s(c,u)}},8912:function(o,x){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u=s&&!a.call({1:2},1);x.f=u?function(c){var p=s(this,c);return!!p&&p.enumerable}:a},4024:function(o,x,a){var s=a(5288),u=a(3951),c=a(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,f=!1,j={};try{(p=s(Object.prototype,"__proto__","set"))(j,[]),f=j instanceof Array}catch{}return function(_,D){return u(_),c(D),f?p(_,D):_.__proto__=D,_}})():void 0)},7032:function(o,x,a){var s=a(16),u=a(4427);o.exports=s?{}.toString:function(){return"[object "+u(this)+"]"}},2104:function(o,x,a){var s=a(8448),u=a(4328),c=a(1632),p=TypeError;o.exports=function(f,j){var _,D;if(j==="string"&&u(_=f.toString)&&!c(D=s(_,f))||u(_=f.valueOf)&&!c(D=s(_,f))||j!=="string"&&u(_=f.toString)&&!c(D=s(_,f)))return D;throw new p("Can't convert object to primitive value")}},9252:function(o,x,a){var s=a(5232),u=a(1664),c=a(5048),p=a(9392),f=a(3951),j=u([].concat);o.exports=s("Reflect","ownKeys")||function(_){var D=c.f(f(_)),Y=p.f;return Y?j(D,Y(_)):D}},584:function(o,x,a){var s=a(8352).f;o.exports=function(u,c,p){p in u||s(u,p,{configurable:!0,get:function(){return c[p]},set:function(f){c[p]=f}})}},9092:function(o,x,a){var s=a(8448),u=a(3951),c=a(4328),p=a(1888),f=a(7680),j=TypeError;o.exports=function(_,D){var Y=_.exec;if(c(Y)){var O=s(Y,_,D);return O!==null&&u(O),O}if(p(_)==="RegExp")return s(f,_,D);throw new j("RegExp#exec called on incompatible receiver")}},7680:function(o,x,a){var s,u,c=a(8448),p=a(1664),f=a(5016),j=a(8872),_=a(3548),D=a(4696),Y=a(9368),O=a(9104).get,I=a(8e3),N=a(9124),S=D("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,L=p("".charAt),m=p("".indexOf),P=p("".replace),B=p("".slice),R=(u=/b*/g,c(v,s=/a/,"a"),c(v,u,"a"),s.lastIndex!==0||u.lastIndex!==0),A=_.BROKEN_CARET,H=/()??/.exec("")[1]!==void 0;(R||H||A||I||N)&&(T=function(J){var ie,ee,he,Z,ue,ae,ye,ce=this,Q=O(ce),ve=f(J),Ne=Q.raw;if(Ne)return Ne.lastIndex=ce.lastIndex,ie=c(T,Ne,ve),ce.lastIndex=Ne.lastIndex,ie;var _e=Q.groups,Ce=A&&ce.sticky,Re=c(j,ce),ze=ce.source,C=0,b=ve;if(Ce&&(Re=P(Re,"y",""),m(Re,"g")===-1&&(Re+="g"),b=B(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&L(ve,ce.lastIndex-1)!==`
|
|
105
|
-
`)&&(ze="(?: "+ze+")",b=" "+b,
|
|
106
|
-
`)&&c.flags==="s")}))},9124:function(o,x,a){var s=a(9957),u=a(6420).RegExp;o.exports=s((function(){var c=u("(?<a>b)","g");return c.exec("b").groups.a!=="b"||"b".replace(c,"$<a>c")!=="bc"}))},5436:function(o,x,a){var s=a(9760),u=TypeError;o.exports=function(c){if(s(c))throw new u("Can't call method on "+c);return c}},6504:function(o,x,a){var s=a(4696),u=a(7776),c=s("keys");o.exports=function(p){return c[p]||(c[p]=u(p))}},3976:function(o,x,a){var s=a(7048),u=a(6420),c=a(4636),p="__core-js_shared__",f=o.exports=u[p]||c(p,{});(f.versions||(f.versions=[])).push({version:"3.36.0",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,x,a){var s=a(3976);o.exports=function(u,c){return s[u]||(s[u]=c||{})}},9764:function(o,x,a){var s=a(1664),u=a(6180),c=a(5016),p=a(5436),f=s("".charAt),j=s("".charCodeAt),_=s("".slice),D=function(Y){return function(O,I){var N,S,v=c(p(O)),T=u(I),L=v.length;return T<0||T>=L?Y?"":void 0:(N=j(v,T))<55296||N>56319||T+1===L||(S=j(v,T+1))<56320||S>57343?Y?f(v,T):N:Y?_(v,T,T+2):S-56320+(N-55296<<10)+65536}};o.exports={codeAt:D(!1),charAt:D(!0)}},772:function(o,x,a){var s=a(8504),u=a(9957),c=a(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!u((function(){var p=Symbol("symbol detection");return!c(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},2495:function(o,x,a){var s=a(6180),u=Math.max,c=Math.min;o.exports=function(p,f){var j=s(p);return j<0?u(j+f,0):c(j,f)}},4096:function(o,x,a){var s=a(5712),u=a(5436);o.exports=function(c){return s(u(c))}},6180:function(o,x,a){var s=a(1748);o.exports=function(u){var c=+u;return c!=c||c===0?0:s(c)}},7584:function(o,x,a){var s=a(6180),u=Math.min;o.exports=function(c){var p=s(c);return p>0?u(p,9007199254740991):0}},4356:function(o,x,a){var s=a(5436),u=Object;o.exports=function(c){return u(s(c))}},7024:function(o,x,a){var s=a(8448),u=a(1632),c=a(7728),p=a(4504),f=a(2104),j=a(9972),_=TypeError,D=j("toPrimitive");o.exports=function(Y,O){if(!u(Y)||c(Y))return Y;var I,N=p(Y,D);if(N){if(O===void 0&&(O="default"),I=s(N,Y,O),!u(I)||c(I))return I;throw new _("Can't convert object to primitive value")}return O===void 0&&(O="number"),f(Y,O)}},88:function(o,x,a){var s=a(7024),u=a(7728);o.exports=function(c){var p=s(c,"string");return u(p)?p:p+""}},16:function(o,x,a){var s={};s[a(9972)("toStringTag")]="z",o.exports=String(s)==="[object z]"},5016:function(o,x,a){var s=a(4427),u=String;o.exports=function(c){if(s(c)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return u(c)}},36:function(o){var x=String;o.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(o,x,a){var s=a(1664),u=0,c=Math.random(),p=s(1 .toString);o.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+p(++u+c,36)}},6536:function(o,x,a){var s=a(772);o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,x,a){var s=a(3476),u=a(9957);o.exports=s&&u((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,x,a){var s=a(6420),u=a(4328),c=s.WeakMap;o.exports=u(c)&&/native code/.test(String(c))},9972:function(o,x,a){var s=a(6420),u=a(4696),c=a(5152),p=a(7776),f=a(772),j=a(6536),_=s.Symbol,D=u("wks"),Y=j?_.for||_:_&&_.withoutSetter||p;o.exports=function(O){return c(D,O)||(D[O]=f&&c(_,O)?_[O]:Y("Symbol."+O)),D[O]}},6488:function(o,x,a){var s=a(5232),u=a(5152),c=a(3440),p=a(7e3),f=a(4024),j=a(9968),_=a(584),D=a(7512),Y=a(8948),O=a(3480),I=a(3696),N=a(3476),S=a(7048);o.exports=function(v,T,L,m){var P="stackTraceLimit",B=m?2:1,R=v.split("."),A=R[R.length-1],H=s.apply(null,R);if(H){var J=H.prototype;if(!S&&u(J,"cause")&&delete J.cause,!L)return H;var ie=s("Error"),ee=T((function(he,Z){var ue=Y(m?Z:he,void 0),ae=m?new H(he):new H;return ue!==void 0&&c(ae,"message",ue),I(ae,ee,ae.stack,2),this&&p(J,this)&&D(ae,this,ee),arguments.length>B&&O(ae,arguments[B]),ae}));if(ee.prototype=J,A!=="Error"?f?f(ee,ie):j(ee,ie,{name:!0}):N&&P in H&&(_(ee,H,P),_(ee,H,"prepareStackTrace")),j(ee,H),!S)try{J.name!==A&&c(J,"name",A),J.constructor=ee}catch{}return ee}}},7476:function(o,x,a){var s=a(9160),u=a(9957),c=a(1432),p=a(1632),f=a(4356),j=a(3556),_=a(4316),D=a(92),Y=a(2568),O=a(953),I=a(9972),N=a(8504),S=I("isConcatSpreadable"),v=N>=51||!u((function(){var L=[];return L[S]=!1,L.concat()[0]!==L})),T=function(L){if(!p(L))return!1;var m=L[S];return m!==void 0?!!m:c(L)};s({target:"Array",proto:!0,arity:1,forced:!v||!O("concat")},{concat:function(L){var m,P,B,R,A,H=f(this),J=Y(H,0),ie=0;for(m=-1,B=arguments.length;m<B;m++)if(T(A=m===-1?H:arguments[m]))for(R=j(A),_(ie+R),P=0;P<R;P++,ie++)P in A&&D(J,ie,A[P]);else _(ie+1),D(J,ie++,A);return J.length=ie,J}})},6932:function(o,x,a){var s=a(9160),u=a(3364).filter;s({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},700:function(o,x,a){var s=a(9160),u=a(1664),c=a(5712),p=a(4096),f=a(1496),j=u([].join);s({target:"Array",proto:!0,forced:c!==Object||!f("join",",")},{join:function(_){return j(p(this),_===void 0?",":_)}})},4456:function(o,x,a){var s=a(9160),u=a(3364).map;s({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,x,a){var s=a(9160),u=a(4356),c=a(3556),p=a(6728),f=a(4316);s({target:"Array",proto:!0,arity:1,forced:a(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(j){return j instanceof TypeError}})()},{push:function(j){var _=u(this),D=c(_),Y=arguments.length;f(D+Y);for(var O=0;O<Y;O++)_[D]=arguments[O],D++;return p(_,D),D}})},8752:function(o,x,a){var s=a(9160),u=a(6420),c=a(908),p=a(6488),f="WebAssembly",j=u[f],_=new Error("e",{cause:7}).cause!==7,D=function(O,I){var N={};N[O]=p(O,I,_),s({global:!0,constructor:!0,arity:1,forced:_},N)},Y=function(O,I){if(j&&j[O]){var N={};N[O]=p(f+"."+O,I,_),s({target:f,stat:!0,constructor:!0,arity:1,forced:_},N)}};D("Error",(function(O){return function(I){return c(O,this,arguments)}})),D("EvalError",(function(O){return function(I){return c(O,this,arguments)}})),D("RangeError",(function(O){return function(I){return c(O,this,arguments)}})),D("ReferenceError",(function(O){return function(I){return c(O,this,arguments)}})),D("SyntaxError",(function(O){return function(I){return c(O,this,arguments)}})),D("TypeError",(function(O){return function(I){return c(O,this,arguments)}})),D("URIError",(function(O){return function(I){return c(O,this,arguments)}})),Y("CompileError",(function(O){return function(I){return c(O,this,arguments)}})),Y("LinkError",(function(O){return function(I){return c(O,this,arguments)}})),Y("RuntimeError",(function(O){return function(I){return c(O,this,arguments)}}))},508:function(o,x,a){var s=a(3476),u=a(6208).EXISTS,c=a(1664),p=a(2544),f=Function.prototype,j=c(f.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=c(_.exec);s&&!u&&p(f,"name",{configurable:!0,get:function(){try{return D(_,j(this))[1]}catch{return""}}})},232:function(o,x,a){var s=a(9160),u=a(9292);s({target:"Object",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},5443:function(o,x,a){var s=a(16),u=a(6076),c=a(7032);s||u(Object.prototype,"toString",c,{unsafe:!0})},880:function(o,x,a){var s=a(9160),u=a(7680);s({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9836:function(o,x,a){var s=a(8448),u=a(7176),c=a(3951),p=a(9760),f=a(7584),j=a(5016),_=a(5436),D=a(4504),Y=a(4764),O=a(9092);u("match",(function(I,N,S){return[function(v){var T=_(this),L=p(v)?void 0:D(v,I);return L?s(L,v,T):new RegExp(v)[I](j(T))},function(v){var T=c(this),L=j(v),m=S(N,T,L);if(m.done)return m.value;if(!T.global)return O(T,L);var P=T.unicode;T.lastIndex=0;for(var B,R=[],A=0;(B=O(T,L))!==null;){var H=j(B[0]);R[A]=H,H===""&&(T.lastIndex=Y(L,f(T.lastIndex),P)),A++}return A===0?null:R}]}))},3536:function(o,x,a){var s=a(9160),u=a(6420),c=a(6100),p=a(3951),f=a(4328),j=a(7796),_=a(2544),D=a(92),Y=a(9957),O=a(5152),I=a(9972),N=a(336).IteratorPrototype,S=a(3476),v=a(7048),T="constructor",L="Iterator",m=I("toStringTag"),P=TypeError,B=u[L],R=v||!f(B)||B.prototype!==N||!Y((function(){B({})})),A=function(){if(c(this,N),j(this)===N)throw new P("Abstract class Iterator not directly constructable")},H=function(J,ie){S?_(N,J,{configurable:!0,get:function(){return ie},set:function(ee){if(p(this),this===N)throw new P("You can't redefine this property");O(this,J)?this[J]=ee:D(this,J,ee)}}):N[J]=ie};O(N,m)||H(m,L),!R&&O(N,T)&&N[T]!==Object||H(T,A),A.prototype=N,s({global:!0,constructor:!0,forced:R},{Iterator:A})},2144:function(o,x,a){var s=a(9160),u=a(8448),c=a(8952),p=a(3951),f=a(6752),j=a(9724),_=a(8696),D=a(7048),Y=j((function(){for(var O,I,N=this.iterator,S=this.predicate,v=this.next;;){if(O=p(u(v,N)),this.done=!!O.done)return;if(I=O.value,_(N,S,[I,this.counter++],!0))return I}}));s({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(O){return p(this),c(O),new Y(f(this),{predicate:O})}})},9080:function(o,x,a){var s=a(9160),u=a(5792);s({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:u})}},z={};function $(o){var x=z[o];if(x!==void 0)return x.exports;var a=z[o]={exports:{}};return d[o].call(a.exports,a,a.exports,$),a.exports}$.d=function(o,x){for(var a in x)$.o(x,a)&&!$.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:x[a]})},$.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),$.o=function(o,x){return Object.prototype.hasOwnProperty.call(o,x)},$.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var X={};return(function(){$.r(X),$.d(X,{default:function(){return _}}),$(8752),$(6932),$(700),$(4456),$(4728),$(508),$(232),$(5443),$(880),$(9836),$(3536),$(2144),$(9080);var o=$(680);$(7476);function x(D,Y){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},x(D,Y)}var a=(function(D){var Y,O;function I(){for(var S,v=arguments.length,T=new Array(v),L=0;L<v;L++)T[L]=arguments[L];return(S=D.call.apply(D,[this].concat(T))||this).state={bump:!1,debounced:!1},S}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,x(Y,O);var N=I.prototype;return N.componentWillMount=function(){var S,v,T,L=this;this.debounceStatusUpdate=(S=function(){if(!L.state.debounced){var m=!L.props.isInFocus||L.props.validChoiceMade;L.setState((function(P){return{bump:!P.bump,debounced:!0,silenced:m}}))}},v=1400,function(){var m=this,P=arguments;clearTimeout(T),T=setTimeout((function(){T=null,S.apply(m,P)}),v)})},N.componentWillReceiveProps=function(S){S.queryLength,this.setState({debounced:!1})},N.render=function(){var S=this.props,v=S.id,T=S.length,L=S.queryLength,m=S.minQueryLength,P=S.selectedOption,B=S.selectedOptionIndex,R=S.tQueryTooShort,A=S.tNoResults,H=S.tSelectedOption,J=S.tResults,ie=S.className,ee=this.state,he=ee.bump,Z=ee.debounced,ue=ee.silenced,ae=L<m,ye=T===0,ce=P?H(P,T,B):"",Q=null;return Q=ae?R(m):ye?A():J(T,ce),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ie,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Z&&he?Q:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Z||he?"":Q))},I})(o.Component);a.defaultProps={tQueryTooShort:function(D){return"Type in "+D+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(D,Y,O){return D+" "+(O+1)+" of "+Y+" is highlighted"},tResults:function(D,Y){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+Y}};var s=function(D){var Y=D.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:Y,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function u(){return u=Object.assign?Object.assign.bind():function(D){for(var Y=1;Y<arguments.length;Y++){var O=arguments[Y];for(var I in O)Object.prototype.hasOwnProperty.call(O,I)&&(D[I]=O[I])}return D},u.apply(this,arguments)}function c(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function p(D,Y){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},p(D,Y)}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function j(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(D){var Y,O;function I(S){var v;return(v=D.call(this,S)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:S.defaultValue?[S.defaultValue]:[],query:S.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(c(v)),v.handleKeyDown=v.handleKeyDown.bind(c(v)),v.handleUpArrow=v.handleUpArrow.bind(c(v)),v.handleDownArrow=v.handleDownArrow.bind(c(v)),v.handleEnter=v.handleEnter.bind(c(v)),v.handlePrintableKey=v.handlePrintableKey.bind(c(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(c(v)),v.handleOptionBlur=v.handleOptionBlur.bind(c(v)),v.handleOptionClick=v.handleOptionClick.bind(c(v)),v.handleOptionFocus=v.handleOptionFocus.bind(c(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(c(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(c(v)),v.handleInputBlur=v.handleInputBlur.bind(c(v)),v.handleInputChange=v.handleInputChange.bind(c(v)),v.handleInputClick=v.handleInputClick.bind(c(v)),v.handleInputFocus=v.handleInputFocus.bind(c(v)),v.pollInputElement=v.pollInputElement.bind(c(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(c(v)),v}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,p(Y,O);var N=I.prototype;return N.isQueryAnOption=function(S,v){var T=this;return v.map((function(L){return T.templateInputValue(L).toLowerCase()})).indexOf(S.toLowerCase())!==-1},N.componentDidMount=function(){this.pollInputElement()},N.componentWillUnmount=function(){clearTimeout(this.$pollInput)},N.pollInputElement=function(){var S=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){S.pollInputElement()}),100)},N.getDirectInputChanges=function(){var S=this.elementReferences[-1];S&&S.value!==this.state.query&&this.handleInputChange({target:{value:S.value}})},N.componentDidUpdate=function(S,v){var T=this.state.focused,L=T===null,m=v.focused!==T;m&&!L&&this.elementReferences[T].focus();var P=T===-1,B=m&&v.focused===null;if(P&&B){var R=this.elementReferences[T];R.setSelectionRange(0,R.value.length)}},N.hasAutoselect=function(){return!j()&&this.props.autoselect},N.templateInputValue=function(S){var v=this.props.templates&&this.props.templates.inputValue;return v?v(S):S},N.templateSuggestion=function(S){var v=this.props.templates&&this.props.templates.suggestion;return v?v(S):S},N.handleComponentBlur=function(S){var v,T=this.state,L=T.options,m=T.query,P=T.selected;this.props.confirmOnBlur?(v=S.query||m,this.props.onConfirm(L[P])):v=m,this.setState({focused:null,menuOpen:S.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,L)})},N.handleListMouseLeave=function(S){this.setState({hovered:null})},N.handleOptionBlur=function(S,v){var T=this.state,L=T.focused,m=T.menuOpen,P=T.options,B=T.selected,R=S.relatedTarget===null,A=S.relatedTarget===this.elementReferences[-1],H=L!==v&&L!==-1;if(!H&&R||!(H||A)){var J=m&&j();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(P[B])})}},N.handleInputBlur=function(S){var v=this.state,T=v.focused,L=v.menuOpen,m=v.options,P=v.query,B=v.selected;if(T===-1){var R=L&&j(),A=j()?P:this.templateInputValue(m[B]);this.handleComponentBlur({menuOpen:R,query:A})}},N.handleInputChange=function(S){var v=this,T=this.props,L=T.minLength,m=T.source,P=T.showAllValues,B=this.hasAutoselect(),R=S.target.value,A=R.length===0,H=this.state.query!==R,J=R.length>=L;this.setState({query:R,ariaHint:A}),P||!A&&H&&J?m(R,(function(ie){var ee=ie.length>0;v.setState({menuOpen:ee,options:ie,selected:B&&ee?0:-1,validChoiceMade:!1})})):!A&&J||this.setState({menuOpen:!1,options:[]})},N.handleInputClick=function(S){this.handleInputChange(S)},N.handleInputFocus=function(S){var v=this.state,T=v.query,L=v.validChoiceMade,m=v.options,P=this.props.minLength,B=!L&&T.length>=P&&m.length>0;B?this.setState((function(R){var A=R.menuOpen;return{focused:-1,menuOpen:B||A,selected:-1}})):this.setState({focused:-1})},N.handleOptionFocus=function(S){this.setState({focused:S,hovered:null,selected:S})},N.handleOptionMouseEnter=function(S,v){j()||this.setState({hovered:v})},N.handleOptionClick=function(S,v){var T=this.state.options[v],L=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:L,selected:-1,validChoiceMade:!0}),this.forceUpdate()},N.handleOptionMouseDown=function(S){S.preventDefault()},N.handleUpArrow=function(S){S.preventDefault();var v=this.state,T=v.menuOpen,L=v.selected;L!==-1&&T&&this.handleOptionFocus(L-1)},N.handleDownArrow=function(S){var v=this;if(S.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)S.preventDefault(),this.props.source("",(function(B){v.setState({menuOpen:!0,options:B,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,L=T.menuOpen,m=T.options,P=T.selected;P!==m.length-1&&L&&this.handleOptionFocus(P+1)}},N.handleSpace=function(S){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(S.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(S.preventDefault(),this.handleOptionClick(S,this.state.focused))},N.handleEnter=function(S){this.state.menuOpen&&(S.preventDefault(),this.state.selected>=0&&this.handleOptionClick(S,this.state.selected))},N.handlePrintableKey=function(S){var v=this.elementReferences[-1];S.target===v||v.focus()},N.handleKeyDown=function(S){switch(f[S.keyCode]){case"up":this.handleUpArrow(S);break;case"down":this.handleDownArrow(S);break;case"space":this.handleSpace(S);break;case"enter":this.handleEnter(S);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=S.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(S)}var v},N.render=function(){var S,v=this,T=this.props,L=T.cssNamespace,m=T.displayMenu,P=T.id,B=T.minLength,R=T.name,A=T.placeholder,H=T.required,J=T.showAllValues,ie=T.tNoResults,ee=T.tStatusQueryTooShort,he=T.tStatusNoResults,Z=T.tStatusSelectedOption,ue=T.tStatusResults,ae=T.tAssistiveHint,ye=T.dropdownArrow,ce=T.menuAttributes,Q=T.inputClasses,ve=T.hintClasses,Ne=T.menuClasses,_e=this.state,Ce=_e.focused,Re=_e.hovered,ze=_e.menuOpen,C=_e.options,b=_e.query,V=_e.selected,k=_e.ariaHint,E=_e.validChoiceMade,F=this.hasAutoselect(),te=Ce===-1,se=C.length===0,be=b.length!==0,de=b.length>=B,me=this.props.showNoOptionsFound&&te&&se&&be&&de,xe=L+"__wrapper",Ae=L+"__status",$e=L+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=L+"__option",Qe=L+"__hint",ge=this.templateInputValue(C[V]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&F?b+ge.substr(b.length):"",Ze=P+"__assistiveHint",tt={"aria-describedby":k?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?P+"__option--"+Ce:null,"aria-controls":P+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(S=ye({className:$e}))=="string"&&(S=(0,o.createElement)("div",{className:L+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:S}}));var ht=L+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Q&&vt.push(Q);var pt=L+"__menu",lt=[pt,pt+"--"+m,pt+"--"+(ze||me?"visible":"hidden")];Ne&<.push(Ne),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var _t=Object.assign({"aria-labelledby":P},ce,{id:P+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:xe,onKeyDown:this.handleKeyDown},(0,o.createElement)(a,{id:P,length:C.length,queryLength:b.length,minQueryLength:B,selectedOption:this.templateInputValue(C[V]),selectedOptionIndex:V,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:he,tSelectedOption:Z,tResults:ue,className:Ae}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Qe,ve===null?Q:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",u({},tt,{autoComplete:"off",className:vt.join(" "),id:P,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:R,placeholder:A,ref:function(bt){v.elementReferences[-1]=bt},type:"text",role:"combobox",required:H,value:b})),S,(0,o.createElement)("ul",_t,C.map((function(bt,Ue){var gt=(Ce===-1?V===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=j()?"<span id="+P+"__option-suffix--"+Ue+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Ue+1)+" of "+C.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:v.templateSuggestion(bt)+ut},id:P+"__option--"+Ue,key:Ue,onBlur:function(it){return v.handleOptionBlur(it,Ue)},onClick:function(it){return v.handleOptionClick(it,Ue)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(it){return v.handleOptionMouseEnter(it,Ue)},ref:function(it){v.elementReferences[Ue]=it},role:"option",tabIndex:"-1","aria-posinset":Ue+1,"aria-setsize":C.length})})),me&&(0,o.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,o.createElement)("span",{id:Ze,style:{display:"none"}},ae()))},I})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:s,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),X})()}))})(ya)),ya.exports}var rr,bn;function Tc(){return bn||(bn=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:y,defaultValue:i="",onConfirm:g,source:d,disabled:z,onClear:$,tClearInput:X=()=>"Clear input",...o})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{y!==void 0&&a(y)},[y]),q.useEffect(()=>{z?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[z]);const s=()=>{$&&$()},u=(p,f)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&d(p,f)},c=p=>{p?g(p):a(y)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...o,defaultValue:i,onConfirm:c,source:u}),!!(y&&y.length>0&&!z)&&h.jsx("button",{onClick:s,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":X(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:X()})})]})},Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Ic=({position:y,areasLayer:i,bounds:g,onMarkedMoved:d})=>{const z=q.useRef(null);let $=null;const[X,o]=q.useState([]),x=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),a=[41.9,12.5],s=()=>{const u=Rt.map(z.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(u),i&&i.map(p=>{p.addTo(u)});const c=y?[`${y.lat}`,`${y.lon}`]:g?g.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),$=Rt.marker(c,{draggable:!0}).addTo(u),$.on("moveend",function(p){const f=p.target.getLatLng();d(f,$)}),!y&&g)u.fitBounds(g);else{const p=y?[y.lat,y.lon]:a;$&&($.setLatLng(p).update(),u.setView(p,15))}};return q.useEffect(()=>{z.current&&s()},[z]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:z,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:y,value:i,current:g,onChange:d,i18next:z})=>{const[$,X]=q.useState(null),[o,x]=q.useState([]),[a,s]=q.useState(),[u,c]=q.useState(),[p,f]=q.useState(!1),[j,_]=q.useState(),[D,Y]=q.useState(!1),[O,I]=q.useState(),[N,S]=q.useState(),[v,T]=q.useState(!1),[L,m]=q.useState(""),[P,B]=q.useState(""),[R,A]=q.useState(!1),[H,J]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:he}=window.OC_SERVICE_DETAILS,Z=q.useRef(),ue=z.language;let ae=Rt.latLngBounds();const ye=ee||(he&&he.length>0?he:void 0),ce=(C,b)=>{Z.current=C;const V=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(C)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let k=[],E=[];Y(!0),fetch(V).then(F=>F.json()).then(F=>{if(F.length&&Z.current===C){Y(!0);const te=F.map((se,be)=>{const{lat:de,lon:me}=se,xe=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${j.join(",")}`;return fetch(xe).then(Ae=>Ae.json()).then(Ae=>Ae.result?(se.label=Za(se),se):null)});return Promise.all(te)}else Z.current===C&&(b([]),Y(!1))}).then(F=>{F=F?F.filter(te=>te!==null):[],F.length>0?(F.forEach((te,se)=>{F[se].label=Za(te)}),F=en.uniqWith(F,(te,se)=>te.label===se.label),F.forEach((te,se)=>{E.push(te.label),k.push(te)}),Z.current===C&&(b(E),x(k),Y(!1))):Z.current===C&&(b([]),Y(!1))}).catch(F=>{console.error("Error fetching locations:",F),Y(!1)})},Q=(C,b)=>{ce(C,b)},ve=(C,b)=>{const{lat:V,lng:k}=C,E=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${V}&lon=${k}&accept-language=${ue}`;fetch(E).then(F=>F.json()).then(F=>{if(F&&F.display_name)if(F.label=Za(F),F.lat=V,F.lon=k,b)b.bindPopup(`${F.label}`).openPopup(),S(F);else{S(F);return}}).catch(F=>console.error("Error with reverse geocoding:",F))};function Ne(){navigator.geolocation.getCurrentPosition(C=>{let b=C.coords.latitude,V=C.coords.longitude;if((j||[]).length>0){const E=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${V}&geographic_areas_ids=${j.join(",")}`;fetch(E).then(F=>F.json()).then(F=>{F.result&&(X({lat:b,lon:V}),ve({lat:b,lng:V})),J(!H)})}else X({lat:b,lon:V}),ve({lat:b,lng:V}),J(!H)},C=>{(C==null?void 0:C.code)===1?(A(!R),B(z.t("error_message_code_1"))):(C==null?void 0:C.code)===2?(A(!R),B(z.t("error_message_code_2"))):(C==null?void 0:C.code)===3?(A(!R),B(z.t("error_message_code_3"))):(A(!R),B(z.t("error_message_generic")))})}q.useEffect(()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)},[i,g]);const _e=()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)};q.useEffect(()=>{var C;(C=window==null?void 0:window.Formio)==null||C.formioReady.then(()=>{setTimeout(()=>{_e(),Ce()},1)})},[]);const Ce=()=>{let b=`${Fe()}/api/geographic-areas`,V=[],k=[];fetch(b).then(E=>E.json()).then(E=>{if(Array.isArray(E)&&E.length>0){E.filter(se=>ye?Array.isArray(ye)?ye.includes(se.id):se.id===ye:!0).forEach(se=>{V.push(se.id);const be=JSON.parse(se.geofence),de=Rt.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});ae.extend(de.getBounds()),k.push(de)}),c(k),_(V),I(ae);const F=ae.getNorthEast(),te=ae.getSouthWest();s([F.lng,F.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(E=>{console.error("Error with reverse geocoding:",E)})},Re=()=>{m($!=null&&$.label?$.label:"")};q.useEffect(()=>{Re(),d($)},[$]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const ze=()=>{if(N){const C=`${Fe()}/api/geographic-areas/contains?lat=${N.lat}&lon=${N.lon}&geographic_areas_ids=${j.join(",")}`;f(!0),fetch(C).then(b=>b.json()).then(b=>{f(!1),b?b.result===!1?Je.fire({title:"",html:"<p>"+z.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!H),X(N)):(f(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Je.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${y.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:H,size:"lg",scrollable:!0,toggle:()=>J(!H),labelledBy:"esempio2",container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>J(!H),id:"esempio2",children:z.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:z.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),h.jsx(Ic,{position:$,areasLayer:u,bounds:O,onMarkedMoved:(C,b)=>{ve(C,b)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!H),children:z.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!N||p,children:z.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:R,toggle:()=>A(!R),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:z.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:P})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>A(!R),children:z.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${y.id}-${y.key}`,inputClasses:"form-control",source:en.debounce(Q,520),onConfirm:C=>{if(Y(!1),Z.current="",C){C===""&&X(null);let b=o.find(V=>V.label===C);X(b)}},onClear:()=>{Y(!1),Z.current="",X(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:$==null?void 0:$.label,value:L,tNoResults:()=>z.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>z.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&h.jsxs(le.Button,{type:"button",value:z.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),S(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:z.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:ja.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this},this.dataValue))}setValue(i){this.valuePosition=i,this.updateValue(i)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Ct(ja,"editForm",Yc);let Ma=ja;const zc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Lc(...y){return ot.Components.baseEditForm([{key:"display",components:zc}],...y)}const wn=cr.Formio.Components.components.input,Wc=({component:y,current:i,onChange:g,i18next:d})=>{var B,R;const z="list-services",$="selected-category",[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(null),[c,p]=q.useState(null),[f,j]=q.useState(""),[_,D]=q.useState(!1),[Y,O]=q.useState(!1),I=q.useRef(!1),N=q.useRef(),S=q.useMemo(()=>{if(!s)return null;const A=x.find(J=>J.name===s);return A||X.find(J=>J.name===s)||null},[s,x,X]),v=q.useMemo(()=>(S==null?void 0:S.services)||[],[S]),T=async()=>{var Z,ue;O(!0);const A=sessionStorage.getItem(z),H=sessionStorage.getItem($);if(A)try{const ae=JSON.parse(A);if(Array.isArray(ae)&&ae.length>0){o(ae),a(ae);const ye=ae.find(ce=>ce.name===H)||ae[0];return u((ye==null?void 0:ye.name)||null),O(!1),ae}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),ie={};J.forEach(ae=>{(ae.categories??[]).forEach(ye=>{ie[ye]||(ie[ye]={name:ye,services:[]}),ie[ye].services.push(ae)})});const ee=Object.fromEntries(Object.entries(ie).sort(([ae],[ye])=>ae.localeCompare(ye,"it",{sensitivity:"base"}))),he=Object.values(ee).filter(ae=>(ae.name??"").trim()!=="");return o(he),a(he),u(((Z=he[0])==null?void 0:Z.name)||null),sessionStorage.setItem(z,JSON.stringify(he)),sessionStorage.setItem($,((ue=he[0])==null?void 0:ue.name)||""),O(!1),he};q.useEffect(()=>{s&&sessionStorage.setItem($,s)},[s]),q.useEffect(()=>{I.current||(I.current=!0,T())},[]);const L=A=>{var Q;const H=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),ie=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${H(Ne)}`,"i").test(ve),he=(ve,Ne)=>{const _e=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(ie(ve.abstract??""));if(!Ne.every(b=>ee(_e,b)||ee(Ce,b)||ee(Re,b)))return-1;let C=0;for(const b of Ne)ee(_e,b)?C+=3:ee(Ce,b)?C+=2:ee(Re,b)&&(C+=1);return C},Z=A.target.value;j(Z);const ue=J(Z);if(!ue){a(X),u(ve=>{var Ne;return ve??((Ne=X[0])==null?void 0:Ne.name)??null});return}const ae=ue.split(" ").filter(Boolean),ye=X.map(ve=>{const Ne=ve.services.map(_e=>({service:_e,score:he(_e,ae)})).filter(_e=>_e.score>=0).sort((_e,Ce)=>Ce.score-_e.score).map(_e=>_e.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(ye);const ce=ye.some(ve=>ve.name===s);u(ce?s:((Q=ye[0])==null?void 0:Q.name)??null)},m=A=>{p(A);const H=X.find(J=>J.services.some(ie=>ie.id===A.id));H&&u(H.name),g({id:A.id,link:A.link,name:A.name,show_howto_in_motivation:A.show_howto_in_motivation,categories:A.categories,offices:A.offices,abstract:A.abstract,view_type:A.view_type}),i.data.user_group=null,Tn()},P=A=>{u(A.name),p(null),j(""),a(X),g({})};return q.useEffect(()=>{const A=!!document.querySelector(".formio-read-only");D(A)},[]),q.useEffect(()=>{const A=setTimeout(()=>{const H=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(H!=null&&H.id&&(p(H),X.length>0)){const J=X.find(ie=>ie.services.some(ee=>ee.id===H.id));J&&u(J.name)}},500);return()=>clearTimeout(A)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,X]),q.useEffect(()=>{const A=window.FormioInstance;if(!A)return;const H=()=>{var ie,ee,he;const J=(he=(ie=A.submission)==null?void 0:ie.data)==null?void 0:he[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(J!=null&&J.id&&(p(J),X.length>0)){const Z=X.find(ue=>ue.services.some(ae=>ae.id===J.id));Z&&u(Z.name)}};return A.on("change",H),()=>A.off("change",H)},[X,(B=i==null?void 0:i.component)==null?void 0:B.key]),Y?h.jsx("div",{className:"services-booking",ref:N,children:h.jsxs("div",{children:[d.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:N,children:X&&!_?h.jsxs(le.Container,{children:[h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(le.Input,{id:"search",label:d.t("Cerca"),type:"text",value:f,onChange:L,onInput:L,infoText:d.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[S?h.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:h.jsxs("div",{className:"categories-list",children:[h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Categorie")}),x.length>0&&x.map(A=>{const H=s===A.name;return h.jsxs("button",{onClick:()=>P(A),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${H?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:A.name}),h.jsxs("small",{className:`d-block mt-1 ${H?"text-white":"text-muted"}`,children:[A.services.length," ",A.services.length>1?d.t("servizi"):d.t("servizio")]})]},A.name)})]})}):null,h.jsx(le.Col,{lg:S?9:12,md:S?8:12,children:h.jsxs("div",{className:"services-container",children:[v.length>0?h.jsxs("div",{className:"services-header mb-4",children:[h.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:S==null?void 0:S.name}),h.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?h.jsx("div",{className:"services-list",children:v.map(A=>{const H=(c==null?void 0:c.id)===A.id,J=Mn.sanitize(A==null?void 0:A.abstract);return h.jsx("button",{onClick:()=>m(A),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${H?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${A.name}`,"aria-pressed":H,children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsxs("div",{className:"flex-grow-1",children:[h.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:A.name}),(A==null?void 0:A.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},A.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:d.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?h.jsx("fieldset",{className:"it-page-section",children:h.jsx("div",{className:"cmp-card mt-2",children:h.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[h.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:h.jsx("div",{className:"d-flex",children:h.jsx("h2",{className:"title-xxlarge mb-1",children:S==null?void 0:S.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(R=i==null?void 0:i.dataValue)!=null&&R.id?h.jsx("div",{className:"services-list",children:h.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsx("div",{className:"flex-grow-1",children:h.jsx("p",{className:"mb-2 text-dark text-paragraph",children:i.dataValue.name})})})},i.dataValue.id)}):null})]})})}):null})},Ta=class Ta extends wn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Ta.schema()}}static schema(){return wn.schema({type:"list-services"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:g,component:this.component,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.shouldSetValue=!0,this.updateValue(i))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Ct(Ta,"editForm",Lc);let Sa=Ta;const ur={pagebreak:_a,dynamic_calendar:On,calendar:ba,"calendar-advanced":wa,sdcfile:xa,address_map:Ma,"list-services":Sa};function Vc(y){if(!y||typeof y.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,g])=>{y.addComponent(i,g)}),ur}exports.Calendar=ba;exports.CalendarAdvanced=wa;exports.FormioAddressMap=Ma;exports.FormioDynamicCalendar=On;exports.FormioListServices=Sa;exports.FormioPageBreak=_a;exports.SdcFile=xa;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
104
|
+
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],Mc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function xc(...f){return ot.Components.baseEditForm([{key:"display",components:_c},{key:"data",components:bc},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:Mc}],...f)}document.documentElement.lang.toString();class Sc{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let i=this;await qt.get(i.basePath+"/api/session-auth").then(g=>{i.token=g.data.token}).catch(g=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(g,l)=>{aa("auth-token")?g({token:aa("auth-token")}):await qt.get(i.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(V=>{const B=sl.jwtDecode(V.data.token);B.exp&&oc("auth-token",V.data.token,B.exp)}).catch(V=>{console.log(V)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(g=>{this.token=g.token,i(this.token)})}}const vn=cr.Formio.Components.components.file;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState([]),[X,s]=q.useState(new Map),[x,a]=q.useState(!1),o=new Sc;q.useEffect(()=>{o.getSessionAuthTokenPromise()},[]);const c=(_,M)=>{s(z=>{const H=new Map(z);return H.set(_,{...M,progress:Number(M==null?void 0:M.progress)||0}),H})};function d(_){return _.size>(y(f.fileMaxSize)||y("1GB"))?{code:"size-files",message:`${l.t("I file non possono superare le dimensioni di")} ${f.fileMaxSize?f.fileMaxSize:"1GB"}`}:V.length>=(f.maxFiles?parseInt(f.maxFiles):f.multiple?100:1)?{code:"too-many-files",message:`${l.t("Puoi caricare massimo ")} ${f.maxFiles||100} ${l.t("file")}`}:_.size<y(f.fileMinSize)?{code:"file-too-small",message:`${l.t("I file devono avare una dimensione superiore a ")} ${f.fileMinSize}`}:null}function p(){if(f.filePattern){const M=f.filePattern.split(",").map(z=>z.trim()).filter(Boolean).reduce((z,H)=>{const F=H.startsWith(".")?H:`.${H}`,E=il.getType(F);return E&&(z[E]||(z[E]=[]),z[E].push(F)),z},{});return Object.keys(M).length?M:void 0}else return!0}const m=_=>{let M={};return M.originalName=_.originalName?_.originalName:_.name,M.name=_.name,M.url=_.url,M.data=_.data,M.signature_validation=_.signature_validation,M.mime_type=_.mime_type,M.storage="url",M.size=_.size,M},{getRootProps:T,getInputProps:v,fileRejections:D,isDragActive:O,open:j}=nl.useDropzone({onDrop:_=>{_.map(M=>{k(M).then(z=>{})})},maxFiles:f.maxFiles?parseInt(f.maxFiles)-V.length:f.multiple?100:1,validator:d,accept:p()}),R=_=>{const M=Fe()+"/api/attachments/"+_.data.id;fetch(M,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{B(z=>{let H=z.filter(F=>F.data.id!==_.data.id);return g(H),H})}).catch(z=>{Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(z)})},N=()=>{const _=i!=null&&i.dataValue?i.dataValue:null;(_==null?void 0:_.length)>0&&(B(_),setTimeout(()=>{g(_)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&x===!1?(a(!0),setTimeout(()=>{N()},1e3)):(a(!1),setTimeout(()=>{N()},1e3))},[]);async function k(_){let M;const z=Fe()+"/it/upload";let H={mime_type:_.type,name:_.name,original_filename:_.name,protocol_required:f.protocol_required,size:_.size};return await qt.post(z,H,{maxContentLength:1/0,maxBodyLength:1/0}).then(async F=>(M=F.data.id,_.url=Fe()+"/it/allegati/"+M,_.storage="url",_.mime_type=_.type,_.protocol_required=f.protocol_required,_.data={...F.data,baseUrl:Fe()+"/it/allegati/"+M},c(M,_),await qt.put(F.data.uri,_,{onUploadProgress:E=>{let $=Math.round(E.loaded*100/E.total);s(J=>{const re=new Map(J),ee=_;return ee.progress=parseInt($),re.has(M)&&re.set(M,ee),re})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async E=>{const $=/\\|"/gi,J=E.headers.etag.replace($,"")||null;return await qt.put(Fe()+"/it/upload/"+M,{file_hash:J,check_signature:f.check_signature}).then(async re=>{s(Q=>{const ue=new Map(Q);return ue.delete(M),ue});let ee=i.dataValue||[],fe=null;if(B(Q=>{const ue=[...Q,m(_)];return fe=ue.length-1,g(ue),ue}),f.check_signature&&re.data.url&&lr)return await qt.post(lr,{url:re.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(Q=>{_.signature_validation=Q.data.sign,ee[fe].signature_validation=Q.data.sign}).catch(Q=>{ee[fe].signature_validation="File validation error: "+Q});s(Q=>{const ue=new Map(Q);return ue.delete(M),ue})}).catch(re=>{s(ee=>{const fe=new Map(ee);return fe.delete(M),fe}),console.log(re),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(E=>{s($=>{const J=new Map($);return J.delete(M),J}),console.log(E),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(F=>{console.log(F),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),s(E=>{const $=new Map(E);return $.delete(M),$})})}function y(_){if(typeof _=="string"){if(_.search(/kb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024);if(_.search(/mb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024*1024);if(_.search(/gb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024*1024*1024);if(_.search(/b/i)===_.length-1||_.search(/s/i)===_.length-1)return parseFloat(_.substring(0,_.length-1));if(_.search(/m/i)===_.length-1)return parseFloat(_.substring(0,_.length-1)*60);if(_.search(/h/i)===_.length-1)return parseFloat(_.substring(0,_.length-1)*3600)}return _}function C(_,M=2){if(!+_)return"0 Bytes";const z=1024,H=M<0?0:M,F=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],E=Math.floor(Math.log(_)/Math.log(z));return`${parseFloat((_/Math.pow(z,E)).toFixed(H))} ${F[E]}`}return i.conditionallyHidden()||i.visible===!1?null:h.jsx(h.Fragment,{children:x?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[V.map((_,M)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("File caricato:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]})]},_.size+M)),V.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:l.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[f.hideLabel||f.hidden?"":h.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${f.id}-${f.key}`,title:f.tooltip||void 0,children:[f.label,f.validate.required&&h.jsx("span",{className:"text-danger"}),f.tooltip&&h.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":f.tooltip,"aria-expanded":"false"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${O?" dragover":""}`,style:{border:"dashed"},...T({onClick:_=>_.stopPropagation()}),children:[h.jsx("input",{id:`${f.id}-${f.key}`,"aria-describedby":`file-uploader-description-${f.id}-${f.key}`,...v()}),h.jsxs("div",{className:`upload-dragdrop${O?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:l.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${f.id}-${f.key}`,children:l.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[l.t("oppure"),h.jsx(le.Button,{tag:"input",type:"button",value:l.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsx("div",{dangerouslySetInnerHTML:{__html:xn.sanitize(f.description||"")}}),h.jsxs("ul",{className:"upload-file-list my-0",children:[V.map((_,M)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("File caricato:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>R(_),children:h.jsx(le.Icon,{title:`${l.t("Elimina file caricato")} ${_.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},_.size+M)),Array.from(X.entries()).map(([_,M])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("Caricamento file:")}),M.name,h.jsx("span",{className:"upload-file-weight",children:C(M.size)})]}),h.jsx(le.Progress,{value:Number(M==null?void 0:M.progress)||0})]},_))]}),!!(D&&D.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:D.map(({file:_,errors:M},z)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),h.jsxs("p",{className:"text-wrap error",children:[h.jsx("span",{className:"visually-hidden",children:l.t("Errore caricamento file:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]})]}),h.jsx("div",{children:M.map(H=>H.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[l.t("I file possono essere di tipo "),f.filePattern]}):H.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[l.t("Puoi caricare massimo ")," ",f.maxFiles?f.maxFiles:f.multiple?100:1," ",l.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:H.message}))})]},_.size+z))})})]})})},Oa=class Oa extends vn{constructor(i,g,l){super({...i,multiple:i.multiple},g,l),this.reactRef=null,this.lastRenderedVisible=void 0}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Oa.schema()}}static schema(){return vn.schema({type:"sdcfile"})}renderReact(i=this.reactRef){this.rootComponent&&this.rootComponent.render(h.jsx(Dc,{ref:i,component:this.component,onChange:g=>this.setValue(g),...this,current:this}))}attach(i,g){this.reactRef=g,this.rootComponent=Ft.createRoot(i),this.lastRenderedVisible=this.visible,this.renderReact(g)}setValue(i,g={}){const l=this.updateValue(i,g);return this.shouldSetValue=!0,l}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}checkCondition(i,g){const l=super.checkCondition(i,g),V=this.visible;return this.lastRenderedVisible!==V&&(this.lastRenderedVisible=V,this.renderReact()),l}validate(i,g,l){return super.validate(i,g,l)}checkValidity(i,g,l){return super.checkValidity(i,g,l),console.log("qui1",this.error.message),this.error&&this.error.message?(console.log("qui",this.error.message),this.error.message==="Campo richiesto"?!1:(this.error.message=null,this.error.messages=null,!0)):!0}};Ct(Oa,"editForm",xc);let Ma=Oa;const kc=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function Yc(...f){return ot.Components.baseEditForm([{key:"display",components:kc}],...f)}var ya={exports:{}},Oc=ya.exports,bn;function jc(){return bn||(bn=1,(function(f,i){(function(g,l){f.exports=l(q)})(Oc,(function(g){return(function(){var l={680:function(s){s.exports=g},8952:function(s,x,a){var o=a(4328),c=a(36),d=TypeError;s.exports=function(p){if(o(p))return p;throw new d(c(p)+" is not a function")}},2096:function(s,x,a){var o=a(2424),c=String,d=TypeError;s.exports=function(p){if(o(p))return p;throw new d("Can't set "+c(p)+" as a prototype")}},4764:function(s,x,a){var o=a(9764).charAt;s.exports=function(c,d,p){return d+(p?o(c,d).length:1)}},6100:function(s,x,a){var o=a(7e3),c=TypeError;s.exports=function(d,p){if(o(p,d))return d;throw new c("Incorrect invocation")}},3951:function(s,x,a){var o=a(1632),c=String,d=TypeError;s.exports=function(p){if(o(p))return p;throw new d(c(p)+" is not an object")}},2504:function(s,x,a){var o=a(4096),c=a(2495),d=a(3556),p=function(m){return function(T,v,D){var O=o(T),j=d(O);if(j===0)return!m&&-1;var R,N=c(D,j);if(m&&v!=v){for(;j>N;)if((R=O[N++])!=R)return!0}else for(;j>N;N++)if((m||N in O)&&O[N]===v)return m||N||0;return!m&&-1}};s.exports={includes:p(!0),indexOf:p(!1)}},3364:function(s,x,a){var o=a(8992),c=a(1664),d=a(5712),p=a(4356),m=a(3556),T=a(2568),v=c([].push),D=function(O){var j=O===1,R=O===2,N=O===3,k=O===4,y=O===6,C=O===7,_=O===5||y;return function(M,z,H,F){for(var E,$,J=p(M),re=d(J),ee=m(re),fe=o(z,H),Q=0,ue=F||T,se=j?ue(M,ee):R||C?ue(M,0):void 0;ee>Q;Q++)if((_||Q in re)&&($=fe(E=re[Q],Q,J),O))if(j)se[Q]=$;else if($)switch(O){case 3:return!0;case 5:return E;case 6:return Q;case 2:v(se,E)}else switch(O){case 4:return!1;case 7:v(se,E)}return y?-1:N||k?k:se}};s.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},953:function(s,x,a){var o=a(9957),c=a(9972),d=a(8504),p=c("species");s.exports=function(m){return d>=51||!o((function(){var T=[];return(T.constructor={})[p]=function(){return{foo:1}},T[m](Boolean).foo!==1}))}},1496:function(s,x,a){var o=a(9957);s.exports=function(c,d){var p=[][c];return!!p&&o((function(){p.call(null,d||function(){return 1},1)}))}},6728:function(s,x,a){var o=a(3476),c=a(1432),d=TypeError,p=Object.getOwnPropertyDescriptor,m=o&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(T){return T instanceof TypeError}})();s.exports=m?function(T,v){if(c(T)&&!p(T,"length").writable)throw new d("Cannot set read only .length");return T.length=v}:function(T,v){return T.length=v}},6736:function(s,x,a){var o=a(1432),c=a(6072),d=a(1632),p=a(9972)("species"),m=Array;s.exports=function(T){var v;return o(T)&&(v=T.constructor,(c(v)&&(v===m||o(v.prototype))||d(v)&&(v=v[p])===null)&&(v=void 0)),v===void 0?m:v}},2568:function(s,x,a){var o=a(6736);s.exports=function(c,d){return new(o(c))(d===0?0:d)}},8696:function(s,x,a){var o=a(3951),c=a(3112);s.exports=function(d,p,m,T){try{return T?p(o(m)[0],m[1]):p(m)}catch(v){c(d,"throw",v)}}},1888:function(s,x,a){var o=a(1664),c=o({}.toString),d=o("".slice);s.exports=function(p){return d(c(p),8,-1)}},4427:function(s,x,a){var o=a(16),c=a(4328),d=a(1888),p=a(9972)("toStringTag"),m=Object,T=d((function(){return arguments})())==="Arguments";s.exports=o?d:function(v){var D,O,j;return v===void 0?"Undefined":v===null?"Null":typeof(O=(function(R,N){try{return R[N]}catch{}})(D=m(v),p))=="string"?O:T?d(D):(j=d(D))==="Object"&&c(D.callee)?"Arguments":j}},9968:function(s,x,a){var o=a(5152),c=a(9252),d=a(9444),p=a(8352);s.exports=function(m,T,v){for(var D=c(T),O=p.f,j=d.f,R=0;R<D.length;R++){var N=D[R];o(m,N)||v&&o(v,N)||O(m,N,j(T,N))}}},2272:function(s,x,a){var o=a(9957);s.exports=!o((function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype}))},3336:function(s){s.exports=function(x,a){return{value:x,done:a}}},3440:function(s,x,a){var o=a(3476),c=a(8352),d=a(9728);s.exports=o?function(p,m,T){return c.f(p,m,d(1,T))}:function(p,m,T){return p[m]=T,p}},9728:function(s){s.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(s,x,a){var o=a(3476),c=a(8352),d=a(9728);s.exports=function(p,m,T){o?c.f(p,m,d(0,T)):p[m]=T}},2544:function(s,x,a){var o=a(5312),c=a(8352);s.exports=function(d,p,m){return m.get&&o(m.get,p,{getter:!0}),m.set&&o(m.set,p,{setter:!0}),c.f(d,p,m)}},6076:function(s,x,a){var o=a(4328),c=a(8352),d=a(5312),p=a(4636);s.exports=function(m,T,v,D){D||(D={});var O=D.enumerable,j=D.name!==void 0?D.name:T;if(o(v)&&d(v,j,D),D.global)O?m[T]=v:p(T,v);else{try{D.unsafe?m[T]&&(O=!0):delete m[T]}catch{}O?m[T]=v:c.f(m,T,{value:v,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return m}},4036:function(s,x,a){var o=a(6076);s.exports=function(c,d,p){for(var m in d)o(c,m,d[m],p);return c}},4636:function(s,x,a){var o=a(6420),c=Object.defineProperty;s.exports=function(d,p){try{c(o,d,{value:p,configurable:!0,writable:!0})}catch{o[d]=p}return p}},3476:function(s,x,a){var o=a(9957);s.exports=!o((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(s,x,a){var o=a(6420),c=a(1632),d=o.document,p=c(d)&&c(d.createElement);s.exports=function(m){return p?d.createElement(m):{}}},4316:function(s){var x=TypeError;s.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(s){s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(s,x,a){var o,c,d=a(6420),p=a(6064),m=d.process,T=d.Deno,v=m&&m.versions||T&&T.version,D=v&&v.v8;D&&(c=(o=D.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!c&&p&&(!(o=p.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=p.match(/Chrome\/(\d+)/))&&(c=+o[1]),s.exports=c},8256:function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(s,x,a){var o=a(1664),c=Error,d=o("".replace),p=String(new c("zxcasd").stack),m=/\n\s*at [^:]*:[^\n]*/,T=m.test(p);s.exports=function(v,D){if(T&&typeof v=="string"&&!c.prepareStackTrace)for(;D--;)v=d(v,m,"");return v}},3696:function(s,x,a){var o=a(3440),c=a(6520),d=a(9184),p=Error.captureStackTrace;s.exports=function(m,T,v,D){d&&(p?p(m,T):o(m,"stack",c(v,D)))}},9184:function(s,x,a){var o=a(9957),c=a(9728);s.exports=!o((function(){var d=new Error("a");return!("stack"in d)||(Object.defineProperty(d,"stack",c(1,7)),d.stack!==7)}))},9160:function(s,x,a){var o=a(6420),c=a(9444).f,d=a(3440),p=a(6076),m=a(4636),T=a(9968),v=a(6704);s.exports=function(D,O){var j,R,N,k,y,C=D.target,_=D.global,M=D.stat;if(j=_?o:M?o[C]||m(C,{}):o[C]&&o[C].prototype)for(R in O){if(k=O[R],N=D.dontCallGetSet?(y=c(j,R))&&y.value:j[R],!v(_?R:C+(M?".":"#")+R,D.forced)&&N!==void 0){if(typeof k==typeof N)continue;T(k,N)}(D.sham||N&&N.sham)&&d(k,"sham",!0),p(j,R,k,D)}}},9957:function(s){s.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(s,x,a){a(880);var o=a(8448),c=a(6076),d=a(7680),p=a(9957),m=a(9972),T=a(3440),v=m("species"),D=RegExp.prototype;s.exports=function(O,j,R,N){var k=m(O),y=!p((function(){var z={};return z[k]=function(){return 7},""[O](z)!==7})),C=y&&!p((function(){var z=!1,H=/a/;return O==="split"&&((H={}).constructor={},H.constructor[v]=function(){return H},H.flags="",H[k]=/./[k]),H.exec=function(){return z=!0,null},H[k](""),!z}));if(!y||!C||R){var _=/./[k],M=j(k,""[O],(function(z,H,F,E,$){var J=H.exec;return J===d||J===D.exec?y&&!$?{done:!0,value:o(_,H,F,E)}:{done:!0,value:o(z,F,H,E)}:{done:!1}}));c(String.prototype,O,M[0]),c(D,k,M[1])}N&&T(D[k],"sham",!0)}},908:function(s,x,a){var o=a(7332),c=Function.prototype,d=c.apply,p=c.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(o?p.bind(d):function(){return p.apply(d,arguments)})},8992:function(s,x,a){var o=a(3180),c=a(8952),d=a(7332),p=o(o.bind);s.exports=function(m,T){return c(m),T===void 0?m:d?p(m,T):function(){return m.apply(T,arguments)}}},7332:function(s,x,a){var o=a(9957);s.exports=!o((function(){var c=(function(){}).bind();return typeof c!="function"||c.hasOwnProperty("prototype")}))},8448:function(s,x,a){var o=a(7332),c=Function.prototype.call;s.exports=o?c.bind(c):function(){return c.apply(c,arguments)}},6208:function(s,x,a){var o=a(3476),c=a(5152),d=Function.prototype,p=o&&Object.getOwnPropertyDescriptor,m=c(d,"name"),T=m&&(function(){}).name==="something",v=m&&(!o||o&&p(d,"name").configurable);s.exports={EXISTS:m,PROPER:T,CONFIGURABLE:v}},5288:function(s,x,a){var o=a(1664),c=a(8952);s.exports=function(d,p,m){try{return o(c(Object.getOwnPropertyDescriptor(d,p)[m]))}catch{}}},3180:function(s,x,a){var o=a(1888),c=a(1664);s.exports=function(d){if(o(d)==="Function")return c(d)}},1664:function(s,x,a){var o=a(7332),c=Function.prototype,d=c.call,p=o&&c.bind.bind(d,d);s.exports=o?p:function(m){return function(){return d.apply(m,arguments)}}},5232:function(s,x,a){var o=a(6420),c=a(4328);s.exports=function(d,p){return arguments.length<2?(m=o[d],c(m)?m:void 0):o[d]&&o[d][p];var m}},6752:function(s){s.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(s,x,a){var o=a(8952),c=a(9760);s.exports=function(d,p){var m=d[p];return c(m)?void 0:o(m)}},6420:function(s,x,a){var o=function(c){return c&&c.Math===Math&&c};s.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof a.g=="object"&&a.g)||o(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(s,x,a){var o=a(1664),c=a(4356),d=o({}.hasOwnProperty);s.exports=Object.hasOwn||function(p,m){return d(c(p),m)}},2560:function(s){s.exports={}},4168:function(s,x,a){var o=a(5232);s.exports=o("document","documentElement")},9888:function(s,x,a){var o=a(3476),c=a(9957),d=a(8168);s.exports=!o&&!c((function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(s,x,a){var o=a(1664),c=a(9957),d=a(1888),p=Object,m=o("".split);s.exports=c((function(){return!p("z").propertyIsEnumerable(0)}))?function(T){return d(T)==="String"?m(T,""):p(T)}:p},7512:function(s,x,a){var o=a(4328),c=a(1632),d=a(4024);s.exports=function(p,m,T){var v,D;return d&&o(v=m.constructor)&&v!==T&&c(D=v.prototype)&&D!==T.prototype&&d(p,D),p}},9112:function(s,x,a){var o=a(1664),c=a(4328),d=a(3976),p=o(Function.toString);c(d.inspectSource)||(d.inspectSource=function(m){return p(m)}),s.exports=d.inspectSource},3480:function(s,x,a){var o=a(1632),c=a(3440);s.exports=function(d,p){o(p)&&"cause"in p&&c(d,"cause",p.cause)}},9104:function(s,x,a){var o,c,d,p=a(4288),m=a(6420),T=a(1632),v=a(3440),D=a(5152),O=a(3976),j=a(6504),R=a(2560),N="Object already initialized",k=m.TypeError,y=m.WeakMap;if(p||O.state){var C=O.state||(O.state=new y);C.get=C.get,C.has=C.has,C.set=C.set,o=function(M,z){if(C.has(M))throw new k(N);return z.facade=M,C.set(M,z),z},c=function(M){return C.get(M)||{}},d=function(M){return C.has(M)}}else{var _=j("state");R[_]=!0,o=function(M,z){if(D(M,_))throw new k(N);return z.facade=M,v(M,_,z),z},c=function(M){return D(M,_)?M[_]:{}},d=function(M){return D(M,_)}}s.exports={set:o,get:c,has:d,enforce:function(M){return d(M)?c(M):o(M,{})},getterFor:function(M){return function(z){var H;if(!T(z)||(H=c(z)).type!==M)throw new k("Incompatible receiver, "+M+" required");return H}}}},1432:function(s,x,a){var o=a(1888);s.exports=Array.isArray||function(c){return o(c)==="Array"}},4328:function(s){var x=typeof document=="object"&&document.all;s.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(s,x,a){var o=a(1664),c=a(9957),d=a(4328),p=a(4427),m=a(5232),T=a(9112),v=function(){},D=m("Reflect","construct"),O=/^\s*(?:class|function)\b/,j=o(O.exec),R=!O.test(v),N=function(y){if(!d(y))return!1;try{return D(v,[],y),!0}catch{return!1}},k=function(y){if(!d(y))return!1;switch(p(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return R||!!j(O,T(y))}catch{return!0}};k.sham=!0,s.exports=!D||c((function(){var y;return N(N.call)||!N(Object)||!N((function(){y=!0}))||y}))?k:N},6704:function(s,x,a){var o=a(9957),c=a(4328),d=/#|\.prototype\./,p=function(O,j){var R=T[m(O)];return R===D||R!==v&&(c(j)?o(j):!!j)},m=p.normalize=function(O){return String(O).replace(d,".").toLowerCase()},T=p.data={},v=p.NATIVE="N",D=p.POLYFILL="P";s.exports=p},9760:function(s){s.exports=function(x){return x==null}},1632:function(s,x,a){var o=a(4328);s.exports=function(c){return typeof c=="object"?c!==null:o(c)}},2424:function(s,x,a){var o=a(1632);s.exports=function(c){return o(c)||c===null}},7048:function(s){s.exports=!1},7728:function(s,x,a){var o=a(5232),c=a(4328),d=a(7e3),p=a(6536),m=Object;s.exports=p?function(T){return typeof T=="symbol"}:function(T){var v=o("Symbol");return c(v)&&d(v.prototype,m(T))}},3112:function(s,x,a){var o=a(8448),c=a(3951),d=a(4504);s.exports=function(p,m,T){var v,D;c(p);try{if(!(v=d(p,"return"))){if(m==="throw")throw T;return T}v=o(v,p)}catch(O){D=!0,v=O}if(m==="throw")throw T;if(D)throw v;return c(v),T}},9724:function(s,x,a){var o=a(8448),c=a(9368),d=a(3440),p=a(4036),m=a(9972),T=a(9104),v=a(4504),D=a(336).IteratorPrototype,O=a(3336),j=a(3112),R=m("toStringTag"),N="IteratorHelper",k="WrapForValidIterator",y=T.set,C=function(z){var H=T.getterFor(z?k:N);return p(c(D),{next:function(){var F=H(this);if(z)return F.nextHandler();try{var E=F.done?void 0:F.nextHandler();return O(E,F.done)}catch($){throw F.done=!0,$}},return:function(){var F=H(this),E=F.iterator;if(F.done=!0,z){var $=v(E,"return");return $?o($,E):O(void 0,!0)}if(F.inner)try{j(F.inner.iterator,"normal")}catch(J){return j(E,"throw",J)}return j(E,"normal"),O(void 0,!0)}})},_=C(!0),M=C(!1);d(M,R,"Iterator Helper"),s.exports=function(z,H){var F=function(E,$){$?($.iterator=E.iterator,$.next=E.next):$=E,$.type=H?k:N,$.nextHandler=z,$.counter=0,$.done=!1,y(this,$)};return F.prototype=H?_:M,F}},5792:function(s,x,a){var o=a(8448),c=a(8952),d=a(3951),p=a(6752),m=a(9724),T=a(8696),v=m((function(){var D=this.iterator,O=d(o(this.next,D));if(!(this.done=!!O.done))return T(D,this.mapper,[O.value,this.counter++],!0)}));s.exports=function(D){return d(this),c(D),new v(p(this),{mapper:D})}},336:function(s,x,a){var o,c,d,p=a(9957),m=a(4328),T=a(1632),v=a(9368),D=a(7796),O=a(6076),j=a(9972),R=a(7048),N=j("iterator"),k=!1;[].keys&&("next"in(d=[].keys())?(c=D(D(d)))!==Object.prototype&&(o=c):k=!0),!T(o)||p((function(){var y={};return o[N].call(y)!==y}))?o={}:R&&(o=v(o)),m(o[N])||O(o,N,(function(){return this})),s.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:k}},3556:function(s,x,a){var o=a(7584);s.exports=function(c){return o(c.length)}},5312:function(s,x,a){var o=a(1664),c=a(9957),d=a(4328),p=a(5152),m=a(3476),T=a(6208).CONFIGURABLE,v=a(9112),D=a(9104),O=D.enforce,j=D.get,R=String,N=Object.defineProperty,k=o("".slice),y=o("".replace),C=o([].join),_=m&&!c((function(){return N((function(){}),"length",{value:8}).length!==8})),M=String(String).split("String"),z=s.exports=function(H,F,E){k(R(F),0,7)==="Symbol("&&(F="["+y(R(F),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(F="get "+F),E&&E.setter&&(F="set "+F),(!p(H,"name")||T&&H.name!==F)&&(m?N(H,"name",{value:F,configurable:!0}):H.name=F),_&&E&&p(E,"arity")&&H.length!==E.arity&&N(H,"length",{value:E.arity});try{E&&p(E,"constructor")&&E.constructor?m&&N(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var $=O(H);return p($,"source")||($.source=C(M,typeof F=="string"?F:"")),H};Function.prototype.toString=z((function(){return d(this)&&j(this).source||v(this)}),"toString")},1748:function(s){var x=Math.ceil,a=Math.floor;s.exports=Math.trunc||function(o){var c=+o;return(c>0?a:x)(c)}},8948:function(s,x,a){var o=a(5016);s.exports=function(c,d){return c===void 0?arguments.length<2?"":d:o(c)}},9292:function(s,x,a){var o=a(3476),c=a(1664),d=a(8448),p=a(9957),m=a(1531),T=a(9392),v=a(8912),D=a(4356),O=a(5712),j=Object.assign,R=Object.defineProperty,N=c([].concat);s.exports=!j||p((function(){if(o&&j({b:1},j(R({},"a",{enumerable:!0,get:function(){R(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var k={},y={},C=Symbol("assign detection"),_="abcdefghijklmnopqrst";return k[C]=7,_.split("").forEach((function(M){y[M]=M})),j({},k)[C]!==7||m(j({},y)).join("")!==_}))?function(k,y){for(var C=D(k),_=arguments.length,M=1,z=T.f,H=v.f;_>M;)for(var F,E=O(arguments[M++]),$=z?N(m(E),z(E)):m(E),J=$.length,re=0;J>re;)F=$[re++],o&&!d(H,E,F)||(C[F]=E[F]);return C}:j},9368:function(s,x,a){var o,c=a(3951),d=a(2056),p=a(8256),m=a(2560),T=a(4168),v=a(8168),D=a(6504),O="prototype",j="script",R=D("IE_PROTO"),N=function(){},k=function(_){return"<"+j+">"+_+"</"+j+">"},y=function(_){_.write(k("")),_.close();var M=_.parentWindow.Object;return _=null,M},C=function(){try{o=new ActiveXObject("htmlfile")}catch{}var _,M,z;C=typeof document<"u"?document.domain&&o?y(o):(M=v("iframe"),z="java"+j+":",M.style.display="none",T.appendChild(M),M.src=String(z),(_=M.contentWindow.document).open(),_.write(k("document.F=Object")),_.close(),_.F):y(o);for(var H=p.length;H--;)delete C[O][p[H]];return C()};m[R]=!0,s.exports=Object.create||function(_,M){var z;return _!==null?(N[O]=c(_),z=new N,N[O]=null,z[R]=_):z=C(),M===void 0?z:d.f(z,M)}},2056:function(s,x,a){var o=a(3476),c=a(1576),d=a(8352),p=a(3951),m=a(4096),T=a(1531);x.f=o&&!c?Object.defineProperties:function(v,D){p(v);for(var O,j=m(D),R=T(D),N=R.length,k=0;N>k;)d.f(v,O=R[k++],j[O]);return v}},8352:function(s,x,a){var o=a(3476),c=a(9888),d=a(1576),p=a(3951),m=a(88),T=TypeError,v=Object.defineProperty,D=Object.getOwnPropertyDescriptor,O="enumerable",j="configurable",R="writable";x.f=o?d?function(N,k,y){if(p(N),k=m(k),p(y),typeof N=="function"&&k==="prototype"&&"value"in y&&R in y&&!y[R]){var C=D(N,k);C&&C[R]&&(N[k]=y.value,y={configurable:j in y?y[j]:C[j],enumerable:O in y?y[O]:C[O],writable:!1})}return v(N,k,y)}:v:function(N,k,y){if(p(N),k=m(k),p(y),c)try{return v(N,k,y)}catch{}if("get"in y||"set"in y)throw new T("Accessors not supported");return"value"in y&&(N[k]=y.value),N}},9444:function(s,x,a){var o=a(3476),c=a(8448),d=a(8912),p=a(9728),m=a(4096),T=a(88),v=a(5152),D=a(9888),O=Object.getOwnPropertyDescriptor;x.f=o?O:function(j,R){if(j=m(j),R=T(R),D)try{return O(j,R)}catch{}if(v(j,R))return p(!c(d.f,j,R),j[R])}},5048:function(s,x,a){var o=a(9008),c=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(d){return o(d,c)}},9392:function(s,x){x.f=Object.getOwnPropertySymbols},7796:function(s,x,a){var o=a(5152),c=a(4328),d=a(4356),p=a(6504),m=a(2272),T=p("IE_PROTO"),v=Object,D=v.prototype;s.exports=m?v.getPrototypeOf:function(O){var j=d(O);if(o(j,T))return j[T];var R=j.constructor;return c(R)&&j instanceof R?R.prototype:j instanceof v?D:null}},7e3:function(s,x,a){var o=a(1664);s.exports=o({}.isPrototypeOf)},9008:function(s,x,a){var o=a(1664),c=a(5152),d=a(4096),p=a(2504).indexOf,m=a(2560),T=o([].push);s.exports=function(v,D){var O,j=d(v),R=0,N=[];for(O in j)!c(m,O)&&c(j,O)&&T(N,O);for(;D.length>R;)c(j,O=D[R++])&&(~p(N,O)||T(N,O));return N}},1531:function(s,x,a){var o=a(9008),c=a(8256);s.exports=Object.keys||function(d){return o(d,c)}},8912:function(s,x){var a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,c=o&&!a.call({1:2},1);x.f=c?function(d){var p=o(this,d);return!!p&&p.enumerable}:a},4024:function(s,x,a){var o=a(5288),c=a(3951),d=a(2096);s.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,m=!1,T={};try{(p=o(Object.prototype,"__proto__","set"))(T,[]),m=T instanceof Array}catch{}return function(v,D){return c(v),d(D),m?p(v,D):v.__proto__=D,v}})():void 0)},7032:function(s,x,a){var o=a(16),c=a(4427);s.exports=o?{}.toString:function(){return"[object "+c(this)+"]"}},2104:function(s,x,a){var o=a(8448),c=a(4328),d=a(1632),p=TypeError;s.exports=function(m,T){var v,D;if(T==="string"&&c(v=m.toString)&&!d(D=o(v,m))||c(v=m.valueOf)&&!d(D=o(v,m))||T!=="string"&&c(v=m.toString)&&!d(D=o(v,m)))return D;throw new p("Can't convert object to primitive value")}},9252:function(s,x,a){var o=a(5232),c=a(1664),d=a(5048),p=a(9392),m=a(3951),T=c([].concat);s.exports=o("Reflect","ownKeys")||function(v){var D=d.f(m(v)),O=p.f;return O?T(D,O(v)):D}},584:function(s,x,a){var o=a(8352).f;s.exports=function(c,d,p){p in c||o(c,p,{configurable:!0,get:function(){return d[p]},set:function(m){d[p]=m}})}},9092:function(s,x,a){var o=a(8448),c=a(3951),d=a(4328),p=a(1888),m=a(7680),T=TypeError;s.exports=function(v,D){var O=v.exec;if(d(O)){var j=o(O,v,D);return j!==null&&c(j),j}if(p(v)==="RegExp")return o(m,v,D);throw new T("RegExp#exec called on incompatible receiver")}},7680:function(s,x,a){var o,c,d=a(8448),p=a(1664),m=a(5016),T=a(8872),v=a(3548),D=a(4696),O=a(9368),j=a(9104).get,R=a(8e3),N=a(9124),k=D("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,C=y,_=p("".charAt),M=p("".indexOf),z=p("".replace),H=p("".slice),F=(c=/b*/g,d(y,o=/a/,"a"),d(y,c,"a"),o.lastIndex!==0||c.lastIndex!==0),E=v.BROKEN_CARET,$=/()??/.exec("")[1]!==void 0;(F||$||E||R||N)&&(C=function(J){var re,ee,fe,Q,ue,se,ye,ce=this,Z=j(ce),ve=m(J),Ne=Z.raw;if(Ne)return Ne.lastIndex=ce.lastIndex,re=d(C,Ne,ve),ce.lastIndex=Ne.lastIndex,re;var be=Z.groups,Ce=E&&ce.sticky,Re=d(T,ce),ze=ce.source,P=0,b=ve;if(Ce&&(Re=z(Re,"y",""),M(Re,"g")===-1&&(Re+="g"),b=H(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&_(ve,ce.lastIndex-1)!==`
|
|
105
|
+
`)&&(ze="(?: "+ze+")",b=" "+b,P++),ee=new RegExp("^(?:"+ze+")",Re)),$&&(ee=new RegExp("^"+ze+"$(?!\\s)",Re)),F&&(fe=ce.lastIndex),Q=d(y,Ce?ee:ce,b),Ce?Q?(Q.input=H(Q.input,P),Q[0]=H(Q[0],P),Q.index=ce.lastIndex,ce.lastIndex+=Q[0].length):ce.lastIndex=0:F&&Q&&(ce.lastIndex=ce.global?Q.index+Q[0].length:fe),$&&Q&&Q.length>1&&d(k,Q[0],ee,(function(){for(ue=1;ue<arguments.length-2;ue++)arguments[ue]===void 0&&(Q[ue]=void 0)})),Q&&be)for(Q.groups=se=O(null),ue=0;ue<be.length;ue++)se[(ye=be[ue])[0]]=Q[ye[1]];return Q}),s.exports=C},8872:function(s,x,a){var o=a(3951);s.exports=function(){var c=o(this),d="";return c.hasIndices&&(d+="d"),c.global&&(d+="g"),c.ignoreCase&&(d+="i"),c.multiline&&(d+="m"),c.dotAll&&(d+="s"),c.unicode&&(d+="u"),c.unicodeSets&&(d+="v"),c.sticky&&(d+="y"),d}},3548:function(s,x,a){var o=a(9957),c=a(6420).RegExp,d=o((function(){var T=c("a","y");return T.lastIndex=2,T.exec("abcd")!==null})),p=d||o((function(){return!c("a","y").sticky})),m=d||o((function(){var T=c("^r","gy");return T.lastIndex=2,T.exec("str")!==null}));s.exports={BROKEN_CARET:m,MISSED_STICKY:p,UNSUPPORTED_Y:d}},8e3:function(s,x,a){var o=a(9957),c=a(6420).RegExp;s.exports=o((function(){var d=c(".","s");return!(d.dotAll&&d.test(`
|
|
106
|
+
`)&&d.flags==="s")}))},9124:function(s,x,a){var o=a(9957),c=a(6420).RegExp;s.exports=o((function(){var d=c("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"}))},5436:function(s,x,a){var o=a(9760),c=TypeError;s.exports=function(d){if(o(d))throw new c("Can't call method on "+d);return d}},6504:function(s,x,a){var o=a(4696),c=a(7776),d=o("keys");s.exports=function(p){return d[p]||(d[p]=c(p))}},3976:function(s,x,a){var o=a(7048),c=a(6420),d=a(4636),p="__core-js_shared__",m=s.exports=c[p]||d(p,{});(m.versions||(m.versions=[])).push({version:"3.36.0",mode:o?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(s,x,a){var o=a(3976);s.exports=function(c,d){return o[c]||(o[c]=d||{})}},9764:function(s,x,a){var o=a(1664),c=a(6180),d=a(5016),p=a(5436),m=o("".charAt),T=o("".charCodeAt),v=o("".slice),D=function(O){return function(j,R){var N,k,y=d(p(j)),C=c(R),_=y.length;return C<0||C>=_?O?"":void 0:(N=T(y,C))<55296||N>56319||C+1===_||(k=T(y,C+1))<56320||k>57343?O?m(y,C):N:O?v(y,C,C+2):k-56320+(N-55296<<10)+65536}};s.exports={codeAt:D(!1),charAt:D(!0)}},772:function(s,x,a){var o=a(8504),c=a(9957),d=a(6420).String;s.exports=!!Object.getOwnPropertySymbols&&!c((function(){var p=Symbol("symbol detection");return!d(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},2495:function(s,x,a){var o=a(6180),c=Math.max,d=Math.min;s.exports=function(p,m){var T=o(p);return T<0?c(T+m,0):d(T,m)}},4096:function(s,x,a){var o=a(5712),c=a(5436);s.exports=function(d){return o(c(d))}},6180:function(s,x,a){var o=a(1748);s.exports=function(c){var d=+c;return d!=d||d===0?0:o(d)}},7584:function(s,x,a){var o=a(6180),c=Math.min;s.exports=function(d){var p=o(d);return p>0?c(p,9007199254740991):0}},4356:function(s,x,a){var o=a(5436),c=Object;s.exports=function(d){return c(o(d))}},7024:function(s,x,a){var o=a(8448),c=a(1632),d=a(7728),p=a(4504),m=a(2104),T=a(9972),v=TypeError,D=T("toPrimitive");s.exports=function(O,j){if(!c(O)||d(O))return O;var R,N=p(O,D);if(N){if(j===void 0&&(j="default"),R=o(N,O,j),!c(R)||d(R))return R;throw new v("Can't convert object to primitive value")}return j===void 0&&(j="number"),m(O,j)}},88:function(s,x,a){var o=a(7024),c=a(7728);s.exports=function(d){var p=o(d,"string");return c(p)?p:p+""}},16:function(s,x,a){var o={};o[a(9972)("toStringTag")]="z",s.exports=String(o)==="[object z]"},5016:function(s,x,a){var o=a(4427),c=String;s.exports=function(d){if(o(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return c(d)}},36:function(s){var x=String;s.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(s,x,a){var o=a(1664),c=0,d=Math.random(),p=o(1 .toString);s.exports=function(m){return"Symbol("+(m===void 0?"":m)+")_"+p(++c+d,36)}},6536:function(s,x,a){var o=a(772);s.exports=o&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(s,x,a){var o=a(3476),c=a(9957);s.exports=o&&c((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(s,x,a){var o=a(6420),c=a(4328),d=o.WeakMap;s.exports=c(d)&&/native code/.test(String(d))},9972:function(s,x,a){var o=a(6420),c=a(4696),d=a(5152),p=a(7776),m=a(772),T=a(6536),v=o.Symbol,D=c("wks"),O=T?v.for||v:v&&v.withoutSetter||p;s.exports=function(j){return d(D,j)||(D[j]=m&&d(v,j)?v[j]:O("Symbol."+j)),D[j]}},6488:function(s,x,a){var o=a(5232),c=a(5152),d=a(3440),p=a(7e3),m=a(4024),T=a(9968),v=a(584),D=a(7512),O=a(8948),j=a(3480),R=a(3696),N=a(3476),k=a(7048);s.exports=function(y,C,_,M){var z="stackTraceLimit",H=M?2:1,F=y.split("."),E=F[F.length-1],$=o.apply(null,F);if($){var J=$.prototype;if(!k&&c(J,"cause")&&delete J.cause,!_)return $;var re=o("Error"),ee=C((function(fe,Q){var ue=O(M?Q:fe,void 0),se=M?new $(fe):new $;return ue!==void 0&&d(se,"message",ue),R(se,ee,se.stack,2),this&&p(J,this)&&D(se,this,ee),arguments.length>H&&j(se,arguments[H]),se}));if(ee.prototype=J,E!=="Error"?m?m(ee,re):T(ee,re,{name:!0}):N&&z in $&&(v(ee,$,z),v(ee,$,"prepareStackTrace")),T(ee,$),!k)try{J.name!==E&&d(J,"name",E),J.constructor=ee}catch{}return ee}}},7476:function(s,x,a){var o=a(9160),c=a(9957),d=a(1432),p=a(1632),m=a(4356),T=a(3556),v=a(4316),D=a(92),O=a(2568),j=a(953),R=a(9972),N=a(8504),k=R("isConcatSpreadable"),y=N>=51||!c((function(){var _=[];return _[k]=!1,_.concat()[0]!==_})),C=function(_){if(!p(_))return!1;var M=_[k];return M!==void 0?!!M:d(_)};o({target:"Array",proto:!0,arity:1,forced:!y||!j("concat")},{concat:function(_){var M,z,H,F,E,$=m(this),J=O($,0),re=0;for(M=-1,H=arguments.length;M<H;M++)if(C(E=M===-1?$:arguments[M]))for(F=T(E),v(re+F),z=0;z<F;z++,re++)z in E&&D(J,re,E[z]);else v(re+1),D(J,re++,E);return J.length=re,J}})},6932:function(s,x,a){var o=a(9160),c=a(3364).filter;o({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},700:function(s,x,a){var o=a(9160),c=a(1664),d=a(5712),p=a(4096),m=a(1496),T=c([].join);o({target:"Array",proto:!0,forced:d!==Object||!m("join",",")},{join:function(v){return T(p(this),v===void 0?",":v)}})},4456:function(s,x,a){var o=a(9160),c=a(3364).map;o({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},4728:function(s,x,a){var o=a(9160),c=a(4356),d=a(3556),p=a(6728),m=a(4316);o({target:"Array",proto:!0,arity:1,forced:a(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(T){return T instanceof TypeError}})()},{push:function(T){var v=c(this),D=d(v),O=arguments.length;m(D+O);for(var j=0;j<O;j++)v[D]=arguments[j],D++;return p(v,D),D}})},8752:function(s,x,a){var o=a(9160),c=a(6420),d=a(908),p=a(6488),m="WebAssembly",T=c[m],v=new Error("e",{cause:7}).cause!==7,D=function(j,R){var N={};N[j]=p(j,R,v),o({global:!0,constructor:!0,arity:1,forced:v},N)},O=function(j,R){if(T&&T[j]){var N={};N[j]=p(m+"."+j,R,v),o({target:m,stat:!0,constructor:!0,arity:1,forced:v},N)}};D("Error",(function(j){return function(R){return d(j,this,arguments)}})),D("EvalError",(function(j){return function(R){return d(j,this,arguments)}})),D("RangeError",(function(j){return function(R){return d(j,this,arguments)}})),D("ReferenceError",(function(j){return function(R){return d(j,this,arguments)}})),D("SyntaxError",(function(j){return function(R){return d(j,this,arguments)}})),D("TypeError",(function(j){return function(R){return d(j,this,arguments)}})),D("URIError",(function(j){return function(R){return d(j,this,arguments)}})),O("CompileError",(function(j){return function(R){return d(j,this,arguments)}})),O("LinkError",(function(j){return function(R){return d(j,this,arguments)}})),O("RuntimeError",(function(j){return function(R){return d(j,this,arguments)}}))},508:function(s,x,a){var o=a(3476),c=a(6208).EXISTS,d=a(1664),p=a(2544),m=Function.prototype,T=d(m.toString),v=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=d(v.exec);o&&!c&&p(m,"name",{configurable:!0,get:function(){try{return D(v,T(this))[1]}catch{return""}}})},232:function(s,x,a){var o=a(9160),c=a(9292);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==c},{assign:c})},5443:function(s,x,a){var o=a(16),c=a(6076),d=a(7032);o||c(Object.prototype,"toString",d,{unsafe:!0})},880:function(s,x,a){var o=a(9160),c=a(7680);o({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},9836:function(s,x,a){var o=a(8448),c=a(7176),d=a(3951),p=a(9760),m=a(7584),T=a(5016),v=a(5436),D=a(4504),O=a(4764),j=a(9092);c("match",(function(R,N,k){return[function(y){var C=v(this),_=p(y)?void 0:D(y,R);return _?o(_,y,C):new RegExp(y)[R](T(C))},function(y){var C=d(this),_=T(y),M=k(N,C,_);if(M.done)return M.value;if(!C.global)return j(C,_);var z=C.unicode;C.lastIndex=0;for(var H,F=[],E=0;(H=j(C,_))!==null;){var $=T(H[0]);F[E]=$,$===""&&(C.lastIndex=O(_,m(C.lastIndex),z)),E++}return E===0?null:F}]}))},3536:function(s,x,a){var o=a(9160),c=a(6420),d=a(6100),p=a(3951),m=a(4328),T=a(7796),v=a(2544),D=a(92),O=a(9957),j=a(5152),R=a(9972),N=a(336).IteratorPrototype,k=a(3476),y=a(7048),C="constructor",_="Iterator",M=R("toStringTag"),z=TypeError,H=c[_],F=y||!m(H)||H.prototype!==N||!O((function(){H({})})),E=function(){if(d(this,N),T(this)===N)throw new z("Abstract class Iterator not directly constructable")},$=function(J,re){k?v(N,J,{configurable:!0,get:function(){return re},set:function(ee){if(p(this),this===N)throw new z("You can't redefine this property");j(this,J)?this[J]=ee:D(this,J,ee)}}):N[J]=re};j(N,M)||$(M,_),!F&&j(N,C)&&N[C]!==Object||$(C,E),E.prototype=N,o({global:!0,constructor:!0,forced:F},{Iterator:E})},2144:function(s,x,a){var o=a(9160),c=a(8448),d=a(8952),p=a(3951),m=a(6752),T=a(9724),v=a(8696),D=a(7048),O=T((function(){for(var j,R,N=this.iterator,k=this.predicate,y=this.next;;){if(j=p(c(y,N)),this.done=!!j.done)return;if(R=j.value,v(N,k,[R,this.counter++],!0))return R}}));o({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(j){return p(this),d(j),new O(m(this),{predicate:j})}})},9080:function(s,x,a){var o=a(9160),c=a(5792);o({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:c})}},V={};function B(s){var x=V[s];if(x!==void 0)return x.exports;var a=V[s]={exports:{}};return l[s].call(a.exports,a,a.exports,B),a.exports}B.d=function(s,x){for(var a in x)B.o(x,a)&&!B.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:x[a]})},B.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),B.o=function(s,x){return Object.prototype.hasOwnProperty.call(s,x)},B.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var X={};return(function(){B.r(X),B.d(X,{default:function(){return v}}),B(8752),B(6932),B(700),B(4456),B(4728),B(508),B(232),B(5443),B(880),B(9836),B(3536),B(2144),B(9080);var s=B(680);B(7476);function x(D,O){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,R){return j.__proto__=R,j},x(D,O)}var a=(function(D){var O,j;function R(){for(var k,y=arguments.length,C=new Array(y),_=0;_<y;_++)C[_]=arguments[_];return(k=D.call.apply(D,[this].concat(C))||this).state={bump:!1,debounced:!1},k}j=D,(O=R).prototype=Object.create(j.prototype),O.prototype.constructor=O,x(O,j);var N=R.prototype;return N.componentWillMount=function(){var k,y,C,_=this;this.debounceStatusUpdate=(k=function(){if(!_.state.debounced){var M=!_.props.isInFocus||_.props.validChoiceMade;_.setState((function(z){return{bump:!z.bump,debounced:!0,silenced:M}}))}},y=1400,function(){var M=this,z=arguments;clearTimeout(C),C=setTimeout((function(){C=null,k.apply(M,z)}),y)})},N.componentWillReceiveProps=function(k){k.queryLength,this.setState({debounced:!1})},N.render=function(){var k=this.props,y=k.id,C=k.length,_=k.queryLength,M=k.minQueryLength,z=k.selectedOption,H=k.selectedOptionIndex,F=k.tQueryTooShort,E=k.tNoResults,$=k.tSelectedOption,J=k.tResults,re=k.className,ee=this.state,fe=ee.bump,Q=ee.debounced,ue=ee.silenced,se=_<M,ye=C===0,ce=z?$(z,C,H):"",Z=null;return Z=se?F(M):ye?E():J(C,ce),this.debounceStatusUpdate(),(0,s.createElement)("div",{className:re,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,s.createElement)("div",{id:y+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Q&&fe?Z:""),(0,s.createElement)("div",{id:y+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Q||fe?"":Z))},R})(s.Component);a.defaultProps={tQueryTooShort:function(D){return"Type in "+D+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(D,O,j){return D+" "+(j+1)+" of "+O+" is highlighted"},tResults:function(D,O){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+O}};var o=function(D){var O=D.className;return(0,s.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:O,focusable:"false"},(0,s.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,s.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function c(){return c=Object.assign?Object.assign.bind():function(D){for(var O=1;O<arguments.length;O++){var j=arguments[O];for(var R in j)Object.prototype.hasOwnProperty.call(j,R)&&(D[R]=j[R])}return D},c.apply(this,arguments)}function d(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function p(D,O){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,R){return j.__proto__=R,j},p(D,O)}var m={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function T(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var v=(function(D){var O,j;function R(k){var y;return(y=D.call(this,k)||this).elementReferences={},y.state={focused:null,hovered:null,menuOpen:!1,options:k.defaultValue?[k.defaultValue]:[],query:k.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},y.handleComponentBlur=y.handleComponentBlur.bind(d(y)),y.handleKeyDown=y.handleKeyDown.bind(d(y)),y.handleUpArrow=y.handleUpArrow.bind(d(y)),y.handleDownArrow=y.handleDownArrow.bind(d(y)),y.handleEnter=y.handleEnter.bind(d(y)),y.handlePrintableKey=y.handlePrintableKey.bind(d(y)),y.handleListMouseLeave=y.handleListMouseLeave.bind(d(y)),y.handleOptionBlur=y.handleOptionBlur.bind(d(y)),y.handleOptionClick=y.handleOptionClick.bind(d(y)),y.handleOptionFocus=y.handleOptionFocus.bind(d(y)),y.handleOptionMouseDown=y.handleOptionMouseDown.bind(d(y)),y.handleOptionMouseEnter=y.handleOptionMouseEnter.bind(d(y)),y.handleInputBlur=y.handleInputBlur.bind(d(y)),y.handleInputChange=y.handleInputChange.bind(d(y)),y.handleInputClick=y.handleInputClick.bind(d(y)),y.handleInputFocus=y.handleInputFocus.bind(d(y)),y.pollInputElement=y.pollInputElement.bind(d(y)),y.getDirectInputChanges=y.getDirectInputChanges.bind(d(y)),y}j=D,(O=R).prototype=Object.create(j.prototype),O.prototype.constructor=O,p(O,j);var N=R.prototype;return N.isQueryAnOption=function(k,y){var C=this;return y.map((function(_){return C.templateInputValue(_).toLowerCase()})).indexOf(k.toLowerCase())!==-1},N.componentDidMount=function(){this.pollInputElement()},N.componentWillUnmount=function(){clearTimeout(this.$pollInput)},N.pollInputElement=function(){var k=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){k.pollInputElement()}),100)},N.getDirectInputChanges=function(){var k=this.elementReferences[-1];k&&k.value!==this.state.query&&this.handleInputChange({target:{value:k.value}})},N.componentDidUpdate=function(k,y){var C=this.state.focused,_=C===null,M=y.focused!==C;M&&!_&&this.elementReferences[C].focus();var z=C===-1,H=M&&y.focused===null;if(z&&H){var F=this.elementReferences[C];F.setSelectionRange(0,F.value.length)}},N.hasAutoselect=function(){return!T()&&this.props.autoselect},N.templateInputValue=function(k){var y=this.props.templates&&this.props.templates.inputValue;return y?y(k):k},N.templateSuggestion=function(k){var y=this.props.templates&&this.props.templates.suggestion;return y?y(k):k},N.handleComponentBlur=function(k){var y,C=this.state,_=C.options,M=C.query,z=C.selected;this.props.confirmOnBlur?(y=k.query||M,this.props.onConfirm(_[z])):y=M,this.setState({focused:null,menuOpen:k.menuOpen||!1,query:y,selected:null,validChoiceMade:this.isQueryAnOption(y,_)})},N.handleListMouseLeave=function(k){this.setState({hovered:null})},N.handleOptionBlur=function(k,y){var C=this.state,_=C.focused,M=C.menuOpen,z=C.options,H=C.selected,F=k.relatedTarget===null,E=k.relatedTarget===this.elementReferences[-1],$=_!==y&&_!==-1;if(!$&&F||!($||E)){var J=M&&T();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(z[H])})}},N.handleInputBlur=function(k){var y=this.state,C=y.focused,_=y.menuOpen,M=y.options,z=y.query,H=y.selected;if(C===-1){var F=_&&T(),E=T()?z:this.templateInputValue(M[H]);this.handleComponentBlur({menuOpen:F,query:E})}},N.handleInputChange=function(k){var y=this,C=this.props,_=C.minLength,M=C.source,z=C.showAllValues,H=this.hasAutoselect(),F=k.target.value,E=F.length===0,$=this.state.query!==F,J=F.length>=_;this.setState({query:F,ariaHint:E}),z||!E&&$&&J?M(F,(function(re){var ee=re.length>0;y.setState({menuOpen:ee,options:re,selected:H&&ee?0:-1,validChoiceMade:!1})})):!E&&J||this.setState({menuOpen:!1,options:[]})},N.handleInputClick=function(k){this.handleInputChange(k)},N.handleInputFocus=function(k){var y=this.state,C=y.query,_=y.validChoiceMade,M=y.options,z=this.props.minLength,H=!_&&C.length>=z&&M.length>0;H?this.setState((function(F){var E=F.menuOpen;return{focused:-1,menuOpen:H||E,selected:-1}})):this.setState({focused:-1})},N.handleOptionFocus=function(k){this.setState({focused:k,hovered:null,selected:k})},N.handleOptionMouseEnter=function(k,y){T()||this.setState({hovered:y})},N.handleOptionClick=function(k,y){var C=this.state.options[y],_=this.templateInputValue(C);this.props.onConfirm(C),this.setState({focused:-1,hovered:null,menuOpen:!1,query:_,selected:-1,validChoiceMade:!0}),this.forceUpdate()},N.handleOptionMouseDown=function(k){k.preventDefault()},N.handleUpArrow=function(k){k.preventDefault();var y=this.state,C=y.menuOpen,_=y.selected;_!==-1&&C&&this.handleOptionFocus(_-1)},N.handleDownArrow=function(k){var y=this;if(k.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)k.preventDefault(),this.props.source("",(function(H){y.setState({menuOpen:!0,options:H,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var C=this.state,_=C.menuOpen,M=C.options,z=C.selected;z!==M.length-1&&_&&this.handleOptionFocus(z+1)}},N.handleSpace=function(k){var y=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(k.preventDefault(),this.props.source("",(function(C){y.setState({menuOpen:!0,options:C})}))),this.state.focused!==-1&&(k.preventDefault(),this.handleOptionClick(k,this.state.focused))},N.handleEnter=function(k){this.state.menuOpen&&(k.preventDefault(),this.state.selected>=0&&this.handleOptionClick(k,this.state.selected))},N.handlePrintableKey=function(k){var y=this.elementReferences[-1];k.target===y||y.focus()},N.handleKeyDown=function(k){switch(m[k.keyCode]){case"up":this.handleUpArrow(k);break;case"down":this.handleDownArrow(k);break;case"space":this.handleSpace(k);break;case"enter":this.handleEnter(k);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((y=k.keyCode)>47&&y<58||y===32||y===8||y>64&&y<91||y>95&&y<112||y>185&&y<193||y>218&&y<223)&&this.handlePrintableKey(k)}var y},N.render=function(){var k,y=this,C=this.props,_=C.cssNamespace,M=C.displayMenu,z=C.id,H=C.minLength,F=C.name,E=C.placeholder,$=C.required,J=C.showAllValues,re=C.tNoResults,ee=C.tStatusQueryTooShort,fe=C.tStatusNoResults,Q=C.tStatusSelectedOption,ue=C.tStatusResults,se=C.tAssistiveHint,ye=C.dropdownArrow,ce=C.menuAttributes,Z=C.inputClasses,ve=C.hintClasses,Ne=C.menuClasses,be=this.state,Ce=be.focused,Re=be.hovered,ze=be.menuOpen,P=be.options,b=be.query,W=be.selected,Y=be.ariaHint,A=be.validChoiceMade,I=this.hasAutoselect(),te=Ce===-1,ie=P.length===0,_e=b.length!==0,de=b.length>=H,me=this.props.showNoOptionsFound&&te&&ie&&_e&&de,Me=_+"__wrapper",Ae=_+"__status",$e=_+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=_+"__option",Qe=_+"__hint",ge=this.templateInputValue(P[W]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&I?b+ge.substr(b.length):"",Ze=z+"__assistiveHint",tt={"aria-describedby":Y?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?z+"__option--"+Ce:null,"aria-controls":z+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(k=ye({className:$e}))=="string"&&(k=(0,s.createElement)("div",{className:_+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:k}}));var ht=_+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Z&&vt.push(Z);var pt=_+"__menu",lt=[pt,pt+"--"+M,pt+"--"+(ze||me?"visible":"hidden")];Ne&<.push(Ne),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var bt=Object.assign({"aria-labelledby":z},ce,{id:z+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete bt.class,(0,s.createElement)("div",{className:Me,onKeyDown:this.handleKeyDown},(0,s.createElement)(a,{id:z,length:P.length,queryLength:b.length,minQueryLength:H,selectedOption:this.templateInputValue(P[W]),selectedOptionIndex:W,validChoiceMade:A,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:fe,tSelectedOption:Q,tResults:ue,className:Ae}),we&&(0,s.createElement)("span",null,(0,s.createElement)("input",{className:[Qe,ve===null?Z:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,s.createElement)("input",c({},tt,{autoComplete:"off",className:vt.join(" "),id:z,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:F,placeholder:E,ref:function(_t){y.elementReferences[-1]=_t},type:"text",role:"combobox",required:$,value:b})),k,(0,s.createElement)("ul",bt,P.map((function(_t,Ue){var gt=(Ce===-1?W===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=T()?"<span id="+z+"__option-suffix--"+Ue+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Ue+1)+" of "+P.length+"</span>":"";return(0,s.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:y.templateSuggestion(_t)+ut},id:z+"__option--"+Ue,key:Ue,onBlur:function(it){return y.handleOptionBlur(it,Ue)},onClick:function(it){return y.handleOptionClick(it,Ue)},onMouseDown:y.handleOptionMouseDown,onMouseEnter:function(it){return y.handleOptionMouseEnter(it,Ue)},ref:function(it){y.elementReferences[Ue]=it},role:"option",tabIndex:"-1","aria-posinset":Ue+1,"aria-setsize":P.length})})),me&&(0,s.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},re())),(0,s.createElement)("span",{id:Ze,style:{display:"none"}},se()))},R})(s.Component);v.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:o,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),X})()}))})(ya)),ya.exports}var rr,_n;function Tc(){return _n||(_n=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:f,defaultValue:i="",onConfirm:g,source:l,disabled:V,onClear:B,tClearInput:X=()=>"Clear input",...s})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{f!==void 0&&a(f)},[f]),q.useEffect(()=>{V?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[V]);const o=()=>{B&&B()},c=(p,m)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&l(p,m)},d=p=>{p?g(p):a(f)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...s,defaultValue:i,onConfirm:d,source:c}),!!(f&&f.length>0&&!V)&&h.jsx("button",{onClick:o,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":X(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:X()})})]})},Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Ic=({position:f,areasLayer:i,bounds:g,onMarkedMoved:l})=>{const V=q.useRef(null);let B=null;const[X,s]=q.useState([]),x=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),a=[41.9,12.5],o=()=>{const c=Rt.map(V.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(c),i&&i.map(p=>{p.addTo(c)});const d=f?[`${f.lat}`,`${f.lon}`]:g?g.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),B=Rt.marker(d,{draggable:!0}).addTo(c),B.on("moveend",function(p){const m=p.target.getLatLng();l(m,B)}),!f&&g)c.fitBounds(g);else{const p=f?[f.lat,f.lon]:a;B&&(B.setLatLng(p).update(),c.setView(p,15))}};return q.useEffect(()=>{V.current&&o()},[V]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:V,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:f,value:i,current:g,onChange:l,i18next:V})=>{const[B,X]=q.useState(null),[s,x]=q.useState([]),[a,o]=q.useState(),[c,d]=q.useState(),[p,m]=q.useState(!1),[T,v]=q.useState(),[D,O]=q.useState(!1),[j,R]=q.useState(),[N,k]=q.useState(),[y,C]=q.useState(!1),[_,M]=q.useState(""),[z,H]=q.useState(""),[F,E]=q.useState(!1),[$,J]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,Q=q.useRef(),ue=V.language;let se=Rt.latLngBounds();const ye=ee||(fe&&fe.length>0?fe:void 0),ce=(P,b)=>{Q.current=P;const W=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(P)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let Y=[],A=[];O(!0),fetch(W).then(I=>I.json()).then(I=>{if(I.length&&Q.current===P){O(!0);const te=I.map((ie,_e)=>{const{lat:de,lon:me}=ie,Me=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${T.join(",")}`;return fetch(Me).then(Ae=>Ae.json()).then(Ae=>Ae.result?(ie.label=Za(ie),ie):null)});return Promise.all(te)}else Q.current===P&&(b([]),O(!1))}).then(I=>{I=I?I.filter(te=>te!==null):[],I.length>0?(I.forEach((te,ie)=>{I[ie].label=Za(te)}),I=en.uniqWith(I,(te,ie)=>te.label===ie.label),I.forEach((te,ie)=>{A.push(te.label),Y.push(te)}),Q.current===P&&(b(A),x(Y),O(!1))):Q.current===P&&(b([]),O(!1))}).catch(I=>{console.error("Error fetching locations:",I),O(!1)})},Z=(P,b)=>{ce(P,b)},ve=(P,b)=>{const{lat:W,lng:Y}=P,A=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${W}&lon=${Y}&accept-language=${ue}`;fetch(A).then(I=>I.json()).then(I=>{if(I&&I.display_name)if(I.label=Za(I),I.lat=W,I.lon=Y,b)b.bindPopup(`${I.label}`).openPopup(),k(I);else{k(I);return}}).catch(I=>console.error("Error with reverse geocoding:",I))};function Ne(){navigator.geolocation.getCurrentPosition(P=>{let b=P.coords.latitude,W=P.coords.longitude;if((T||[]).length>0){const A=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${W}&geographic_areas_ids=${T.join(",")}`;fetch(A).then(I=>I.json()).then(I=>{I.result&&(X({lat:b,lon:W}),ve({lat:b,lng:W})),J(!$)})}else X({lat:b,lon:W}),ve({lat:b,lng:W}),J(!$)},P=>{(P==null?void 0:P.code)===1?(E(!F),H(V.t("error_message_code_1"))):(P==null?void 0:P.code)===2?(E(!F),H(V.t("error_message_code_2"))):(P==null?void 0:P.code)===3?(E(!F),H(V.t("error_message_code_3"))):(E(!F),H(V.t("error_message_generic")))})}q.useEffect(()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)},[i,g]);const be=()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)};q.useEffect(()=>{var P;(P=window==null?void 0:window.Formio)==null||P.formioReady.then(()=>{setTimeout(()=>{be(),Ce()},1)})},[]);const Ce=()=>{let b=`${Fe()}/api/geographic-areas`,W=[],Y=[];fetch(b).then(A=>A.json()).then(A=>{if(Array.isArray(A)&&A.length>0){A.filter(ie=>ye?Array.isArray(ye)?ye.includes(ie.id):ie.id===ye:!0).forEach(ie=>{W.push(ie.id);const _e=JSON.parse(ie.geofence),de=Rt.geoJSON(_e,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});se.extend(de.getBounds()),Y.push(de)}),d(Y),v(W),R(se);const I=se.getNorthEast(),te=se.getSouthWest();o([I.lng,I.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(A=>{console.error("Error with reverse geocoding:",A)})},Re=()=>{M(B!=null&&B.label?B.label:"")};q.useEffect(()=>{Re(),l(B)},[B]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?C(!0):C(!1)},[]);const ze=()=>{if(N){const P=`${Fe()}/api/geographic-areas/contains?lat=${N.lat}&lon=${N.lon}&geographic_areas_ids=${T.join(",")}`;m(!0),fetch(P).then(b=>b.json()).then(b=>{m(!1),b?b.result===!1?Je.fire({title:"",html:"<p>"+V.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:V.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!$),X(N)):(m(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Je.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:V.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${f.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:$,size:"lg",scrollable:!0,toggle:()=>J(!$),labelledBy:"esempio2",container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>J(!$),id:"esempio2",children:V.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:V.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),h.jsx(Ic,{position:B,areasLayer:c,bounds:j,onMarkedMoved:(P,b)=>{ve(P,b)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!$),children:V.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!N||p,children:V.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:F,toggle:()=>E(!F),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:V.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:z})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>E(!F),children:V.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${f.id}-${f.key}`,inputClasses:"form-control",source:en.debounce(Z,520),onConfirm:P=>{if(O(!1),Q.current="",P){P===""&&X(null);let b=s.find(W=>W.label===P);X(b)}},onClear:()=>{O(!1),Q.current="",X(null)},dropdownArrow:()=>null,minLength:3,disabled:y,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:B==null?void 0:B.label,value:_,tNoResults:()=>V.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>V.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!y&&h.jsxs(le.Button,{type:"button",value:V.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),k(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:V.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:ja.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this},this.dataValue))}setValue(i){this.valuePosition=i,this.updateValue(i)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Ct(ja,"editForm",Yc);let xa=ja;const zc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Lc(...f){return ot.Components.baseEditForm([{key:"display",components:zc}],...f)}const wn=cr.Formio.Components.components.input,Wc=({component:f,current:i,onChange:g,i18next:l})=>{var H,F;const V="list-services",B="selected-category",[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(null),[d,p]=q.useState(null),[m,T]=q.useState(""),[v,D]=q.useState(!1),[O,j]=q.useState(!1),R=q.useRef(!1),N=q.useRef(),k=q.useMemo(()=>{if(!o)return null;const E=x.find(J=>J.name===o);return E||X.find(J=>J.name===o)||null},[o,x,X]),y=q.useMemo(()=>(k==null?void 0:k.services)||[],[k]),C=async()=>{var Q,ue;j(!0);const E=sessionStorage.getItem(V),$=sessionStorage.getItem(B);if(E)try{const se=JSON.parse(E);if(Array.isArray(se)&&se.length>0){s(se),a(se);const ye=se.find(ce=>ce.name===$)||se[0];return c((ye==null?void 0:ye.name)||null),j(!1),se}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),re={};J.forEach(se=>{(se.categories??[]).forEach(ye=>{re[ye]||(re[ye]={name:ye,services:[]}),re[ye].services.push(se)})});const ee=Object.fromEntries(Object.entries(re).sort(([se],[ye])=>se.localeCompare(ye,"it",{sensitivity:"base"}))),fe=Object.values(ee).filter(se=>(se.name??"").trim()!=="");return s(fe),a(fe),c(((Q=fe[0])==null?void 0:Q.name)||null),sessionStorage.setItem(V,JSON.stringify(fe)),sessionStorage.setItem(B,((ue=fe[0])==null?void 0:ue.name)||""),j(!1),fe};q.useEffect(()=>{o&&sessionStorage.setItem(B,o)},[o]),q.useEffect(()=>{R.current||(R.current=!0,C())},[]);const _=E=>{var Z;const $=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),re=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${$(Ne)}`,"i").test(ve),fe=(ve,Ne)=>{const be=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(re(ve.abstract??""));if(!Ne.every(b=>ee(be,b)||ee(Ce,b)||ee(Re,b)))return-1;let P=0;for(const b of Ne)ee(be,b)?P+=3:ee(Ce,b)?P+=2:ee(Re,b)&&(P+=1);return P},Q=E.target.value;T(Q);const ue=J(Q);if(!ue){a(X),c(ve=>{var Ne;return ve??((Ne=X[0])==null?void 0:Ne.name)??null});return}const se=ue.split(" ").filter(Boolean),ye=X.map(ve=>{const Ne=ve.services.map(be=>({service:be,score:fe(be,se)})).filter(be=>be.score>=0).sort((be,Ce)=>Ce.score-be.score).map(be=>be.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(ye);const ce=ye.some(ve=>ve.name===o);c(ce?o:((Z=ye[0])==null?void 0:Z.name)??null)},M=E=>{p(E);const $=X.find(J=>J.services.some(re=>re.id===E.id));$&&c($.name),g({id:E.id,link:E.link,name:E.name,show_howto_in_motivation:E.show_howto_in_motivation,categories:E.categories,offices:E.offices,abstract:E.abstract,view_type:E.view_type}),i.data.user_group=null,Tn()},z=E=>{c(E.name),p(null),T(""),a(X),g({})};return q.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");D(E)},[]),q.useEffect(()=>{const E=setTimeout(()=>{const $=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if($!=null&&$.id&&(p($),X.length>0)){const J=X.find(re=>re.services.some(ee=>ee.id===$.id));J&&c(J.name)}},500);return()=>clearTimeout(E)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,X]),q.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const $=()=>{var re,ee,fe;const J=(fe=(re=E.submission)==null?void 0:re.data)==null?void 0:fe[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(J!=null&&J.id&&(p(J),X.length>0)){const Q=X.find(ue=>ue.services.some(se=>se.id===J.id));Q&&c(Q.name)}};return E.on("change",$),()=>E.off("change",$)},[X,(H=i==null?void 0:i.component)==null?void 0:H.key]),O?h.jsx("div",{className:"services-booking",ref:N,children:h.jsxs("div",{children:[l.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:N,children:X&&!v?h.jsxs(le.Container,{children:[h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:l.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(le.Input,{id:"search",label:l.t("Cerca"),type:"text",value:m,onChange:_,onInput:_,infoText:l.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[k?h.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:h.jsxs("div",{className:"categories-list",children:[h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:l.t("Categorie")}),x.length>0&&x.map(E=>{const $=o===E.name;return h.jsxs("button",{onClick:()=>z(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${$?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:E.name}),h.jsxs("small",{className:`d-block mt-1 ${$?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?l.t("servizi"):l.t("servizio")]})]},E.name)})]})}):null,h.jsx(le.Col,{lg:k?9:12,md:k?8:12,children:h.jsxs("div",{className:"services-container",children:[y.length>0?h.jsxs("div",{className:"services-header mb-4",children:[h.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:k==null?void 0:k.name}),h.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,y.length>0?h.jsx("div",{className:"services-list",children:y.map(E=>{const $=(d==null?void 0:d.id)===E.id,J=xn.sanitize(E==null?void 0:E.abstract);return h.jsx("button",{onClick:()=>M(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${$?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${E.name}`,"aria-pressed":$,children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsxs("div",{className:"flex-grow-1",children:[h.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),(E==null?void 0:E.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},E.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:l.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):v?h.jsx("fieldset",{className:"it-page-section",children:h.jsx("div",{className:"cmp-card mt-2",children:h.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[h.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:h.jsx("div",{className:"d-flex",children:h.jsx("h2",{className:"title-xxlarge mb-1",children:k==null?void 0:k.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(F=i==null?void 0:i.dataValue)!=null&&F.id?h.jsx("div",{className:"services-list",children:h.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsx("div",{className:"flex-grow-1",children:h.jsx("p",{className:"mb-2 text-dark text-paragraph",children:i.dataValue.name})})})},i.dataValue.id)}):null})]})})}):null})},Ta=class Ta extends wn{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Ta.schema()}}static schema(){return wn.schema({type:"list-services"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:g,component:this.component,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){i&&(this.shouldSetValue=!0,this.updateValue(i))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Ct(Ta,"editForm",Lc);let Sa=Ta;const ur={pagebreak:ba,dynamic_calendar:On,calendar:_a,"calendar-advanced":wa,sdcfile:Ma,address_map:xa,"list-services":Sa};function Vc(f){if(!f||typeof f.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,g])=>{f.addComponent(i,g)}),ur}exports.Calendar=_a;exports.CalendarAdvanced=wa;exports.FormioAddressMap=xa;exports.FormioDynamicCalendar=On;exports.FormioListServices=Sa;exports.FormioPageBreak=ba;exports.SdcFile=Ma;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
107
107
|
//# sourceMappingURL=index.cjs.map
|