@opencitylabs/formio-custom-components 0.3.2 → 0.3.3
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +47 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -81,7 +81,7 @@ if(data.calendarId && data.api_url){
|
|
|
81
81
|
"headers": {
|
|
82
82
|
"Authorization": "Basic <key>"
|
|
83
83
|
}
|
|
84
|
-
}`,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}],Ih=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Fh(...l){return tt.Components.baseEditForm([{key:"display",components:Eh},{key:"data",components:Rh},{label:"File",key:"file",weight:5,components:Ah},{key:"validation",components:Ih}],...l)}var Qr,Yi;function wn(){if(Yi)return Qr;Yi=1;var l=Array.isArray;return Qr=l,Qr}var ea,Ci;function Vh(){if(Ci)return ea;Ci=1;var l=typeof fr=="object"&&fr&&fr.Object===Object&&fr;return ea=l,ea}var ta,ji;function Sn(){if(ji)return ta;ji=1;var l=Vh(),s=typeof self=="object"&&self&&self.Object===Object&&self,u=l||s||Function("return this")();return ta=u,ta}var ra,Ti;function Mn(){if(Ti)return ra;Ti=1;var l=Sn(),s=l.Symbol;return ra=s,ra}var aa,Pi;function zh(){if(Pi)return aa;Pi=1;var l=Mn(),s=Object.prototype,u=s.hasOwnProperty,i=s.toString,S=l?l.toStringTag:void 0;function x(I){var o=u.call(I,S),y=I[S];try{I[S]=void 0;var r=!0}catch{}var c=i.call(I);return r&&(o?I[S]=y:delete I[S]),c}return aa=x,aa}var na,Ni;function Lh(){if(Ni)return na;Ni=1;var l=Object.prototype,s=l.toString;function u(i){return s.call(i)}return na=u,na}var ia,Ri;function $s(){if(Ri)return ia;Ri=1;var l=Mn(),s=zh(),u=Lh(),i="[object Null]",S="[object Undefined]",x=l?l.toStringTag:void 0;function I(o){return o==null?o===void 0?S:i:x&&x in Object(o)?s(o):u(o)}return ia=I,ia}var sa,Ei;function Wh(){if(Ei)return sa;Ei=1;function l(s){return s!=null&&typeof s=="object"}return sa=l,sa}var oa,Ai;function xn(){if(Ai)return oa;Ai=1;var l=$s(),s=Wh(),u="[object Symbol]";function i(S){return typeof S=="symbol"||s(S)&&l(S)==u}return oa=i,oa}var la,Ii;function qh(){if(Ii)return la;Ii=1;var l=wn(),s=xn(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function S(x,I){if(l(x))return!1;var o=typeof x;return o=="number"||o=="symbol"||o=="boolean"||x==null||s(x)?!0:i.test(x)||!u.test(x)||I!=null&&x in Object(I)}return la=S,la}var ua,Fi;function Dn(){if(Fi)return ua;Fi=1;function l(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}return ua=l,ua}var ca,Vi;function Hh(){if(Vi)return ca;Vi=1;var l=$s(),s=Dn(),u="[object AsyncFunction]",i="[object Function]",S="[object GeneratorFunction]",x="[object Proxy]";function I(o){if(!s(o))return!1;var y=l(o);return y==i||y==S||y==u||y==x}return ca=I,ca}var da,zi;function $h(){if(zi)return da;zi=1;var l=Sn(),s=l["__core-js_shared__"];return da=s,da}var ha,Li;function Bh(){if(Li)return ha;Li=1;var l=$h(),s=(function(){var i=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function u(i){return!!s&&s in i}return ha=u,ha}var fa,Wi;function Uh(){if(Wi)return fa;Wi=1;var l=Function.prototype,s=l.toString;function u(i){if(i!=null){try{return s.call(i)}catch{}try{return i+""}catch{}}return""}return fa=u,fa}var ma,qi;function Gh(){if(qi)return ma;qi=1;var l=Hh(),s=Bh(),u=Dn(),i=Uh(),S=/[\\^$.*+?()[\]{}|]/g,x=/^\[object .+?Constructor\]$/,I=Function.prototype,o=Object.prototype,y=I.toString,r=o.hasOwnProperty,c=RegExp("^"+y.call(r).replace(S,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!u(f)||s(f))return!1;var p=l(f)?c:x;return p.test(i(f))}return ma=h,ma}var pa,Hi;function Jh(){if(Hi)return pa;Hi=1;function l(s,u){return s?.[u]}return pa=l,pa}var ga,$i;function kn(){if($i)return ga;$i=1;var l=Gh(),s=Jh();function u(i,S){var x=s(i,S);return l(x)?x:void 0}return ga=u,ga}var va,Bi;function Sr(){if(Bi)return va;Bi=1;var l=kn(),s=l(Object,"create");return va=s,va}var ya,Ui;function Kh(){if(Ui)return ya;Ui=1;var l=Sr();function s(){this.__data__=l?l(null):{},this.size=0}return ya=s,ya}var _a,Gi;function Xh(){if(Gi)return _a;Gi=1;function l(s){var u=this.has(s)&&delete this.__data__[s];return this.size-=u?1:0,u}return _a=l,_a}var ba,Ji;function Zh(){if(Ji)return ba;Ji=1;var l=Sr(),s="__lodash_hash_undefined__",u=Object.prototype,i=u.hasOwnProperty;function S(x){var I=this.__data__;if(l){var o=I[x];return o===s?void 0:o}return i.call(I,x)?I[x]:void 0}return ba=S,ba}var wa,Ki;function Qh(){if(Ki)return wa;Ki=1;var l=Sr(),s=Object.prototype,u=s.hasOwnProperty;function i(S){var x=this.__data__;return l?x[S]!==void 0:u.call(x,S)}return wa=i,wa}var Sa,Xi;function ef(){if(Xi)return Sa;Xi=1;var l=Sr(),s="__lodash_hash_undefined__";function u(i,S){var x=this.__data__;return this.size+=this.has(i)?0:1,x[i]=l&&S===void 0?s:S,this}return Sa=u,Sa}var Ma,Zi;function tf(){if(Zi)return Ma;Zi=1;var l=Kh(),s=Xh(),u=Zh(),i=Qh(),S=ef();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,Ma=x,Ma}var xa,Qi;function rf(){if(Qi)return xa;Qi=1;function l(){this.__data__=[],this.size=0}return xa=l,xa}var Da,es;function Bs(){if(es)return Da;es=1;function l(s,u){return s===u||s!==s&&u!==u}return Da=l,Da}var ka,ts;function Mr(){if(ts)return ka;ts=1;var l=Bs();function s(u,i){for(var S=u.length;S--;)if(l(u[S][0],i))return S;return-1}return ka=s,ka}var Oa,rs;function af(){if(rs)return Oa;rs=1;var l=Mr(),s=Array.prototype,u=s.splice;function i(S){var x=this.__data__,I=l(x,S);if(I<0)return!1;var o=x.length-1;return I==o?x.pop():u.call(x,I,1),--this.size,!0}return Oa=i,Oa}var Ya,as;function nf(){if(as)return Ya;as=1;var l=Mr();function s(u){var i=this.__data__,S=l(i,u);return S<0?void 0:i[S][1]}return Ya=s,Ya}var Ca,ns;function sf(){if(ns)return Ca;ns=1;var l=Mr();function s(u){return l(this.__data__,u)>-1}return Ca=s,Ca}var ja,is;function of(){if(is)return ja;is=1;var l=Mr();function s(u,i){var S=this.__data__,x=l(S,u);return x<0?(++this.size,S.push([u,i])):S[x][1]=i,this}return ja=s,ja}var Ta,ss;function lf(){if(ss)return Ta;ss=1;var l=rf(),s=af(),u=nf(),i=sf(),S=of();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,Ta=x,Ta}var Pa,os;function uf(){if(os)return Pa;os=1;var l=kn(),s=Sn(),u=l(s,"Map");return Pa=u,Pa}var Na,ls;function cf(){if(ls)return Na;ls=1;var l=tf(),s=lf(),u=uf();function i(){this.size=0,this.__data__={hash:new l,map:new(u||s),string:new l}}return Na=i,Na}var Ra,us;function df(){if(us)return Ra;us=1;function l(s){var u=typeof s;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?s!=="__proto__":s===null}return Ra=l,Ra}var Ea,cs;function xr(){if(cs)return Ea;cs=1;var l=df();function s(u,i){var S=u.__data__;return l(i)?S[typeof i=="string"?"string":"hash"]:S.map}return Ea=s,Ea}var Aa,ds;function hf(){if(ds)return Aa;ds=1;var l=xr();function s(u){var i=l(this,u).delete(u);return this.size-=i?1:0,i}return Aa=s,Aa}var Ia,hs;function ff(){if(hs)return Ia;hs=1;var l=xr();function s(u){return l(this,u).get(u)}return Ia=s,Ia}var Fa,fs;function mf(){if(fs)return Fa;fs=1;var l=xr();function s(u){return l(this,u).has(u)}return Fa=s,Fa}var Va,ms;function pf(){if(ms)return Va;ms=1;var l=xr();function s(u,i){var S=l(this,u),x=S.size;return S.set(u,i),this.size+=S.size==x?0:1,this}return Va=s,Va}var za,ps;function gf(){if(ps)return za;ps=1;var l=cf(),s=hf(),u=ff(),i=mf(),S=pf();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,za=x,za}var La,gs;function vf(){if(gs)return La;gs=1;var l=gf(),s="Expected a function";function u(i,S){if(typeof i!="function"||S!=null&&typeof S!="function")throw new TypeError(s);var x=function(){var I=arguments,o=S?S.apply(this,I):I[0],y=x.cache;if(y.has(o))return y.get(o);var r=i.apply(this,I);return x.cache=y.set(o,r)||y,r};return x.cache=new(u.Cache||l),x}return u.Cache=l,La=u,La}var Wa,vs;function yf(){if(vs)return Wa;vs=1;var l=vf(),s=500;function u(i){var S=l(i,function(I){return x.size===s&&x.clear(),I}),x=S.cache;return S}return Wa=u,Wa}var qa,ys;function _f(){if(ys)return qa;ys=1;var l=yf(),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,i=l(function(S){var x=[];return S.charCodeAt(0)===46&&x.push(""),S.replace(s,function(I,o,y,r){x.push(y?r.replace(u,"$1"):o||I)}),x});return qa=i,qa}var Ha,_s;function bf(){if(_s)return Ha;_s=1;function l(s,u){for(var i=-1,S=s==null?0:s.length,x=Array(S);++i<S;)x[i]=u(s[i],i,s);return x}return Ha=l,Ha}var $a,bs;function wf(){if(bs)return $a;bs=1;var l=Mn(),s=bf(),u=wn(),i=xn(),S=l?l.prototype:void 0,x=S?S.toString:void 0;function I(o){if(typeof o=="string")return o;if(u(o))return s(o,I)+"";if(i(o))return x?x.call(o):"";var y=o+"";return y=="0"&&1/o==-1/0?"-0":y}return $a=I,$a}var Ba,ws;function Sf(){if(ws)return Ba;ws=1;var l=wf();function s(u){return u==null?"":l(u)}return Ba=s,Ba}var Ua,Ss;function Us(){if(Ss)return Ua;Ss=1;var l=wn(),s=qh(),u=_f(),i=Sf();function S(x,I){return l(x)?x:s(x,I)?[x]:u(i(x))}return Ua=S,Ua}var Ga,Ms;function Gs(){if(Ms)return Ga;Ms=1;var l=xn();function s(u){if(typeof u=="string"||l(u))return u;var i=u+"";return i=="0"&&1/u==-1/0?"-0":i}return Ga=s,Ga}var Ja,xs;function Mf(){if(xs)return Ja;xs=1;var l=Us(),s=Gs();function u(i,S){S=l(S,i);for(var x=0,I=S.length;i!=null&&x<I;)i=i[s(S[x++])];return x&&x==I?i:void 0}return Ja=u,Ja}var Ka,Ds;function xf(){if(Ds)return Ka;Ds=1;var l=Mf();function s(u,i,S){var x=u==null?void 0:l(u,i);return x===void 0?S:x}return Ka=s,Ka}var Df=xf();const Xa=pn(Df);var Za,ks;function kf(){if(ks)return Za;ks=1;var l=kn(),s=(function(){try{var u=l(Object,"defineProperty");return u({},"",{}),u}catch{}})();return Za=s,Za}var Qa,Os;function Of(){if(Os)return Qa;Os=1;var l=kf();function s(u,i,S){i=="__proto__"&&l?l(u,i,{configurable:!0,enumerable:!0,value:S,writable:!0}):u[i]=S}return Qa=s,Qa}var en,Ys;function Yf(){if(Ys)return en;Ys=1;var l=Of(),s=Bs(),u=Object.prototype,i=u.hasOwnProperty;function S(x,I,o){var y=x[I];(!(i.call(x,I)&&s(y,o))||o===void 0&&!(I in x))&&l(x,I,o)}return en=S,en}var tn,Cs;function Cf(){if(Cs)return tn;Cs=1;var l=9007199254740991,s=/^(?:0|[1-9]\d*)$/;function u(i,S){var x=typeof i;return S=S??l,!!S&&(x=="number"||x!="symbol"&&s.test(i))&&i>-1&&i%1==0&&i<S}return tn=u,tn}var rn,js;function jf(){if(js)return rn;js=1;var l=Yf(),s=Us(),u=Cf(),i=Dn(),S=Gs();function x(I,o,y,r){if(!i(I))return I;o=s(o,I);for(var c=-1,h=o.length,f=h-1,p=I;p!=null&&++c<h;){var g=S(o[c]),Y=y;if(g==="__proto__"||g==="constructor"||g==="prototype")return I;if(c!=f){var _=p[g];Y=r?r(_,g,p):void 0,Y===void 0&&(Y=i(_)?_:u(o[c+1])?[]:{})}l(p,g,Y),p=p[g]}return I}return rn=x,rn}var an,Ts;function Tf(){if(Ts)return an;Ts=1;var l=jf();function s(u,i,S){return u==null?u:l(u,i,S)}return an=s,an}var Pf=Tf();const nn=pn(Pf);document.documentElement.lang.toString();class Nf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Ee()}async getSessionAuthToken(){let s=this;await $t.get(s.basePath+"/api/session-auth").then(u=>{s.token=u.data.token}).catch(u=>{He.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let s=this;return new Promise(async(u,i)=>{er("auth-token")?u({token:er("auth-token")}):await $t.get(s.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(S=>{const x=Sc.jwtDecode(S.data.token);x.exp&&Sh("auth-token",S.data.token,x.exp)}).catch(S=>{console.log(S)})})}getToken(){return this.token}execAuthenticatedCall(s){this.token?s(this.token):this.getSessionAuthTokenPromise().then(u=>{this.token=u.token,s(this.token)})}}const sn=mn.Formio.Components.components.file;let hn=null;document.querySelector("widget-formio")!==null&&(hn=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Rf=({component:l,current:s,onChange:u,i18next:i})=>{const[S,x]=G.useState([]),[I,o]=G.useState(new Map),[y,r]=G.useState(!1),c=new Nf;G.useEffect(()=>{c.getSessionAuthTokenPromise()},[]);const h=(w,M)=>{o(V=>{const E=new Map(V);return E.set(w,{...M,progress:Number(M?.progress)||0}),E})};function f(w){return w.size>(v(l.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${i.t("I file non possono superare le dimensioni di")} ${l.fileMaxSize?l.fileMaxSize:"1GB"}`}:S.length>=(l.maxFiles?parseInt(l.maxFiles):l.multiple?100:1)?{code:"too-many-files",message:`${i.t("Puoi caricare massimo ")} ${l.maxFiles||100} ${i.t("file")}`}:w.size<v(l.fileMinSize)?{code:"file-too-small",message:`${i.t("I file devono avare una dimensione superiore a ")} ${l.fileMinSize}`}:null}function p(){if(l.filePattern){const M=l.filePattern.split(",").map(V=>V.trim()).filter(Boolean).reduce((V,E)=>{const A=E.startsWith(".")?E:`.${E}`,z=wc.getType(A);return z&&(V[z]||(V[z]=[]),V[z].push(A)),V},{});return Object.keys(M).length?M:void 0}else return!0}const g=w=>{let M={};return M.originalName=w.originalName?w.originalName:w.name,M.name=w.name,M.url=w.url,M.data=w.data,M.signature_validation=w.signature_validation,M.mime_type=w.mime_type,M.storage="url",M.size=w.size,M},{getRootProps:Y,getInputProps:_,fileRejections:k,isDragActive:C,open:j}=bc.useDropzone({onDrop:w=>{w.map(M=>{O(M).then(V=>{})})},maxFiles:l.maxFiles?parseInt(l.maxFiles)-S.length:l.multiple?100:1,validator:f,accept:p()}),F=w=>{const M=Ee()+"/api/attachments/"+w.data.id;fetch(M,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(()=>{x(V=>{let E=V.filter(A=>A.data.id!==w.data.id);return u(E),E})}).catch(V=>{He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},R=()=>{const w=typeof s?.getCurrentValue=="function"?s.getCurrentValue():s?.dataValue;w?.length>0&&(x(w),setTimeout(()=>{u(w)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function O(w){let M;const V=Ee()+"/it/upload";let E={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:l.protocol_required,size:w.size};return await $t.post(V,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(M=A.data.id,w.url=Ee()+"/it/allegati/"+M,w.storage="url",w.mime_type=w.type,w.protocol_required=l.protocol_required,w.data={...A.data,baseUrl:Ee()+"/it/allegati/"+M},h(M,w),await $t.put(A.data.uri,w,{onUploadProgress:z=>{let B=Math.round(z.loaded*100/z.total);o(ee=>{const ie=new Map(ee),re=w;return re.progress=parseInt(B),ie.has(M)&&ie.set(M,re),ie})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async z=>{const B=/\\|"/gi,ee=z.headers.etag.replace(B,"")||null;return await $t.put(Ee()+"/it/upload/"+M,{file_hash:ee,check_signature:l.check_signature}).then(async ie=>{o(te=>{const de=new Map(te);return de.delete(M),de});let re=s.dataValue||[],fe=null;if(x(te=>{const de=[...te,g(w)];return fe=de.length-1,u(de),de}),l.check_signature&&ie.data.url&&hn)return await $t.post(hn,{url:ie.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(te=>{w.signature_validation=te.data.sign,re[fe].signature_validation=te.data.sign}).catch(te=>{re[fe].signature_validation="File validation error: "+te});o(te=>{const de=new Map(te);return de.delete(M),de})}).catch(ie=>{o(re=>{const fe=new Map(re);return fe.delete(M),fe}),console.log(ie),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(z=>{o(B=>{const ee=new Map(B);return ee.delete(M),ee}),console.log(z),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),o(z=>{const B=new Map(z);return B.delete(M),B})})}function v(w){if(typeof w=="string"){if(w.search(/kb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024);if(w.search(/mb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024);if(w.search(/gb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024*1024);if(w.search(/b/i)===w.length-1||w.search(/s/i)===w.length-1)return parseFloat(w.substring(0,w.length-1));if(w.search(/m/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*60);if(w.search(/h/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*3600)}return w}function T(w,M=2){if(!+w)return"0 Bytes";const V=1024,E=M<0?0:M,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],z=Math.floor(Math.log(w)/Math.log(V));return`${parseFloat((w/Math.pow(V,z)).toFixed(E))} ${A[z]}`}return s.conditionallyHidden()||s.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsx("div",{children:m.jsxs("ul",{className:"upload-file-list",children:[S.map((w,M)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]},w.size+M)),S.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:i.t("Nessun elemento")})]})]})}):m.jsxs(m.Fragment,{children:[l.hideLabel||l.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,title:l.tooltip||void 0,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"}),l.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":l.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${C?" dragover":""}`,style:{border:"dashed"},...Y({onClick:w=>w.stopPropagation()}),children:[m.jsx("input",{id:`${l.id}-${l.key}`,"aria-describedby":`file-uploader-description-${l.id}-${l.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${C?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:i.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${l.id}-${l.key}`,children:i.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[i.t("oppure"),m.jsx(ue.Button,{tag:"input",type:"button",value:i.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:As.sanitize(l.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[S.map((w,M)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]}),m.jsx(ue.Button,{className:"px-1",onClick:()=>F(w),children:m.jsx(ue.Icon,{title:`${i.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+M)),Array.from(I.entries()).map(([w,M])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("Caricamento file:")}),M.name,m.jsx("span",{className:"upload-file-weight",children:T(M.size)})]}),m.jsx(ue.Progress,{value:Number(M?.progress)||0})]},w))]}),!!(k&&k.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:k.map(({file:w,errors:M},V)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:i.t("Errore caricamento file:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]}),m.jsx("div",{children:M.map(E=>E.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("I file possono essere di tipo "),l.filePattern]}):E.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("Puoi caricare massimo ")," ",l.maxFiles?l.maxFiles:l.multiple?100:1," ",i.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},w.size+V))})})]})})};class Dr extends sn{constructor(s,u,i){super({...s,clearOnHide:!1},u,i),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null,this.mountNode=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Dr.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||this.component?.key;s&&this.rootValue&&nn(this.rootValue,s,[])}}static schema(){return sn.schema({type:"sdcfile",modelType:"array"})}static editForm=Fh;getI18next(){return this.i18next&&typeof this.i18next.t=="function"?this.i18next:{language:this.options?.language||document?.documentElement?.lang||"it",t:(s,u)=>this.t(s,u)}}hideFileProcessingLoader(){this.refs?.fileProcessingLoader&&(this.refs.fileProcessingLoader.style.display="none")}renderReact(){if(this.rootComponent){if(this.builderMode){this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light file-uploader-box rounded p-3 text-secondary",children:m.jsx("div",{className:"upload-dragdrop",children:m.jsx("div",{className:"upload-dragdrop-text",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"File Sdc"})})})}));return}this.rootComponent.render(m.jsx(Rf,{component:this.component,current:this,i18next:this.getI18next(),onChange:s=>this.updateValueFromReact(s)}))}}attach(s){const u=super.attach(s);this.hideFileProcessingLoader();const i=`react-${this.id}`;this.loadRefs(s,{[i]:"single"});const S=this.refs[i];return S&&(this.rootComponent&&this.mountNode!==S&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent||(this.rootComponent=Et.createRoot(S)),this.mountNode=S,this.lastRenderedVisible=this.visible,this.renderReact()),u}updateValueFromReact(s,u={modified:!0}){const i=this.normalizeValue(s,u),S=this.updateValue(i,u),x=this.path||this.component?.key;if(x&&this.rootValue){const I=Xa(this.rootValue,x);this.isEqual(I,i)||nn(this.rootValue,x,i)}return S}setValue(s,u={}){const i=this.normalizeValue(s,u),S=super.setValue(i,u),x=this.path||this.component?.key;if(x&&this.rootValue){const I=Xa(this.rootValue,x);this.isEqual(I,i)||nn(this.rootValue,x,i)}return S}normalizeValue(s,u={}){const i=super.normalizeValue(s,u);return!this.component?.multiple||Array.isArray(i)?i:i==null||i===""?[]:[i]}detach(){return this.hideFileProcessingLoader(),this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.mountNode=null,super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){const s=super.getValue(),u=this.path||this.component?.key,i=u&&this.rootValue?Xa(this.rootValue,u):void 0;return this.component?.multiple?Array.isArray(s)&&s.length>0?s:Array.isArray(i)?i:[]:s??i??null}isEmpty(s=this.validationValue){return this.component?.multiple?!Array.isArray(s)||s.length===0:s==null||s===""}checkCondition(s,u){const i=super.checkCondition(s,u),S=this.visible;return this.lastRenderedVisible!==S&&(this.lastRenderedVisible=S,this.renderReact()),i}render(){const s=`<div ref="react-${this.id}"></div>`;return Object.getPrototypeOf(Object.getPrototypeOf(sn.prototype)).render.call(this,s)}}const Ef=[{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 Af(...l){return tt.Components.baseEditForm([{key:"display",components:Ef}],...l)}var gr={exports:{}},If=gr.exports,Ps;function Ff(){return Ps||(Ps=1,(function(l,s){(function(u,i){l.exports=i(G)})(If,(function(u){return(function(){var i={680:function(o){o.exports=u},8952:function(o,y,r){var c=r(4328),h=r(36),f=TypeError;o.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not a function")}},2096:function(o,y,r){var c=r(2424),h=String,f=TypeError;o.exports=function(p){if(c(p))return p;throw new f("Can't set "+h(p)+" as a prototype")}},4764:function(o,y,r){var c=r(9764).charAt;o.exports=function(h,f,p){return f+(p?c(h,f).length:1)}},6100:function(o,y,r){var c=r(7e3),h=TypeError;o.exports=function(f,p){if(c(p,f))return f;throw new h("Incorrect invocation")}},3951:function(o,y,r){var c=r(1632),h=String,f=TypeError;o.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not an object")}},2504:function(o,y,r){var c=r(4096),h=r(2495),f=r(3556),p=function(g){return function(Y,_,k){var C=c(Y),j=f(C);if(j===0)return!g&&-1;var F,R=h(k,j);if(g&&_!=_){for(;j>R;)if((F=C[R++])!=F)return!0}else for(;j>R;R++)if((g||R in C)&&C[R]===_)return g||R||0;return!g&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,y,r){var c=r(8992),h=r(1664),f=r(5712),p=r(4356),g=r(3556),Y=r(2568),_=h([].push),k=function(C){var j=C===1,F=C===2,R=C===3,O=C===4,v=C===6,T=C===7,w=C===5||v;return function(M,V,E,A){for(var z,B,ee=p(M),ie=f(ee),re=g(ie),fe=c(V,E),te=0,de=A||Y,ve=j?de(M,re):F||T?de(M,0):void 0;re>te;te++)if((w||te in ie)&&(B=fe(z=ie[te],te,ee),C))if(j)ve[te]=B;else if(B)switch(C){case 3:return!0;case 5:return z;case 6:return te;case 2:_(ve,z)}else switch(C){case 4:return!1;case 7:_(ve,z)}return v?-1:R||O?O:ve}};o.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},953:function(o,y,r){var c=r(9957),h=r(9972),f=r(8504),p=h("species");o.exports=function(g){return f>=51||!c((function(){var Y=[];return(Y.constructor={})[p]=function(){return{foo:1}},Y[g](Boolean).foo!==1}))}},1496:function(o,y,r){var c=r(9957);o.exports=function(h,f){var p=[][h];return!!p&&c((function(){p.call(null,f||function(){return 1},1)}))}},6728:function(o,y,r){var c=r(3476),h=r(1432),f=TypeError,p=Object.getOwnPropertyDescriptor,g=c&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(Y){return Y instanceof TypeError}})();o.exports=g?function(Y,_){if(h(Y)&&!p(Y,"length").writable)throw new f("Cannot set read only .length");return Y.length=_}:function(Y,_){return Y.length=_}},6736:function(o,y,r){var c=r(1432),h=r(6072),f=r(1632),p=r(9972)("species"),g=Array;o.exports=function(Y){var _;return c(Y)&&(_=Y.constructor,(h(_)&&(_===g||c(_.prototype))||f(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?g:_}},2568:function(o,y,r){var c=r(6736);o.exports=function(h,f){return new(c(h))(f===0?0:f)}},8696:function(o,y,r){var c=r(3951),h=r(3112);o.exports=function(f,p,g,Y){try{return Y?p(c(g)[0],g[1]):p(g)}catch(_){h(f,"throw",_)}}},1888:function(o,y,r){var c=r(1664),h=c({}.toString),f=c("".slice);o.exports=function(p){return f(h(p),8,-1)}},4427:function(o,y,r){var c=r(16),h=r(4328),f=r(1888),p=r(9972)("toStringTag"),g=Object,Y=f((function(){return arguments})())==="Arguments";o.exports=c?f:function(_){var k,C,j;return _===void 0?"Undefined":_===null?"Null":typeof(C=(function(F,R){try{return F[R]}catch{}})(k=g(_),p))=="string"?C:Y?f(k):(j=f(k))==="Object"&&h(k.callee)?"Arguments":j}},9968:function(o,y,r){var c=r(5152),h=r(9252),f=r(9444),p=r(8352);o.exports=function(g,Y,_){for(var k=h(Y),C=p.f,j=f.f,F=0;F<k.length;F++){var R=k[F];c(g,R)||_&&c(_,R)||C(g,R,j(Y,R))}}},2272:function(o,y,r){var c=r(9957);o.exports=!c((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(o){o.exports=function(y,r){return{value:y,done:r}}},3440:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=c?function(p,g,Y){return h.f(p,g,f(1,Y))}:function(p,g,Y){return p[g]=Y,p}},9728:function(o){o.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=function(p,g,Y){c?h.f(p,g,f(0,Y)):p[g]=Y}},2544:function(o,y,r){var c=r(5312),h=r(8352);o.exports=function(f,p,g){return g.get&&c(g.get,p,{getter:!0}),g.set&&c(g.set,p,{setter:!0}),h.f(f,p,g)}},6076:function(o,y,r){var c=r(4328),h=r(8352),f=r(5312),p=r(4636);o.exports=function(g,Y,_,k){k||(k={});var C=k.enumerable,j=k.name!==void 0?k.name:Y;if(c(_)&&f(_,j,k),k.global)C?g[Y]=_:p(Y,_);else{try{k.unsafe?g[Y]&&(C=!0):delete g[Y]}catch{}C?g[Y]=_:h.f(g,Y,{value:_,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return g}},4036:function(o,y,r){var c=r(6076);o.exports=function(h,f,p){for(var g in f)c(h,g,f[g],p);return h}},4636:function(o,y,r){var c=r(6420),h=Object.defineProperty;o.exports=function(f,p){try{h(c,f,{value:p,configurable:!0,writable:!0})}catch{c[f]=p}return p}},3476:function(o,y,r){var c=r(9957);o.exports=!c((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,y,r){var c=r(6420),h=r(1632),f=c.document,p=h(f)&&h(f.createElement);o.exports=function(g){return p?f.createElement(g):{}}},4316:function(o){var y=TypeError;o.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,y,r){var c,h,f=r(6420),p=r(6064),g=f.process,Y=f.Deno,_=g&&g.versions||Y&&Y.version,k=_&&_.v8;k&&(h=(c=k.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!h&&p&&(!(c=p.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=p.match(/Chrome\/(\d+)/))&&(h=+c[1]),o.exports=h},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,y,r){var c=r(1664),h=Error,f=c("".replace),p=String(new h("zxcasd").stack),g=/\n\s*at [^:]*:[^\n]*/,Y=g.test(p);o.exports=function(_,k){if(Y&&typeof _=="string"&&!h.prepareStackTrace)for(;k--;)_=f(_,g,"");return _}},3696:function(o,y,r){var c=r(3440),h=r(6520),f=r(9184),p=Error.captureStackTrace;o.exports=function(g,Y,_,k){f&&(p?p(g,Y):c(g,"stack",h(_,k)))}},9184:function(o,y,r){var c=r(9957),h=r(9728);o.exports=!c((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(o,y,r){var c=r(6420),h=r(9444).f,f=r(3440),p=r(6076),g=r(4636),Y=r(9968),_=r(6704);o.exports=function(k,C){var j,F,R,O,v,T=k.target,w=k.global,M=k.stat;if(j=w?c:M?c[T]||g(T,{}):c[T]&&c[T].prototype)for(F in C){if(O=C[F],R=k.dontCallGetSet?(v=h(j,F))&&v.value:j[F],!_(w?F:T+(M?".":"#")+F,k.forced)&&R!==void 0){if(typeof O==typeof R)continue;Y(O,R)}(k.sham||R&&R.sham)&&f(O,"sham",!0),p(j,F,O,k)}}},9957:function(o){o.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(o,y,r){r(880);var c=r(8448),h=r(6076),f=r(7680),p=r(9957),g=r(9972),Y=r(3440),_=g("species"),k=RegExp.prototype;o.exports=function(C,j,F,R){var O=g(C),v=!p((function(){var V={};return V[O]=function(){return 7},""[C](V)!==7})),T=v&&!p((function(){var V=!1,E=/a/;return C==="split"&&((E={}).constructor={},E.constructor[_]=function(){return E},E.flags="",E[O]=/./[O]),E.exec=function(){return V=!0,null},E[O](""),!V}));if(!v||!T||F){var w=/./[O],M=j(O,""[C],(function(V,E,A,z,B){var ee=E.exec;return ee===f||ee===k.exec?v&&!B?{done:!0,value:c(w,E,A,z)}:{done:!0,value:c(V,A,E,z)}:{done:!1}}));h(String.prototype,C,M[0]),h(k,O,M[1])}R&&Y(k[O],"sham",!0)}},908:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.apply,p=h.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(c?p.bind(f):function(){return p.apply(f,arguments)})},8992:function(o,y,r){var c=r(3180),h=r(8952),f=r(7332),p=c(c.bind);o.exports=function(g,Y){return h(g),Y===void 0?g:f?p(g,Y):function(){return g.apply(Y,arguments)}}},7332:function(o,y,r){var c=r(9957);o.exports=!c((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(o,y,r){var c=r(7332),h=Function.prototype.call;o.exports=c?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(o,y,r){var c=r(3476),h=r(5152),f=Function.prototype,p=c&&Object.getOwnPropertyDescriptor,g=h(f,"name"),Y=g&&(function(){}).name==="something",_=g&&(!c||c&&p(f,"name").configurable);o.exports={EXISTS:g,PROPER:Y,CONFIGURABLE:_}},5288:function(o,y,r){var c=r(1664),h=r(8952);o.exports=function(f,p,g){try{return c(h(Object.getOwnPropertyDescriptor(f,p)[g]))}catch{}}},3180:function(o,y,r){var c=r(1888),h=r(1664);o.exports=function(f){if(c(f)==="Function")return h(f)}},1664:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.call,p=c&&h.bind.bind(f,f);o.exports=c?p:function(g){return function(){return f.apply(g,arguments)}}},5232:function(o,y,r){var c=r(6420),h=r(4328);o.exports=function(f,p){return arguments.length<2?(g=c[f],h(g)?g:void 0):c[f]&&c[f][p];var g}},6752:function(o){o.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(o,y,r){var c=r(8952),h=r(9760);o.exports=function(f,p){var g=f[p];return h(g)?void 0:c(g)}},6420:function(o,y,r){var c=function(h){return h&&h.Math===Math&&h};o.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof r.g=="object"&&r.g)||c(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,y,r){var c=r(1664),h=r(4356),f=c({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,g){return f(h(p),g)}},2560:function(o){o.exports={}},4168:function(o,y,r){var c=r(5232);o.exports=c("document","documentElement")},9888:function(o,y,r){var c=r(3476),h=r(9957),f=r(8168);o.exports=!c&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,y,r){var c=r(1664),h=r(9957),f=r(1888),p=Object,g=c("".split);o.exports=h((function(){return!p("z").propertyIsEnumerable(0)}))?function(Y){return f(Y)==="String"?g(Y,""):p(Y)}:p},7512:function(o,y,r){var c=r(4328),h=r(1632),f=r(4024);o.exports=function(p,g,Y){var _,k;return f&&c(_=g.constructor)&&_!==Y&&h(k=_.prototype)&&k!==Y.prototype&&f(p,k),p}},9112:function(o,y,r){var c=r(1664),h=r(4328),f=r(3976),p=c(Function.toString);h(f.inspectSource)||(f.inspectSource=function(g){return p(g)}),o.exports=f.inspectSource},3480:function(o,y,r){var c=r(1632),h=r(3440);o.exports=function(f,p){c(p)&&"cause"in p&&h(f,"cause",p.cause)}},9104:function(o,y,r){var c,h,f,p=r(4288),g=r(6420),Y=r(1632),_=r(3440),k=r(5152),C=r(3976),j=r(6504),F=r(2560),R="Object already initialized",O=g.TypeError,v=g.WeakMap;if(p||C.state){var T=C.state||(C.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,c=function(M,V){if(T.has(M))throw new O(R);return V.facade=M,T.set(M,V),V},h=function(M){return T.get(M)||{}},f=function(M){return T.has(M)}}else{var w=j("state");F[w]=!0,c=function(M,V){if(k(M,w))throw new O(R);return V.facade=M,_(M,w,V),V},h=function(M){return k(M,w)?M[w]:{}},f=function(M){return k(M,w)}}o.exports={set:c,get:h,has:f,enforce:function(M){return f(M)?h(M):c(M,{})},getterFor:function(M){return function(V){var E;if(!Y(V)||(E=h(V)).type!==M)throw new O("Incompatible receiver, "+M+" required");return E}}}},1432:function(o,y,r){var c=r(1888);o.exports=Array.isArray||function(h){return c(h)==="Array"}},4328:function(o){var y=typeof document=="object"&&document.all;o.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(4427),g=r(5232),Y=r(9112),_=function(){},k=g("Reflect","construct"),C=/^\s*(?:class|function)\b/,j=c(C.exec),F=!C.test(_),R=function(v){if(!f(v))return!1;try{return k(_,[],v),!0}catch{return!1}},O=function(v){if(!f(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!j(C,Y(v))}catch{return!0}};O.sham=!0,o.exports=!k||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?O:R},6704:function(o,y,r){var c=r(9957),h=r(4328),f=/#|\.prototype\./,p=function(C,j){var F=Y[g(C)];return F===k||F!==_&&(h(j)?c(j):!!j)},g=p.normalize=function(C){return String(C).replace(f,".").toLowerCase()},Y=p.data={},_=p.NATIVE="N",k=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(y){return y==null}},1632:function(o,y,r){var c=r(4328);o.exports=function(h){return typeof h=="object"?h!==null:c(h)}},2424:function(o,y,r){var c=r(1632);o.exports=function(h){return c(h)||h===null}},7048:function(o){o.exports=!1},7728:function(o,y,r){var c=r(5232),h=r(4328),f=r(7e3),p=r(6536),g=Object;o.exports=p?function(Y){return typeof Y=="symbol"}:function(Y){var _=c("Symbol");return h(_)&&f(_.prototype,g(Y))}},3112:function(o,y,r){var c=r(8448),h=r(3951),f=r(4504);o.exports=function(p,g,Y){var _,k;h(p);try{if(!(_=f(p,"return"))){if(g==="throw")throw Y;return Y}_=c(_,p)}catch(C){k=!0,_=C}if(g==="throw")throw Y;if(k)throw _;return h(_),Y}},9724:function(o,y,r){var c=r(8448),h=r(9368),f=r(3440),p=r(4036),g=r(9972),Y=r(9104),_=r(4504),k=r(336).IteratorPrototype,C=r(3336),j=r(3112),F=g("toStringTag"),R="IteratorHelper",O="WrapForValidIterator",v=Y.set,T=function(V){var E=Y.getterFor(V?O:R);return p(h(k),{next:function(){var A=E(this);if(V)return A.nextHandler();try{var z=A.done?void 0:A.nextHandler();return C(z,A.done)}catch(B){throw A.done=!0,B}},return:function(){var A=E(this),z=A.iterator;if(A.done=!0,V){var B=_(z,"return");return B?c(B,z):C(void 0,!0)}if(A.inner)try{j(A.inner.iterator,"normal")}catch(ee){return j(z,"throw",ee)}return j(z,"normal"),C(void 0,!0)}})},w=T(!0),M=T(!1);f(M,F,"Iterator Helper"),o.exports=function(V,E){var A=function(z,B){B?(B.iterator=z.iterator,B.next=z.next):B=z,B.type=E?O:R,B.nextHandler=V,B.counter=0,B.done=!1,v(this,B)};return A.prototype=E?w:M,A}},5792:function(o,y,r){var c=r(8448),h=r(8952),f=r(3951),p=r(6752),g=r(9724),Y=r(8696),_=g((function(){var k=this.iterator,C=f(c(this.next,k));if(!(this.done=!!C.done))return Y(k,this.mapper,[C.value,this.counter++],!0)}));o.exports=function(k){return f(this),h(k),new _(p(this),{mapper:k})}},336:function(o,y,r){var c,h,f,p=r(9957),g=r(4328),Y=r(1632),_=r(9368),k=r(7796),C=r(6076),j=r(9972),F=r(7048),R=j("iterator"),O=!1;[].keys&&("next"in(f=[].keys())?(h=k(k(f)))!==Object.prototype&&(c=h):O=!0),!Y(c)||p((function(){var v={};return c[R].call(v)!==v}))?c={}:F&&(c=_(c)),g(c[R])||C(c,R,(function(){return this})),o.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:O}},3556:function(o,y,r){var c=r(7584);o.exports=function(h){return c(h.length)}},5312:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(5152),g=r(3476),Y=r(6208).CONFIGURABLE,_=r(9112),k=r(9104),C=k.enforce,j=k.get,F=String,R=Object.defineProperty,O=c("".slice),v=c("".replace),T=c([].join),w=g&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),M=String(String).split("String"),V=o.exports=function(E,A,z){O(F(A),0,7)==="Symbol("&&(A="["+v(F(A),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),z&&z.getter&&(A="get "+A),z&&z.setter&&(A="set "+A),(!p(E,"name")||Y&&E.name!==A)&&(g?R(E,"name",{value:A,configurable:!0}):E.name=A),w&&z&&p(z,"arity")&&E.length!==z.arity&&R(E,"length",{value:z.arity});try{z&&p(z,"constructor")&&z.constructor?g&&R(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var B=C(E);return p(B,"source")||(B.source=T(M,typeof A=="string"?A:"")),E};Function.prototype.toString=V((function(){return f(this)&&j(this).source||_(this)}),"toString")},1748:function(o){var y=Math.ceil,r=Math.floor;o.exports=Math.trunc||function(c){var h=+c;return(h>0?r:y)(h)}},8948:function(o,y,r){var c=r(5016);o.exports=function(h,f){return h===void 0?arguments.length<2?"":f:c(h)}},9292:function(o,y,r){var c=r(3476),h=r(1664),f=r(8448),p=r(9957),g=r(1531),Y=r(9392),_=r(8912),k=r(4356),C=r(5712),j=Object.assign,F=Object.defineProperty,R=h([].concat);o.exports=!j||p((function(){if(c&&j({b:1},j(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var O={},v={},T=Symbol("assign detection"),w="abcdefghijklmnopqrst";return O[T]=7,w.split("").forEach((function(M){v[M]=M})),j({},O)[T]!==7||g(j({},v)).join("")!==w}))?function(O,v){for(var T=k(O),w=arguments.length,M=1,V=Y.f,E=_.f;w>M;)for(var A,z=C(arguments[M++]),B=V?R(g(z),V(z)):g(z),ee=B.length,ie=0;ee>ie;)A=B[ie++],c&&!f(E,z,A)||(T[A]=z[A]);return T}:j},9368:function(o,y,r){var c,h=r(3951),f=r(2056),p=r(8256),g=r(2560),Y=r(4168),_=r(8168),k=r(6504),C="prototype",j="script",F=k("IE_PROTO"),R=function(){},O=function(w){return"<"+j+">"+w+"</"+j+">"},v=function(w){w.write(O("")),w.close();var M=w.parentWindow.Object;return w=null,M},T=function(){try{c=new ActiveXObject("htmlfile")}catch{}var w,M,V;T=typeof document<"u"?document.domain&&c?v(c):(M=_("iframe"),V="java"+j+":",M.style.display="none",Y.appendChild(M),M.src=String(V),(w=M.contentWindow.document).open(),w.write(O("document.F=Object")),w.close(),w.F):v(c);for(var E=p.length;E--;)delete T[C][p[E]];return T()};g[F]=!0,o.exports=Object.create||function(w,M){var V;return w!==null?(R[C]=h(w),V=new R,R[C]=null,V[F]=w):V=T(),M===void 0?V:f.f(V,M)}},2056:function(o,y,r){var c=r(3476),h=r(1576),f=r(8352),p=r(3951),g=r(4096),Y=r(1531);y.f=c&&!h?Object.defineProperties:function(_,k){p(_);for(var C,j=g(k),F=Y(k),R=F.length,O=0;R>O;)f.f(_,C=F[O++],j[C]);return _}},8352:function(o,y,r){var c=r(3476),h=r(9888),f=r(1576),p=r(3951),g=r(88),Y=TypeError,_=Object.defineProperty,k=Object.getOwnPropertyDescriptor,C="enumerable",j="configurable",F="writable";y.f=c?f?function(R,O,v){if(p(R),O=g(O),p(v),typeof R=="function"&&O==="prototype"&&"value"in v&&F in v&&!v[F]){var T=k(R,O);T&&T[F]&&(R[O]=v.value,v={configurable:j in v?v[j]:T[j],enumerable:C in v?v[C]:T[C],writable:!1})}return _(R,O,v)}:_:function(R,O,v){if(p(R),O=g(O),p(v),h)try{return _(R,O,v)}catch{}if("get"in v||"set"in v)throw new Y("Accessors not supported");return"value"in v&&(R[O]=v.value),R}},9444:function(o,y,r){var c=r(3476),h=r(8448),f=r(8912),p=r(9728),g=r(4096),Y=r(88),_=r(5152),k=r(9888),C=Object.getOwnPropertyDescriptor;y.f=c?C:function(j,F){if(j=g(j),F=Y(F),k)try{return C(j,F)}catch{}if(_(j,F))return p(!h(f.f,j,F),j[F])}},5048:function(o,y,r){var c=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return c(f,h)}},9392:function(o,y){y.f=Object.getOwnPropertySymbols},7796:function(o,y,r){var c=r(5152),h=r(4328),f=r(4356),p=r(6504),g=r(2272),Y=p("IE_PROTO"),_=Object,k=_.prototype;o.exports=g?_.getPrototypeOf:function(C){var j=f(C);if(c(j,Y))return j[Y];var F=j.constructor;return h(F)&&j instanceof F?F.prototype:j instanceof _?k:null}},7e3:function(o,y,r){var c=r(1664);o.exports=c({}.isPrototypeOf)},9008:function(o,y,r){var c=r(1664),h=r(5152),f=r(4096),p=r(2504).indexOf,g=r(2560),Y=c([].push);o.exports=function(_,k){var C,j=f(_),F=0,R=[];for(C in j)!h(g,C)&&h(j,C)&&Y(R,C);for(;k.length>F;)h(j,C=k[F++])&&(~p(R,C)||Y(R,C));return R}},1531:function(o,y,r){var c=r(9008),h=r(8256);o.exports=Object.keys||function(f){return c(f,h)}},8912:function(o,y){var r={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,h=c&&!r.call({1:2},1);y.f=h?function(f){var p=c(this,f);return!!p&&p.enumerable}:r},4024:function(o,y,r){var c=r(5288),h=r(3951),f=r(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,g=!1,Y={};try{(p=c(Object.prototype,"__proto__","set"))(Y,[]),g=Y instanceof Array}catch{}return function(_,k){return h(_),f(k),g?p(_,k):_.__proto__=k,_}})():void 0)},7032:function(o,y,r){var c=r(16),h=r(4427);o.exports=c?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(o,y,r){var c=r(8448),h=r(4328),f=r(1632),p=TypeError;o.exports=function(g,Y){var _,k;if(Y==="string"&&h(_=g.toString)&&!f(k=c(_,g))||h(_=g.valueOf)&&!f(k=c(_,g))||Y!=="string"&&h(_=g.toString)&&!f(k=c(_,g)))return k;throw new p("Can't convert object to primitive value")}},9252:function(o,y,r){var c=r(5232),h=r(1664),f=r(5048),p=r(9392),g=r(3951),Y=h([].concat);o.exports=c("Reflect","ownKeys")||function(_){var k=f.f(g(_)),C=p.f;return C?Y(k,C(_)):k}},584:function(o,y,r){var c=r(8352).f;o.exports=function(h,f,p){p in h||c(h,p,{configurable:!0,get:function(){return f[p]},set:function(g){f[p]=g}})}},9092:function(o,y,r){var c=r(8448),h=r(3951),f=r(4328),p=r(1888),g=r(7680),Y=TypeError;o.exports=function(_,k){var C=_.exec;if(f(C)){var j=c(C,_,k);return j!==null&&h(j),j}if(p(_)==="RegExp")return c(g,_,k);throw new Y("RegExp#exec called on incompatible receiver")}},7680:function(o,y,r){var c,h,f=r(8448),p=r(1664),g=r(5016),Y=r(8872),_=r(3548),k=r(4696),C=r(9368),j=r(9104).get,F=r(8e3),R=r(9124),O=k("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,w=p("".charAt),M=p("".indexOf),V=p("".replace),E=p("".slice),A=(h=/b*/g,f(v,c=/a/,"a"),f(v,h,"a"),c.lastIndex!==0||h.lastIndex!==0),z=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(A||B||z||F||R)&&(T=function(ee){var ie,re,fe,te,de,ve,me,oe=this,Z=j(oe),Ne=g(ee),Ie=Z.raw;if(Ie)return Ie.lastIndex=oe.lastIndex,ie=f(T,Ie,Ne),oe.lastIndex=Ie.lastIndex,ie;var Ce=Z.groups,Oe=z&&oe.sticky,$=f(Y,oe),J=oe.source,X=0,P=Ne;if(Oe&&($=V($,"y",""),M($,"g")===-1&&($+="g"),P=E(Ne,oe.lastIndex),oe.lastIndex>0&&(!oe.multiline||oe.multiline&&w(Ne,oe.lastIndex-1)!==`
|
|
84
|
+
}`,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}],Ih=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Fh(...l){return tt.Components.baseEditForm([{key:"display",components:Eh},{key:"data",components:Rh},{label:"File",key:"file",weight:5,components:Ah},{key:"validation",components:Ih}],...l)}var Qr,Yi;function wn(){if(Yi)return Qr;Yi=1;var l=Array.isArray;return Qr=l,Qr}var ea,Ci;function Vh(){if(Ci)return ea;Ci=1;var l=typeof fr=="object"&&fr&&fr.Object===Object&&fr;return ea=l,ea}var ta,ji;function Sn(){if(ji)return ta;ji=1;var l=Vh(),s=typeof self=="object"&&self&&self.Object===Object&&self,u=l||s||Function("return this")();return ta=u,ta}var ra,Ti;function Mn(){if(Ti)return ra;Ti=1;var l=Sn(),s=l.Symbol;return ra=s,ra}var aa,Pi;function zh(){if(Pi)return aa;Pi=1;var l=Mn(),s=Object.prototype,u=s.hasOwnProperty,i=s.toString,S=l?l.toStringTag:void 0;function x(I){var o=u.call(I,S),y=I[S];try{I[S]=void 0;var r=!0}catch{}var c=i.call(I);return r&&(o?I[S]=y:delete I[S]),c}return aa=x,aa}var na,Ni;function Lh(){if(Ni)return na;Ni=1;var l=Object.prototype,s=l.toString;function u(i){return s.call(i)}return na=u,na}var ia,Ri;function $s(){if(Ri)return ia;Ri=1;var l=Mn(),s=zh(),u=Lh(),i="[object Null]",S="[object Undefined]",x=l?l.toStringTag:void 0;function I(o){return o==null?o===void 0?S:i:x&&x in Object(o)?s(o):u(o)}return ia=I,ia}var sa,Ei;function Wh(){if(Ei)return sa;Ei=1;function l(s){return s!=null&&typeof s=="object"}return sa=l,sa}var oa,Ai;function xn(){if(Ai)return oa;Ai=1;var l=$s(),s=Wh(),u="[object Symbol]";function i(S){return typeof S=="symbol"||s(S)&&l(S)==u}return oa=i,oa}var la,Ii;function qh(){if(Ii)return la;Ii=1;var l=wn(),s=xn(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function S(x,I){if(l(x))return!1;var o=typeof x;return o=="number"||o=="symbol"||o=="boolean"||x==null||s(x)?!0:i.test(x)||!u.test(x)||I!=null&&x in Object(I)}return la=S,la}var ua,Fi;function Dn(){if(Fi)return ua;Fi=1;function l(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}return ua=l,ua}var ca,Vi;function Hh(){if(Vi)return ca;Vi=1;var l=$s(),s=Dn(),u="[object AsyncFunction]",i="[object Function]",S="[object GeneratorFunction]",x="[object Proxy]";function I(o){if(!s(o))return!1;var y=l(o);return y==i||y==S||y==u||y==x}return ca=I,ca}var da,zi;function $h(){if(zi)return da;zi=1;var l=Sn(),s=l["__core-js_shared__"];return da=s,da}var ha,Li;function Bh(){if(Li)return ha;Li=1;var l=$h(),s=(function(){var i=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function u(i){return!!s&&s in i}return ha=u,ha}var fa,Wi;function Uh(){if(Wi)return fa;Wi=1;var l=Function.prototype,s=l.toString;function u(i){if(i!=null){try{return s.call(i)}catch{}try{return i+""}catch{}}return""}return fa=u,fa}var ma,qi;function Gh(){if(qi)return ma;qi=1;var l=Hh(),s=Bh(),u=Dn(),i=Uh(),S=/[\\^$.*+?()[\]{}|]/g,x=/^\[object .+?Constructor\]$/,I=Function.prototype,o=Object.prototype,y=I.toString,r=o.hasOwnProperty,c=RegExp("^"+y.call(r).replace(S,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!u(f)||s(f))return!1;var p=l(f)?c:x;return p.test(i(f))}return ma=h,ma}var pa,Hi;function Jh(){if(Hi)return pa;Hi=1;function l(s,u){return s?.[u]}return pa=l,pa}var ga,$i;function kn(){if($i)return ga;$i=1;var l=Gh(),s=Jh();function u(i,S){var x=s(i,S);return l(x)?x:void 0}return ga=u,ga}var va,Bi;function Sr(){if(Bi)return va;Bi=1;var l=kn(),s=l(Object,"create");return va=s,va}var ya,Ui;function Kh(){if(Ui)return ya;Ui=1;var l=Sr();function s(){this.__data__=l?l(null):{},this.size=0}return ya=s,ya}var _a,Gi;function Xh(){if(Gi)return _a;Gi=1;function l(s){var u=this.has(s)&&delete this.__data__[s];return this.size-=u?1:0,u}return _a=l,_a}var ba,Ji;function Zh(){if(Ji)return ba;Ji=1;var l=Sr(),s="__lodash_hash_undefined__",u=Object.prototype,i=u.hasOwnProperty;function S(x){var I=this.__data__;if(l){var o=I[x];return o===s?void 0:o}return i.call(I,x)?I[x]:void 0}return ba=S,ba}var wa,Ki;function Qh(){if(Ki)return wa;Ki=1;var l=Sr(),s=Object.prototype,u=s.hasOwnProperty;function i(S){var x=this.__data__;return l?x[S]!==void 0:u.call(x,S)}return wa=i,wa}var Sa,Xi;function ef(){if(Xi)return Sa;Xi=1;var l=Sr(),s="__lodash_hash_undefined__";function u(i,S){var x=this.__data__;return this.size+=this.has(i)?0:1,x[i]=l&&S===void 0?s:S,this}return Sa=u,Sa}var Ma,Zi;function tf(){if(Zi)return Ma;Zi=1;var l=Kh(),s=Xh(),u=Zh(),i=Qh(),S=ef();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,Ma=x,Ma}var xa,Qi;function rf(){if(Qi)return xa;Qi=1;function l(){this.__data__=[],this.size=0}return xa=l,xa}var Da,es;function Bs(){if(es)return Da;es=1;function l(s,u){return s===u||s!==s&&u!==u}return Da=l,Da}var ka,ts;function Mr(){if(ts)return ka;ts=1;var l=Bs();function s(u,i){for(var S=u.length;S--;)if(l(u[S][0],i))return S;return-1}return ka=s,ka}var Oa,rs;function af(){if(rs)return Oa;rs=1;var l=Mr(),s=Array.prototype,u=s.splice;function i(S){var x=this.__data__,I=l(x,S);if(I<0)return!1;var o=x.length-1;return I==o?x.pop():u.call(x,I,1),--this.size,!0}return Oa=i,Oa}var Ya,as;function nf(){if(as)return Ya;as=1;var l=Mr();function s(u){var i=this.__data__,S=l(i,u);return S<0?void 0:i[S][1]}return Ya=s,Ya}var Ca,ns;function sf(){if(ns)return Ca;ns=1;var l=Mr();function s(u){return l(this.__data__,u)>-1}return Ca=s,Ca}var ja,is;function of(){if(is)return ja;is=1;var l=Mr();function s(u,i){var S=this.__data__,x=l(S,u);return x<0?(++this.size,S.push([u,i])):S[x][1]=i,this}return ja=s,ja}var Ta,ss;function lf(){if(ss)return Ta;ss=1;var l=rf(),s=af(),u=nf(),i=sf(),S=of();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,Ta=x,Ta}var Pa,os;function uf(){if(os)return Pa;os=1;var l=kn(),s=Sn(),u=l(s,"Map");return Pa=u,Pa}var Na,ls;function cf(){if(ls)return Na;ls=1;var l=tf(),s=lf(),u=uf();function i(){this.size=0,this.__data__={hash:new l,map:new(u||s),string:new l}}return Na=i,Na}var Ra,us;function df(){if(us)return Ra;us=1;function l(s){var u=typeof s;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?s!=="__proto__":s===null}return Ra=l,Ra}var Ea,cs;function xr(){if(cs)return Ea;cs=1;var l=df();function s(u,i){var S=u.__data__;return l(i)?S[typeof i=="string"?"string":"hash"]:S.map}return Ea=s,Ea}var Aa,ds;function hf(){if(ds)return Aa;ds=1;var l=xr();function s(u){var i=l(this,u).delete(u);return this.size-=i?1:0,i}return Aa=s,Aa}var Ia,hs;function ff(){if(hs)return Ia;hs=1;var l=xr();function s(u){return l(this,u).get(u)}return Ia=s,Ia}var Fa,fs;function mf(){if(fs)return Fa;fs=1;var l=xr();function s(u){return l(this,u).has(u)}return Fa=s,Fa}var Va,ms;function pf(){if(ms)return Va;ms=1;var l=xr();function s(u,i){var S=l(this,u),x=S.size;return S.set(u,i),this.size+=S.size==x?0:1,this}return Va=s,Va}var za,ps;function gf(){if(ps)return za;ps=1;var l=cf(),s=hf(),u=ff(),i=mf(),S=pf();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=u,x.prototype.has=i,x.prototype.set=S,za=x,za}var La,gs;function vf(){if(gs)return La;gs=1;var l=gf(),s="Expected a function";function u(i,S){if(typeof i!="function"||S!=null&&typeof S!="function")throw new TypeError(s);var x=function(){var I=arguments,o=S?S.apply(this,I):I[0],y=x.cache;if(y.has(o))return y.get(o);var r=i.apply(this,I);return x.cache=y.set(o,r)||y,r};return x.cache=new(u.Cache||l),x}return u.Cache=l,La=u,La}var Wa,vs;function yf(){if(vs)return Wa;vs=1;var l=vf(),s=500;function u(i){var S=l(i,function(I){return x.size===s&&x.clear(),I}),x=S.cache;return S}return Wa=u,Wa}var qa,ys;function _f(){if(ys)return qa;ys=1;var l=yf(),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,i=l(function(S){var x=[];return S.charCodeAt(0)===46&&x.push(""),S.replace(s,function(I,o,y,r){x.push(y?r.replace(u,"$1"):o||I)}),x});return qa=i,qa}var Ha,_s;function bf(){if(_s)return Ha;_s=1;function l(s,u){for(var i=-1,S=s==null?0:s.length,x=Array(S);++i<S;)x[i]=u(s[i],i,s);return x}return Ha=l,Ha}var $a,bs;function wf(){if(bs)return $a;bs=1;var l=Mn(),s=bf(),u=wn(),i=xn(),S=l?l.prototype:void 0,x=S?S.toString:void 0;function I(o){if(typeof o=="string")return o;if(u(o))return s(o,I)+"";if(i(o))return x?x.call(o):"";var y=o+"";return y=="0"&&1/o==-1/0?"-0":y}return $a=I,$a}var Ba,ws;function Sf(){if(ws)return Ba;ws=1;var l=wf();function s(u){return u==null?"":l(u)}return Ba=s,Ba}var Ua,Ss;function Us(){if(Ss)return Ua;Ss=1;var l=wn(),s=qh(),u=_f(),i=Sf();function S(x,I){return l(x)?x:s(x,I)?[x]:u(i(x))}return Ua=S,Ua}var Ga,Ms;function Gs(){if(Ms)return Ga;Ms=1;var l=xn();function s(u){if(typeof u=="string"||l(u))return u;var i=u+"";return i=="0"&&1/u==-1/0?"-0":i}return Ga=s,Ga}var Ja,xs;function Mf(){if(xs)return Ja;xs=1;var l=Us(),s=Gs();function u(i,S){S=l(S,i);for(var x=0,I=S.length;i!=null&&x<I;)i=i[s(S[x++])];return x&&x==I?i:void 0}return Ja=u,Ja}var Ka,Ds;function xf(){if(Ds)return Ka;Ds=1;var l=Mf();function s(u,i,S){var x=u==null?void 0:l(u,i);return x===void 0?S:x}return Ka=s,Ka}var Df=xf();const Xa=pn(Df);var Za,ks;function kf(){if(ks)return Za;ks=1;var l=kn(),s=(function(){try{var u=l(Object,"defineProperty");return u({},"",{}),u}catch{}})();return Za=s,Za}var Qa,Os;function Of(){if(Os)return Qa;Os=1;var l=kf();function s(u,i,S){i=="__proto__"&&l?l(u,i,{configurable:!0,enumerable:!0,value:S,writable:!0}):u[i]=S}return Qa=s,Qa}var en,Ys;function Yf(){if(Ys)return en;Ys=1;var l=Of(),s=Bs(),u=Object.prototype,i=u.hasOwnProperty;function S(x,I,o){var y=x[I];(!(i.call(x,I)&&s(y,o))||o===void 0&&!(I in x))&&l(x,I,o)}return en=S,en}var tn,Cs;function Cf(){if(Cs)return tn;Cs=1;var l=9007199254740991,s=/^(?:0|[1-9]\d*)$/;function u(i,S){var x=typeof i;return S=S??l,!!S&&(x=="number"||x!="symbol"&&s.test(i))&&i>-1&&i%1==0&&i<S}return tn=u,tn}var rn,js;function jf(){if(js)return rn;js=1;var l=Yf(),s=Us(),u=Cf(),i=Dn(),S=Gs();function x(I,o,y,r){if(!i(I))return I;o=s(o,I);for(var c=-1,h=o.length,f=h-1,p=I;p!=null&&++c<h;){var g=S(o[c]),Y=y;if(g==="__proto__"||g==="constructor"||g==="prototype")return I;if(c!=f){var _=p[g];Y=r?r(_,g,p):void 0,Y===void 0&&(Y=i(_)?_:u(o[c+1])?[]:{})}l(p,g,Y),p=p[g]}return I}return rn=x,rn}var an,Ts;function Tf(){if(Ts)return an;Ts=1;var l=jf();function s(u,i,S){return u==null?u:l(u,i,S)}return an=s,an}var Pf=Tf();const nn=pn(Pf);document.documentElement.lang.toString();class Nf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Ee()}async getSessionAuthToken(){let s=this;await $t.get(s.basePath+"/api/session-auth").then(u=>{s.token=u.data.token}).catch(u=>{He.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let s=this;return new Promise(async(u,i)=>{er("auth-token")?u({token:er("auth-token")}):await $t.get(s.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(S=>{const x=Sc.jwtDecode(S.data.token);x.exp&&Sh("auth-token",S.data.token,x.exp)}).catch(S=>{console.log(S)})})}getToken(){return this.token}execAuthenticatedCall(s){this.token?s(this.token):this.getSessionAuthTokenPromise().then(u=>{this.token=u.token,s(this.token)})}}const sn=mn.Formio.Components.components.file;let hn=null;document.querySelector("widget-formio")!==null&&(hn=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Rf=({component:l,current:s,onChange:u,i18next:i})=>{const[S,x]=G.useState([]),[I,o]=G.useState(new Map),[y,r]=G.useState(!1),c=new Nf;G.useEffect(()=>{c.getSessionAuthTokenPromise()},[]);const h=(w,M)=>{o(V=>{const E=new Map(V);return E.set(w,{...M,progress:Number(M?.progress)||0}),E})};function f(w){return w.size>(v(l.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${i.t("I file non possono superare le dimensioni di")} ${l.fileMaxSize?l.fileMaxSize:"1GB"}`}:S.length>=(l.maxFiles?parseInt(l.maxFiles):l.multiple?100:1)?{code:"too-many-files",message:`${i.t("Puoi caricare massimo ")} ${l.maxFiles||100} ${i.t("file")}`}:w.size<v(l.fileMinSize)?{code:"file-too-small",message:`${i.t("I file devono avare una dimensione superiore a ")} ${l.fileMinSize}`}:null}function p(){if(l.filePattern){const M=l.filePattern.split(",").map(V=>V.trim()).filter(Boolean).reduce((V,E)=>{const A=E.startsWith(".")?E:`.${E}`,z=wc.getType(A);return z&&(V[z]||(V[z]=[]),V[z].push(A)),V},{});return Object.keys(M).length?M:void 0}else return!0}const g=w=>{let M={};return M.originalName=w.originalName?w.originalName:w.name,M.name=w.name,M.url=w.url,M.data=w.data,M.signature_validation=w.signature_validation,M.mime_type=w.mime_type,M.storage="url",M.size=w.size,M},{getRootProps:Y,getInputProps:_,fileRejections:k,isDragActive:C,open:j}=bc.useDropzone({onDrop:w=>{w.map(M=>{O(M).then(V=>{})})},maxFiles:l.maxFiles?parseInt(l.maxFiles)-S.length:l.multiple?100:1,validator:f,accept:p()}),F=w=>{const M=Ee()+"/api/attachments/"+w.data.id;fetch(M,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(()=>{x(V=>{let E=V.filter(A=>A.data.id!==w.data.id);return u(E),E})}).catch(V=>{He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},R=()=>{const w=typeof s?.getCurrentValue=="function"?s.getCurrentValue():s?.dataValue;w?.length>0&&(x(w),setTimeout(()=>{u(w)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function O(w){let M;const V=Ee()+"/it/upload";let E={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:l.protocol_required,size:w.size};return await $t.post(V,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(M=A.data.id,w.url=Ee()+"/it/allegati/"+M,w.storage="url",w.mime_type=w.type,w.protocol_required=l.protocol_required,w.data={...A.data,baseUrl:Ee()+"/it/allegati/"+M},h(M,w),await $t.put(A.data.uri,w,{onUploadProgress:z=>{let B=Math.round(z.loaded*100/z.total);o(ee=>{const ie=new Map(ee),re=w;return re.progress=parseInt(B),ie.has(M)&&ie.set(M,re),ie})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async z=>{const B=/\\|"/gi,ee=z.headers.etag.replace(B,"")||null;return await $t.put(Ee()+"/it/upload/"+M,{file_hash:ee,check_signature:l.check_signature}).then(async ie=>{o(te=>{const de=new Map(te);return de.delete(M),de});let re=s.dataValue||[],fe=null;if(x(te=>{const de=[...te,g(w)];return fe=de.length-1,u(de),de}),l.check_signature&&ie.data.url&&hn)return await $t.post(hn,{url:ie.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(te=>{w.signature_validation=te.data.sign,re[fe].signature_validation=te.data.sign}).catch(te=>{re[fe].signature_validation="File validation error: "+te});o(te=>{const de=new Map(te);return de.delete(M),de})}).catch(ie=>{o(re=>{const fe=new Map(re);return fe.delete(M),fe}),console.log(ie),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(z=>{o(B=>{const ee=new Map(B);return ee.delete(M),ee}),console.log(z),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),o(z=>{const B=new Map(z);return B.delete(M),B})})}function v(w){if(typeof w=="string"){if(w.search(/kb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024);if(w.search(/mb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024);if(w.search(/gb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024*1024);if(w.search(/b/i)===w.length-1||w.search(/s/i)===w.length-1)return parseFloat(w.substring(0,w.length-1));if(w.search(/m/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*60);if(w.search(/h/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*3600)}return w}function T(w,M=2){if(!+w)return"0 Bytes";const V=1024,E=M<0?0:M,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],z=Math.floor(Math.log(w)/Math.log(V));return`${parseFloat((w/Math.pow(V,z)).toFixed(E))} ${A[z]}`}return s.conditionallyHidden()||s.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsxs("div",{children:[m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"})]}),m.jsxs("ul",{className:"upload-file-list",children:[S.map((w,M)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]},w.size+M)),S.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:i.t("Nessun elemento")})]})]})]}):m.jsxs(m.Fragment,{children:[l.hideLabel||l.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,title:l.tooltip||void 0,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"}),l.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":l.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${C?" dragover":""}`,style:{border:"dashed"},...Y({onClick:w=>w.stopPropagation()}),children:[m.jsx("input",{id:`${l.id}-${l.key}`,"aria-describedby":`file-uploader-description-${l.id}-${l.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${C?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:i.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${l.id}-${l.key}`,children:i.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[i.t("oppure"),m.jsx(ue.Button,{tag:"input",type:"button",value:i.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:As.sanitize(l.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[S.map((w,M)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]}),m.jsx(ue.Button,{className:"px-1",onClick:()=>F(w),children:m.jsx(ue.Icon,{title:`${i.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+M)),Array.from(I.entries()).map(([w,M])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("Caricamento file:")}),M.name,m.jsx("span",{className:"upload-file-weight",children:T(M.size)})]}),m.jsx(ue.Progress,{value:Number(M?.progress)||0})]},w))]}),!!(k&&k.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:k.map(({file:w,errors:M},V)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:i.t("Errore caricamento file:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]}),m.jsx("div",{children:M.map(E=>E.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("I file possono essere di tipo "),l.filePattern]}):E.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("Puoi caricare massimo ")," ",l.maxFiles?l.maxFiles:l.multiple?100:1," ",i.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},w.size+V))})})]})})};class Dr extends sn{constructor(s,u,i){super({...s,clearOnHide:!1},u,i),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null,this.mountNode=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Dr.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||this.component?.key;s&&this.rootValue&&nn(this.rootValue,s,[])}}static schema(){return sn.schema({type:"sdcfile",modelType:"array"})}static editForm=Fh;getI18next(){return this.i18next&&typeof this.i18next.t=="function"?this.i18next:{language:this.options?.language||document?.documentElement?.lang||"it",t:(s,u)=>this.t(s,u)}}hideFileProcessingLoader(){this.refs?.fileProcessingLoader&&(this.refs.fileProcessingLoader.style.display="none")}renderReact(){if(this.rootComponent){if(this.builderMode){this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light file-uploader-box rounded p-3 text-secondary",children:m.jsx("div",{className:"upload-dragdrop",children:m.jsx("div",{className:"upload-dragdrop-text",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"File Sdc"})})})}));return}this.rootComponent.render(m.jsx(Rf,{component:this.component,current:this,i18next:this.getI18next(),onChange:s=>this.updateValueFromReact(s)}))}}attach(s){const u=super.attach(s);this.hideFileProcessingLoader();const i=`react-${this.id}`;this.loadRefs(s,{[i]:"single"});const S=this.refs[i];return S&&(this.rootComponent&&this.mountNode!==S&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent||(this.rootComponent=Et.createRoot(S)),this.mountNode=S,this.lastRenderedVisible=this.visible,this.renderReact()),u}updateValueFromReact(s,u={modified:!0}){const i=this.normalizeValue(s,u),S=this.updateValue(i,u),x=this.path||this.component?.key;if(x&&this.rootValue){const I=Xa(this.rootValue,x);this.isEqual(I,i)||nn(this.rootValue,x,i)}return S}setValue(s,u={}){const i=this.normalizeValue(s,u),S=super.setValue(i,u),x=this.path||this.component?.key;if(x&&this.rootValue){const I=Xa(this.rootValue,x);this.isEqual(I,i)||nn(this.rootValue,x,i)}return S}normalizeValue(s,u={}){const i=super.normalizeValue(s,u);return!this.component?.multiple||Array.isArray(i)?i:i==null||i===""?[]:[i]}detach(){return this.hideFileProcessingLoader(),this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.mountNode=null,super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){const s=super.getValue(),u=this.path||this.component?.key,i=u&&this.rootValue?Xa(this.rootValue,u):void 0;return this.component?.multiple?Array.isArray(s)&&s.length>0?s:Array.isArray(i)?i:[]:s??i??null}isEmpty(s=this.validationValue){return this.component?.multiple?!Array.isArray(s)||s.length===0:s==null||s===""}checkCondition(s,u){const i=super.checkCondition(s,u),S=this.visible;return this.lastRenderedVisible!==S&&(this.lastRenderedVisible=S,this.renderReact()),i}render(){const s=`<div ref="react-${this.id}"></div>`;return Object.getPrototypeOf(Object.getPrototypeOf(sn.prototype)).render.call(this,s)}}const Ef=[{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 Af(...l){return tt.Components.baseEditForm([{key:"display",components:Ef}],...l)}var gr={exports:{}},If=gr.exports,Ps;function Ff(){return Ps||(Ps=1,(function(l,s){(function(u,i){l.exports=i(G)})(If,(function(u){return(function(){var i={680:function(o){o.exports=u},8952:function(o,y,r){var c=r(4328),h=r(36),f=TypeError;o.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not a function")}},2096:function(o,y,r){var c=r(2424),h=String,f=TypeError;o.exports=function(p){if(c(p))return p;throw new f("Can't set "+h(p)+" as a prototype")}},4764:function(o,y,r){var c=r(9764).charAt;o.exports=function(h,f,p){return f+(p?c(h,f).length:1)}},6100:function(o,y,r){var c=r(7e3),h=TypeError;o.exports=function(f,p){if(c(p,f))return f;throw new h("Incorrect invocation")}},3951:function(o,y,r){var c=r(1632),h=String,f=TypeError;o.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not an object")}},2504:function(o,y,r){var c=r(4096),h=r(2495),f=r(3556),p=function(g){return function(Y,_,k){var C=c(Y),j=f(C);if(j===0)return!g&&-1;var F,R=h(k,j);if(g&&_!=_){for(;j>R;)if((F=C[R++])!=F)return!0}else for(;j>R;R++)if((g||R in C)&&C[R]===_)return g||R||0;return!g&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,y,r){var c=r(8992),h=r(1664),f=r(5712),p=r(4356),g=r(3556),Y=r(2568),_=h([].push),k=function(C){var j=C===1,F=C===2,R=C===3,O=C===4,v=C===6,T=C===7,w=C===5||v;return function(M,V,E,A){for(var z,B,ee=p(M),ie=f(ee),re=g(ie),fe=c(V,E),te=0,de=A||Y,ve=j?de(M,re):F||T?de(M,0):void 0;re>te;te++)if((w||te in ie)&&(B=fe(z=ie[te],te,ee),C))if(j)ve[te]=B;else if(B)switch(C){case 3:return!0;case 5:return z;case 6:return te;case 2:_(ve,z)}else switch(C){case 4:return!1;case 7:_(ve,z)}return v?-1:R||O?O:ve}};o.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},953:function(o,y,r){var c=r(9957),h=r(9972),f=r(8504),p=h("species");o.exports=function(g){return f>=51||!c((function(){var Y=[];return(Y.constructor={})[p]=function(){return{foo:1}},Y[g](Boolean).foo!==1}))}},1496:function(o,y,r){var c=r(9957);o.exports=function(h,f){var p=[][h];return!!p&&c((function(){p.call(null,f||function(){return 1},1)}))}},6728:function(o,y,r){var c=r(3476),h=r(1432),f=TypeError,p=Object.getOwnPropertyDescriptor,g=c&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(Y){return Y instanceof TypeError}})();o.exports=g?function(Y,_){if(h(Y)&&!p(Y,"length").writable)throw new f("Cannot set read only .length");return Y.length=_}:function(Y,_){return Y.length=_}},6736:function(o,y,r){var c=r(1432),h=r(6072),f=r(1632),p=r(9972)("species"),g=Array;o.exports=function(Y){var _;return c(Y)&&(_=Y.constructor,(h(_)&&(_===g||c(_.prototype))||f(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?g:_}},2568:function(o,y,r){var c=r(6736);o.exports=function(h,f){return new(c(h))(f===0?0:f)}},8696:function(o,y,r){var c=r(3951),h=r(3112);o.exports=function(f,p,g,Y){try{return Y?p(c(g)[0],g[1]):p(g)}catch(_){h(f,"throw",_)}}},1888:function(o,y,r){var c=r(1664),h=c({}.toString),f=c("".slice);o.exports=function(p){return f(h(p),8,-1)}},4427:function(o,y,r){var c=r(16),h=r(4328),f=r(1888),p=r(9972)("toStringTag"),g=Object,Y=f((function(){return arguments})())==="Arguments";o.exports=c?f:function(_){var k,C,j;return _===void 0?"Undefined":_===null?"Null":typeof(C=(function(F,R){try{return F[R]}catch{}})(k=g(_),p))=="string"?C:Y?f(k):(j=f(k))==="Object"&&h(k.callee)?"Arguments":j}},9968:function(o,y,r){var c=r(5152),h=r(9252),f=r(9444),p=r(8352);o.exports=function(g,Y,_){for(var k=h(Y),C=p.f,j=f.f,F=0;F<k.length;F++){var R=k[F];c(g,R)||_&&c(_,R)||C(g,R,j(Y,R))}}},2272:function(o,y,r){var c=r(9957);o.exports=!c((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(o){o.exports=function(y,r){return{value:y,done:r}}},3440:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=c?function(p,g,Y){return h.f(p,g,f(1,Y))}:function(p,g,Y){return p[g]=Y,p}},9728:function(o){o.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=function(p,g,Y){c?h.f(p,g,f(0,Y)):p[g]=Y}},2544:function(o,y,r){var c=r(5312),h=r(8352);o.exports=function(f,p,g){return g.get&&c(g.get,p,{getter:!0}),g.set&&c(g.set,p,{setter:!0}),h.f(f,p,g)}},6076:function(o,y,r){var c=r(4328),h=r(8352),f=r(5312),p=r(4636);o.exports=function(g,Y,_,k){k||(k={});var C=k.enumerable,j=k.name!==void 0?k.name:Y;if(c(_)&&f(_,j,k),k.global)C?g[Y]=_:p(Y,_);else{try{k.unsafe?g[Y]&&(C=!0):delete g[Y]}catch{}C?g[Y]=_:h.f(g,Y,{value:_,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return g}},4036:function(o,y,r){var c=r(6076);o.exports=function(h,f,p){for(var g in f)c(h,g,f[g],p);return h}},4636:function(o,y,r){var c=r(6420),h=Object.defineProperty;o.exports=function(f,p){try{h(c,f,{value:p,configurable:!0,writable:!0})}catch{c[f]=p}return p}},3476:function(o,y,r){var c=r(9957);o.exports=!c((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,y,r){var c=r(6420),h=r(1632),f=c.document,p=h(f)&&h(f.createElement);o.exports=function(g){return p?f.createElement(g):{}}},4316:function(o){var y=TypeError;o.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,y,r){var c,h,f=r(6420),p=r(6064),g=f.process,Y=f.Deno,_=g&&g.versions||Y&&Y.version,k=_&&_.v8;k&&(h=(c=k.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!h&&p&&(!(c=p.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=p.match(/Chrome\/(\d+)/))&&(h=+c[1]),o.exports=h},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,y,r){var c=r(1664),h=Error,f=c("".replace),p=String(new h("zxcasd").stack),g=/\n\s*at [^:]*:[^\n]*/,Y=g.test(p);o.exports=function(_,k){if(Y&&typeof _=="string"&&!h.prepareStackTrace)for(;k--;)_=f(_,g,"");return _}},3696:function(o,y,r){var c=r(3440),h=r(6520),f=r(9184),p=Error.captureStackTrace;o.exports=function(g,Y,_,k){f&&(p?p(g,Y):c(g,"stack",h(_,k)))}},9184:function(o,y,r){var c=r(9957),h=r(9728);o.exports=!c((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(o,y,r){var c=r(6420),h=r(9444).f,f=r(3440),p=r(6076),g=r(4636),Y=r(9968),_=r(6704);o.exports=function(k,C){var j,F,R,O,v,T=k.target,w=k.global,M=k.stat;if(j=w?c:M?c[T]||g(T,{}):c[T]&&c[T].prototype)for(F in C){if(O=C[F],R=k.dontCallGetSet?(v=h(j,F))&&v.value:j[F],!_(w?F:T+(M?".":"#")+F,k.forced)&&R!==void 0){if(typeof O==typeof R)continue;Y(O,R)}(k.sham||R&&R.sham)&&f(O,"sham",!0),p(j,F,O,k)}}},9957:function(o){o.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(o,y,r){r(880);var c=r(8448),h=r(6076),f=r(7680),p=r(9957),g=r(9972),Y=r(3440),_=g("species"),k=RegExp.prototype;o.exports=function(C,j,F,R){var O=g(C),v=!p((function(){var V={};return V[O]=function(){return 7},""[C](V)!==7})),T=v&&!p((function(){var V=!1,E=/a/;return C==="split"&&((E={}).constructor={},E.constructor[_]=function(){return E},E.flags="",E[O]=/./[O]),E.exec=function(){return V=!0,null},E[O](""),!V}));if(!v||!T||F){var w=/./[O],M=j(O,""[C],(function(V,E,A,z,B){var ee=E.exec;return ee===f||ee===k.exec?v&&!B?{done:!0,value:c(w,E,A,z)}:{done:!0,value:c(V,A,E,z)}:{done:!1}}));h(String.prototype,C,M[0]),h(k,O,M[1])}R&&Y(k[O],"sham",!0)}},908:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.apply,p=h.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(c?p.bind(f):function(){return p.apply(f,arguments)})},8992:function(o,y,r){var c=r(3180),h=r(8952),f=r(7332),p=c(c.bind);o.exports=function(g,Y){return h(g),Y===void 0?g:f?p(g,Y):function(){return g.apply(Y,arguments)}}},7332:function(o,y,r){var c=r(9957);o.exports=!c((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(o,y,r){var c=r(7332),h=Function.prototype.call;o.exports=c?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(o,y,r){var c=r(3476),h=r(5152),f=Function.prototype,p=c&&Object.getOwnPropertyDescriptor,g=h(f,"name"),Y=g&&(function(){}).name==="something",_=g&&(!c||c&&p(f,"name").configurable);o.exports={EXISTS:g,PROPER:Y,CONFIGURABLE:_}},5288:function(o,y,r){var c=r(1664),h=r(8952);o.exports=function(f,p,g){try{return c(h(Object.getOwnPropertyDescriptor(f,p)[g]))}catch{}}},3180:function(o,y,r){var c=r(1888),h=r(1664);o.exports=function(f){if(c(f)==="Function")return h(f)}},1664:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.call,p=c&&h.bind.bind(f,f);o.exports=c?p:function(g){return function(){return f.apply(g,arguments)}}},5232:function(o,y,r){var c=r(6420),h=r(4328);o.exports=function(f,p){return arguments.length<2?(g=c[f],h(g)?g:void 0):c[f]&&c[f][p];var g}},6752:function(o){o.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(o,y,r){var c=r(8952),h=r(9760);o.exports=function(f,p){var g=f[p];return h(g)?void 0:c(g)}},6420:function(o,y,r){var c=function(h){return h&&h.Math===Math&&h};o.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof r.g=="object"&&r.g)||c(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,y,r){var c=r(1664),h=r(4356),f=c({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,g){return f(h(p),g)}},2560:function(o){o.exports={}},4168:function(o,y,r){var c=r(5232);o.exports=c("document","documentElement")},9888:function(o,y,r){var c=r(3476),h=r(9957),f=r(8168);o.exports=!c&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,y,r){var c=r(1664),h=r(9957),f=r(1888),p=Object,g=c("".split);o.exports=h((function(){return!p("z").propertyIsEnumerable(0)}))?function(Y){return f(Y)==="String"?g(Y,""):p(Y)}:p},7512:function(o,y,r){var c=r(4328),h=r(1632),f=r(4024);o.exports=function(p,g,Y){var _,k;return f&&c(_=g.constructor)&&_!==Y&&h(k=_.prototype)&&k!==Y.prototype&&f(p,k),p}},9112:function(o,y,r){var c=r(1664),h=r(4328),f=r(3976),p=c(Function.toString);h(f.inspectSource)||(f.inspectSource=function(g){return p(g)}),o.exports=f.inspectSource},3480:function(o,y,r){var c=r(1632),h=r(3440);o.exports=function(f,p){c(p)&&"cause"in p&&h(f,"cause",p.cause)}},9104:function(o,y,r){var c,h,f,p=r(4288),g=r(6420),Y=r(1632),_=r(3440),k=r(5152),C=r(3976),j=r(6504),F=r(2560),R="Object already initialized",O=g.TypeError,v=g.WeakMap;if(p||C.state){var T=C.state||(C.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,c=function(M,V){if(T.has(M))throw new O(R);return V.facade=M,T.set(M,V),V},h=function(M){return T.get(M)||{}},f=function(M){return T.has(M)}}else{var w=j("state");F[w]=!0,c=function(M,V){if(k(M,w))throw new O(R);return V.facade=M,_(M,w,V),V},h=function(M){return k(M,w)?M[w]:{}},f=function(M){return k(M,w)}}o.exports={set:c,get:h,has:f,enforce:function(M){return f(M)?h(M):c(M,{})},getterFor:function(M){return function(V){var E;if(!Y(V)||(E=h(V)).type!==M)throw new O("Incompatible receiver, "+M+" required");return E}}}},1432:function(o,y,r){var c=r(1888);o.exports=Array.isArray||function(h){return c(h)==="Array"}},4328:function(o){var y=typeof document=="object"&&document.all;o.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(4427),g=r(5232),Y=r(9112),_=function(){},k=g("Reflect","construct"),C=/^\s*(?:class|function)\b/,j=c(C.exec),F=!C.test(_),R=function(v){if(!f(v))return!1;try{return k(_,[],v),!0}catch{return!1}},O=function(v){if(!f(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!j(C,Y(v))}catch{return!0}};O.sham=!0,o.exports=!k||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?O:R},6704:function(o,y,r){var c=r(9957),h=r(4328),f=/#|\.prototype\./,p=function(C,j){var F=Y[g(C)];return F===k||F!==_&&(h(j)?c(j):!!j)},g=p.normalize=function(C){return String(C).replace(f,".").toLowerCase()},Y=p.data={},_=p.NATIVE="N",k=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(y){return y==null}},1632:function(o,y,r){var c=r(4328);o.exports=function(h){return typeof h=="object"?h!==null:c(h)}},2424:function(o,y,r){var c=r(1632);o.exports=function(h){return c(h)||h===null}},7048:function(o){o.exports=!1},7728:function(o,y,r){var c=r(5232),h=r(4328),f=r(7e3),p=r(6536),g=Object;o.exports=p?function(Y){return typeof Y=="symbol"}:function(Y){var _=c("Symbol");return h(_)&&f(_.prototype,g(Y))}},3112:function(o,y,r){var c=r(8448),h=r(3951),f=r(4504);o.exports=function(p,g,Y){var _,k;h(p);try{if(!(_=f(p,"return"))){if(g==="throw")throw Y;return Y}_=c(_,p)}catch(C){k=!0,_=C}if(g==="throw")throw Y;if(k)throw _;return h(_),Y}},9724:function(o,y,r){var c=r(8448),h=r(9368),f=r(3440),p=r(4036),g=r(9972),Y=r(9104),_=r(4504),k=r(336).IteratorPrototype,C=r(3336),j=r(3112),F=g("toStringTag"),R="IteratorHelper",O="WrapForValidIterator",v=Y.set,T=function(V){var E=Y.getterFor(V?O:R);return p(h(k),{next:function(){var A=E(this);if(V)return A.nextHandler();try{var z=A.done?void 0:A.nextHandler();return C(z,A.done)}catch(B){throw A.done=!0,B}},return:function(){var A=E(this),z=A.iterator;if(A.done=!0,V){var B=_(z,"return");return B?c(B,z):C(void 0,!0)}if(A.inner)try{j(A.inner.iterator,"normal")}catch(ee){return j(z,"throw",ee)}return j(z,"normal"),C(void 0,!0)}})},w=T(!0),M=T(!1);f(M,F,"Iterator Helper"),o.exports=function(V,E){var A=function(z,B){B?(B.iterator=z.iterator,B.next=z.next):B=z,B.type=E?O:R,B.nextHandler=V,B.counter=0,B.done=!1,v(this,B)};return A.prototype=E?w:M,A}},5792:function(o,y,r){var c=r(8448),h=r(8952),f=r(3951),p=r(6752),g=r(9724),Y=r(8696),_=g((function(){var k=this.iterator,C=f(c(this.next,k));if(!(this.done=!!C.done))return Y(k,this.mapper,[C.value,this.counter++],!0)}));o.exports=function(k){return f(this),h(k),new _(p(this),{mapper:k})}},336:function(o,y,r){var c,h,f,p=r(9957),g=r(4328),Y=r(1632),_=r(9368),k=r(7796),C=r(6076),j=r(9972),F=r(7048),R=j("iterator"),O=!1;[].keys&&("next"in(f=[].keys())?(h=k(k(f)))!==Object.prototype&&(c=h):O=!0),!Y(c)||p((function(){var v={};return c[R].call(v)!==v}))?c={}:F&&(c=_(c)),g(c[R])||C(c,R,(function(){return this})),o.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:O}},3556:function(o,y,r){var c=r(7584);o.exports=function(h){return c(h.length)}},5312:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(5152),g=r(3476),Y=r(6208).CONFIGURABLE,_=r(9112),k=r(9104),C=k.enforce,j=k.get,F=String,R=Object.defineProperty,O=c("".slice),v=c("".replace),T=c([].join),w=g&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),M=String(String).split("String"),V=o.exports=function(E,A,z){O(F(A),0,7)==="Symbol("&&(A="["+v(F(A),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),z&&z.getter&&(A="get "+A),z&&z.setter&&(A="set "+A),(!p(E,"name")||Y&&E.name!==A)&&(g?R(E,"name",{value:A,configurable:!0}):E.name=A),w&&z&&p(z,"arity")&&E.length!==z.arity&&R(E,"length",{value:z.arity});try{z&&p(z,"constructor")&&z.constructor?g&&R(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var B=C(E);return p(B,"source")||(B.source=T(M,typeof A=="string"?A:"")),E};Function.prototype.toString=V((function(){return f(this)&&j(this).source||_(this)}),"toString")},1748:function(o){var y=Math.ceil,r=Math.floor;o.exports=Math.trunc||function(c){var h=+c;return(h>0?r:y)(h)}},8948:function(o,y,r){var c=r(5016);o.exports=function(h,f){return h===void 0?arguments.length<2?"":f:c(h)}},9292:function(o,y,r){var c=r(3476),h=r(1664),f=r(8448),p=r(9957),g=r(1531),Y=r(9392),_=r(8912),k=r(4356),C=r(5712),j=Object.assign,F=Object.defineProperty,R=h([].concat);o.exports=!j||p((function(){if(c&&j({b:1},j(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var O={},v={},T=Symbol("assign detection"),w="abcdefghijklmnopqrst";return O[T]=7,w.split("").forEach((function(M){v[M]=M})),j({},O)[T]!==7||g(j({},v)).join("")!==w}))?function(O,v){for(var T=k(O),w=arguments.length,M=1,V=Y.f,E=_.f;w>M;)for(var A,z=C(arguments[M++]),B=V?R(g(z),V(z)):g(z),ee=B.length,ie=0;ee>ie;)A=B[ie++],c&&!f(E,z,A)||(T[A]=z[A]);return T}:j},9368:function(o,y,r){var c,h=r(3951),f=r(2056),p=r(8256),g=r(2560),Y=r(4168),_=r(8168),k=r(6504),C="prototype",j="script",F=k("IE_PROTO"),R=function(){},O=function(w){return"<"+j+">"+w+"</"+j+">"},v=function(w){w.write(O("")),w.close();var M=w.parentWindow.Object;return w=null,M},T=function(){try{c=new ActiveXObject("htmlfile")}catch{}var w,M,V;T=typeof document<"u"?document.domain&&c?v(c):(M=_("iframe"),V="java"+j+":",M.style.display="none",Y.appendChild(M),M.src=String(V),(w=M.contentWindow.document).open(),w.write(O("document.F=Object")),w.close(),w.F):v(c);for(var E=p.length;E--;)delete T[C][p[E]];return T()};g[F]=!0,o.exports=Object.create||function(w,M){var V;return w!==null?(R[C]=h(w),V=new R,R[C]=null,V[F]=w):V=T(),M===void 0?V:f.f(V,M)}},2056:function(o,y,r){var c=r(3476),h=r(1576),f=r(8352),p=r(3951),g=r(4096),Y=r(1531);y.f=c&&!h?Object.defineProperties:function(_,k){p(_);for(var C,j=g(k),F=Y(k),R=F.length,O=0;R>O;)f.f(_,C=F[O++],j[C]);return _}},8352:function(o,y,r){var c=r(3476),h=r(9888),f=r(1576),p=r(3951),g=r(88),Y=TypeError,_=Object.defineProperty,k=Object.getOwnPropertyDescriptor,C="enumerable",j="configurable",F="writable";y.f=c?f?function(R,O,v){if(p(R),O=g(O),p(v),typeof R=="function"&&O==="prototype"&&"value"in v&&F in v&&!v[F]){var T=k(R,O);T&&T[F]&&(R[O]=v.value,v={configurable:j in v?v[j]:T[j],enumerable:C in v?v[C]:T[C],writable:!1})}return _(R,O,v)}:_:function(R,O,v){if(p(R),O=g(O),p(v),h)try{return _(R,O,v)}catch{}if("get"in v||"set"in v)throw new Y("Accessors not supported");return"value"in v&&(R[O]=v.value),R}},9444:function(o,y,r){var c=r(3476),h=r(8448),f=r(8912),p=r(9728),g=r(4096),Y=r(88),_=r(5152),k=r(9888),C=Object.getOwnPropertyDescriptor;y.f=c?C:function(j,F){if(j=g(j),F=Y(F),k)try{return C(j,F)}catch{}if(_(j,F))return p(!h(f.f,j,F),j[F])}},5048:function(o,y,r){var c=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return c(f,h)}},9392:function(o,y){y.f=Object.getOwnPropertySymbols},7796:function(o,y,r){var c=r(5152),h=r(4328),f=r(4356),p=r(6504),g=r(2272),Y=p("IE_PROTO"),_=Object,k=_.prototype;o.exports=g?_.getPrototypeOf:function(C){var j=f(C);if(c(j,Y))return j[Y];var F=j.constructor;return h(F)&&j instanceof F?F.prototype:j instanceof _?k:null}},7e3:function(o,y,r){var c=r(1664);o.exports=c({}.isPrototypeOf)},9008:function(o,y,r){var c=r(1664),h=r(5152),f=r(4096),p=r(2504).indexOf,g=r(2560),Y=c([].push);o.exports=function(_,k){var C,j=f(_),F=0,R=[];for(C in j)!h(g,C)&&h(j,C)&&Y(R,C);for(;k.length>F;)h(j,C=k[F++])&&(~p(R,C)||Y(R,C));return R}},1531:function(o,y,r){var c=r(9008),h=r(8256);o.exports=Object.keys||function(f){return c(f,h)}},8912:function(o,y){var r={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,h=c&&!r.call({1:2},1);y.f=h?function(f){var p=c(this,f);return!!p&&p.enumerable}:r},4024:function(o,y,r){var c=r(5288),h=r(3951),f=r(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,g=!1,Y={};try{(p=c(Object.prototype,"__proto__","set"))(Y,[]),g=Y instanceof Array}catch{}return function(_,k){return h(_),f(k),g?p(_,k):_.__proto__=k,_}})():void 0)},7032:function(o,y,r){var c=r(16),h=r(4427);o.exports=c?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(o,y,r){var c=r(8448),h=r(4328),f=r(1632),p=TypeError;o.exports=function(g,Y){var _,k;if(Y==="string"&&h(_=g.toString)&&!f(k=c(_,g))||h(_=g.valueOf)&&!f(k=c(_,g))||Y!=="string"&&h(_=g.toString)&&!f(k=c(_,g)))return k;throw new p("Can't convert object to primitive value")}},9252:function(o,y,r){var c=r(5232),h=r(1664),f=r(5048),p=r(9392),g=r(3951),Y=h([].concat);o.exports=c("Reflect","ownKeys")||function(_){var k=f.f(g(_)),C=p.f;return C?Y(k,C(_)):k}},584:function(o,y,r){var c=r(8352).f;o.exports=function(h,f,p){p in h||c(h,p,{configurable:!0,get:function(){return f[p]},set:function(g){f[p]=g}})}},9092:function(o,y,r){var c=r(8448),h=r(3951),f=r(4328),p=r(1888),g=r(7680),Y=TypeError;o.exports=function(_,k){var C=_.exec;if(f(C)){var j=c(C,_,k);return j!==null&&h(j),j}if(p(_)==="RegExp")return c(g,_,k);throw new Y("RegExp#exec called on incompatible receiver")}},7680:function(o,y,r){var c,h,f=r(8448),p=r(1664),g=r(5016),Y=r(8872),_=r(3548),k=r(4696),C=r(9368),j=r(9104).get,F=r(8e3),R=r(9124),O=k("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,w=p("".charAt),M=p("".indexOf),V=p("".replace),E=p("".slice),A=(h=/b*/g,f(v,c=/a/,"a"),f(v,h,"a"),c.lastIndex!==0||h.lastIndex!==0),z=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(A||B||z||F||R)&&(T=function(ee){var ie,re,fe,te,de,ve,me,oe=this,Z=j(oe),Ne=g(ee),Ie=Z.raw;if(Ie)return Ie.lastIndex=oe.lastIndex,ie=f(T,Ie,Ne),oe.lastIndex=Ie.lastIndex,ie;var Ce=Z.groups,Oe=z&&oe.sticky,$=f(Y,oe),J=oe.source,X=0,P=Ne;if(Oe&&($=V($,"y",""),M($,"g")===-1&&($+="g"),P=E(Ne,oe.lastIndex),oe.lastIndex>0&&(!oe.multiline||oe.multiline&&w(Ne,oe.lastIndex-1)!==`
|
|
85
85
|
`)&&(J="(?: "+J+")",P=" "+P,X++),re=new RegExp("^(?:"+J+")",$)),B&&(re=new RegExp("^"+J+"$(?!\\s)",$)),A&&(fe=oe.lastIndex),te=f(v,Oe?re:oe,P),Oe?te?(te.input=E(te.input,X),te[0]=E(te[0],X),te.index=oe.lastIndex,oe.lastIndex+=te[0].length):oe.lastIndex=0:A&&te&&(oe.lastIndex=oe.global?te.index+te[0].length:fe),B&&te&&te.length>1&&f(O,te[0],re,(function(){for(de=1;de<arguments.length-2;de++)arguments[de]===void 0&&(te[de]=void 0)})),te&&Ce)for(te.groups=ve=C(null),de=0;de<Ce.length;de++)ve[(me=Ce[de])[0]]=te[me[1]];return te}),o.exports=T},8872:function(o,y,r){var c=r(3951);o.exports=function(){var h=c(this),f="";return h.hasIndices&&(f+="d"),h.global&&(f+="g"),h.ignoreCase&&(f+="i"),h.multiline&&(f+="m"),h.dotAll&&(f+="s"),h.unicode&&(f+="u"),h.unicodeSets&&(f+="v"),h.sticky&&(f+="y"),f}},3548:function(o,y,r){var c=r(9957),h=r(6420).RegExp,f=c((function(){var Y=h("a","y");return Y.lastIndex=2,Y.exec("abcd")!==null})),p=f||c((function(){return!h("a","y").sticky})),g=f||c((function(){var Y=h("^r","gy");return Y.lastIndex=2,Y.exec("str")!==null}));o.exports={BROKEN_CARET:g,MISSED_STICKY:p,UNSUPPORTED_Y:f}},8e3:function(o,y,r){var c=r(9957),h=r(6420).RegExp;o.exports=c((function(){var f=h(".","s");return!(f.dotAll&&f.test(`
|
|
86
86
|
`)&&f.flags==="s")}))},9124:function(o,y,r){var c=r(9957),h=r(6420).RegExp;o.exports=c((function(){var f=h("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"}))},5436:function(o,y,r){var c=r(9760),h=TypeError;o.exports=function(f){if(c(f))throw new h("Can't call method on "+f);return f}},6504:function(o,y,r){var c=r(4696),h=r(7776),f=c("keys");o.exports=function(p){return f[p]||(f[p]=h(p))}},3976:function(o,y,r){var c=r(7048),h=r(6420),f=r(4636),p="__core-js_shared__",g=o.exports=h[p]||f(p,{});(g.versions||(g.versions=[])).push({version:"3.36.0",mode:c?"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,y,r){var c=r(3976);o.exports=function(h,f){return c[h]||(c[h]=f||{})}},9764:function(o,y,r){var c=r(1664),h=r(6180),f=r(5016),p=r(5436),g=c("".charAt),Y=c("".charCodeAt),_=c("".slice),k=function(C){return function(j,F){var R,O,v=f(p(j)),T=h(F),w=v.length;return T<0||T>=w?C?"":void 0:(R=Y(v,T))<55296||R>56319||T+1===w||(O=Y(v,T+1))<56320||O>57343?C?g(v,T):R:C?_(v,T,T+2):O-56320+(R-55296<<10)+65536}};o.exports={codeAt:k(!1),charAt:k(!0)}},772:function(o,y,r){var c=r(8504),h=r(9957),f=r(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!h((function(){var p=Symbol("symbol detection");return!f(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&c&&c<41}))},2495:function(o,y,r){var c=r(6180),h=Math.max,f=Math.min;o.exports=function(p,g){var Y=c(p);return Y<0?h(Y+g,0):f(Y,g)}},4096:function(o,y,r){var c=r(5712),h=r(5436);o.exports=function(f){return c(h(f))}},6180:function(o,y,r){var c=r(1748);o.exports=function(h){var f=+h;return f!=f||f===0?0:c(f)}},7584:function(o,y,r){var c=r(6180),h=Math.min;o.exports=function(f){var p=c(f);return p>0?h(p,9007199254740991):0}},4356:function(o,y,r){var c=r(5436),h=Object;o.exports=function(f){return h(c(f))}},7024:function(o,y,r){var c=r(8448),h=r(1632),f=r(7728),p=r(4504),g=r(2104),Y=r(9972),_=TypeError,k=Y("toPrimitive");o.exports=function(C,j){if(!h(C)||f(C))return C;var F,R=p(C,k);if(R){if(j===void 0&&(j="default"),F=c(R,C,j),!h(F)||f(F))return F;throw new _("Can't convert object to primitive value")}return j===void 0&&(j="number"),g(C,j)}},88:function(o,y,r){var c=r(7024),h=r(7728);o.exports=function(f){var p=c(f,"string");return h(p)?p:p+""}},16:function(o,y,r){var c={};c[r(9972)("toStringTag")]="z",o.exports=String(c)==="[object z]"},5016:function(o,y,r){var c=r(4427),h=String;o.exports=function(f){if(c(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return h(f)}},36:function(o){var y=String;o.exports=function(r){try{return y(r)}catch{return"Object"}}},7776:function(o,y,r){var c=r(1664),h=0,f=Math.random(),p=c(1 .toString);o.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+p(++h+f,36)}},6536:function(o,y,r){var c=r(772);o.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,y,r){var c=r(3476),h=r(9957);o.exports=c&&h((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,y,r){var c=r(6420),h=r(4328),f=c.WeakMap;o.exports=h(f)&&/native code/.test(String(f))},9972:function(o,y,r){var c=r(6420),h=r(4696),f=r(5152),p=r(7776),g=r(772),Y=r(6536),_=c.Symbol,k=h("wks"),C=Y?_.for||_:_&&_.withoutSetter||p;o.exports=function(j){return f(k,j)||(k[j]=g&&f(_,j)?_[j]:C("Symbol."+j)),k[j]}},6488:function(o,y,r){var c=r(5232),h=r(5152),f=r(3440),p=r(7e3),g=r(4024),Y=r(9968),_=r(584),k=r(7512),C=r(8948),j=r(3480),F=r(3696),R=r(3476),O=r(7048);o.exports=function(v,T,w,M){var V="stackTraceLimit",E=M?2:1,A=v.split("."),z=A[A.length-1],B=c.apply(null,A);if(B){var ee=B.prototype;if(!O&&h(ee,"cause")&&delete ee.cause,!w)return B;var ie=c("Error"),re=T((function(fe,te){var de=C(M?te:fe,void 0),ve=M?new B(fe):new B;return de!==void 0&&f(ve,"message",de),F(ve,re,ve.stack,2),this&&p(ee,this)&&k(ve,this,re),arguments.length>E&&j(ve,arguments[E]),ve}));if(re.prototype=ee,z!=="Error"?g?g(re,ie):Y(re,ie,{name:!0}):R&&V in B&&(_(re,B,V),_(re,B,"prepareStackTrace")),Y(re,B),!O)try{ee.name!==z&&f(ee,"name",z),ee.constructor=re}catch{}return re}}},7476:function(o,y,r){var c=r(9160),h=r(9957),f=r(1432),p=r(1632),g=r(4356),Y=r(3556),_=r(4316),k=r(92),C=r(2568),j=r(953),F=r(9972),R=r(8504),O=F("isConcatSpreadable"),v=R>=51||!h((function(){var w=[];return w[O]=!1,w.concat()[0]!==w})),T=function(w){if(!p(w))return!1;var M=w[O];return M!==void 0?!!M:f(w)};c({target:"Array",proto:!0,arity:1,forced:!v||!j("concat")},{concat:function(w){var M,V,E,A,z,B=g(this),ee=C(B,0),ie=0;for(M=-1,E=arguments.length;M<E;M++)if(T(z=M===-1?B:arguments[M]))for(A=Y(z),_(ie+A),V=0;V<A;V++,ie++)V in z&&k(ee,ie,z[V]);else _(ie+1),k(ee,ie++,z);return ee.length=ie,ee}})},6932:function(o,y,r){var c=r(9160),h=r(3364).filter;c({target:"Array",proto:!0,forced:!r(953)("filter")},{filter:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},700:function(o,y,r){var c=r(9160),h=r(1664),f=r(5712),p=r(4096),g=r(1496),Y=h([].join);c({target:"Array",proto:!0,forced:f!==Object||!g("join",",")},{join:function(_){return Y(p(this),_===void 0?",":_)}})},4456:function(o,y,r){var c=r(9160),h=r(3364).map;c({target:"Array",proto:!0,forced:!r(953)("map")},{map:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,y,r){var c=r(9160),h=r(4356),f=r(3556),p=r(6728),g=r(4316);c({target:"Array",proto:!0,arity:1,forced:r(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(Y){return Y instanceof TypeError}})()},{push:function(Y){var _=h(this),k=f(_),C=arguments.length;g(k+C);for(var j=0;j<C;j++)_[k]=arguments[j],k++;return p(_,k),k}})},8752:function(o,y,r){var c=r(9160),h=r(6420),f=r(908),p=r(6488),g="WebAssembly",Y=h[g],_=new Error("e",{cause:7}).cause!==7,k=function(j,F){var R={};R[j]=p(j,F,_),c({global:!0,constructor:!0,arity:1,forced:_},R)},C=function(j,F){if(Y&&Y[j]){var R={};R[j]=p(g+"."+j,F,_),c({target:g,stat:!0,constructor:!0,arity:1,forced:_},R)}};k("Error",(function(j){return function(F){return f(j,this,arguments)}})),k("EvalError",(function(j){return function(F){return f(j,this,arguments)}})),k("RangeError",(function(j){return function(F){return f(j,this,arguments)}})),k("ReferenceError",(function(j){return function(F){return f(j,this,arguments)}})),k("SyntaxError",(function(j){return function(F){return f(j,this,arguments)}})),k("TypeError",(function(j){return function(F){return f(j,this,arguments)}})),k("URIError",(function(j){return function(F){return f(j,this,arguments)}})),C("CompileError",(function(j){return function(F){return f(j,this,arguments)}})),C("LinkError",(function(j){return function(F){return f(j,this,arguments)}})),C("RuntimeError",(function(j){return function(F){return f(j,this,arguments)}}))},508:function(o,y,r){var c=r(3476),h=r(6208).EXISTS,f=r(1664),p=r(2544),g=Function.prototype,Y=f(g.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k=f(_.exec);c&&!h&&p(g,"name",{configurable:!0,get:function(){try{return k(_,Y(this))[1]}catch{return""}}})},232:function(o,y,r){var c=r(9160),h=r(9292);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==h},{assign:h})},5443:function(o,y,r){var c=r(16),h=r(6076),f=r(7032);c||h(Object.prototype,"toString",f,{unsafe:!0})},880:function(o,y,r){var c=r(9160),h=r(7680);c({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})},9836:function(o,y,r){var c=r(8448),h=r(7176),f=r(3951),p=r(9760),g=r(7584),Y=r(5016),_=r(5436),k=r(4504),C=r(4764),j=r(9092);h("match",(function(F,R,O){return[function(v){var T=_(this),w=p(v)?void 0:k(v,F);return w?c(w,v,T):new RegExp(v)[F](Y(T))},function(v){var T=f(this),w=Y(v),M=O(R,T,w);if(M.done)return M.value;if(!T.global)return j(T,w);var V=T.unicode;T.lastIndex=0;for(var E,A=[],z=0;(E=j(T,w))!==null;){var B=Y(E[0]);A[z]=B,B===""&&(T.lastIndex=C(w,g(T.lastIndex),V)),z++}return z===0?null:A}]}))},3536:function(o,y,r){var c=r(9160),h=r(6420),f=r(6100),p=r(3951),g=r(4328),Y=r(7796),_=r(2544),k=r(92),C=r(9957),j=r(5152),F=r(9972),R=r(336).IteratorPrototype,O=r(3476),v=r(7048),T="constructor",w="Iterator",M=F("toStringTag"),V=TypeError,E=h[w],A=v||!g(E)||E.prototype!==R||!C((function(){E({})})),z=function(){if(f(this,R),Y(this)===R)throw new V("Abstract class Iterator not directly constructable")},B=function(ee,ie){O?_(R,ee,{configurable:!0,get:function(){return ie},set:function(re){if(p(this),this===R)throw new V("You can't redefine this property");j(this,ee)?this[ee]=re:k(this,ee,re)}}):R[ee]=ie};j(R,M)||B(M,w),!A&&j(R,T)&&R[T]!==Object||B(T,z),z.prototype=R,c({global:!0,constructor:!0,forced:A},{Iterator:z})},2144:function(o,y,r){var c=r(9160),h=r(8448),f=r(8952),p=r(3951),g=r(6752),Y=r(9724),_=r(8696),k=r(7048),C=Y((function(){for(var j,F,R=this.iterator,O=this.predicate,v=this.next;;){if(j=p(h(v,R)),this.done=!!j.done)return;if(F=j.value,_(R,O,[F,this.counter++],!0))return F}}));c({target:"Iterator",proto:!0,real:!0,forced:k},{filter:function(j){return p(this),f(j),new C(g(this),{predicate:j})}})},9080:function(o,y,r){var c=r(9160),h=r(5792);c({target:"Iterator",proto:!0,real:!0,forced:r(7048)},{map:h})}},S={};function x(o){var y=S[o];if(y!==void 0)return y.exports;var r=S[o]={exports:{}};return i[o].call(r.exports,r,r.exports,x),r.exports}x.d=function(o,y){for(var r in y)x.o(y,r)&&!x.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:y[r]})},x.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),x.o=function(o,y){return Object.prototype.hasOwnProperty.call(o,y)},x.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var I={};return(function(){x.r(I),x.d(I,{default:function(){return _}}),x(8752),x(6932),x(700),x(4456),x(4728),x(508),x(232),x(5443),x(880),x(9836),x(3536),x(2144),x(9080);var o=x(680);x(7476);function y(k,C){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},y(k,C)}var r=(function(k){var C,j;function F(){for(var O,v=arguments.length,T=new Array(v),w=0;w<v;w++)T[w]=arguments[w];return(O=k.call.apply(k,[this].concat(T))||this).state={bump:!1,debounced:!1},O}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,y(C,j);var R=F.prototype;return R.componentWillMount=function(){var O,v,T,w=this;this.debounceStatusUpdate=(O=function(){if(!w.state.debounced){var M=!w.props.isInFocus||w.props.validChoiceMade;w.setState((function(V){return{bump:!V.bump,debounced:!0,silenced:M}}))}},v=1400,function(){var M=this,V=arguments;clearTimeout(T),T=setTimeout((function(){T=null,O.apply(M,V)}),v)})},R.componentWillReceiveProps=function(O){O.queryLength,this.setState({debounced:!1})},R.render=function(){var O=this.props,v=O.id,T=O.length,w=O.queryLength,M=O.minQueryLength,V=O.selectedOption,E=O.selectedOptionIndex,A=O.tQueryTooShort,z=O.tNoResults,B=O.tSelectedOption,ee=O.tResults,ie=O.className,re=this.state,fe=re.bump,te=re.debounced,de=re.silenced,ve=w<M,me=T===0,oe=V?B(V,T,E):"",Z=null;return Z=ve?A(M):me?z():ee(T,oe),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"},!de&&te&&fe?Z:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},de||!te||fe?"":Z))},F})(o.Component);r.defaultProps={tQueryTooShort:function(k){return"Type in "+k+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(k,C,j){return k+" "+(j+1)+" of "+C+" is highlighted"},tResults:function(k,C){return k+" "+(k===1?"result":"results")+" "+(k===1?"is":"are")+" available. "+C}};var c=function(k){var C=k.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:C,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 h(){return h=Object.assign?Object.assign.bind():function(k){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&(k[F]=j[F])}return k},h.apply(this,arguments)}function f(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function p(k,C){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},p(k,C)}var g={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(k){var C,j;function F(O){var v;return(v=k.call(this,O)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:O.defaultValue?[O.defaultValue]:[],query:O.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(f(v)),v.handleKeyDown=v.handleKeyDown.bind(f(v)),v.handleUpArrow=v.handleUpArrow.bind(f(v)),v.handleDownArrow=v.handleDownArrow.bind(f(v)),v.handleEnter=v.handleEnter.bind(f(v)),v.handlePrintableKey=v.handlePrintableKey.bind(f(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(f(v)),v.handleOptionBlur=v.handleOptionBlur.bind(f(v)),v.handleOptionClick=v.handleOptionClick.bind(f(v)),v.handleOptionFocus=v.handleOptionFocus.bind(f(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(f(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(f(v)),v.handleInputBlur=v.handleInputBlur.bind(f(v)),v.handleInputChange=v.handleInputChange.bind(f(v)),v.handleInputClick=v.handleInputClick.bind(f(v)),v.handleInputFocus=v.handleInputFocus.bind(f(v)),v.pollInputElement=v.pollInputElement.bind(f(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(f(v)),v}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,p(C,j);var R=F.prototype;return R.isQueryAnOption=function(O,v){var T=this;return v.map((function(w){return T.templateInputValue(w).toLowerCase()})).indexOf(O.toLowerCase())!==-1},R.componentDidMount=function(){this.pollInputElement()},R.componentWillUnmount=function(){clearTimeout(this.$pollInput)},R.pollInputElement=function(){var O=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){O.pollInputElement()}),100)},R.getDirectInputChanges=function(){var O=this.elementReferences[-1];O&&O.value!==this.state.query&&this.handleInputChange({target:{value:O.value}})},R.componentDidUpdate=function(O,v){var T=this.state.focused,w=T===null,M=v.focused!==T;M&&!w&&this.elementReferences[T].focus();var V=T===-1,E=M&&v.focused===null;if(V&&E){var A=this.elementReferences[T];A.setSelectionRange(0,A.value.length)}},R.hasAutoselect=function(){return!Y()&&this.props.autoselect},R.templateInputValue=function(O){var v=this.props.templates&&this.props.templates.inputValue;return v?v(O):O},R.templateSuggestion=function(O){var v=this.props.templates&&this.props.templates.suggestion;return v?v(O):O},R.handleComponentBlur=function(O){var v,T=this.state,w=T.options,M=T.query,V=T.selected;this.props.confirmOnBlur?(v=O.query||M,this.props.onConfirm(w[V])):v=M,this.setState({focused:null,menuOpen:O.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,w)})},R.handleListMouseLeave=function(O){this.setState({hovered:null})},R.handleOptionBlur=function(O,v){var T=this.state,w=T.focused,M=T.menuOpen,V=T.options,E=T.selected,A=O.relatedTarget===null,z=O.relatedTarget===this.elementReferences[-1],B=w!==v&&w!==-1;if(!B&&A||!(B||z)){var ee=M&&Y();this.handleComponentBlur({menuOpen:ee,query:this.templateInputValue(V[E])})}},R.handleInputBlur=function(O){var v=this.state,T=v.focused,w=v.menuOpen,M=v.options,V=v.query,E=v.selected;if(T===-1){var A=w&&Y(),z=Y()?V:this.templateInputValue(M[E]);this.handleComponentBlur({menuOpen:A,query:z})}},R.handleInputChange=function(O){var v=this,T=this.props,w=T.minLength,M=T.source,V=T.showAllValues,E=this.hasAutoselect(),A=O.target.value,z=A.length===0,B=this.state.query!==A,ee=A.length>=w;this.setState({query:A,ariaHint:z}),V||!z&&B&&ee?M(A,(function(ie){var re=ie.length>0;v.setState({menuOpen:re,options:ie,selected:E&&re?0:-1,validChoiceMade:!1})})):!z&&ee||this.setState({menuOpen:!1,options:[]})},R.handleInputClick=function(O){this.handleInputChange(O)},R.handleInputFocus=function(O){var v=this.state,T=v.query,w=v.validChoiceMade,M=v.options,V=this.props.minLength,E=!w&&T.length>=V&&M.length>0;E?this.setState((function(A){var z=A.menuOpen;return{focused:-1,menuOpen:E||z,selected:-1}})):this.setState({focused:-1})},R.handleOptionFocus=function(O){this.setState({focused:O,hovered:null,selected:O})},R.handleOptionMouseEnter=function(O,v){Y()||this.setState({hovered:v})},R.handleOptionClick=function(O,v){var T=this.state.options[v],w=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:w,selected:-1,validChoiceMade:!0}),this.forceUpdate()},R.handleOptionMouseDown=function(O){O.preventDefault()},R.handleUpArrow=function(O){O.preventDefault();var v=this.state,T=v.menuOpen,w=v.selected;w!==-1&&T&&this.handleOptionFocus(w-1)},R.handleDownArrow=function(O){var v=this;if(O.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)O.preventDefault(),this.props.source("",(function(E){v.setState({menuOpen:!0,options:E,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,w=T.menuOpen,M=T.options,V=T.selected;V!==M.length-1&&w&&this.handleOptionFocus(V+1)}},R.handleSpace=function(O){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(O.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(O.preventDefault(),this.handleOptionClick(O,this.state.focused))},R.handleEnter=function(O){this.state.menuOpen&&(O.preventDefault(),this.state.selected>=0&&this.handleOptionClick(O,this.state.selected))},R.handlePrintableKey=function(O){var v=this.elementReferences[-1];O.target===v||v.focus()},R.handleKeyDown=function(O){switch(g[O.keyCode]){case"up":this.handleUpArrow(O);break;case"down":this.handleDownArrow(O);break;case"space":this.handleSpace(O);break;case"enter":this.handleEnter(O);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=O.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(O)}var v},R.render=function(){var O,v=this,T=this.props,w=T.cssNamespace,M=T.displayMenu,V=T.id,E=T.minLength,A=T.name,z=T.placeholder,B=T.required,ee=T.showAllValues,ie=T.tNoResults,re=T.tStatusQueryTooShort,fe=T.tStatusNoResults,te=T.tStatusSelectedOption,de=T.tStatusResults,ve=T.tAssistiveHint,me=T.dropdownArrow,oe=T.menuAttributes,Z=T.inputClasses,Ne=T.hintClasses,Ie=T.menuClasses,Ce=this.state,Oe=Ce.focused,$=Ce.hovered,J=Ce.menuOpen,X=Ce.options,P=Ce.query,H=Ce.selected,N=Ce.ariaHint,W=Ce.validChoiceMade,q=this.hasAutoselect(),ce=Oe===-1,se=X.length===0,Pe=P.length!==0,ge=P.length>=E,_e=this.props.showNoOptionsFound&&ce&&se&&Pe&&ge,$e=w+"__wrapper",Re=w+"__status",dt=w+"__dropdown-arrow-down",Ue=Oe!==-1&&Oe!==null,st=w+"__option",Ct=w+"__hint",ot=this.templateInputValue(X[H]),je=ot&&ot.toLowerCase().indexOf(P.toLowerCase())===0&&q?P+ot.substr(P.length):"",jt=V+"__assistiveHint",At={"aria-describedby":N?jt:null,"aria-expanded":J?"true":"false","aria-activedescendant":Ue?V+"__option--"+Oe:null,"aria-controls":V+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};ee&&typeof(O=me({className:dt}))=="string"&&(O=(0,o.createElement)("div",{className:w+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:O}}));var lt=w+"__input",pt=[lt,this.props.showAllValues?lt+"--show-all-values":lt+"--default"];Oe!==null&&pt.push(lt+"--focused"),Z&&pt.push(Z);var ht=w+"__menu",rt=[ht,ht+"--"+M,ht+"--"+(J||_e?"visible":"hidden")];Ie&&rt.push(Ie),(oe!=null&&oe.class||oe!=null&&oe.className)&&rt.push(oe?.class||oe?.className);var gt=Object.assign({"aria-labelledby":V},oe,{id:V+"__listbox",role:"listbox",className:rt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete gt.class,(0,o.createElement)("div",{className:$e,onKeyDown:this.handleKeyDown},(0,o.createElement)(r,{id:V,length:X.length,queryLength:P.length,minQueryLength:E,selectedOption:this.templateInputValue(X[H]),selectedOptionIndex:H,validChoiceMade:W,isInFocus:this.state.focused!==null,tQueryTooShort:re,tNoResults:fe,tSelectedOption:te,tResults:de,className:Re}),je&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Ct,Ne===null?Z:Ne].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:je})),(0,o.createElement)("input",h({},At,{autoComplete:"off",className:pt.join(" "),id:V,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:A,placeholder:z,ref:function(vt){v.elementReferences[-1]=vt},type:"text",role:"combobox",required:B,value:P})),O,(0,o.createElement)("ul",gt,X.map((function(vt,We){var ft=(Oe===-1?H===We:Oe===We)&&$===null?" "+st+"--focused":"",ut=We%2?" "+st+"--odd":"",at=Y()?"<span id="+V+"__option-suffix--"+We+' 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"> '+(We+1)+" of "+X.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Oe===We?"true":"false",className:""+st+ft+ut,dangerouslySetInnerHTML:{__html:v.templateSuggestion(vt)+at},id:V+"__option--"+We,key:We,onBlur:function(Qe){return v.handleOptionBlur(Qe,We)},onClick:function(Qe){return v.handleOptionClick(Qe,We)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Qe){return v.handleOptionMouseEnter(Qe,We)},ref:function(Qe){v.elementReferences[We]=Qe},role:"option",tabIndex:"-1","aria-posinset":We+1,"aria-setsize":X.length})})),_e&&(0,o.createElement)("li",{className:st+" "+st+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,o.createElement)("span",{id:jt,style:{display:"none"}},ve()))},F})(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:c,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),I})()}))})(gr)),gr.exports}var on,Ns;function Vf(){return Ns||(Ns=1,on=Ff()),on}var zf=Vf();const Lf=pn(zf),Wf=({value:l,defaultValue:s="",onConfirm:u,source:i,disabled:S,onClear:x,tClearInput:I=()=>"Clear input",...o})=>{const y=G.useRef(null),r=p=>{setTimeout(()=>{y.current&&(y.current.elementReferences[-1].value=p)},0)};G.useEffect(()=>{l!==void 0&&r(l)},[l]),G.useEffect(()=>{S?y.current&&(y.current.elementReferences[-1].disabled=!0):y.current&&(y.current.elementReferences[-1].disabled=!1)},[S]);const c=()=>{x&&x()},h=(p,g)=>{y.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&i(p,g)},f=p=>{p?u(p):r(l)};return m.jsxs("div",{style:{position:"relative",width:"100%"},children:[m.jsx(Lf,{ref:y,...o,defaultValue:s,onConfirm:f,source:h}),!!(l&&l.length>0&&!S)&&m.jsx("button",{onClick:c,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":I(),children:m.jsx(ue.Icon,{icon:"it-close",size:"sm",title:I()})})]})},qf="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==",Hf="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=",$f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Bf=({position:l,areasLayer:s,bounds:u,onMarkedMoved:i})=>{const S=G.useRef(null);let x=null;const[I,o]=G.useState([]),y=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),r=[41.9,12.5],c=()=>{const h=Rt.map(S.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(r,10);y.addTo(h),s&&s.map(p=>{p.addTo(h)});const f=l?[`${l.lat}`,`${l.lon}`]:u?u.getCenter():r;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:qf,iconUrl:Hf,shadowUrl:$f}),x=Rt.marker(f,{draggable:!0}).addTo(h),x.on("moveend",function(p){const g=p.target.getLatLng();i(g,x)}),!l&&u)h.fitBounds(u);else{const p=l?[l.lat,l.lon]:r;x&&(x.setLatLng(p).update(),h.setView(p,15))}};return G.useEffect(()=>{S.current&&c()},[S]),m.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:m.jsx("div",{ref:S,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Uf=({component:l,value:s,current:u,onChange:i,i18next:S})=>{const[x,I]=G.useState(null),[o,y]=G.useState([]),[r,c]=G.useState(),[h,f]=G.useState(),[p,g]=G.useState(!1),[Y,_]=G.useState(),[k,C]=G.useState(!1),[j,F]=G.useState(),[R,O]=G.useState(),[v,T]=G.useState(!1),[w,M]=G.useState(""),[V,E]=G.useState(""),[A,z]=G.useState(!1),[B,ee]=G.useState(!1),re=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,te=G.useRef(),de=S.language;let ve=Rt.latLngBounds();const me=re||(fe&&fe.length>0?fe:void 0),oe=(X,P)=>{te.current=X;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(X)}&countrycodes=it&viewbox=${r}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${de}`;let N=[],W=[];C(!0),fetch(H).then(q=>q.json()).then(q=>{if(q.length&&te.current===X){C(!0);const ce=q.map((se,Pe)=>{const{lat:ge,lon:_e}=se,$e=`${Ee()}/api/geographic-areas/contains?lat=${ge}&lon=${_e}&geographic_areas_ids=${Y.join(",")}`;return fetch($e).then(Re=>Re.json()).then(Re=>Re.result?(se.label=Jr(se),se):null)});return Promise.all(ce)}else te.current===X&&(P([]),C(!1))}).then(q=>{q=q?q.filter(ce=>ce!==null):[],q.length>0?(q.forEach((ce,se)=>{q[se].label=Jr(ce)}),q=di.uniqWith(q,(ce,se)=>ce.label===se.label),q.forEach((ce,se)=>{W.push(ce.label),N.push(ce)}),te.current===X&&(P(W),y(N),C(!1))):te.current===X&&(P([]),C(!1))}).catch(q=>{console.error("Error fetching locations:",q),C(!1)})},Z=(X,P)=>{oe(X,P)},Ne=(X,P)=>{const{lat:H,lng:N}=X,W=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${N}&accept-language=${de}`;fetch(W).then(q=>q.json()).then(q=>{if(q&&q.display_name)if(q.label=Jr(q),q.lat=H,q.lon=N,P)P.bindPopup(`${q.label}`).openPopup(),O(q);else{O(q);return}}).catch(q=>console.error("Error with reverse geocoding:",q))};function Ie(){navigator.geolocation.getCurrentPosition(X=>{let P=X.coords.latitude,H=X.coords.longitude;if((Y||[]).length>0){const W=`${Ee()}/api/geographic-areas/contains?lat=${P}&lon=${H}&geographic_areas_ids=${Y.join(",")}`;fetch(W).then(q=>q.json()).then(q=>{q.result&&(I({lat:P,lon:H}),Ne({lat:P,lng:H})),ee(!B)})}else I({lat:P,lon:H}),Ne({lat:P,lng:H}),ee(!B)},X=>{X?.code===1?(z(!A),E(S.t("error_message_code_1"))):X?.code===2?(z(!A),E(S.t("error_message_code_2"))):X?.code===3?(z(!A),E(S.t("error_message_code_3"))):(z(!A),E(S.t("error_message_generic")))})}G.useEffect(()=>{s&&I(s),u.valuePosition&&I(u.valuePosition)},[s,u]);const Ce=()=>{s&&I(s),u.valuePosition&&I(u.valuePosition)};G.useEffect(()=>{window?.Formio?.formioReady.then(()=>{setTimeout(()=>{Ce(),Oe()},1)})},[]);const Oe=()=>{let P=`${Ee()}/api/geographic-areas`,H=[],N=[];fetch(P).then(W=>W.json()).then(W=>{if(Array.isArray(W)&&W.length>0){W.filter(se=>me?Array.isArray(me)?me.includes(se.id):se.id===me:!0).forEach(se=>{H.push(se.id);const Pe=JSON.parse(se.geofence),ge=Rt.geoJSON(Pe,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(_e){return _e.geometry.type==="Polygon"||_e.geometry.type==="MultiPolygon"}});ve.extend(ge.getBounds()),N.push(ge)}),f(N),_(H),F(ve);const q=ve.getNorthEast(),ce=ve.getSouthWest();c([q.lng,q.lat,ce.lng,ce.lat])}else console.log("No geographic_areas_ids found.")}).catch(W=>{console.error("Error with reverse geocoding:",W)})},$=()=>{M(x?.label?x.label:"")};G.useEffect(()=>{$(),i(x)},[x]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const J=()=>{if(R){const X=`${Ee()}/api/geographic-areas/contains?lat=${R.lat}&lon=${R.lon}&geographic_areas_ids=${Y.join(",")}`;g(!0),fetch(X).then(P=>P.json()).then(P=>{g(!1),P?P.result===!1?He.fire({title:"",html:"<p>"+S.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:S.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):P.result===!0&&(ee(!B),I(R)):(g(!1),console.log("No geographic-areas/contains ."))}).catch(P=>{console.error("Error with geographic-areas/contains:",P),He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:S.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return m.jsx("div",{children:m.jsxs("div",{id:`address-map-container-${l.key}`,className:"address-map-container",children:[m.jsx("div",{children:m.jsxs(ue.Modal,{wrapClassName:"formio-component-address_map",isOpen:B,size:"lg",scrollable:!0,toggle:()=>ee(!B),labelledBy:"esempio2",container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>ee(!B),id:"esempio2",children:S.t("Individua il luogo sulla mappa")}),m.jsxs(ue.ModalBody,{children:[m.jsx("p",{children:m.jsx("small",{children:S.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),m.jsx(Bf,{position:x,areasLayer:h,bounds:j,onMarkedMoved:(X,P)=>{Ne(X,P)}})]}),m.jsxs(ue.ModalFooter,{children:[m.jsx(ue.Button,{color:"secondary",onClick:()=>ee(!B),children:S.t("Chiudi")}),m.jsx(ue.Button,{color:"primary",onClick:()=>{J()},disabled:!R||p,children:S.t("Salva indirizzo")})]})]})}),m.jsx("div",{children:m.jsxs(ue.Modal,{isOpen:A,toggle:()=>z(!A),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[m.jsx(ue.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:S.t("warning")}),m.jsx(ue.ModalBody,{children:m.jsx("p",{children:V})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>z(!A),children:S.t("close")})})]})}),m.jsxs("div",{className:"position-relative",children:[m.jsx(Wf,{id:`${l.id}-${l.key}`,inputClasses:"form-control",source:di.debounce(Z,520),onConfirm:X=>{if(C(!1),te.current="",X){X===""&&I(null);let P=o.find(H=>H.label===X);I(P)}},onClear:()=>{C(!1),te.current="",I(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!k,defaultValue:x?.label,value:w,tNoResults:()=>S.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>S.t("Clear input")}),k&&m.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:m.jsx(ue.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&m.jsxs(ue.Button,{type:"button",value:S.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ie():(ee(!0),O(!1))},icon:!0,className:"px-0 primary-color",children:[m.jsx(ue.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),m.jsx("span",{children:S.t("Individua con precisione sulla mappa")})]})]})})};class kr extends tt.ReactComponent{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:kr.schema()}}static schema(){return tt.ReactComponent.schema({type:"address_map"})}static editForm=Af;attachReact(s,u){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Uf,{ref:u,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this},this.dataValue))}setValue(s){this.valuePosition=s,this.updateValue(s)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}}const Gf=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Jf(...l){return tt.Components.baseEditForm([{key:"display",components:Gf}],...l)}const Rs=mn.Formio.Components.components.input,Kf=({component:l,current:s,onChange:u,i18next:i})=>{const S="list-services",x="selected-category",[I,o]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(null),[f,p]=G.useState(null),[g,Y]=G.useState(""),[_,k]=G.useState(!1),[C,j]=G.useState(!1),F=G.useRef(!1),R=G.useRef(),O=G.useMemo(()=>{if(!c)return null;const E=y.find(z=>z.name===c);return E||I.find(z=>z.name===c)||null},[c,y,I]),v=G.useMemo(()=>O?.services||[],[O]),T=async()=>{j(!0);const E=sessionStorage.getItem(S),A=sessionStorage.getItem(x);if(E)try{const re=JSON.parse(E);if(Array.isArray(re)&&re.length>0){o(re),r(re);const fe=re.find(te=>te.name===A)||re[0];return h(fe?.name||null),j(!1),re}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const z=await window.FormioHelper.getBookingConfig(),B={};z.forEach(re=>{(re.categories??[]).forEach(fe=>{B[fe]||(B[fe]={name:fe,services:[]}),B[fe].services.push(re)})});const ee=Object.fromEntries(Object.entries(B).sort(([re],[fe])=>re.localeCompare(fe,"it",{sensitivity:"base"}))),ie=Object.values(ee).filter(re=>(re.name??"").trim()!=="");return o(ie),r(ie),h(ie[0]?.name||null),sessionStorage.setItem(S,JSON.stringify(ie)),sessionStorage.setItem(x,ie[0]?.name||""),j(!1),ie};G.useEffect(()=>{c&&sessionStorage.setItem(x,c)},[c]),G.useEffect(()=>{F.current||(F.current=!0,T())},[]);const w=E=>{const A=(me="")=>me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),z=(me="")=>me.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),B=(me="")=>me.replace(/<[^>]*>/g," "),ee=(me,oe)=>new RegExp(`\\b${A(oe)}`,"i").test(me),ie=(me,oe)=>{const Z=z(me.name),Ne=z((me.categories??[]).join(" ")),Ie=z(B(me.abstract??""));if(!oe.every($=>ee(Z,$)||ee(Ne,$)||ee(Ie,$)))return-1;let Oe=0;for(const $ of oe)ee(Z,$)?Oe+=3:ee(Ne,$)?Oe+=2:ee(Ie,$)&&(Oe+=1);return Oe},re=E.target.value;Y(re);const fe=z(re);if(!fe){r(I),h(me=>me??I[0]?.name??null);return}const te=fe.split(" ").filter(Boolean),de=I.map(me=>{const oe=me.services.map(Z=>({service:Z,score:ie(Z,te)})).filter(Z=>Z.score>=0).sort((Z,Ne)=>Ne.score-Z.score).map(Z=>Z.service);return oe.length?{...me,services:oe}:null}).filter(Boolean);r(de);const ve=de.some(me=>me.name===c);h(ve?c:de[0]?.name??null)},M=E=>{p(E);const A=I.find(z=>z.services.some(B=>B.id===E.id));A&&h(A.name),u({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}),s.data.user_group=null,Hs()},V=E=>{h(E.name),p(null),Y(""),r(I),u({})};return G.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");k(E)},[]),G.useEffect(()=>{const E=setTimeout(()=>{const A=s?.dataValue??s?.getValue();if(A?.id&&(p(A),I.length>0)){const z=I.find(B=>B.services.some(ee=>ee.id===A.id));z&&h(z.name)}},500);return()=>clearTimeout(E)},[s?.dataValue,s?.data,I]),G.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const A=()=>{const z=E.submission?.data?.[s?.component?.key];if(z?.id&&(p(z),I.length>0)){const B=I.find(ee=>ee.services.some(ie=>ie.id===z.id));B&&h(B.name)}};return E.on("change",A),()=>E.off("change",A)},[I,s?.component?.key]),C?m.jsx("div",{className:"services-booking",ref:R,children:m.jsxs("div",{children:[i.t("Caricamento in corso"),"..."]})}):m.jsx("div",{className:"services-booking",ref:R,children:I&&!_?m.jsxs(ue.Container,{children:[m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("div",{className:"search-container",children:m.jsx(ue.Input,{id:"search",label:i.t("Cerca"),type:"text",value:g,onChange:w,onInput:w,infoText:i.t("Cerca per categoria, servizio o descrizione")})})})}),m.jsxs(ue.Row,{className:"mb-3",children:[O?m.jsx(ue.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:m.jsxs("div",{className:"categories-list",children:[m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Categorie")}),y.length>0&&y.map(E=>{const A=c===E.name;return m.jsxs("button",{onClick:()=>V(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${A?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[m.jsx("span",{className:"fw-500 d-block",children:E.name}),m.jsxs("small",{className:`d-block mt-1 ${A?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?i.t("servizi"):i.t("servizio")]})]},E.name)})]})}):null,m.jsx(ue.Col,{lg:O?9:12,md:O?8:12,children:m.jsxs("div",{className:"services-container",children:[v.length>0?m.jsxs("div",{className:"services-header mb-4",children:[m.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:O?.name}),m.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?m.jsx("div",{className:"services-list",children:v.map(E=>{const A=f?.id===E.id,z=As.sanitize(E?.abstract);return m.jsx("button",{onClick:()=>M(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${A?"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":A,children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsxs("div",{className:"flex-grow-1",children:[m.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),E?.abstract&&m.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:z}})]})})},E.id)})}):m.jsx("div",{className:"alert alert-info text-italic",children:i.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?m.jsx("fieldset",{className:"it-page-section",children:m.jsx("div",{className:"cmp-card mt-2",children:m.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[m.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:m.jsx("div",{className:"d-flex",children:m.jsx("h2",{className:"title-xxlarge mb-1",children:O?.name})})}),m.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:s?.dataValue?.id?m.jsx("div",{className:"services-list",children:m.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsx("div",{className:"flex-grow-1",children:m.jsx("p",{className:"mb-2 text-dark text-paragraph",children:s.dataValue.name})})})},s.dataValue.id)}):null})]})})}):null})};class Or extends Rs{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Or.schema()}}static schema(){return Rs.schema({type:"list-services"})}static editForm=Jf;attach(s,u){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Kf,{ref:u,component:this.component,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){s&&(this.shouldSetValue=!0,this.updateValue(s))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}}const fn={pagebreak:yr,dynamic_calendar:Ls,calendar:br,"calendar-advanced":wr,sdcfile:Dr,address_map:kr,"list-services":Or};function Xf(l){if(!l||typeof l.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(fn).forEach(([s,u])=>{l.addComponent(s,u)}),fn}exports.Calendar=br;exports.CalendarAdvanced=wr;exports.FormioAddressMap=kr;exports.FormioDynamicCalendar=Ls;exports.FormioListServices=Or;exports.FormioPageBreak=yr;exports.SdcFile=Dr;exports.formioCustomComponents=fn;exports.registerFormioComponents=Xf;
|
|
87
87
|
//# sourceMappingURL=index.cjs.map
|