jamespot-react-components 1.3.76 → 1.3.77
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.
|
@@ -117,12 +117,12 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
117
117
|
</params>
|
|
118
118
|
</widget>`}default:return""}}function xb(e,t){const n=e?.find(r=>r.propertyType===t);if(n){const r=n.value.replaceAll('"',""");return`${t.toLowerCase()}="${r}"`}return""}function _j(e,t){switch(e){case K.DESCRIPTION:return"Description";case ve.USER:return"IdUser";default:return Lm(t)}}function $j(e){switch(e){case K.DESCRIPTION:case K.TEXT:case K.TEXTAREA:case K.TEXTAREAHTML:case K.URL:case K.EMAIL:case K.USERLINK:case K.CONTENTLINK:case K.NUMBER:case K.ADDFILEATTACHMENT:return"text";case K.DATE:case K.DATETIME:return"date";case ve.USER:return"integer";case K.SELECT:case K.RADIO:case K.TOGGLE:case K.CHECKBOX:case K.TAGS:return"string";default:return""}}function eF(e){switch(e){default:case K.DESCRIPTION:case K.TEXTAREAHTML:return"html";case K.TAGS:return"taxonomy";case K.TEXT:case K.RADIO:case K.URL:case K.EMAIL:case K.ADDFILEATTACHMENT:case ve.USER:case K.USERLINK:case K.CONTENTLINK:return"text";case K.TEXTAREA:case K.CHECKBOX:case K.SELECT:return"longtext";case K.DATE:return"date";case K.DATETIME:return"date";case K.NUMBER:return"float"}}const Lm=e=>{let t="";for(let n=0;n<e.length;n++){const r=e.charAt(n);r>="0"&&r<="9"?t+=tF(Number(r)):r>="a"&&r<="z"&&(t+=r)}return t},tF=e=>{let t="",n;for(;e>0;)n=(e-1)%26,t=String.fromCharCode(97+n)+t,e=(e-n)/26|0;return t},yb={create:"create",popup:"create-popup",edit:"edit",view:"display"};function nF(e){let t="";return Object.entries(e.views).forEach(([n,r])=>{if(Object.prototype.hasOwnProperty.call(yb,n)){const A=Object.entries(r).filter(i=>i[1].isUsed&&(n!=="view"||i[0]!=="title")).sort((i,o)=>i[1].pos-o[1].pos);t+=`<display view="${yb[n]}${n==="view"&&e.manifest.displayContentLegacyTable?"Disabled":""}" mode="${n==="view"?"view":"form"}">
|
|
119
119
|
${A.map(([i,o])=>AF(i,o)).join("")}
|
|
120
|
-
</display>`}}),t.length>0&&(t=`<displays type="${e.idApp}">${t}</displays>`),t}function rF(e,t){switch(t.type){case ve.TITLE:return"title";case ve.SENDALERTTOSUBSCRIBERS:return"sendAlert";case ve.RECEIVEACOPY:return"alertAuthor";case ve.PUBLISHTO:return"publishTo";case ve.USER:return"idUser";case ve.CREATIONDATE:return"dateCreation";case K.DESCRIPTION:return"description";default:return Lm(e)}}function AF(e,t){let n="";const r=rF(e,t);if(t.isLockedValue){const A={ref:r,fixedValue:t.value};if(n+=`<html><![CDATA[ <!-- <JAMESPOT.STUDIO.FIXED>${JSON.stringify(A)}</JAMESPOT.STUDIO.FIXED> -->`,t.type===ve.PUBLISHTO){const i=t.value.map(o=>o.uri).join(",");n+=`<input type="hidden" name="publishTo" value="${i}">`}else if(t.type===ve.USER||t.type===K.USERLINK||t.type===K.CONTENTLINK)n+=`<input type="hidden" name="${r}[]" value=${JSON.stringify(t.value.uri)}>`;else if(t.type===K.SELECT)t.properties.find(i=>i.propertyType===Xe.OPTIONS_EDITOR)?.value.canSelectMultiple?t.value.forEach(i=>{n+=`<input type="hidden" name="${r}[]" value="${i.value}">`}):n+=`<input type="hidden" name="${r}" value="${t.value.value}">`;else if(t.type===K.CHECKBOX)t.value.forEach(i=>{n+=`<input type="hidden" name="${r}[]" value="${i}">`});else if(t.type===K.DATE){const i=new Date(t.value),o=[si(i.getDate()),si(i.getMonth()+1),i.getFullYear()].join("/");n+='<input type="hidden" name="'+r+'" value="'+o+'">'}else if(t.type===K.DATETIME){const i=new Date(t.value),o=`${[si(i.getDate()),si(i.getMonth()+1),i.getFullYear()].join("/")} ${si(i.getHours())}:${si(i.getMinutes())}:${si(i.getSeconds())}`;n+='<input type="hidden" name="'+r+'" value="'+o+'">'}else t.type===K.TAGS?n+=`<input type="hidden" name="${r}" value="${t.value?.map(i=>i.uri)?.join(",")}">`:t.type===K.DESCRIPTION||t.type===K.TEXTAREAHTML?n+=`<input type="hidden" name="${r}" value="${t.value}">`:t.type===ve.RECEIVEACOPY?t.value&&(n+='<input type="hidden" name="alertAuthor[jamespot]"><input type="hidden" ng-model="form.alertAuthor" name="alertAuthor[]" value="1">'):t.type===ve.SENDALERTTOSUBSCRIBERS?t.value&&(n+='<input type="hidden" name="sendAlert[jamespot]"><input type="hidden" ng-model="form.sendAlert" name="sendAlert[]" value="1">'):n+=`<input type="hidden" name="${r}" value="${t.value}">`;n+="]]></html>"}else switch(t.type){case K.CODEHTML:{const A={id:e,name:e,properties:{code:t.value}};n+=`<html><![CDATA[ <!-- <JAMESPOT.STUDIO.CODEHTML>${JSON.stringify(A)}</JAMESPOT.STUDIO.CODEHTML><JAMESPOT.STUDIO.FIELD_POS>${t.pos}</JAMESPOT.STUDIO.FIELD_POS>-->${t.value}]]></html>`;break}case K.IMAGE:n+="<image />";break;case ve.PUBLISHTO:n+="<publishTo />";break;default:n+="<attr name='"+r+"' />";break}return n}function si(e){return e<10?"0"+e:e}const $B={"create-popup":"popup",create:"create",edit:"edit",display:"view",displayDisabled:"view"},Cb=["title","alertAuthor","sendAlert"],iF=["edito"];function oF(e,t,n){return Object.assign({},...Rm.map(r=>{const A={};let i=[];yo[r]?.optional!==void 0&&(i=i.concat(yo[r]?.optional??[]));let o=[];yo[r]?.fixed!==void 0&&(o=o.concat(yo[r]?.fixed??[])),Object.entries(e[r]).forEach(([d,u])=>{u.isFixed&&(A[d]=u,o.splice(o.findIndex(f=>f===u.type),1)),u.isOptional&&(A[d]=u,i.splice(i.findIndex(f=>f===u.type),1))});const a=new Set(o.concat(i)),l={[ve.CREATIONDATE]:()=>oE(!1),[ve.TITLE]:()=>Lc({fixedValue:void 0}),[ve.USER]:()=>iE(!1),[ve.RECEIVEACOPY]:()=>nE({fixedValue:void 0}),[ve.SENDALERTTOSUBSCRIBERS]:()=>rE({fixedValue:void 0}),[ve.PUBLISHTO]:()=>AE({fixedValue:void 0})};a.forEach(d=>{const u=l[d];if(u){const[f,g]=u();A[f]=g}else console.error("ExtraAppFieldsItemViews does not have this field type: "+d)});const c=[];return n.forEach((d,u)=>{const f=d.views[r],g=Object.keys(e[r]).includes(d.id),p=d.type;if(jm.get(p)?.includes(r))return;let v;if(p===K.CODEHTML){const w=d.properties?.find(b=>b.propertyType===Xe.RICHTEXT);w?.value&&(v=w?.value)}if(p===K.SELECT){const w=d.properties?.find(b=>b.propertyType===Xe.OPTIONS_EDITOR);if(g){const b=e[r][d.id],C=b.properties?.find(B=>B.propertyType===Xe.OPTIONS_EDITOR),x=!!w?.value?.canSelectMultiple,y=!!C?.value?.canSelectMultiple;x===y&&(v=b.value)}else{const b=w?.isOptionsEditorEnhanced&&w?.value.defaultSelectOption?w?.value.defaultSelectOptionValue:"";b&&(v=b)}}if(g){const w=e[r][d.id];A[d.id]={...w,properties:d.properties??w.properties??[],...v!==void 0&&{value:v},isUsed:f,pos:t?.[r]?u:w.pos,isLockedValue:(v!==void 0||w.value!==void 0)&&w.isLockedValue}}else{c.push({id:d.id,idx:u});const w=Object.values(e[r]).filter(b=>!b.isFixed&&!b.isOptional).length;A[d.id]={type:d.type,properties:d.properties??[],isUsed:f,isOptional:!1,isLockedValue:!1,isFixed:!1,value:v??null,pos:t?.[r]?u:w+u}}}),t?.[r]||c.forEach(d=>{const u=A[d.id];u.pos=d.idx+1,Object.keys(A).forEach(f=>{const g=A[f];g&&!Object.values(gj).includes(f)&&f!==d.id&&g.pos>=u.pos&&g.pos++})}),{[r]:A}}))}function sF(e){return e.map(t=>({id:`${t.type}/${t.id}`,uri:`${t.type}/${t.id}`,shortUri:`${t.type}/${t.id}`,title:t.title,name:t.title,mainType:t.type,type:t.mainType,label:t.type,cssClass:t._cssClass,cssColor:t._cssColor,class:t._cssClass,Pseudo:t.title,_url:t._url}))}function aF(e,t,n){const r=e.typeModel.tables,A=e.typeModel.displays;if(!A)return;const i=new Map;Object.entries(A).forEach(o=>{const[a,l]=o;Object.keys($B).includes(a)&&lF(t,i,a,l,r,n)}),cF(t,i,e.columns,r,n),dF(t,i,e.attrExposed,r,n)}function lF(e,t,n,r,A,i){const o=$B[n];if(e.views[o]={},o==="view"){const[a,l]=Lc({fixedValue:void 0});e.views[o][a]=l}r.composants.forEach((a,l)=>{let c;if(a.name&&iF.includes(a.name))return;const[d,u]=gF(e,t,a,A,i);if(d===-1&&u)switch(u.ref){case"title":{if(o==="view")break;const[f,g]=Lc(u);e.views[o][f]=g;break}case"alertAuthor":{const[f,g]=nE(u);e.views[o][f]=g;break}case"sendAlert":{const[f,g]=rE(u);e.views[o][f]=g;break}case"publishTo":{const[f,g]=AE(u);e.views[o][f]=g;break}default:console.error("fixed field info with unsupported ref ",u);break}else if(d!==-1){if(c=e.fields[d],!c?.views)throw new Error(`error converting installed app to V2: created field not found in fields array: ${d}, ${u}`);c.views[o]=!0,tE(o,c,e,l,u)}})}function cF(e,t,n,r,A){n&&Object.keys(n).forEach((i,o)=>{eE(e,t,r,"list",i,o,A)})}function dF(e,t,n,r,A){n.forEach((i,o)=>{eE(e,t,r,"filter",i,o,A)})}function eE(e,t,n,r,A,i,o){switch(A){case"title":{const[a,l]=Lc({fixedValue:void 0});e.views[r][a]=l;break}case"iduser":case"idUser":{const[a,l]=iE();e.views[r][a]=l;break}case"datecreation":case"dateCreation":{const[a,l]=oE();e.views[r][a]=l;break}default:uF(e,t,n,r,A,i,o);break}}function uF(e,t,n,r,A,i,o){const a=fF(e,t,n,A,o),l=e.fields[a];if(!l?.views)throw new Error(`error converting installed app to V2: unable to handle ${A} in list view`);l.views[r]=!0,tE(r,l,e,i,void 0)}function fF(e,t,n,r,A){const i=t.get(r);if(i!==void 0)return i;const[o,a]=$h(e,r,n,A);return t.set(o,a),a}function gF(e,t,n,r,A){if(n.name!==void 0&&n.element==="attr"){if(Cb.includes(n.name))return[-1,{ref:n.name,fixedValue:void 0}];const i=t.get(n.name);if(i!==void 0)return[i,void 0];const[o,a]=$h(e,n.name,r,A);return t.set(o,a),[a,void 0]}else if(n.element==="html"){const i=n.html;if(i===void 0)return console.error("error while parsing studio installed html attr in a view: no html code"),[-1,void 0];if(i.includes("<JAMESPOT.STUDIO.FIXED>")){const o=i.indexOf("<JAMESPOT.STUDIO.FIXED>")+23,a=i.indexOf("</JAMESPOT.STUDIO.FIXED>"),l=i.substring(o,a);try{const c=JSON.parse(l);if(c?.ref.toUpperCase()in ve){const g=c.ref.toUpperCase();return[-1,{...c,ref:_B(g)}]}if(Cb.includes(c?.ref))return[-1,c];const d=t.get(c?.ref);if(d!==void 0)return[d,c];const[u,f]=$h(e,c.ref,r,A);return t.set(u,f),[f,c]}catch{return console.error("error while parsing studio installed fixed attr in a view: json parsing failed"),[-1,void 0]}}else if(i.includes("<JAMESPOT.STUDIO.CODEHTML>"))try{const o=i.indexOf("<JAMESPOT.STUDIO.CODEHTML>")+26,a=i.indexOf("</JAMESPOT.STUDIO.CODEHTML>"),l=i.substring(o,a),c=JSON.parse(l),d=t.get(c?.name);if(d!==void 0)return[d,void 0];const u=Sj(c),f=e.fields.push(u)-1;return t.set(u.id,f),[f,void 0]}catch{return console.error("error while parsing studio installed codehtml attr in a view: json parsing failed"),[-1,void 0]}else return console.error("error while parsing studio installed html attr in a view: unknown html format"),[-1,void 0]}else if(n.element==="image"){const i=t.get("image");if(i!==void 0)return[i,void 0];const o=Ij(),a=e.fields.push(o)-1;return t.set("image",a),[a,void 0]}else return n.element==="publishTo"?[-1,{ref:"publishTo",fixedValue:void 0}]:(console.error("error while parsing studio installed attr in a view: unknown attr :O"),[-1,void 0])}function $h(e,t,n,r){const A=hF(t,n),i=pF(A),o=(function(){switch(i){case K.ADDFILEATTACHMENT:return Dj(A);case K.NUMBER:return Tj(A);case K.TAGS:return Oj(A);case K.SELECT:return Qj(A);case K.RADIO:return ZB(A);case K.CHECKBOX:return Rj(A);case K.CONTENTLINK:return jj(A,r);case K.DESCRIPTION:return Lj(A);case K.TEXTAREAHTML:return Pj(A);case K.DATE:return Mj(A);case K.DATETIME:return Hj(A);case K.URL:return kj(A);case K.EMAIL:return Nj(A);case K.TOGGLE:return Uj(A);case K.USERLINK:return zj(A);case K.TEXTAREA:return Wj(A);case K.TEXT:default:return Fj(A)}})(),a=e.fields.push(o)-1;return[t,a]}function hF(e,t){let n;for(let r=0;r<t.length&&!n;r++)n=t[r]?.attributes.find(A=>A.name===e);if(!n)throw new Error("error converting installed app to V2: installed field not found in tables "+e);return n}function tE(e,t,n,r,A){t.views&&(t.views[e]=!0,n.views[e][t.id]={type:t.type,properties:t.properties??[],isUsed:!0,isOptional:!1,isLockedValue:!!A?.fixedValue,isFixed:!1,value:A?.fixedValue??null,pos:r})}function pF(e){switch(e.widget.type){case"number":return K.NUMBER;case"taxonomy":return K.TAGS;case"date":return K.DATE;case"datetime":return K.DATETIME;case"select":return K.SELECT;case"radio":return K.RADIO;case"url":return K.URL;case"email":return K.EMAIL;case"file":return K.ADDFILEATTACHMENT;case"checkbox":return e.widget.options?.["1"]==="GLOBAL_Yes"?K.TOGGLE:K.CHECKBOX;case"uri":if(e.widget.params?.views==="user")return K.USERLINK;if(e.widget.params?.views==="article")return K.CONTENTLINK;break;case"textarea":if(e.attrType==="longtext"||e.attrType==="text")return K.TEXTAREA;if(e.attrType==="html")return e.name==="description"?K.DESCRIPTION:K.TEXTAREAHTML;break;case"text":return K.TEXT}throw new Error("error converting installed app to V2: installed field type not recognized for field "+e.name+":"+JSON.stringify(e))}function Lc(e,t=!0){return["title",{type:ve.TITLE,properties:[],isUsed:t,isOptional:!1,isLockedValue:!!e?.fixedValue,isFixed:!0,value:e?.fixedValue??null,pos:0}]}function nE(e,t=!0){return["alertAuthor",{type:ve.RECEIVEACOPY,properties:[],isUsed:t,isOptional:!0,isLockedValue:e?.fixedValue!==void 0,isFixed:!1,value:e?.fixedValue??!0,pos:300}]}function rE(e,t=!0){return["sendAlert",{type:ve.SENDALERTTOSUBSCRIBERS,properties:[],isUsed:t,isOptional:!0,isLockedValue:e?.fixedValue!==void 0,isFixed:!1,value:e?.fixedValue??!0,pos:200}]}function AE(e,t=!0){return["publishTo",{type:ve.PUBLISHTO,properties:[],isUsed:t,isOptional:!0,isLockedValue:!!e?.fixedValue,isFixed:!1,value:e?.fixedValue??[],pos:100}]}function iE(e=!0){return["user",{type:ve.USER,properties:[],isUsed:e,isOptional:!1,isLockedValue:!1,isFixed:!0,value:null,pos:1}]}function oE(e=!0){return["dateCreation",{type:ve.CREATIONDATE,properties:[],isUsed:e,isOptional:!0,isLockedValue:!1,isFixed:!1,value:null,pos:100}]}function mF(e,t,n){const{version:r,dateCreation:A}=e.manifest,i=e.typeModel,o=Object.assign({},...Rm.map(f=>({[f]:{}}))),a=e,l=!!e.columns&&Object.keys(e.columns).length>0,c={idApp:e.idApp,status:ep(e),studioVersion:2,manifest:{appShortName:e.label,appName:e.label,description:e.description,author:e.author,cssColor:i.cssColor??"#392994",cssClass:{label:i.cssClass??"star",value:i.cssClass??"star"},version:r,dateCreation:A,checkAccess:!1,accessRightList:"",attrExposed:[],display:l?ia.TABLE:ia.FLUX,viewSolr:e.view==="solr"?Zh.SOLR:Zh.NOT_SOLR,typeLabel:i.typeLabel,articlesCount:e.articlesCount??0,displayContentLegacyTable:!!a?.typeModel?.displays?.displayDisabled},fields:[],views:o,installFor:e.accessRightObjectList?sF(e.accessRightObjectList):[],audience:e.checkAccess===!1?Fc.ALL:Fc.CUSTOM};aF(e,c,n),c.views=oF(c.views,c.syncViewFieldOrder,c.fields);const d=vF(e.idApp,t);if(!d)return c;const u=sE(d);return u&&(c.inWorkVersion=u),c}function sE(e){if(!e.value)return;const t=JSON.parse(e.value);return t.studioVersion==2?{idApp:e.idApp,studioVersion:2,status:ep(e),manifest:t.manifest,fields:t.fields,views:t.views,syncViewFieldOrder:t.syncViewFieldOrder,audience:t.audience,installFor:t.installFor}:{...JB(t),status:ep(e),migratedFrom:1}}function ep(e){return e.status===_.StudioApplicationStatus.installed?e.suspended?Oo.suspended:Oo.installed:Oo.draft}function vF(e,t){return t.find(n=>n.idApp===e&&n.status===_.StudioApplicationStatus.saved)}function wF(e,t){return!!t.find(n=>n.idApp===e&&n.status===_.StudioApplicationStatus.installed)}function aE(e,t){return e.map(n=>{try{return n.status===_.StudioApplicationStatus.installed?mF(n,e,t):wF(n.idApp,e)?void 0:sE(n)}catch(r){console.error(r);return}}).filter(n=>n!==void 0)}const bF={currentStudioApp:null,fetchCurrentStudioAppStatus:"idle",saveCurrentStudioAppStatus:"idle",installStudioAppStatus:"idle",hasChanged:!1},Cf=ae("studio/fetchCurrentStudioApp",async({idApp:e,status:t},{extra:n,rejectWithValue:r,getState:A})=>{const i=n.jApi,o={error:1,errorMsg:"Error fetching application"};try{const a=(await i.application.studioGet(e,t)).result;return aE([a],A())[0]||r(o)}catch{return r(o)}}),Bf=ae("studio/saveCurrentStudioApp",async(e,{extra:t,rejectWithValue:n,getState:r,dispatch:A})=>{const i=t.jApi,o={error:1,errorMsg:"Error saving application"},a=r().studio.currentStudioApp.currentStudioApp;if(!a)return n(o);const l=JSON.stringify(a);try{await i.application.studioSave(a.idApp,l,"saved"),A(de.actions.success({label:"APPSTUDIO_AppItem_Edition_Saved"}));return}catch(c){return A(de.actions.error({label:Be(c)})),n(o)}}),Ef=ae("studio/installApp",async({callback:e},{extra:t,rejectWithValue:n,getState:r,dispatch:A})=>{const i=t.jApi,o={error:1,errorMsg:"Error saving application"},a=r().studio.currentStudioApp.currentStudioApp;if(!a)return n(o);const l=Xj(a);try{await i.application.studioInstall(l),A(de.actions.success({label:"APPSTUDIO_AppItem_Installed"})),e&&e();return}catch(c){return A(de.actions.error({label:Be(c)})),n(o)}}),Pc=ke({name:"currentStudioApp",initialState:bF,reducers:{setCurrentApp:(e,t)=>{e.currentStudioApp=t.payload},resetCurrentApp:e=>{e.currentStudioApp=null},setHasChanged:(e,t)=>{e.hasChanged=t.payload}},extraReducers:e=>{e.addCase(Cf.pending,t=>{t.fetchCurrentStudioAppStatus==="idle"&&(t.fetchCurrentStudioAppStatus="pending")}).addCase(Cf.fulfilled,(t,n)=>{t.fetchCurrentStudioAppStatus==="pending"&&(t.fetchCurrentStudioAppStatus="idle"),t.currentStudioApp=n.payload}).addCase(Cf.rejected,t=>{t.fetchCurrentStudioAppStatus==="pending"&&(t.fetchCurrentStudioAppStatus="idle")}).addCase(Bf.pending,t=>{t.saveCurrentStudioAppStatus==="idle"&&(t.saveCurrentStudioAppStatus="pending")}).addCase(Bf.fulfilled,t=>{t.saveCurrentStudioAppStatus==="pending"&&(t.saveCurrentStudioAppStatus="idle")}).addCase(Bf.rejected,t=>{t.saveCurrentStudioAppStatus==="pending"&&(t.saveCurrentStudioAppStatus="idle")}).addCase(Ef.pending,t=>{t.installStudioAppStatus==="idle"&&(t.installStudioAppStatus="pending")}).addCase(Ef.fulfilled,t=>{t.installStudioAppStatus==="pending"&&(t.installStudioAppStatus="idle")}).addCase(Ef.rejected,t=>{t.installStudioAppStatus==="pending"&&(t.installStudioAppStatus="idle")})}});function lE(e,t,n){const r=e.studioVersion!==2?JSON.parse(JSON.stringify(JB(e))):JSON.parse(JSON.stringify(e));if(delete r.inWorkVersion,n)r.manifest.version=r.manifest.version+.1;else{const A=Zr(),i=`${e.manifest.appName} Copie`;r.idApp=A,r.status=Jr.DRAFT,r.manifest={...r.manifest,appName:i,appShortName:i,author:t??r.manifest.author??"",dateCreation:new Date().toISOString(),version:.1,articlesCount:0}}return[r,r.idApp]}function xF({author:e,appName:t}){const n=Zr(),r=Object.assign({},...Rm.map(A=>{const i={};return yo[A]?.fixed.forEach((o,a)=>{i[Zr()]={type:o,properties:[],isUsed:!0,isOptional:!1,isFixed:!0,isLockedValue:!1,value:null,pos:a}}),yo[A]?.optional.forEach((o,a)=>{i[Zr()]={type:o,properties:[],isUsed:!0,isOptional:!0,isFixed:!1,isLockedValue:!1,value:o==="SENDALERTTOSUBSCRIBERS"||o==="RECEIVEACOPY"?!0:null,pos:(a+1)*100}}),{[A]:i}}));return{newAppId:n,newStudioApp:{idApp:n,status:Jr.DRAFT,author:e??"",studioVersion:2,manifest:{appShortName:t,appName:t,author:e??"",description:"",typeLabel:"",cssColor:"#392994",cssClass:{label:"star",value:"star"},version:.1,dateCreation:new Date().toISOString(),viewSolr:Zh.SOLR,display:ia.TABLE,checkAccess:!1,accessRightList:"",attrExposed:[],articlesCount:0},syncViewFieldOrder:{create:!0,popup:!0,view:!0,edit:!0,list:!0,filter:!0},fields:[],views:r,audience:Fc.CUSTOM,installFor:[]}}}function Za(e,t){return e.manifest.appName>t.manifest.appName?1:-1}const yF={loadingStudioAppsList:"idle",deleteStudioAppStatus:"idle",suspendStudioAppStatus:"idle",restartStudioAppStatus:"idle",cloneStudioAppStatus:"idle",createInWorkAppStatus:"idle",createNewStudioAppStatus:"idle"},Df=ae("studio/appsList",async(e,{extra:t,rejectWithValue:n,dispatch:r,getState:A})=>{const i=t.jApi;try{const{result:o}=await i.application.studioList(),a=await i.taxonomy.list(),l=(await Promise.allSettled(o.map(async d=>{const u=(await i.application.studioGet(d.idApp,d.status)).result,f=(await i.article.count(d.idApp)).result;return{...u,articlesCount:f}}))).map(d=>d.status==="fulfilled"?d.value:null).reduce((d,u)=>u!==null?d.concat([u]):d,[]),c=aE(l,A());return c.forEach(async d=>{d.fields=Bb(d.fields,a,e),d.inWorkVersion&&(d.inWorkVersion.fields=Bb(d.inWorkVersion.fields,a,e))}),c}catch(o){throw console.error(o),r(de.actions.error({label:Be(o)})),n({error:1,errorMsg:"Error retrieving applications"})}});function Bb(e,t,n){return e.map(r=>{if(r.type!==K.TAGS)return r;const A=JSON.parse(JSON.stringify(r)),i=A.properties?.find(a=>a.propertyType===Xe.TAXONOMY),o=t.find(a=>a.id===i?.value.id);return o&&i&&(i.value.title=n.formatMessage({id:o.title}),i.value.type=o.type),A})}const Sf=ae("studio/createApp",async({appName:e,callback:t},{extra:n,dispatch:r,rejectWithValue:A,getState:i})=>{const o=n.jApi,a=i().userCurrent?.uri,{newAppId:l,newStudioApp:c}=xF({appName:e,...a&&{author:a}});try{return await o.application.studioSave(l,JSON.stringify(c),"saved"),r(de.actions.success({label:"APPSTUDIO_StudioApp_Created"})),r(Pc.actions.setCurrentApp(c)),t&&t(),c}catch(d){throw r(de.actions.error({label:Be(d)})),A({error:1,errorMsg:"Error creating application"})}}),If=ae("studio/deleteApp",async({idApp:e,status:t},{extra:n,rejectWithValue:r,dispatch:A})=>{const i=n.jApi;try{const o=await i.application.studioDelete(e,t);return A(de.actions.success({label:"APPSTUDIO_StudioApp_Deleted"})),o}catch(o){return A(de.actions.error({label:Be(o)})),r({error:1,errorMsg:"Error deleting application"})}}),Tf=ae("studio/suspendStudioApp",async({idApp:e},{extra:t,rejectWithValue:n,dispatch:r})=>{const A=t.jApi;try{await A.application.studioSuspend(e),r(de.actions.success({label:"APPSTUDIO_AppItem_Suspended"}))}catch(i){throw r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Error suspending application"})}}),Of=ae("studio/restartStudioApp",async({idApp:e},{extra:t,rejectWithValue:n,dispatch:r})=>{const A=t.jApi;try{await A.application.studioRestart(e),r(de.actions.success({label:"APPSTUDIO_AppItem_Restarted"}))}catch(i){throw r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Error restarting application"})}}),Qf=ae("studio/cloneStudioApp",async({idApp:e,inWork:t},{extra:n,getState:r,rejectWithValue:A,dispatch:i})=>{const o=n.jApi;let a=r().studio.studioAppsList.studioAppsList?.find(f=>f.idApp===e);if(!a)return A({error:1,errorMsg:"Error cloning application"});if(t)if(a.inWorkVersion!==void 0)a=a.inWorkVersion;else return A({error:1,errorMsg:"Error cloning application"});const l=r().userCurrent?.uri,[c,d]=lE(a,l),u=JSON.stringify(c);try{return await o.application.studioSave(d,u,"saved"),i(de.actions.success({label:"APPSTUDIO_AppItem_Cloned"})),c}catch(f){return i(de.actions.error({label:Be(f)})),A({error:1,errorMsg:"Error cloning application"})}}),Rf=ae("studio/createInWorkStudioApp",async({idApp:e},{extra:t,getState:n,rejectWithValue:r,dispatch:A})=>{const i=t.jApi,o=n().studio.studioAppsList.studioAppsList?.find(u=>u.idApp===e);if(!o||![Jr.INSTALLED,Jr.SUSPENDED].includes(o.status))return r({error:1,errorMsg:"Error cloning application"});const a=n().userCurrent?.uri,[l,c]=lE(o,a,!0),d=JSON.stringify(l);try{return await i.application.studioSave(c,d,"saved"),A(de.actions.success({label:"APPSTUDIO_AppItem_CreateInWork"})),l}catch(u){return A(de.actions.error({label:Be(u)})),r({error:1,errorMsg:"Error creating in work version for application"})}}),tp=ke({name:"studioAppsList",initialState:yF,reducers:{setAppsList:(e,t)=>{e.studioAppsList=[...t.payload].sort(Za)}},extraReducers:e=>{e.addCase(Df.pending,t=>{t.loadingStudioAppsList==="idle"&&(t.loadingStudioAppsList="pending")}).addCase(Df.fulfilled,(t,n)=>{t.loadingStudioAppsList==="pending"&&(t.loadingStudioAppsList="idle"),t.studioAppsList=[...n.payload].sort(Za)}).addCase(Df.rejected,t=>{t.loadingStudioAppsList==="pending"&&(t.loadingStudioAppsList="idle")}).addCase(If.pending,t=>{t.deleteStudioAppStatus==="idle"&&(t.deleteStudioAppStatus="pending")}).addCase(If.fulfilled,(t,n)=>{t.deleteStudioAppStatus==="pending"&&(t.deleteStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.reduce((r,A)=>{const{idApp:i}=n.meta.arg;let{status:o}=n.meta.arg;return o===Jr.INSTALLED&&(o=Jr.SUSPENDED),A.idApp===i&&A.status===o?A.inWorkVersion&&A.status===Jr.SUSPENDED?(A.inWorkVersion.status=Jr.DRAFT,[...r,A.inWorkVersion]):r:(A.inWorkVersion?.idApp===i&&A.inWorkVersion?.status===o&&delete A.inWorkVersion,[...r,A])},[])??[]}).addCase(If.rejected,t=>{t.deleteStudioAppStatus==="pending"&&(t.deleteStudioAppStatus="idle")}).addCase(Tf.pending,t=>{t.suspendStudioAppStatus==="idle"&&(t.suspendStudioAppStatus="pending")}).addCase(Tf.fulfilled,(t,n)=>{t.suspendStudioAppStatus==="pending"&&(t.suspendStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.map(r=>{const{idApp:A}=n.meta.arg;return r.idApp===A&&(r.status=Jr.SUSPENDED),r})??[]}).addCase(Tf.rejected,t=>{t.suspendStudioAppStatus==="pending"&&(t.suspendStudioAppStatus="idle")}).addCase(Of.pending,t=>{t.restartStudioAppStatus==="idle"&&(t.restartStudioAppStatus="pending")}).addCase(Of.fulfilled,(t,n)=>{t.restartStudioAppStatus==="pending"&&(t.restartStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.map(r=>{const{idApp:A}=n.meta.arg;return r.idApp===A&&(r.status=Jr.INSTALLED),r})??[]}).addCase(Of.rejected,t=>{t.restartStudioAppStatus==="pending"&&(t.restartStudioAppStatus="idle")}).addCase(Qf.pending,t=>{t.cloneStudioAppStatus==="idle"&&(t.cloneStudioAppStatus="pending")}).addCase(Qf.fulfilled,(t,n)=>{t.cloneStudioAppStatus==="pending"&&(t.cloneStudioAppStatus="idle"),t.studioAppsList=[...t.studioAppsList??[],n.payload].sort(Za)}).addCase(Qf.rejected,t=>{t.cloneStudioAppStatus==="pending"&&(t.cloneStudioAppStatus="idle")}).addCase(Rf.pending,t=>{t.createInWorkAppStatus==="idle"&&(t.createInWorkAppStatus="pending")}).addCase(Rf.fulfilled,(t,n)=>{t.createInWorkAppStatus==="pending"&&(t.createInWorkAppStatus="idle");const r=t.studioAppsList?.find(A=>A.idApp===n.payload.idApp);r&&(r.inWorkVersion=n.payload)}).addCase(Rf.rejected,t=>{t.createInWorkAppStatus==="pending"&&(t.createInWorkAppStatus="idle")}).addCase(Sf.pending,t=>{t.createNewStudioAppStatus==="idle"&&(t.createNewStudioAppStatus="pending")}).addCase(Sf.fulfilled,(t,n)=>{t.createNewStudioAppStatus==="pending"&&(t.createNewStudioAppStatus="idle"),t.studioAppsList=[...t.studioAppsList??[],n.payload].sort(Za)}).addCase(Sf.rejected,t=>{t.createNewStudioAppStatus==="pending"&&(t.createNewStudioAppStatus="idle")})}});Hn({[tp.name]:tp.reducer,[Pc.name]:Pc.reducer});({...tp.actions,...Pc.actions});const CF={messages:[],status:"idle",summary:void 0,jobUid:void 0},np=ke({name:"teamWorkAiDaySummary",initialState:CF,reducers:{setDaySummaryMessageAndStatus:(e,t)=>{if(t.payload.jobUid!==e.jobUid)return;const{status:n,messages:r}=t.payload;e.status=n,e.messages=r},setDaySummary:(e,t)=>{t.payload.jobUid===e.jobUid&&(e.summary=t.payload.summary)},resetDaySummaryState:e=>{e.status="idle",e.messages=[],e.jobUid=void 0,e.summary=void 0}},extraReducers:e=>{e.addCase(jf.pending,(t,n)=>{t.status="pending",t.messages=["APP_TeamWork_IA_Generation_Started"]}),e.addCase(jf.fulfilled,(t,n)=>{t.status=n.payload.state,t.messages=n.payload.messages,t.summary=n.payload.summary,t.jobUid=n.payload.jobUid}),e.addCase(jf.rejected,(t,n)=>{t.status="error",t.messages=[n.payload?.errorMsg??"GLOBAL_Technical_Error"]})}}),jf=ae("teamWork/Ai/startDaySummaryCreation",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.daySummary({forceGeneration:e},{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"APP_TEAMWORK_ToDo_Not_Sent"})}}),BF={messages:[],status:"idle",tasks:void 0,jobUid:void 0,uriAiTodo:void 0},rp=ke({name:"teamWorkAiTasks",initialState:BF,reducers:{setTasksMessageAndStatus:(e,t)=>{if(t.payload.jobUid!==e.jobUid)return;const{status:n,messages:r}=t.payload;e.status=n,e.messages=r},setTasks:(e,t)=>{t.payload.jobUid===e.jobUid&&(e.tasks=t.payload.tasks,e.uriAiTodo=t.payload.uriAiTodo)},resetTasksState:e=>{e.status="idle",e.messages=[],e.jobUid=void 0,e.tasks=void 0,e.uriAiTodo=void 0}},extraReducers:e=>{e.addCase(Ff.pending,(t,n)=>{t.status="pending",t.messages=["APP_TeamWork_IA_Generation_Started"]}),e.addCase(Ff.fulfilled,(t,n)=>{t.status=n.payload.state,t.messages=n.payload.messages,t.tasks=n.payload.tasks,t.jobUid=n.payload.jobUid,t.uriAiTodo=n.payload.uriAiTodo}),e.addCase(Ff.rejected,(t,n)=>{t.status="error",t.messages=[n.payload?.errorMsg??"GLOBAL_Technical_Error"]}),e.addCase(EF.fulfilled,(t,n)=>{t.tasks=n.payload})}}),Ff=ae("teamWork/Ai/startToDoCreation",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.generateToDo({forceGeneration:e},{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"APP_TEAMWORK_ToDo_Not_Sent"})}}),EF=ae("teamWork/Ai/setToDoDone",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.todoDone(e,{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"GLOBAL_Technical_Error"})}});Hn({[rp.name]:rp.reducer,[np.name]:np.reducer});({...rp.actions,...np.actions});const DF={},Ap=ke({name:"options",initialState:DF,reducers:{initOptions:(e,{payload:t})=>t}});Hn({[Ap.name]:Ap.reducer});({...Ap.actions});const SF={channels:void 0,loading:"idle",loadingChannelDeletion:"idle"},ic=ae("/fetchChannels",async(e,{extra:t})=>{const n=e??1,r=t.jApi;return await new Promise((A,i)=>{const o={type:"tvDisplayChannel",page:n,orders:[{name:"id",sort:"DESC"}]};r.article.list(o,{format:"raw-list"}).then(a=>{A(a.result)}).catch(a=>{i({error:a.error??1,errorMsg:a.errorMsg??"Error retrieving channels"})})})}),Lf=ae("/deleteChannel",async({channel:e},{extra:t,dispatch:n})=>{const r=t.jApi;return await new Promise((A,i)=>{r.article.delete(e.id).then(o=>{A(o.result),n(ic())}).catch(o=>{i({error:o.error??1,errorMsg:o.errorMsg??"Error deleting channel"})})})}),Eb=ke({name:"channelsList",initialState:{...SF},reducers:{},extraReducers:e=>{e.addCase(ic.pending,t=>{t.loading==="idle"&&(t.loading="pending")}).addCase(ic.fulfilled,(t,n)=>{t.loading==="pending"&&(t.loading="idle",t.channels=n.payload)}).addCase(ic.rejected,t=>{t.loading==="pending"&&(t.loading="idle")}).addCase(Lf.pending,t=>{t.loadingChannelDeletion="pending"}).addCase(Lf.fulfilled,t=>{t.loadingChannelDeletion==="pending"&&(t.loadingChannelDeletion="idle")}).addCase(Lf.rejected,t=>{t.loadingChannelDeletion==="pending"&&(t.loadingChannelDeletion="idle")})}});Hn({[Eb.name]:Eb.reducer});const IF={id:0,mainType:"user",type:"user",uri:"user/0",title:"",_url:"",dateCreation:"",dateModified:"",level:0,active:1},TF=ke({name:"userCurrent",initialState:IF,reducers:{init:(e,{payload:t})=>t}});({...TF.actions});const ip=[{name:"name",sort:"ASC"}],OF={list:{loading:"idle",data:[],page:1,filters:[],orders:ip,limit:20,nbResults:0},tab:"my"},Db=ke({name:"visioConnect",initialState:OF,reducers:{setTab:(e,t)=>{e.tab=t.payload,e.list.page=1,_.deepEqual(e.list.orders,ip)||(e.list.orders=ip),e.list.filters.length>0&&(e.list.filters=[])},setPage:(e,t)=>{e.list.page=t.payload},setFilters:(e,t)=>{_.deepEqual(e.list.filters,t.payload)||(e.list.filters=t.payload)},setOrders:(e,t)=>{_.deepEqual(e.list.orders,t.payload)||(e.list.orders=t.payload)}},extraReducers:e=>{e.addCase(oc.pending,t=>{t.list.loading="pending"}).addCase(oc.fulfilled,(t,n)=>{t.list.loading="idle",t.list.data=n.payload.data,t.list.nbResults=n.payload.cnt}).addCase(oc.rejected,t=>{t.list.loading="idle"}).addCase(sc.pending,t=>{t.list.loading="pending"}).addCase(sc.fulfilled,(t,n)=>{t.list.loading="idle",t.list.data=n.payload.data,t.list.nbResults=n.payload.cnt}).addCase(sc.rejected,t=>{t.list.loading="idle"})}}),oc=ae("visioConnect/fetchPermanentRooms",async(e,{rejectWithValue:t,extra:n,dispatch:r,getState:A})=>{const i=A().visioConnect;try{const o=[...i.list.filters],a=i.list.orders.length>0?i.list.orders:[{name:"name",sort:"ASC"}],l=i.tab,c={filters:o,orders:a,page:i.list.page,limit:i.list.limit};if(l==="my")return(await n.jApi.visioConnect.getPermanentRoomsMy(c)).result;if(l==="all")return(await n.jApi.visioConnect.getPermanentRoomsAll(c)).result;if(l==="archive")return(await n.jApi.visioConnect.getPermanentRoomsArchive(c)).result;throw Error("Unhandled tab")}catch(o){return ht(o)||r(de.actions.error({label:Be(o)})),t({error:1,errorMsg:"Cannot fetch rooms"})}}),sc=ae("visioConnect/fetchTeamworkPermanentRooms",async(e,{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=[],i=[{name:"name",sort:"ASC"}];return(await n.jApi.visioConnect.getPermanentRoomsMy({filters:A,orders:i,page:1,limit:10})).result}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot fetch rooms"})}}),QF=ae("visioConnect/createPermanentRoom",async({room:e,token:t},{rejectWithValue:n,extra:r,dispatch:A})=>{try{const i=(await r.jApi.visioConnect.createPermanentRoom({room:e,token:t})).result;return A(kd.actions.fetchPermanentRooms()),A(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Create_Success"})),i}catch(i){return ht(i)||A(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Cannot save room"})}}),RF=ae("visioConnect/updatePermanentRoom",async({room:e,token:t,uri:n},{rejectWithValue:r,extra:A,dispatch:i})=>{try{const o=(await A.jApi.visioConnect.updatePermanentRoom({uri:n,room:e,token:t})).result;return i(kd.actions.fetchPermanentRooms()),i(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Update_Success"})),o}catch(o){return ht(o)||i(de.actions.error({label:Be(o)})),r({error:1,errorMsg:"Cannot save room"})}}),jF=ae("visioConnect/archivePermanentRoom",async({uri:e},{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=(await n.jApi.visioConnect.archivePermanentRoom(e)).result;return r(kd.actions.fetchPermanentRooms()),r(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Archive_Success"})),A}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot archive room"})}}),FF=ae("visioConnect/unarchivePermanentRoom",async({uri:e},{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=(await n.jApi.visioConnect.unarchivePermanentRoom(e)).result;return r(kd.actions.fetchPermanentRooms()),r(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Unarchive_Success"})),A}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot unarchive room"})}}),LF=e=>e.visioConnect.tab,PF=e=>e.visioConnect.list,kd={slice:Db,actions:{archivePermanentRoom:jF,unarchivePermanentRoom:FF,createPermanentRoom:QF,updatePermanentRoom:RF,fetchPermanentRooms:oc,fetchTeamworkPermanentRooms:sc,...Db.actions},selectors:{selectVisioConnectTab:LF,selectVisioConnectList:PF}},Pf=ae("wall/fetchWallFilters",async(e,{extra:t,rejectWithValue:n})=>{try{return(await t.jApi.wall.getFilters()).result}catch(r){return n(r)}}),Sb={filters:[],taxonomies:[],loading:"idle"},MF=ke({name:"wall",initialState:Sb,reducers:{setFilters:(e,t)=>{e.filters=t.payload},setLoading:(e,t)=>{e.loading=t.payload},reset:()=>Sb},extraReducers:e=>{e.addCase(Pf.pending,t=>{t.loading="pending"}),e.addCase(Pf.fulfilled,(t,n)=>{t.loading="idle",t.filters=n.payload.filterList,t.taxonomies=n.payload.taxonomies}),e.addCase(Pf.rejected,t=>{t.loading="idle"})}});({...MF.actions});const HF=4,Bi=ae("/fetchFiles",async({page:e,query:t,folder:n,tab:r},{extra:A,getState:i})=>{const o=A.jApi,a=i(),l=r??a.wedoc.tab,c=e??a.wedoc.page,d=t??a.wedoc.query,u=n!==void 0?n?.uri??null:a.wedoc.currentFolder?.uri;return l==="my-documents"?await o.wedoc.listMy({page:c,query:d,limit:a.wedoc.limit,uriFolder:u??void 0},{format:"raw-list",extensions:["parentArticle"]}):l==="shared-with-me"?await o.wedoc.listSharedWithMe({page:c,limit:a.wedoc.limit,query:d},{format:"raw-list",extensions:["parentArticle"]}):await o.wedoc.getFiles({page:c,limit:a.wedoc.limit,orders:[{name:"dateCreation",sort:"DESC"}],query:d},{format:"raw-list",extensions:["parentArticle"]})}),Mf=ae("/fetchRecentFiles",async(e,{extra:t,getState:n})=>{const r=t.jApi,A=n().wedoc.tab==="my-documents"?[{name:"idUser",value:"0"}]:[];return await r.wedoc.getFiles({filters:A,limit:HF,orders:[],page:1},{format:"raw-list"})});ae("/setCurrentFolder",async(e,{dispatch:t,getState:n})=>(e?.uri!==n().wedoc.currentFolder?.uri&&await t(Bi({page:1,query:"",folder:e})),e));ae("/setQuery",async(e,{dispatch:t,getState:n})=>(e!==n().wedoc.query&&await t(Bi({page:1,query:e})),e));ae("/setTab",async(e,{dispatch:t})=>(await t(Bi({page:1,query:"",folder:null,tab:e})),e));ae("/setPage",async(e,{dispatch:t,getState:n})=>(e!==n().wedoc.page&&await t(Bi({page:e})),e));const kF={entities:[],nbEntities:0,entitiesRecent:[],tab:"my-documents",loading:"idle",loadingRecent:"idle",query:"",page:1,currentFolder:null,limit:12};ke({name:"wedoc",initialState:kF,reducers:{update:(e,t)=>{e.entities=[...e.entities.map(n=>n.id===t.payload.id?{...n,...t.payload}:n)]}},extraReducers:e=>{e.addCase(Bi.pending,(t,n)=>{t.loading="pending",t.page=n.meta.arg.page??t.page,t.query=n.meta.arg.query??t.query,t.tab=n.meta.arg.tab??t.tab}).addCase(Bi.fulfilled,(t,n)=>{t.loading="idle";const{data:r,cnt:A}=n.payload.result;t.entities=r,t.nbEntities=A,t.currentFolder=n.meta.arg.folder!==void 0?n.meta.arg.folder:t.currentFolder}).addCase(Bi.rejected,t=>{t.loading="idle"}).addCase(Mf.pending,t=>{t.loadingRecent="pending"}).addCase(Mf.fulfilled,(t,n)=>{t.loadingRecent="idle",t.entitiesRecent=n.payload.result.data}).addCase(Mf.rejected,t=>{t.loadingRecent="idle"})}});function NF(){let e="";for(let t=0;t<16;t++)e+=((1+Math.random())*65536|0).toString(16).substring(1);return e}_.WidgetsName.ArticleAttachment;_.WidgetsName.ArticleButton;_.WidgetsName.ArticleGallery;_.WidgetsName.ArticleImage;_.WidgetsName.ArticleSlider;_.WidgetsName.ArticleText;_.WidgetsName.ArticleTitle;_.WidgetsName.Calendar;_.WidgetsName.CalendarCalDav;_.WidgetsName.CheckList;_.WidgetsName.Color;_.WidgetsName.ContactCardDav;_.WidgetsName.DatasourceTable;_.WidgetsName.EmailsImap;_.WidgetsName.ExcelDatasourceTable;_.WidgetsName.Extension;_.WidgetsName.LuccaAbsence;_.WidgetsName.Presence;_.WidgetsName.QuickSurvey;_.WidgetsName.UserProfile;_.WidgetsName.Slider;_.WidgetsName.Welcome;_.WidgetsName.Cover;_.WidgetsName.Text;const UF={token:void 0,ids:{},layers:{},states:{},modal:void 0,editableMap:{},currentEditableIndex:-1,currentEditableWidgetId:void 0,widgetObject:{},widgetObjectRights:{},widgetAuthor:{},widgetWrapperStyle:{},widgetTitleStyle:{},widgetChipCount:{},flushedWidgets:[],rtObjectStack:[],widgetContext:{},widgetSynchronizationStates:{},widgetUrls:{}},zF=[_.WidgetsName.ArticleTitle,_.WidgetsName.ArticleText,_.WidgetsName.ArticleImage,_.WidgetsName.ArticleButton,_.WidgetsName.ArticleSlider,_.WidgetsName.ArticleAttachment];ke({name:"widgets",initialState:UF,reducers:{registerWidget:(e,t)=>{const{uniqid:n,widget:r,context:A}=t.payload;if(e.ids[n]){console.error(`Widget with uniqid ${n} is already registered.`);return}e.ids[n]=r,e.states[n]??={busy:!1,initialized:!1,loading:!1,mounted:!1,hover:!1,empty:zF.includes(r.widget.name),locked:!1},e.widgetContext[n]=A},registerWidgetObject:(e,t)=>{const{uniqid:n,object:r}=t.payload;e.widgetObject[n]=r},registerWidgetObjectRights:(e,t)=>{const{uniqid:n,rights:r}=t.payload;e.widgetObjectRights[n]=r},registerWidgetAuthor:(e,t)=>{const{uniqid:n,author:r}=t.payload;e.widgetAuthor[n]=r},setWidgetChipCount:(e,t)=>{const{uniqid:n,count:r}=t.payload;e.widgetChipCount[n]=r},setWidgetWrapperStyle:(e,t)=>{const{uniqid:n,styles:r}=t.payload;e.widgetWrapperStyle[n]={...e.widgetWrapperStyle[n],...r}},setWidgetSynchronizationState:(e,t)=>{e.widgetSynchronizationStates[t.payload.uniqid]=t.payload.state},setWidgetUrl:(e,t)=>{e.widgetUrls[t.payload.uniqid]=t.payload.url},setWidgetTitleStyle:(e,t)=>{const{uniqid:n,styles:r}=t.payload;e.widgetTitleStyle[n]={...e.widgetTitleStyle[n],...r}},updateWidget:(e,t)=>{const{uniqid:n}=t.payload,r={...e.ids[n]};e.states[n]?.locked||e.ids[n]&&r.widget&&(e.ids[n]=Object.assign({...e.ids[n],widget:{...r.widget,content:t.payload.override?t.payload.content:Object.assign({...r.widget.content,...t.payload.content})}}))},replaceWidget:(e,t)=>{const{uniqid:n}=t.payload,r={...e.ids[n]};e.states[n]?.locked||e.ids[n]&&r.widget&&(e.ids[n]=Object.assign({...e.ids[n],widget:{...r.widget,name:t.payload.name,content:t.payload.content}}))},registerWidgetRTObject:(e,t)=>{const{uniqid:n,fn:r,object:A}=t.payload;e.rtObjectStack=[...e.rtObjectStack,{uniqid:n,fn:r,object:A}]},flushWidget:(e,t)=>{const{uniqid:n}=t.payload;delete e.ids[n],delete e.states[n],delete e.widgetContext[n],delete e.widgetObject[n],delete e.widgetObjectRights[n],delete e.widgetAuthor[n],delete e.widgetChipCount[n],delete e.widgetWrapperStyle[n],delete e.widgetTitleStyle[n],e.flushedWidgets.push(n)},flushAllWidget:e=>{e.flushedWidgets=[...e.flushedWidgets,...Object.keys(e.ids)],e.ids={},e.states={}},updateWidgetWrapper:(e,t)=>{const{uniqid:n}=t.payload;e.ids[n]&&(e.ids[n]=Object.assign({...e.ids[n],...t.payload}))},registerLayer:(e,t)=>{const n=NF(),r={...e.ids[t.payload.uniqid]};r.widget&&(e.ids[t.payload.uniqid]&&r.widget.layers?e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...r.widget,layers:[...r.widget.layers,n]}}):e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...r.widget,layers:[n]}}),e.ids[t.payload.widget.widget.uniqid]=t.payload.widget,e.states[t.payload.widget.widget.uniqid]={busy:!1,initialized:!1,loading:!1,mounted:!1,hover:!1,empty:!0},e.layers[n]={uniqid:n,widgets:[t.payload.widget],title:`Layer ${n}`,visible:!0,locked:!1,position:{x:0,y:0}})},updateLayer:(e,t)=>{e.layers[t.payload.uniqid]&&(e.layers[t.payload.uniqid]=Object.assign({...e.layers[t.payload.uniqid],...t.payload.props}))},flushLayer:(e,t)=>{const n={...e.ids[t.payload.uniqid]};n.widget?.layers&&(e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...n.widget,layers:[...n.widget.layers.filter(r=>r!==t.payload.layerId)]}}),delete e.layers[t.payload.layerId])},prevEditableIndex:e=>{const t=Object.keys(e.ids).length;e.currentEditableIndex=e.currentEditableIndex===0?t-1:e.currentEditableIndex-1},nextEditableIndex:e=>{const t=Object.keys(e.ids).length;e.currentEditableIndex=e.currentEditableIndex<t-1?e.currentEditableIndex+1:0},setEditableIndex:(e,t)=>{e.currentEditableIndex=t.payload.index},setEditableWidgetId:(e,t)=>{e.currentEditableWidgetId=t.payload.uniqid},registerEditableWidget:(e,t)=>{e.editableMap[t.payload.uniqid]=t.payload},setToken:(e,t)=>{e.token=t.payload.token},setWidgetState:(e,t)=>{const{uniqid:n}=t.payload;({...e.states[n]}!==void 0)&&(e.states[n]={...e.states[n],...t.payload})},setAllWidgetStates:(e,t)=>{Object.keys(e.states).map(n=>{({...e.states[n]}!==void 0)&&(e.states[n]={...e.states[n],...t.payload})})},registerModal:(e,t)=>{e.modal=t.payload},flushModal:e=>{e.modal=void 0}}});const WF={editors:[]};ke({name:"editors",initialState:WF,reducers:{registerEditor:(e,t)=>{const{uniqid:n,name:r,onSave:A,mode:i}=t.payload,o=A?{uniqid:n,name:r,onSave:A,position:"right",mode:i??"view"}:{uniqid:n,name:r,position:"right",mode:i??"view"};e.editors=e.editors.find(a=>a.uniqid===n)?e.editors:[...e.editors,o]},registerEditorPopup:(e,t)=>{const{uniqid:n,view:r}=t.payload;e.editors=[...e.editors.map(A=>A.uniqid===n?{...A,popup:!0,view:r}:A)]},flushEditorPopup:(e,t)=>{const{uniqid:n}=t.payload;e.editors=[...e.editors.map(r=>r.uniqid===n?{...r,popup:!1}:r)]},setEditorPosition:(e,t)=>{const{uniqid:n,position:r}=t.payload;e.editors=[...e.editors.map(A=>A.uniqid===n?{...A,position:r}:A)]},flushEditor:(e,t)=>{const{uniqid:n}=t.payload;e.editors=[...e.editors.filter(r=>r.uniqid!==n)]},flushAllEditor:e=>{window.dispatchEvent(new Event("WidgetEditorFlushAll")),e.editors.length=0}}});const Mc={success:"green",error:"red",warning:"yellow"};function Qo(e){return String(e).padStart(2,"0")}function XF(e,t){return`${e}${{10:"1a",20:"33",30:"4d",40:"66",50:"80",60:"99",70:"b3",80:"cc",90:"e6"}[t]}`}const fo={isValid:cE,rgb:(e,t,n)=>({toHex:()=>({string:()=>"#"+Qo(e.toString(16))+Qo(t.toString(16))+Qo(n.toString(16))}),toHsb:()=>({values:()=>Qs(e,t,n),hue:()=>Qs(e,t,n)[0],staturation:()=>Qs(e,t,n)[1],brightness:()=>Qs(e,t,n)[2]})}),hsl:(e,t,n)=>({toHex:()=>({values:()=>op(e,t,n),string:()=>{const r=op(e,t,n);return"#"+r[0]+r[1]+r[2]}})}),hsb:(e,t,n)=>({toRgb:()=>({values:()=>Os(e,t,n),red:()=>Os(e,t,n)[0],green:()=>Os(e,t,n)[1],blue:()=>Os(e,t,n)[2]})}),hex:e=>({toRgbaColor:t=>`rgba(${String(Gn(e).r).padStart(2,"0")},${String(Gn(e).g).padStart(2,"0")},${String(Gn(e).b).padStart(2,"0")},${String(t)})`,toRgbColor:()=>`rgb(${String(Gn(e).r).padStart(2,"0")},${String(Gn(e).g).padStart(2,"0")},${String(Gn(e).b).padStart(2,"0")})`,toRgb:()=>({values:()=>Gn(e),red:()=>Gn(e).r,green:()=>Gn(e).g,blue:()=>Gn(e).b}),toHsl:()=>({values:()=>LA(e),hue:()=>LA(e)[0],saturation:()=>Math.round(LA(e)[1]),luminance:()=>Math.round(LA(e)[2]),string:()=>{const t=LA(e);return"hsl("+t[0]+","+Math.round(t[1])+"%,"+Math.round(t[2])+"%)"}})})},GF=e=>{const t=e.replace("#","");return parseInt(t,16)>16777215/2?"black":"white"},VF=e=>{const t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),A=parseInt(t.substring(4,6),16);return(n*299+r*587+A*114)/1e3>=125?"black":"white"};function cE(e){return String(e).startsWith("#")&&String(e).length>=4&&String(e).length<=7}const Hf=e=>parseInt(e,16),Gn=e=>({r:Hf(e.substring(1,3)),g:Hf(e.substring(3,5)),b:Hf(e.substring(5,7))}),KF=function(e,t){try{if(t<-1||t>1||e[0]!=="#"||e.length!==4&&e.length!==7)return;let n=e.slice(1);n.length==3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=n.match(new RegExp("[0-9a-fA-F]{2}","g"));return r?.length!==3?void 0:r.map(A=>{const i=parseInt(A,16),o=t<0?i:255-i,a=Math.ceil(o*t);return(i+a).toString(16).toUpperCase().padStart(2,"0")}).reduce((A,i)=>`${A}${i}`,"#")}catch{return}},Os=(e,t,n)=>{const r=i=>(i+e/60)%6,A=i=>n*(1-t*Math.max(0,Math.min(r(i),4-r(i),1)));return[Math.round(255*A(5)),Math.round(255*A(3)),Math.round(255*A(1))]},Qs=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),A=r-Math.min(e,t,n),i=A===0?0:A&&r===e?(t-n)/A:r===t?2+(n-e)/A:4+(e-t)/A;return[Math.round(60*(i<0?i+6:i)),Math.round(r&&A/r*100),Math.round(r*100)]},LA=e=>{let t=0,n=0,r=0;e.length==4?(t="0x"+e[1]+e[1],n="0x"+e[2]+e[2],r="0x"+e[3]+e[3]):e.length==7&&(t="0x"+e[1]+e[2],n="0x"+e[3]+e[4],r="0x"+e[5]+e[6]),t/=255,n/=255,r/=255;const A=Math.min(t,n,r),i=Math.max(t,n,r),o=i-A;let a=0,l=0,c=0;return o==0?a=0:i==t?a=(n-r)/o%6:i==n?a=(r-t)/o+2:a=(t-n)/o+4,a=Math.round(a*60),a<0&&(a+=360),c=(i+A)/2,l=o==0?0:o/(1-Math.abs(2*c-1)),l=+(l*100).toFixed(1),c=+(c*100).toFixed(1),[a,l,c]};function op(e,t,n){t/=100,n/=100;const r=(1-Math.abs(2*n-1))*t,A=r*(1-Math.abs(e/60%2-1)),i=n-r/2;let o=0,a=0,l=0;return 0<=e&&e<60?(o=r,a=A,l=0):60<=e&&e<120?(o=A,a=r,l=0):120<=e&&e<180?(o=0,a=r,l=A):180<=e&&e<240?(o=0,a=A,l=r):240<=e&&e<300?(o=A,a=0,l=r):300<=e&&e<360&&(o=r,a=0,l=A),[Qo(Math.round((o+i)*255).toString(16)),Qo(Math.round((a+i)*255).toString(16)),Qo(Math.round((l+i)*255).toString(16))]}const dE=e=>{const t=e.indexOf(",")>-1?",":" ",n=e.substring(4).split(")")[0]?.split(t)??[],r=[0,0,0];for(let g=0;g<n.length&&g<3;g++){const p=n[g].trim();p.indexOf("%")>-1?r[g]=Math.round(+p.substring(0,p.length-1)/100*255):r[g]=+p}const A=r[0]/255,i=r[1]/255,o=r[2]/255,a=Math.min(A,i,o),l=Math.max(A,i,o),c=l-a,d=0;let u=0,f=0;return f=(l+a)/2,u=c==0?0:c/(1-Math.abs(2*f-1)),u=+(u*100).toFixed(1),f=+(f*100).toFixed(1),[d,u,f]},uE="^#(?:[A-Fa-f0-9]{3}){1,2}$",fE="^rgb\\(\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*,\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*,\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*\\)$|^rgb\\(\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*\\)$",gE="^hsl\\(\\s*(3[0-5][0-9]|360|[12]?\\d{1,2})\\s*,\\s*(100(?:\\.0+)?|\\d{1,2}(?:\\.\\d+)?)%\\s*,\\s*(100(?:\\.0+)?|\\d{1,2}(?:\\.\\d+)?)%\\s*\\)$",hE=e=>{const t=new RegExp(uE),n=new RegExp(fE),r=new RegExp(gE),A=t.test(e)?LA(e):n.test(e)?dE(e):r.test(e)&&r.exec(e)?.slice(1);let i="";return A&&A[2]&&parseInt(A[2])>50?i="hsl("+A[0]+","+A[1]+"%,"+(parseInt(A[2])-10)+"%)":(A&&A[2]&&parseInt(A[2])<50||A&&A[2]&&parseInt(A[2])===50)&&(i="hsl("+A[0]+","+A[1]+"%,"+(parseInt(A[2])+10)+"%)"),i},qF=e=>{const t=new RegExp(uE),n=new RegExp(fE),r=new RegExp(gE),A=t.test(e)?LA(e):n.test(e)?dE(e):r.test(e)&&r.exec(e)?.slice(1);return A?+A[2]:-1},JF=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),Ro=e=>Math.round(e).toString(16).padStart(2,"0"),YF=({r:e,g:t,b:n},r)=>`#${Ro((1-r)*e)}${Ro((1-r)*t)}${Ro((1-r)*n)}`,ZF=({r:e,g:t,b:n},r)=>`#${Ro(e+(255-e)*r)}${Ro(t+(255-t)*r)}${Ro(n+(255-n)*r)}`,_F=(e,t)=>YF(Gn(e),t),$F=(e,t)=>ZF(Gn(e),t),eL=Object.freeze(Object.defineProperty({__proto__:null,HSBToRGB:Os,RGBToHSB:Qs,brightness:qF,colorContrast:hE,colorTransparency:XF,colorimetry:fo,getContrast50:GF,getContrastYIQ:VF,getDarkShade:_F,getLightShade:$F,hexToHSL:LA,hexToRgb:Gn,hlsToHex:op,isValidHexColor:cE,modifyColorBrightness:KF,rgbToHex:JF},Symbol.toStringTag,{value:"Module"})),tL=["grey0","grey1","grey2","grey3","grey4","grey5","grey6"],nL=["black","black10","black15","black20","white","transparent","transparentHexa"],rL=["headerColor","headerTextColor","headerUserBackground","headerUserTextColor","headerSearchBarTextColor","headerSearchBarBackgroundColor","navBackground","navTextColor"],AL=["lavender","navy","overseas","night1","night2","sky","sand","yellow"],iL=["primary","secondary","green","red"],pE=e=>{const t=fo.hex(e).toHsl();return{light:fo.hsl(t.hue(),t.saturation(),95).toHex().string(),medium:fo.hsl(t.hue(),t.saturation(),90).toHex().string(),base:e,strong:fo.hsl(t.hue(),t.saturation(),t.luminance()-5).toHex().string(),dark:fo.hsl(t.hue(),t.saturation()!==0?50:0,30).toHex().string()}},zn=(e,t)=>{const n=pE(t);return{[`${e}Light`]:n.light,[`${e}Medium`]:n.medium,[e]:n.base,[`${e}Strong`]:n.strong,[`${e}Dark`]:n.dark}},mE={linkColor:"#392994",buttonColor:"#7364E3",forest:"#0D846B",headerTextColor:"",headerUserBackground:"",headerUserTextColor:"",headerSearchBarTextColor:"#2f373f",navBackground:"#ffffff",navTextColor:"#4A4A52",bgColorNotLogged:""},oL=(e=mE)=>{const t=zn("primary",e.buttonColor),n=zn("secondary",e.linkColor),r=zn("green","#0D846B"),A=zn("red","#E12B43"),i=zn("lavender","#8F7CEA"),o=zn("navy","#131E4B"),a=zn("overseas","#392994"),l=zn("night1","#2B3870"),c=zn("night2","#10162D"),d=zn("sky","#9CC9FF"),u=zn("sand","#FFEED7"),f=zn("yellow","#FFBB54");return{...t,...n,...r,...A,...i,...o,...a,...l,...c,...d,...u,...f,grey6:"#2E2E33",grey5:"#4A4A52",grey4:"#747487",grey3:"#BEBED1",grey2:"#DADAF0",grey1:"#EFEFFF",grey0:"#F8F8FF",black:"#000000",black10:"#00000019",black15:"#00000026",black20:"#00000033",white:"#FFFFFF",transparent:"transparent",transparentHexa:"#ffffff00",headerColor:e.headerColor??"",headerTextColor:e.headerTextColor,headerUserBackground:e.headerUserBackground,headerUserTextColor:e.headerUserTextColor,headerSearchBarTextColor:e.headerSearchBarTextColor,headerSearchBarBackgroundColor:e?.headerSearchBarBackgroundColor??(e?.headerColor?hE(e.headerColor):"#313941"),navBackground:e.navBackground,navTextColor:e.navTextColor}},sL=Object.freeze(Object.defineProperty({__proto__:null,buildPalette:oL,buildPaletteObject:zn,defaultColors:mE,getColorPalette:pE,paletteColorsGreys:tL,paletteColorsPlatform:rL,paletteColorsPrimary:iL,paletteColorsSecondary:AL,paletteColorsUtils:nL},Symbol.toStringTag,{value:"Module"})),tr=Object.freeze(Object.defineProperty({__proto__:null,color:eL,palette:sL},Symbol.toStringTag,{value:"Module"})),{buildPalette:aL,defaultColors:lL}=tr.palette;function Ei(e,t){return t in e.color?e.color[t]:t}const Hc={config:void 0,get:function(){return this.config?this.config:this.initTheme()},initTheme:function(e=lL){const t=aL(e);return this.config={dpr:Math.ceil(window?.devicePixelRatio||2),fallbackUrl:{article:"/imagestatic/30x30/icons/article.png"},font:{family:e?.fontFamily?`'${e.fontFamily}', sans-serif`:"'Poppins', sans-serif",color:t.grey5,hrefColor:t.secondary,size:"16px",lineHeight:"1.5em",weight:{light:300,normal:400,medium:500,semiBold:600,bold:700}},color:{...t},zIndex:{toaster:1e6,forceTop:1e5,tooltip:50030,tinyMCEModal:50020,modal:1100,dropdown:1e3,sidePanelModal:5,fullScreenContainer:3,dropdownModal:10,dropDownModalIcon:11},space:{xs:4,sm:8,md:16,l:24,xl:32},size:{xs:4,sm:8,md:16,l:24,xl:32}},this.config}},cL=JSON.parse(`{"ACTIVITY_Can_Not_comment_Desc":"You cannot comment on this content. Several reasons are possible:<p>- You are not part of the audience of the content</p><p>- You do not have sufficient rights according to the group settings</p><p>- A solar storm creates interference (less likely, but you never know)","ADD_FAVORITE":"Add to favorites","APP_Animated_Meeting":"Diapazone","APP_Bookmark_Bookmarks":"favorites","APP_FileIntegrity_Quarantine_Files_Message":"{ count } file(s) in quarantine","APP_SurveyDate":"Sondage de date","APP_SurveyDate_Over":"The survey is closed","ARTICLE_Nb_Elements":"Documents","ARTICLE_Nb_Selected_Elements":"Elements sélectionés","ATTACHMENTS_No_Download":"No download","ATTACHMENTS_Preview_Successfully_Recomputed":"Preview successfully recomputed","ATTACHMENTS_Recompute_Preview":"Recompute preview","ATTACHMENTS_See_Downloads":"See downloads","AUDIENCE_GROUPS_AND_USERS":"{groups} group(s) and {users} users(s)","AUDIENCE_GROUPS_ONLY":"{groups} group(s)","AUDIENCE_ONLY_ME":"Only me","AUDIENCE_USERS_ONLY":"{users} user(s)","AppLeftColumn_App_Navigation":"Application navigation menu","AppLeftColumn_Close_Panel":"Reduces the size of the menu","AppLeftColumn_Open_Panel":"Expands the menu","BUTTON_Title_Add_Image":"Add image","BUTTON_Title_Add_New_Task":"Add new task","BUTTON_Title_Add_Uri":"Add link to task","BUTTON_Title_Open_Edit_Panel":"Button that open the edit panel","BUTTON_Title_Open_Remove_Widget":"Button that remove the widget entirely","BUTTON_Title_Remove_Item":"Remove task","BUTTON_Title_Remove_Uri":"Remove link","CALENDAR_All_Day":"All day","CALENDAR_Answer":"Répondre","CALENDAR_BoardCard":"Board card","CALENDAR_Delete_Confirmation_Recurrent":"Do you want to delete the whole series?","CALENDAR_Event":"Evénement","CALENDAR_Event_Date":"Le {date}, {time}","CALENDAR_Event_Date_All_Day":"Le {date}","CALENDAR_Event_Date_Start_End":"Du {dateStart}, {timeStart} au {dateEnd}, {timeEnd}","CALENDAR_Event_Date_Start_End_All_Day":"Du {dateStart} au {dateEnd}","CALENDAR_Event_Date_Start_End_Same_Day":"Le {dateStart}, de {timeStart} à {timeEnd}","CALENDAR_Event_Date_Start_End_Same_Day_All_Day":"Le {dateStart}","CALENDAR_Event_Recurrence":"Recurrence","CALENDAR_Event_Recurrence_Daily":"Tous les jours","CALENDAR_Event_Recurrence_Monthly":"Tous les {day} du mois","CALENDAR_Event_Recurrence_Until":"jusqu'au {date}","CALENDAR_Event_Recurrence_UntilField":"Until","CALENDAR_Event_Recurrence_Weekly":"Tous les {day}","CALENDAR_Event_Recurrence_Yearly":"Tous les {date}","CALENDAR_Event_Remaining_Seats":"places restantes","CALENDAR_Event_Report":"Compte rendu","CALENDAR_Event_Revive":"Relancer","CALENDAR_Event_Revive_All":"Tous","CALENDAR_Event_Revive_Available":"Participant(s)","CALENDAR_Event_Revive_Message_Description":"Quel message souhaitez vous envoyer ?","CALENDAR_Event_Revive_Message_Label":"Message","CALENDAR_Event_Revive_On_Spot":"En présentiel","CALENDAR_Event_Revive_Select_Description":"Qui souhaitez vous relancer ?","CALENDAR_Event_Revive_Unavailable":"Indisponible(s)","CALENDAR_Event_Revive_Visio":"En distanciel","CALENDAR_Event_Revive_Waiting":"En attente","CALENDAR_Event_Visio_Url":"Rejoindre la web conférence","CALENDAR_Join":"Je participe","CALENDAR_Meeting":"Meeting","CALENDAR_Recurrent_Event_Warning":"This is a recurring event. Changes will apply to all events in the series.","CALENDAR_Reject":"Je ne participe pas","CALENDAR_Status_Available":"Vous participez","CALENDAR_Status_OnSpot":"En présentiel","CALENDAR_Status_Unavailable":"Vous ne participez pas","CALENDAR_Status_Unknown":"En attente","CALENDAR_Status_Visio":"En distanciel","CALENDAR_Today":"Today","CALENDAR_Update_Confirmation_Recurrent":"Do you want to update the whole series?","CALENDAR_Widget_Editor_View":"View","CALENDAR_Widget_View_Month":"Month","CALENDAR_dayGridMonth":"Month","CALENDAR_listWeek":"List","CALENDAR_timeGridDay":"Day","CALENDAR_timeGridWeek":"Week","CLIPBOARD_Copy_Success":"Copied to clipboard","COLOR_PICKER_recent_colors":"Recent colors","COMMENT_Add_Comment":"Add comment","COMMENT_Add_Widget":"Add widget","COMMENT_Answer":"Answer","COMMENT_Choose_Response":"Choose","COMMENT_Chosen_Response":"Chosen response","COMMENT_Comments":"comment(s)","COMMENT_Delete_Comment":"Delete comment ?","COMMENT_Display_More":"Display more comments","COMMENT_Just_Now":"just now","COMMENT_Last_Comment":"Last comment","COMMENT_Minutes_Ago":"{minutes} minutes ago","COMMENT_No_Comment":"No comment...","COMMENT_Placeholder":"Write a comment","COMMENT_Unselect_Response":"Unselect response","COMMENT_WIDGET_CHECKLIST_Add_New_Task":"Add new task","COMMENT_WIDGET_CHECKLIST_Add_Uri":"Add an uri","COMMENT_WIDGET_CHECKLIST_New_Task":"New task","COMMENT_WIDGET_CHECKLIST_Title":"Title","COMMENT_WIDGET_CHECKLIST_Uri_Link":"Button link","COMMENT_WIDGET_CHECKLIST_Uri_New_Page":"New page","COMMENT_WIDGET_CHECKLIST_Uri_Same_Page":"Same page","COMMENT_WIDGET_CHECKLIST_Uri_Target":"open","COMMENT_WIDGET_Configure":"Configure","COMMENT_WIDGET_Delete_Widget":"Delete comment ?","CONTACT_Pro_Members":"Business Contacts","CROP_Crop":"Crop","CROP_Rotate_Left":"Rotate left","CROP_Rotate_Right":"Rotate Right","CROP_Title":"Crop the image","CRPT_Add_Report":"Report content","CRPT_Comment_Of":"Comment of","CRPT_Report_Description_Required":"La description est obligatoire","CRPT_Report_Sent":"Report sent","DND_ADD_SECTION":"+ Add section","DND_EMPTY_STATE":"No items to display","DND_LIST_TITLE":"Items","DND_NEW_SECTION_LABEL":"New Section","DND_SECTIONS_TITLE":"Sections","DND_STACK_TITLE":"Active Buttons","DRIVE_Access_Denied":"Vous n'avez pas accès à ces documents.","DRIVE_Google_Not_Available":"This service is temporarily unavailable. Our team is currently working on a solution. We apologize for the inconvenience.","DRIVE_Input_Search_Group_Item":"Rechercher parmis les dossiers et documents","DRIVE_Input_Search_Groupe":"Rechercher un groupe","DRIVE_Is_Empty":"Nous n'avons trouvé aucun documents","DRIVE_MS_Accounts":"Accounts","DRIVE_MS_Default":"Default","DRIVE_MS_Error_Personal_Account":"Personal accounts are not supported","DRIVE_MS_Group_Filters":"Filtres","DRIVE_MS_Group_Filters_All":"Tous les groupes","DRIVE_MS_Group_Filters_Member_Of":"Seulement les groupes ou je suis membre","DRIVE_MS_Logout":"Logout","DRIVE_MS_Need_Login":"Please login to access your files","DRIVE_MS_Other_Account":"Add another account","DRIVE_MS_Set_Default_Account":"Set as default account","DRIVE_Private":"Private","DRIVE_Private_Group":"Ce groupe est privé","DRIVE_Public":"Public","DRIVE_Root":"Microsoft 365","DRIVE_Select_Document":"Sélectionner ce document","DRIVE_Select_Folder":"Sélectionner ce dossier","ERROR404_Msg":"Hum...There is nothing here...","ERROR404_MsgDetail":"This page does not exist, or its content has been deleted. Go back to home?","ERROR404_Wall":"Go back home","ERROR_Mail_Invalid":"Invalid email.","EVENT_Export_Calendar_ICalendar_Format":"Export to iCalendar format","EVENT_ICalendar_Export_Url":"Sync all events","EVENT_ICalendar_Export_Url_Explanation":"Copy url in your mail client","EVENT_ICalendar_Export_Url_Subscribed":"Sync accepted events","EVENT_I_Register":"Je participe","FIELDS_Add_Option":"Add a response","FILE_Existing_Files_Label":"Added files","FILE_Upload_Label":"Drop or select files","FILE_Viewer_Open_With":"Ouvrir avec","FILE_Viewer_Preview":"Aperçu","FOLDER_Nb_Elements":"Documents","GLOBAL_A11Y_APP_NAV":"Menu of the application {appName}","GLOBAL_Action_Missing_License":"🔐 The license of the app is not active on your platform!","GLOBAL_Add":"Add","GLOBAL_Add_File":"Add file","GLOBAL_Add_Image":"Add image","GLOBAL_Add_Video":"Add video","GLOBAL_Alert_Author":"Recevoir une copie","GLOBAL_Animated_Meeting":"Diapazone","GLOBAL_Attachments":"Pièces jointes","GLOBAL_Audience":"Audience","GLOBAL_BACK_PREVIOUS_SECTION":"back to the previous section","GLOBAL_CHECK_BOXES":"Check the boxes","GLOBAL_CHECK_FIRST_BOXE":"It's empty! Check your first tag.","GLOBAL_Cancel":"Cancel","GLOBAL_Close":"Close","GLOBAL_Comments":"Comments","GLOBAL_Confirm":"Confirm","GLOBAL_Continue":"Continue","GLOBAL_Creation_Date":"Creation date","GLOBAL_Creator":"Creator","GLOBAL_DateTime_Placeholder":"Date and time","GLOBAL_Date_Placeholder":"Date","GLOBAL_Day":"Day","GLOBAL_Delete":"Delete","GLOBAL_Delete_Confirm":"Confirm delete","GLOBAL_Delete_Confirmation":"Please confirm suppression","GLOBAL_Documents":"Documents","GLOBAL_Download":"Download","GLOBAL_Downloads":"Downloads","GLOBAL_Draft_Saved":"Sauvegardé le {date}, à {time}","GLOBAL_Draft_Saved_Today":"Sauvegardé à {time}","GLOBAL_Edit":"Edit","GLOBAL_File":"File","GLOBAL_File_Bank":"Document bank","GLOBAL_Files":"Files","GLOBAL_Filter":"Filter","GLOBAL_Folders":"Folders","GLOBAL_Fontawesome":"Font Awesome","GLOBAL_Form_Characters":"characters","GLOBAL_Form_Controls_Date":"Date must be formatted dd/mm/yyyy","GLOBAL_Form_Controls_MaxLength":"Must be {max} characters or less","GLOBAL_Form_Controls_MaxValue":"Must be at max {max}","GLOBAL_Form_Controls_MinLength":"Must be {min} characters or more","GLOBAL_Form_Controls_MinValue":"Must be at least {min}","GLOBAL_Form_Controls_Number":"Must be a number","GLOBAL_Form_Controls_Pattern":"Must follow the specified pattern {pattern}","GLOBAL_Form_Controls_Required":"Required","GLOBAL_Form_Controls_Url":"Invalid url address","GLOBAL_Form_Description":"Les champs obligatoires sont identifiés par un *","GLOBAL_Form_No_Options":"No option","GLOBAL_Form_SendAlert":"Send the alert email to those who have requested it","GLOBAL_Go_To_Content":"Go to content","GLOBAL_Groups":"Groups","GLOBAL_Image":"Image","GLOBAL_Import":"Import","GLOBAL_Insert":"Insert","GLOBAL_Jamespot":"Jamespot","GLOBAL_Load_More":"Load more results","GLOBAL_Loading":"Loading","GLOBAL_Login":"Login","GLOBAL_Move":"Move","GLOBAL_New":"Nouveau","GLOBAL_Next":"Next","GLOBAL_No_Result":"No result","GLOBAL_Object_Link":"Objet lié","GLOBAL_Ok":"OK","GLOBAL_Options":"Options","GLOBAL_Page":"Page","GLOBAL_Platform_Color":"Platform colors","GLOBAL_Previous":"Previous","GLOBAL_Provide_Missing_Token":"A token must be provided to use this widget","GLOBAL_Public_Groups":"Public groups","GLOBAL_Publish":"Publish","GLOBAL_Recommended":"recommended","GLOBAL_Redirect_To_User_Profile_React":"Redirection to the profile page of {username}","GLOBAL_Reset":"Réinitialiser","GLOBAL_Save":"Save","GLOBAL_Save_as_draft":"Save draft","GLOBAL_Schedule":"Schedule","GLOBAL_Schedule_Action":"Schedule","GLOBAL_Scheduled_Date":"Scheduled date","GLOBAL_Search":"Search","GLOBAL_Search_Loading":"Searching...","GLOBAL_See_Less":"See less","GLOBAL_See_More":"See more","GLOBAL_Select":"Select","GLOBAL_Select_Date_In_Calendar":"Select a date in the calendar","GLOBAL_Select_Time":"Select time","GLOBAL_Send_Alert":"Envoyer le mail de notification à ceux qui l’ont demandé","GLOBAL_Sent":"Envoyé","GLOBAL_Settings":"Paramétrer","GLOBAL_Start_typing":"Start typing to search","GLOBAL_Successffully_Deleted":"Successfully deleted","GLOBAL_Today":"Today","GLOBAL_Unsuccessfully_Deleted":"An error occured while deleting your content","GLOBAL_Unsuported_File_Format":"Unsupported file format","GLOBAL_Users":"Users","GLOBAL_Validation":"Confirm","GLOBAL_Video_Player":"Video player","GLOBAL_Yesterday":"Yesterday","Global_Create":"Créer","HIERARCHICAL_TAXONOMY_DESCRIPTION":"Browse and select options by checking the boxes. You can select an unlimited number of options.","HOMEUSER_Home":"Home","INPUT_FILE_ADVANCED_Dropbox":"Dropbox","INPUT_FILE_ADVANCED_FileBank":"Filebank","INPUT_FILE_ADVANCED_Google_Drive":"Google Drive","INPUT_FILE_ADVANCED_File_Too_Large":"File exceeds the maximum allowed size (250 MB)","INPUT_FILE_ADVANCED_Microsoft_365":"Microsoft 365","INPUT_RichText_Html_Modal_Label":"HTML content","INPUT_RichText_Html_Modal_Title":"Edit HTML content","INPUT_SELECT_Expand":"Expand","INPUT_SELECT_Has_Reached_Limit":"You reached the limit of {limit} items","INTRANET_Selection_Group":"Select a group","JIA_TINY_BUTTON_TOOLTIP":"AI features to help you write","JIA_TINY_DEVELOP":"Develop","JIA_TINY_SUMMARIZE":"Summarize","JIA_TINY_TLDR":"TLDR","OfficeHook_Conf_CalDav_Calendar":"Agenda","OfficeHook_Conf_CardDav_Address_Book":"Adress book","OfficeHook_Conf_IMap_Hostname":"Hostname","OfficeHook_Conf_IMap_Mailbox":"Mailbox","OfficeHook_Conf_Password":"Password","OfficeHook_Conf_Prompt_Submit":"Submit","OfficeHook_Conf_Provider":"Provider","OfficeHook_Conf_Select_Connection_Security":"Connection security","OfficeHook_Conf_Select_Provider":"Select a provider","OfficeHook_Conf_Url":"Url","OfficeHook_Conf_Username":"Username","OfficeHook_Settings":"Paramètres généraux","Office_No_Providers":"Aucun fournisseur disponible, contactez un administrateur","Office_Set_Configuration":"Connectez-vous","PANEL_Background_Color":"Couleur du fond","PANEL_Description":"Description","PANEL_Edit_Slide_Background_Color":"Background color","PANEL_Edit_Slide_Background_Opacity_Filter":"Background opacity filter","PANEL_Image_Size":"Taille de l'image","PANEL_Size_Large":"Grand","PANEL_Size_Medium":"Moyen","PANEL_Size_Small":"Petit","PANEL_Text_Color":"Couleur du texte","PANEL_Text_Size":"Taille du texte","PANEL_Title":"Titre","PANEL_Widget_Empty_Setting":"Il n'y a rien à configurer","PANEL_Widget_Extension_Name":"Nom de l'extension","PANEL_Widget_Level":"Niveau d'affichage","PANEL_Widget_Selection":"Style & décorations","PANEL_Widget_Settings":"Configuration du widget","PANEL_Widget_Synchronize":"Synchronisation","PANEL_Widget_Text":"Ajouter du texte","PANEL_Widget_Url":"Copier l'url du widget","PLUGIN_Manager_CalDav_Prompt":"Tester la connexion CalDav","PLUGIN_Manager_CardDav_Prompt":"Tester la connexion CardDav","PLUGIN_Manager_Connection_Error":"Connexion impossible. Vérifiez vos identifiants","PLUGIN_Manager_IMap_Prompt":"Tester la connexion IMAP","POLL_See_Response_After":"Hidden answers","POWERED_BY":"Powered by","POWERED_BY_Link":"https://www.jamespot.com/","POWERED_BY_See_More":"Know more","PUBLISH_To":"Publish for","REMOVE_FAVORITE":"Remove from favorites","SEARCH_File":"Search file","SLIDER_IMAGE_Empty_Des":"Ajoutez une image pour illustrer votre widget !","SOCIALPOLL_Anonymous":"Anonymous answers","SPOTIT_Receive_A_Copy":"Receive a copy","SPOTLIGHT_Send_Alert_To_Subscribers":"Send notification mail to those who have requested it","STYLE_Background_Color":"Couleur de fond","STYLE_Border_Style":"Style de bordure","STYLE_Border_Style_Dashed":"Bordure discontinue","STYLE_Border_Style_Dotted":"Bordure en pointillés","STYLE_Border_Style_None":"Aucune bordure","STYLE_Border_Style_Solid":"Bordure continue","STYLE_Border_Width":"Taille de la bordure","STYLE_Box_Shadow":"Ombre portée","STYLE_Font_Weight":"Epaisseur du texte","STYLE_Font_Weight_Bold":"Bold","STYLE_Font_Weight_Medium":"Medium","STYLE_Font_Weight_Normal":"Normal","STYLE_Font_Weight_Semi_Bold":"Semi bold","STYLE_Line_Height":"Hauteur de ligne","STYLE_Padding":"Marge interne","STYLE_Position":"Position","STYLE_Position_Bottom_Center":"Position bas centre","STYLE_Position_Bottom_Left":"Position bas gauche","STYLE_Position_Bottom_Right":"Position bas droite","STYLE_Position_Center":"Position centre","STYLE_Position_Center_Left":"Position centre gauche","STYLE_Position_Center_Right":"Position centre droite","STYLE_Position_Top_Center":"Position haut centre","STYLE_Position_Top_Left":"Position haut gauche","STYLE_Position_Top_Right":"Position haut droite","STYLE_Radius":"Arrondi","STYLE_Text_Align":"Alignement du texte","STYLE_Text_Align_Center":"Center","STYLE_Text_Align_Justify":"Justify","STYLE_Text_Align_Left":"Left","STYLE_Text_Align_Right":"Right","STYLE_Text_Color":"Couleur du texte","STYLE_Text_Size":"Taille du texte","TINY_MCE_Insert_Markdown":"Insert Markdown","TINY_MCE_Markdown_Shortcuts":"Markdown shortcuts","WIDGET_Agenda":"Agenda","WIDGET_Agenda_Accepted":"You participate","WIDGET_Agenda_Declined":"You don't participate","WIDGET_Agenda_Pending":"You haven't responded yet","WIDGET_Builder":"Widget Builder","WIDGET_Button_Empty_Text":"Ajouter un label","WIDGET_CALENDAR":"Calendar","WIDGET_Calendar_CalDav":"Office Agenda","WIDGET_Calendar_Group_Events":"Group","WIDGET_Calendar_Last_Events":"List","WIDGET_Cannot_Display":"A widget is available but cannot be displayed here for now... ({widget})","WIDGET_Check_List_Description":"Add a checklist to keep track of progress","WIDGET_Check_List_Help":"Collaboration mode allows users with access to this widget to modify it","WIDGET_Collaboration":"Collaboration","WIDGET_Contact_CardDav":"Office Contacts","WIDGET_Contacts":"Contacts","WIDGET_Cover_Add_Image_Button_Label":"Ajouter une image","WIDGET_Cover_Add_Button_Label":"Ajouter un bouton","WIDGET_Cover_Button_Background_Color_Label":"Couleur du bouton","WIDGET_Cover_Button_Default_Label":"Bouton","WIDGET_Cover_Button_Size_Label":"Taille","WIDGET_Cover_Button_Target_Label":"Ouverture","WIDGET_Cover_Filter_Color_Label":"Couleur du filtre","WIDGET_Cover_Filter_Opacity_Label":"Opacité du filtre","WIDGET_Cover_Link_Url_Label":"Url","WIDGET_Cover_Update_Image_Button_Label":"Modifier l'image","WIDGET_Datasource_Cancel":"Annuler","WIDGET_Datasource_Excel_Broken_Model":"Les premières cellules de vos colonnes ne peuvent pas être vide. Corrigez votre fichier pour mettre à jour votre widget. ","WIDGET_Datasource_Object":"Source de donnée","WIDGET_Datasource_Select_Document":"Sélectionner depuis la banque documentaire","WIDGET_Datasource_Select_Wedoc_File":"Sélectionner depuis wedoc","WIDGET_Datasource_Spreadsheet_Header_Error":"Cette feuille contient au moins une colonne sans titre","WIDGET_Display_Level_1":"Icône","WIDGET_Display_Level_2":"Icône + Pastille","WIDGET_Display_Level_3":"Contenus","WIDGET_Display_Level_4":"Contenus + Interactions","WIDGET_Display_Level_Select":"Sélectionner un mode d'affichage","WIDGET_Email_IMAP":"Office Mails","WIDGET_Lucca_Absence":"Absence (Timmi)","WIDGET_Lucca_Absence_No_Result":"Aucun resultat","WIDGET_Lucca_Absence_Text":"Affichez les absents renseignés depuis votre outil RH Timmi pour une meilleure communication interne.","WIDGET_Lucca_Absence_Url":"Url","WIDGET_Lucca_Absence_Url_Error":"Une erreur s'est produite","WIDGET_Lucca_Absent_Until":"Absent jusqu'au","WIDGET_Lucca_Absent_Until_Today":"Absent jusqu'a aujourd'hui","WIDGET_Lucca_Absent_Until_Tomorrow":"Absent jusqu'a demain","WIDGET_Panel_Tpl_Warning_Message":"Il n'est pas possible de configurer ce widget en mode template","WIDGET_Presence_Availability":"{max} places disponibles","WIDGET_Presence_Is_Closed":"Il n'est plus possible de répondre à ce sondage","WIDGET_Presence_Limit":"Limiter le nombre de places","WIDGET_Presence_Limit_Response_Error":"Il n y a plus de place disponible","WIDGET_Presence_Limit_Value":"Présence maximum","WIDGET_Prompt_Dropdown":"Configurer","WIDGET_Prompt_Logout":"Se déconnecter","WIDGET_Quick_Survey":"Add a survey to collect feedback","WIDGET_Quick_Survey_Reset":"Reset the survey answers","WIDGET_Quick_Survey_Text":"Add a survey to collect feedback","WIDGET_Quick_Survey_isStarted":"The survey has already some answers, you can't make any change to it, if you need to, please reset the survey.","WIDGET_Quick_Survey_isStarted_no_modification":"The survey has already some answers, some modifications are not possible, if needed, please start a new survey.","WIDGET_Set_Widget":"Configurer","WIDGET_Slider_Autoplay":"Défilement automatique","WIDGET_Slider_Delay":"Délai de défilement","WIDGET_Survey_After_Help":"Respondents will only see the results once after they respond. They will no longer be able to edit their answer.","WIDGET_Survey_Anonymize_Help":"Les réponses de ce sondage seront anonymes : personne ne pourra savoir qui a répondu quoi, seulement les pourcentages.","WIDGET_Survey_Close_Survey":"Close the survey","WIDGET_Survey_Close_Survey_Description":"do you really want to finish this survey?","WIDGET_Survey_Closing":"Enable closing","WIDGET_Survey_Closing_Help":"Display closing button","WIDGET_Survey_Date_Add_Event":"Ajouter","WIDGET_Survey_Date_Label":"{label} {day} à {time}","WIDGET_Survey_Date_Participant_At":"Participants le {date}","WIDGET_Survey_Date_Revive":"Relancer les participants","WIDGET_Survey_Date_Revive_All":"Tous les participants","WIDGET_Survey_Date_Revive_Message":"Message de relance","WIDGET_Survey_Date_Revive_Confirm":"Relancer","WIDGET_Survey_Date_Revive_User_With_No_Response":"Les participants sans réponse","WIDGET_Survey_Date_Stats":"{totalResponse}/{totalRespondents} personnes ont répondu ({percent}%)","WIDGET_Survey_Date_End_At":"Fin le {dateEnd}","WIDGET_Survey_Multiple":"Multiple response","WIDGET_Survey_Multiple_Help":"Allow multiple responses","WIDGET_Survey_Open":"Open survey","WIDGET_Survey_Open_Help":"Allows other users to add suggestion","WIDGET_Text_Use_Flex_Label":"Disposition flexible","WIDGET_User_Profil":"Profil utilisateur","WIDGET_User_Profil_Display_Mode_Label":"Affichage du nom","WIDGET_User_Profil_Font_Weight_Label":"Gras","WIDGET_User_Profil_Only_Picture":"Image seule","WIDGET_User_Profil_Picture_Alt_Label":"Image de l'utilisateur","WIDGET_User_Profil_Picture_FirstName":"Avec prénom","WIDGET_User_Profil_Picture_FirstName_LastName":"Avec prénom + nom","WIDGET_User_Profil_Text":"Permettez à vos utilisateur un accès vers leur propre profil en un clic ! Idéal pour les encourager à le compléter. ","WIDGET_User_Profil_Text_Max_Length_Description":"Maximum 30 caractères","WIDGET_User_Profil_Tooltip_Link_Text":"Accéder à votre profil","WIDGET_Welcome":"Message d'accueil","WIDGET_Welcome_Default_Message":"Bienvenue","WIDGET_elcome_Linebreak_Label":"Saut de ligne (après le message)","GLOBAL_Reorder":"Reorder","WIDGET_Welcome_Linebreak_Label":"Saut de ligne (après le message)"}`),dL={en:cL};function vE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _a={exports:{}},ds={};var Ib;function uL(){if(Ib)return ds;Ib=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,A,i){var o=null;if(i!==void 0&&(o=""+i),A.key!==void 0&&(o=""+A.key),"key"in A){i={};for(var a in A)a!=="key"&&(i[a]=A[a])}else i=A;return A=i.ref,{$$typeof:e,type:r,key:o,ref:A!==void 0?A:null,props:i}}return ds.Fragment=t,ds.jsx=n,ds.jsxs=n,ds}var us={};var Tb;function fL(){return Tb||(Tb=1,process.env.NODE_ENV!=="production"&&(function(){function e(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===F?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case w:return"Fragment";case C:return"Profiler";case b:return"StrictMode";case E:return"Suspense";case D:return"SuspenseList";case Q:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case v:return"Portal";case y:return S.displayName||"Context";case x:return(S._context.displayName||"Context")+".Consumer";case B:var M=S.render;return S=S.displayName,S||(S=M.displayName||M.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case I:return M=S.displayName||null,M!==null?M:e(S.type)||"Memo";case T:M=S._payload,S=S._init;try{return e(S(M))}catch{}}return null}function t(S){return""+S}function n(S){try{t(S);var M=!1}catch{M=!0}if(M){M=console;var V=M.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return V.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),t(S)}}function r(S){if(S===w)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===T)return"<...>";try{var M=e(S);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function A(){var S=U.A;return S===null?null:S.getOwner()}function i(){return Error("react-stack-top-frame")}function o(S){if(z.call(S,"key")){var M=Object.getOwnPropertyDescriptor(S,"key").get;if(M&&M.isReactWarning)return!1}return S.key!==void 0}function a(S,M){function V(){Z||(Z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}V.isReactWarning=!0,Object.defineProperty(S,"key",{get:V,configurable:!0})}function l(){var S=e(this.type);return J[S]||(J[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function c(S,M,V,N,j,G){var X=V.ref;return S={$$typeof:p,type:S,key:M,props:V,_owner:N},(X!==void 0?X:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:l}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function d(S,M,V,N,j,G){var X=M.children;if(X!==void 0)if(N)if(k(X)){for(N=0;N<X.length;N++)u(X[N]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(X);if(z.call(M,"key")){X=e(S);var O=Object.keys(M).filter(function(se){return se!=="key"});N=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",L[X+N]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
120
|
+
</display>`}}),t.length>0&&(t=`<displays type="${e.idApp}">${t}</displays>`),t}function rF(e,t){switch(t.type){case ve.TITLE:return"title";case ve.SENDALERTTOSUBSCRIBERS:return"sendAlert";case ve.RECEIVEACOPY:return"alertAuthor";case ve.PUBLISHTO:return"publishTo";case ve.USER:return"idUser";case ve.CREATIONDATE:return"dateCreation";case K.DESCRIPTION:return"description";default:return Lm(e)}}function AF(e,t){let n="";const r=rF(e,t);if(t.isLockedValue){const A={ref:r,fixedValue:t.value};if(n+=`<html><![CDATA[ <!-- <JAMESPOT.STUDIO.FIXED>${JSON.stringify(A)}</JAMESPOT.STUDIO.FIXED> -->`,t.type===ve.PUBLISHTO){const i=t.value.map(o=>o.uri).join(",");n+=`<input type="hidden" name="publishTo" value="${i}">`}else if(t.type===ve.USER||t.type===K.USERLINK||t.type===K.CONTENTLINK)n+=`<input type="hidden" name="${r}[]" value=${JSON.stringify(t.value.uri)}>`;else if(t.type===K.SELECT)t.properties.find(i=>i.propertyType===Xe.OPTIONS_EDITOR)?.value.canSelectMultiple?t.value.forEach(i=>{n+=`<input type="hidden" name="${r}[]" value="${i.value}">`}):n+=`<input type="hidden" name="${r}" value="${t.value.value}">`;else if(t.type===K.CHECKBOX)t.value.forEach(i=>{n+=`<input type="hidden" name="${r}[]" value="${i}">`});else if(t.type===K.DATE){const i=new Date(t.value),o=[si(i.getDate()),si(i.getMonth()+1),i.getFullYear()].join("/");n+='<input type="hidden" name="'+r+'" value="'+o+'">'}else if(t.type===K.DATETIME){const i=new Date(t.value),o=`${[si(i.getDate()),si(i.getMonth()+1),i.getFullYear()].join("/")} ${si(i.getHours())}:${si(i.getMinutes())}:${si(i.getSeconds())}`;n+='<input type="hidden" name="'+r+'" value="'+o+'">'}else t.type===K.TAGS?n+=`<input type="hidden" name="${r}" value="${t.value?.map(i=>i.uri)?.join(",")}">`:t.type===K.DESCRIPTION||t.type===K.TEXTAREAHTML?n+=`<input type="hidden" name="${r}" value="${t.value}">`:t.type===ve.RECEIVEACOPY?t.value&&(n+='<input type="hidden" name="alertAuthor[jamespot]"><input type="hidden" ng-model="form.alertAuthor" name="alertAuthor[]" value="1">'):t.type===ve.SENDALERTTOSUBSCRIBERS?t.value&&(n+='<input type="hidden" name="sendAlert[jamespot]"><input type="hidden" ng-model="form.sendAlert" name="sendAlert[]" value="1">'):n+=`<input type="hidden" name="${r}" value="${t.value}">`;n+="]]></html>"}else switch(t.type){case K.CODEHTML:{const A={id:e,name:e,properties:{code:t.value}};n+=`<html><![CDATA[ <!-- <JAMESPOT.STUDIO.CODEHTML>${JSON.stringify(A)}</JAMESPOT.STUDIO.CODEHTML><JAMESPOT.STUDIO.FIELD_POS>${t.pos}</JAMESPOT.STUDIO.FIELD_POS>-->${t.value}]]></html>`;break}case K.IMAGE:n+="<image />";break;case ve.PUBLISHTO:n+="<publishTo />";break;default:n+="<attr name='"+r+"' />";break}return n}function si(e){return e<10?"0"+e:e}const $B={"create-popup":"popup",create:"create",edit:"edit",display:"view",displayDisabled:"view"},Cb=["title","alertAuthor","sendAlert"],iF=["edito"];function oF(e,t,n){return Object.assign({},...Rm.map(r=>{const A={};let i=[];yo[r]?.optional!==void 0&&(i=i.concat(yo[r]?.optional??[]));let o=[];yo[r]?.fixed!==void 0&&(o=o.concat(yo[r]?.fixed??[])),Object.entries(e[r]).forEach(([d,u])=>{u.isFixed&&(A[d]=u,o.splice(o.findIndex(f=>f===u.type),1)),u.isOptional&&(A[d]=u,i.splice(i.findIndex(f=>f===u.type),1))});const a=new Set(o.concat(i)),l={[ve.CREATIONDATE]:()=>oE(!1),[ve.TITLE]:()=>Lc({fixedValue:void 0}),[ve.USER]:()=>iE(!1),[ve.RECEIVEACOPY]:()=>nE({fixedValue:void 0}),[ve.SENDALERTTOSUBSCRIBERS]:()=>rE({fixedValue:void 0}),[ve.PUBLISHTO]:()=>AE({fixedValue:void 0})};a.forEach(d=>{const u=l[d];if(u){const[f,g]=u();A[f]=g}else console.error("ExtraAppFieldsItemViews does not have this field type: "+d)});const c=[];return n.forEach((d,u)=>{const f=d.views[r],g=Object.keys(e[r]).includes(d.id),p=d.type;if(jm.get(p)?.includes(r))return;let v;if(p===K.CODEHTML){const w=d.properties?.find(b=>b.propertyType===Xe.RICHTEXT);w?.value&&(v=w?.value)}if(p===K.SELECT){const w=d.properties?.find(b=>b.propertyType===Xe.OPTIONS_EDITOR);if(g){const b=e[r][d.id],C=b.properties?.find(B=>B.propertyType===Xe.OPTIONS_EDITOR),x=!!w?.value?.canSelectMultiple,y=!!C?.value?.canSelectMultiple;x===y&&(v=b.value)}else{const b=w?.isOptionsEditorEnhanced&&w?.value.defaultSelectOption?w?.value.defaultSelectOptionValue:"";b&&(v=b)}}if(g){const w=e[r][d.id];A[d.id]={...w,properties:d.properties??w.properties??[],...v!==void 0&&{value:v},isUsed:f,pos:t?.[r]?u:w.pos,isLockedValue:(v!==void 0||w.value!==void 0)&&w.isLockedValue}}else{c.push({id:d.id,idx:u});const w=Object.values(e[r]).filter(b=>!b.isFixed&&!b.isOptional).length;A[d.id]={type:d.type,properties:d.properties??[],isUsed:f,isOptional:!1,isLockedValue:!1,isFixed:!1,value:v??null,pos:t?.[r]?u:w+u}}}),t?.[r]||c.forEach(d=>{const u=A[d.id];u.pos=d.idx+1,Object.keys(A).forEach(f=>{const g=A[f];g&&!Object.values(gj).includes(f)&&f!==d.id&&g.pos>=u.pos&&g.pos++})}),{[r]:A}}))}function sF(e){return e.map(t=>({id:`${t.type}/${t.id}`,uri:`${t.type}/${t.id}`,shortUri:`${t.type}/${t.id}`,title:t.title,name:t.title,mainType:t.type,type:t.mainType,label:t.type,cssClass:t._cssClass,cssColor:t._cssColor,class:t._cssClass,Pseudo:t.title,_url:t._url}))}function aF(e,t,n){const r=e.typeModel.tables,A=e.typeModel.displays;if(!A)return;const i=new Map;Object.entries(A).forEach(o=>{const[a,l]=o;Object.keys($B).includes(a)&&lF(t,i,a,l,r,n)}),cF(t,i,e.columns,r,n),dF(t,i,e.attrExposed,r,n)}function lF(e,t,n,r,A,i){const o=$B[n];if(e.views[o]={},o==="view"){const[a,l]=Lc({fixedValue:void 0});e.views[o][a]=l}r.composants.forEach((a,l)=>{let c;if(a.name&&iF.includes(a.name))return;const[d,u]=gF(e,t,a,A,i);if(d===-1&&u)switch(u.ref){case"title":{if(o==="view")break;const[f,g]=Lc(u);e.views[o][f]=g;break}case"alertAuthor":{const[f,g]=nE(u);e.views[o][f]=g;break}case"sendAlert":{const[f,g]=rE(u);e.views[o][f]=g;break}case"publishTo":{const[f,g]=AE(u);e.views[o][f]=g;break}default:console.error("fixed field info with unsupported ref ",u);break}else if(d!==-1){if(c=e.fields[d],!c?.views)throw new Error(`error converting installed app to V2: created field not found in fields array: ${d}, ${u}`);c.views[o]=!0,tE(o,c,e,l,u)}})}function cF(e,t,n,r,A){n&&Object.keys(n).forEach((i,o)=>{eE(e,t,r,"list",i,o,A)})}function dF(e,t,n,r,A){n.forEach((i,o)=>{eE(e,t,r,"filter",i,o,A)})}function eE(e,t,n,r,A,i,o){switch(A){case"title":{const[a,l]=Lc({fixedValue:void 0});e.views[r][a]=l;break}case"iduser":case"idUser":{const[a,l]=iE();e.views[r][a]=l;break}case"datecreation":case"dateCreation":{const[a,l]=oE();e.views[r][a]=l;break}default:uF(e,t,n,r,A,i,o);break}}function uF(e,t,n,r,A,i,o){const a=fF(e,t,n,A,o),l=e.fields[a];if(!l?.views)throw new Error(`error converting installed app to V2: unable to handle ${A} in list view`);l.views[r]=!0,tE(r,l,e,i,void 0)}function fF(e,t,n,r,A){const i=t.get(r);if(i!==void 0)return i;const[o,a]=$h(e,r,n,A);return t.set(o,a),a}function gF(e,t,n,r,A){if(n.name!==void 0&&n.element==="attr"){if(Cb.includes(n.name))return[-1,{ref:n.name,fixedValue:void 0}];const i=t.get(n.name);if(i!==void 0)return[i,void 0];const[o,a]=$h(e,n.name,r,A);return t.set(o,a),[a,void 0]}else if(n.element==="html"){const i=n.html;if(i===void 0)return console.error("error while parsing studio installed html attr in a view: no html code"),[-1,void 0];if(i.includes("<JAMESPOT.STUDIO.FIXED>")){const o=i.indexOf("<JAMESPOT.STUDIO.FIXED>")+23,a=i.indexOf("</JAMESPOT.STUDIO.FIXED>"),l=i.substring(o,a);try{const c=JSON.parse(l);if(c?.ref.toUpperCase()in ve){const g=c.ref.toUpperCase();return[-1,{...c,ref:_B(g)}]}if(Cb.includes(c?.ref))return[-1,c];const d=t.get(c?.ref);if(d!==void 0)return[d,c];const[u,f]=$h(e,c.ref,r,A);return t.set(u,f),[f,c]}catch{return console.error("error while parsing studio installed fixed attr in a view: json parsing failed"),[-1,void 0]}}else if(i.includes("<JAMESPOT.STUDIO.CODEHTML>"))try{const o=i.indexOf("<JAMESPOT.STUDIO.CODEHTML>")+26,a=i.indexOf("</JAMESPOT.STUDIO.CODEHTML>"),l=i.substring(o,a),c=JSON.parse(l),d=t.get(c?.name);if(d!==void 0)return[d,void 0];const u=Sj(c),f=e.fields.push(u)-1;return t.set(u.id,f),[f,void 0]}catch{return console.error("error while parsing studio installed codehtml attr in a view: json parsing failed"),[-1,void 0]}else return console.error("error while parsing studio installed html attr in a view: unknown html format"),[-1,void 0]}else if(n.element==="image"){const i=t.get("image");if(i!==void 0)return[i,void 0];const o=Ij(),a=e.fields.push(o)-1;return t.set("image",a),[a,void 0]}else return n.element==="publishTo"?[-1,{ref:"publishTo",fixedValue:void 0}]:(console.error("error while parsing studio installed attr in a view: unknown attr :O"),[-1,void 0])}function $h(e,t,n,r){const A=hF(t,n),i=pF(A),o=(function(){switch(i){case K.ADDFILEATTACHMENT:return Dj(A);case K.NUMBER:return Tj(A);case K.TAGS:return Oj(A);case K.SELECT:return Qj(A);case K.RADIO:return ZB(A);case K.CHECKBOX:return Rj(A);case K.CONTENTLINK:return jj(A,r);case K.DESCRIPTION:return Lj(A);case K.TEXTAREAHTML:return Pj(A);case K.DATE:return Mj(A);case K.DATETIME:return Hj(A);case K.URL:return kj(A);case K.EMAIL:return Nj(A);case K.TOGGLE:return Uj(A);case K.USERLINK:return zj(A);case K.TEXTAREA:return Wj(A);case K.TEXT:default:return Fj(A)}})(),a=e.fields.push(o)-1;return[t,a]}function hF(e,t){let n;for(let r=0;r<t.length&&!n;r++)n=t[r]?.attributes.find(A=>A.name===e);if(!n)throw new Error("error converting installed app to V2: installed field not found in tables "+e);return n}function tE(e,t,n,r,A){t.views&&(t.views[e]=!0,n.views[e][t.id]={type:t.type,properties:t.properties??[],isUsed:!0,isOptional:!1,isLockedValue:!!A?.fixedValue,isFixed:!1,value:A?.fixedValue??null,pos:r})}function pF(e){switch(e.widget.type){case"number":return K.NUMBER;case"taxonomy":return K.TAGS;case"date":return K.DATE;case"datetime":return K.DATETIME;case"select":return K.SELECT;case"radio":return K.RADIO;case"url":return K.URL;case"email":return K.EMAIL;case"file":return K.ADDFILEATTACHMENT;case"checkbox":return e.widget.options?.["1"]==="GLOBAL_Yes"?K.TOGGLE:K.CHECKBOX;case"uri":if(e.widget.params?.views==="user")return K.USERLINK;if(e.widget.params?.views==="article")return K.CONTENTLINK;break;case"textarea":if(e.attrType==="longtext"||e.attrType==="text")return K.TEXTAREA;if(e.attrType==="html")return e.name==="description"?K.DESCRIPTION:K.TEXTAREAHTML;break;case"text":return K.TEXT}throw new Error("error converting installed app to V2: installed field type not recognized for field "+e.name+":"+JSON.stringify(e))}function Lc(e,t=!0){return["title",{type:ve.TITLE,properties:[],isUsed:t,isOptional:!1,isLockedValue:!!e?.fixedValue,isFixed:!0,value:e?.fixedValue??null,pos:0}]}function nE(e,t=!0){return["alertAuthor",{type:ve.RECEIVEACOPY,properties:[],isUsed:t,isOptional:!0,isLockedValue:e?.fixedValue!==void 0,isFixed:!1,value:e?.fixedValue??!0,pos:300}]}function rE(e,t=!0){return["sendAlert",{type:ve.SENDALERTTOSUBSCRIBERS,properties:[],isUsed:t,isOptional:!0,isLockedValue:e?.fixedValue!==void 0,isFixed:!1,value:e?.fixedValue??!0,pos:200}]}function AE(e,t=!0){return["publishTo",{type:ve.PUBLISHTO,properties:[],isUsed:t,isOptional:!0,isLockedValue:!!e?.fixedValue,isFixed:!1,value:e?.fixedValue??[],pos:100}]}function iE(e=!0){return["user",{type:ve.USER,properties:[],isUsed:e,isOptional:!1,isLockedValue:!1,isFixed:!0,value:null,pos:1}]}function oE(e=!0){return["dateCreation",{type:ve.CREATIONDATE,properties:[],isUsed:e,isOptional:!0,isLockedValue:!1,isFixed:!1,value:null,pos:100}]}function mF(e,t,n){const{version:r,dateCreation:A}=e.manifest,i=e.typeModel,o=Object.assign({},...Rm.map(f=>({[f]:{}}))),a=e,l=!!e.columns&&Object.keys(e.columns).length>0,c={idApp:e.idApp,status:ep(e),studioVersion:2,manifest:{appShortName:e.label,appName:e.label,description:e.description,author:e.author,cssColor:i.cssColor??"#392994",cssClass:{label:i.cssClass??"star",value:i.cssClass??"star"},version:r,dateCreation:A,checkAccess:!1,accessRightList:"",attrExposed:[],display:l?ia.TABLE:ia.FLUX,viewSolr:e.view==="solr"?Zh.SOLR:Zh.NOT_SOLR,typeLabel:i.typeLabel,articlesCount:e.articlesCount??0,displayContentLegacyTable:!!a?.typeModel?.displays?.displayDisabled},fields:[],views:o,installFor:e.accessRightObjectList?sF(e.accessRightObjectList):[],audience:e.checkAccess===!1?Fc.ALL:Fc.CUSTOM};aF(e,c,n),c.views=oF(c.views,c.syncViewFieldOrder,c.fields);const d=vF(e.idApp,t);if(!d)return c;const u=sE(d);return u&&(c.inWorkVersion=u),c}function sE(e){if(!e.value)return;const t=JSON.parse(e.value);return t.studioVersion==2?{idApp:e.idApp,studioVersion:2,status:ep(e),manifest:t.manifest,fields:t.fields,views:t.views,syncViewFieldOrder:t.syncViewFieldOrder,audience:t.audience,installFor:t.installFor}:{...JB(t),status:ep(e),migratedFrom:1}}function ep(e){return e.status===_.StudioApplicationStatus.installed?e.suspended?Oo.suspended:Oo.installed:Oo.draft}function vF(e,t){return t.find(n=>n.idApp===e&&n.status===_.StudioApplicationStatus.saved)}function wF(e,t){return!!t.find(n=>n.idApp===e&&n.status===_.StudioApplicationStatus.installed)}function aE(e,t){return e.map(n=>{try{return n.status===_.StudioApplicationStatus.installed?mF(n,e,t):wF(n.idApp,e)?void 0:sE(n)}catch(r){console.error(r);return}}).filter(n=>n!==void 0)}const bF={currentStudioApp:null,fetchCurrentStudioAppStatus:"idle",saveCurrentStudioAppStatus:"idle",installStudioAppStatus:"idle",hasChanged:!1},Cf=ae("studio/fetchCurrentStudioApp",async({idApp:e,status:t},{extra:n,rejectWithValue:r,getState:A})=>{const i=n.jApi,o={error:1,errorMsg:"Error fetching application"};try{const a=(await i.application.studioGet(e,t)).result;return aE([a],A())[0]||r(o)}catch{return r(o)}}),Bf=ae("studio/saveCurrentStudioApp",async(e,{extra:t,rejectWithValue:n,getState:r,dispatch:A})=>{const i=t.jApi,o={error:1,errorMsg:"Error saving application"},a=r().studio.currentStudioApp.currentStudioApp;if(!a)return n(o);const l=JSON.stringify(a);try{await i.application.studioSave(a.idApp,l,"saved"),A(de.actions.success({label:"APPSTUDIO_AppItem_Edition_Saved"}));return}catch(c){return A(de.actions.error({label:Be(c)})),n(o)}}),Ef=ae("studio/installApp",async({callback:e},{extra:t,rejectWithValue:n,getState:r,dispatch:A})=>{const i=t.jApi,o={error:1,errorMsg:"Error saving application"},a=r().studio.currentStudioApp.currentStudioApp;if(!a)return n(o);const l=Xj(a);try{await i.application.studioInstall(l),A(de.actions.success({label:"APPSTUDIO_AppItem_Installed"})),e&&e();return}catch(c){return A(de.actions.error({label:Be(c)})),n(o)}}),Pc=ke({name:"currentStudioApp",initialState:bF,reducers:{setCurrentApp:(e,t)=>{e.currentStudioApp=t.payload},resetCurrentApp:e=>{e.currentStudioApp=null},setHasChanged:(e,t)=>{e.hasChanged=t.payload}},extraReducers:e=>{e.addCase(Cf.pending,t=>{t.fetchCurrentStudioAppStatus==="idle"&&(t.fetchCurrentStudioAppStatus="pending")}).addCase(Cf.fulfilled,(t,n)=>{t.fetchCurrentStudioAppStatus==="pending"&&(t.fetchCurrentStudioAppStatus="idle"),t.currentStudioApp=n.payload}).addCase(Cf.rejected,t=>{t.fetchCurrentStudioAppStatus==="pending"&&(t.fetchCurrentStudioAppStatus="idle")}).addCase(Bf.pending,t=>{t.saveCurrentStudioAppStatus==="idle"&&(t.saveCurrentStudioAppStatus="pending")}).addCase(Bf.fulfilled,t=>{t.saveCurrentStudioAppStatus==="pending"&&(t.saveCurrentStudioAppStatus="idle")}).addCase(Bf.rejected,t=>{t.saveCurrentStudioAppStatus==="pending"&&(t.saveCurrentStudioAppStatus="idle")}).addCase(Ef.pending,t=>{t.installStudioAppStatus==="idle"&&(t.installStudioAppStatus="pending")}).addCase(Ef.fulfilled,t=>{t.installStudioAppStatus==="pending"&&(t.installStudioAppStatus="idle")}).addCase(Ef.rejected,t=>{t.installStudioAppStatus==="pending"&&(t.installStudioAppStatus="idle")})}});function lE(e,t,n){const r=e.studioVersion!==2?JSON.parse(JSON.stringify(JB(e))):JSON.parse(JSON.stringify(e));if(delete r.inWorkVersion,n)r.manifest.version=r.manifest.version+.1;else{const A=Zr(),i=`${e.manifest.appName} Copie`;r.idApp=A,r.status=Jr.DRAFT,r.manifest={...r.manifest,appName:i,appShortName:i,author:t??r.manifest.author??"",dateCreation:new Date().toISOString(),version:.1,articlesCount:0}}return[r,r.idApp]}function xF({author:e,appName:t}){const n=Zr(),r=Object.assign({},...Rm.map(A=>{const i={};return yo[A]?.fixed.forEach((o,a)=>{i[Zr()]={type:o,properties:[],isUsed:!0,isOptional:!1,isFixed:!0,isLockedValue:!1,value:null,pos:a}}),yo[A]?.optional.forEach((o,a)=>{i[Zr()]={type:o,properties:[],isUsed:!0,isOptional:!0,isFixed:!1,isLockedValue:!1,value:o==="SENDALERTTOSUBSCRIBERS"||o==="RECEIVEACOPY"?!0:null,pos:(a+1)*100}}),{[A]:i}}));return{newAppId:n,newStudioApp:{idApp:n,status:Jr.DRAFT,author:e??"",studioVersion:2,manifest:{appShortName:t,appName:t,author:e??"",description:"",typeLabel:"",cssColor:"#392994",cssClass:{label:"star",value:"star"},version:.1,dateCreation:new Date().toISOString(),viewSolr:Zh.SOLR,display:ia.TABLE,checkAccess:!1,accessRightList:"",attrExposed:[],articlesCount:0},syncViewFieldOrder:{create:!0,popup:!0,view:!0,edit:!0,list:!0,filter:!0},fields:[],views:r,audience:Fc.CUSTOM,installFor:[]}}}function Za(e,t){return e.manifest.appName>t.manifest.appName?1:-1}const yF={loadingStudioAppsList:"idle",deleteStudioAppStatus:"idle",suspendStudioAppStatus:"idle",restartStudioAppStatus:"idle",cloneStudioAppStatus:"idle",createInWorkAppStatus:"idle",createNewStudioAppStatus:"idle"},Df=ae("studio/appsList",async(e,{extra:t,rejectWithValue:n,dispatch:r,getState:A})=>{const i=t.jApi;try{const{result:o}=await i.application.studioList(),a=await i.taxonomy.list(),l=(await Promise.allSettled(o.map(async d=>{const u=(await i.application.studioGet(d.idApp,d.status)).result,f=(await i.article.count(d.idApp)).result;return{...u,articlesCount:f}}))).map(d=>d.status==="fulfilled"?d.value:null).reduce((d,u)=>u!==null?d.concat([u]):d,[]),c=aE(l,A());return c.forEach(async d=>{d.fields=Bb(d.fields,a,e),d.inWorkVersion&&(d.inWorkVersion.fields=Bb(d.inWorkVersion.fields,a,e))}),c}catch(o){throw console.error(o),r(de.actions.error({label:Be(o)})),n({error:1,errorMsg:"Error retrieving applications"})}});function Bb(e,t,n){return e.map(r=>{if(r.type!==K.TAGS)return r;const A=JSON.parse(JSON.stringify(r)),i=A.properties?.find(a=>a.propertyType===Xe.TAXONOMY),o=t.find(a=>a.id===i?.value.id);return o&&i&&(i.value.title=n.formatMessage({id:o.title}),i.value.type=o.type),A})}const Sf=ae("studio/createApp",async({appName:e,callback:t},{extra:n,dispatch:r,rejectWithValue:A,getState:i})=>{const o=n.jApi,a=i().userCurrent?.uri,{newAppId:l,newStudioApp:c}=xF({appName:e,...a&&{author:a}});try{return await o.application.studioSave(l,JSON.stringify(c),"saved"),r(de.actions.success({label:"APPSTUDIO_StudioApp_Created"})),r(Pc.actions.setCurrentApp(c)),t&&t(),c}catch(d){throw r(de.actions.error({label:Be(d)})),A({error:1,errorMsg:"Error creating application"})}}),If=ae("studio/deleteApp",async({idApp:e,status:t},{extra:n,rejectWithValue:r,dispatch:A})=>{const i=n.jApi;try{const o=await i.application.studioDelete(e,t);return A(de.actions.success({label:"APPSTUDIO_StudioApp_Deleted"})),o}catch(o){return A(de.actions.error({label:Be(o)})),r({error:1,errorMsg:"Error deleting application"})}}),Tf=ae("studio/suspendStudioApp",async({idApp:e},{extra:t,rejectWithValue:n,dispatch:r})=>{const A=t.jApi;try{await A.application.studioSuspend(e),r(de.actions.success({label:"APPSTUDIO_AppItem_Suspended"}))}catch(i){throw r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Error suspending application"})}}),Of=ae("studio/restartStudioApp",async({idApp:e},{extra:t,rejectWithValue:n,dispatch:r})=>{const A=t.jApi;try{await A.application.studioRestart(e),r(de.actions.success({label:"APPSTUDIO_AppItem_Restarted"}))}catch(i){throw r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Error restarting application"})}}),Qf=ae("studio/cloneStudioApp",async({idApp:e,inWork:t},{extra:n,getState:r,rejectWithValue:A,dispatch:i})=>{const o=n.jApi;let a=r().studio.studioAppsList.studioAppsList?.find(f=>f.idApp===e);if(!a)return A({error:1,errorMsg:"Error cloning application"});if(t)if(a.inWorkVersion!==void 0)a=a.inWorkVersion;else return A({error:1,errorMsg:"Error cloning application"});const l=r().userCurrent?.uri,[c,d]=lE(a,l),u=JSON.stringify(c);try{return await o.application.studioSave(d,u,"saved"),i(de.actions.success({label:"APPSTUDIO_AppItem_Cloned"})),c}catch(f){return i(de.actions.error({label:Be(f)})),A({error:1,errorMsg:"Error cloning application"})}}),Rf=ae("studio/createInWorkStudioApp",async({idApp:e},{extra:t,getState:n,rejectWithValue:r,dispatch:A})=>{const i=t.jApi,o=n().studio.studioAppsList.studioAppsList?.find(u=>u.idApp===e);if(!o||![Jr.INSTALLED,Jr.SUSPENDED].includes(o.status))return r({error:1,errorMsg:"Error cloning application"});const a=n().userCurrent?.uri,[l,c]=lE(o,a,!0),d=JSON.stringify(l);try{return await i.application.studioSave(c,d,"saved"),A(de.actions.success({label:"APPSTUDIO_AppItem_CreateInWork"})),l}catch(u){return A(de.actions.error({label:Be(u)})),r({error:1,errorMsg:"Error creating in work version for application"})}}),tp=ke({name:"studioAppsList",initialState:yF,reducers:{setAppsList:(e,t)=>{e.studioAppsList=[...t.payload].sort(Za)}},extraReducers:e=>{e.addCase(Df.pending,t=>{t.loadingStudioAppsList==="idle"&&(t.loadingStudioAppsList="pending")}).addCase(Df.fulfilled,(t,n)=>{t.loadingStudioAppsList==="pending"&&(t.loadingStudioAppsList="idle"),t.studioAppsList=[...n.payload].sort(Za)}).addCase(Df.rejected,t=>{t.loadingStudioAppsList==="pending"&&(t.loadingStudioAppsList="idle")}).addCase(If.pending,t=>{t.deleteStudioAppStatus==="idle"&&(t.deleteStudioAppStatus="pending")}).addCase(If.fulfilled,(t,n)=>{t.deleteStudioAppStatus==="pending"&&(t.deleteStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.reduce((r,A)=>{const{idApp:i}=n.meta.arg;let{status:o}=n.meta.arg;return o===Jr.INSTALLED&&(o=Jr.SUSPENDED),A.idApp===i&&A.status===o?A.inWorkVersion&&A.status===Jr.SUSPENDED?(A.inWorkVersion.status=Jr.DRAFT,[...r,A.inWorkVersion]):r:(A.inWorkVersion?.idApp===i&&A.inWorkVersion?.status===o&&delete A.inWorkVersion,[...r,A])},[])??[]}).addCase(If.rejected,t=>{t.deleteStudioAppStatus==="pending"&&(t.deleteStudioAppStatus="idle")}).addCase(Tf.pending,t=>{t.suspendStudioAppStatus==="idle"&&(t.suspendStudioAppStatus="pending")}).addCase(Tf.fulfilled,(t,n)=>{t.suspendStudioAppStatus==="pending"&&(t.suspendStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.map(r=>{const{idApp:A}=n.meta.arg;return r.idApp===A&&(r.status=Jr.SUSPENDED),r})??[]}).addCase(Tf.rejected,t=>{t.suspendStudioAppStatus==="pending"&&(t.suspendStudioAppStatus="idle")}).addCase(Of.pending,t=>{t.restartStudioAppStatus==="idle"&&(t.restartStudioAppStatus="pending")}).addCase(Of.fulfilled,(t,n)=>{t.restartStudioAppStatus==="pending"&&(t.restartStudioAppStatus="idle"),t.studioAppsList=t.studioAppsList?.map(r=>{const{idApp:A}=n.meta.arg;return r.idApp===A&&(r.status=Jr.INSTALLED),r})??[]}).addCase(Of.rejected,t=>{t.restartStudioAppStatus==="pending"&&(t.restartStudioAppStatus="idle")}).addCase(Qf.pending,t=>{t.cloneStudioAppStatus==="idle"&&(t.cloneStudioAppStatus="pending")}).addCase(Qf.fulfilled,(t,n)=>{t.cloneStudioAppStatus==="pending"&&(t.cloneStudioAppStatus="idle"),t.studioAppsList=[...t.studioAppsList??[],n.payload].sort(Za)}).addCase(Qf.rejected,t=>{t.cloneStudioAppStatus==="pending"&&(t.cloneStudioAppStatus="idle")}).addCase(Rf.pending,t=>{t.createInWorkAppStatus==="idle"&&(t.createInWorkAppStatus="pending")}).addCase(Rf.fulfilled,(t,n)=>{t.createInWorkAppStatus==="pending"&&(t.createInWorkAppStatus="idle");const r=t.studioAppsList?.find(A=>A.idApp===n.payload.idApp);r&&(r.inWorkVersion=n.payload)}).addCase(Rf.rejected,t=>{t.createInWorkAppStatus==="pending"&&(t.createInWorkAppStatus="idle")}).addCase(Sf.pending,t=>{t.createNewStudioAppStatus==="idle"&&(t.createNewStudioAppStatus="pending")}).addCase(Sf.fulfilled,(t,n)=>{t.createNewStudioAppStatus==="pending"&&(t.createNewStudioAppStatus="idle"),t.studioAppsList=[...t.studioAppsList??[],n.payload].sort(Za)}).addCase(Sf.rejected,t=>{t.createNewStudioAppStatus==="pending"&&(t.createNewStudioAppStatus="idle")})}});Hn({[tp.name]:tp.reducer,[Pc.name]:Pc.reducer});({...tp.actions,...Pc.actions});const CF={messages:[],status:"idle",summary:void 0,jobUid:void 0},np=ke({name:"teamWorkAiDaySummary",initialState:CF,reducers:{setDaySummaryMessageAndStatus:(e,t)=>{if(t.payload.jobUid!==e.jobUid)return;const{status:n,messages:r}=t.payload;e.status=n,e.messages=r},setDaySummary:(e,t)=>{t.payload.jobUid===e.jobUid&&(e.summary=t.payload.summary)},resetDaySummaryState:e=>{e.status="idle",e.messages=[],e.jobUid=void 0,e.summary=void 0}},extraReducers:e=>{e.addCase(jf.pending,(t,n)=>{t.status="pending",t.messages=["APP_TeamWork_IA_Generation_Started"]}),e.addCase(jf.fulfilled,(t,n)=>{t.status=n.payload.state,t.messages=n.payload.messages,t.summary=n.payload.summary,t.jobUid=n.payload.jobUid}),e.addCase(jf.rejected,(t,n)=>{t.status="error",t.messages=[n.payload?.errorMsg??"GLOBAL_Technical_Error"]})}}),jf=ae("teamWork/Ai/startDaySummaryCreation",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.daySummary({forceGeneration:e},{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"APP_TEAMWORK_ToDo_Not_Sent"})}}),BF={messages:[],status:"idle",tasks:void 0,jobUid:void 0,uriAiTodo:void 0},rp=ke({name:"teamWorkAiTasks",initialState:BF,reducers:{setTasksMessageAndStatus:(e,t)=>{if(t.payload.jobUid!==e.jobUid)return;const{status:n,messages:r}=t.payload;e.status=n,e.messages=r},setTasks:(e,t)=>{t.payload.jobUid===e.jobUid&&(e.tasks=t.payload.tasks,e.uriAiTodo=t.payload.uriAiTodo)},resetTasksState:e=>{e.status="idle",e.messages=[],e.jobUid=void 0,e.tasks=void 0,e.uriAiTodo=void 0}},extraReducers:e=>{e.addCase(Ff.pending,(t,n)=>{t.status="pending",t.messages=["APP_TeamWork_IA_Generation_Started"]}),e.addCase(Ff.fulfilled,(t,n)=>{t.status=n.payload.state,t.messages=n.payload.messages,t.tasks=n.payload.tasks,t.jobUid=n.payload.jobUid,t.uriAiTodo=n.payload.uriAiTodo}),e.addCase(Ff.rejected,(t,n)=>{t.status="error",t.messages=[n.payload?.errorMsg??"GLOBAL_Technical_Error"]}),e.addCase(EF.fulfilled,(t,n)=>{t.tasks=n.payload})}}),Ff=ae("teamWork/Ai/startToDoCreation",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.generateToDo({forceGeneration:e},{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"APP_TEAMWORK_ToDo_Not_Sent"})}}),EF=ae("teamWork/Ai/setToDoDone",async(e,{extra:t,rejectWithValue:n,dispatch:r,signal:A})=>{try{return(await t.jApi.teamWorkAi.todoDone(e,{signal:A})).result}catch(i){return ht(i)||r(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"GLOBAL_Technical_Error"})}});Hn({[rp.name]:rp.reducer,[np.name]:np.reducer});({...rp.actions,...np.actions});const DF={},Ap=ke({name:"options",initialState:DF,reducers:{initOptions:(e,{payload:t})=>t}});Hn({[Ap.name]:Ap.reducer});({...Ap.actions});const SF={channels:void 0,loading:"idle",loadingChannelDeletion:"idle"},ic=ae("/fetchChannels",async(e,{extra:t})=>{const n=e??1,r=t.jApi;return await new Promise((A,i)=>{const o={type:"tvDisplayChannel",page:n,orders:[{name:"id",sort:"DESC"}]};r.article.list(o,{format:"raw-list"}).then(a=>{A(a.result)}).catch(a=>{i({error:a.error??1,errorMsg:a.errorMsg??"Error retrieving channels"})})})}),Lf=ae("/deleteChannel",async({channel:e},{extra:t,dispatch:n})=>{const r=t.jApi;return await new Promise((A,i)=>{r.article.delete(e.id).then(o=>{A(o.result),n(ic())}).catch(o=>{i({error:o.error??1,errorMsg:o.errorMsg??"Error deleting channel"})})})}),Eb=ke({name:"channelsList",initialState:{...SF},reducers:{},extraReducers:e=>{e.addCase(ic.pending,t=>{t.loading==="idle"&&(t.loading="pending")}).addCase(ic.fulfilled,(t,n)=>{t.loading==="pending"&&(t.loading="idle",t.channels=n.payload)}).addCase(ic.rejected,t=>{t.loading==="pending"&&(t.loading="idle")}).addCase(Lf.pending,t=>{t.loadingChannelDeletion="pending"}).addCase(Lf.fulfilled,t=>{t.loadingChannelDeletion==="pending"&&(t.loadingChannelDeletion="idle")}).addCase(Lf.rejected,t=>{t.loadingChannelDeletion==="pending"&&(t.loadingChannelDeletion="idle")})}});Hn({[Eb.name]:Eb.reducer});const IF={id:0,mainType:"user",type:"user",uri:"user/0",title:"",_url:"",dateCreation:"",dateModified:"",level:0,active:1},TF=ke({name:"userCurrent",initialState:IF,reducers:{init:(e,{payload:t})=>t}});({...TF.actions});const ip=[{name:"name",sort:"ASC"}],OF={list:{loading:"idle",data:[],page:1,filters:[],orders:ip,limit:20,nbResults:0},tab:"my"},Db=ke({name:"visioConnect",initialState:OF,reducers:{setTab:(e,t)=>{e.tab=t.payload,e.list.page=1,_.deepEqual(e.list.orders,ip)||(e.list.orders=ip),e.list.filters.length>0&&(e.list.filters=[])},setPage:(e,t)=>{e.list.page=t.payload},setFilters:(e,t)=>{_.deepEqual(e.list.filters,t.payload)||(e.list.filters=t.payload)},setOrders:(e,t)=>{_.deepEqual(e.list.orders,t.payload)||(e.list.orders=t.payload)}},extraReducers:e=>{e.addCase(oc.pending,t=>{t.list.loading="pending"}).addCase(oc.fulfilled,(t,n)=>{t.list.loading="idle",t.list.data=n.payload.data,t.list.nbResults=n.payload.cnt}).addCase(oc.rejected,t=>{t.list.loading="idle"}).addCase(sc.pending,t=>{t.list.loading="pending"}).addCase(sc.fulfilled,(t,n)=>{t.list.loading="idle",t.list.data=n.payload.data,t.list.nbResults=n.payload.cnt}).addCase(sc.rejected,t=>{t.list.loading="idle"})}}),oc=ae("visioConnect/fetchPermanentRooms",async(e,{rejectWithValue:t,extra:n,dispatch:r,getState:A})=>{const i=A().visioConnect;try{const o=[...i.list.filters],a=i.list.orders.length>0?i.list.orders:[{name:"name",sort:"ASC"}],l=i.tab,c={filters:o,orders:a,page:i.list.page,limit:i.list.limit};if(l==="my")return(await n.jApi.visioConnect.getPermanentRoomsMy(c)).result;if(l==="all")return(await n.jApi.visioConnect.getPermanentRoomsAll(c)).result;if(l==="archive")return(await n.jApi.visioConnect.getPermanentRoomsArchive(c)).result;throw Error("Unhandled tab")}catch(o){return ht(o)||r(de.actions.error({label:Be(o)})),t({error:1,errorMsg:"Cannot fetch rooms"})}}),sc=ae("visioConnect/fetchTeamworkPermanentRooms",async(e,{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=[],i=[{name:"name",sort:"ASC"}];return(await n.jApi.visioConnect.getPermanentRoomsMy({filters:A,orders:i,page:1,limit:10})).result}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot fetch rooms"})}}),QF=ae("visioConnect/createPermanentRoom",async({room:e,token:t},{rejectWithValue:n,extra:r,dispatch:A})=>{try{const i=(await r.jApi.visioConnect.createPermanentRoom({room:e,token:t})).result;return A(kd.actions.fetchPermanentRooms()),A(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Create_Success"})),i}catch(i){return ht(i)||A(de.actions.error({label:Be(i)})),n({error:1,errorMsg:"Cannot save room"})}}),RF=ae("visioConnect/updatePermanentRoom",async({room:e,token:t,uri:n},{rejectWithValue:r,extra:A,dispatch:i})=>{try{const o=(await A.jApi.visioConnect.updatePermanentRoom({uri:n,room:e,token:t})).result;return i(kd.actions.fetchPermanentRooms()),i(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Update_Success"})),o}catch(o){return ht(o)||i(de.actions.error({label:Be(o)})),r({error:1,errorMsg:"Cannot save room"})}}),jF=ae("visioConnect/archivePermanentRoom",async({uri:e},{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=(await n.jApi.visioConnect.archivePermanentRoom(e)).result;return r(kd.actions.fetchPermanentRooms()),r(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Archive_Success"})),A}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot archive room"})}}),FF=ae("visioConnect/unarchivePermanentRoom",async({uri:e},{rejectWithValue:t,extra:n,dispatch:r})=>{try{const A=(await n.jApi.visioConnect.unarchivePermanentRoom(e)).result;return r(kd.actions.fetchPermanentRooms()),r(de.actions.success({label:"APP_VisioConnect_PermanentRoom_Unarchive_Success"})),A}catch(A){return ht(A)||r(de.actions.error({label:Be(A)})),t({error:1,errorMsg:"Cannot unarchive room"})}}),LF=e=>e.visioConnect.tab,PF=e=>e.visioConnect.list,kd={slice:Db,actions:{archivePermanentRoom:jF,unarchivePermanentRoom:FF,createPermanentRoom:QF,updatePermanentRoom:RF,fetchPermanentRooms:oc,fetchTeamworkPermanentRooms:sc,...Db.actions},selectors:{selectVisioConnectTab:LF,selectVisioConnectList:PF}},Pf=ae("wall/fetchWallFilters",async(e,{extra:t,rejectWithValue:n})=>{try{return(await t.jApi.wall.getFilters()).result}catch(r){return n(r)}}),Sb={filters:[],taxonomies:[],loading:"idle"},MF=ke({name:"wall",initialState:Sb,reducers:{setFilters:(e,t)=>{e.filters=t.payload},setLoading:(e,t)=>{e.loading=t.payload},reset:()=>Sb},extraReducers:e=>{e.addCase(Pf.pending,t=>{t.loading="pending"}),e.addCase(Pf.fulfilled,(t,n)=>{t.loading="idle",t.filters=n.payload.filterList,t.taxonomies=n.payload.taxonomies}),e.addCase(Pf.rejected,t=>{t.loading="idle"})}});({...MF.actions});const HF=4,Bi=ae("/fetchFiles",async({page:e,query:t,folder:n,tab:r},{extra:A,getState:i})=>{const o=A.jApi,a=i(),l=r??a.wedoc.tab,c=e??a.wedoc.page,d=t??a.wedoc.query,u=n!==void 0?n?.uri??null:a.wedoc.currentFolder?.uri;return l==="my-documents"?await o.wedoc.listMy({page:c,query:d,limit:a.wedoc.limit,uriFolder:u??void 0},{format:"raw-list",extensions:["parentArticle"]}):l==="shared-with-me"?await o.wedoc.listSharedWithMe({page:c,limit:a.wedoc.limit,query:d},{format:"raw-list",extensions:["parentArticle"]}):await o.wedoc.getFiles({page:c,limit:a.wedoc.limit,orders:[{name:"dateCreation",sort:"DESC"}],query:d},{format:"raw-list",extensions:["parentArticle"]})}),Mf=ae("/fetchRecentFiles",async(e,{extra:t,getState:n})=>{const r=t.jApi,A=n().wedoc.tab==="my-documents"?[{name:"idUser",value:"0"}]:[];return await r.wedoc.getFiles({filters:A,limit:HF,orders:[],page:1},{format:"raw-list"})});ae("/setCurrentFolder",async(e,{dispatch:t,getState:n})=>(e?.uri!==n().wedoc.currentFolder?.uri&&await t(Bi({page:1,query:"",folder:e})),e));ae("/setQuery",async(e,{dispatch:t,getState:n})=>(e!==n().wedoc.query&&await t(Bi({page:1,query:e})),e));ae("/setTab",async(e,{dispatch:t})=>(await t(Bi({page:1,query:"",folder:null,tab:e})),e));ae("/setPage",async(e,{dispatch:t,getState:n})=>(e!==n().wedoc.page&&await t(Bi({page:e})),e));const kF={entities:[],nbEntities:0,entitiesRecent:[],tab:"my-documents",loading:"idle",loadingRecent:"idle",query:"",page:1,currentFolder:null,limit:12};ke({name:"wedoc",initialState:kF,reducers:{update:(e,t)=>{e.entities=[...e.entities.map(n=>n.id===t.payload.id?{...n,...t.payload}:n)]}},extraReducers:e=>{e.addCase(Bi.pending,(t,n)=>{t.loading="pending",t.page=n.meta.arg.page??t.page,t.query=n.meta.arg.query??t.query,t.tab=n.meta.arg.tab??t.tab}).addCase(Bi.fulfilled,(t,n)=>{t.loading="idle";const{data:r,cnt:A}=n.payload.result;t.entities=r,t.nbEntities=A,t.currentFolder=n.meta.arg.folder!==void 0?n.meta.arg.folder:t.currentFolder}).addCase(Bi.rejected,t=>{t.loading="idle"}).addCase(Mf.pending,t=>{t.loadingRecent="pending"}).addCase(Mf.fulfilled,(t,n)=>{t.loadingRecent="idle",t.entitiesRecent=n.payload.result.data}).addCase(Mf.rejected,t=>{t.loadingRecent="idle"})}});function NF(){let e="";for(let t=0;t<16;t++)e+=((1+Math.random())*65536|0).toString(16).substring(1);return e}_.WidgetsName.ArticleAttachment;_.WidgetsName.ArticleButton;_.WidgetsName.ArticleGallery;_.WidgetsName.ArticleImage;_.WidgetsName.ArticleSlider;_.WidgetsName.ArticleText;_.WidgetsName.ArticleTitle;_.WidgetsName.Calendar;_.WidgetsName.CalendarCalDav;_.WidgetsName.CheckList;_.WidgetsName.Color;_.WidgetsName.ContactCardDav;_.WidgetsName.DatasourceTable;_.WidgetsName.EmailsImap;_.WidgetsName.ExcelDatasourceTable;_.WidgetsName.Extension;_.WidgetsName.LuccaAbsence;_.WidgetsName.Presence;_.WidgetsName.QuickSurvey;_.WidgetsName.UserProfile;_.WidgetsName.Slider;_.WidgetsName.Welcome;_.WidgetsName.Cover;_.WidgetsName.Text;const UF={token:void 0,ids:{},layers:{},states:{},modal:void 0,editableMap:{},currentEditableIndex:-1,currentEditableWidgetId:void 0,widgetObject:{},widgetObjectRights:{},widgetAuthor:{},widgetWrapperStyle:{},widgetTitleStyle:{},widgetChipCount:{},flushedWidgets:[],rtObjectStack:[],widgetContext:{},widgetSynchronizationStates:{},widgetUrls:{}},zF=[_.WidgetsName.ArticleTitle,_.WidgetsName.ArticleText,_.WidgetsName.ArticleImage,_.WidgetsName.ArticleButton,_.WidgetsName.ArticleSlider,_.WidgetsName.ArticleAttachment];ke({name:"widgets",initialState:UF,reducers:{registerWidget:(e,t)=>{const{uniqid:n,widget:r,context:A}=t.payload;if(e.ids[n]){console.error(`Widget with uniqid ${n} is already registered.`);return}e.ids[n]=r,e.states[n]??={busy:!1,initialized:!1,loading:!1,mounted:!1,hover:!1,empty:zF.includes(r.widget.name),locked:!1},e.widgetContext[n]=A},registerWidgetObject:(e,t)=>{const{uniqid:n,object:r}=t.payload;e.widgetObject[n]=r},registerWidgetObjectRights:(e,t)=>{const{uniqid:n,rights:r}=t.payload;e.widgetObjectRights[n]=r},registerWidgetAuthor:(e,t)=>{const{uniqid:n,author:r}=t.payload;e.widgetAuthor[n]=r},setWidgetChipCount:(e,t)=>{const{uniqid:n,count:r}=t.payload;e.widgetChipCount[n]=r},setWidgetWrapperStyle:(e,t)=>{const{uniqid:n,styles:r}=t.payload;e.widgetWrapperStyle[n]={...e.widgetWrapperStyle[n],...r}},setWidgetSynchronizationState:(e,t)=>{e.widgetSynchronizationStates[t.payload.uniqid]=t.payload.state},setWidgetUrl:(e,t)=>{e.widgetUrls[t.payload.uniqid]=t.payload.url},setWidgetTitleStyle:(e,t)=>{const{uniqid:n,styles:r}=t.payload;e.widgetTitleStyle[n]={...e.widgetTitleStyle[n],...r}},updateWidget:(e,t)=>{const{uniqid:n}=t.payload,r={...e.ids[n]};e.states[n]?.locked||e.ids[n]&&r.widget&&(e.ids[n]=Object.assign({...e.ids[n],widget:{...r.widget,content:t.payload.override?t.payload.content:Object.assign({...r.widget.content,...t.payload.content})}}))},replaceWidget:(e,t)=>{const{uniqid:n}=t.payload,r={...e.ids[n]};e.states[n]?.locked||e.ids[n]&&r.widget&&(e.ids[n]=Object.assign({...e.ids[n],widget:{...r.widget,name:t.payload.name,content:t.payload.content}}))},registerWidgetRTObject:(e,t)=>{const{uniqid:n,fn:r,object:A}=t.payload;e.rtObjectStack=[...e.rtObjectStack,{uniqid:n,fn:r,object:A}]},flushWidget:(e,t)=>{const{uniqid:n}=t.payload;delete e.ids[n],delete e.states[n],delete e.widgetContext[n],delete e.widgetObject[n],delete e.widgetObjectRights[n],delete e.widgetAuthor[n],delete e.widgetChipCount[n],delete e.widgetWrapperStyle[n],delete e.widgetTitleStyle[n],e.flushedWidgets.push(n)},flushAllWidget:e=>{e.flushedWidgets=[...e.flushedWidgets,...Object.keys(e.ids)],e.ids={},e.states={}},updateWidgetWrapper:(e,t)=>{const{uniqid:n}=t.payload;e.ids[n]&&(e.ids[n]=Object.assign({...e.ids[n],...t.payload}))},registerLayer:(e,t)=>{const n=NF(),r={...e.ids[t.payload.uniqid]};r.widget&&(e.ids[t.payload.uniqid]&&r.widget.layers?e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...r.widget,layers:[...r.widget.layers,n]}}):e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...r.widget,layers:[n]}}),e.ids[t.payload.widget.widget.uniqid]=t.payload.widget,e.states[t.payload.widget.widget.uniqid]={busy:!1,initialized:!1,loading:!1,mounted:!1,hover:!1,empty:!0},e.layers[n]={uniqid:n,widgets:[t.payload.widget],title:`Layer ${n}`,visible:!0,locked:!1,position:{x:0,y:0}})},updateLayer:(e,t)=>{e.layers[t.payload.uniqid]&&(e.layers[t.payload.uniqid]=Object.assign({...e.layers[t.payload.uniqid],...t.payload.props}))},flushLayer:(e,t)=>{const n={...e.ids[t.payload.uniqid]};n.widget?.layers&&(e.ids[t.payload.uniqid]=Object.assign({...e.ids[t.payload.uniqid],widget:{...n.widget,layers:[...n.widget.layers.filter(r=>r!==t.payload.layerId)]}}),delete e.layers[t.payload.layerId])},prevEditableIndex:e=>{const t=Object.keys(e.ids).length;e.currentEditableIndex=e.currentEditableIndex===0?t-1:e.currentEditableIndex-1},nextEditableIndex:e=>{const t=Object.keys(e.ids).length;e.currentEditableIndex=e.currentEditableIndex<t-1?e.currentEditableIndex+1:0},setEditableIndex:(e,t)=>{e.currentEditableIndex=t.payload.index},setEditableWidgetId:(e,t)=>{e.currentEditableWidgetId=t.payload.uniqid},registerEditableWidget:(e,t)=>{e.editableMap[t.payload.uniqid]=t.payload},setToken:(e,t)=>{e.token=t.payload.token},setWidgetState:(e,t)=>{const{uniqid:n}=t.payload;({...e.states[n]}!==void 0)&&(e.states[n]={...e.states[n],...t.payload})},setAllWidgetStates:(e,t)=>{Object.keys(e.states).map(n=>{({...e.states[n]}!==void 0)&&(e.states[n]={...e.states[n],...t.payload})})},registerModal:(e,t)=>{e.modal=t.payload},flushModal:e=>{e.modal=void 0}}});const WF={editors:[]};ke({name:"editors",initialState:WF,reducers:{registerEditor:(e,t)=>{const{uniqid:n,name:r,onSave:A,mode:i}=t.payload,o=A?{uniqid:n,name:r,onSave:A,position:"right",mode:i??"view"}:{uniqid:n,name:r,position:"right",mode:i??"view"};e.editors=e.editors.find(a=>a.uniqid===n)?e.editors:[...e.editors,o]},registerEditorPopup:(e,t)=>{const{uniqid:n,view:r}=t.payload;e.editors=[...e.editors.map(A=>A.uniqid===n?{...A,popup:!0,view:r}:A)]},flushEditorPopup:(e,t)=>{const{uniqid:n}=t.payload;e.editors=[...e.editors.map(r=>r.uniqid===n?{...r,popup:!1}:r)]},setEditorPosition:(e,t)=>{const{uniqid:n,position:r}=t.payload;e.editors=[...e.editors.map(A=>A.uniqid===n?{...A,position:r}:A)]},flushEditor:(e,t)=>{const{uniqid:n}=t.payload;e.editors=[...e.editors.filter(r=>r.uniqid!==n)]},flushAllEditor:e=>{window.dispatchEvent(new Event("WidgetEditorFlushAll")),e.editors.length=0}}});const Mc={success:"green",error:"red",warning:"yellow"};function Qo(e){return String(e).padStart(2,"0")}function XF(e,t){return`${e}${{10:"1a",20:"33",30:"4d",40:"66",50:"80",60:"99",70:"b3",80:"cc",90:"e6"}[t]}`}const fo={isValid:cE,rgb:(e,t,n)=>({toHex:()=>({string:()=>"#"+Qo(e.toString(16))+Qo(t.toString(16))+Qo(n.toString(16))}),toHsb:()=>({values:()=>Qs(e,t,n),hue:()=>Qs(e,t,n)[0],staturation:()=>Qs(e,t,n)[1],brightness:()=>Qs(e,t,n)[2]})}),hsl:(e,t,n)=>({toHex:()=>({values:()=>op(e,t,n),string:()=>{const r=op(e,t,n);return"#"+r[0]+r[1]+r[2]}})}),hsb:(e,t,n)=>({toRgb:()=>({values:()=>Os(e,t,n),red:()=>Os(e,t,n)[0],green:()=>Os(e,t,n)[1],blue:()=>Os(e,t,n)[2]})}),hex:e=>({toRgbaColor:t=>`rgba(${String(Gn(e).r).padStart(2,"0")},${String(Gn(e).g).padStart(2,"0")},${String(Gn(e).b).padStart(2,"0")},${String(t)})`,toRgbColor:()=>`rgb(${String(Gn(e).r).padStart(2,"0")},${String(Gn(e).g).padStart(2,"0")},${String(Gn(e).b).padStart(2,"0")})`,toRgb:()=>({values:()=>Gn(e),red:()=>Gn(e).r,green:()=>Gn(e).g,blue:()=>Gn(e).b}),toHsl:()=>({values:()=>LA(e),hue:()=>LA(e)[0],saturation:()=>Math.round(LA(e)[1]),luminance:()=>Math.round(LA(e)[2]),string:()=>{const t=LA(e);return"hsl("+t[0]+","+Math.round(t[1])+"%,"+Math.round(t[2])+"%)"}})})},GF=e=>{const t=e.replace("#","");return parseInt(t,16)>16777215/2?"black":"white"},VF=e=>{const t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),A=parseInt(t.substring(4,6),16);return(n*299+r*587+A*114)/1e3>=125?"black":"white"};function cE(e){return String(e).startsWith("#")&&String(e).length>=4&&String(e).length<=7}const Hf=e=>parseInt(e,16),Gn=e=>({r:Hf(e.substring(1,3)),g:Hf(e.substring(3,5)),b:Hf(e.substring(5,7))}),KF=function(e,t){try{if(t<-1||t>1||e[0]!=="#"||e.length!==4&&e.length!==7)return;let n=e.slice(1);n.length==3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=n.match(new RegExp("[0-9a-fA-F]{2}","g"));return r?.length!==3?void 0:r.map(A=>{const i=parseInt(A,16),o=t<0?i:255-i,a=Math.ceil(o*t);return(i+a).toString(16).toUpperCase().padStart(2,"0")}).reduce((A,i)=>`${A}${i}`,"#")}catch{return}},Os=(e,t,n)=>{const r=i=>(i+e/60)%6,A=i=>n*(1-t*Math.max(0,Math.min(r(i),4-r(i),1)));return[Math.round(255*A(5)),Math.round(255*A(3)),Math.round(255*A(1))]},Qs=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),A=r-Math.min(e,t,n),i=A===0?0:A&&r===e?(t-n)/A:r===t?2+(n-e)/A:4+(e-t)/A;return[Math.round(60*(i<0?i+6:i)),Math.round(r&&A/r*100),Math.round(r*100)]},LA=e=>{let t=0,n=0,r=0;e.length==4?(t="0x"+e[1]+e[1],n="0x"+e[2]+e[2],r="0x"+e[3]+e[3]):e.length==7&&(t="0x"+e[1]+e[2],n="0x"+e[3]+e[4],r="0x"+e[5]+e[6]),t/=255,n/=255,r/=255;const A=Math.min(t,n,r),i=Math.max(t,n,r),o=i-A;let a=0,l=0,c=0;return o==0?a=0:i==t?a=(n-r)/o%6:i==n?a=(r-t)/o+2:a=(t-n)/o+4,a=Math.round(a*60),a<0&&(a+=360),c=(i+A)/2,l=o==0?0:o/(1-Math.abs(2*c-1)),l=+(l*100).toFixed(1),c=+(c*100).toFixed(1),[a,l,c]};function op(e,t,n){t/=100,n/=100;const r=(1-Math.abs(2*n-1))*t,A=r*(1-Math.abs(e/60%2-1)),i=n-r/2;let o=0,a=0,l=0;return 0<=e&&e<60?(o=r,a=A,l=0):60<=e&&e<120?(o=A,a=r,l=0):120<=e&&e<180?(o=0,a=r,l=A):180<=e&&e<240?(o=0,a=A,l=r):240<=e&&e<300?(o=A,a=0,l=r):300<=e&&e<360&&(o=r,a=0,l=A),[Qo(Math.round((o+i)*255).toString(16)),Qo(Math.round((a+i)*255).toString(16)),Qo(Math.round((l+i)*255).toString(16))]}const dE=e=>{const t=e.indexOf(",")>-1?",":" ",n=e.substring(4).split(")")[0]?.split(t)??[],r=[0,0,0];for(let g=0;g<n.length&&g<3;g++){const p=n[g].trim();p.indexOf("%")>-1?r[g]=Math.round(+p.substring(0,p.length-1)/100*255):r[g]=+p}const A=r[0]/255,i=r[1]/255,o=r[2]/255,a=Math.min(A,i,o),l=Math.max(A,i,o),c=l-a,d=0;let u=0,f=0;return f=(l+a)/2,u=c==0?0:c/(1-Math.abs(2*f-1)),u=+(u*100).toFixed(1),f=+(f*100).toFixed(1),[d,u,f]},uE="^#(?:[A-Fa-f0-9]{3}){1,2}$",fE="^rgb\\(\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*,\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*,\\s*(25[0-5]|2[0-4][0-9]|1?\\d{1,2})\\s*\\)$|^rgb\\(\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?%)\\s*\\)$",gE="^hsl\\(\\s*(3[0-5][0-9]|360|[12]?\\d{1,2})\\s*,\\s*(100(?:\\.0+)?|\\d{1,2}(?:\\.\\d+)?)%\\s*,\\s*(100(?:\\.0+)?|\\d{1,2}(?:\\.\\d+)?)%\\s*\\)$",hE=e=>{const t=new RegExp(uE),n=new RegExp(fE),r=new RegExp(gE),A=t.test(e)?LA(e):n.test(e)?dE(e):r.test(e)&&r.exec(e)?.slice(1);let i="";return A&&A[2]&&parseInt(A[2])>50?i="hsl("+A[0]+","+A[1]+"%,"+(parseInt(A[2])-10)+"%)":(A&&A[2]&&parseInt(A[2])<50||A&&A[2]&&parseInt(A[2])===50)&&(i="hsl("+A[0]+","+A[1]+"%,"+(parseInt(A[2])+10)+"%)"),i},qF=e=>{const t=new RegExp(uE),n=new RegExp(fE),r=new RegExp(gE),A=t.test(e)?LA(e):n.test(e)?dE(e):r.test(e)&&r.exec(e)?.slice(1);return A?+A[2]:-1},JF=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),Ro=e=>Math.round(e).toString(16).padStart(2,"0"),YF=({r:e,g:t,b:n},r)=>`#${Ro((1-r)*e)}${Ro((1-r)*t)}${Ro((1-r)*n)}`,ZF=({r:e,g:t,b:n},r)=>`#${Ro(e+(255-e)*r)}${Ro(t+(255-t)*r)}${Ro(n+(255-n)*r)}`,_F=(e,t)=>YF(Gn(e),t),$F=(e,t)=>ZF(Gn(e),t),eL=Object.freeze(Object.defineProperty({__proto__:null,HSBToRGB:Os,RGBToHSB:Qs,brightness:qF,colorContrast:hE,colorTransparency:XF,colorimetry:fo,getContrast50:GF,getContrastYIQ:VF,getDarkShade:_F,getLightShade:$F,hexToHSL:LA,hexToRgb:Gn,hlsToHex:op,isValidHexColor:cE,modifyColorBrightness:KF,rgbToHex:JF},Symbol.toStringTag,{value:"Module"})),tL=["grey0","grey1","grey2","grey3","grey4","grey5","grey6"],nL=["black","black10","black15","black20","white","transparent","transparentHexa"],rL=["headerColor","headerTextColor","headerUserBackground","headerUserTextColor","headerSearchBarTextColor","headerSearchBarBackgroundColor","navBackground","navTextColor"],AL=["lavender","navy","overseas","night1","night2","sky","sand","yellow"],iL=["primary","secondary","green","red"],pE=e=>{const t=fo.hex(e).toHsl();return{light:fo.hsl(t.hue(),t.saturation(),95).toHex().string(),medium:fo.hsl(t.hue(),t.saturation(),90).toHex().string(),base:e,strong:fo.hsl(t.hue(),t.saturation(),t.luminance()-5).toHex().string(),dark:fo.hsl(t.hue(),t.saturation()!==0?50:0,30).toHex().string()}},zn=(e,t)=>{const n=pE(t);return{[`${e}Light`]:n.light,[`${e}Medium`]:n.medium,[e]:n.base,[`${e}Strong`]:n.strong,[`${e}Dark`]:n.dark}},mE={linkColor:"#392994",buttonColor:"#7364E3",forest:"#0D846B",headerTextColor:"",headerUserBackground:"",headerUserTextColor:"",headerSearchBarTextColor:"#2f373f",navBackground:"#ffffff",navTextColor:"#4A4A52",bgColorNotLogged:""},oL=(e=mE)=>{const t=zn("primary",e.buttonColor),n=zn("secondary",e.linkColor),r=zn("green","#0D846B"),A=zn("red","#E12B43"),i=zn("lavender","#8F7CEA"),o=zn("navy","#131E4B"),a=zn("overseas","#392994"),l=zn("night1","#2B3870"),c=zn("night2","#10162D"),d=zn("sky","#9CC9FF"),u=zn("sand","#FFEED7"),f=zn("yellow","#FFBB54");return{...t,...n,...r,...A,...i,...o,...a,...l,...c,...d,...u,...f,grey6:"#2E2E33",grey5:"#4A4A52",grey4:"#747487",grey3:"#BEBED1",grey2:"#DADAF0",grey1:"#EFEFFF",grey0:"#F8F8FF",black:"#000000",black10:"#00000019",black15:"#00000026",black20:"#00000033",white:"#FFFFFF",transparent:"transparent",transparentHexa:"#ffffff00",headerColor:e.headerColor??"",headerTextColor:e.headerTextColor,headerUserBackground:e.headerUserBackground,headerUserTextColor:e.headerUserTextColor,headerSearchBarTextColor:e.headerSearchBarTextColor,headerSearchBarBackgroundColor:e?.headerSearchBarBackgroundColor??(e?.headerColor?hE(e.headerColor):"#313941"),navBackground:e.navBackground,navTextColor:e.navTextColor}},sL=Object.freeze(Object.defineProperty({__proto__:null,buildPalette:oL,buildPaletteObject:zn,defaultColors:mE,getColorPalette:pE,paletteColorsGreys:tL,paletteColorsPlatform:rL,paletteColorsPrimary:iL,paletteColorsSecondary:AL,paletteColorsUtils:nL},Symbol.toStringTag,{value:"Module"})),tr=Object.freeze(Object.defineProperty({__proto__:null,color:eL,palette:sL},Symbol.toStringTag,{value:"Module"})),{buildPalette:aL,defaultColors:lL}=tr.palette;function Ei(e,t){return t in e.color?e.color[t]:t}const Hc={config:void 0,get:function(){return this.config?this.config:this.initTheme()},initTheme:function(e=lL){const t=aL(e);return this.config={dpr:Math.ceil(window?.devicePixelRatio||2),fallbackUrl:{article:"/imagestatic/30x30/icons/article.png"},font:{family:e?.fontFamily?`'${e.fontFamily}', sans-serif`:"'Poppins', sans-serif",color:t.grey5,hrefColor:t.secondary,size:"16px",lineHeight:"1.5em",weight:{light:300,normal:400,medium:500,semiBold:600,bold:700}},color:{...t},zIndex:{toaster:1e6,forceTop:1e5,tooltip:50030,tinyMCEModal:50020,modal:1100,dropdown:1e3,sidePanelModal:5,fullScreenContainer:3,dropdownModal:10,dropDownModalIcon:11},space:{xs:4,sm:8,md:16,l:24,xl:32},size:{xs:4,sm:8,md:16,l:24,xl:32}},this.config}},cL=JSON.parse(`{"ACTIVITY_Can_Not_comment_Desc":"You cannot comment on this content. Several reasons are possible:<p>- You are not part of the audience of the content</p><p>- You do not have sufficient rights according to the group settings</p><p>- A solar storm creates interference (less likely, but you never know)","ADD_FAVORITE":"Add to favorites","APP_Animated_Meeting":"Diapazone","APP_Bookmark_Bookmarks":"favorites","APP_FileIntegrity_Quarantine_Files_Message":"{ count } file(s) in quarantine","APP_SurveyDate_Over":"The survey is closed","APP_SurveyDate":"Sondage de date","AppLeftColumn_App_Navigation":"Application navigation menu","AppLeftColumn_Close_Panel":"Reduces the size of the menu","AppLeftColumn_Open_Panel":"Expands the menu","ARTICLE_Nb_Elements":"Documents","ARTICLE_Nb_Selected_Elements":"Elements sélectionés","ATTACHMENTS_No_Download":"No download","ATTACHMENTS_Preview_Successfully_Recomputed":"Preview successfully recomputed","ATTACHMENTS_Recompute_Preview":"Recompute preview","ATTACHMENTS_See_Downloads":"See downloads","AUDIENCE_GROUPS_AND_USERS":"{groups} group(s) and {users} users(s)","AUDIENCE_GROUPS_ONLY":"{groups} group(s)","AUDIENCE_ONLY_ME":"Only me","AUDIENCE_USERS_ONLY":"{users} user(s)","BUTTON_Title_Add_Image":"Add image","BUTTON_Title_Add_New_Task":"Add new task","BUTTON_Title_Add_Uri":"Add link to task","BUTTON_Title_Open_Edit_Panel":"Button that open the edit panel","BUTTON_Title_Open_Remove_Widget":"Button that remove the widget entirely","BUTTON_Title_Remove_Item":"Remove task","BUTTON_Title_Remove_Uri":"Remove link","CALENDAR_All_Day":"All day","CALENDAR_Answer":"Répondre","CALENDAR_BoardCard":"Board card","CALENDAR_dayGridMonth":"Month","CALENDAR_Delete_Confirmation_Recurrent":"Do you want to delete the whole series?","CALENDAR_Event_Date_All_Day":"Le {date}","CALENDAR_Event_Date_Start_End_All_Day":"Du {dateStart} au {dateEnd}","CALENDAR_Event_Date_Start_End_Same_Day_All_Day":"Le {dateStart}","CALENDAR_Event_Date_Start_End_Same_Day":"Le {dateStart}, de {timeStart} à {timeEnd}","CALENDAR_Event_Date_Start_End":"Du {dateStart}, {timeStart} au {dateEnd}, {timeEnd}","CALENDAR_Event_Date":"Le {date}, {time}","CALENDAR_Event_Recurrence_Daily":"Tous les jours","CALENDAR_Event_Recurrence_Monthly":"Tous les {day} du mois","CALENDAR_Event_Recurrence_Until":"jusqu'au {date}","CALENDAR_Event_Recurrence_UntilField":"Until","CALENDAR_Event_Recurrence_Weekly":"Tous les {day}","CALENDAR_Event_Recurrence_Yearly":"Tous les {date}","CALENDAR_Event_Recurrence":"Recurrence","CALENDAR_Event_Remaining_Seats":"places restantes","CALENDAR_Event_Report":"Compte rendu","CALENDAR_Event_Revive_All":"Tous","CALENDAR_Event_Revive_Available":"Participant(s)","CALENDAR_Event_Revive_Message_Description":"Quel message souhaitez vous envoyer ?","CALENDAR_Event_Revive_Message_Label":"Message","CALENDAR_Event_Revive_On_Spot":"En présentiel","CALENDAR_Event_Revive_Select_Description":"Qui souhaitez vous relancer ?","CALENDAR_Event_Revive_Unavailable":"Indisponible(s)","CALENDAR_Event_Revive_Visio":"En distanciel","CALENDAR_Event_Revive_Waiting":"En attente","CALENDAR_Event_Revive":"Relancer","CALENDAR_Event_Visio_Url":"Rejoindre la web conférence","CALENDAR_Event":"Evénement","CALENDAR_Join":"Je participe","CALENDAR_listWeek":"List","CALENDAR_Meeting":"Meeting","CALENDAR_Recurrent_Event_Warning":"This is a recurring event. Changes will apply to all events in the series.","CALENDAR_Reject":"Je ne participe pas","CALENDAR_Status_Available":"Vous participez","CALENDAR_Status_OnSpot":"En présentiel","CALENDAR_Status_Unavailable":"Vous ne participez pas","CALENDAR_Status_Unknown":"En attente","CALENDAR_Status_Visio":"En distanciel","CALENDAR_timeGridDay":"Day","CALENDAR_timeGridWeek":"Week","CALENDAR_Today":"Today","CALENDAR_Update_Confirmation_Recurrent":"Do you want to update the whole series?","CALENDAR_Widget_Editor_View":"View","CALENDAR_Widget_View_Month":"Month","CLIPBOARD_Copy_Success":"Copied to clipboard","COLOR_PICKER_recent_colors":"Recent colors","COMMENT_Add_Comment":"Add comment","COMMENT_Add_Widget":"Add widget","COMMENT_Answer":"Answer","COMMENT_Choose_Response":"Choose","COMMENT_Chosen_Response":"Chosen response","COMMENT_Comments":"comment(s)","COMMENT_Delete_Comment":"Delete comment ?","COMMENT_Display_More":"Display more comments","COMMENT_Just_Now":"just now","COMMENT_Last_Comment":"Last comment","COMMENT_Minutes_Ago":"{minutes} minutes ago","COMMENT_No_Comment":"No comment...","COMMENT_Placeholder":"Write a comment","COMMENT_Unselect_Response":"Unselect response","COMMENT_WIDGET_CHECKLIST_Add_New_Task":"Add new task","COMMENT_WIDGET_CHECKLIST_Add_Uri":"Add an uri","COMMENT_WIDGET_CHECKLIST_New_Task":"New task","COMMENT_WIDGET_CHECKLIST_Title":"Title","COMMENT_WIDGET_CHECKLIST_Uri_Link":"Button link","COMMENT_WIDGET_CHECKLIST_Uri_New_Page":"New page","COMMENT_WIDGET_CHECKLIST_Uri_Same_Page":"Same page","COMMENT_WIDGET_CHECKLIST_Uri_Target":"open","COMMENT_WIDGET_Configure":"Configure","COMMENT_WIDGET_Delete_Widget":"Delete comment ?","CONTACT_Pro_Members":"Business Contacts","CROP_Crop":"Crop","CROP_Rotate_Left":"Rotate left","CROP_Rotate_Right":"Rotate Right","CROP_Title":"Crop the image","CRPT_Add_Report":"Report content","CRPT_Comment_Of":"Comment of","CRPT_Report_Description_Required":"La description est obligatoire","CRPT_Report_Sent":"Report sent","DND_ADD_SECTION":"+ Add section","DND_EMPTY_STATE":"No items to display","DND_LIST_TITLE":"Items","DND_NEW_SECTION_LABEL":"New Section","DND_SECTIONS_TITLE":"Sections","DND_STACK_TITLE":"Active Buttons","DRIVE_Access_Denied":"Vous n'avez pas accès à ces documents.","DRIVE_Google_Not_Available":"This service is temporarily unavailable. Our team is currently working on a solution. We apologize for the inconvenience.","DRIVE_Input_Search_Group_Item":"Rechercher parmis les dossiers et documents","DRIVE_Input_Search_Groupe":"Rechercher un groupe","DRIVE_Is_Empty":"Nous n'avons trouvé aucun documents","DRIVE_MS_Accounts":"Accounts","DRIVE_MS_Default":"Default","DRIVE_MS_Error_Personal_Account":"Personal accounts are not supported","DRIVE_MS_Group_Filters_All":"Tous les groupes","DRIVE_MS_Group_Filters_Member_Of":"Seulement les groupes ou je suis membre","DRIVE_MS_Group_Filters":"Filtres","DRIVE_MS_Logout":"Logout","DRIVE_MS_Need_Login":"Please login to access your files","DRIVE_MS_Other_Account":"Add another account","DRIVE_MS_Set_Default_Account":"Set as default account","DRIVE_Private_Group":"Ce groupe est privé","DRIVE_Private":"Private","DRIVE_Public":"Public","DRIVE_Root":"Microsoft 365","DRIVE_Select_Document":"Sélectionner ce document","DRIVE_Select_Folder":"Sélectionner ce dossier","ERROR_Mail_Invalid":"Invalid email.","ERROR404_Msg":"Hum...There is nothing here...","ERROR404_MsgDetail":"This page does not exist, or its content has been deleted. Go back to home?","ERROR404_Wall":"Go back home","EVENT_Export_Calendar_ICalendar_Format":"Export to iCalendar format","EVENT_I_Register":"Je participe","EVENT_ICalendar_Export_Url_Explanation":"Copy url in your mail client","EVENT_ICalendar_Export_Url_Subscribed":"Sync accepted events","EVENT_ICalendar_Export_Url":"Sync all events","FIELDS_Add_Option":"Add a response","FILE_Existing_Files_Label":"Added files","FILE_Upload_Label":"Drop or select files","FILE_Viewer_Open_With":"Ouvrir avec","FILE_Viewer_Preview":"Aperçu","FOLDER_Nb_Elements":"Documents","GLOBAL_A11Y_APP_NAV":"Menu of the application {appName}","GLOBAL_Action_Missing_License":"🔐 The license of the app is not active on your platform!","GLOBAL_Add_File":"Add file","GLOBAL_Add_Image":"Add image","GLOBAL_Add_Video":"Add video","GLOBAL_Add":"Add","GLOBAL_Alert_Author":"Recevoir une copie","GLOBAL_Animated_Meeting":"Diapazone","GLOBAL_Attachments":"Pièces jointes","GLOBAL_Audience":"Audience","GLOBAL_BACK_PREVIOUS_SECTION":"back to the previous section","GLOBAL_Cancel":"Cancel","GLOBAL_CHECK_BOXES":"Check the boxes","GLOBAL_CHECK_FIRST_BOXE":"It's empty! Check your first tag.","GLOBAL_Close":"Close","GLOBAL_Comments":"Comments","GLOBAL_Confirm":"Confirm","GLOBAL_Continue":"Continue","Global_Create":"Créer","GLOBAL_Creation_Date":"Creation date","GLOBAL_Creator":"Creator","GLOBAL_Date_Placeholder":"Date","GLOBAL_DateTime_Placeholder":"Date and time","GLOBAL_Day":"Day","GLOBAL_Delete_Confirm":"Confirm delete","GLOBAL_Delete_Confirmation":"Please confirm suppression","GLOBAL_Delete":"Delete","GLOBAL_Documents":"Documents","GLOBAL_Download":"Download","GLOBAL_Downloads":"Downloads","GLOBAL_Draft_Saved_Today":"Sauvegardé à {time}","GLOBAL_Draft_Saved":"Sauvegardé le {date}, à {time}","GLOBAL_Edit":"Edit","GLOBAL_File_Bank":"Document bank","GLOBAL_File":"File","GLOBAL_Files":"Files","GLOBAL_Filter":"Filter","GLOBAL_Folders":"Folders","GLOBAL_Fontawesome":"Font Awesome","GLOBAL_Form_Characters":"characters","GLOBAL_Form_Controls_Date":"Date must be formatted dd/mm/yyyy","GLOBAL_Form_Controls_MaxLength":"Must be {max} characters or less","GLOBAL_Form_Controls_MaxValue":"Must be at max {max}","GLOBAL_Form_Controls_MinLength":"Must be {min} characters or more","GLOBAL_Form_Controls_MinValue":"Must be at least {min}","GLOBAL_Form_Controls_Number":"Must be a number","GLOBAL_Form_Controls_Pattern":"Must follow the specified pattern {pattern}","GLOBAL_Form_Controls_Required":"Required","GLOBAL_Form_Controls_Url":"Invalid url address","GLOBAL_Form_Description":"Les champs obligatoires sont identifiés par un *","GLOBAL_Form_No_Options":"No option","GLOBAL_Form_SendAlert":"Send the alert email to those who have requested it","GLOBAL_Go_To_Content":"Go to content","GLOBAL_Groups":"Groups","GLOBAL_Image":"Image","GLOBAL_Import":"Import","GLOBAL_Insert":"Insert","GLOBAL_Jamespot":"Jamespot","GLOBAL_Load_More":"Load more results","GLOBAL_Loading":"Loading","GLOBAL_Login":"Login","GLOBAL_Move":"Move","GLOBAL_New":"Nouveau","GLOBAL_Next":"Next","GLOBAL_No_Result":"No result","GLOBAL_Object_Link":"Objet lié","GLOBAL_Ok":"OK","GLOBAL_Options":"Options","GLOBAL_Page":"Page","GLOBAL_Platform_Color":"Platform colors","GLOBAL_Previous":"Previous","GLOBAL_Provide_Missing_Token":"A token must be provided to use this widget","GLOBAL_Public_Groups":"Public groups","GLOBAL_Publish":"Publish","GLOBAL_Recommended":"recommended","GLOBAL_Redirect_To_User_Profile_React":"Redirection to the profile page of {username}","GLOBAL_Reorder":"Reorder","GLOBAL_Reset":"Réinitialiser","GLOBAL_Save_as_draft":"Save draft","GLOBAL_Save":"Save","GLOBAL_Schedule_Action":"Schedule","GLOBAL_Schedule":"Schedule","GLOBAL_Scheduled_Date":"Scheduled date","GLOBAL_Search_Loading":"Searching...","GLOBAL_Search":"Search","GLOBAL_See_Less":"See less","GLOBAL_See_More":"See more","GLOBAL_Select_Date_In_Calendar":"Select a date in the calendar","GLOBAL_Select_Time":"Select time","GLOBAL_Select":"Select","GLOBAL_Send_Alert":"Envoyer le mail de notification à ceux qui l’ont demandé","GLOBAL_Sent":"Envoyé","GLOBAL_Settings":"Paramétrer","GLOBAL_Start_typing":"Start typing to search","GLOBAL_Successffully_Deleted":"Successfully deleted","GLOBAL_Today":"Today","GLOBAL_Unsuccessfully_Deleted":"An error occured while deleting your content","GLOBAL_Unsuported_File_Format":"Unsupported file format","GLOBAL_Users":"Users","GLOBAL_Validation":"Confirm","GLOBAL_Video_Player":"Video player","GLOBAL_Yesterday":"Yesterday","HIERARCHICAL_TAXONOMY_DESCRIPTION":"Browse and select options by checking the boxes. You can select an unlimited number of options.","HOMEUSER_Home":"Home","INPUT_FILE_ADVANCED_Dropbox":"Dropbox","INPUT_FILE_ADVANCED_File_Too_Large":"File exceeds the maximum allowed size (250 MB)","INPUT_FILE_ADVANCED_FileBank":"Filebank","INPUT_FILE_ADVANCED_Google_Drive":"Google Drive","INPUT_FILE_ADVANCED_Microsoft_365":"Microsoft 365","INPUT_RichText_Html_Modal_Label":"HTML content","INPUT_RichText_Html_Modal_Title":"Edit HTML content","INPUT_SELECT_Expand":"Expand","INPUT_SELECT_Has_Reached_Limit":"You reached the limit of {limit} items","INTRANET_Selection_Group":"Select a group","JIA_TINY_BUTTON_TOOLTIP":"AI features to help you write","JIA_TINY_DEVELOP":"Develop","JIA_TINY_SUMMARIZE":"Summarize","JIA_TINY_TLDR":"TLDR","Office_No_Providers":"Aucun fournisseur disponible, contactez un administrateur","Office_Set_Configuration":"Connectez-vous","OfficeHook_Conf_CalDav_Calendar":"Agenda","OfficeHook_Conf_CardDav_Address_Book":"Adress book","OfficeHook_Conf_IMap_Hostname":"Hostname","OfficeHook_Conf_IMap_Mailbox":"Mailbox","OfficeHook_Conf_Password":"Password","OfficeHook_Conf_Prompt_Submit":"Submit","OfficeHook_Conf_Provider":"Provider","OfficeHook_Conf_Select_Connection_Security":"Connection security","OfficeHook_Conf_Select_Provider":"Select a provider","OfficeHook_Conf_Url":"Url","OfficeHook_Conf_Username":"Username","OfficeHook_Settings":"Paramètres généraux","PANEL_Background_Color":"Couleur du fond","PANEL_Description":"Description","PANEL_Edit_Slide_Background_Color":"Background color","PANEL_Edit_Slide_Background_Opacity_Filter":"Background opacity filter","PANEL_Image_Size":"Taille de l'image","PANEL_Size_Large":"Grand","PANEL_Size_Medium":"Moyen","PANEL_Size_Small":"Petit","PANEL_Text_Color":"Couleur du texte","PANEL_Text_Size":"Taille du texte","PANEL_Title":"Titre","PANEL_Widget_Empty_Setting":"Il n'y a rien à configurer","PANEL_Widget_Extension_Name":"Nom de l'extension","PANEL_Widget_Level":"Niveau d'affichage","PANEL_Widget_Selection":"Style & décorations","PANEL_Widget_Settings":"Configuration du widget","PANEL_Widget_Synchronize":"Synchronisation","PANEL_Widget_Text":"Ajouter du texte","PANEL_Widget_Url":"Copier l'url du widget","PLUGIN_Manager_CalDav_Prompt":"Tester la connexion CalDav","PLUGIN_Manager_CardDav_Prompt":"Tester la connexion CardDav","PLUGIN_Manager_Connection_Error":"Connexion impossible. Vérifiez vos identifiants","PLUGIN_Manager_IMap_Prompt":"Tester la connexion IMAP","POLL_See_Response_After":"Hidden answers","POWERED_BY_Link":"https://www.jamespot.com/","POWERED_BY_See_More":"Know more","POWERED_BY":"Powered by","PUBLISH_To":"Publish for","REMOVE_FAVORITE":"Remove from favorites","SEARCH_File":"Search file","SLIDER_IMAGE_Empty_Des":"Ajoutez une image pour illustrer votre widget !","SOCIALPOLL_Anonymous":"Anonymous answers","SPOTIT_Receive_A_Copy":"Receive a copy","SPOTLIGHT_Send_Alert_To_Subscribers":"Send notification mail to those who have requested it","STYLE_Background_Color":"Couleur de fond","STYLE_Border_Style_Dashed":"Bordure discontinue","STYLE_Border_Style_Dotted":"Bordure en pointillés","STYLE_Border_Style_None":"Aucune bordure","STYLE_Border_Style_Solid":"Bordure continue","STYLE_Border_Style":"Style de bordure","STYLE_Border_Width":"Taille de la bordure","STYLE_Box_Shadow":"Ombre portée","STYLE_Font_Weight_Bold":"Bold","STYLE_Font_Weight_Medium":"Medium","STYLE_Font_Weight_Normal":"Normal","STYLE_Font_Weight_Semi_Bold":"Semi bold","STYLE_Font_Weight":"Epaisseur du texte","STYLE_Line_Height":"Hauteur de ligne","STYLE_Padding":"Marge interne","STYLE_Position_Bottom_Center":"Position bas centre","STYLE_Position_Bottom_Left":"Position bas gauche","STYLE_Position_Bottom_Right":"Position bas droite","STYLE_Position_Center_Left":"Position centre gauche","STYLE_Position_Center_Right":"Position centre droite","STYLE_Position_Center":"Position centre","STYLE_Position_Top_Center":"Position haut centre","STYLE_Position_Top_Left":"Position haut gauche","STYLE_Position_Top_Right":"Position haut droite","STYLE_Position":"Position","STYLE_Radius":"Arrondi","STYLE_Text_Align_Center":"Center","STYLE_Text_Align_Justify":"Justify","STYLE_Text_Align_Left":"Left","STYLE_Text_Align_Right":"Right","STYLE_Text_Align":"Alignement du texte","STYLE_Text_Color":"Couleur du texte","STYLE_Text_Size":"Taille du texte","TINY_MCE_Insert_Markdown":"Insert Markdown","TINY_MCE_Markdown_Shortcuts":"Markdown shortcuts","WIDGET_Agenda_Accepted":"You participate","WIDGET_Agenda_Declined":"You don't participate","WIDGET_Agenda_Pending":"You haven't responded yet","WIDGET_Agenda":"Agenda","WIDGET_Builder":"Widget Builder","WIDGET_Button_Empty_Text":"Ajouter un label","WIDGET_Calendar_CalDav":"Office Agenda","WIDGET_Calendar_Group_Events":"Group","WIDGET_Calendar_Last_Events":"List","WIDGET_CALENDAR":"Calendar","WIDGET_Cannot_Display":"A widget is available but cannot be displayed here for now... ({widget})","WIDGET_Check_List_Description":"Add a checklist to keep track of progress","WIDGET_Check_List_Help":"Collaboration mode allows users with access to this widget to modify it","WIDGET_Collaboration":"Collaboration","WIDGET_Contact_CardDav":"Office Contacts","WIDGET_Contacts":"Contacts","WIDGET_Cover_Add_Button_Label":"Ajouter un bouton","WIDGET_Cover_Add_Image_Button_Label":"Ajouter une image","WIDGET_Cover_Button_Background_Color_Label":"Couleur du bouton","WIDGET_Cover_Button_Default_Label":"Bouton","WIDGET_Cover_Button_Size_Label":"Taille","WIDGET_Cover_Button_Target_Label":"Ouverture","WIDGET_Cover_Filter_Color_Label":"Couleur du filtre","WIDGET_Cover_Filter_Opacity_Label":"Opacité du filtre","WIDGET_Cover_Link_Url_Label":"Url","WIDGET_Cover_Update_Image_Button_Label":"Modifier l'image","WIDGET_Datasource_Cancel":"Annuler","WIDGET_Datasource_Excel_Broken_Model":"Les premières cellules de vos colonnes ne peuvent pas être vide. Corrigez votre fichier pour mettre à jour votre widget. ","WIDGET_Datasource_Object":"Source de donnée","WIDGET_Datasource_Select_Document":"Sélectionner depuis la banque documentaire","WIDGET_Datasource_Select_Wedoc_File":"Sélectionner depuis wedoc","WIDGET_Datasource_Spreadsheet_Header_Error":"Cette feuille contient au moins une colonne sans titre","WIDGET_Display_Level_1":"Icône","WIDGET_Display_Level_2":"Icône + Pastille","WIDGET_Display_Level_3":"Contenus","WIDGET_Display_Level_4":"Contenus + Interactions","WIDGET_Display_Level_Select":"Sélectionner un mode d'affichage","WIDGET_Email_IMAP":"Office Mails","WIDGET_Lucca_Absence_No_Result":"Aucun resultat","WIDGET_Lucca_Absence_Text":"Affichez les absents renseignés depuis votre outil RH Timmi pour une meilleure communication interne.","WIDGET_Lucca_Absence_Url_Error":"Une erreur s'est produite","WIDGET_Lucca_Absence_Url":"Url","WIDGET_Lucca_Absence":"Absence (Timmi)","WIDGET_Lucca_Absent_Until_Today":"Absent jusqu'a aujourd'hui","WIDGET_Lucca_Absent_Until_Tomorrow":"Absent jusqu'a demain","WIDGET_Lucca_Absent_Until":"Absent jusqu'au","WIDGET_Panel_Tpl_Warning_Message":"Il n'est pas possible de configurer ce widget en mode template","WIDGET_Presence_Availability":"{max} places disponibles","WIDGET_Presence_Is_Closed":"Il n'est plus possible de répondre à ce sondage","WIDGET_Presence_Limit_Response_Error":"Il n y a plus de place disponible","WIDGET_Presence_Limit_Value":"Présence maximum","WIDGET_Presence_Limit":"Limiter le nombre de places","WIDGET_Prompt_Dropdown":"Configurer","WIDGET_Prompt_Logout":"Se déconnecter","WIDGET_Quick_Survey_isStarted_no_modification":"The survey has already some answers, some modifications are not possible, if needed, please start a new survey.","WIDGET_Quick_Survey_isStarted":"The survey has already some answers, you can't make any change to it, if you need to, please reset the survey.","WIDGET_Quick_Survey_Reset":"Reset the survey answers","WIDGET_Quick_Survey_Text":"Add a survey to collect feedback","WIDGET_Quick_Survey":"Add a survey to collect feedback","WIDGET_Set_Widget":"Configurer","WIDGET_Slider_Autoplay":"Défilement automatique","WIDGET_Slider_Delay":"Délai de défilement","WIDGET_Survey_After_Help":"Respondents will only see the results once after they respond. They will no longer be able to edit their answer.","WIDGET_Survey_Anonymize_Help":"Les réponses de ce sondage seront anonymes : personne ne pourra savoir qui a répondu quoi, seulement les pourcentages.","WIDGET_Survey_Close_Survey_Description":"do you really want to finish this survey?","WIDGET_Survey_Close_Survey":"Close the survey","WIDGET_Survey_Closing_Help":"Display closing button","WIDGET_Survey_Closing":"Enable closing","WIDGET_Survey_Date_Add_Event":"Ajouter","WIDGET_Survey_Date_End_At":"Fin le {dateEnd}","WIDGET_Survey_Date_Label":"{label} {day} à {time}","WIDGET_Survey_Date_Participant_At":"Participants le {date}","WIDGET_Survey_Date_Revive_All":"Tous les participants","WIDGET_Survey_Date_Revive_Confirm":"Relancer","WIDGET_Survey_Date_Revive_Message":"Message de relance","WIDGET_Survey_Date_Revive_User_With_No_Response":"Les participants sans réponse","WIDGET_Survey_Date_Revive":"Relancer les participants","WIDGET_Survey_Date_Stats":"{totalResponse}/{totalRespondents} personnes ont répondu ({percent}%)","WIDGET_Survey_Multiple_Help":"Allow multiple responses","WIDGET_Survey_Multiple":"Multiple response","WIDGET_Survey_Open_Help":"Allows other users to add suggestion","WIDGET_Survey_Open":"Open survey","WIDGET_Text_Use_Flex_Label":"Disposition flexible","WIDGET_User_Profil_Display_Mode_Label":"Affichage du nom","WIDGET_User_Profil_Font_Weight_Label":"Gras","WIDGET_User_Profil_Only_Picture":"Image seule","WIDGET_User_Profil_Picture_Alt_Label":"Image de l'utilisateur","WIDGET_User_Profil_Picture_FirstName_LastName":"Avec prénom + nom","WIDGET_User_Profil_Picture_FirstName":"Avec prénom","WIDGET_User_Profil_Text_Max_Length_Description":"Maximum 30 caractères","WIDGET_User_Profil_Text":"Permettez à vos utilisateur un accès vers leur propre profil en un clic ! Idéal pour les encourager à le compléter. ","WIDGET_User_Profil_Tooltip_Link_Text":"Accéder à votre profil","WIDGET_User_Profil":"Profil utilisateur","WIDGET_Welcome_Default_Message":"Bienvenue","WIDGET_Welcome_Linebreak_Label":"Saut de ligne (après le message)","WIDGET_Welcome":"Message d'accueil"}`),dL={en:cL};function vE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _a={exports:{}},ds={};var Ib;function uL(){if(Ib)return ds;Ib=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,A,i){var o=null;if(i!==void 0&&(o=""+i),A.key!==void 0&&(o=""+A.key),"key"in A){i={};for(var a in A)a!=="key"&&(i[a]=A[a])}else i=A;return A=i.ref,{$$typeof:e,type:r,key:o,ref:A!==void 0?A:null,props:i}}return ds.Fragment=t,ds.jsx=n,ds.jsxs=n,ds}var us={};var Tb;function fL(){return Tb||(Tb=1,process.env.NODE_ENV!=="production"&&(function(){function e(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===F?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case w:return"Fragment";case C:return"Profiler";case b:return"StrictMode";case E:return"Suspense";case D:return"SuspenseList";case Q:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case v:return"Portal";case y:return S.displayName||"Context";case x:return(S._context.displayName||"Context")+".Consumer";case B:var M=S.render;return S=S.displayName,S||(S=M.displayName||M.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case I:return M=S.displayName||null,M!==null?M:e(S.type)||"Memo";case T:M=S._payload,S=S._init;try{return e(S(M))}catch{}}return null}function t(S){return""+S}function n(S){try{t(S);var M=!1}catch{M=!0}if(M){M=console;var V=M.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return V.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),t(S)}}function r(S){if(S===w)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===T)return"<...>";try{var M=e(S);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function A(){var S=U.A;return S===null?null:S.getOwner()}function i(){return Error("react-stack-top-frame")}function o(S){if(z.call(S,"key")){var M=Object.getOwnPropertyDescriptor(S,"key").get;if(M&&M.isReactWarning)return!1}return S.key!==void 0}function a(S,M){function V(){Z||(Z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}V.isReactWarning=!0,Object.defineProperty(S,"key",{get:V,configurable:!0})}function l(){var S=e(this.type);return Y[S]||(Y[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function c(S,M,V,N,j,G){var X=V.ref;return S={$$typeof:p,type:S,key:M,props:V,_owner:N},(X!==void 0?X:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:l}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function d(S,M,V,N,j,G){var X=M.children;if(X!==void 0)if(N)if(k(X)){for(N=0;N<X.length;N++)u(X[N]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(X);if(z.call(M,"key")){X=e(S);var O=Object.keys(M).filter(function(se){return se!=="key"});N=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",L[X+N]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
121
121
|
let props = %s;
|
|
122
122
|
<%s {...props} />
|
|
123
123
|
React keys must be passed directly to JSX without using spread:
|
|
124
124
|
let props = %s;
|
|
125
|
-
<%s key={someKey} {...props} />`,N,X,O,X),L[X+N]=!0)}if(X=null,V!==void 0&&(n(V),X=""+V),o(M)&&(n(M.key),X=""+M.key),"key"in M){V={};for(var oe in M)oe!=="key"&&(V[oe]=M[oe])}else V=M;return X&&a(V,typeof S=="function"?S.displayName||S.name||"Unknown":S),c(S,X,V,A(),j,G)}function u(S){f(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===T&&(S._payload.status==="fulfilled"?f(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function f(S){return typeof S=="object"&&S!==null&&S.$$typeof===p}var g=h,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),U=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,k=Array.isArray,W=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(S){return S()}};var Z,
|
|
125
|
+
<%s key={someKey} {...props} />`,N,X,O,X),L[X+N]=!0)}if(X=null,V!==void 0&&(n(V),X=""+V),o(M)&&(n(M.key),X=""+M.key),"key"in M){V={};for(var oe in M)oe!=="key"&&(V[oe]=M[oe])}else V=M;return X&&a(V,typeof S=="function"?S.displayName||S.name||"Unknown":S),c(S,X,V,A(),j,G)}function u(S){f(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===T&&(S._payload.status==="fulfilled"?f(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function f(S){return typeof S=="object"&&S!==null&&S.$$typeof===p}var g=h,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),U=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,k=Array.isArray,W=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(S){return S()}};var Z,Y={},J=g.react_stack_bottom_frame.bind(g,i)(),Ae=W(r(i)),L={};us.Fragment=w,us.jsx=function(S,M,V){var N=1e4>U.recentlyCreatedOwnerStacks++;return d(S,M,V,!1,N?Error("react-stack-top-frame"):J,N?W(r(S)):Ae)},us.jsxs=function(S,M,V){var N=1e4>U.recentlyCreatedOwnerStacks++;return d(S,M,V,!0,N?Error("react-stack-top-frame"):J,N?W(r(S)):Ae)}})()),us}var Ob;function gL(){return Ob||(Ob=1,process.env.NODE_ENV==="production"?_a.exports=uL():_a.exports=fL()),_a.exports}var s=gL();const hL=({children:e,onDoubleTap:t,onDoubleTapMsDelay:n=400})=>{const[r,A]=h.useState(0);h.useEffect(()=>{r>1&&(t(),A(0))},[r,t]);const i=()=>{A(r+1),setTimeout(()=>{A(0)},n)};return s.jsx("div",{onClick:i,children:e})},Ui=({elms:e,renderEl:t,onDrag:n,onDrop:r,isFullWidth:A=!1})=>s.jsx(_n.DndProvider,{backend:SB.HTML5Backend,children:e.map((i,o)=>s.jsx(pL,{onDrag:n,onDrop:r,index:o,isFullWidth:A,children:s.jsx(s.Fragment,{children:t(i,o)})},o))}),pL=({children:e,index:t,onDrag:n,onDrop:r,isFullWidth:A})=>{const i=h.useRef(null),[,o]=_n.useDrop({accept:"div",drop(d){if(!i.current||!r)return;const u=d.index;r(u,0)},hover(d,u){if(!i.current)return;const f=d.index,g=t;if(f===g)return;const p=i.current?.getBoundingClientRect(),v=(p.bottom-p.top)/2,b=u.getClientOffset().y-p.top;f<g&&b<v||f>g&&b>v||(n(f,g),d.index=g)}}),[{isDragging:a},l]=_n.useDrag({type:"div",item:()=>({index:t}),collect:d=>({isDragging:d.isDragging()})}),c=h.useMemo(()=>({opacity:a?.4:1,width:A?"100%":"auto"}),[a,A]);return l(o(i)),s.jsx("div",{ref:i,style:c,children:e})};function nr(){const e=h.useContext(m.ThemeContext);if(!e)throw new Error("useMyContext must be used inside <MyContext.Provider>");return e}const Nd=(e={})=>m.css`
|
|
126
126
|
outline: 2px solid;
|
|
127
127
|
outline-color: ${t=>e.color?Ei(t.theme,e.color):"currentColor"};
|
|
128
128
|
outline-offset: ${e.offset??"-4px"};
|
|
@@ -330,7 +330,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
330
330
|
font-size: ${e=>FL.get(e.size??"m")};
|
|
331
331
|
`,No=m.p`
|
|
332
332
|
${BE};
|
|
333
|
-
`,Uo=Math.min,Di=Math.max,kc=Math.round,tl=Math.floor,eA=e=>({x:e,y:e}),LL={left:"right",right:"left",bottom:"top",top:"bottom"};function sp(e,t,n){return Di(e,Uo(t,n))}function Ca(e,t){return typeof e=="function"?e(t):e}function ji(e){return e.split("-")[0]}function Ba(e){return e.split("-")[1]}function EE(e){return e==="x"?"y":"x"}function Hm(e){return e==="y"?"height":"width"}function HA(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function km(e){return EE(HA(e))}function PL(e,t,n){n===void 0&&(n=!1);const r=Ba(e),A=km(e),i=Hm(A);let o=A==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Nc(o)),[o,Nc(o)]}function ML(e){const t=Nc(e);return[ap(e),t,ap(t)]}function ap(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Qb=["left","right"],Rb=["right","left"],HL=["top","bottom"],kL=["bottom","top"];function NL(e,t,n){switch(e){case"top":case"bottom":return n?t?Rb:Qb:t?Qb:Rb;case"left":case"right":return t?HL:kL;default:return[]}}function UL(e,t,n,r){const A=Ba(e);let i=NL(ji(e),n==="start",r);return A&&(i=i.map(o=>o+"-"+A),t&&(i=i.concat(i.map(ap)))),i}function Nc(e){const t=ji(e);return LL[t]+e.slice(t.length)}function zL(e){return{top:0,right:0,bottom:0,left:0,...e}}function DE(e){return typeof e!="number"?zL(e):{top:e,right:e,bottom:e,left:e}}function Uc(e){const{x:t,y:n,width:r,height:A}=e;return{width:r,height:A,top:n,left:t,right:t+r,bottom:n+A,x:t,y:n}}function jb(e,t,n){let{reference:r,floating:A}=e;const i=HA(t),o=km(t),a=Hm(o),l=ji(t),c=i==="y",d=r.x+r.width/2-A.width/2,u=r.y+r.height/2-A.height/2,f=r[a]/2-A[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-A.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-A.width,y:u};break;default:g={x:r.x,y:r.y}}switch(Ba(t)){case"start":g[o]-=f*(n&&c?-1:1);break;case"end":g[o]+=f*(n&&c?-1:1);break}return g}async function WL(e,t){var n;t===void 0&&(t={});const{x:r,y:A,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:g=0}=Ca(t,e),p=DE(g),w=a[f?u==="floating"?"reference":"floating":u],b=Uc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),C=u==="floating"?{x:r,y:A,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),y=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},B=Uc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:x,strategy:l}):C);return{top:(b.top-B.top+p.top)/y.y,bottom:(B.bottom-b.bottom+p.bottom)/y.y,left:(b.left-B.left+p.left)/y.x,right:(B.right-b.right+p.right)/y.x}}const XL=50,GL=async(e,t,n)=>{const{placement:r="bottom",strategy:A="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:WL},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:A}),{x:d,y:u}=jb(c,r,l),f=r,g=0;const p={};for(let v=0;v<i.length;v++){const w=i[v];if(!w)continue;const{name:b,fn:C}=w,{x,y,data:B,reset:E}=await C({x:d,y:u,initialPlacement:r,placement:f,strategy:A,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=x??d,u=y??u,p[b]={...p[b],...B},E&&g<XL&&(g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:A}):E.rects),{x:d,y:u}=jb(c,f,l)),v=-1)}return{x:d,y:u,placement:f,strategy:A,middlewareData:p}},VL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:A,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Ca(e,t)||{};if(c==null)return{};const u=DE(d),f={x:n,y:r},g=km(A),p=Hm(g),v=await o.getDimensions(c),w=g==="y",b=w?"top":"left",C=w?"bottom":"right",x=w?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[g]-f[g]-i.floating[p],B=f[g]-i.reference[g],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let D=E?E[x]:0;(!D||!await(o.isElement==null?void 0:o.isElement(E)))&&(D=a.floating[x]||i.floating[p]);const I=y/2-B/2,T=D/2-v[p]/2-1,Q=Uo(u[b],T),F=Uo(u[C],T),U=Q,z=D-v[p]-F,k=D/2-v[p]/2+I,W=sp(U,k,z),Z=!l.arrow&&Ba(A)!=null&&k!==W&&i.reference[p]/2-(k<U?Q:F)-v[p]/2<0,J=Z?k<U?k-U:k-z:0;return{[g]:f[g]+J,data:{[g]:W,centerOffset:k-W-J,...Z&&{alignmentOffset:J}},reset:Z}}}),KL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:A,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...w}=Ca(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=ji(A),C=HA(a),x=ji(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(c.floating)),B=f||(x||!v?[Nc(a)]:ML(a)),E=p!=="none";!f&&E&&B.push(...UL(a,v,p,y));const D=[a,...B],I=await l.detectOverflow(t,w),T=[];let Q=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&T.push(I[b]),u){const k=PL(A,o,y);T.push(I[k[0]],I[k[1]])}if(Q=[...Q,{placement:A,overflows:T}],!T.every(k=>k<=0)){var F,U;const k=(((F=i.flip)==null?void 0:F.index)||0)+1,W=D[k];if(W&&(!(u==="alignment"?C!==HA(W):!1)||Q.every(Y=>HA(Y.placement)===C?Y.overflows[0]>0:!0)))return{data:{index:k,overflows:Q},reset:{placement:W}};let Z=(U=Q.filter(J=>J.overflows[0]<=0).sort((J,Y)=>J.overflows[1]-Y.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(g){case"bestFit":{var z;const J=(z=Q.filter(Y=>{if(E){const Ae=HA(Y.placement);return Ae===C||Ae==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(Ae=>Ae>0).reduce((Ae,L)=>Ae+L,0)]).sort((Y,Ae)=>Y[1]-Ae[1])[0])==null?void 0:z[0];J&&(Z=J);break}case"initialPlacement":Z=a;break}if(A!==Z)return{reset:{placement:Z}}}return{}}}},qL=new Set(["left","top"]);async function JL(e,t){const{placement:n,platform:r,elements:A}=e,i=await(r.isRTL==null?void 0:r.isRTL(A.floating)),o=ji(n),a=Ba(n),l=HA(n)==="y",c=qL.has(o)?-1:1,d=i&&l?-1:1,u=Ca(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(g=a==="end"?p*-1:p),l?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const YL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:A,y:i,placement:o,middlewareData:a}=t,l=await JL(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:A+l.x,y:i+l.y,data:{...l,placement:o}}}}},ZL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:A,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:C,y:x}=b;return{x:C,y:x}}},...c}=Ca(e,t),d={x:n,y:r},u=await i.detectOverflow(t,c),f=HA(ji(A)),g=EE(f);let p=d[g],v=d[f];if(o){const b=g==="y"?"top":"left",C=g==="y"?"bottom":"right",x=p+u[b],y=p-u[C];p=sp(x,p,y)}if(a){const b=f==="y"?"top":"left",C=f==="y"?"bottom":"right",x=v+u[b],y=v-u[C];v=sp(x,v,y)}const w=l.fn({...t,[g]:p,[f]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:o,[f]:a}}}}}};function Wd(){return typeof window<"u"}function es(e){return SE(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rA(e){var t;return(t=(SE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SE(e){return Wd()?e instanceof Node||e instanceof Jn(e).Node:!1}function Fr(e){return Wd()?e instanceof Element||e instanceof Jn(e).Element:!1}function DA(e){return Wd()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function Fb(e){return!Wd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}function Ea(e){const{overflow:t,overflowX:n,overflowY:r,display:A}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&A!=="inline"&&A!=="contents"}function _L(e){return/^(table|td|th)$/.test(es(e))}function Xd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $L=/transform|translate|scale|rotate|perspective|filter/,eP=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none";let kf;function Nm(e){const t=Fr(e)?Lr(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!Um()&&(ai(t.backdropFilter)||ai(t.filter))||$L.test(t.willChange||"")||eP.test(t.contain||"")}function tP(e){let t=YA(e);for(;DA(t)&&!zo(t);){if(Nm(t))return t;if(Xd(t))return null;t=YA(t)}return null}function Um(){return kf==null&&(kf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),kf}function zo(e){return/^(html|body|#document)$/.test(es(e))}function Lr(e){return Jn(e).getComputedStyle(e)}function Gd(e){return Fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function YA(e){if(es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fb(e)&&e.host||rA(e);return Fb(t)?t.host:t}function IE(e){const t=YA(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:DA(t)&&Ea(t)?t:IE(t)}function oa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const A=IE(e),i=A===((r=e.ownerDocument)==null?void 0:r.body),o=Jn(A);if(i){const a=lp(o);return t.concat(o,o.visualViewport||[],Ea(A)?A:[],a&&n?oa(a):[])}else return t.concat(A,oa(A,[],n))}function lp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TE(e){const t=Lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const A=DA(e),i=A?e.offsetWidth:n,o=A?e.offsetHeight:r,a=kc(n)!==i||kc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function zm(e){return Fr(e)?e:e.contextElement}function jo(e){const t=zm(e);if(!DA(t))return eA(1);const n=t.getBoundingClientRect(),{width:r,height:A,$:i}=TE(t);let o=(i?kc(n.width):n.width)/r,a=(i?kc(n.height):n.height)/A;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const nP=eA(0);function OE(e){const t=Jn(e);return!Um()||!t.visualViewport?nP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const A=e.getBoundingClientRect(),i=zm(e);let o=eA(1);t&&(r?Fr(r)&&(o=jo(r)):o=jo(e));const a=rP(i,n,r)?OE(i):eA(0);let l=(A.left+a.x)/o.x,c=(A.top+a.y)/o.y,d=A.width/o.x,u=A.height/o.y;if(i){const f=Jn(i),g=r&&Fr(r)?Jn(r):r;let p=f,v=lp(p);for(;v&&r&&g!==p;){const w=jo(v),b=v.getBoundingClientRect(),C=Lr(v),x=b.left+(v.clientLeft+parseFloat(C.paddingLeft))*w.x,y=b.top+(v.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=x,c+=y,p=Jn(v),v=lp(p)}}return Uc({width:d,height:u,x:l,y:c})}function Vd(e,t){const n=Gd(e).scrollLeft;return t?t.left+n:Fi(rA(e)).left+n}function QE(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Vd(e,n),A=n.top+t.scrollTop;return{x:r,y:A}}function AP(e){let{elements:t,rect:n,offsetParent:r,strategy:A}=e;const i=A==="fixed",o=rA(r),a=t?Xd(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=eA(1);const d=eA(0),u=DA(r);if((u||!u&&!i)&&((es(r)!=="body"||Ea(o))&&(l=Gd(r)),u)){const g=Fi(r);c=jo(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=o&&!u&&!i?QE(o,l):eA(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}}function iP(e){return Array.from(e.getClientRects())}function oP(e){const t=rA(e),n=Gd(e),r=e.ownerDocument.body,A=Di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Vd(e);const a=-n.scrollTop;return Lr(r).direction==="rtl"&&(o+=Di(t.clientWidth,r.clientWidth)-A),{width:A,height:i,x:o,y:a}}const Lb=25;function sP(e,t){const n=Jn(e),r=rA(e),A=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(A){i=A.width,o=A.height;const d=Um();(!d||d&&t==="fixed")&&(a=A.offsetLeft,l=A.offsetTop)}const c=Vd(r);if(c<=0){const d=r.ownerDocument,u=d.body,f=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-g);p<=Lb&&(i-=p)}else c<=Lb&&(i+=c);return{width:i,height:o,x:a,y:l}}function aP(e,t){const n=Fi(e,!0,t==="fixed"),r=n.top+e.clientTop,A=n.left+e.clientLeft,i=DA(e)?jo(e):eA(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=A*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Pb(e,t,n){let r;if(t==="viewport")r=sP(e,n);else if(t==="document")r=oP(rA(e));else if(Fr(t))r=aP(t,n);else{const A=OE(e);r={x:t.x-A.x,y:t.y-A.y,width:t.width,height:t.height}}return Uc(r)}function RE(e,t){const n=YA(e);return n===t||!Fr(n)||zo(n)?!1:Lr(n).position==="fixed"||RE(n,t)}function lP(e,t){const n=t.get(e);if(n)return n;let r=oa(e,[],!1).filter(a=>Fr(a)&&es(a)!=="body"),A=null;const i=Lr(e).position==="fixed";let o=i?YA(e):e;for(;Fr(o)&&!zo(o);){const a=Lr(o),l=Nm(o);!l&&a.position==="fixed"&&(A=null),(i?!l&&!A:!l&&a.position==="static"&&!!A&&(A.position==="absolute"||A.position==="fixed")||Ea(o)&&!l&&RE(e,o))?r=r.filter(d=>d!==o):A=a,o=YA(o)}return t.set(e,r),r}function cP(e){let{element:t,boundary:n,rootBoundary:r,strategy:A}=e;const o=[...n==="clippingAncestors"?Xd(t)?[]:lP(t,this._c):[].concat(n),r],a=Pb(t,o[0],A);let l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<o.length;f++){const g=Pb(t,o[f],A);l=Di(g.top,l),c=Uo(g.right,c),d=Uo(g.bottom,d),u=Di(g.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function dP(e){const{width:t,height:n}=TE(e);return{width:t,height:n}}function uP(e,t,n){const r=DA(t),A=rA(t),i=n==="fixed",o=Fi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=eA(0);function c(){l.x=Vd(A)}if(r||!r&&!i)if((es(t)!=="body"||Ea(A))&&(a=Gd(t)),r){const g=Fi(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else A&&c();i&&!r&&A&&c();const d=A&&!r&&!i?QE(A,a):eA(0),u=o.left+a.scrollLeft-l.x-d.x,f=o.top+a.scrollTop-l.y-d.y;return{x:u,y:f,width:o.width,height:o.height}}function Nf(e){return Lr(e).position==="static"}function Mb(e,t){if(!DA(e)||Lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rA(e)===n&&(n=n.ownerDocument.body),n}function jE(e,t){const n=Jn(e);if(Xd(e))return n;if(!DA(e)){let A=YA(e);for(;A&&!zo(A);){if(Fr(A)&&!Nf(A))return A;A=YA(A)}return n}let r=Mb(e,t);for(;r&&_L(r)&&Nf(r);)r=Mb(r,t);return r&&zo(r)&&Nf(r)&&!Nm(r)?n:r||tP(e)||n}const fP=async function(e){const t=this.getOffsetParent||jE,n=this.getDimensions,r=await n(e.floating);return{reference:uP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gP(e){return Lr(e).direction==="rtl"}const hP={convertOffsetParentRelativeRectToViewportRelativeRect:AP,getDocumentElement:rA,getClippingRect:cP,getOffsetParent:jE,getElementRects:fP,getClientRects:iP,getDimensions:dP,getScale:jo,isElement:Fr,isRTL:gP};function FE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pP(e,t){let n=null,r;const A=rA(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:g}=c;if(a||t(),!f||!g)return;const p=tl(u),v=tl(A.clientWidth-(d+f)),w=tl(A.clientHeight-(u+g)),b=tl(d),x={rootMargin:-p+"px "+-v+"px "+-w+"px "+-b+"px",threshold:Di(0,Uo(1,l))||1};let y=!0;function B(E){const D=E[0].intersectionRatio;if(D!==l){if(!y)return o();D?o(!1,D):r=setTimeout(()=>{o(!1,1e-7)},1e3)}D===1&&!FE(c,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(B,{...x,root:A.ownerDocument})}catch{n=new IntersectionObserver(B,x)}n.observe(e)}return o(!0),i}function mP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:A=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zm(e),d=A||i?[...c?oa(c):[],...t?oa(t):[]]:[];d.forEach(b=>{A&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const u=c&&a?pP(c,n):null;let f=-1,g=null;o&&(g=new ResizeObserver(b=>{let[C]=b;C&&C.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),c&&!l&&g.observe(c),t&&g.observe(t));let p,v=l?Fi(e):null;l&&w();function w(){const b=Fi(e);v&&!FE(v,b)&&n(),v=b,p=requestAnimationFrame(w)}return n(),()=>{var b;d.forEach(C=>{A&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),u?.(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(p)}}const vP=YL,wP=ZL,bP=KL,xP=VL,Hb=(e,t,n)=>{const r=new Map,A={platform:hP,...n},i={...A.platform,_c:r};return GL(e,t,{...A,platform:i})};var Uf={exports:{}};var kb;function yP(){return kb||(kb=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(i=A(i,r(a)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var a in i)t.call(i,a)&&i[a]&&(o=A(o,a));return o}function A(i,o){return o?i?i+" "+o:i+o:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Uf)),Uf.exports}var CP=yP();const zc=vE(CP);const BP="react-tooltip-core-styles",EP="react-tooltip-base-styles",Nb={core:!1,base:!1};function Ub({css:e,id:t=EP,type:n="base",ref:r}){var A,i;if(!e||typeof document>"u"||Nb[n]||n==="core"&&typeof process<"u"&&(!((A=process==null?void 0:process.env)===null||A===void 0)&&A.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process<"u"&&(!((i=process==null?void 0:process.env)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(t=BP),r||(r={});const{insertAt:o}=r;if(document.getElementById(t))return;const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",o==="top"&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),Nb[n]=!0}const zb=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:A=10,strategy:i="absolute",middlewares:o=[vP(Number(A)),bP({fallbackAxisSideDirection:"start"}),wP({padding:5})],border:a,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=o;return n?(c.push(xP({element:n,padding:5})),Hb(e,t,{placement:r,strategy:i,middleware:c}).then((({x:d,y:u,placement:f,middlewareData:g})=>{var p,v;const w={left:`${d}px`,top:`${u}px`,border:a},{x:b,y:C}=(p=g.arrow)!==null&&p!==void 0?p:{x:0,y:0},x=(v={top:"bottom",right:"left",bottom:"top",left:"right"}[f.split("-")[0]])!==null&&v!==void 0?v:"bottom",y=a&&{borderBottom:a,borderRight:a};let B=0;if(a){const E=`${a}`.match(/(\d+)px/);B=E?.[1]?Number(E[1]):1}return{tooltipStyles:w,tooltipArrowStyles:{left:b!=null?`${b}px`:"",top:C!=null?`${C}px`:"",right:"",bottom:"",...y,[x]:`-${l/2+B}px`},place:f}}))):Hb(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:d,y:u,placement:f})=>({tooltipStyles:{left:`${d}px`,top:`${u}px`},tooltipArrowStyles:{},place:f})))},Wb=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Xb=(e,t,n)=>{let r=null;const A=function(...i){const o=()=>{r=null};!r&&(e.apply(this,i),r=setTimeout(o,t))};return A.cancel=()=>{r&&(clearTimeout(r),r=null)},A},Gb=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",cp=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((A,i)=>cp(A,t[i])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Gb(e)||!Gb(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((A=>cp(e[A],t[A])))},DP=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"}))},Vb=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(DP(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},SP=typeof window<"u"?h.useLayoutEffect:h.useEffect,ar=e=>{e.current&&(clearTimeout(e.current),e.current=null)},IP="DEFAULT_TOOLTIP_ID",TP={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},OP=h.createContext({getTooltipData:()=>TP});function LE(e=IP){return h.useContext(OP).getTooltipData(e)}var Ji={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},zf={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const QP=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:A="dark",anchorId:i,anchorSelect:o,place:a="top",offset:l=10,events:c=["hover"],openOnClick:d=!1,positionStrategy:u="absolute",middlewares:f,wrapper:g,delayShow:p=0,delayHide:v=0,float:w=!1,hidden:b=!1,noArrow:C=!1,clickable:x=!1,closeOnEsc:y=!1,closeOnScroll:B=!1,closeOnResize:E=!1,openEvents:D,closeEvents:I,globalCloseEvents:T,imperativeModeOnly:Q,style:F,position:U,afterShow:z,afterHide:k,disableTooltip:W,content:Z,contentWrapperRef:J,isOpen:Y,defaultIsOpen:Ae=!1,setIsOpen:L,previousActiveAnchor:S,activeAnchor:M,setActiveAnchor:V,border:N,opacity:j,arrowColor:G,arrowSize:X=8,role:O="tooltip"})=>{var oe;const se=h.useRef(null),He=h.useRef(null),re=h.useRef(null),te=h.useRef(null),xe=h.useRef(null),[Oe,Te]=h.useState({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[Re,lt]=h.useState(!1),[le,Pe]=h.useState(!1),[fe,Ct]=h.useState(null),xr=h.useRef(!1),En=h.useRef(null),{anchorRefs:Dn,setActiveAnchor:Sn}=LE(t),Gt=h.useRef(!1),[In,zr]=h.useState([]),rr=h.useRef(!1),Ar=d||c.includes("click"),aA=Ar||D?.click||D?.dblclick||D?.mousedown,ir=D?{...D}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!D&&Ar&&Object.assign(ir,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Tn=I?{...I}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!I&&Ar&&Object.assign(Tn,{mouseleave:!1,blur:!1,mouseout:!1});const rt=T?{...T}:{escape:y||!1,scroll:B||!1,resize:E||!1,clickOutsideAnchor:aA||!1};Q&&(Object.assign(ir,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Tn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(rt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),SP((()=>(rr.current=!0,()=>{rr.current=!1})),[]);const Bt=ce=>{rr.current&&(ce&&Pe(!0),setTimeout((()=>{rr.current&&(L?.(ce),Y===void 0&<(ce))}),10))};h.useEffect((()=>{if(t){if(Re){Ee(S);const he=ce(M),qe=[...new Set([...he,t])].filter(Boolean).join(" ");M?.setAttribute("aria-describedby",qe)}else Ee(M);return()=>{Ee(M),Ee(S)}}function ce(he){var qe;return((qe=he?.getAttribute("aria-describedby"))===null||qe===void 0?void 0:qe.split(" "))||[]}function Ee(he){const qe=ce(he).filter((Lt=>Lt!==t));qe.length?he?.setAttribute("aria-describedby",qe.join(" ")):he?.removeAttribute("aria-describedby")}}),[M,Re,t,S]),h.useEffect((()=>{if(Y===void 0)return()=>null;Y&&Pe(!0);const ce=setTimeout((()=>{lt(Y)}),10);return()=>{clearTimeout(ce)}}),[Y]),h.useEffect((()=>{if(Re!==xr.current)if(ar(xe),xr.current=Re,Re)z?.();else{const ce=(Ee=>{const he=Ee.match(/^([\d.]+)(ms|s)$/);if(!he)return 0;const[,qe,Lt]=he;return Number(qe)*(Lt==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));xe.current=setTimeout((()=>{Pe(!1),Ct(null),k?.()}),ce+25)}}),[Re]);const or=ce=>{Te((Ee=>cp(Ee,ce)?Ee:ce))},yr=(ce=p)=>{ar(re),le?Bt(!0):re.current=setTimeout((()=>{Bt(!0)}),ce)},Qe=(ce=v)=>{ar(te),te.current=setTimeout((()=>{Gt.current||Bt(!1)}),ce)},ze=ce=>{var Ee;if(!ce)return;const he=(Ee=ce.currentTarget)!==null&&Ee!==void 0?Ee:ce.target;if(!he?.isConnected)return V(null),void Sn({current:null});p?yr():Bt(!0),V(he),Sn({current:he}),ar(te)},we=()=>{x?Qe(v||100):v?Qe():Bt(!1),ar(re)},Ge=({x:ce,y:Ee})=>{var he;const qe={getBoundingClientRect:()=>({x:ce,y:Ee,width:0,height:0,top:Ee,left:ce,right:ce,bottom:Ee})};zb({place:(he=fe?.place)!==null&&he!==void 0?he:a,offset:l,elementReference:qe,tooltipReference:se.current,tooltipArrowReference:He.current,strategy:u,middlewares:f,border:N,arrowSize:X}).then((Lt=>{or(Lt)}))},ut=ce=>{if(!ce)return;const Ee=ce,he={x:Ee.clientX,y:Ee.clientY};Ge(he),En.current=he},Ne=ce=>{var Ee;if(!Re)return;const he=ce.target;he.isConnected&&(!((Ee=se.current)===null||Ee===void 0)&&Ee.contains(he)||[document.querySelector(`[id='${i}']`),...In].some((qe=>qe?.contains(he)))||(Bt(!1),ar(re)))},IA=Xb(ze,50),Ue=Xb(we,50),mt=ce=>{Ue.cancel(),IA(ce)},Ce=()=>{IA.cancel(),Ue()},We=h.useCallback((()=>{var ce,Ee;const he=(ce=fe?.position)!==null&&ce!==void 0?ce:U;he?Ge(he):w?En.current&&Ge(En.current):M?.isConnected&&zb({place:(Ee=fe?.place)!==null&&Ee!==void 0?Ee:a,offset:l,elementReference:M,tooltipReference:se.current,tooltipArrowReference:He.current,strategy:u,middlewares:f,border:N,arrowSize:X}).then((qe=>{rr.current&&or(qe)}))}),[Re,M,Z,F,a,fe?.place,l,u,U,fe?.position,w,X]);h.useEffect((()=>{var ce,Ee;const he=new Set(Dn);In.forEach((De=>{W?.(De)||he.add({current:De})}));const qe=document.querySelector(`[id='${i}']`);qe&&!W?.(qe)&&he.add({current:qe});const Lt=()=>{Bt(!1)},Un=Vb(M),On=Vb(se.current);rt.scroll&&(window.addEventListener("scroll",Lt),Un?.addEventListener("scroll",Lt),On?.addEventListener("scroll",Lt));let Vt=null;rt.resize?window.addEventListener("resize",Lt):M&&se.current&&(Vt=mP(M,se.current,We,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Qt=De=>{De.key==="Escape"&&Bt(!1)};rt.escape&&window.addEventListener("keydown",Qt),rt.clickOutsideAnchor&&window.addEventListener("click",Ne);const ct=[],lA=De=>!!(De?.target&&M?.contains(De.target)),za=De=>{Re&&lA(De)||ze(De)},Wa=De=>{Re&&lA(De)&&we()},Xa=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],be=["click","dblclick","mousedown","mouseup"];Object.entries(ir).forEach((([De,ft])=>{ft&&(Xa.includes(De)?ct.push({event:De,listener:mt}):be.includes(De)&&ct.push({event:De,listener:za}))})),Object.entries(Tn).forEach((([De,ft])=>{ft&&(Xa.includes(De)?ct.push({event:De,listener:Ce}):be.includes(De)&&ct.push({event:De,listener:Wa}))})),w&&ct.push({event:"pointermove",listener:ut});const P=()=>{Gt.current=!0},ie=()=>{Gt.current=!1,we()},pe=x&&(Tn.mouseout||Tn.mouseleave);return pe&&((ce=se.current)===null||ce===void 0||ce.addEventListener("mouseover",P),(Ee=se.current)===null||Ee===void 0||Ee.addEventListener("mouseout",ie)),ct.forEach((({event:De,listener:ft})=>{he.forEach((vt=>{var Ut;(Ut=vt.current)===null||Ut===void 0||Ut.addEventListener(De,ft)}))})),()=>{var De,ft;rt.scroll&&(window.removeEventListener("scroll",Lt),Un?.removeEventListener("scroll",Lt),On?.removeEventListener("scroll",Lt)),rt.resize?window.removeEventListener("resize",Lt):Vt?.(),rt.clickOutsideAnchor&&window.removeEventListener("click",Ne),rt.escape&&window.removeEventListener("keydown",Qt),pe&&((De=se.current)===null||De===void 0||De.removeEventListener("mouseover",P),(ft=se.current)===null||ft===void 0||ft.removeEventListener("mouseout",ie)),ct.forEach((({event:vt,listener:Ut})=>{he.forEach((Cr=>{var Xr;(Xr=Cr.current)===null||Xr===void 0||Xr.removeEventListener(vt,Ut)}))}))}}),[M,We,le,Dn,In,D,I,T,Ar,p,v]),h.useEffect((()=>{var ce,Ee;let he=(Ee=(ce=fe?.anchorSelect)!==null&&ce!==void 0?ce:o)!==null&&Ee!==void 0?Ee:"";!he&&t&&(he=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const qe=new MutationObserver((Lt=>{const Un=[],On=[];Lt.forEach((Vt=>{if(Vt.type==="attributes"&&Vt.attributeName==="data-tooltip-id"&&(Vt.target.getAttribute("data-tooltip-id")===t?Un.push(Vt.target):Vt.oldValue===t&&On.push(Vt.target)),Vt.type==="childList"){if(M){const Qt=[...Vt.removedNodes].filter((ct=>ct.nodeType===1));if(he)try{On.push(...Qt.filter((ct=>ct.matches(he)))),On.push(...Qt.flatMap((ct=>[...ct.querySelectorAll(he)])))}catch{}Qt.some((ct=>{var lA;return!!(!((lA=ct?.contains)===null||lA===void 0)&&lA.call(ct,M))&&(Pe(!1),Bt(!1),V(null),ar(re),ar(te),!0)}))}if(he)try{const Qt=[...Vt.addedNodes].filter((ct=>ct.nodeType===1));Un.push(...Qt.filter((ct=>ct.matches(he)))),Un.push(...Qt.flatMap((ct=>[...ct.querySelectorAll(he)])))}catch{}}})),(Un.length||On.length)&&zr((Vt=>[...Vt.filter((Qt=>!On.includes(Qt))),...Un]))}));return qe.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{qe.disconnect()}}),[t,o,fe?.anchorSelect,M]),h.useEffect((()=>{We()}),[We]),h.useEffect((()=>{if(!J?.current)return()=>null;const ce=new ResizeObserver((()=>{setTimeout((()=>We()))}));return ce.observe(J.current),()=>{ce.disconnect()}}),[Z,J?.current]),h.useEffect((()=>{var ce;const Ee=document.querySelector(`[id='${i}']`),he=[...In,Ee];M&&he.includes(M)||V((ce=In[0])!==null&&ce!==void 0?ce:Ee)}),[i,In,M]),h.useEffect((()=>(Ae&&Bt(!0),()=>{ar(re),ar(te)})),[]),h.useEffect((()=>{var ce;let Ee=(ce=fe?.anchorSelect)!==null&&ce!==void 0?ce:o;if(!Ee&&t&&(Ee=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),Ee)try{const he=Array.from(document.querySelectorAll(Ee));zr(he)}catch{zr([])}}),[t,o,fe?.anchorSelect]),h.useEffect((()=>{re.current&&(ar(re),yr(p))}),[p]);const Zt=(oe=fe?.content)!==null&&oe!==void 0?oe:Z,Wr=Re&&Object.keys(Oe.tooltipStyles).length>0;return h.useImperativeHandle(e,(()=>({open:ce=>{if(ce?.anchorSelect)try{document.querySelector(ce.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${ce.anchorSelect}" is not a valid CSS selector`)}Ct(ce??null),ce?.delay?yr(ce.delay):Bt(!0)},close:ce=>{ce?.delay?Qe(ce.delay):Bt(!1)},activeAnchor:M,place:Oe.place,isOpen:!!(le&&!b&&Zt&&Wr)}))),le&&!b&&Zt?h.createElement(g,{id:t,role:O,className:zc("react-tooltip",Ji.tooltip,zf.tooltip,zf[A],n,`react-tooltip__place-${Oe.place}`,Ji[Wr?"show":"closing"],Wr?"react-tooltip__show":"react-tooltip__closing",u==="fixed"&&Ji.fixed,x&&Ji.clickable),onTransitionEnd:ce=>{ar(xe),Re||ce.propertyName!=="opacity"||(Pe(!1),Ct(null),k?.())},style:{...F,...Oe.tooltipStyles,opacity:j!==void 0&&Wr?j:void 0},ref:se},Zt,h.createElement(g,{className:zc("react-tooltip-arrow",Ji.arrow,zf.arrow,r,C&&Ji.noArrow),style:{...Oe.tooltipArrowStyles,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0,"--rt-arrow-size":`${X}px`},ref:He})):null},RP=({content:e})=>h.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),jP=h.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:A,render:i,className:o,classNameArrow:a,variant:l="dark",place:c="top",offset:d=10,wrapper:u="div",children:f=null,events:g=["hover"],openOnClick:p=!1,positionStrategy:v="absolute",middlewares:w,delayShow:b=0,delayHide:C=0,float:x=!1,hidden:y=!1,noArrow:B=!1,clickable:E=!1,closeOnEsc:D=!1,closeOnScroll:I=!1,closeOnResize:T=!1,openEvents:Q,closeEvents:F,globalCloseEvents:U,imperativeModeOnly:z=!1,style:k,position:W,isOpen:Z,defaultIsOpen:J=!1,disableStyleInjection:Y=!1,border:Ae,opacity:L,arrowColor:S,arrowSize:M,setIsOpen:V,afterShow:N,afterHide:j,disableTooltip:G,role:X="tooltip"},O)=>{const[oe,se]=h.useState(r),[He,re]=h.useState(A),[te,xe]=h.useState(c),[Oe,Te]=h.useState(l),[Re,lt]=h.useState(d),[le,Pe]=h.useState(b),[fe,Ct]=h.useState(C),[xr,En]=h.useState(x),[Dn,Sn]=h.useState(y),[Gt,In]=h.useState(u),[zr,rr]=h.useState(g),[Ar,aA]=h.useState(v),[ir,Tn]=h.useState(null),[rt,Bt]=h.useState(null),or=h.useRef(null),yr=h.useRef(Y),{anchorRefs:Qe,activeAnchor:ze}=LE(e),we=Ue=>Ue?.getAttributeNames().reduce(((mt,Ce)=>{var We;return Ce.startsWith("data-tooltip-")&&(mt[Ce.replace(/^data-tooltip-/,"")]=(We=Ue?.getAttribute(Ce))!==null&&We!==void 0?We:null),mt}),{}),Ge=Ue=>{const mt={place:Ce=>{var We;xe((We=Ce)!==null&&We!==void 0?We:c)},content:Ce=>{se(Ce??r)},html:Ce=>{re(Ce??A)},variant:Ce=>{var We;Te((We=Ce)!==null&&We!==void 0?We:l)},offset:Ce=>{lt(Ce===null?d:Number(Ce))},wrapper:Ce=>{var We;In((We=Ce)!==null&&We!==void 0?We:u)},events:Ce=>{const We=Ce?.split(" ");rr(We??g)},"position-strategy":Ce=>{var We;aA((We=Ce)!==null&&We!==void 0?We:v)},"delay-show":Ce=>{Pe(Ce===null?b:Number(Ce))},"delay-hide":Ce=>{Ct(Ce===null?C:Number(Ce))},float:Ce=>{En(Ce===null?x:Ce==="true")},hidden:Ce=>{Sn(Ce===null?y:Ce==="true")},"class-name":Ce=>{Tn(Ce)}};Object.values(mt).forEach((Ce=>Ce(null))),Object.entries(Ue).forEach((([Ce,We])=>{var Zt;(Zt=mt[Ce])===null||Zt===void 0||Zt.call(mt,We)}))};h.useEffect((()=>{se(r)}),[r]),h.useEffect((()=>{re(A)}),[A]),h.useEffect((()=>{xe(c)}),[c]),h.useEffect((()=>{Te(l)}),[l]),h.useEffect((()=>{lt(d)}),[d]),h.useEffect((()=>{Pe(b)}),[b]),h.useEffect((()=>{Ct(C)}),[C]),h.useEffect((()=>{En(x)}),[x]),h.useEffect((()=>{Sn(y)}),[y]),h.useEffect((()=>{aA(v)}),[v]),h.useEffect((()=>{yr.current!==Y&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[Y]),h.useEffect((()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:Y==="core",disableBase:Y}}))}),[]),h.useEffect((()=>{var Ue;const mt=new Set(Qe);let Ce=n;if(!Ce&&e&&(Ce=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),Ce)try{document.querySelectorAll(Ce).forEach((Ee=>{mt.add({current:Ee})}))}catch{console.warn(`[react-tooltip] "${Ce}" is not a valid CSS selector`)}const We=document.querySelector(`[id='${t}']`);if(We&&mt.add({current:We}),!mt.size)return()=>null;const Zt=(Ue=rt??We)!==null&&Ue!==void 0?Ue:ze.current,Wr=new MutationObserver((Ee=>{Ee.forEach((he=>{var qe;if(!Zt||he.type!=="attributes"||!(!((qe=he.attributeName)===null||qe===void 0)&&qe.startsWith("data-tooltip-")))return;const Lt=we(Zt);Ge(Lt)}))})),ce={attributes:!0,childList:!1,subtree:!1};if(Zt){const Ee=we(Zt);Ge(Ee),Wr.observe(Zt,ce)}return()=>{Wr.disconnect()}}),[Qe,ze,rt,t,n]),h.useEffect((()=>{k?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),Ae&&!Wb("border",`${Ae}`)&&console.warn(`[react-tooltip] "${Ae}" is not a valid \`border\`.`),k?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),L&&!Wb("opacity",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`opacity\`.`)}),[]);let ut=f;const Ne=h.useRef(null);if(i){const Ue=i({content:rt?.getAttribute("data-tooltip-content")||oe||null,activeAnchor:rt});ut=Ue?h.createElement("div",{ref:Ne,className:"react-tooltip-content-wrapper"},Ue):null}else oe&&(ut=oe);He&&(ut=h.createElement(RP,{content:He}));const IA={forwardRef:O,id:e,anchorId:t,anchorSelect:n,className:zc(o,ir),classNameArrow:a,content:ut,contentWrapperRef:Ne,place:te,variant:Oe,offset:Re,wrapper:Gt,events:zr,openOnClick:p,positionStrategy:Ar,middlewares:w,delayShow:le,delayHide:fe,float:xr,hidden:Dn,noArrow:B,clickable:E,closeOnEsc:D,closeOnScroll:I,closeOnResize:T,openEvents:Q,closeEvents:F,globalCloseEvents:U,imperativeModeOnly:z,style:k,position:W,isOpen:Z,defaultIsOpen:J,border:Ae,opacity:L,arrowColor:S,arrowSize:M,setIsOpen:V,afterShow:N,afterHide:j,disableTooltip:G,activeAnchor:rt,previousActiveAnchor:or.current,setActiveAnchor:Ue=>{Bt((mt=>(Ue?.isSameNode(mt)||(or.current=mt),Ue)))},role:X};return h.createElement(QP,{...IA})}));typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Ub({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Ub({css:`
|
|
333
|
+
`,Uo=Math.min,Di=Math.max,kc=Math.round,tl=Math.floor,eA=e=>({x:e,y:e}),LL={left:"right",right:"left",bottom:"top",top:"bottom"};function sp(e,t,n){return Di(e,Uo(t,n))}function Ca(e,t){return typeof e=="function"?e(t):e}function ji(e){return e.split("-")[0]}function Ba(e){return e.split("-")[1]}function EE(e){return e==="x"?"y":"x"}function Hm(e){return e==="y"?"height":"width"}function HA(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function km(e){return EE(HA(e))}function PL(e,t,n){n===void 0&&(n=!1);const r=Ba(e),A=km(e),i=Hm(A);let o=A==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Nc(o)),[o,Nc(o)]}function ML(e){const t=Nc(e);return[ap(e),t,ap(t)]}function ap(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Qb=["left","right"],Rb=["right","left"],HL=["top","bottom"],kL=["bottom","top"];function NL(e,t,n){switch(e){case"top":case"bottom":return n?t?Rb:Qb:t?Qb:Rb;case"left":case"right":return t?HL:kL;default:return[]}}function UL(e,t,n,r){const A=Ba(e);let i=NL(ji(e),n==="start",r);return A&&(i=i.map(o=>o+"-"+A),t&&(i=i.concat(i.map(ap)))),i}function Nc(e){const t=ji(e);return LL[t]+e.slice(t.length)}function zL(e){return{top:0,right:0,bottom:0,left:0,...e}}function DE(e){return typeof e!="number"?zL(e):{top:e,right:e,bottom:e,left:e}}function Uc(e){const{x:t,y:n,width:r,height:A}=e;return{width:r,height:A,top:n,left:t,right:t+r,bottom:n+A,x:t,y:n}}function jb(e,t,n){let{reference:r,floating:A}=e;const i=HA(t),o=km(t),a=Hm(o),l=ji(t),c=i==="y",d=r.x+r.width/2-A.width/2,u=r.y+r.height/2-A.height/2,f=r[a]/2-A[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-A.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-A.width,y:u};break;default:g={x:r.x,y:r.y}}switch(Ba(t)){case"start":g[o]-=f*(n&&c?-1:1);break;case"end":g[o]+=f*(n&&c?-1:1);break}return g}async function WL(e,t){var n;t===void 0&&(t={});const{x:r,y:A,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:g=0}=Ca(t,e),p=DE(g),w=a[f?u==="floating"?"reference":"floating":u],b=Uc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),C=u==="floating"?{x:r,y:A,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),y=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},B=Uc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:x,strategy:l}):C);return{top:(b.top-B.top+p.top)/y.y,bottom:(B.bottom-b.bottom+p.bottom)/y.y,left:(b.left-B.left+p.left)/y.x,right:(B.right-b.right+p.right)/y.x}}const XL=50,GL=async(e,t,n)=>{const{placement:r="bottom",strategy:A="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:WL},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:A}),{x:d,y:u}=jb(c,r,l),f=r,g=0;const p={};for(let v=0;v<i.length;v++){const w=i[v];if(!w)continue;const{name:b,fn:C}=w,{x,y,data:B,reset:E}=await C({x:d,y:u,initialPlacement:r,placement:f,strategy:A,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=x??d,u=y??u,p[b]={...p[b],...B},E&&g<XL&&(g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:A}):E.rects),{x:d,y:u}=jb(c,f,l)),v=-1)}return{x:d,y:u,placement:f,strategy:A,middlewareData:p}},VL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:A,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Ca(e,t)||{};if(c==null)return{};const u=DE(d),f={x:n,y:r},g=km(A),p=Hm(g),v=await o.getDimensions(c),w=g==="y",b=w?"top":"left",C=w?"bottom":"right",x=w?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[g]-f[g]-i.floating[p],B=f[g]-i.reference[g],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let D=E?E[x]:0;(!D||!await(o.isElement==null?void 0:o.isElement(E)))&&(D=a.floating[x]||i.floating[p]);const I=y/2-B/2,T=D/2-v[p]/2-1,Q=Uo(u[b],T),F=Uo(u[C],T),U=Q,z=D-v[p]-F,k=D/2-v[p]/2+I,W=sp(U,k,z),Z=!l.arrow&&Ba(A)!=null&&k!==W&&i.reference[p]/2-(k<U?Q:F)-v[p]/2<0,Y=Z?k<U?k-U:k-z:0;return{[g]:f[g]+Y,data:{[g]:W,centerOffset:k-W-Y,...Z&&{alignmentOffset:Y}},reset:Z}}}),KL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:A,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...w}=Ca(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=ji(A),C=HA(a),x=ji(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(c.floating)),B=f||(x||!v?[Nc(a)]:ML(a)),E=p!=="none";!f&&E&&B.push(...UL(a,v,p,y));const D=[a,...B],I=await l.detectOverflow(t,w),T=[];let Q=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&T.push(I[b]),u){const k=PL(A,o,y);T.push(I[k[0]],I[k[1]])}if(Q=[...Q,{placement:A,overflows:T}],!T.every(k=>k<=0)){var F,U;const k=(((F=i.flip)==null?void 0:F.index)||0)+1,W=D[k];if(W&&(!(u==="alignment"?C!==HA(W):!1)||Q.every(J=>HA(J.placement)===C?J.overflows[0]>0:!0)))return{data:{index:k,overflows:Q},reset:{placement:W}};let Z=(U=Q.filter(Y=>Y.overflows[0]<=0).sort((Y,J)=>Y.overflows[1]-J.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(g){case"bestFit":{var z;const Y=(z=Q.filter(J=>{if(E){const Ae=HA(J.placement);return Ae===C||Ae==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(Ae=>Ae>0).reduce((Ae,L)=>Ae+L,0)]).sort((J,Ae)=>J[1]-Ae[1])[0])==null?void 0:z[0];Y&&(Z=Y);break}case"initialPlacement":Z=a;break}if(A!==Z)return{reset:{placement:Z}}}return{}}}},qL=new Set(["left","top"]);async function JL(e,t){const{placement:n,platform:r,elements:A}=e,i=await(r.isRTL==null?void 0:r.isRTL(A.floating)),o=ji(n),a=Ba(n),l=HA(n)==="y",c=qL.has(o)?-1:1,d=i&&l?-1:1,u=Ca(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(g=a==="end"?p*-1:p),l?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const YL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:A,y:i,placement:o,middlewareData:a}=t,l=await JL(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:A+l.x,y:i+l.y,data:{...l,placement:o}}}}},ZL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:A,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:C,y:x}=b;return{x:C,y:x}}},...c}=Ca(e,t),d={x:n,y:r},u=await i.detectOverflow(t,c),f=HA(ji(A)),g=EE(f);let p=d[g],v=d[f];if(o){const b=g==="y"?"top":"left",C=g==="y"?"bottom":"right",x=p+u[b],y=p-u[C];p=sp(x,p,y)}if(a){const b=f==="y"?"top":"left",C=f==="y"?"bottom":"right",x=v+u[b],y=v-u[C];v=sp(x,v,y)}const w=l.fn({...t,[g]:p,[f]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:o,[f]:a}}}}}};function Wd(){return typeof window<"u"}function es(e){return SE(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rA(e){var t;return(t=(SE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SE(e){return Wd()?e instanceof Node||e instanceof Jn(e).Node:!1}function Fr(e){return Wd()?e instanceof Element||e instanceof Jn(e).Element:!1}function DA(e){return Wd()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function Fb(e){return!Wd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}function Ea(e){const{overflow:t,overflowX:n,overflowY:r,display:A}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&A!=="inline"&&A!=="contents"}function _L(e){return/^(table|td|th)$/.test(es(e))}function Xd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $L=/transform|translate|scale|rotate|perspective|filter/,eP=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none";let kf;function Nm(e){const t=Fr(e)?Lr(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!Um()&&(ai(t.backdropFilter)||ai(t.filter))||$L.test(t.willChange||"")||eP.test(t.contain||"")}function tP(e){let t=YA(e);for(;DA(t)&&!zo(t);){if(Nm(t))return t;if(Xd(t))return null;t=YA(t)}return null}function Um(){return kf==null&&(kf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),kf}function zo(e){return/^(html|body|#document)$/.test(es(e))}function Lr(e){return Jn(e).getComputedStyle(e)}function Gd(e){return Fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function YA(e){if(es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fb(e)&&e.host||rA(e);return Fb(t)?t.host:t}function IE(e){const t=YA(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:DA(t)&&Ea(t)?t:IE(t)}function oa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const A=IE(e),i=A===((r=e.ownerDocument)==null?void 0:r.body),o=Jn(A);if(i){const a=lp(o);return t.concat(o,o.visualViewport||[],Ea(A)?A:[],a&&n?oa(a):[])}else return t.concat(A,oa(A,[],n))}function lp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TE(e){const t=Lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const A=DA(e),i=A?e.offsetWidth:n,o=A?e.offsetHeight:r,a=kc(n)!==i||kc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function zm(e){return Fr(e)?e:e.contextElement}function jo(e){const t=zm(e);if(!DA(t))return eA(1);const n=t.getBoundingClientRect(),{width:r,height:A,$:i}=TE(t);let o=(i?kc(n.width):n.width)/r,a=(i?kc(n.height):n.height)/A;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const nP=eA(0);function OE(e){const t=Jn(e);return!Um()||!t.visualViewport?nP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const A=e.getBoundingClientRect(),i=zm(e);let o=eA(1);t&&(r?Fr(r)&&(o=jo(r)):o=jo(e));const a=rP(i,n,r)?OE(i):eA(0);let l=(A.left+a.x)/o.x,c=(A.top+a.y)/o.y,d=A.width/o.x,u=A.height/o.y;if(i){const f=Jn(i),g=r&&Fr(r)?Jn(r):r;let p=f,v=lp(p);for(;v&&r&&g!==p;){const w=jo(v),b=v.getBoundingClientRect(),C=Lr(v),x=b.left+(v.clientLeft+parseFloat(C.paddingLeft))*w.x,y=b.top+(v.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=x,c+=y,p=Jn(v),v=lp(p)}}return Uc({width:d,height:u,x:l,y:c})}function Vd(e,t){const n=Gd(e).scrollLeft;return t?t.left+n:Fi(rA(e)).left+n}function QE(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Vd(e,n),A=n.top+t.scrollTop;return{x:r,y:A}}function AP(e){let{elements:t,rect:n,offsetParent:r,strategy:A}=e;const i=A==="fixed",o=rA(r),a=t?Xd(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=eA(1);const d=eA(0),u=DA(r);if((u||!u&&!i)&&((es(r)!=="body"||Ea(o))&&(l=Gd(r)),u)){const g=Fi(r);c=jo(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=o&&!u&&!i?QE(o,l):eA(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}}function iP(e){return Array.from(e.getClientRects())}function oP(e){const t=rA(e),n=Gd(e),r=e.ownerDocument.body,A=Di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Vd(e);const a=-n.scrollTop;return Lr(r).direction==="rtl"&&(o+=Di(t.clientWidth,r.clientWidth)-A),{width:A,height:i,x:o,y:a}}const Lb=25;function sP(e,t){const n=Jn(e),r=rA(e),A=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(A){i=A.width,o=A.height;const d=Um();(!d||d&&t==="fixed")&&(a=A.offsetLeft,l=A.offsetTop)}const c=Vd(r);if(c<=0){const d=r.ownerDocument,u=d.body,f=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-g);p<=Lb&&(i-=p)}else c<=Lb&&(i+=c);return{width:i,height:o,x:a,y:l}}function aP(e,t){const n=Fi(e,!0,t==="fixed"),r=n.top+e.clientTop,A=n.left+e.clientLeft,i=DA(e)?jo(e):eA(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=A*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Pb(e,t,n){let r;if(t==="viewport")r=sP(e,n);else if(t==="document")r=oP(rA(e));else if(Fr(t))r=aP(t,n);else{const A=OE(e);r={x:t.x-A.x,y:t.y-A.y,width:t.width,height:t.height}}return Uc(r)}function RE(e,t){const n=YA(e);return n===t||!Fr(n)||zo(n)?!1:Lr(n).position==="fixed"||RE(n,t)}function lP(e,t){const n=t.get(e);if(n)return n;let r=oa(e,[],!1).filter(a=>Fr(a)&&es(a)!=="body"),A=null;const i=Lr(e).position==="fixed";let o=i?YA(e):e;for(;Fr(o)&&!zo(o);){const a=Lr(o),l=Nm(o);!l&&a.position==="fixed"&&(A=null),(i?!l&&!A:!l&&a.position==="static"&&!!A&&(A.position==="absolute"||A.position==="fixed")||Ea(o)&&!l&&RE(e,o))?r=r.filter(d=>d!==o):A=a,o=YA(o)}return t.set(e,r),r}function cP(e){let{element:t,boundary:n,rootBoundary:r,strategy:A}=e;const o=[...n==="clippingAncestors"?Xd(t)?[]:lP(t,this._c):[].concat(n),r],a=Pb(t,o[0],A);let l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<o.length;f++){const g=Pb(t,o[f],A);l=Di(g.top,l),c=Uo(g.right,c),d=Uo(g.bottom,d),u=Di(g.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function dP(e){const{width:t,height:n}=TE(e);return{width:t,height:n}}function uP(e,t,n){const r=DA(t),A=rA(t),i=n==="fixed",o=Fi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=eA(0);function c(){l.x=Vd(A)}if(r||!r&&!i)if((es(t)!=="body"||Ea(A))&&(a=Gd(t)),r){const g=Fi(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else A&&c();i&&!r&&A&&c();const d=A&&!r&&!i?QE(A,a):eA(0),u=o.left+a.scrollLeft-l.x-d.x,f=o.top+a.scrollTop-l.y-d.y;return{x:u,y:f,width:o.width,height:o.height}}function Nf(e){return Lr(e).position==="static"}function Mb(e,t){if(!DA(e)||Lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rA(e)===n&&(n=n.ownerDocument.body),n}function jE(e,t){const n=Jn(e);if(Xd(e))return n;if(!DA(e)){let A=YA(e);for(;A&&!zo(A);){if(Fr(A)&&!Nf(A))return A;A=YA(A)}return n}let r=Mb(e,t);for(;r&&_L(r)&&Nf(r);)r=Mb(r,t);return r&&zo(r)&&Nf(r)&&!Nm(r)?n:r||tP(e)||n}const fP=async function(e){const t=this.getOffsetParent||jE,n=this.getDimensions,r=await n(e.floating);return{reference:uP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gP(e){return Lr(e).direction==="rtl"}const hP={convertOffsetParentRelativeRectToViewportRelativeRect:AP,getDocumentElement:rA,getClippingRect:cP,getOffsetParent:jE,getElementRects:fP,getClientRects:iP,getDimensions:dP,getScale:jo,isElement:Fr,isRTL:gP};function FE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pP(e,t){let n=null,r;const A=rA(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:g}=c;if(a||t(),!f||!g)return;const p=tl(u),v=tl(A.clientWidth-(d+f)),w=tl(A.clientHeight-(u+g)),b=tl(d),x={rootMargin:-p+"px "+-v+"px "+-w+"px "+-b+"px",threshold:Di(0,Uo(1,l))||1};let y=!0;function B(E){const D=E[0].intersectionRatio;if(D!==l){if(!y)return o();D?o(!1,D):r=setTimeout(()=>{o(!1,1e-7)},1e3)}D===1&&!FE(c,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(B,{...x,root:A.ownerDocument})}catch{n=new IntersectionObserver(B,x)}n.observe(e)}return o(!0),i}function mP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:A=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zm(e),d=A||i?[...c?oa(c):[],...t?oa(t):[]]:[];d.forEach(b=>{A&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const u=c&&a?pP(c,n):null;let f=-1,g=null;o&&(g=new ResizeObserver(b=>{let[C]=b;C&&C.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),c&&!l&&g.observe(c),t&&g.observe(t));let p,v=l?Fi(e):null;l&&w();function w(){const b=Fi(e);v&&!FE(v,b)&&n(),v=b,p=requestAnimationFrame(w)}return n(),()=>{var b;d.forEach(C=>{A&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),u?.(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(p)}}const vP=YL,wP=ZL,bP=KL,xP=VL,Hb=(e,t,n)=>{const r=new Map,A={platform:hP,...n},i={...A.platform,_c:r};return GL(e,t,{...A,platform:i})};var Uf={exports:{}};var kb;function yP(){return kb||(kb=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(i=A(i,r(a)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var a in i)t.call(i,a)&&i[a]&&(o=A(o,a));return o}function A(i,o){return o?i?i+" "+o:i+o:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Uf)),Uf.exports}var CP=yP();const zc=vE(CP);const BP="react-tooltip-core-styles",EP="react-tooltip-base-styles",Nb={core:!1,base:!1};function Ub({css:e,id:t=EP,type:n="base",ref:r}){var A,i;if(!e||typeof document>"u"||Nb[n]||n==="core"&&typeof process<"u"&&(!((A=process==null?void 0:process.env)===null||A===void 0)&&A.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process<"u"&&(!((i=process==null?void 0:process.env)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(t=BP),r||(r={});const{insertAt:o}=r;if(document.getElementById(t))return;const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",o==="top"&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),Nb[n]=!0}const zb=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:A=10,strategy:i="absolute",middlewares:o=[vP(Number(A)),bP({fallbackAxisSideDirection:"start"}),wP({padding:5})],border:a,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=o;return n?(c.push(xP({element:n,padding:5})),Hb(e,t,{placement:r,strategy:i,middleware:c}).then((({x:d,y:u,placement:f,middlewareData:g})=>{var p,v;const w={left:`${d}px`,top:`${u}px`,border:a},{x:b,y:C}=(p=g.arrow)!==null&&p!==void 0?p:{x:0,y:0},x=(v={top:"bottom",right:"left",bottom:"top",left:"right"}[f.split("-")[0]])!==null&&v!==void 0?v:"bottom",y=a&&{borderBottom:a,borderRight:a};let B=0;if(a){const E=`${a}`.match(/(\d+)px/);B=E?.[1]?Number(E[1]):1}return{tooltipStyles:w,tooltipArrowStyles:{left:b!=null?`${b}px`:"",top:C!=null?`${C}px`:"",right:"",bottom:"",...y,[x]:`-${l/2+B}px`},place:f}}))):Hb(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:d,y:u,placement:f})=>({tooltipStyles:{left:`${d}px`,top:`${u}px`},tooltipArrowStyles:{},place:f})))},Wb=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Xb=(e,t,n)=>{let r=null;const A=function(...i){const o=()=>{r=null};!r&&(e.apply(this,i),r=setTimeout(o,t))};return A.cancel=()=>{r&&(clearTimeout(r),r=null)},A},Gb=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",cp=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((A,i)=>cp(A,t[i])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Gb(e)||!Gb(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((A=>cp(e[A],t[A])))},DP=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"}))},Vb=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(DP(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},SP=typeof window<"u"?h.useLayoutEffect:h.useEffect,ar=e=>{e.current&&(clearTimeout(e.current),e.current=null)},IP="DEFAULT_TOOLTIP_ID",TP={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},OP=h.createContext({getTooltipData:()=>TP});function LE(e=IP){return h.useContext(OP).getTooltipData(e)}var Ji={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},zf={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const QP=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:A="dark",anchorId:i,anchorSelect:o,place:a="top",offset:l=10,events:c=["hover"],openOnClick:d=!1,positionStrategy:u="absolute",middlewares:f,wrapper:g,delayShow:p=0,delayHide:v=0,float:w=!1,hidden:b=!1,noArrow:C=!1,clickable:x=!1,closeOnEsc:y=!1,closeOnScroll:B=!1,closeOnResize:E=!1,openEvents:D,closeEvents:I,globalCloseEvents:T,imperativeModeOnly:Q,style:F,position:U,afterShow:z,afterHide:k,disableTooltip:W,content:Z,contentWrapperRef:Y,isOpen:J,defaultIsOpen:Ae=!1,setIsOpen:L,previousActiveAnchor:S,activeAnchor:M,setActiveAnchor:V,border:N,opacity:j,arrowColor:G,arrowSize:X=8,role:O="tooltip"})=>{var oe;const se=h.useRef(null),He=h.useRef(null),re=h.useRef(null),te=h.useRef(null),xe=h.useRef(null),[Oe,Te]=h.useState({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[Re,lt]=h.useState(!1),[le,Pe]=h.useState(!1),[fe,Ct]=h.useState(null),xr=h.useRef(!1),En=h.useRef(null),{anchorRefs:Dn,setActiveAnchor:Sn}=LE(t),Gt=h.useRef(!1),[In,zr]=h.useState([]),rr=h.useRef(!1),Ar=d||c.includes("click"),aA=Ar||D?.click||D?.dblclick||D?.mousedown,ir=D?{...D}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!D&&Ar&&Object.assign(ir,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Tn=I?{...I}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!I&&Ar&&Object.assign(Tn,{mouseleave:!1,blur:!1,mouseout:!1});const rt=T?{...T}:{escape:y||!1,scroll:B||!1,resize:E||!1,clickOutsideAnchor:aA||!1};Q&&(Object.assign(ir,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Tn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(rt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),SP((()=>(rr.current=!0,()=>{rr.current=!1})),[]);const Bt=ce=>{rr.current&&(ce&&Pe(!0),setTimeout((()=>{rr.current&&(L?.(ce),J===void 0&<(ce))}),10))};h.useEffect((()=>{if(t){if(Re){Ee(S);const he=ce(M),qe=[...new Set([...he,t])].filter(Boolean).join(" ");M?.setAttribute("aria-describedby",qe)}else Ee(M);return()=>{Ee(M),Ee(S)}}function ce(he){var qe;return((qe=he?.getAttribute("aria-describedby"))===null||qe===void 0?void 0:qe.split(" "))||[]}function Ee(he){const qe=ce(he).filter((Lt=>Lt!==t));qe.length?he?.setAttribute("aria-describedby",qe.join(" ")):he?.removeAttribute("aria-describedby")}}),[M,Re,t,S]),h.useEffect((()=>{if(J===void 0)return()=>null;J&&Pe(!0);const ce=setTimeout((()=>{lt(J)}),10);return()=>{clearTimeout(ce)}}),[J]),h.useEffect((()=>{if(Re!==xr.current)if(ar(xe),xr.current=Re,Re)z?.();else{const ce=(Ee=>{const he=Ee.match(/^([\d.]+)(ms|s)$/);if(!he)return 0;const[,qe,Lt]=he;return Number(qe)*(Lt==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));xe.current=setTimeout((()=>{Pe(!1),Ct(null),k?.()}),ce+25)}}),[Re]);const or=ce=>{Te((Ee=>cp(Ee,ce)?Ee:ce))},yr=(ce=p)=>{ar(re),le?Bt(!0):re.current=setTimeout((()=>{Bt(!0)}),ce)},Qe=(ce=v)=>{ar(te),te.current=setTimeout((()=>{Gt.current||Bt(!1)}),ce)},ze=ce=>{var Ee;if(!ce)return;const he=(Ee=ce.currentTarget)!==null&&Ee!==void 0?Ee:ce.target;if(!he?.isConnected)return V(null),void Sn({current:null});p?yr():Bt(!0),V(he),Sn({current:he}),ar(te)},we=()=>{x?Qe(v||100):v?Qe():Bt(!1),ar(re)},Ge=({x:ce,y:Ee})=>{var he;const qe={getBoundingClientRect:()=>({x:ce,y:Ee,width:0,height:0,top:Ee,left:ce,right:ce,bottom:Ee})};zb({place:(he=fe?.place)!==null&&he!==void 0?he:a,offset:l,elementReference:qe,tooltipReference:se.current,tooltipArrowReference:He.current,strategy:u,middlewares:f,border:N,arrowSize:X}).then((Lt=>{or(Lt)}))},ut=ce=>{if(!ce)return;const Ee=ce,he={x:Ee.clientX,y:Ee.clientY};Ge(he),En.current=he},Ne=ce=>{var Ee;if(!Re)return;const he=ce.target;he.isConnected&&(!((Ee=se.current)===null||Ee===void 0)&&Ee.contains(he)||[document.querySelector(`[id='${i}']`),...In].some((qe=>qe?.contains(he)))||(Bt(!1),ar(re)))},IA=Xb(ze,50),Ue=Xb(we,50),mt=ce=>{Ue.cancel(),IA(ce)},Ce=()=>{IA.cancel(),Ue()},We=h.useCallback((()=>{var ce,Ee;const he=(ce=fe?.position)!==null&&ce!==void 0?ce:U;he?Ge(he):w?En.current&&Ge(En.current):M?.isConnected&&zb({place:(Ee=fe?.place)!==null&&Ee!==void 0?Ee:a,offset:l,elementReference:M,tooltipReference:se.current,tooltipArrowReference:He.current,strategy:u,middlewares:f,border:N,arrowSize:X}).then((qe=>{rr.current&&or(qe)}))}),[Re,M,Z,F,a,fe?.place,l,u,U,fe?.position,w,X]);h.useEffect((()=>{var ce,Ee;const he=new Set(Dn);In.forEach((De=>{W?.(De)||he.add({current:De})}));const qe=document.querySelector(`[id='${i}']`);qe&&!W?.(qe)&&he.add({current:qe});const Lt=()=>{Bt(!1)},Un=Vb(M),On=Vb(se.current);rt.scroll&&(window.addEventListener("scroll",Lt),Un?.addEventListener("scroll",Lt),On?.addEventListener("scroll",Lt));let Vt=null;rt.resize?window.addEventListener("resize",Lt):M&&se.current&&(Vt=mP(M,se.current,We,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Qt=De=>{De.key==="Escape"&&Bt(!1)};rt.escape&&window.addEventListener("keydown",Qt),rt.clickOutsideAnchor&&window.addEventListener("click",Ne);const ct=[],lA=De=>!!(De?.target&&M?.contains(De.target)),za=De=>{Re&&lA(De)||ze(De)},Wa=De=>{Re&&lA(De)&&we()},Xa=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],be=["click","dblclick","mousedown","mouseup"];Object.entries(ir).forEach((([De,ft])=>{ft&&(Xa.includes(De)?ct.push({event:De,listener:mt}):be.includes(De)&&ct.push({event:De,listener:za}))})),Object.entries(Tn).forEach((([De,ft])=>{ft&&(Xa.includes(De)?ct.push({event:De,listener:Ce}):be.includes(De)&&ct.push({event:De,listener:Wa}))})),w&&ct.push({event:"pointermove",listener:ut});const P=()=>{Gt.current=!0},ie=()=>{Gt.current=!1,we()},pe=x&&(Tn.mouseout||Tn.mouseleave);return pe&&((ce=se.current)===null||ce===void 0||ce.addEventListener("mouseover",P),(Ee=se.current)===null||Ee===void 0||Ee.addEventListener("mouseout",ie)),ct.forEach((({event:De,listener:ft})=>{he.forEach((vt=>{var Ut;(Ut=vt.current)===null||Ut===void 0||Ut.addEventListener(De,ft)}))})),()=>{var De,ft;rt.scroll&&(window.removeEventListener("scroll",Lt),Un?.removeEventListener("scroll",Lt),On?.removeEventListener("scroll",Lt)),rt.resize?window.removeEventListener("resize",Lt):Vt?.(),rt.clickOutsideAnchor&&window.removeEventListener("click",Ne),rt.escape&&window.removeEventListener("keydown",Qt),pe&&((De=se.current)===null||De===void 0||De.removeEventListener("mouseover",P),(ft=se.current)===null||ft===void 0||ft.removeEventListener("mouseout",ie)),ct.forEach((({event:vt,listener:Ut})=>{he.forEach((Cr=>{var Xr;(Xr=Cr.current)===null||Xr===void 0||Xr.removeEventListener(vt,Ut)}))}))}}),[M,We,le,Dn,In,D,I,T,Ar,p,v]),h.useEffect((()=>{var ce,Ee;let he=(Ee=(ce=fe?.anchorSelect)!==null&&ce!==void 0?ce:o)!==null&&Ee!==void 0?Ee:"";!he&&t&&(he=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const qe=new MutationObserver((Lt=>{const Un=[],On=[];Lt.forEach((Vt=>{if(Vt.type==="attributes"&&Vt.attributeName==="data-tooltip-id"&&(Vt.target.getAttribute("data-tooltip-id")===t?Un.push(Vt.target):Vt.oldValue===t&&On.push(Vt.target)),Vt.type==="childList"){if(M){const Qt=[...Vt.removedNodes].filter((ct=>ct.nodeType===1));if(he)try{On.push(...Qt.filter((ct=>ct.matches(he)))),On.push(...Qt.flatMap((ct=>[...ct.querySelectorAll(he)])))}catch{}Qt.some((ct=>{var lA;return!!(!((lA=ct?.contains)===null||lA===void 0)&&lA.call(ct,M))&&(Pe(!1),Bt(!1),V(null),ar(re),ar(te),!0)}))}if(he)try{const Qt=[...Vt.addedNodes].filter((ct=>ct.nodeType===1));Un.push(...Qt.filter((ct=>ct.matches(he)))),Un.push(...Qt.flatMap((ct=>[...ct.querySelectorAll(he)])))}catch{}}})),(Un.length||On.length)&&zr((Vt=>[...Vt.filter((Qt=>!On.includes(Qt))),...Un]))}));return qe.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{qe.disconnect()}}),[t,o,fe?.anchorSelect,M]),h.useEffect((()=>{We()}),[We]),h.useEffect((()=>{if(!Y?.current)return()=>null;const ce=new ResizeObserver((()=>{setTimeout((()=>We()))}));return ce.observe(Y.current),()=>{ce.disconnect()}}),[Z,Y?.current]),h.useEffect((()=>{var ce;const Ee=document.querySelector(`[id='${i}']`),he=[...In,Ee];M&&he.includes(M)||V((ce=In[0])!==null&&ce!==void 0?ce:Ee)}),[i,In,M]),h.useEffect((()=>(Ae&&Bt(!0),()=>{ar(re),ar(te)})),[]),h.useEffect((()=>{var ce;let Ee=(ce=fe?.anchorSelect)!==null&&ce!==void 0?ce:o;if(!Ee&&t&&(Ee=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),Ee)try{const he=Array.from(document.querySelectorAll(Ee));zr(he)}catch{zr([])}}),[t,o,fe?.anchorSelect]),h.useEffect((()=>{re.current&&(ar(re),yr(p))}),[p]);const Zt=(oe=fe?.content)!==null&&oe!==void 0?oe:Z,Wr=Re&&Object.keys(Oe.tooltipStyles).length>0;return h.useImperativeHandle(e,(()=>({open:ce=>{if(ce?.anchorSelect)try{document.querySelector(ce.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${ce.anchorSelect}" is not a valid CSS selector`)}Ct(ce??null),ce?.delay?yr(ce.delay):Bt(!0)},close:ce=>{ce?.delay?Qe(ce.delay):Bt(!1)},activeAnchor:M,place:Oe.place,isOpen:!!(le&&!b&&Zt&&Wr)}))),le&&!b&&Zt?h.createElement(g,{id:t,role:O,className:zc("react-tooltip",Ji.tooltip,zf.tooltip,zf[A],n,`react-tooltip__place-${Oe.place}`,Ji[Wr?"show":"closing"],Wr?"react-tooltip__show":"react-tooltip__closing",u==="fixed"&&Ji.fixed,x&&Ji.clickable),onTransitionEnd:ce=>{ar(xe),Re||ce.propertyName!=="opacity"||(Pe(!1),Ct(null),k?.())},style:{...F,...Oe.tooltipStyles,opacity:j!==void 0&&Wr?j:void 0},ref:se},Zt,h.createElement(g,{className:zc("react-tooltip-arrow",Ji.arrow,zf.arrow,r,C&&Ji.noArrow),style:{...Oe.tooltipArrowStyles,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0,"--rt-arrow-size":`${X}px`},ref:He})):null},RP=({content:e})=>h.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),jP=h.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:A,render:i,className:o,classNameArrow:a,variant:l="dark",place:c="top",offset:d=10,wrapper:u="div",children:f=null,events:g=["hover"],openOnClick:p=!1,positionStrategy:v="absolute",middlewares:w,delayShow:b=0,delayHide:C=0,float:x=!1,hidden:y=!1,noArrow:B=!1,clickable:E=!1,closeOnEsc:D=!1,closeOnScroll:I=!1,closeOnResize:T=!1,openEvents:Q,closeEvents:F,globalCloseEvents:U,imperativeModeOnly:z=!1,style:k,position:W,isOpen:Z,defaultIsOpen:Y=!1,disableStyleInjection:J=!1,border:Ae,opacity:L,arrowColor:S,arrowSize:M,setIsOpen:V,afterShow:N,afterHide:j,disableTooltip:G,role:X="tooltip"},O)=>{const[oe,se]=h.useState(r),[He,re]=h.useState(A),[te,xe]=h.useState(c),[Oe,Te]=h.useState(l),[Re,lt]=h.useState(d),[le,Pe]=h.useState(b),[fe,Ct]=h.useState(C),[xr,En]=h.useState(x),[Dn,Sn]=h.useState(y),[Gt,In]=h.useState(u),[zr,rr]=h.useState(g),[Ar,aA]=h.useState(v),[ir,Tn]=h.useState(null),[rt,Bt]=h.useState(null),or=h.useRef(null),yr=h.useRef(J),{anchorRefs:Qe,activeAnchor:ze}=LE(e),we=Ue=>Ue?.getAttributeNames().reduce(((mt,Ce)=>{var We;return Ce.startsWith("data-tooltip-")&&(mt[Ce.replace(/^data-tooltip-/,"")]=(We=Ue?.getAttribute(Ce))!==null&&We!==void 0?We:null),mt}),{}),Ge=Ue=>{const mt={place:Ce=>{var We;xe((We=Ce)!==null&&We!==void 0?We:c)},content:Ce=>{se(Ce??r)},html:Ce=>{re(Ce??A)},variant:Ce=>{var We;Te((We=Ce)!==null&&We!==void 0?We:l)},offset:Ce=>{lt(Ce===null?d:Number(Ce))},wrapper:Ce=>{var We;In((We=Ce)!==null&&We!==void 0?We:u)},events:Ce=>{const We=Ce?.split(" ");rr(We??g)},"position-strategy":Ce=>{var We;aA((We=Ce)!==null&&We!==void 0?We:v)},"delay-show":Ce=>{Pe(Ce===null?b:Number(Ce))},"delay-hide":Ce=>{Ct(Ce===null?C:Number(Ce))},float:Ce=>{En(Ce===null?x:Ce==="true")},hidden:Ce=>{Sn(Ce===null?y:Ce==="true")},"class-name":Ce=>{Tn(Ce)}};Object.values(mt).forEach((Ce=>Ce(null))),Object.entries(Ue).forEach((([Ce,We])=>{var Zt;(Zt=mt[Ce])===null||Zt===void 0||Zt.call(mt,We)}))};h.useEffect((()=>{se(r)}),[r]),h.useEffect((()=>{re(A)}),[A]),h.useEffect((()=>{xe(c)}),[c]),h.useEffect((()=>{Te(l)}),[l]),h.useEffect((()=>{lt(d)}),[d]),h.useEffect((()=>{Pe(b)}),[b]),h.useEffect((()=>{Ct(C)}),[C]),h.useEffect((()=>{En(x)}),[x]),h.useEffect((()=>{Sn(y)}),[y]),h.useEffect((()=>{aA(v)}),[v]),h.useEffect((()=>{yr.current!==J&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[J]),h.useEffect((()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:J==="core",disableBase:J}}))}),[]),h.useEffect((()=>{var Ue;const mt=new Set(Qe);let Ce=n;if(!Ce&&e&&(Ce=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),Ce)try{document.querySelectorAll(Ce).forEach((Ee=>{mt.add({current:Ee})}))}catch{console.warn(`[react-tooltip] "${Ce}" is not a valid CSS selector`)}const We=document.querySelector(`[id='${t}']`);if(We&&mt.add({current:We}),!mt.size)return()=>null;const Zt=(Ue=rt??We)!==null&&Ue!==void 0?Ue:ze.current,Wr=new MutationObserver((Ee=>{Ee.forEach((he=>{var qe;if(!Zt||he.type!=="attributes"||!(!((qe=he.attributeName)===null||qe===void 0)&&qe.startsWith("data-tooltip-")))return;const Lt=we(Zt);Ge(Lt)}))})),ce={attributes:!0,childList:!1,subtree:!1};if(Zt){const Ee=we(Zt);Ge(Ee),Wr.observe(Zt,ce)}return()=>{Wr.disconnect()}}),[Qe,ze,rt,t,n]),h.useEffect((()=>{k?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),Ae&&!Wb("border",`${Ae}`)&&console.warn(`[react-tooltip] "${Ae}" is not a valid \`border\`.`),k?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),L&&!Wb("opacity",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`opacity\`.`)}),[]);let ut=f;const Ne=h.useRef(null);if(i){const Ue=i({content:rt?.getAttribute("data-tooltip-content")||oe||null,activeAnchor:rt});ut=Ue?h.createElement("div",{ref:Ne,className:"react-tooltip-content-wrapper"},Ue):null}else oe&&(ut=oe);He&&(ut=h.createElement(RP,{content:He}));const IA={forwardRef:O,id:e,anchorId:t,anchorSelect:n,className:zc(o,ir),classNameArrow:a,content:ut,contentWrapperRef:Ne,place:te,variant:Oe,offset:Re,wrapper:Gt,events:zr,openOnClick:p,positionStrategy:Ar,middlewares:w,delayShow:le,delayHide:fe,float:xr,hidden:Dn,noArrow:B,clickable:E,closeOnEsc:D,closeOnScroll:I,closeOnResize:T,openEvents:Q,closeEvents:F,globalCloseEvents:U,imperativeModeOnly:z,style:k,position:W,isOpen:Z,defaultIsOpen:Y,border:Ae,opacity:L,arrowColor:S,arrowSize:M,setIsOpen:V,afterShow:N,afterHide:j,disableTooltip:G,activeAnchor:rt,previousActiveAnchor:or.current,setActiveAnchor:Ue=>{Bt((mt=>(Ue?.isSameNode(mt)||(or.current=mt),Ue)))},role:X};return h.createElement(QP,{...IA})}));typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Ub({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Ub({css:`
|
|
334
334
|
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})}));var en=[];for(var Wf=0;Wf<256;++Wf)en.push((Wf+256).toString(16).slice(1));function FP(e,t=0){return(en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]).toLowerCase()}var nl,LP=new Uint8Array(16);function PP(){if(!nl&&(nl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nl(LP)}var MP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Kb={randomUUID:MP};function Mn(e,t,n){if(Kb.randomUUID&&!e)return Kb.randomUUID();e=e||{};var r=e.random||(e.rng||PP)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,FP(r)}const HP={padding:{small:"4px 8px",medium:"8px 12px",large:"12px"}},kP=h.forwardRef(function(t,n){return s.jsx(jP,{...t,ref:n})}),NP=m(kP)`
|
|
335
335
|
white-space: wrap;
|
|
336
336
|
|
|
@@ -373,7 +373,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
373
373
|
margin: 0;
|
|
374
374
|
text-align: ${e=>e.$sizeTooltip==="small"?"center":"initial"};
|
|
375
375
|
word-break: break-word;
|
|
376
|
-
`,Rt=e=>{const t=H.useIntl(),n=nr(),r=h.useRef(null),A=!!(e.closeButton??e.button),i=e.closeButton??e.button?"large":e.title??(e.description&&e.description.length>50)?"medium":"small",o=()=>{r.current?.close()};return e.active===!1?s.jsx(s.Fragment,{children:e.children}):s.jsx(s.Fragment,{children:s.jsx(Wm,{ref:r,height:e.height,asBlock:e.asBlock,dataEventOff:e.closeButton&&e.button?"click":"mouseleave",className:e.className,color:{background:n.color.navy,text:n.color.white},description:e.description,sizeTooltip:i,position:e.position,tooltip:s.jsxs("div",{children:[s.jsxs(XP,{children:[i==="large"&&e.closeButton&&e.button&&s.jsx(GP,{onClick:o,children:s.jsx(ne,{name:"icon-times",size:24,color:"white"})}),s.jsxs(WP,{children:[e.title!==void 0&&s.jsx(No,{size:"l",children:t.formatMessage({id:e.title})}),s.jsx(KP,{$sizeTooltip:i,children:t.formatMessage({id:e.description})})]})]}),s.jsx(VP,{children:i==="large"&&e.button&&s.jsx(CE,{...e.button,onClick:a=>{e.button?.onClick?.(a),o()}})})]}),clickable:A,children:e.children})})};function qP(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function JP(e,t){return e?.startsWith(t)?e.split("").slice(t.length).join(""):e}function Tr(e){return e.toString().padStart(2,"0")}function PE(e,t){return e.slice(0,t).trim()+(e.trim().length>t?"...":"")}function YP(e){return e.length===0?"":e[0].toUpperCase()+e.slice(1)}const ZP=Object.freeze(Object.defineProperty({__proto__:null,capitalize:YP,limitSize:PE,padStartTwoDigits:Tr,removeIfStartsWith:JP,suffixIfDoesNotExist:qP},Symbol.toStringTag,{value:"Module"})),ur=e=>String(e).padStart(2,"0"),tA=e=>{const t=e?new Date(e):new Date;return{date:t.getDate(),month:t.getMonth()+1,year:t.getFullYear(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds()}},Co=e=>{const t=e.getFullYear(),n=ur(e.getMonth()+1),r=ur(e.getDate());return`${t}-${n}-${r}`},Wc=e=>{const t=ur(e.getHours()),n=ur(e.getMinutes()),r=ur(e.getSeconds());return`${t}:${n}:${r}`},go=e=>{const t=Co(e),n=Wc(e);return`${t} ${n}`},Xm=(e,t)=>{const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return n===i&&r===o&&A===a},Kd=e=>{const{date:t,month:n,year:r}=tA(),{date:A,month:i,year:o}=tA(e);return t===A&&n===i&&r===o},Gm=e=>{const t=new Date;t.setDate(t.getDate()-1);const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return i===n&&o===r&&a===A},Vm=e=>{const t=new Date;t.setDate(t.getDate()+1);const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return i===n&&o===r&&a===A},ME=e=>Kd(e)?"GLOBAL_Today":Gm(e)?"GLOBAL_Yesterday":Vm(e)?"GLOBAL_Tomorrow":null,ni=e=>{if(e){const t=Date.parse(e);if(!isNaN(t))return new Date(t).getTime()/1e3}},_P=(e=new Date)=>e.toISOString().substring(0,10),$P=(e,t="date")=>{const n=t.split("-"),r=[];return n.includes("date")&&r.push(`${Tr(e.date)}/${Tr(e.month)}/${e.year}`),n.includes("time")&&r.push(`${Tr(e.hours)}h${Tr(e.minutes)}`),n.includes("sec")&&r.push(`${Tr(e.seconds)}s`),r.join(" ")},eM=e=>!isNaN(Date.parse(e)),tM=e=>{const t=new Date(e);return t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},nM=e=>{const t=new Date(e);return t.setDate(32),t.setDate(32),t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},rM=Object.freeze(Object.defineProperty({__proto__:null,addMonth:nM,dateLabel:ME,extractDate:tA,formatDate:Co,formatDateTime:go,formatTime:Wc,isSameDay:Xm,isToday:Kd,isTomorrow:Vm,isValidDate:eM,isYesterday:Gm,padDate:ur,strToTimestamp:ni,substractMonth:tM,toHumanDate:$P,toISODate:_P},Symbol.toStringTag,{value:"Module"}));const{entries:HE,setPrototypeOf:Jb,isFrozen:AM,getPrototypeOf:iM,getOwnPropertyDescriptor:oM}=Object;let{freeze:yn,seal:vr,create:ac}=Object,{apply:dp,construct:up}=typeof Reflect<"u"&&Reflect;yn||(yn=function(t){return t});vr||(vr=function(t){return t});dp||(dp=function(t,n){for(var r=arguments.length,A=new Array(r>2?r-2:0),i=2;i<r;i++)A[i-2]=arguments[i];return t.apply(n,A)});up||(up=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return new t(...r)});const rl=Cn(Array.prototype.forEach),sM=Cn(Array.prototype.lastIndexOf),Yb=Cn(Array.prototype.pop),fs=Cn(Array.prototype.push),aM=Cn(Array.prototype.splice),lc=Cn(String.prototype.toLowerCase),Xf=Cn(String.prototype.toString),Gf=Cn(String.prototype.match),gs=Cn(String.prototype.replace),lM=Cn(String.prototype.indexOf),cM=Cn(String.prototype.trim),Xn=Cn(Object.prototype.hasOwnProperty),fn=Cn(RegExp.prototype.test),hs=dM(TypeError);function Cn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return dp(e,t,r)}}function dM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return up(e,n)}}function Ke(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lc;Jb&&Jb(e,null);let r=t.length;for(;r--;){let A=t[r];if(typeof A=="string"){const i=n(A);i!==A&&(AM(t)||(t[r]=i),A=i)}e[A]=!0}return e}function uM(e){for(let t=0;t<e.length;t++)Xn(e,t)||(e[t]=null);return e}function Vr(e){const t=ac(null);for(const[n,r]of HE(e))Xn(e,n)&&(Array.isArray(r)?t[n]=uM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Vr(r):t[n]=r);return t}function ps(e,t){for(;e!==null;){const r=oM(e,t);if(r){if(r.get)return Cn(r.get);if(typeof r.value=="function")return Cn(r.value)}e=iM(e)}function n(){return null}return n}const Zb=yn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vf=yn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Kf=yn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fM=yn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qf=yn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gM=yn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_b=yn(["#text"]),$b=yn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Jf=yn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ex=yn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Al=yn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hM=vr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pM=vr(/<%[\w\W]*|[\w\W]*%>/gm),mM=vr(/\$\{[\w\W]*/gm),vM=vr(/^data-[\-\w.\u00B7-\uFFFF]+$/),wM=vr(/^aria-[\-\w]+$/),kE=vr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bM=vr(/^(?:\w+script|data):/i),xM=vr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),NE=vr(/^html$/i),yM=vr(/^[a-z][.\w]*(-[.\w]+)+$/i);var tx=Object.freeze({__proto__:null,ARIA_ATTR:wM,ATTR_WHITESPACE:xM,CUSTOM_ELEMENT:yM,DATA_ATTR:vM,DOCTYPE_NAME:NE,ERB_EXPR:pM,IS_ALLOWED_URI:kE,IS_SCRIPT_OR_DATA:bM,MUSTACHE_EXPR:hM,TMPLIT_EXPR:mM});const ms={element:1,text:3,progressingInstruction:7,comment:8,document:9},CM=function(){return typeof window>"u"?null:window},BM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const A="data-tt-policy-suffix";n&&n.hasAttribute(A)&&(r=n.getAttribute(A));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function UE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CM();const t=be=>UE(be);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==ms.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,A=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:g}=e,p=l.prototype,v=ps(p,"cloneNode"),w=ps(p,"remove"),b=ps(p,"nextSibling"),C=ps(p,"childNodes"),x=ps(p,"parentNode");if(typeof o=="function"){const be=n.createElement("template");be.content&&be.content.ownerDocument&&(n=be.content.ownerDocument)}let y,B="";const{implementation:E,createNodeIterator:D,createDocumentFragment:I,getElementsByTagName:T}=n,{importNode:Q}=r;let F=nx();t.isSupported=typeof HE=="function"&&typeof x=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:U,ERB_EXPR:z,TMPLIT_EXPR:k,DATA_ATTR:W,ARIA_ATTR:Z,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:Ae}=tx;let{IS_ALLOWED_URI:L}=tx,S=null;const M=Ke({},[...Zb,...Vf,...Kf,...qf,..._b]);let V=null;const N=Ke({},[...$b,...Jf,...ex,...Al]);let j=Object.seal(ac(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,X=null;const O=Object.seal(ac(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,se=!0,He=!1,re=!0,te=!1,xe=!0,Oe=!1,Te=!1,Re=!1,lt=!1,le=!1,Pe=!1,fe=!0,Ct=!1;const xr="user-content-";let En=!0,Dn=!1,Sn={},Gt=null;const In=Ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zr=null;const rr=Ke({},["audio","video","img","source","image","track"]);let Ar=null;const aA=Ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ir="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let Bt=rt,or=!1,yr=null;const Qe=Ke({},[ir,Tn,rt],Xf);let ze=Ke({},["mi","mo","mn","ms","mtext"]),we=Ke({},["annotation-xml"]);const Ge=Ke({},["title","style","font","a","script"]);let ut=null;const Ne=["application/xhtml+xml","text/html"],IA="text/html";let Ue=null,mt=null;const Ce=n.createElement("form"),We=function(P){return P instanceof RegExp||P instanceof Function},Zt=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mt&&mt===P)){if((!P||typeof P!="object")&&(P={}),P=Vr(P),ut=Ne.indexOf(P.PARSER_MEDIA_TYPE)===-1?IA:P.PARSER_MEDIA_TYPE,Ue=ut==="application/xhtml+xml"?Xf:lc,S=Xn(P,"ALLOWED_TAGS")?Ke({},P.ALLOWED_TAGS,Ue):M,V=Xn(P,"ALLOWED_ATTR")?Ke({},P.ALLOWED_ATTR,Ue):N,yr=Xn(P,"ALLOWED_NAMESPACES")?Ke({},P.ALLOWED_NAMESPACES,Xf):Qe,Ar=Xn(P,"ADD_URI_SAFE_ATTR")?Ke(Vr(aA),P.ADD_URI_SAFE_ATTR,Ue):aA,zr=Xn(P,"ADD_DATA_URI_TAGS")?Ke(Vr(rr),P.ADD_DATA_URI_TAGS,Ue):rr,Gt=Xn(P,"FORBID_CONTENTS")?Ke({},P.FORBID_CONTENTS,Ue):In,G=Xn(P,"FORBID_TAGS")?Ke({},P.FORBID_TAGS,Ue):Vr({}),X=Xn(P,"FORBID_ATTR")?Ke({},P.FORBID_ATTR,Ue):Vr({}),Sn=Xn(P,"USE_PROFILES")?P.USE_PROFILES:!1,oe=P.ALLOW_ARIA_ATTR!==!1,se=P.ALLOW_DATA_ATTR!==!1,He=P.ALLOW_UNKNOWN_PROTOCOLS||!1,re=P.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=P.SAFE_FOR_TEMPLATES||!1,xe=P.SAFE_FOR_XML!==!1,Oe=P.WHOLE_DOCUMENT||!1,lt=P.RETURN_DOM||!1,le=P.RETURN_DOM_FRAGMENT||!1,Pe=P.RETURN_TRUSTED_TYPE||!1,Re=P.FORCE_BODY||!1,fe=P.SANITIZE_DOM!==!1,Ct=P.SANITIZE_NAMED_PROPS||!1,En=P.KEEP_CONTENT!==!1,Dn=P.IN_PLACE||!1,L=P.ALLOWED_URI_REGEXP||kE,Bt=P.NAMESPACE||rt,ze=P.MATHML_TEXT_INTEGRATION_POINTS||ze,we=P.HTML_INTEGRATION_POINTS||we,j=P.CUSTOM_ELEMENT_HANDLING||{},P.CUSTOM_ELEMENT_HANDLING&&We(P.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=P.CUSTOM_ELEMENT_HANDLING.tagNameCheck),P.CUSTOM_ELEMENT_HANDLING&&We(P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),P.CUSTOM_ELEMENT_HANDLING&&typeof P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(se=!1),le&&(lt=!0),Sn&&(S=Ke({},_b),V=ac(null),Sn.html===!0&&(Ke(S,Zb),Ke(V,$b)),Sn.svg===!0&&(Ke(S,Vf),Ke(V,Jf),Ke(V,Al)),Sn.svgFilters===!0&&(Ke(S,Kf),Ke(V,Jf),Ke(V,Al)),Sn.mathMl===!0&&(Ke(S,qf),Ke(V,ex),Ke(V,Al))),Xn(P,"ADD_TAGS")||(O.tagCheck=null),Xn(P,"ADD_ATTR")||(O.attributeCheck=null),P.ADD_TAGS&&(typeof P.ADD_TAGS=="function"?O.tagCheck=P.ADD_TAGS:(S===M&&(S=Vr(S)),Ke(S,P.ADD_TAGS,Ue))),P.ADD_ATTR&&(typeof P.ADD_ATTR=="function"?O.attributeCheck=P.ADD_ATTR:(V===N&&(V=Vr(V)),Ke(V,P.ADD_ATTR,Ue))),P.ADD_URI_SAFE_ATTR&&Ke(Ar,P.ADD_URI_SAFE_ATTR,Ue),P.FORBID_CONTENTS&&(Gt===In&&(Gt=Vr(Gt)),Ke(Gt,P.FORBID_CONTENTS,Ue)),P.ADD_FORBID_CONTENTS&&(Gt===In&&(Gt=Vr(Gt)),Ke(Gt,P.ADD_FORBID_CONTENTS,Ue)),En&&(S["#text"]=!0),Oe&&Ke(S,["html","head","body"]),S.table&&(Ke(S,["tbody"]),delete G.tbody),P.TRUSTED_TYPES_POLICY){if(typeof P.TRUSTED_TYPES_POLICY.createHTML!="function")throw hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof P.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=P.TRUSTED_TYPES_POLICY,B=y.createHTML("")}else y===void 0&&(y=BM(g,A)),y!==null&&typeof B=="string"&&(B=y.createHTML(""));yn&&yn(P),mt=P}},Wr=Ke({},[...Vf,...Kf,...fM]),ce=Ke({},[...qf,...gM]),Ee=function(P){let ie=x(P);(!ie||!ie.tagName)&&(ie={namespaceURI:Bt,tagName:"template"});const pe=lc(P.tagName),De=lc(ie.tagName);return yr[P.namespaceURI]?P.namespaceURI===Tn?ie.namespaceURI===rt?pe==="svg":ie.namespaceURI===ir?pe==="svg"&&(De==="annotation-xml"||ze[De]):!!Wr[pe]:P.namespaceURI===ir?ie.namespaceURI===rt?pe==="math":ie.namespaceURI===Tn?pe==="math"&&we[De]:!!ce[pe]:P.namespaceURI===rt?ie.namespaceURI===Tn&&!we[De]||ie.namespaceURI===ir&&!ze[De]?!1:!ce[pe]&&(Ge[pe]||!Wr[pe]):!!(ut==="application/xhtml+xml"&&yr[P.namespaceURI]):!1},he=function(P){fs(t.removed,{element:P});try{x(P).removeChild(P)}catch{w(P)}},qe=function(P,ie){try{fs(t.removed,{attribute:ie.getAttributeNode(P),from:ie})}catch{fs(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(P),P==="is")if(lt||le)try{he(ie)}catch{}else try{ie.setAttribute(P,"")}catch{}},Lt=function(P){let ie=null,pe=null;if(Re)P="<remove></remove>"+P;else{const vt=Gf(P,/^[\r\n\t ]+/);pe=vt&&vt[0]}ut==="application/xhtml+xml"&&Bt===rt&&(P='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+P+"</body></html>");const De=y?y.createHTML(P):P;if(Bt===rt)try{ie=new f().parseFromString(De,ut)}catch{}if(!ie||!ie.documentElement){ie=E.createDocument(Bt,"template",null);try{ie.documentElement.innerHTML=or?B:De}catch{}}const ft=ie.body||ie.documentElement;return P&&pe&&ft.insertBefore(n.createTextNode(pe),ft.childNodes[0]||null),Bt===rt?T.call(ie,Oe?"html":"body")[0]:Oe?ie.documentElement:ft},Un=function(P){return D.call(P.ownerDocument||P,P,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},On=function(P){return P instanceof u&&(typeof P.nodeName!="string"||typeof P.textContent!="string"||typeof P.removeChild!="function"||!(P.attributes instanceof d)||typeof P.removeAttribute!="function"||typeof P.setAttribute!="function"||typeof P.namespaceURI!="string"||typeof P.insertBefore!="function"||typeof P.hasChildNodes!="function")},Vt=function(P){return typeof a=="function"&&P instanceof a};function Qt(be,P,ie){rl(be,pe=>{pe.call(t,P,ie,mt)})}const ct=function(P){let ie=null;if(Qt(F.beforeSanitizeElements,P,null),On(P))return he(P),!0;const pe=Ue(P.nodeName);if(Qt(F.uponSanitizeElement,P,{tagName:pe,allowedTags:S}),xe&&P.hasChildNodes()&&!Vt(P.firstElementChild)&&fn(/<[/\w!]/g,P.innerHTML)&&fn(/<[/\w!]/g,P.textContent)||P.nodeType===ms.progressingInstruction||xe&&P.nodeType===ms.comment&&fn(/<[/\w]/g,P.data))return he(P),!0;if(!(O.tagCheck instanceof Function&&O.tagCheck(pe))&&(!S[pe]||G[pe])){if(!G[pe]&&za(pe)&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,pe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(pe)))return!1;if(En&&!Gt[pe]){const De=x(P)||P.parentNode,ft=C(P)||P.childNodes;if(ft&&De){const vt=ft.length;for(let Ut=vt-1;Ut>=0;--Ut){const Cr=v(ft[Ut],!0);Cr.__removalCount=(P.__removalCount||0)+1,De.insertBefore(Cr,b(P))}}}return he(P),!0}return P instanceof l&&!Ee(P)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&fn(/<\/no(script|embed|frames)/i,P.innerHTML)?(he(P),!0):(te&&P.nodeType===ms.text&&(ie=P.textContent,rl([U,z,k],De=>{ie=gs(ie,De," ")}),P.textContent!==ie&&(fs(t.removed,{element:P.cloneNode()}),P.textContent=ie)),Qt(F.afterSanitizeElements,P,null),!1)},lA=function(P,ie,pe){if(X[ie]||fe&&(ie==="id"||ie==="name")&&(pe in n||pe in Ce))return!1;if(!(se&&!X[ie]&&fn(W,ie))){if(!(oe&&fn(Z,ie))){if(!(O.attributeCheck instanceof Function&&O.attributeCheck(ie,P))){if(!V[ie]||X[ie]){if(!(za(P)&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,P)||j.tagNameCheck instanceof Function&&j.tagNameCheck(P))&&(j.attributeNameCheck instanceof RegExp&&fn(j.attributeNameCheck,ie)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(ie,P))||ie==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,pe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(pe))))return!1}else if(!Ar[ie]){if(!fn(L,gs(pe,Y,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&P!=="script"&&lM(pe,"data:")===0&&zr[P])){if(!(He&&!fn(J,gs(pe,Y,"")))){if(pe)return!1}}}}}}}return!0},za=function(P){return P!=="annotation-xml"&&Gf(P,Ae)},Wa=function(P){Qt(F.beforeSanitizeAttributes,P,null);const{attributes:ie}=P;if(!ie||On(P))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let De=ie.length;for(;De--;){const ft=ie[De],{name:vt,namespaceURI:Ut,value:Cr}=ft,Xr=Ue(vt),Qu=Cr;let _t=vt==="value"?Qu:cM(Qu);if(pe.attrName=Xr,pe.attrValue=_t,pe.keepAttr=!0,pe.forceKeepAttr=void 0,Qt(F.uponSanitizeAttribute,P,pe),_t=pe.attrValue,Ct&&(Xr==="id"||Xr==="name")&&(qe(vt,P),_t=xr+_t),xe&&fn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_t)){qe(vt,P);continue}if(Xr==="attributename"&&Gf(_t,"href")){qe(vt,P);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){qe(vt,P);continue}if(!re&&fn(/\/>/i,_t)){qe(vt,P);continue}te&&rl([U,z,k],Ww=>{_t=gs(_t,Ww," ")});const zw=Ue(P.nodeName);if(!lA(zw,Xr,_t)){qe(vt,P);continue}if(y&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ut)switch(g.getAttributeType(zw,Xr)){case"TrustedHTML":{_t=y.createHTML(_t);break}case"TrustedScriptURL":{_t=y.createScriptURL(_t);break}}if(_t!==Qu)try{Ut?P.setAttributeNS(Ut,vt,_t):P.setAttribute(vt,_t),On(P)?he(P):Yb(t.removed)}catch{qe(vt,P)}}Qt(F.afterSanitizeAttributes,P,null)},Xa=function be(P){let ie=null;const pe=Un(P);for(Qt(F.beforeSanitizeShadowDOM,P,null);ie=pe.nextNode();)Qt(F.uponSanitizeShadowNode,ie,null),ct(ie),Wa(ie),ie.content instanceof i&&be(ie.content);Qt(F.afterSanitizeShadowDOM,P,null)};return t.sanitize=function(be){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,De=null,ft=null;if(or=!be,or&&(be="<!-->"),typeof be!="string"&&!Vt(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw hs("dirty is not a string, aborting")}else throw hs("toString is not a function");if(!t.isSupported)return be;if(Te||Zt(P),t.removed=[],typeof be=="string"&&(Dn=!1),Dn){if(be.nodeName){const Cr=Ue(be.nodeName);if(!S[Cr]||G[Cr])throw hs("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof a)ie=Lt("<!---->"),pe=ie.ownerDocument.importNode(be,!0),pe.nodeType===ms.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!lt&&!te&&!Oe&&be.indexOf("<")===-1)return y&&Pe?y.createHTML(be):be;if(ie=Lt(be),!ie)return lt?null:Pe?B:""}ie&&Re&&he(ie.firstChild);const vt=Un(Dn?be:ie);for(;De=vt.nextNode();)ct(De),Wa(De),De.content instanceof i&&Xa(De.content);if(Dn)return be;if(lt){if(le)for(ft=I.call(ie.ownerDocument);ie.firstChild;)ft.appendChild(ie.firstChild);else ft=ie;return(V.shadowroot||V.shadowrootmode)&&(ft=Q.call(r,ft,!0)),ft}let Ut=Oe?ie.outerHTML:ie.innerHTML;return Oe&&S["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&fn(NE,ie.ownerDocument.doctype.name)&&(Ut="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
|
|
376
|
+
`,Rt=e=>{const t=H.useIntl(),n=nr(),r=h.useRef(null),A=!!(e.closeButton??e.button),i=e.closeButton??e.button?"large":e.title??(e.description&&e.description.length>50)?"medium":"small",o=()=>{r.current?.close()};return e.active===!1?s.jsx(s.Fragment,{children:e.children}):s.jsx(s.Fragment,{children:s.jsx(Wm,{ref:r,height:e.height,asBlock:e.asBlock,dataEventOff:e.closeButton&&e.button?"click":"mouseleave",className:e.className,color:{background:n.color.navy,text:n.color.white},description:e.description,sizeTooltip:i,position:e.position,tooltip:s.jsxs("div",{children:[s.jsxs(XP,{children:[i==="large"&&e.closeButton&&e.button&&s.jsx(GP,{onClick:o,children:s.jsx(ne,{name:"icon-times",size:24,color:"white"})}),s.jsxs(WP,{children:[e.title!==void 0&&s.jsx(No,{size:"l",children:t.formatMessage({id:e.title})}),s.jsx(KP,{$sizeTooltip:i,children:t.formatMessage({id:e.description})})]})]}),s.jsx(VP,{children:i==="large"&&e.button&&s.jsx(CE,{...e.button,onClick:a=>{e.button?.onClick?.(a),o()}})})]}),clickable:A,children:e.children})})};function qP(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function JP(e,t){return e?.startsWith(t)?e.split("").slice(t.length).join(""):e}function Tr(e){return e.toString().padStart(2,"0")}function PE(e,t){return e.slice(0,t).trim()+(e.trim().length>t?"...":"")}function YP(e){return e.length===0?"":e[0].toUpperCase()+e.slice(1)}const ZP=Object.freeze(Object.defineProperty({__proto__:null,capitalize:YP,limitSize:PE,padStartTwoDigits:Tr,removeIfStartsWith:JP,suffixIfDoesNotExist:qP},Symbol.toStringTag,{value:"Module"})),ur=e=>String(e).padStart(2,"0"),tA=e=>{const t=e?new Date(e):new Date;return{date:t.getDate(),month:t.getMonth()+1,year:t.getFullYear(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds()}},Co=e=>{const t=e.getFullYear(),n=ur(e.getMonth()+1),r=ur(e.getDate());return`${t}-${n}-${r}`},Wc=e=>{const t=ur(e.getHours()),n=ur(e.getMinutes()),r=ur(e.getSeconds());return`${t}:${n}:${r}`},go=e=>{const t=Co(e),n=Wc(e);return`${t} ${n}`},Xm=(e,t)=>{const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return n===i&&r===o&&A===a},Kd=e=>{const{date:t,month:n,year:r}=tA(),{date:A,month:i,year:o}=tA(e);return t===A&&n===i&&r===o},Gm=e=>{const t=new Date;t.setDate(t.getDate()-1);const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return i===n&&o===r&&a===A},Vm=e=>{const t=new Date;t.setDate(t.getDate()+1);const{date:n,month:r,year:A}=tA(t),{date:i,month:o,year:a}=tA(e);return i===n&&o===r&&a===A},ME=e=>Kd(e)?"GLOBAL_Today":Gm(e)?"GLOBAL_Yesterday":Vm(e)?"GLOBAL_Tomorrow":null,ni=e=>{if(e){const t=Date.parse(e);if(!isNaN(t))return new Date(t).getTime()/1e3}},_P=(e=new Date)=>e.toISOString().substring(0,10),$P=(e,t="date")=>{const n=t.split("-"),r=[];return n.includes("date")&&r.push(`${Tr(e.date)}/${Tr(e.month)}/${e.year}`),n.includes("time")&&r.push(`${Tr(e.hours)}h${Tr(e.minutes)}`),n.includes("sec")&&r.push(`${Tr(e.seconds)}s`),r.join(" ")},eM=e=>!isNaN(Date.parse(e)),tM=e=>{const t=new Date(e);return t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},nM=e=>{const t=new Date(e);return t.setDate(32),t.setDate(32),t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},rM=Object.freeze(Object.defineProperty({__proto__:null,addMonth:nM,dateLabel:ME,extractDate:tA,formatDate:Co,formatDateTime:go,formatTime:Wc,isSameDay:Xm,isToday:Kd,isTomorrow:Vm,isValidDate:eM,isYesterday:Gm,padDate:ur,strToTimestamp:ni,substractMonth:tM,toHumanDate:$P,toISODate:_P},Symbol.toStringTag,{value:"Module"}));const{entries:HE,setPrototypeOf:Jb,isFrozen:AM,getPrototypeOf:iM,getOwnPropertyDescriptor:oM}=Object;let{freeze:yn,seal:vr,create:ac}=Object,{apply:dp,construct:up}=typeof Reflect<"u"&&Reflect;yn||(yn=function(t){return t});vr||(vr=function(t){return t});dp||(dp=function(t,n){for(var r=arguments.length,A=new Array(r>2?r-2:0),i=2;i<r;i++)A[i-2]=arguments[i];return t.apply(n,A)});up||(up=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return new t(...r)});const rl=Cn(Array.prototype.forEach),sM=Cn(Array.prototype.lastIndexOf),Yb=Cn(Array.prototype.pop),fs=Cn(Array.prototype.push),aM=Cn(Array.prototype.splice),lc=Cn(String.prototype.toLowerCase),Xf=Cn(String.prototype.toString),Gf=Cn(String.prototype.match),gs=Cn(String.prototype.replace),lM=Cn(String.prototype.indexOf),cM=Cn(String.prototype.trim),Xn=Cn(Object.prototype.hasOwnProperty),fn=Cn(RegExp.prototype.test),hs=dM(TypeError);function Cn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return dp(e,t,r)}}function dM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return up(e,n)}}function Ke(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lc;Jb&&Jb(e,null);let r=t.length;for(;r--;){let A=t[r];if(typeof A=="string"){const i=n(A);i!==A&&(AM(t)||(t[r]=i),A=i)}e[A]=!0}return e}function uM(e){for(let t=0;t<e.length;t++)Xn(e,t)||(e[t]=null);return e}function Vr(e){const t=ac(null);for(const[n,r]of HE(e))Xn(e,n)&&(Array.isArray(r)?t[n]=uM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Vr(r):t[n]=r);return t}function ps(e,t){for(;e!==null;){const r=oM(e,t);if(r){if(r.get)return Cn(r.get);if(typeof r.value=="function")return Cn(r.value)}e=iM(e)}function n(){return null}return n}const Zb=yn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vf=yn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Kf=yn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fM=yn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qf=yn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gM=yn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_b=yn(["#text"]),$b=yn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Jf=yn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ex=yn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Al=yn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hM=vr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pM=vr(/<%[\w\W]*|[\w\W]*%>/gm),mM=vr(/\$\{[\w\W]*/gm),vM=vr(/^data-[\-\w.\u00B7-\uFFFF]+$/),wM=vr(/^aria-[\-\w]+$/),kE=vr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bM=vr(/^(?:\w+script|data):/i),xM=vr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),NE=vr(/^html$/i),yM=vr(/^[a-z][.\w]*(-[.\w]+)+$/i);var tx=Object.freeze({__proto__:null,ARIA_ATTR:wM,ATTR_WHITESPACE:xM,CUSTOM_ELEMENT:yM,DATA_ATTR:vM,DOCTYPE_NAME:NE,ERB_EXPR:pM,IS_ALLOWED_URI:kE,IS_SCRIPT_OR_DATA:bM,MUSTACHE_EXPR:hM,TMPLIT_EXPR:mM});const ms={element:1,text:3,progressingInstruction:7,comment:8,document:9},CM=function(){return typeof window>"u"?null:window},BM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const A="data-tt-policy-suffix";n&&n.hasAttribute(A)&&(r=n.getAttribute(A));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function UE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CM();const t=be=>UE(be);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==ms.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,A=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:g}=e,p=l.prototype,v=ps(p,"cloneNode"),w=ps(p,"remove"),b=ps(p,"nextSibling"),C=ps(p,"childNodes"),x=ps(p,"parentNode");if(typeof o=="function"){const be=n.createElement("template");be.content&&be.content.ownerDocument&&(n=be.content.ownerDocument)}let y,B="";const{implementation:E,createNodeIterator:D,createDocumentFragment:I,getElementsByTagName:T}=n,{importNode:Q}=r;let F=nx();t.isSupported=typeof HE=="function"&&typeof x=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:U,ERB_EXPR:z,TMPLIT_EXPR:k,DATA_ATTR:W,ARIA_ATTR:Z,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:Ae}=tx;let{IS_ALLOWED_URI:L}=tx,S=null;const M=Ke({},[...Zb,...Vf,...Kf,...qf,..._b]);let V=null;const N=Ke({},[...$b,...Jf,...ex,...Al]);let j=Object.seal(ac(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,X=null;const O=Object.seal(ac(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,se=!0,He=!1,re=!0,te=!1,xe=!0,Oe=!1,Te=!1,Re=!1,lt=!1,le=!1,Pe=!1,fe=!0,Ct=!1;const xr="user-content-";let En=!0,Dn=!1,Sn={},Gt=null;const In=Ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zr=null;const rr=Ke({},["audio","video","img","source","image","track"]);let Ar=null;const aA=Ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ir="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let Bt=rt,or=!1,yr=null;const Qe=Ke({},[ir,Tn,rt],Xf);let ze=Ke({},["mi","mo","mn","ms","mtext"]),we=Ke({},["annotation-xml"]);const Ge=Ke({},["title","style","font","a","script"]);let ut=null;const Ne=["application/xhtml+xml","text/html"],IA="text/html";let Ue=null,mt=null;const Ce=n.createElement("form"),We=function(P){return P instanceof RegExp||P instanceof Function},Zt=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mt&&mt===P)){if((!P||typeof P!="object")&&(P={}),P=Vr(P),ut=Ne.indexOf(P.PARSER_MEDIA_TYPE)===-1?IA:P.PARSER_MEDIA_TYPE,Ue=ut==="application/xhtml+xml"?Xf:lc,S=Xn(P,"ALLOWED_TAGS")?Ke({},P.ALLOWED_TAGS,Ue):M,V=Xn(P,"ALLOWED_ATTR")?Ke({},P.ALLOWED_ATTR,Ue):N,yr=Xn(P,"ALLOWED_NAMESPACES")?Ke({},P.ALLOWED_NAMESPACES,Xf):Qe,Ar=Xn(P,"ADD_URI_SAFE_ATTR")?Ke(Vr(aA),P.ADD_URI_SAFE_ATTR,Ue):aA,zr=Xn(P,"ADD_DATA_URI_TAGS")?Ke(Vr(rr),P.ADD_DATA_URI_TAGS,Ue):rr,Gt=Xn(P,"FORBID_CONTENTS")?Ke({},P.FORBID_CONTENTS,Ue):In,G=Xn(P,"FORBID_TAGS")?Ke({},P.FORBID_TAGS,Ue):Vr({}),X=Xn(P,"FORBID_ATTR")?Ke({},P.FORBID_ATTR,Ue):Vr({}),Sn=Xn(P,"USE_PROFILES")?P.USE_PROFILES:!1,oe=P.ALLOW_ARIA_ATTR!==!1,se=P.ALLOW_DATA_ATTR!==!1,He=P.ALLOW_UNKNOWN_PROTOCOLS||!1,re=P.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=P.SAFE_FOR_TEMPLATES||!1,xe=P.SAFE_FOR_XML!==!1,Oe=P.WHOLE_DOCUMENT||!1,lt=P.RETURN_DOM||!1,le=P.RETURN_DOM_FRAGMENT||!1,Pe=P.RETURN_TRUSTED_TYPE||!1,Re=P.FORCE_BODY||!1,fe=P.SANITIZE_DOM!==!1,Ct=P.SANITIZE_NAMED_PROPS||!1,En=P.KEEP_CONTENT!==!1,Dn=P.IN_PLACE||!1,L=P.ALLOWED_URI_REGEXP||kE,Bt=P.NAMESPACE||rt,ze=P.MATHML_TEXT_INTEGRATION_POINTS||ze,we=P.HTML_INTEGRATION_POINTS||we,j=P.CUSTOM_ELEMENT_HANDLING||{},P.CUSTOM_ELEMENT_HANDLING&&We(P.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=P.CUSTOM_ELEMENT_HANDLING.tagNameCheck),P.CUSTOM_ELEMENT_HANDLING&&We(P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),P.CUSTOM_ELEMENT_HANDLING&&typeof P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(se=!1),le&&(lt=!0),Sn&&(S=Ke({},_b),V=ac(null),Sn.html===!0&&(Ke(S,Zb),Ke(V,$b)),Sn.svg===!0&&(Ke(S,Vf),Ke(V,Jf),Ke(V,Al)),Sn.svgFilters===!0&&(Ke(S,Kf),Ke(V,Jf),Ke(V,Al)),Sn.mathMl===!0&&(Ke(S,qf),Ke(V,ex),Ke(V,Al))),Xn(P,"ADD_TAGS")||(O.tagCheck=null),Xn(P,"ADD_ATTR")||(O.attributeCheck=null),P.ADD_TAGS&&(typeof P.ADD_TAGS=="function"?O.tagCheck=P.ADD_TAGS:(S===M&&(S=Vr(S)),Ke(S,P.ADD_TAGS,Ue))),P.ADD_ATTR&&(typeof P.ADD_ATTR=="function"?O.attributeCheck=P.ADD_ATTR:(V===N&&(V=Vr(V)),Ke(V,P.ADD_ATTR,Ue))),P.ADD_URI_SAFE_ATTR&&Ke(Ar,P.ADD_URI_SAFE_ATTR,Ue),P.FORBID_CONTENTS&&(Gt===In&&(Gt=Vr(Gt)),Ke(Gt,P.FORBID_CONTENTS,Ue)),P.ADD_FORBID_CONTENTS&&(Gt===In&&(Gt=Vr(Gt)),Ke(Gt,P.ADD_FORBID_CONTENTS,Ue)),En&&(S["#text"]=!0),Oe&&Ke(S,["html","head","body"]),S.table&&(Ke(S,["tbody"]),delete G.tbody),P.TRUSTED_TYPES_POLICY){if(typeof P.TRUSTED_TYPES_POLICY.createHTML!="function")throw hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof P.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=P.TRUSTED_TYPES_POLICY,B=y.createHTML("")}else y===void 0&&(y=BM(g,A)),y!==null&&typeof B=="string"&&(B=y.createHTML(""));yn&&yn(P),mt=P}},Wr=Ke({},[...Vf,...Kf,...fM]),ce=Ke({},[...qf,...gM]),Ee=function(P){let ie=x(P);(!ie||!ie.tagName)&&(ie={namespaceURI:Bt,tagName:"template"});const pe=lc(P.tagName),De=lc(ie.tagName);return yr[P.namespaceURI]?P.namespaceURI===Tn?ie.namespaceURI===rt?pe==="svg":ie.namespaceURI===ir?pe==="svg"&&(De==="annotation-xml"||ze[De]):!!Wr[pe]:P.namespaceURI===ir?ie.namespaceURI===rt?pe==="math":ie.namespaceURI===Tn?pe==="math"&&we[De]:!!ce[pe]:P.namespaceURI===rt?ie.namespaceURI===Tn&&!we[De]||ie.namespaceURI===ir&&!ze[De]?!1:!ce[pe]&&(Ge[pe]||!Wr[pe]):!!(ut==="application/xhtml+xml"&&yr[P.namespaceURI]):!1},he=function(P){fs(t.removed,{element:P});try{x(P).removeChild(P)}catch{w(P)}},qe=function(P,ie){try{fs(t.removed,{attribute:ie.getAttributeNode(P),from:ie})}catch{fs(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(P),P==="is")if(lt||le)try{he(ie)}catch{}else try{ie.setAttribute(P,"")}catch{}},Lt=function(P){let ie=null,pe=null;if(Re)P="<remove></remove>"+P;else{const vt=Gf(P,/^[\r\n\t ]+/);pe=vt&&vt[0]}ut==="application/xhtml+xml"&&Bt===rt&&(P='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+P+"</body></html>");const De=y?y.createHTML(P):P;if(Bt===rt)try{ie=new f().parseFromString(De,ut)}catch{}if(!ie||!ie.documentElement){ie=E.createDocument(Bt,"template",null);try{ie.documentElement.innerHTML=or?B:De}catch{}}const ft=ie.body||ie.documentElement;return P&&pe&&ft.insertBefore(n.createTextNode(pe),ft.childNodes[0]||null),Bt===rt?T.call(ie,Oe?"html":"body")[0]:Oe?ie.documentElement:ft},Un=function(P){return D.call(P.ownerDocument||P,P,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},On=function(P){return P instanceof u&&(typeof P.nodeName!="string"||typeof P.textContent!="string"||typeof P.removeChild!="function"||!(P.attributes instanceof d)||typeof P.removeAttribute!="function"||typeof P.setAttribute!="function"||typeof P.namespaceURI!="string"||typeof P.insertBefore!="function"||typeof P.hasChildNodes!="function")},Vt=function(P){return typeof a=="function"&&P instanceof a};function Qt(be,P,ie){rl(be,pe=>{pe.call(t,P,ie,mt)})}const ct=function(P){let ie=null;if(Qt(F.beforeSanitizeElements,P,null),On(P))return he(P),!0;const pe=Ue(P.nodeName);if(Qt(F.uponSanitizeElement,P,{tagName:pe,allowedTags:S}),xe&&P.hasChildNodes()&&!Vt(P.firstElementChild)&&fn(/<[/\w!]/g,P.innerHTML)&&fn(/<[/\w!]/g,P.textContent)||P.nodeType===ms.progressingInstruction||xe&&P.nodeType===ms.comment&&fn(/<[/\w]/g,P.data))return he(P),!0;if(!(O.tagCheck instanceof Function&&O.tagCheck(pe))&&(!S[pe]||G[pe])){if(!G[pe]&&za(pe)&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,pe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(pe)))return!1;if(En&&!Gt[pe]){const De=x(P)||P.parentNode,ft=C(P)||P.childNodes;if(ft&&De){const vt=ft.length;for(let Ut=vt-1;Ut>=0;--Ut){const Cr=v(ft[Ut],!0);Cr.__removalCount=(P.__removalCount||0)+1,De.insertBefore(Cr,b(P))}}}return he(P),!0}return P instanceof l&&!Ee(P)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&fn(/<\/no(script|embed|frames)/i,P.innerHTML)?(he(P),!0):(te&&P.nodeType===ms.text&&(ie=P.textContent,rl([U,z,k],De=>{ie=gs(ie,De," ")}),P.textContent!==ie&&(fs(t.removed,{element:P.cloneNode()}),P.textContent=ie)),Qt(F.afterSanitizeElements,P,null),!1)},lA=function(P,ie,pe){if(X[ie]||fe&&(ie==="id"||ie==="name")&&(pe in n||pe in Ce))return!1;if(!(se&&!X[ie]&&fn(W,ie))){if(!(oe&&fn(Z,ie))){if(!(O.attributeCheck instanceof Function&&O.attributeCheck(ie,P))){if(!V[ie]||X[ie]){if(!(za(P)&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,P)||j.tagNameCheck instanceof Function&&j.tagNameCheck(P))&&(j.attributeNameCheck instanceof RegExp&&fn(j.attributeNameCheck,ie)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(ie,P))||ie==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&fn(j.tagNameCheck,pe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(pe))))return!1}else if(!Ar[ie]){if(!fn(L,gs(pe,J,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&P!=="script"&&lM(pe,"data:")===0&&zr[P])){if(!(He&&!fn(Y,gs(pe,J,"")))){if(pe)return!1}}}}}}}return!0},za=function(P){return P!=="annotation-xml"&&Gf(P,Ae)},Wa=function(P){Qt(F.beforeSanitizeAttributes,P,null);const{attributes:ie}=P;if(!ie||On(P))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let De=ie.length;for(;De--;){const ft=ie[De],{name:vt,namespaceURI:Ut,value:Cr}=ft,Xr=Ue(vt),Qu=Cr;let _t=vt==="value"?Qu:cM(Qu);if(pe.attrName=Xr,pe.attrValue=_t,pe.keepAttr=!0,pe.forceKeepAttr=void 0,Qt(F.uponSanitizeAttribute,P,pe),_t=pe.attrValue,Ct&&(Xr==="id"||Xr==="name")&&(qe(vt,P),_t=xr+_t),xe&&fn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_t)){qe(vt,P);continue}if(Xr==="attributename"&&Gf(_t,"href")){qe(vt,P);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){qe(vt,P);continue}if(!re&&fn(/\/>/i,_t)){qe(vt,P);continue}te&&rl([U,z,k],Ww=>{_t=gs(_t,Ww," ")});const zw=Ue(P.nodeName);if(!lA(zw,Xr,_t)){qe(vt,P);continue}if(y&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ut)switch(g.getAttributeType(zw,Xr)){case"TrustedHTML":{_t=y.createHTML(_t);break}case"TrustedScriptURL":{_t=y.createScriptURL(_t);break}}if(_t!==Qu)try{Ut?P.setAttributeNS(Ut,vt,_t):P.setAttribute(vt,_t),On(P)?he(P):Yb(t.removed)}catch{qe(vt,P)}}Qt(F.afterSanitizeAttributes,P,null)},Xa=function be(P){let ie=null;const pe=Un(P);for(Qt(F.beforeSanitizeShadowDOM,P,null);ie=pe.nextNode();)Qt(F.uponSanitizeShadowNode,ie,null),ct(ie),Wa(ie),ie.content instanceof i&&be(ie.content);Qt(F.afterSanitizeShadowDOM,P,null)};return t.sanitize=function(be){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,De=null,ft=null;if(or=!be,or&&(be="<!-->"),typeof be!="string"&&!Vt(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw hs("dirty is not a string, aborting")}else throw hs("toString is not a function");if(!t.isSupported)return be;if(Te||Zt(P),t.removed=[],typeof be=="string"&&(Dn=!1),Dn){if(be.nodeName){const Cr=Ue(be.nodeName);if(!S[Cr]||G[Cr])throw hs("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof a)ie=Lt("<!---->"),pe=ie.ownerDocument.importNode(be,!0),pe.nodeType===ms.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!lt&&!te&&!Oe&&be.indexOf("<")===-1)return y&&Pe?y.createHTML(be):be;if(ie=Lt(be),!ie)return lt?null:Pe?B:""}ie&&Re&&he(ie.firstChild);const vt=Un(Dn?be:ie);for(;De=vt.nextNode();)ct(De),Wa(De),De.content instanceof i&&Xa(De.content);if(Dn)return be;if(lt){if(le)for(ft=I.call(ie.ownerDocument);ie.firstChild;)ft.appendChild(ie.firstChild);else ft=ie;return(V.shadowroot||V.shadowrootmode)&&(ft=Q.call(r,ft,!0)),ft}let Ut=Oe?ie.outerHTML:ie.innerHTML;return Oe&&S["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&fn(NE,ie.ownerDocument.doctype.name)&&(Ut="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
|
|
377
377
|
`+Ut),te&&rl([U,z,k],Cr=>{Ut=gs(Ut,Cr," ")}),y&&Pe?y.createHTML(Ut):Ut},t.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(be),Te=!0},t.clearConfig=function(){mt=null,Te=!1},t.isValidAttribute=function(be,P,ie){mt||Zt({});const pe=Ue(be),De=Ue(P);return lA(pe,De,ie)},t.addHook=function(be,P){typeof P=="function"&&fs(F[be],P)},t.removeHook=function(be,P){if(P!==void 0){const ie=sM(F[be],P);return ie===-1?void 0:aM(F[be],ie,1)[0]}return Yb(F[be])},t.removeHooks=function(be){F[be]=[]},t.removeAllHooks=function(){F=nx()},t}var zE=UE();const EM=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","br","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","h1","h2","h3","h4","h5","h6","hgroup","hr","i","img","ins","j-mention","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","shadow","small","source","spacer","span","strike","strong","sub","summary","sup","table","tbody","td","template","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","iframe"],DM=["accept","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","border","capture","cellpadding","cellspacing","checked","cite","class","clear","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","target","title","translate","type","usemap","value","width","slot","allowfullscreen","frameborder"],SM=["background-color","border","border-collapse","border-color","border-bottom-color","border-left-color","border-right-color","border-top-color","border-spacing","border-radius","border-width","color","display","font-size","height","line-height","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","padding","padding-bottom","padding-left","padding-right","padding-top","text-align","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-decoration-thickness","vertical-align","width"];zE.addHook("afterSanitizeAttributes",e=>{if(e.tagName.toLowerCase()==="iframe"&&e.setAttribute("sandbox","allow-scripts allow-same-origin"),"style"in e){const t=TM(e.style);t.length?e.setAttribute("style",t.join("")):e.removeAttribute("style")}});function IM(e){return zE.sanitize(e??"",{ALLOWED_TAGS:EM,ALLOWED_ATTR:DM})}function TM(e){const t=[];return Object.keys(e).forEach(function(n){const r=e[n];if(typeof r=="string"){const A=r.replace(/([A-Z])/g,"-$1").toLowerCase();if(SM.includes(A)){const i=e[A];t.push(`${A}:${i};`)}}}),t}const fp=e=>(new DOMParser().parseFromString(e.replace(/</g,"___E_S_C_A_P_E_D___"),"text/html").documentElement.textContent??"").replace(/___E_S_C_A_P_E_D___/g,"<");function WE(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}const ts=({condition:e,wrapper:t,wrapperFalse:n,children:r})=>s.jsx(s.Fragment,{children:e?t(r):n?n(r):r}),Da=({condition:e,hasLicense:t=!0,tooltip:n,children:r,className:A})=>{const o={description:H.useIntl().formatMessage({id:"GLOBAL_Action_Missing_License"})};return s.jsx(ts,{condition:!!e&&!!n||!t,wrapper:a=>s.jsx(Rt,{...t?n:o,className:A,children:a}),children:r})},Yf={s:{"font-size":12,"font-weight":"normal"},m:{"font-size":16,"font-weight":"semiBold"},l:{"font-size":18,"font-weight":"semiBold"}},OM=m.a`
|
|
378
378
|
color: ${e=>e.$color??e.theme.font.hrefColor};
|
|
379
379
|
${e=>e.$asBlock&&"display:block;"}
|
|
@@ -1078,7 +1078,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1078
1078
|
margin-bottom: ${({theme:e})=>e.space.md}px;
|
|
1079
1079
|
`,Ok=m.div`
|
|
1080
1080
|
margin-top: ${({theme:e})=>e.space.l}px;
|
|
1081
|
-
`,Qk=e=>{const t=kn(),n=H.useIntl(),{initialFolderColor:r,useNavigation:A,useDocumentFilters:i,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,useFilter:c,onClick:d,id:u,path:f}=e,[g,p]=h.useState(!1),[v,w]=h.useState(!1),[b,C]=h.useState([]),[x,y]=h.useState(),{onError:B}=e,E=h.useCallback(D=>{w(!0),e.handlers.drive.dropboxDocuments({documentParams:{path_lower:f,query:D},id:u},{signal:t.signal}).then(I=>{C(I.result.filter(T=>i.length?i.includes(T.id)&&T.type==="document":!0))}).catch(I=>{B&&!t.signal.aborted&&B(I.errorMsg)}).finally(()=>{t.signal.aborted||w(!1)})},[t.signal,u,B,f,e.handlers.drive,i]);return h.useEffect(()=>{(!g||x!==f)&&(E(""),p(!0),y(f))},[g,E,x,f]),s.jsxs(s.Fragment,{children:[c&&s.jsx(Tk,{children:s.jsx(zi,{onChange:E,width:"100%",placeholder:n.formatMessage({id:"DRIVE_Input_Search_Group_Item"})})}),v&&s.jsx(Ok,{children:s.jsx(Ve,{size:"m"})}),!v&&b.length===0&&s.jsx(Yd,{}),!v&&b.length!==0&&b.sort((D,I)=>I.type.localeCompare(D.type)).map(D=>s.jsx(rv,{entity:D,initialFolderColor:r,useNavigation:A,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,onClick:()=>d(D)},D.id))]})},bD=({initialFolder:e,initialFolderColor:t,useDocumentFilters:n=[],useFilter:r=!0,useNavigation:A=!0,onSelect:i,onSelectDocument:o,onSelectMultiDocument:a,onError:l,handlers:c,handleLogin:d,onLogin:u,currentAccount:f})=>{const g=H.useIntl(),p=kn(),[v,w]=h.useState([]),[b,C]=h.useState(),[x,y]=h.useState([]),[B,E]=h.useState(f),[D,I]=h.useState(),[T,Q]=h.useState(!1),[F,U]=h.useState(!0),[z,k]=h.useState("");h.useEffect(()=>{a&&a(x)},[x,a]),h.useEffect(()=>{e!==void 0&&w([{name:e.type==="group"?"group":"documents",title:e.title,id:e.id,path:""}])},[e]),h.useEffect(()=>{k(v.at(-1)?.path??"")},[v]);const W=h.useCallback(
|
|
1081
|
+
`,Qk=e=>{const t=kn(),n=H.useIntl(),{initialFolderColor:r,useNavigation:A,useDocumentFilters:i,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,useFilter:c,onClick:d,id:u,path:f}=e,[g,p]=h.useState(!1),[v,w]=h.useState(!1),[b,C]=h.useState([]),[x,y]=h.useState(),{onError:B}=e,E=h.useCallback(D=>{w(!0),e.handlers.drive.dropboxDocuments({documentParams:{path_lower:f,query:D},id:u},{signal:t.signal}).then(I=>{C(I.result.filter(T=>i.length?i.includes(T.id)&&T.type==="document":!0))}).catch(I=>{B&&!t.signal.aborted&&B(I.errorMsg)}).finally(()=>{t.signal.aborted||w(!1)})},[t.signal,u,B,f,e.handlers.drive,i]);return h.useEffect(()=>{(!g||x!==f)&&(E(""),p(!0),y(f))},[g,E,x,f]),s.jsxs(s.Fragment,{children:[c&&s.jsx(Tk,{children:s.jsx(zi,{onChange:E,width:"100%",placeholder:n.formatMessage({id:"DRIVE_Input_Search_Group_Item"})})}),v&&s.jsx(Ok,{children:s.jsx(Ve,{size:"m"})}),!v&&b.length===0&&s.jsx(Yd,{}),!v&&b.length!==0&&b.sort((D,I)=>I.type.localeCompare(D.type)).map(D=>s.jsx(rv,{entity:D,initialFolderColor:r,useNavigation:A,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,onClick:()=>d(D)},D.id))]})},bD=({initialFolder:e,initialFolderColor:t,useDocumentFilters:n=[],useFilter:r=!0,useNavigation:A=!0,onSelect:i,onSelectDocument:o,onSelectMultiDocument:a,onError:l,handlers:c,handleLogin:d,onLogin:u,currentAccount:f})=>{const g=H.useIntl(),p=kn(),[v,w]=h.useState([]),[b,C]=h.useState(),[x,y]=h.useState([]),[B,E]=h.useState(f),[D,I]=h.useState(),[T,Q]=h.useState(!1),[F,U]=h.useState(!0),[z,k]=h.useState("");h.useEffect(()=>{a&&a(x)},[x,a]),h.useEffect(()=>{e!==void 0&&w([{name:e.type==="group"?"group":"documents",title:e.title,id:e.id,path:""}])},[e]),h.useEffect(()=>{k(v.at(-1)?.path??"")},[v]);const W=h.useCallback(Y=>{!c.drive.listAccount||!c.drive.checkAccountToken||!c.drive.isAccountLogged||(U(!0),Q(!1),w([]),y([]),d&&c.drive.listAccount(vs,{signal:p.signal}).then(J=>{if(I(J.result),J.result.length>0){const Ae=(Y?J.result.find(L=>L.id===Y.id):J.result.find(L=>L.default))??J.result[0];E(Ae),c.drive.checkAccountToken(vs,{signal:p.signal}).then(L=>{L.result?c.drive.isAccountLogged(vs,Ae.id,{signal:p.signal}).then(S=>{S.result&&(Q(S.result),u&&u(Ae))}).catch(()=>{p.signal.aborted||Q(!1)}).finally(()=>{p.signal.aborted||U(!1)}):(Q(!1),U(!1))})}else E(void 0),Q(!1),U(!1)}).catch(J=>{p.signal.aborted||(l&&l(J.errorMsg),U(!1))}))},[p.signal,d,c.drive,l,u]),Z=h.useCallback(Y=>{U(!1),l&&l(Y)},[l]);return h.useEffect(()=>{W()},[W]),d&&F?s.jsx(Ve,{size:"l"}):s.jsxs(hD,{children:[d&&s.jsx(uD,{activeAccount:B,accounts:D,onLogout:W,onLogin:W,isLogged:T,onSetDefaultAccount:Y=>{E(J=>J&&{...J,default:!0}),I(J=>J&&J.map(Ae=>Ae.id===Y.id?{...Ae,default:!0}:{...Ae,default:!1}))},handlers:c,onLoginError:Z,service:vs,onError:l}),(!d||T)&&B&&s.jsxs(s.Fragment,{children:[s.jsxs(gD,{children:[A&&v.length>0?s.jsxs(Gc,{onClick:()=>w([]),children:[s.jsx("div",{children:g.formatMessage({id:"INPUT_FILE_ADVANCED_Dropbox"})}),s.jsx(ne,{name:"icon-angle-right",size:12})]}):s.jsx(s.Fragment,{}),v.map((Y,J)=>s.jsxs(Gc,{onClick:()=>w(Ae=>Ae.filter((L,S)=>S<=J)),children:[Y.title,J<v.length-1&&s.jsx(ne,{name:"icon-angle-right",size:12})]},J))]}),s.jsx(Qk,{path:z,initialFolderColor:t,useFilter:r,useNavigation:A,useDocumentFilters:n,onSelect:typeof i=="function"?i:void 0,onSelectMultiDocument:a?Y=>{const J=x.find(Ae=>Ae.id===Y.id);y(J?x.filter(Ae=>Ae.id!==Y.id):[...x,Y])}:void 0,onSelectDocument:o?Y=>{o&&o(Y,b)}:void 0,onClick:Y=>{C(Y),k(Y._extend.path),w([...v,{name:"documents",title:Y.title,id:Y.id,path:Y._extend.path}])},onError:l,handlers:c,id:B.id,service:vs})]})]})},Rk=m.div`
|
|
1082
1082
|
display: flex;
|
|
1083
1083
|
flex-direction: row;
|
|
1084
1084
|
gap: 10px;
|
|
@@ -1090,7 +1090,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1090
1090
|
margin-top: ${({theme:e})=>e.space.l}px;
|
|
1091
1091
|
`,Fk=({useFilter:e,useNavigation:t=!0,onSelect:n,onClick:r,handlers:A,onError:i,id:o})=>{const a=H.useIntl(),l=m.useTheme(),c=kn(),[d,u]=h.useState(""),[f,g]=h.useState("memberOf"),[p,v]=h.useState(!1),[w,b]=h.useState([]),C=h.useCallback((x,y)=>{v(!0),A.drive.groups({query:x,filter:y,id:o},{signal:c.signal}).then(B=>{b(B.result),v(!1)}).catch(B=>{i&&!c.signal.aborted&&i(B.errorMsg)}).finally(()=>{c.signal.aborted||v(!1)})},[c.signal,A.drive,o,i]);return h.useEffect(()=>{C(d,f)},[d,f,C]),s.jsxs(s.Fragment,{children:[e&&s.jsxs(Rk,{children:[s.jsx(jk,{children:s.jsx(zi,{onChange:u,width:"100%",placeholder:a.formatMessage({id:"DRIVE_Input_Search_Groupe"})})}),s.jsx(Ai,{small:!0,smallOpenDirection:"left",options:[{label:a.formatMessage({id:"DRIVE_MS_Group_Filters_All"}),icon:{name:"icon-check",color:f===""?l.color.green:"transparent"},onClick:()=>g("")},{label:a.formatMessage({id:"DRIVE_MS_Group_Filters_Member_Of"}),icon:{name:"icon-check",color:f==="memberOf"?l.color.green:"transparent"},onClick:()=>g("memberOf")}],icon:"icon-ellipsis-v",label:a.formatMessage({id:"DRIVE_MS_Group_Filters"}),color:"primary",variant:"outlined"})]}),p&&s.jsx(Av,{children:s.jsx(Ve,{size:"l"})}),!p&&w.length===0&&s.jsx(Yd,{}),!p&&w.map(x=>s.jsx(rv,{entity:x,useNavigation:t,onSelect:n,onClick:()=>r(x)},x.id))]})},Lk=m.div`
|
|
1092
1092
|
margin-bottom: ${({theme:e})=>e.space.md}px;
|
|
1093
|
-
`,Pk=e=>{const t=kn(),n=H.useIntl(),{driveDocumentParams:r,initialFolderColor:A,useNavigation:i,useDocumentFilters:o,onSelect:a,onSelectDocument:l,onSelectMultiDocument:c,useFilter:d,onClick:u,id:f}=e,[g,p]=h.useState(!1),[v,w]=h.useState(!1),[b,C]=h.useState([]),[x,y]=h.useState(),{onError:B}=e,E=h.useCallback(D=>{w(!0),e.handlers.drive.msDocuments({documentParams:{...r,query:D},id:f},{signal:t.signal}).then(I=>{C(I.result.filter(T=>o.length?o.includes(T.id)&&T.type==="document":!0))}).catch(I=>{B&&!t.signal.aborted&&B(I.errorMsg)}).finally(()=>{t.signal.aborted||w(!1)})},[t.signal,r,f,B,e.handlers.drive,o]);return h.useEffect(()=>{(!g||x!==r.idFolder)&&(E(""),p(!0),y(r.idFolder))},[g,r.idFolder,E,x]),s.jsxs(s.Fragment,{children:[d&&s.jsx(Lk,{children:s.jsx(zi,{onChange:E,width:"100%",placeholder:n.formatMessage({id:"DRIVE_Input_Search_Group_Item"})})}),v&&s.jsx(Av,{children:s.jsx(Ve,{size:"m"})}),!v&&b.length===0&&s.jsx(Yd,{}),!v&&b.length!==0&&b.sort((D,I)=>I.type.localeCompare(D.type)).map(D=>s.jsx(rv,{entity:D,initialFolderColor:A,useNavigation:i,onSelect:a,onSelectDocument:l,onSelectMultiDocument:c,onClick:()=>u(D)},D.id))]})};function Mk({handlers:e,id:t}){const n=kn(),[r,A]=h.useState(!1),[i,o]=h.useState(void 0),[a,l]=h.useState([]);return h.useEffect(()=>{A(!0),e.drive.tenants({id:t},{signal:n.signal}).then(c=>{l(c.result),A(!1)}).catch(c=>{n.signal.aborted||(A(!1),o(c))})},[n.signal,e.drive,t]),{loading:r,entities:a,error:i}}const Hk=({entity:e,initialFolderColor:t,onClick:n})=>s.jsxs(vD,{children:[s.jsx(wD,{children:s.jsx(_d,{uri:void 0,size:2,mimetype:"folder/",color:t??fD})}),s.jsx(pD,{title:e.title,type:"folder",useNavigation:!0,onClick:n})]}),kk=({initialFolderColor:e,onClick:t,onError:n,handlers:r,id:A})=>{const{loading:i,entities:o,error:a}=Mk({handlers:r,id:A});return h.useEffect(()=>{a!==void 0&&Array.isArray(a.messages)&&(a.messages.forEach(l=>{n&&n(l.msg)}),a.errorMsg&&n&&n(a.errorMsg))},[a,n]),i?s.jsx(Av,{children:s.jsx(Ve,{size:"l"})}):!i&&o.length===0?s.jsx(Yd,{}):s.jsx(s.Fragment,{children:o.map(l=>s.jsx(Hk,{entity:l,initialFolderColor:e,onClick:()=>t(l)},l.title))})},Nk={msTenant:void 0,msId:void 0,idFolder:"root",page:1,limit:20},xD=({initialParams:e,initialFolder:t,initialFolderColor:n,useDocumentFilters:r=[],useFilter:A=!0,useNavigation:i=!0,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,onError:c,handlers:d,handleLogin:u,onLogin:f,currentAccount:g})=>{const p=H.useIntl(),v=kn(),[w,b]=h.useState([]),[C,x]=h.useState(),[y,B]=h.useState(),[E,D]=h.useState(),[I,T]=h.useState([]),[Q,F]=h.useState(g),[U,z]=h.useState(),[k,W]=h.useState(!1),[Z,
|
|
1093
|
+
`,Pk=e=>{const t=kn(),n=H.useIntl(),{driveDocumentParams:r,initialFolderColor:A,useNavigation:i,useDocumentFilters:o,onSelect:a,onSelectDocument:l,onSelectMultiDocument:c,useFilter:d,onClick:u,id:f}=e,[g,p]=h.useState(!1),[v,w]=h.useState(!1),[b,C]=h.useState([]),[x,y]=h.useState(),{onError:B}=e,E=h.useCallback(D=>{w(!0),e.handlers.drive.msDocuments({documentParams:{...r,query:D},id:f},{signal:t.signal}).then(I=>{C(I.result.filter(T=>o.length?o.includes(T.id)&&T.type==="document":!0))}).catch(I=>{B&&!t.signal.aborted&&B(I.errorMsg)}).finally(()=>{t.signal.aborted||w(!1)})},[t.signal,r,f,B,e.handlers.drive,o]);return h.useEffect(()=>{(!g||x!==r.idFolder)&&(E(""),p(!0),y(r.idFolder))},[g,r.idFolder,E,x]),s.jsxs(s.Fragment,{children:[d&&s.jsx(Lk,{children:s.jsx(zi,{onChange:E,width:"100%",placeholder:n.formatMessage({id:"DRIVE_Input_Search_Group_Item"})})}),v&&s.jsx(Av,{children:s.jsx(Ve,{size:"m"})}),!v&&b.length===0&&s.jsx(Yd,{}),!v&&b.length!==0&&b.sort((D,I)=>I.type.localeCompare(D.type)).map(D=>s.jsx(rv,{entity:D,initialFolderColor:A,useNavigation:i,onSelect:a,onSelectDocument:l,onSelectMultiDocument:c,onClick:()=>u(D)},D.id))]})};function Mk({handlers:e,id:t}){const n=kn(),[r,A]=h.useState(!1),[i,o]=h.useState(void 0),[a,l]=h.useState([]);return h.useEffect(()=>{A(!0),e.drive.tenants({id:t},{signal:n.signal}).then(c=>{l(c.result),A(!1)}).catch(c=>{n.signal.aborted||(A(!1),o(c))})},[n.signal,e.drive,t]),{loading:r,entities:a,error:i}}const Hk=({entity:e,initialFolderColor:t,onClick:n})=>s.jsxs(vD,{children:[s.jsx(wD,{children:s.jsx(_d,{uri:void 0,size:2,mimetype:"folder/",color:t??fD})}),s.jsx(pD,{title:e.title,type:"folder",useNavigation:!0,onClick:n})]}),kk=({initialFolderColor:e,onClick:t,onError:n,handlers:r,id:A})=>{const{loading:i,entities:o,error:a}=Mk({handlers:r,id:A});return h.useEffect(()=>{a!==void 0&&Array.isArray(a.messages)&&(a.messages.forEach(l=>{n&&n(l.msg)}),a.errorMsg&&n&&n(a.errorMsg))},[a,n]),i?s.jsx(Av,{children:s.jsx(Ve,{size:"l"})}):!i&&o.length===0?s.jsx(Yd,{}):s.jsx(s.Fragment,{children:o.map(l=>s.jsx(Hk,{entity:l,initialFolderColor:e,onClick:()=>t(l)},l.title))})},Nk={msTenant:void 0,msId:void 0,idFolder:"root",page:1,limit:20},xD=({initialParams:e,initialFolder:t,initialFolderColor:n,useDocumentFilters:r=[],useFilter:A=!0,useNavigation:i=!0,onSelect:o,onSelectDocument:a,onSelectMultiDocument:l,onError:c,handlers:d,handleLogin:u,onLogin:f,currentAccount:g})=>{const p=H.useIntl(),v=kn(),[w,b]=h.useState([]),[C,x]=h.useState(),[y,B]=h.useState(),[E,D]=h.useState(),[I,T]=h.useState([]),[Q,F]=h.useState(g),[U,z]=h.useState(),[k,W]=h.useState(!1),[Z,Y]=h.useState(!0);h.useEffect(()=>{const L=e===void 0?{...Nk}:{...e};w.forEach(S=>{switch(S.name){case"groups":L.msTenant="groups";break;case"group":L.msId=S.id,L.idFolder="root";break;case"documents":L.idFolder=S.id;break;case"me":L.msTenant="me",L.idFolder="root";break}}),B(L)},[w,e]),h.useEffect(()=>{l&&y&&l(I,y)},[I,y,l]),h.useEffect(()=>{e!==void 0&&B(e)},[e]),h.useEffect(()=>{t!==void 0&&b([{name:t.type==="group"?"group":"documents",title:t.title,id:t.id}])},[t]),h.useEffect(()=>{x(w.at(-1))},[w]);const J=h.useCallback(L=>{!d.drive.listAccount||!d.drive.checkAccountToken||!d.drive.isAccountLogged||(Y(!0),W(!1),b([]),T([]),u&&d.drive.listAccount(il,{signal:v.signal}).then(S=>{if(z(S.result),S.result.length>0){const M=(L?S.result.find(V=>V.id===L.id):S.result.find(V=>V.default))??S.result[0];F(M),d.drive.checkAccountToken(il,{signal:v.signal}).then(V=>{V.result?d.drive.isAccountLogged(il,M.id,{signal:v.signal}).then(N=>{N.result&&(W(N.result),f&&f(M))}).catch(()=>{v.signal.aborted||W(!1)}).finally(()=>{v.signal.aborted||Y(!1)}):(W(!1),Y(!1))})}else F(void 0),W(!1),Y(!1)}).catch(S=>{v.signal.aborted||(c&&c(S.errorMsg),Y(!1))}))},[v.signal,u,d.drive,c,f]),Ae=h.useCallback(L=>{Y(!1),c&&c(L)},[c]);return h.useEffect(()=>{u&&J()},[u,J]),u&&Z?s.jsx(Ve,{size:"l"}):s.jsxs(hD,{children:[u&&s.jsx(uD,{activeAccount:Q,accounts:U,onLogout:J,onLogin:J,isLogged:k,onSetDefaultAccount:L=>{F(S=>S&&{...S,default:!0}),z(S=>S&&S.map(M=>M.id===L.id?{...M,default:!0}:{...M,default:!1}))},handlers:d,onLoginError:Ae,service:il,description:p.formatMessage({id:"DRIVE_MS_Error_Personal_Account"}),onError:c}),(!u||k)&&Q&&s.jsxs(s.Fragment,{children:[s.jsxs(gD,{children:[i&&w.length>0&&s.jsxs(Gc,{onClick:()=>b([]),children:[s.jsx("div",{children:p.formatMessage({id:"DRIVE_Root"})}),s.jsx(ne,{name:"icon-angle-right",size:12})]}),w.map((L,S)=>s.jsxs(Gc,{onClick:()=>b(M=>M.filter((V,N)=>N<=S)),children:[L.title,S<w.length-1&&s.jsx(ne,{name:"icon-angle-right",size:12})]},S))]}),C===void 0&&s.jsx(kk,{id:Q.id,initialFolderColor:n,onClick:L=>{b([...w,{name:L.name??"groups",title:L.title,id:void 0}])},handlers:d}),C?.name==="groups"&&y&&s.jsx(Fk,{id:Q.id,initialFolderColor:n,useFilter:A,onSelect:typeof o=="function"?L=>{o(L,{...y,msId:L.id,idFolder:"root"})}:void 0,useNavigation:i,onClick:L=>{D(L),b([...w,{name:"group",title:L.title,id:L.id}])},onError:c,handlers:d}),y!==void 0&&(C?.name==="group"||C?.name==="documents"||C?.name==="me")&&s.jsx(Pk,{initialFolderColor:n,useFilter:A,useNavigation:i,driveDocumentParams:y,useDocumentFilters:r,onSelect:typeof o=="function"?L=>{o(L,{...y,idFolder:L.id})}:void 0,onSelectMultiDocument:l?L=>{const S=I.find(M=>M.id===L.id);T(S?I.filter(M=>M.id!==L.id):[...I,L])}:void 0,onSelectDocument:a?L=>{a&&y&&a(L,E,y)}:void 0,onClick:L=>{D(L),b([...w,{name:"documents",title:L.title,id:L.id}])},onError:c,handlers:d,id:Q.id})]})]})},Uk=m.div`
|
|
1094
1094
|
display: flex;
|
|
1095
1095
|
gap: 5px;
|
|
1096
1096
|
align-items: center;
|
|
@@ -1357,7 +1357,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1357
1357
|
content: "" !important;
|
|
1358
1358
|
display: none !important;
|
|
1359
1359
|
}`,V3=function(e){K3(e,"."+Pp+X3+sy+`
|
|
1360
|
-
.`+Mp+G3+sy)},K3=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},ES=(function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e})(),q3=(function(){function e(t,n){this.context=t,this._options=n,this._cache={}}return e.prototype.addImage=function(t){var n=Promise.resolve();return this.has(t)||(xg(t)||_3(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),n},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return gn(this,void 0,void 0,function(){var n,r,A,i,o=this;return on(this,function(a){switch(a.label){case 0:return n=ES.isSameOrigin(t),r=!bg(t)&&this._options.useCORS===!0&&tn.SUPPORT_CORS_IMAGES&&!n,A=!bg(t)&&!n&&!xg(t)&&typeof this._options.proxy=="string"&&tn.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!bg(t)&&!xg(t)&&!A&&!r?[2]:(i=t,A?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,c){var d=new Image;d.onload=function(){return l(d)},d.onerror=c,($3(i)||r)&&(d.crossOrigin="anonymous"),d.src=i,d.complete===!0&&setTimeout(function(){return l(d)},500),o._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var A=t.substring(0,256);return new Promise(function(i,o){var a=tn.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(a==="text")i(l.response);else{var u=new FileReader;u.addEventListener("load",function(){return i(u.result)},!1),u.addEventListener("error",function(f){return o(f)},!1),u.readAsDataURL(l.response)}else o("Failed to proxy resource "+A+" with status code "+l.status)},l.onerror=o;var c=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+c+"url="+encodeURIComponent(t)+"&responseType="+a),a!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=a),n._options.imageTimeout){var d=n._options.imageTimeout;l.timeout=d,l.ontimeout=function(){return o("Timed out ("+d+"ms) proxying "+A)}}l.send()})},e})(),J3=/^data:image\/svg\+xml/i,Y3=/^data:image\/.*;base64,/i,Z3=/^data:image\/.*/i,_3=function(e){return tn.SUPPORT_SVG_DRAWING||!ez(e)},bg=function(e){return Z3.test(e)},$3=function(e){return Y3.test(e)},xg=function(e){return e.substr(0,4)==="blob"},ez=function(e){return e.substr(-3).toLowerCase()==="svg"||J3.test(e)},ue=(function(){function e(t,n){this.type=0,this.x=t,this.y=n}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e})(),to=function(e,t,n){return new ue(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Dl=(function(){function e(t,n,r,A){this.type=1,this.start=t,this.startControl=n,this.endControl=r,this.end=A}return e.prototype.subdivide=function(t,n){var r=to(this.start,this.startControl,t),A=to(this.startControl,this.endControl,t),i=to(this.endControl,this.end,t),o=to(r,A,t),a=to(A,i,t),l=to(o,a,t);return n?new e(this.start,r,o,l):new e(l,a,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e})(),fr=function(e){return e.type===1},tz=(function(){function e(t){var n=t.styles,r=t.bounds,A=Ps(n.borderTopLeftRadius,r.width,r.height),i=A[0],o=A[1],a=Ps(n.borderTopRightRadius,r.width,r.height),l=a[0],c=a[1],d=Ps(n.borderBottomRightRadius,r.width,r.height),u=d[0],f=d[1],g=Ps(n.borderBottomLeftRadius,r.width,r.height),p=g[0],v=g[1],w=[];w.push((i+l)/r.width),w.push((p+u)/r.width),w.push((o+v)/r.height),w.push((c+f)/r.height);var b=Math.max.apply(Math,w);b>1&&(i/=b,o/=b,l/=b,c/=b,u/=b,f/=b,p/=b,v/=b);var C=r.width-l,x=r.height-f,y=r.width-u,B=r.height-v,E=n.borderTopWidth,D=n.borderRightWidth,I=n.borderBottomWidth,T=n.borderLeftWidth,Q=gt(n.paddingTop,t.bounds.width),F=gt(n.paddingRight,t.bounds.width),U=gt(n.paddingBottom,t.bounds.width),z=gt(n.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?wt(r.left+T/3,r.top+E/3,i-T/3,o-E/3,nt.TOP_LEFT):new ue(r.left+T/3,r.top+E/3),this.topRightBorderDoubleOuterBox=i>0||o>0?wt(r.left+C,r.top+E/3,l-D/3,c-E/3,nt.TOP_RIGHT):new ue(r.left+r.width-D/3,r.top+E/3),this.bottomRightBorderDoubleOuterBox=u>0||f>0?wt(r.left+y,r.top+x,u-D/3,f-I/3,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D/3,r.top+r.height-I/3),this.bottomLeftBorderDoubleOuterBox=p>0||v>0?wt(r.left+T/3,r.top+B,p-T/3,v-I/3,nt.BOTTOM_LEFT):new ue(r.left+T/3,r.top+r.height-I/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?wt(r.left+T*2/3,r.top+E*2/3,i-T*2/3,o-E*2/3,nt.TOP_LEFT):new ue(r.left+T*2/3,r.top+E*2/3),this.topRightBorderDoubleInnerBox=i>0||o>0?wt(r.left+C,r.top+E*2/3,l-D*2/3,c-E*2/3,nt.TOP_RIGHT):new ue(r.left+r.width-D*2/3,r.top+E*2/3),this.bottomRightBorderDoubleInnerBox=u>0||f>0?wt(r.left+y,r.top+x,u-D*2/3,f-I*2/3,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D*2/3,r.top+r.height-I*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||v>0?wt(r.left+T*2/3,r.top+B,p-T*2/3,v-I*2/3,nt.BOTTOM_LEFT):new ue(r.left+T*2/3,r.top+r.height-I*2/3),this.topLeftBorderStroke=i>0||o>0?wt(r.left+T/2,r.top+E/2,i-T/2,o-E/2,nt.TOP_LEFT):new ue(r.left+T/2,r.top+E/2),this.topRightBorderStroke=i>0||o>0?wt(r.left+C,r.top+E/2,l-D/2,c-E/2,nt.TOP_RIGHT):new ue(r.left+r.width-D/2,r.top+E/2),this.bottomRightBorderStroke=u>0||f>0?wt(r.left+y,r.top+x,u-D/2,f-I/2,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D/2,r.top+r.height-I/2),this.bottomLeftBorderStroke=p>0||v>0?wt(r.left+T/2,r.top+B,p-T/2,v-I/2,nt.BOTTOM_LEFT):new ue(r.left+T/2,r.top+r.height-I/2),this.topLeftBorderBox=i>0||o>0?wt(r.left,r.top,i,o,nt.TOP_LEFT):new ue(r.left,r.top),this.topRightBorderBox=l>0||c>0?wt(r.left+C,r.top,l,c,nt.TOP_RIGHT):new ue(r.left+r.width,r.top),this.bottomRightBorderBox=u>0||f>0?wt(r.left+y,r.top+x,u,f,nt.BOTTOM_RIGHT):new ue(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||v>0?wt(r.left,r.top+B,p,v,nt.BOTTOM_LEFT):new ue(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||o>0?wt(r.left+T,r.top+E,Math.max(0,i-T),Math.max(0,o-E),nt.TOP_LEFT):new ue(r.left+T,r.top+E),this.topRightPaddingBox=l>0||c>0?wt(r.left+Math.min(C,r.width-D),r.top+E,C>r.width+D?0:Math.max(0,l-D),Math.max(0,c-E),nt.TOP_RIGHT):new ue(r.left+r.width-D,r.top+E),this.bottomRightPaddingBox=u>0||f>0?wt(r.left+Math.min(y,r.width-T),r.top+Math.min(x,r.height-I),Math.max(0,u-D),Math.max(0,f-I),nt.BOTTOM_RIGHT):new ue(r.left+r.width-D,r.top+r.height-I),this.bottomLeftPaddingBox=p>0||v>0?wt(r.left+T,r.top+Math.min(B,r.height-I),Math.max(0,p-T),Math.max(0,v-I),nt.BOTTOM_LEFT):new ue(r.left+T,r.top+r.height-I),this.topLeftContentBox=i>0||o>0?wt(r.left+T+z,r.top+E+Q,Math.max(0,i-(T+z)),Math.max(0,o-(E+Q)),nt.TOP_LEFT):new ue(r.left+T+z,r.top+E+Q),this.topRightContentBox=l>0||c>0?wt(r.left+Math.min(C,r.width+T+z),r.top+E+Q,C>r.width+T+z?0:l-T+z,c-(E+Q),nt.TOP_RIGHT):new ue(r.left+r.width-(D+F),r.top+E+Q),this.bottomRightContentBox=u>0||f>0?wt(r.left+Math.min(y,r.width-(T+z)),r.top+Math.min(x,r.height+E+Q),Math.max(0,u-(D+F)),f-(I+U),nt.BOTTOM_RIGHT):new ue(r.left+r.width-(D+F),r.top+r.height-(I+U)),this.bottomLeftContentBox=p>0||v>0?wt(r.left+T+z,r.top+B,Math.max(0,p-(T+z)),v-(I+U),nt.BOTTOM_LEFT):new ue(r.left+T+z,r.top+r.height-(I+U))}return e})(),nt;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(nt||(nt={}));var wt=function(e,t,n,r,A){var i=4*((Math.sqrt(2)-1)/3),o=n*i,a=r*i,l=e+n,c=t+r;switch(A){case nt.TOP_LEFT:return new Dl(new ue(e,c),new ue(e,c-a),new ue(l-o,t),new ue(l,t));case nt.TOP_RIGHT:return new Dl(new ue(e,t),new ue(e+o,t),new ue(l,c-a),new ue(l,c));case nt.BOTTOM_RIGHT:return new Dl(new ue(l,t),new ue(l,t+a),new ue(e+o,c),new ue(e,c));case nt.BOTTOM_LEFT:default:return new Dl(new ue(l,c),new ue(l-o,c),new ue(e,t+a),new ue(e,t))}},td=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},nz=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},nd=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},rz=(function(){function e(t,n,r){this.offsetX=t,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return e})(),Sl=(function(){function e(t,n){this.path=t,this.target=n,this.type=1}return e})(),Az=(function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e})(),iz=function(e){return e.type===0},DS=function(e){return e.type===1},oz=function(e){return e.type===2},ay=function(e,t){return e.length===t.length?e.some(function(n,r){return n===t[r]}):!1},sz=function(e,t,n,r,A){return e.map(function(i,o){switch(o){case 0:return i.add(t,n);case 1:return i.add(t+r,n);case 2:return i.add(t+r,n+A);case 3:return i.add(t,n+A)}return i})},SS=(function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e})(),IS=(function(){function e(t,n){if(this.container=t,this.parent=n,this.effects=[],this.curves=new tz(this.container),this.container.styles.opacity<1&&this.effects.push(new Az(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,A=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new rz(r,A,i))}if(this.container.styles.overflowX!==0){var o=td(this.curves),a=nd(this.curves);ay(o,a)?this.effects.push(new Sl(o,6)):(this.effects.push(new Sl(o,2)),this.effects.push(new Sl(a,4)))}}return e.prototype.getEffects=function(t){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,A=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!DS(l)});if(n||r.container.styles.position!==0||!r.parent){if(A.unshift.apply(A,i),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var o=td(r.curves),a=nd(r.curves);ay(o,a)||A.unshift(new Sl(a,6))}}else A.unshift.apply(A,i);r=r.parent}return A.filter(function(l){return Xt(l.target,t)})},e})(),Hp=function(e,t,n,r){e.container.elements.forEach(function(A){var i=Xt(A.flags,4),o=Xt(A.flags,2),a=new IS(A,e);Xt(A.styles.display,2048)&&r.push(a);var l=Xt(A.flags,8)?[]:r;if(i||o){var c=i||A.styles.isPositioned()?n:t,d=new SS(a);if(A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()){var u=A.styles.zIndex.order;if(u<0){var f=0;c.negativeZIndex.some(function(p,v){return u>p.element.container.styles.zIndex.order?(f=v,!1):f>0}),c.negativeZIndex.splice(f,0,d)}else if(u>0){var g=0;c.positiveZIndex.some(function(p,v){return u>=p.element.container.styles.zIndex.order?(g=v+1,!1):g>0}),c.positiveZIndex.splice(g,0,d)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else A.styles.isFloating()?c.nonPositionedFloats.push(d):c.nonPositionedInlineLevel.push(d);Hp(a,d,i?d:n,l)}else A.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),Hp(a,t,n,l);Xt(A.flags,8)&&TS(A,l)})},TS=function(e,t){for(var n=e instanceof jp?e.start:1,r=e instanceof jp?e.reversed:!1,A=0;A<t.length;A++){var i=t[A];i.container instanceof uS&&typeof i.container.value=="number"&&i.container.value!==0&&(n=i.container.value),i.listValue=la(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},az=function(e){var t=new IS(e,null),n=new SS(t),r=[];return Hp(t,n,n,r),TS(t.container,r),n},ly=function(e,t){switch(t){case 0:return pr(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return pr(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return pr(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return pr(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},lz=function(e,t){switch(t){case 0:return pr(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return pr(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return pr(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return pr(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},cz=function(e,t){switch(t){case 0:return pr(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return pr(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return pr(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return pr(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},dz=function(e,t){switch(t){case 0:return Il(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Il(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Il(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Il(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Il=function(e,t){var n=[];return fr(e)?n.push(e.subdivide(.5,!1)):n.push(e),fr(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},pr=function(e,t,n,r){var A=[];return fr(e)?A.push(e.subdivide(.5,!1)):A.push(e),fr(n)?A.push(n.subdivide(.5,!0)):A.push(n),fr(r)?A.push(r.subdivide(.5,!0).reverse()):A.push(r),fr(t)?A.push(t.subdivide(.5,!1).reverse()):A.push(t),A},OS=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},rd=function(e){var t=e.styles,n=e.bounds,r=gt(t.paddingLeft,n.width),A=gt(t.paddingRight,n.width),i=gt(t.paddingTop,n.width),o=gt(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,i+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+A),-(t.borderTopWidth+t.borderBottomWidth+i+o))},uz=function(e,t){return e===0?t.bounds:e===2?rd(t):OS(t)},fz=function(e,t){return e===0?t.bounds:e===2?rd(t):OS(t)},yg=function(e,t,n){var r=uz(po(e.styles.backgroundOrigin,t),e),A=fz(po(e.styles.backgroundClip,t),e),i=gz(po(e.styles.backgroundSize,t),n,r),o=i[0],a=i[1],l=Ps(po(e.styles.backgroundPosition,t),r.width-o,r.height-a),c=hz(po(e.styles.backgroundRepeat,t),l,i,r,A),d=Math.round(r.left+l[0]),u=Math.round(r.top+l[1]);return[c,d,u,o,a]},no=function(e){return ot(e)&&e.value===Fo.AUTO},Tl=function(e){return typeof e=="number"},gz=function(e,t,n){var r=t[0],A=t[1],i=t[2],o=e[0],a=e[1];if(!o)return[0,0];if(zt(o)&&a&&zt(a))return[gt(o,n.width),gt(a,n.height)];var l=Tl(i);if(ot(o)&&(o.value===Fo.CONTAIN||o.value===Fo.COVER)){if(Tl(i)){var c=n.width/n.height;return c<i!=(o.value===Fo.COVER)?[n.width,n.width/i]:[n.height*i,n.height]}return[n.width,n.height]}var d=Tl(r),u=Tl(A),f=d||u;if(no(o)&&(!a||no(a))){if(d&&u)return[r,A];if(!l&&!f)return[n.width,n.height];if(f&&l){var g=d?r:A*i,p=u?A:r/i;return[g,p]}var v=d?r:n.width,w=u?A:n.height;return[v,w]}if(l){var b=0,C=0;return zt(o)?b=gt(o,n.width):zt(a)&&(C=gt(a,n.height)),no(o)?b=C*i:(!a||no(a))&&(C=b/i),[b,C]}var x=null,y=null;if(zt(o)?x=gt(o,n.width):a&&zt(a)&&(y=gt(a,n.height)),x!==null&&(!a||no(a))&&(y=d&&u?x/r*A:n.height),y!==null&&no(o)&&(x=d&&u?y/A*r:n.width),x!==null&&y!==null)return[x,y];throw new Error("Unable to calculate background-size for element")},po=function(e,t){var n=e[t];return typeof n>"u"?e[0]:n},hz=function(e,t,n,r,A){var i=t[0],o=t[1],a=n[0],l=n[1];switch(e){case 2:return[new ue(Math.round(r.left),Math.round(r.top+o)),new ue(Math.round(r.left+r.width),Math.round(r.top+o)),new ue(Math.round(r.left+r.width),Math.round(l+r.top+o)),new ue(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new ue(Math.round(r.left+i),Math.round(r.top)),new ue(Math.round(r.left+i+a),Math.round(r.top)),new ue(Math.round(r.left+i+a),Math.round(r.height+r.top)),new ue(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new ue(Math.round(r.left+i),Math.round(r.top+o)),new ue(Math.round(r.left+i+a),Math.round(r.top+o)),new ue(Math.round(r.left+i+a),Math.round(r.top+o+l)),new ue(Math.round(r.left+i),Math.round(r.top+o+l))];default:return[new ue(Math.round(A.left),Math.round(A.top)),new ue(Math.round(A.left+A.width),Math.round(A.top)),new ue(Math.round(A.left+A.width),Math.round(A.height+A.top)),new ue(Math.round(A.left),Math.round(A.height+A.top))]}},pz="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",cy="Hidden Text",mz=(function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,n){var r=this._document.createElement("div"),A=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",o.appendChild(r),A.src=pz,A.width=1,A.height=1,A.style.margin="0",A.style.padding="0",A.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(cy)),r.appendChild(i),r.appendChild(A);var a=A.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(cy)),r.style.lineHeight="normal",A.style.verticalAlign="super";var l=A.offsetTop-r.offsetTop+2;return o.removeChild(r),{baseline:a,middle:l}},e.prototype.getMetrics=function(t,n){var r=t+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,n)),this._data[r]},e})(),QS=(function(){function e(t,n){this.context=t,this.options=n}return e})(),vz=1e4,wz=(function(e){kr(t,e);function t(n,r){var A=e.call(this,n,r)||this;return A._activeEffects=[],A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),r.canvas||(A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px"),A.fontMetrics=new mz(document),A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.ctx.textBaseline="bottom",A._activeEffects=[],A.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),A}return t.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(A){return r.applyEffect(A)})},t.prototype.applyEffect=function(n){this.ctx.save(),oz(n)&&(this.ctx.globalAlpha=n.opacity),iz(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),DS(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(n){return gn(this,void 0,void 0,function(){var r;return on(this,function(A){switch(A.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:A.sent(),A.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(n){return gn(this,void 0,void 0,function(){return on(this,function(r){switch(r.label){case 0:if(Xt(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(n,r,A){var i=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+A);else{var o=lv(n.text);o.reduce(function(a,l){return i.ctx.fillText(l,a,n.bounds.top+A),a+i.ctx.measureText(l).width},n.bounds.left)}},t.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),A=Bz(n.fontFamily).join(", "),i=Ia(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,A].join(" "),A,i]},t.prototype.renderTextNode=function(n,r){return gn(this,void 0,void 0,function(){var A,i,o,a,l,c,d,u,f=this;return on(this,function(g){return A=this.createFontStyle(r),i=A[0],o=A[1],a=A[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(o,a),c=l.baseline,d=l.middle,u=r.paintOrder,n.textBounds.forEach(function(p){u.forEach(function(v){switch(v){case 0:f.ctx.fillStyle=Kt(r.color),f.renderTextWithLetterSpacing(p,r.letterSpacing,c);var w=r.textShadow;w.length&&p.text.trim().length&&(w.slice(0).reverse().forEach(function(b){f.ctx.shadowColor=Kt(b.color),f.ctx.shadowOffsetX=b.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=b.offsetY.number*f.options.scale,f.ctx.shadowBlur=b.blur.number,f.renderTextWithLetterSpacing(p,r.letterSpacing,c)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=Kt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(b){switch(b){case 1:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+c),p.bounds.width,1);break;case 2:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:f.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+d),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(f.ctx.strokeStyle=Kt(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+c)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(n,r,A){if(A&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var i=rd(n),o=nd(r);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,n.intrinsicWidth,n.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l,C,C,c,d,u,f,y,g,p,B,v,w,b,C,x,y,B;return on(this,function(E){switch(E.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,A=n.curves,i=r.styles,o=0,a=r.textNodes,E.label=1;case 1:return o<a.length?(l=a[o],[4,this.renderTextNode(l,i)]):[3,4];case 2:E.sent(),E.label=3;case 3:return o++,[3,1];case 4:if(!(r instanceof lS))return[3,8];E.label=5;case 5:return E.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return C=E.sent(),this.renderReplacedElement(r,A,C),[3,8];case 7:return E.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof cS&&this.renderReplacedElement(r,A,r.canvas),!(r instanceof dS))return[3,12];E.label=9;case 9:return E.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return C=E.sent(),this.renderReplacedElement(r,A,C),[3,12];case 11:return E.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof hS&&r.tree?(c=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,c.render(r.tree)]):[3,14];case 13:d=E.sent(),r.width&&r.height&&this.ctx.drawImage(d,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),E.label=14;case 14:if(r instanceof cv&&(u=Math.min(r.bounds.width,r.bounds.height),r.type===Zc?r.checked&&(this.ctx.save(),this.path([new ue(r.bounds.left+u*.39363,r.bounds.top+u*.79),new ue(r.bounds.left+u*.16,r.bounds.top+u*.5549),new ue(r.bounds.left+u*.27347,r.bounds.top+u*.44071),new ue(r.bounds.left+u*.39694,r.bounds.top+u*.5649),new ue(r.bounds.left+u*.72983,r.bounds.top+u*.23),new ue(r.bounds.left+u*.84,r.bounds.top+u*.34085),new ue(r.bounds.left+u*.39363,r.bounds.top+u*.79)]),this.ctx.fillStyle=Kt(Zx),this.ctx.fill(),this.ctx.restore()):r.type===_c&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+u/2,r.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=Kt(Zx),this.ctx.fill(),this.ctx.restore())),bz(r)&&r.value.length){switch(f=this.createFontStyle(i),y=f[0],g=f[1],p=this.fontMetrics.getMetrics(y,g).baseline,this.ctx.font=y,this.ctx.fillStyle=Kt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=yz(r.styles.textAlign),B=rd(r),v=0,r.styles.textAlign){case 1:v+=B.width/2;break;case 2:v+=B.width;break}w=B.add(v,0,0,-B.height/2+1),this.ctx.save(),this.path([new ue(B.left,B.top),new ue(B.left+B.width,B.top),new ue(B.left+B.width,B.top+B.height),new ue(B.left,B.top+B.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new qs(r.value,w),i.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Xt(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(b=r.styles.listStyleImage,b.type!==0)return[3,18];C=void 0,x=b.url,E.label=15;case 15:return E.trys.push([15,17,,18]),[4,this.context.cache.match(x)];case 16:return C=E.sent(),this.ctx.drawImage(C,r.bounds.left-(C.width+10),r.bounds.top),[3,18];case 17:return E.sent(),this.context.logger.error("Error loading list-style-image "+x),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=Kt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",B=new BA(r.bounds.left,r.bounds.top+gt(r.styles.paddingTop,r.bounds.width),r.bounds.width,Fx(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new qs(n.listValue,B),i.letterSpacing,Fx(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),E.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(n){return gn(this,void 0,void 0,function(){var r,A,b,i,o,b,a,l,b,c,d,b,u,f,b,g,p,b,v,w,b;return on(this,function(C){switch(C.label){case 0:if(Xt(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:C.sent(),r=0,A=n.negativeZIndex,C.label=2;case 2:return r<A.length?(b=A[r],[4,this.renderStack(b)]):[3,5];case 3:C.sent(),C.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:C.sent(),i=0,o=n.nonInlineLevel,C.label=7;case 7:return i<o.length?(b=o[i],[4,this.renderNode(b)]):[3,10];case 8:C.sent(),C.label=9;case 9:return i++,[3,7];case 10:a=0,l=n.nonPositionedFloats,C.label=11;case 11:return a<l.length?(b=l[a],[4,this.renderStack(b)]):[3,14];case 12:C.sent(),C.label=13;case 13:return a++,[3,11];case 14:c=0,d=n.nonPositionedInlineLevel,C.label=15;case 15:return c<d.length?(b=d[c],[4,this.renderStack(b)]):[3,18];case 16:C.sent(),C.label=17;case 17:return c++,[3,15];case 18:u=0,f=n.inlineLevel,C.label=19;case 19:return u<f.length?(b=f[u],[4,this.renderNode(b)]):[3,22];case 20:C.sent(),C.label=21;case 21:return u++,[3,19];case 22:g=0,p=n.zeroOrAutoZIndexOrTransformedOrOpacity,C.label=23;case 23:return g<p.length?(b=p[g],[4,this.renderStack(b)]):[3,26];case 24:C.sent(),C.label=25;case 25:return g++,[3,23];case 26:v=0,w=n.positiveZIndex,C.label=27;case 27:return v<w.length?(b=w[v],[4,this.renderStack(b)]):[3,30];case 28:C.sent(),C.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},t.prototype.formatPath=function(n){var r=this;n.forEach(function(A,i){var o=fr(A)?A.start:A;i===0?r.ctx.moveTo(o.x,o.y):r.ctx.lineTo(o.x,o.y),fr(A)&&r.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},t.prototype.renderRepeat=function(n,r,A,i){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(A,i),this.ctx.fill(),this.ctx.translate(-A,-i)},t.prototype.resizeImage=function(n,r,A){var i;if(n.width===r&&n.height===A)return n;var o=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=o.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,A);var l=a.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,A),a},t.prototype.renderBackgroundImage=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l;return on(this,function(c){switch(c.label){case 0:r=n.styles.backgroundImage.length-1,A=function(d){var u,f,g,Q,Z,J,z,k,I,p,Q,Z,J,z,k,v,w,b,C,x,y,B,E,D,I,T,Q,F,U,z,k,W,Z,J,Y,Ae,L,S,M,V,N,j;return on(this,function(G){switch(G.label){case 0:if(d.type!==0)return[3,5];u=void 0,f=d.url,G.label=1;case 1:return G.trys.push([1,3,,4]),[4,i.context.cache.match(f)];case 2:return u=G.sent(),[3,4];case 3:return G.sent(),i.context.logger.error("Error loading background-image "+f),[3,4];case 4:return u&&(g=yg(n,r,[u.width,u.height,u.width/u.height]),Q=g[0],Z=g[1],J=g[2],z=g[3],k=g[4],I=i.ctx.createPattern(i.resizeImage(u,z,k),"repeat"),i.renderRepeat(Q,I,Z,J)),[3,6];case 5:i2(d)?(p=yg(n,r,[null,null,null]),Q=p[0],Z=p[1],J=p[2],z=p[3],k=p[4],v=e2(d.angle,z,k),w=v[0],b=v[1],C=v[2],x=v[3],y=v[4],B=document.createElement("canvas"),B.width=z,B.height=k,E=B.getContext("2d"),D=E.createLinearGradient(b,x,C,y),Rx(d.stops,w).forEach(function(X){return D.addColorStop(X.stop,Kt(X.color))}),E.fillStyle=D,E.fillRect(0,0,z,k),z>0&&k>0&&(I=i.ctx.createPattern(B,"repeat"),i.renderRepeat(Q,I,Z,J))):o2(d)&&(T=yg(n,r,[null,null,null]),Q=T[0],F=T[1],U=T[2],z=T[3],k=T[4],W=d.position.length===0?[ov]:d.position,Z=gt(W[0],z),J=gt(W[W.length-1],k),Y=t2(d,Z,J,z,k),Ae=Y[0],L=Y[1],Ae>0&&L>0&&(S=i.ctx.createRadialGradient(F+Z,U+J,0,F+Z,U+J,Ae),Rx(d.stops,Ae*2).forEach(function(X){return S.addColorStop(X.stop,Kt(X.color))}),i.path(Q),i.ctx.fillStyle=S,Ae!==L?(M=n.bounds.left+.5*n.bounds.width,V=n.bounds.top+.5*n.bounds.height,N=L/Ae,j=1/N,i.ctx.save(),i.ctx.translate(M,V),i.ctx.transform(1,0,0,N,0,0),i.ctx.translate(-M,-V),i.ctx.fillRect(F,j*(U-V)+V,z,k*j),i.ctx.restore()):i.ctx.fill())),G.label=6;case 6:return r--,[2]}})},i=this,o=0,a=n.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return o<a.length?(l=a[o],[5,A(l)]):[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(n,r,A){return gn(this,void 0,void 0,function(){return on(this,function(i){return this.path(ly(A,r)),this.ctx.fillStyle=Kt(n),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(n,r,A,i){return gn(this,void 0,void 0,function(){var o,a;return on(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,A,i)]:[3,2];case 1:return l.sent(),[2];case 2:return o=lz(i,A),this.path(o),this.ctx.fillStyle=Kt(n),this.ctx.fill(),a=cz(i,A),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l,c,d,u=this;return on(this,function(f){switch(f.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,A=!KA(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],o=xz(po(r.backgroundClip,0),n.curves),A||r.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),KA(r.backgroundColor)||(this.ctx.fillStyle=Kt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(g){u.ctx.save();var p=td(n.curves),v=g.inset?0:vz,w=sz(p,-v+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(u.path(p),u.ctx.clip(),u.mask(w)):(u.mask(p),u.ctx.clip(),u.path(w)),u.ctx.shadowOffsetX=g.offsetX.number+v,u.ctx.shadowOffsetY=g.offsetY.number,u.ctx.shadowColor=Kt(g.color),u.ctx.shadowBlur=g.blur.number,u.ctx.fillStyle=g.inset?Kt(g.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),f.label=2;case 2:a=0,l=0,c=i,f.label=3;case 3:return l<c.length?(d=c[l],d.style!==0&&!KA(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,3)];case 6:return f.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,a,n.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,a,n.curves)];case 10:f.sent(),f.label=11;case 11:a++,f.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(n,r,A,i,o){return gn(this,void 0,void 0,function(){var a,l,c,d,u,f,g,p,v,w,b,C,x,y,B,E,B,E;return on(this,function(D){return this.ctx.save(),a=dz(i,A),l=ly(i,A),o===2&&(this.path(l),this.ctx.clip()),fr(l[0])?(c=l[0].start.x,d=l[0].start.y):(c=l[0].x,d=l[0].y),fr(l[1])?(u=l[1].end.x,f=l[1].end.y):(u=l[1].x,f=l[1].y),A===0||A===2?g=Math.abs(c-u):g=Math.abs(d-f),this.ctx.beginPath(),o===3?this.formatPath(a):this.formatPath(l.slice(0,2)),p=r<3?r*3:r*2,v=r<3?r*2:r,o===3&&(p=r,v=r),w=!0,g<=p*2?w=!1:g<=p*2+v?(b=g/(2*p+v),p*=b,v*=b):(C=Math.floor((g+v)/(p+v)),x=(g-C*p)/(C-1),y=(g-(C+1)*p)/C,v=y<=0||Math.abs(v-x)<Math.abs(v-y)?x:y),w&&(o===3?this.ctx.setLineDash([0,p+v]):this.ctx.setLineDash([p,v])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Kt(n),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(fr(l[0])&&(B=l[3],E=l[0],this.ctx.beginPath(),this.formatPath([new ue(B.end.x,B.end.y),new ue(E.start.x,E.start.y)]),this.ctx.stroke()),fr(l[1])&&(B=l[1],E=l[2],this.ctx.beginPath(),this.formatPath([new ue(B.end.x,B.end.y),new ue(E.start.x,E.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(n){return gn(this,void 0,void 0,function(){var r;return on(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Kt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=az(n),[4,this.renderStack(r)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}})})},t})(QS),bz=function(e){return e instanceof gS||e instanceof fS?!0:e instanceof cv&&e.type!==_c&&e.type!==Zc},xz=function(e,t){switch(e){case 0:return td(t);case 2:return nz(t);default:return nd(t)}},yz=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},Cz=["-apple-system","system-ui"],Bz=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(t){return Cz.indexOf(t)===-1}):e},Ez=(function(e){kr(t,e);function t(n,r){var A=e.call(this,n,r)||this;return A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),A.options=r,A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px",A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),A}return t.prototype.render=function(n){return gn(this,void 0,void 0,function(){var r,A;return on(this,function(i){switch(i.label){case 0:return r=Rp(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,Dz(r)];case 1:return A=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Kt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t})(QS),Dz=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Sz=(function(){function e(t){var n=t.id,r=t.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,sl([this.id,this.getTime()+"ms"],t))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.instances={},e})(),Iz=(function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new Sz({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new q3(this,t)}return e.instanceCount=1,e})(),Tz=function(e,t){return t===void 0&&(t={}),Oz(e,t)};typeof window<"u"&&ES.setContext(window);var Oz=function(e,t){return gn(void 0,void 0,void 0,function(){var n,r,A,i,o,a,l,c,d,u,f,g,p,v,w,b,C,x,y,B,D,E,D,I,T,Q,F,U,z,k,W,Z,J,Y,Ae,L,S,M,V,N;return on(this,function(j){switch(j.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return A={allowTaint:(I=t.allowTaint)!==null&&I!==void 0?I:!1,imageTimeout:(T=t.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:t.proxy,useCORS:(Q=t.useCORS)!==null&&Q!==void 0?Q:!1},i=mp({logging:(F=t.logging)!==null&&F!==void 0?F:!0,cache:t.cache},A),o={windowWidth:(U=t.windowWidth)!==null&&U!==void 0?U:r.innerWidth,windowHeight:(z=t.windowHeight)!==null&&z!==void 0?z:r.innerHeight,scrollX:(k=t.scrollX)!==null&&k!==void 0?k:r.pageXOffset,scrollY:(W=t.scrollY)!==null&&W!==void 0?W:r.pageYOffset},a=new BA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new Iz(i,a),c=(Z=t.foreignObjectRendering)!==null&&Z!==void 0?Z:!1,d={allowTaint:(J=t.allowTaint)!==null&&J!==void 0?J:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:c,copyStyles:c},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),u=new oy(l,e,d),f=u.clonedReferenceElement,f?[4,u.toIFrame(n,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=j.sent(),p=dv(f)||Q3(f)?sN(f.ownerDocument):$d(l,f),v=p.width,w=p.height,b=p.left,C=p.top,x=Qz(l,f,t.backgroundColor),y={canvas:t.canvas,backgroundColor:x,scale:(Ae=(Y=t.scale)!==null&&Y!==void 0?Y:r.devicePixelRatio)!==null&&Ae!==void 0?Ae:1,x:((L=t.x)!==null&&L!==void 0?L:0)+b,y:((S=t.y)!==null&&S!==void 0?S:0)+C,width:(M=t.width)!==null&&M!==void 0?M:Math.ceil(v),height:(V=t.height)!==null&&V!==void 0?V:Math.ceil(w)},c?(l.logger.debug("Document cloned, using foreign object rendering"),D=new Ez(l,y),[4,D.render(f)]):[3,3];case 2:return B=j.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+b+","+C+" with size "+v+"x"+w+" using computed rendering"),l.logger.debug("Starting DOM parsing"),E=mS(l,f),x===E.styles.backgroundColor&&(E.styles.backgroundColor=wA.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),D=new wz(l,y),[4,D.render(E)];case 4:B=j.sent(),j.label=5;case 5:return(!((N=t.removeContainer)!==null&&N!==void 0)||N)&&(oy.destroy(g)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,B]}})})},Qz=function(e,t,n){var r=t.ownerDocument,A=r.documentElement?Vs(e,getComputedStyle(r.documentElement).backgroundColor):wA.TRANSPARENT,i=r.body?Vs(e,getComputedStyle(r.body).backgroundColor):wA.TRANSPARENT,o=typeof n=="string"?Vs(e,n):n===null?wA.TRANSPARENT:4294967295;return t===r.documentElement?KA(A)?KA(i)?o:i:A:o};function kp(e,t){const[n,r]=h.useState(()=>{try{const A=window.localStorage.getItem(e);return A?JSON.parse(A):(window.localStorage.setItem(e,JSON.stringify(t)),t)}catch{return t}});return h.useEffect(()=>{try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,r]}const Rz=m.button`
|
|
1360
|
+
.`+Mp+G3+sy)},K3=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},ES=(function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e})(),q3=(function(){function e(t,n){this.context=t,this._options=n,this._cache={}}return e.prototype.addImage=function(t){var n=Promise.resolve();return this.has(t)||(xg(t)||_3(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),n},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return gn(this,void 0,void 0,function(){var n,r,A,i,o=this;return on(this,function(a){switch(a.label){case 0:return n=ES.isSameOrigin(t),r=!bg(t)&&this._options.useCORS===!0&&tn.SUPPORT_CORS_IMAGES&&!n,A=!bg(t)&&!n&&!xg(t)&&typeof this._options.proxy=="string"&&tn.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!bg(t)&&!xg(t)&&!A&&!r?[2]:(i=t,A?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,c){var d=new Image;d.onload=function(){return l(d)},d.onerror=c,($3(i)||r)&&(d.crossOrigin="anonymous"),d.src=i,d.complete===!0&&setTimeout(function(){return l(d)},500),o._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var A=t.substring(0,256);return new Promise(function(i,o){var a=tn.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(a==="text")i(l.response);else{var u=new FileReader;u.addEventListener("load",function(){return i(u.result)},!1),u.addEventListener("error",function(f){return o(f)},!1),u.readAsDataURL(l.response)}else o("Failed to proxy resource "+A+" with status code "+l.status)},l.onerror=o;var c=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+c+"url="+encodeURIComponent(t)+"&responseType="+a),a!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=a),n._options.imageTimeout){var d=n._options.imageTimeout;l.timeout=d,l.ontimeout=function(){return o("Timed out ("+d+"ms) proxying "+A)}}l.send()})},e})(),J3=/^data:image\/svg\+xml/i,Y3=/^data:image\/.*;base64,/i,Z3=/^data:image\/.*/i,_3=function(e){return tn.SUPPORT_SVG_DRAWING||!ez(e)},bg=function(e){return Z3.test(e)},$3=function(e){return Y3.test(e)},xg=function(e){return e.substr(0,4)==="blob"},ez=function(e){return e.substr(-3).toLowerCase()==="svg"||J3.test(e)},ue=(function(){function e(t,n){this.type=0,this.x=t,this.y=n}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e})(),to=function(e,t,n){return new ue(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Dl=(function(){function e(t,n,r,A){this.type=1,this.start=t,this.startControl=n,this.endControl=r,this.end=A}return e.prototype.subdivide=function(t,n){var r=to(this.start,this.startControl,t),A=to(this.startControl,this.endControl,t),i=to(this.endControl,this.end,t),o=to(r,A,t),a=to(A,i,t),l=to(o,a,t);return n?new e(this.start,r,o,l):new e(l,a,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e})(),fr=function(e){return e.type===1},tz=(function(){function e(t){var n=t.styles,r=t.bounds,A=Ps(n.borderTopLeftRadius,r.width,r.height),i=A[0],o=A[1],a=Ps(n.borderTopRightRadius,r.width,r.height),l=a[0],c=a[1],d=Ps(n.borderBottomRightRadius,r.width,r.height),u=d[0],f=d[1],g=Ps(n.borderBottomLeftRadius,r.width,r.height),p=g[0],v=g[1],w=[];w.push((i+l)/r.width),w.push((p+u)/r.width),w.push((o+v)/r.height),w.push((c+f)/r.height);var b=Math.max.apply(Math,w);b>1&&(i/=b,o/=b,l/=b,c/=b,u/=b,f/=b,p/=b,v/=b);var C=r.width-l,x=r.height-f,y=r.width-u,B=r.height-v,E=n.borderTopWidth,D=n.borderRightWidth,I=n.borderBottomWidth,T=n.borderLeftWidth,Q=gt(n.paddingTop,t.bounds.width),F=gt(n.paddingRight,t.bounds.width),U=gt(n.paddingBottom,t.bounds.width),z=gt(n.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?wt(r.left+T/3,r.top+E/3,i-T/3,o-E/3,nt.TOP_LEFT):new ue(r.left+T/3,r.top+E/3),this.topRightBorderDoubleOuterBox=i>0||o>0?wt(r.left+C,r.top+E/3,l-D/3,c-E/3,nt.TOP_RIGHT):new ue(r.left+r.width-D/3,r.top+E/3),this.bottomRightBorderDoubleOuterBox=u>0||f>0?wt(r.left+y,r.top+x,u-D/3,f-I/3,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D/3,r.top+r.height-I/3),this.bottomLeftBorderDoubleOuterBox=p>0||v>0?wt(r.left+T/3,r.top+B,p-T/3,v-I/3,nt.BOTTOM_LEFT):new ue(r.left+T/3,r.top+r.height-I/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?wt(r.left+T*2/3,r.top+E*2/3,i-T*2/3,o-E*2/3,nt.TOP_LEFT):new ue(r.left+T*2/3,r.top+E*2/3),this.topRightBorderDoubleInnerBox=i>0||o>0?wt(r.left+C,r.top+E*2/3,l-D*2/3,c-E*2/3,nt.TOP_RIGHT):new ue(r.left+r.width-D*2/3,r.top+E*2/3),this.bottomRightBorderDoubleInnerBox=u>0||f>0?wt(r.left+y,r.top+x,u-D*2/3,f-I*2/3,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D*2/3,r.top+r.height-I*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||v>0?wt(r.left+T*2/3,r.top+B,p-T*2/3,v-I*2/3,nt.BOTTOM_LEFT):new ue(r.left+T*2/3,r.top+r.height-I*2/3),this.topLeftBorderStroke=i>0||o>0?wt(r.left+T/2,r.top+E/2,i-T/2,o-E/2,nt.TOP_LEFT):new ue(r.left+T/2,r.top+E/2),this.topRightBorderStroke=i>0||o>0?wt(r.left+C,r.top+E/2,l-D/2,c-E/2,nt.TOP_RIGHT):new ue(r.left+r.width-D/2,r.top+E/2),this.bottomRightBorderStroke=u>0||f>0?wt(r.left+y,r.top+x,u-D/2,f-I/2,nt.BOTTOM_RIGHT):new ue(r.left+r.width-D/2,r.top+r.height-I/2),this.bottomLeftBorderStroke=p>0||v>0?wt(r.left+T/2,r.top+B,p-T/2,v-I/2,nt.BOTTOM_LEFT):new ue(r.left+T/2,r.top+r.height-I/2),this.topLeftBorderBox=i>0||o>0?wt(r.left,r.top,i,o,nt.TOP_LEFT):new ue(r.left,r.top),this.topRightBorderBox=l>0||c>0?wt(r.left+C,r.top,l,c,nt.TOP_RIGHT):new ue(r.left+r.width,r.top),this.bottomRightBorderBox=u>0||f>0?wt(r.left+y,r.top+x,u,f,nt.BOTTOM_RIGHT):new ue(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||v>0?wt(r.left,r.top+B,p,v,nt.BOTTOM_LEFT):new ue(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||o>0?wt(r.left+T,r.top+E,Math.max(0,i-T),Math.max(0,o-E),nt.TOP_LEFT):new ue(r.left+T,r.top+E),this.topRightPaddingBox=l>0||c>0?wt(r.left+Math.min(C,r.width-D),r.top+E,C>r.width+D?0:Math.max(0,l-D),Math.max(0,c-E),nt.TOP_RIGHT):new ue(r.left+r.width-D,r.top+E),this.bottomRightPaddingBox=u>0||f>0?wt(r.left+Math.min(y,r.width-T),r.top+Math.min(x,r.height-I),Math.max(0,u-D),Math.max(0,f-I),nt.BOTTOM_RIGHT):new ue(r.left+r.width-D,r.top+r.height-I),this.bottomLeftPaddingBox=p>0||v>0?wt(r.left+T,r.top+Math.min(B,r.height-I),Math.max(0,p-T),Math.max(0,v-I),nt.BOTTOM_LEFT):new ue(r.left+T,r.top+r.height-I),this.topLeftContentBox=i>0||o>0?wt(r.left+T+z,r.top+E+Q,Math.max(0,i-(T+z)),Math.max(0,o-(E+Q)),nt.TOP_LEFT):new ue(r.left+T+z,r.top+E+Q),this.topRightContentBox=l>0||c>0?wt(r.left+Math.min(C,r.width+T+z),r.top+E+Q,C>r.width+T+z?0:l-T+z,c-(E+Q),nt.TOP_RIGHT):new ue(r.left+r.width-(D+F),r.top+E+Q),this.bottomRightContentBox=u>0||f>0?wt(r.left+Math.min(y,r.width-(T+z)),r.top+Math.min(x,r.height+E+Q),Math.max(0,u-(D+F)),f-(I+U),nt.BOTTOM_RIGHT):new ue(r.left+r.width-(D+F),r.top+r.height-(I+U)),this.bottomLeftContentBox=p>0||v>0?wt(r.left+T+z,r.top+B,Math.max(0,p-(T+z)),v-(I+U),nt.BOTTOM_LEFT):new ue(r.left+T+z,r.top+r.height-(I+U))}return e})(),nt;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(nt||(nt={}));var wt=function(e,t,n,r,A){var i=4*((Math.sqrt(2)-1)/3),o=n*i,a=r*i,l=e+n,c=t+r;switch(A){case nt.TOP_LEFT:return new Dl(new ue(e,c),new ue(e,c-a),new ue(l-o,t),new ue(l,t));case nt.TOP_RIGHT:return new Dl(new ue(e,t),new ue(e+o,t),new ue(l,c-a),new ue(l,c));case nt.BOTTOM_RIGHT:return new Dl(new ue(l,t),new ue(l,t+a),new ue(e+o,c),new ue(e,c));case nt.BOTTOM_LEFT:default:return new Dl(new ue(l,c),new ue(l-o,c),new ue(e,t+a),new ue(e,t))}},td=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},nz=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},nd=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},rz=(function(){function e(t,n,r){this.offsetX=t,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return e})(),Sl=(function(){function e(t,n){this.path=t,this.target=n,this.type=1}return e})(),Az=(function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e})(),iz=function(e){return e.type===0},DS=function(e){return e.type===1},oz=function(e){return e.type===2},ay=function(e,t){return e.length===t.length?e.some(function(n,r){return n===t[r]}):!1},sz=function(e,t,n,r,A){return e.map(function(i,o){switch(o){case 0:return i.add(t,n);case 1:return i.add(t+r,n);case 2:return i.add(t+r,n+A);case 3:return i.add(t,n+A)}return i})},SS=(function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e})(),IS=(function(){function e(t,n){if(this.container=t,this.parent=n,this.effects=[],this.curves=new tz(this.container),this.container.styles.opacity<1&&this.effects.push(new Az(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,A=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new rz(r,A,i))}if(this.container.styles.overflowX!==0){var o=td(this.curves),a=nd(this.curves);ay(o,a)?this.effects.push(new Sl(o,6)):(this.effects.push(new Sl(o,2)),this.effects.push(new Sl(a,4)))}}return e.prototype.getEffects=function(t){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,A=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!DS(l)});if(n||r.container.styles.position!==0||!r.parent){if(A.unshift.apply(A,i),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var o=td(r.curves),a=nd(r.curves);ay(o,a)||A.unshift(new Sl(a,6))}}else A.unshift.apply(A,i);r=r.parent}return A.filter(function(l){return Xt(l.target,t)})},e})(),Hp=function(e,t,n,r){e.container.elements.forEach(function(A){var i=Xt(A.flags,4),o=Xt(A.flags,2),a=new IS(A,e);Xt(A.styles.display,2048)&&r.push(a);var l=Xt(A.flags,8)?[]:r;if(i||o){var c=i||A.styles.isPositioned()?n:t,d=new SS(a);if(A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()){var u=A.styles.zIndex.order;if(u<0){var f=0;c.negativeZIndex.some(function(p,v){return u>p.element.container.styles.zIndex.order?(f=v,!1):f>0}),c.negativeZIndex.splice(f,0,d)}else if(u>0){var g=0;c.positiveZIndex.some(function(p,v){return u>=p.element.container.styles.zIndex.order?(g=v+1,!1):g>0}),c.positiveZIndex.splice(g,0,d)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else A.styles.isFloating()?c.nonPositionedFloats.push(d):c.nonPositionedInlineLevel.push(d);Hp(a,d,i?d:n,l)}else A.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),Hp(a,t,n,l);Xt(A.flags,8)&&TS(A,l)})},TS=function(e,t){for(var n=e instanceof jp?e.start:1,r=e instanceof jp?e.reversed:!1,A=0;A<t.length;A++){var i=t[A];i.container instanceof uS&&typeof i.container.value=="number"&&i.container.value!==0&&(n=i.container.value),i.listValue=la(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},az=function(e){var t=new IS(e,null),n=new SS(t),r=[];return Hp(t,n,n,r),TS(t.container,r),n},ly=function(e,t){switch(t){case 0:return pr(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return pr(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return pr(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return pr(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},lz=function(e,t){switch(t){case 0:return pr(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return pr(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return pr(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return pr(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},cz=function(e,t){switch(t){case 0:return pr(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return pr(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return pr(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return pr(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},dz=function(e,t){switch(t){case 0:return Il(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Il(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Il(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Il(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Il=function(e,t){var n=[];return fr(e)?n.push(e.subdivide(.5,!1)):n.push(e),fr(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},pr=function(e,t,n,r){var A=[];return fr(e)?A.push(e.subdivide(.5,!1)):A.push(e),fr(n)?A.push(n.subdivide(.5,!0)):A.push(n),fr(r)?A.push(r.subdivide(.5,!0).reverse()):A.push(r),fr(t)?A.push(t.subdivide(.5,!1).reverse()):A.push(t),A},OS=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},rd=function(e){var t=e.styles,n=e.bounds,r=gt(t.paddingLeft,n.width),A=gt(t.paddingRight,n.width),i=gt(t.paddingTop,n.width),o=gt(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,i+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+A),-(t.borderTopWidth+t.borderBottomWidth+i+o))},uz=function(e,t){return e===0?t.bounds:e===2?rd(t):OS(t)},fz=function(e,t){return e===0?t.bounds:e===2?rd(t):OS(t)},yg=function(e,t,n){var r=uz(po(e.styles.backgroundOrigin,t),e),A=fz(po(e.styles.backgroundClip,t),e),i=gz(po(e.styles.backgroundSize,t),n,r),o=i[0],a=i[1],l=Ps(po(e.styles.backgroundPosition,t),r.width-o,r.height-a),c=hz(po(e.styles.backgroundRepeat,t),l,i,r,A),d=Math.round(r.left+l[0]),u=Math.round(r.top+l[1]);return[c,d,u,o,a]},no=function(e){return ot(e)&&e.value===Fo.AUTO},Tl=function(e){return typeof e=="number"},gz=function(e,t,n){var r=t[0],A=t[1],i=t[2],o=e[0],a=e[1];if(!o)return[0,0];if(zt(o)&&a&&zt(a))return[gt(o,n.width),gt(a,n.height)];var l=Tl(i);if(ot(o)&&(o.value===Fo.CONTAIN||o.value===Fo.COVER)){if(Tl(i)){var c=n.width/n.height;return c<i!=(o.value===Fo.COVER)?[n.width,n.width/i]:[n.height*i,n.height]}return[n.width,n.height]}var d=Tl(r),u=Tl(A),f=d||u;if(no(o)&&(!a||no(a))){if(d&&u)return[r,A];if(!l&&!f)return[n.width,n.height];if(f&&l){var g=d?r:A*i,p=u?A:r/i;return[g,p]}var v=d?r:n.width,w=u?A:n.height;return[v,w]}if(l){var b=0,C=0;return zt(o)?b=gt(o,n.width):zt(a)&&(C=gt(a,n.height)),no(o)?b=C*i:(!a||no(a))&&(C=b/i),[b,C]}var x=null,y=null;if(zt(o)?x=gt(o,n.width):a&&zt(a)&&(y=gt(a,n.height)),x!==null&&(!a||no(a))&&(y=d&&u?x/r*A:n.height),y!==null&&no(o)&&(x=d&&u?y/A*r:n.width),x!==null&&y!==null)return[x,y];throw new Error("Unable to calculate background-size for element")},po=function(e,t){var n=e[t];return typeof n>"u"?e[0]:n},hz=function(e,t,n,r,A){var i=t[0],o=t[1],a=n[0],l=n[1];switch(e){case 2:return[new ue(Math.round(r.left),Math.round(r.top+o)),new ue(Math.round(r.left+r.width),Math.round(r.top+o)),new ue(Math.round(r.left+r.width),Math.round(l+r.top+o)),new ue(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new ue(Math.round(r.left+i),Math.round(r.top)),new ue(Math.round(r.left+i+a),Math.round(r.top)),new ue(Math.round(r.left+i+a),Math.round(r.height+r.top)),new ue(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new ue(Math.round(r.left+i),Math.round(r.top+o)),new ue(Math.round(r.left+i+a),Math.round(r.top+o)),new ue(Math.round(r.left+i+a),Math.round(r.top+o+l)),new ue(Math.round(r.left+i),Math.round(r.top+o+l))];default:return[new ue(Math.round(A.left),Math.round(A.top)),new ue(Math.round(A.left+A.width),Math.round(A.top)),new ue(Math.round(A.left+A.width),Math.round(A.height+A.top)),new ue(Math.round(A.left),Math.round(A.height+A.top))]}},pz="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",cy="Hidden Text",mz=(function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,n){var r=this._document.createElement("div"),A=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",o.appendChild(r),A.src=pz,A.width=1,A.height=1,A.style.margin="0",A.style.padding="0",A.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(cy)),r.appendChild(i),r.appendChild(A);var a=A.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(cy)),r.style.lineHeight="normal",A.style.verticalAlign="super";var l=A.offsetTop-r.offsetTop+2;return o.removeChild(r),{baseline:a,middle:l}},e.prototype.getMetrics=function(t,n){var r=t+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,n)),this._data[r]},e})(),QS=(function(){function e(t,n){this.context=t,this.options=n}return e})(),vz=1e4,wz=(function(e){kr(t,e);function t(n,r){var A=e.call(this,n,r)||this;return A._activeEffects=[],A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),r.canvas||(A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px"),A.fontMetrics=new mz(document),A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.ctx.textBaseline="bottom",A._activeEffects=[],A.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),A}return t.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(A){return r.applyEffect(A)})},t.prototype.applyEffect=function(n){this.ctx.save(),oz(n)&&(this.ctx.globalAlpha=n.opacity),iz(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),DS(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(n){return gn(this,void 0,void 0,function(){var r;return on(this,function(A){switch(A.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:A.sent(),A.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(n){return gn(this,void 0,void 0,function(){return on(this,function(r){switch(r.label){case 0:if(Xt(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(n,r,A){var i=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+A);else{var o=lv(n.text);o.reduce(function(a,l){return i.ctx.fillText(l,a,n.bounds.top+A),a+i.ctx.measureText(l).width},n.bounds.left)}},t.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),A=Bz(n.fontFamily).join(", "),i=Ia(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,A].join(" "),A,i]},t.prototype.renderTextNode=function(n,r){return gn(this,void 0,void 0,function(){var A,i,o,a,l,c,d,u,f=this;return on(this,function(g){return A=this.createFontStyle(r),i=A[0],o=A[1],a=A[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(o,a),c=l.baseline,d=l.middle,u=r.paintOrder,n.textBounds.forEach(function(p){u.forEach(function(v){switch(v){case 0:f.ctx.fillStyle=Kt(r.color),f.renderTextWithLetterSpacing(p,r.letterSpacing,c);var w=r.textShadow;w.length&&p.text.trim().length&&(w.slice(0).reverse().forEach(function(b){f.ctx.shadowColor=Kt(b.color),f.ctx.shadowOffsetX=b.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=b.offsetY.number*f.options.scale,f.ctx.shadowBlur=b.blur.number,f.renderTextWithLetterSpacing(p,r.letterSpacing,c)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=Kt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(b){switch(b){case 1:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+c),p.bounds.width,1);break;case 2:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:f.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+d),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(f.ctx.strokeStyle=Kt(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+c)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(n,r,A){if(A&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var i=rd(n),o=nd(r);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,n.intrinsicWidth,n.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l,C,C,c,d,u,f,y,g,p,B,v,w,b,C,x,y,B;return on(this,function(E){switch(E.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,A=n.curves,i=r.styles,o=0,a=r.textNodes,E.label=1;case 1:return o<a.length?(l=a[o],[4,this.renderTextNode(l,i)]):[3,4];case 2:E.sent(),E.label=3;case 3:return o++,[3,1];case 4:if(!(r instanceof lS))return[3,8];E.label=5;case 5:return E.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return C=E.sent(),this.renderReplacedElement(r,A,C),[3,8];case 7:return E.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof cS&&this.renderReplacedElement(r,A,r.canvas),!(r instanceof dS))return[3,12];E.label=9;case 9:return E.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return C=E.sent(),this.renderReplacedElement(r,A,C),[3,12];case 11:return E.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof hS&&r.tree?(c=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,c.render(r.tree)]):[3,14];case 13:d=E.sent(),r.width&&r.height&&this.ctx.drawImage(d,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),E.label=14;case 14:if(r instanceof cv&&(u=Math.min(r.bounds.width,r.bounds.height),r.type===Zc?r.checked&&(this.ctx.save(),this.path([new ue(r.bounds.left+u*.39363,r.bounds.top+u*.79),new ue(r.bounds.left+u*.16,r.bounds.top+u*.5549),new ue(r.bounds.left+u*.27347,r.bounds.top+u*.44071),new ue(r.bounds.left+u*.39694,r.bounds.top+u*.5649),new ue(r.bounds.left+u*.72983,r.bounds.top+u*.23),new ue(r.bounds.left+u*.84,r.bounds.top+u*.34085),new ue(r.bounds.left+u*.39363,r.bounds.top+u*.79)]),this.ctx.fillStyle=Kt(Zx),this.ctx.fill(),this.ctx.restore()):r.type===_c&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+u/2,r.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=Kt(Zx),this.ctx.fill(),this.ctx.restore())),bz(r)&&r.value.length){switch(f=this.createFontStyle(i),y=f[0],g=f[1],p=this.fontMetrics.getMetrics(y,g).baseline,this.ctx.font=y,this.ctx.fillStyle=Kt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=yz(r.styles.textAlign),B=rd(r),v=0,r.styles.textAlign){case 1:v+=B.width/2;break;case 2:v+=B.width;break}w=B.add(v,0,0,-B.height/2+1),this.ctx.save(),this.path([new ue(B.left,B.top),new ue(B.left+B.width,B.top),new ue(B.left+B.width,B.top+B.height),new ue(B.left,B.top+B.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new qs(r.value,w),i.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Xt(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(b=r.styles.listStyleImage,b.type!==0)return[3,18];C=void 0,x=b.url,E.label=15;case 15:return E.trys.push([15,17,,18]),[4,this.context.cache.match(x)];case 16:return C=E.sent(),this.ctx.drawImage(C,r.bounds.left-(C.width+10),r.bounds.top),[3,18];case 17:return E.sent(),this.context.logger.error("Error loading list-style-image "+x),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=Kt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",B=new BA(r.bounds.left,r.bounds.top+gt(r.styles.paddingTop,r.bounds.width),r.bounds.width,Fx(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new qs(n.listValue,B),i.letterSpacing,Fx(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),E.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(n){return gn(this,void 0,void 0,function(){var r,A,b,i,o,b,a,l,b,c,d,b,u,f,b,g,p,b,v,w,b;return on(this,function(C){switch(C.label){case 0:if(Xt(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:C.sent(),r=0,A=n.negativeZIndex,C.label=2;case 2:return r<A.length?(b=A[r],[4,this.renderStack(b)]):[3,5];case 3:C.sent(),C.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:C.sent(),i=0,o=n.nonInlineLevel,C.label=7;case 7:return i<o.length?(b=o[i],[4,this.renderNode(b)]):[3,10];case 8:C.sent(),C.label=9;case 9:return i++,[3,7];case 10:a=0,l=n.nonPositionedFloats,C.label=11;case 11:return a<l.length?(b=l[a],[4,this.renderStack(b)]):[3,14];case 12:C.sent(),C.label=13;case 13:return a++,[3,11];case 14:c=0,d=n.nonPositionedInlineLevel,C.label=15;case 15:return c<d.length?(b=d[c],[4,this.renderStack(b)]):[3,18];case 16:C.sent(),C.label=17;case 17:return c++,[3,15];case 18:u=0,f=n.inlineLevel,C.label=19;case 19:return u<f.length?(b=f[u],[4,this.renderNode(b)]):[3,22];case 20:C.sent(),C.label=21;case 21:return u++,[3,19];case 22:g=0,p=n.zeroOrAutoZIndexOrTransformedOrOpacity,C.label=23;case 23:return g<p.length?(b=p[g],[4,this.renderStack(b)]):[3,26];case 24:C.sent(),C.label=25;case 25:return g++,[3,23];case 26:v=0,w=n.positiveZIndex,C.label=27;case 27:return v<w.length?(b=w[v],[4,this.renderStack(b)]):[3,30];case 28:C.sent(),C.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},t.prototype.formatPath=function(n){var r=this;n.forEach(function(A,i){var o=fr(A)?A.start:A;i===0?r.ctx.moveTo(o.x,o.y):r.ctx.lineTo(o.x,o.y),fr(A)&&r.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},t.prototype.renderRepeat=function(n,r,A,i){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(A,i),this.ctx.fill(),this.ctx.translate(-A,-i)},t.prototype.resizeImage=function(n,r,A){var i;if(n.width===r&&n.height===A)return n;var o=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=o.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,A);var l=a.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,A),a},t.prototype.renderBackgroundImage=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l;return on(this,function(c){switch(c.label){case 0:r=n.styles.backgroundImage.length-1,A=function(d){var u,f,g,Q,Z,Y,z,k,I,p,Q,Z,Y,z,k,v,w,b,C,x,y,B,E,D,I,T,Q,F,U,z,k,W,Z,Y,J,Ae,L,S,M,V,N,j;return on(this,function(G){switch(G.label){case 0:if(d.type!==0)return[3,5];u=void 0,f=d.url,G.label=1;case 1:return G.trys.push([1,3,,4]),[4,i.context.cache.match(f)];case 2:return u=G.sent(),[3,4];case 3:return G.sent(),i.context.logger.error("Error loading background-image "+f),[3,4];case 4:return u&&(g=yg(n,r,[u.width,u.height,u.width/u.height]),Q=g[0],Z=g[1],Y=g[2],z=g[3],k=g[4],I=i.ctx.createPattern(i.resizeImage(u,z,k),"repeat"),i.renderRepeat(Q,I,Z,Y)),[3,6];case 5:i2(d)?(p=yg(n,r,[null,null,null]),Q=p[0],Z=p[1],Y=p[2],z=p[3],k=p[4],v=e2(d.angle,z,k),w=v[0],b=v[1],C=v[2],x=v[3],y=v[4],B=document.createElement("canvas"),B.width=z,B.height=k,E=B.getContext("2d"),D=E.createLinearGradient(b,x,C,y),Rx(d.stops,w).forEach(function(X){return D.addColorStop(X.stop,Kt(X.color))}),E.fillStyle=D,E.fillRect(0,0,z,k),z>0&&k>0&&(I=i.ctx.createPattern(B,"repeat"),i.renderRepeat(Q,I,Z,Y))):o2(d)&&(T=yg(n,r,[null,null,null]),Q=T[0],F=T[1],U=T[2],z=T[3],k=T[4],W=d.position.length===0?[ov]:d.position,Z=gt(W[0],z),Y=gt(W[W.length-1],k),J=t2(d,Z,Y,z,k),Ae=J[0],L=J[1],Ae>0&&L>0&&(S=i.ctx.createRadialGradient(F+Z,U+Y,0,F+Z,U+Y,Ae),Rx(d.stops,Ae*2).forEach(function(X){return S.addColorStop(X.stop,Kt(X.color))}),i.path(Q),i.ctx.fillStyle=S,Ae!==L?(M=n.bounds.left+.5*n.bounds.width,V=n.bounds.top+.5*n.bounds.height,N=L/Ae,j=1/N,i.ctx.save(),i.ctx.translate(M,V),i.ctx.transform(1,0,0,N,0,0),i.ctx.translate(-M,-V),i.ctx.fillRect(F,j*(U-V)+V,z,k*j),i.ctx.restore()):i.ctx.fill())),G.label=6;case 6:return r--,[2]}})},i=this,o=0,a=n.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return o<a.length?(l=a[o],[5,A(l)]):[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(n,r,A){return gn(this,void 0,void 0,function(){return on(this,function(i){return this.path(ly(A,r)),this.ctx.fillStyle=Kt(n),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(n,r,A,i){return gn(this,void 0,void 0,function(){var o,a;return on(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,A,i)]:[3,2];case 1:return l.sent(),[2];case 2:return o=lz(i,A),this.path(o),this.ctx.fillStyle=Kt(n),this.ctx.fill(),a=cz(i,A),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(n){return gn(this,void 0,void 0,function(){var r,A,i,o,a,l,c,d,u=this;return on(this,function(f){switch(f.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,A=!KA(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],o=xz(po(r.backgroundClip,0),n.curves),A||r.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),KA(r.backgroundColor)||(this.ctx.fillStyle=Kt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(g){u.ctx.save();var p=td(n.curves),v=g.inset?0:vz,w=sz(p,-v+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(u.path(p),u.ctx.clip(),u.mask(w)):(u.mask(p),u.ctx.clip(),u.path(w)),u.ctx.shadowOffsetX=g.offsetX.number+v,u.ctx.shadowOffsetY=g.offsetY.number,u.ctx.shadowColor=Kt(g.color),u.ctx.shadowBlur=g.blur.number,u.ctx.fillStyle=g.inset?Kt(g.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),f.label=2;case 2:a=0,l=0,c=i,f.label=3;case 3:return l<c.length?(d=c[l],d.style!==0&&!KA(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,3)];case 6:return f.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,a,n.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,a,n.curves)];case 10:f.sent(),f.label=11;case 11:a++,f.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(n,r,A,i,o){return gn(this,void 0,void 0,function(){var a,l,c,d,u,f,g,p,v,w,b,C,x,y,B,E,B,E;return on(this,function(D){return this.ctx.save(),a=dz(i,A),l=ly(i,A),o===2&&(this.path(l),this.ctx.clip()),fr(l[0])?(c=l[0].start.x,d=l[0].start.y):(c=l[0].x,d=l[0].y),fr(l[1])?(u=l[1].end.x,f=l[1].end.y):(u=l[1].x,f=l[1].y),A===0||A===2?g=Math.abs(c-u):g=Math.abs(d-f),this.ctx.beginPath(),o===3?this.formatPath(a):this.formatPath(l.slice(0,2)),p=r<3?r*3:r*2,v=r<3?r*2:r,o===3&&(p=r,v=r),w=!0,g<=p*2?w=!1:g<=p*2+v?(b=g/(2*p+v),p*=b,v*=b):(C=Math.floor((g+v)/(p+v)),x=(g-C*p)/(C-1),y=(g-(C+1)*p)/C,v=y<=0||Math.abs(v-x)<Math.abs(v-y)?x:y),w&&(o===3?this.ctx.setLineDash([0,p+v]):this.ctx.setLineDash([p,v])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Kt(n),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(fr(l[0])&&(B=l[3],E=l[0],this.ctx.beginPath(),this.formatPath([new ue(B.end.x,B.end.y),new ue(E.start.x,E.start.y)]),this.ctx.stroke()),fr(l[1])&&(B=l[1],E=l[2],this.ctx.beginPath(),this.formatPath([new ue(B.end.x,B.end.y),new ue(E.start.x,E.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(n){return gn(this,void 0,void 0,function(){var r;return on(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Kt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=az(n),[4,this.renderStack(r)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}})})},t})(QS),bz=function(e){return e instanceof gS||e instanceof fS?!0:e instanceof cv&&e.type!==_c&&e.type!==Zc},xz=function(e,t){switch(e){case 0:return td(t);case 2:return nz(t);default:return nd(t)}},yz=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},Cz=["-apple-system","system-ui"],Bz=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(t){return Cz.indexOf(t)===-1}):e},Ez=(function(e){kr(t,e);function t(n,r){var A=e.call(this,n,r)||this;return A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),A.options=r,A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px",A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),A}return t.prototype.render=function(n){return gn(this,void 0,void 0,function(){var r,A;return on(this,function(i){switch(i.label){case 0:return r=Rp(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,Dz(r)];case 1:return A=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Kt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t})(QS),Dz=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Sz=(function(){function e(t){var n=t.id,r=t.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,sl([this.id,this.getTime()+"ms"],t))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,sl([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.instances={},e})(),Iz=(function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new Sz({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new q3(this,t)}return e.instanceCount=1,e})(),Tz=function(e,t){return t===void 0&&(t={}),Oz(e,t)};typeof window<"u"&&ES.setContext(window);var Oz=function(e,t){return gn(void 0,void 0,void 0,function(){var n,r,A,i,o,a,l,c,d,u,f,g,p,v,w,b,C,x,y,B,D,E,D,I,T,Q,F,U,z,k,W,Z,Y,J,Ae,L,S,M,V,N;return on(this,function(j){switch(j.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return A={allowTaint:(I=t.allowTaint)!==null&&I!==void 0?I:!1,imageTimeout:(T=t.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:t.proxy,useCORS:(Q=t.useCORS)!==null&&Q!==void 0?Q:!1},i=mp({logging:(F=t.logging)!==null&&F!==void 0?F:!0,cache:t.cache},A),o={windowWidth:(U=t.windowWidth)!==null&&U!==void 0?U:r.innerWidth,windowHeight:(z=t.windowHeight)!==null&&z!==void 0?z:r.innerHeight,scrollX:(k=t.scrollX)!==null&&k!==void 0?k:r.pageXOffset,scrollY:(W=t.scrollY)!==null&&W!==void 0?W:r.pageYOffset},a=new BA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new Iz(i,a),c=(Z=t.foreignObjectRendering)!==null&&Z!==void 0?Z:!1,d={allowTaint:(Y=t.allowTaint)!==null&&Y!==void 0?Y:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:c,copyStyles:c},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),u=new oy(l,e,d),f=u.clonedReferenceElement,f?[4,u.toIFrame(n,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=j.sent(),p=dv(f)||Q3(f)?sN(f.ownerDocument):$d(l,f),v=p.width,w=p.height,b=p.left,C=p.top,x=Qz(l,f,t.backgroundColor),y={canvas:t.canvas,backgroundColor:x,scale:(Ae=(J=t.scale)!==null&&J!==void 0?J:r.devicePixelRatio)!==null&&Ae!==void 0?Ae:1,x:((L=t.x)!==null&&L!==void 0?L:0)+b,y:((S=t.y)!==null&&S!==void 0?S:0)+C,width:(M=t.width)!==null&&M!==void 0?M:Math.ceil(v),height:(V=t.height)!==null&&V!==void 0?V:Math.ceil(w)},c?(l.logger.debug("Document cloned, using foreign object rendering"),D=new Ez(l,y),[4,D.render(f)]):[3,3];case 2:return B=j.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+b+","+C+" with size "+v+"x"+w+" using computed rendering"),l.logger.debug("Starting DOM parsing"),E=mS(l,f),x===E.styles.backgroundColor&&(E.styles.backgroundColor=wA.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),D=new wz(l,y),[4,D.render(E)];case 4:B=j.sent(),j.label=5;case 5:return(!((N=t.removeContainer)!==null&&N!==void 0)||N)&&(oy.destroy(g)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,B]}})})},Qz=function(e,t,n){var r=t.ownerDocument,A=r.documentElement?Vs(e,getComputedStyle(r.documentElement).backgroundColor):wA.TRANSPARENT,i=r.body?Vs(e,getComputedStyle(r.body).backgroundColor):wA.TRANSPARENT,o=typeof n=="string"?Vs(e,n):n===null?wA.TRANSPARENT:4294967295;return t===r.documentElement?KA(A)?KA(i)?o:i:A:o};function kp(e,t){const[n,r]=h.useState(()=>{try{const A=window.localStorage.getItem(e);return A?JSON.parse(A):(window.localStorage.setItem(e,JSON.stringify(t)),t)}catch{return t}});return h.useEffect(()=>{try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,r]}const Rz=m.button`
|
|
1361
1361
|
position: relative;
|
|
1362
1362
|
display: inline-flex;
|
|
1363
1363
|
justify-content: center;
|
|
@@ -1628,7 +1628,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1628
1628
|
left: 50%;
|
|
1629
1629
|
top: 50%;
|
|
1630
1630
|
transform: translate(-50%, -50%);
|
|
1631
|
-
`;function Ol(e){const t=Et.hex(e).toHsl().hue();return Et.hsl(t,100,50).toHex().string()}function Ql(e,t,n){const r=Et.hex(e).toRgb().values(),A=Et.rgb(r.r,r.g,r.b).toHsb().values(),i=A[1]/100*t,o=n-A[2]/100*n;return{x:i,y:o}}const x5=14,y5=({initialColor:e,width:t=400,height:n=200,palettes:r,onChange:A})=>{const i=H.useIntl(),[o,a]=h.useState(Ol(e)),[l,c]=h.useState(Ql(e,t,n)),[d,u]=h.useState(e),[f,g]=kp("color_picker_last_color",[]),[p,v]=kp("color_picker_last_color_locked",!1),[w,b]=h.useState(!1),[C,x]=h.useState({x:0,y:0}),[y,B]=h.useState("#000000"),[E,D]=h.useState(null),I=h.useRef(null),T=h.useRef(!1),Q=h.useRef(null),F=h.useRef(null),U=h.useRef(null),z=h.useRef(null),k=h.useMemo(()=>Ol(e),[e]),W=h.useMemo(()=>Ql(e,t,n),[e,t,n]),Z=async()=>{if(!("EyeDropper"in window)){V();return}try{const G=(await new window.EyeDropper().open()).sRGBHex;u(G),a(Ol(G));const X=Ql(G,t,n);c(X),A(G,!0),
|
|
1631
|
+
`;function Ol(e){const t=Et.hex(e).toHsl().hue();return Et.hsl(t,100,50).toHex().string()}function Ql(e,t,n){const r=Et.hex(e).toRgb().values(),A=Et.rgb(r.r,r.g,r.b).toHsb().values(),i=A[1]/100*t,o=n-A[2]/100*n;return{x:i,y:o}}const x5=14,y5=({initialColor:e,width:t=400,height:n=200,palettes:r,onChange:A})=>{const i=H.useIntl(),[o,a]=h.useState(Ol(e)),[l,c]=h.useState(Ql(e,t,n)),[d,u]=h.useState(e),[f,g]=kp("color_picker_last_color",[]),[p,v]=kp("color_picker_last_color_locked",!1),[w,b]=h.useState(!1),[C,x]=h.useState({x:0,y:0}),[y,B]=h.useState("#000000"),[E,D]=h.useState(null),I=h.useRef(null),T=h.useRef(!1),Q=h.useRef(null),F=h.useRef(null),U=h.useRef(null),z=h.useRef(null),k=h.useMemo(()=>Ol(e),[e]),W=h.useMemo(()=>Ql(e,t,n),[e,t,n]),Z=async()=>{if(!("EyeDropper"in window)){V();return}try{const G=(await new window.EyeDropper().open()).sRGBHex;u(G),a(Ol(G));const X=Ql(G,t,n);c(X),A(G,!0),Y(G)}catch(N){console.error("Error using EyeDropper API:",N)}};h.useEffect(()=>(T.current=!0,a(k),c(W),u(e),F.current=document.createElement("canvas"),U.current=document.createElement("canvas"),z.current=document.createElement("canvas"),()=>{T.current=!1}),[e,t,n,k,W]);const Y=h.useCallback(N=>{!p&&Array.isArray(f)&&f.indexOf(N)===-1&&g([N,...f].slice(0,x5))},[p,f,g]),J=h.useCallback(async()=>{if(T.current)try{if(!document.body){console.error("Document body not found"),b(!1);return}const N=await Tz(document.body,{logging:!1,useCORS:!0,allowTaint:!0,scale:window.devicePixelRatio});T.current&&D(N)}catch(N){console.error("Failed to capture screenshot:",N),T.current&&b(!1)}},[]),Ae=h.useCallback((N,j)=>{if(!T.current||!E||!I.current)return;const G=window.devicePixelRatio,X=1,O=60,oe=4/G,se=N-7*G,He=j-7*G;if(N<0||j<0||N>E.width||j>E.height)return;const re=F.current,te=U.current,xe=z.current;if(!re||!te||!xe)return;re.width=O*X,re.height=O*X,re.getContext("2d")?.drawImage(E,se,He,O,O,0,0,O*X,O*X),te.width=O*X,te.height=O*X,te.getContext("2d")?.drawImage(re,0,0,O*X,O*X),xe.width=O*X,xe.height=O*X;const Re=xe.getContext("2d");Re&&(Re.imageSmoothingEnabled=!1,Re.drawImage(te,0,0,O*X/oe,O*X/oe,0,0,O*X,O*X));const lt=I.current;lt.width=O*X,lt.height=O*X,lt.getContext("2d")?.drawImage(xe,0,0)},[E]),L=h.useCallback(N=>{if(!T.current)return;const j=window.devicePixelRatio;if(x({x:N.clientX,y:N.clientY}),E&&I.current)try{const G=E.getContext("2d");if(G)try{const X=G.getImageData(N.clientX*j,N.clientY*j,1,1).data,O=d5(X[0],X[1],X[2]);B(O),Q.current&&cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(()=>{Ae(N.clientX*j,N.clientY*j)})}catch(X){console.error("Failed to get pixel data:",X)}}catch(G){console.error("Failed to get canvas context:",G)}},[E,Ae]),S=()=>{if(!T.current)return;u(y),a(Ol(y));const N=Ql(y,t,n);c(N),A(y,!0),Y(y),b(!1)},M=h.useCallback(N=>{N.key==="Escape"&&b(!1)},[]),V=h.useCallback(N=>{!N||!T.current||(b(!1),D(null),setTimeout(()=>{if(T.current){const j=N.clientX,G=N.clientY;x({x:j,y:G}),b(!0)}},10))},[]);return h.useEffect(()=>{T.current&&w&&(D(null),J())},[w,J]),h.useEffect(()=>{if(!T.current||!w||!E)return;const N=X=>L(X),j=()=>S(),G=X=>M(X);return window.addEventListener("mousemove",N),window.addEventListener("click",j),window.addEventListener("keydown",G),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("click",j),window.removeEventListener("keydown",G)}},[w,E,y,L,S,M]),l!==void 0?s.jsxs(s.Fragment,{children:[s.jsx(MS,{width:t,height:n,initialPosition:l,onChange:(N,j)=>{const G=1-N.y/n,X=N.x/t,O=Et.hex(o).toHsl().hue(),oe=Et.hsb(O,X,G).toRgb().values(),se=Et.rgb(oe[0],oe[1],oe[2]).toHex().string();u(se),c(N),A(se,!j),j||Y(se)},children:s.jsxs(u5,{width:t,height:n,children:[s.jsx(f5,{width:t,height:n,backgroundColor:o}),s.jsx(g5,{}),s.jsx(h5,{size:18,backgroundColor:"transparent",top:l.y,left:l.x})]})}),s.jsx("div",{style:{marginTop:12}}),s.jsx(c5,{width:t,hue:Et.hex(e).toHsl().hue(),onChange:(N,j,G)=>{const X=Et.hex(d).toHsl().values(),O=Et.hsl(j,X[1],X[2]).toHex().string();u(O),a(N),A(O,!G)}}),s.jsxs(p5,{children:[s.jsx(m5,{children:s.jsx(n5,{width:"100%",initialValue:d,onChange:N=>{if(Et.isValid(N)){const j=Et.hex(N).toHsl().hue(),G=Et.hsl(j,100,50).toHex().string(),X=Et.hex(N).toRgb().values(),O=Et.rgb(X.r,X.g,X.b).toHsb().values(),oe=O[1]/100*t,se=n-O[2]/100*n;c({x:oe,y:se}),u(N),a(G),A(N,!0),Y(N)}}})}),s.jsx(v5,{variant:"square",onClick:Z,icon:"icon-eye-dropper"})]}),f&&Array.isArray(f)?s.jsx(uy,{palette:{name:i.formatMessage({id:"COLOR_PICKER_recent_colors"}),colors:f},onClick:N=>{const j=Et.hex(N).toRgb().values(),G=Et.hex(N).toHsl().hue(),X=Et.rgb(j.r,j.g,j.b).toHsb().values(),O=X[1]/100*t,oe=n-X[2]/100*n;c({x:O,y:oe}),a(Et.hsl(G,100,50).toHex().string()),u(N),A(N,!0)},isLocked:p,onChange:N=>{v(N)}}):s.jsx(s.Fragment,{}),r?.map((N,j)=>s.jsx(uy,{palette:N,isLocked:!1,onClick:G=>{const X=Et.hex(G).toRgb().values(),O=Et.hex(G).toHsl().hue(),oe=Et.rgb(X.r,X.g,X.b).toHsb().values(),se=oe[1]/100*t,He=n-oe[2]/100*n;c({x:se,y:He}),a(Et.hsl(O,100,50).toHex().string()),u(G),A(G,!0)}},j)),w&&E&&s.jsx(dn,{open:w,closeHandler:()=>b(!1),portalId:"react-modal",inPlace:!1,variant:"full-screen",overflow:"hidden",maxHeight:"100%",maxWidth:"100%",zIndex:1100,overlayBackgroundColor:"transparent",containerBackgroundColor:"transparent",children:s.jsx("div",{style:{position:"relative",width:"100%",height:"100%"},children:s.jsxs(w5,{x:C.x,y:C.y,children:[s.jsx("canvas",{ref:I,style:{width:"100%",height:"100%"}}),s.jsx(b5,{color:y})]})})})]}):s.jsx(s.Fragment,{})},C5=m.button`
|
|
1632
1632
|
${$m}
|
|
1633
1633
|
width: 100%;
|
|
1634
1634
|
display: flex;
|
|
@@ -1680,7 +1680,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1680
1680
|
border: ${({$withBorder:e,$borderColor:t,theme:n})=>e?"1px solid "+(t?n.color[t]:n.color.grey1):"none"};
|
|
1681
1681
|
z-index: ${({theme:e})=>e.zIndex.dropdown};
|
|
1682
1682
|
overflow: ${({$overflow:e})=>e};
|
|
1683
|
-
`,z5=({as:e,onClickAway:t,mouseEvent:n,touchEvent:r,...A})=>{const i=h.useRef(null);return h.useEffect(()=>{const o=a=>{i.current===null||i.current.contains(a.target)||t(a)};return document.addEventListener(n??"click",o),document.addEventListener(r??"touchend",o),()=>{document.removeEventListener(n??"click",o),document.removeEventListener(r??"touchend",o)}},[n,t,r]),h.createElement(e??"div",{ref:i,...A})},vv=({trigger:e,dropdown:t,align:n,onToggle:r,withBorder:A,borderColor:i,background:o,overflow:a="auto",width:l,offset:c,display:d})=>{const[u,f]=h.useState(!1),g=h.useCallback(()=>{f(C=>!C)},[]),p=h.useCallback(()=>{f(!1)},[]);h.useEffect(()=>{r?.(u)},[u,r]),h.useEffect(()=>{const C=x=>{x.key==="Escape"&&f(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[]);const v=h.useMemo(()=>Mn(),[]),w=h.useMemo(()=>`trigger-${v}`,[v]),b=h.useMemo(()=>`dropdown-${v}`,[v]);return s.jsx(z5,{onClickAway:p,children:s.jsxs(k5,{$display:d??"inline",children:[typeof e=="function"?e({role:"button","aria-expanded":u,"aria-controls":b,id:w,onClick:g}):s.jsx(N5,{role:"button","aria-expanded":u,"aria-controls":b,id:w,onClick:g,children:e}),u&&s.jsx(U5,{$offset:c,$width:l,$background:o,$overflow:a??"auto",$borderColor:i,role:"region",id:b,$withBorder:A,$align:n,"aria-labelledby":w,children:t(p)})]})})};function W5(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const X5={},Ns={};function yi(e,t){try{const r=(X5[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Ns?Ns[r]:py(r,r.split(":"))}catch{if(e in Ns)return Ns[e];const n=e?.match(G5);return n?py(e,n.slice(1)):NaN}}const G5=/([+-]\d\d):?(\d\d)?/;function py(e,t){const n=+(t[0]||0),r=+(t[1]||0),A=+(t[2]||0)/60;return Ns[e]=n*60+r>0?n*60+r+A:n*60-r-A}class $r extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(yi(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),US(this),Xp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new $r(...n,t):new $r(Date.now(),t)}withTimeZone(t){return new $r(+this,t)}getTimezoneOffset(){const t=-yi(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Xp(this),+this}[Symbol.for("constructDateFrom")](t){return new $r(+new Date(t),this.timeZone)}}const my=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!my.test(e))return;const t=e.replace(my,"$1UTC");$r.prototype[t]&&(e.startsWith("get")?$r.prototype[e]=function(){return this.internal[t]()}:($r.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),V5(this),+this},$r.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Xp(this),+this}))});function Xp(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-yi(e.timeZone,e)*60))}function V5(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),US(e)}function US(e){const t=yi(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const A=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),o=A-i,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const l=A-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const d=A>0?c.getSeconds():(c.getSeconds()-60)%60,u=Math.round(-(yi(e.timeZone,e)*60))%60;(u||d)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+d));const f=yi(e.timeZone,e),g=f>0?Math.floor(f):Math.ceil(f),v=-new Date(+e).getTimezoneOffset()-g,w=g!==n,b=v-l;if(w&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const C=yi(e.timeZone,e),x=C>0?Math.floor(C):Math.ceil(C),y=g-x;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class an extends $r{static tz(t,...n){return n.length?new an(...n,t):new an(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),A=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+A}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,A]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${A}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,A]=this.tzComponents();return`${t} GMT${n}${r}${A} (${W5(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),A=String(Math.abs(t)%60).padStart(2,"0");return[n,r,A]}withTimeZone(t){return new an(+this,t)}[Symbol.for("constructDateFrom")](t){return new an(+new Date(t),this.timeZone)}}const zS=6048e5,K5=864e5,vy=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vy in e?e[vy](t):e instanceof Date?new e.constructor(t):new Date(t)}function at(e,t){return Wt(t||e,e)}function WS(e,t,n){const r=at(e,n?.in);return isNaN(t)?Wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function XS(e,t,n){const r=at(e,n?.in);if(isNaN(t))return Wt(e,NaN);if(!t)return r;const A=r.getDate(),i=Wt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const o=i.getDate();return A>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),A),r)}let q5={};function Oa(){return q5}function Vo(e,t){const n=Oa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=at(e,t?.in),i=A.getDay(),o=(i<r?7:0)+i-r;return A.setDate(A.getDate()-o),A.setHours(0,0,0,0),A}function ca(e,t){return Vo(e,{...t,weekStartsOn:1})}function GS(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=Wt(n,0);A.setFullYear(r+1,0,4),A.setHours(0,0,0,0);const i=ca(A),o=Wt(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=ca(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function wy(e){const t=at(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function os(e,...t){const n=Wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function da(e,t){const n=at(e,t?.in);return n.setHours(0,0,0,0),n}function wv(e,t,n){const[r,A]=os(n?.in,e,t),i=da(r),o=da(A),a=+i-wy(i),l=+o-wy(o);return Math.round((a-l)/K5)}function J5(e,t){const n=GS(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ca(r)}function Y5(e,t,n){return WS(e,t*7,n)}function Z5(e,t,n){return XS(e,t*12,n)}function _5(e,t){let n,r=t?.in;return e.forEach(A=>{!r&&typeof A=="object"&&(r=Wt.bind(null,A));const i=at(A,r);(!n||n<i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function $5(e,t){let n,r=t?.in;return e.forEach(A=>{!r&&typeof A=="object"&&(r=Wt.bind(null,A));const i=at(A,r);(!n||n>i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function VS(e,t,n){const[r,A]=os(n?.in,e,t);return+da(r)==+da(A)}function KS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e8(e){return!(!KS(e)&&typeof e!="number"||isNaN(+at(e)))}function qS(e,t,n){const[r,A]=os(n?.in,e,t),i=r.getFullYear()-A.getFullYear(),o=r.getMonth()-A.getMonth();return i*12+o}function t8(e,t){const n=at(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function JS(e,t){const[n,r]=os(e,t.start,t.end);return{start:n,end:r}}function n8(e,t){const{start:n,end:r}=JS(t?.in,e);let A=+n>+r;const i=A?+n:+r,o=A?r:n;o.setHours(0,0,0,0),o.setDate(1);let a=1;const l=[];for(;+o<=i;)l.push(Wt(n,o)),o.setMonth(o.getMonth()+a);return A?l.reverse():l}function r8(e,t){const n=at(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function A8(e,t){const n=at(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function YS(e,t){const n=at(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function i8(e,t){const{start:n,end:r}=JS(t?.in,e);let A=+n>+r;const i=A?+n:+r,o=A?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let a=1;const l=[];for(;+o<=i;)l.push(Wt(n,o)),o.setFullYear(o.getFullYear()+a);return A?l.reverse():l}function ZS(e,t){const n=Oa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=at(e,t?.in),i=A.getDay(),o=(i<r?-7:0)+6-(i-r);return A.setDate(A.getDate()+o),A.setHours(23,59,59,999),A}function o8(e,t){return ZS(e,{...t,weekStartsOn:1})}const s8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a8=(e,t,n)=>{let r;const A=s8[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bA(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const l8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},d8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u8={date:bA({formats:l8,defaultWidth:"full"}),time:bA({formats:c8,defaultWidth:"full"}),dateTime:bA({formats:d8,defaultWidth:"full"})},f8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},g8=(e,t,n,r)=>f8[e];function hn(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let A;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):o;A=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;A=e.values[a]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return A[i]}}const h8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},p8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},m8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},v8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},w8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},b8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},x8=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},y8={ordinalNumber:x8,era:hn({values:h8,defaultWidth:"wide"}),quarter:hn({values:p8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hn({values:m8,defaultWidth:"wide"}),day:hn({values:v8,defaultWidth:"wide"}),dayPeriod:hn({values:w8,defaultWidth:"wide",formattingValues:b8,defaultFormattingWidth:"wide"})};function pn(e){return(t,n={})=>{const r=n.width,A=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(A);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?B8(a,u=>u.test(o)):C8(a,u=>u.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(o.length);return{value:c,rest:d}}}function C8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function B8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function bv(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const A=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(A.length);return{value:o,rest:a}}}const E8=/^(\d+)(th|st|nd|rd)?/i,D8=/\d+/i,S8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},I8={any:[/^b/i,/^(a|c)/i]},T8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},O8={any:[/1/i,/2/i,/3/i,/4/i]},Q8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},R8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},j8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},L8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},P8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},M8={ordinalNumber:bv({matchPattern:E8,parsePattern:D8,valueCallback:e=>parseInt(e,10)}),era:pn({matchPatterns:S8,defaultMatchWidth:"wide",parsePatterns:I8,defaultParseWidth:"any"}),quarter:pn({matchPatterns:T8,defaultMatchWidth:"wide",parsePatterns:O8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:Q8,defaultMatchWidth:"wide",parsePatterns:R8,defaultParseWidth:"any"}),day:pn({matchPatterns:j8,defaultMatchWidth:"wide",parsePatterns:F8,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:L8,defaultMatchWidth:"any",parsePatterns:P8,defaultParseWidth:"any"})},mo={code:"en-US",formatDistance:a8,formatLong:u8,formatRelative:g8,localize:y8,match:M8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function H8(e,t){const n=at(e,t?.in);return wv(n,YS(n))+1}function xv(e,t){const n=at(e,t?.in),r=+ca(n)-+J5(n);return Math.round(r/zS)+1}function _S(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=Oa(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??A.firstWeekContainsDate??A.locale?.options?.firstWeekContainsDate??1,o=Wt(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=Vo(o,t),l=Wt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Vo(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function k8(e,t){const n=Oa(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,A=_S(e,t),i=Wt(t?.in||e,0);return i.setFullYear(A,0,r),i.setHours(0,0,0,0),Vo(i,t)}function yv(e,t){const n=at(e,t?.in),r=+Vo(n,t)-+k8(n,t);return Math.round(r/zS)+1}function At(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const TA={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return At(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):At(n+1,2)},d(e,t){return At(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return At(e.getHours()%12||12,t.length)},H(e,t){return At(e.getHours(),t.length)},m(e,t){return At(e.getMinutes(),t.length)},s(e,t){return At(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),A=Math.trunc(r*Math.pow(10,n-3));return At(A,t.length)}},ro={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),A=r>0?r:1-r;return n.ordinalNumber(A,{unit:"year"})}return TA.y(e,t)},Y:function(e,t,n,r){const A=_S(e,r),i=A>0?A:1-A;if(t==="YY"){const o=i%100;return At(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):At(i,t.length)},R:function(e,t){const n=GS(e);return At(n,t.length)},u:function(e,t){const n=e.getFullYear();return At(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return At(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return At(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return TA.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return At(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const A=yv(e,r);return t==="wo"?n.ordinalNumber(A,{unit:"week"}):At(A,t.length)},I:function(e,t,n){const r=xv(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):At(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):TA.d(e,t)},D:function(e,t,n){const r=H8(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):At(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const A=e.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return At(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(A,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(A,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(A,{width:"short",context:"formatting"});default:return n.day(A,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const A=e.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return At(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(A,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(A,{width:"narrow",context:"standalone"});case"cccccc":return n.day(A,{width:"short",context:"standalone"});default:return n.day(A,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),A=r===0?7:r;switch(t){case"i":return String(A);case"ii":return At(A,t.length);case"io":return n.ordinalNumber(A,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const A=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let A;switch(r===12?A=ro.noon:r===0?A=ro.midnight:A=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let A;switch(r>=17?A=ro.evening:r>=12?A=ro.afternoon:r>=4?A=ro.morning:A=ro.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return TA.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):TA.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):TA.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):TA.s(e,t)},S:function(e,t){return TA.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yy(r);case"XXXX":case"XX":return gi(r);default:return gi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return yy(r);case"xxxx":case"xx":return gi(r);default:return gi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xy(r,":");default:return"GMT"+gi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xy(r,":");default:return"GMT"+gi(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return At(r,t.length)},T:function(e,t,n){return At(+e,t.length)}};function xy(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),A=Math.trunc(r/60),i=r%60;return i===0?n+String(A):n+String(A)+t+At(i,2)}function yy(e,t){return e%60===0?(e>0?"-":"+")+At(Math.abs(e)/60,2):gi(e,t)}function gi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),A=At(Math.trunc(r/60),2),i=At(r%60,2);return n+A+t+i}const Cy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},$S=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},N8=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],A=n[2];if(!A)return Cy(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Cy(r,t)).replace("{{time}}",$S(A,t))},U8={p:$S,P:N8},z8=/^D+$/,W8=/^Y+$/,X8=["D","DD","YY","YYYY"];function G8(e){return z8.test(e)}function V8(e){return W8.test(e)}function K8(e,t,n){const r=q8(e,t,n);if(console.warn(r),X8.includes(e))throw new RangeError(r)}function q8(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const J8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Z8=/^'([^]*?)'?$/,_8=/''/g,$8=/[a-zA-Z]/;function Ci(e,t,n){const r=Oa(),A=n?.locale??r.locale??mo,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=at(e,n?.in);if(!e8(a))throw new RangeError("Invalid time value");let l=t.match(Y8).map(d=>{const u=d[0];if(u==="p"||u==="P"){const f=U8[u];return f(d,A.formatLong)}return d}).join("").match(J8).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const u=d[0];if(u==="'")return{isToken:!1,value:e7(d)};if(by[u])return{isToken:!0,value:d};if(u.match($8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:d}});A.localize.preprocessor&&(l=A.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:A};return l.map(d=>{if(!d.isToken)return d.value;const u=d.value;(!n?.useAdditionalWeekYearTokens&&V8(u)||!n?.useAdditionalDayOfYearTokens&&G8(u))&&K8(u,t,String(e));const f=by[u[0]];return f(a,u,A.localize,c)}).join("")}function e7(e){const t=e.match(Z8);return t?t[1].replace(_8,"'"):e}function t7(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=n.getMonth(),i=Wt(n,0);return i.setFullYear(r,A+1,0),i.setHours(0,0,0,0),i.getDate()}function n7(e,t){return at(e,t?.in).getMonth()}function r7(e,t){return at(e,t?.in).getFullYear()}function A7(e,t){return+at(e)>+at(t)}function i7(e,t){return+at(e)<+at(t)}function o7(e,t,n){const[r,A]=os(n?.in,e,t);return r.getFullYear()===A.getFullYear()&&r.getMonth()===A.getMonth()}function s7(e,t,n){const[r,A]=os(n?.in,e,t);return r.getFullYear()===A.getFullYear()}function a7(e,t,n){const r=at(e,n?.in),A=r.getFullYear(),i=r.getDate(),o=Wt(e,0);o.setFullYear(A,t,15),o.setHours(0,0,0,0);const a=t7(o);return r.setMonth(t,Math.min(i,a)),r}function l7(e,t,n){const r=at(e,n?.in);return isNaN(+r)?Wt(e,NaN):(r.setFullYear(t),r)}const By=5,c7=4;function d7(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,A=t.addDays(e,-r+1),i=t.addDays(A,By*7-1);return t.getMonth(e)===t.getMonth(i)?By:c7}function e1(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function u7(e,t){const n=e1(e,t),r=d7(e,t);return t.addDays(n,r*7-1)}const f7={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},g7=(e,t,n)=>{let r;const A=f7[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},h7={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},p7={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},m7={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},v7={date:bA({formats:h7,defaultWidth:"full"}),time:bA({formats:p7,defaultWidth:"full"}),dateTime:bA({formats:m7,defaultWidth:"full"})},w7={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},b7={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},x7=(e,t,n,r)=>t.getHours()!==1?b7[e]:w7[e],y7={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},C7={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},B7={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},E7={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},D7={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},S7={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},I7=(e,t)=>Number(e)+"º",T7={ordinalNumber:I7,era:hn({values:y7,defaultWidth:"wide"}),quarter:hn({values:C7,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:hn({values:B7,defaultWidth:"wide"}),day:hn({values:E7,defaultWidth:"wide"}),dayPeriod:hn({values:D7,defaultWidth:"wide",formattingValues:S7,defaultFormattingWidth:"wide"})},O7=/^(\d+)(º)?/i,Q7=/\d+/i,R7={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},j7={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},F7={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},L7={any:[/1/i,/2/i,/3/i,/4/i]},P7={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},M7={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},H7={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},k7={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},N7={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},U7={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},z7={ordinalNumber:bv({matchPattern:O7,parsePattern:Q7,valueCallback:function(e){return parseInt(e,10)}}),era:pn({matchPatterns:R7,defaultMatchWidth:"wide",parsePatterns:j7,defaultParseWidth:"any"}),quarter:pn({matchPatterns:F7,defaultMatchWidth:"wide",parsePatterns:L7,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:P7,defaultMatchWidth:"wide",parsePatterns:M7,defaultParseWidth:"any"}),day:pn({matchPatterns:H7,defaultMatchWidth:"wide",parsePatterns:k7,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:N7,defaultMatchWidth:"any",parsePatterns:U7,defaultParseWidth:"any"})},W7={code:"es",formatDistance:g7,formatLong:v7,formatRelative:x7,localize:T7,match:z7,options:{weekStartsOn:1,firstWeekContainsDate:1}},X7={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},G7=(e,t,n)=>{let r;const A=X7[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},V7={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},K7={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},q7={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},J7={date:bA({formats:V7,defaultWidth:"full"}),time:bA({formats:K7,defaultWidth:"full"}),dateTime:bA({formats:q7,defaultWidth:"full"})},Y7={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Z7=(e,t,n,r)=>Y7[e],_7={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},$7={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},e9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},t9={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},n9={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},r9=(e,t)=>{const n=Number(e),r=t?.unit;if(n===0)return"0";const A=["year","week","hour","minute","second"];let i;return n===1?i=r&&A.includes(r)?"ère":"er":i="ème",n+i},A9=["MMM","MMMM"],i9={preprocessor:(e,t)=>e.getDate()===1||!t.some(r=>r.isToken&&A9.includes(r.value))?t:t.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:r9,era:hn({values:_7,defaultWidth:"wide"}),quarter:hn({values:$7,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hn({values:e9,defaultWidth:"wide"}),day:hn({values:t9,defaultWidth:"wide"}),dayPeriod:hn({values:n9,defaultWidth:"wide"})},o9=/^(\d+)(ième|ère|ème|er|e)?/i,s9=/\d+/i,a9={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},l9={any:[/^av/i,/^ap/i]},c9={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},d9={any:[/1/i,/2/i,/3/i,/4/i]},u9={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},f9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},g9={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},h9={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},p9={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},m9={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},v9={ordinalNumber:bv({matchPattern:o9,parsePattern:s9,valueCallback:e=>parseInt(e)}),era:pn({matchPatterns:a9,defaultMatchWidth:"wide",parsePatterns:l9,defaultParseWidth:"any"}),quarter:pn({matchPatterns:c9,defaultMatchWidth:"wide",parsePatterns:d9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:u9,defaultMatchWidth:"wide",parsePatterns:f9,defaultParseWidth:"any"}),day:pn({matchPatterns:g9,defaultMatchWidth:"wide",parsePatterns:h9,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:p9,defaultMatchWidth:"any",parsePatterns:m9,defaultParseWidth:"any"})},w9={code:"fr",formatDistance:G7,formatLong:J7,formatRelative:Z7,localize:i9,match:v9,options:{weekStartsOn:1,firstWeekContainsDate:4}},Cv={...mo,labels:{labelDayButton:(e,t,n,r)=>{let A;r&&typeof r.format=="function"?A=r.format.bind(r):A=(o,a)=>Ci(o,a,{locale:mo,...n});let i=A(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(A,i)=>Ci(A,i,{locale:mo,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let A;r&&typeof r.format=="function"?A=r.format.bind(r):A=(o,a)=>Ci(o,a,{locale:mo,...n});let i=A(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(A,i)=>Ci(A,i,{locale:mo,...t}),r(e,"cccc")}}};class kt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?an.tz(this.options.timeZone):new this.Date,this.newDate=(r,A,i)=>this.overrides?.newDate?this.overrides.newDate(r,A,i):this.options.timeZone?new an(r,A,i,this.options.timeZone):new Date(r,A,i),this.addDays=(r,A)=>this.overrides?.addDays?this.overrides.addDays(r,A):WS(r,A),this.addMonths=(r,A)=>this.overrides?.addMonths?this.overrides.addMonths(r,A):XS(r,A),this.addWeeks=(r,A)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,A):Y5(r,A),this.addYears=(r,A)=>this.overrides?.addYears?this.overrides.addYears(r,A):Z5(r,A),this.differenceInCalendarDays=(r,A)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,A):wv(r,A),this.differenceInCalendarMonths=(r,A)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,A):qS(r,A),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):n8(r),this.eachYearOfInterval=r=>{const A=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):i8(r),i=new Set(A.map(a=>this.getYear(a)));if(i.size===A.length)return A;const o=[];return i.forEach(a=>{o.push(new Date(a,0,1))}),o},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):u7(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):o8(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):t8(r),this.endOfWeek=(r,A)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,A):ZS(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):A8(r),this.format=(r,A,i)=>{const o=this.overrides?.format?this.overrides.format(r,A,this.options):Ci(r,A,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(o):o},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):xv(r),this.getMonth=(r,A)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):n7(r,this.options),this.getYear=(r,A)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):r7(r,this.options),this.getWeek=(r,A)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):yv(r,this.options),this.isAfter=(r,A)=>this.overrides?.isAfter?this.overrides.isAfter(r,A):A7(r,A),this.isBefore=(r,A)=>this.overrides?.isBefore?this.overrides.isBefore(r,A):i7(r,A),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):KS(r),this.isSameDay=(r,A)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,A):VS(r,A),this.isSameMonth=(r,A)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,A):o7(r,A),this.isSameYear=(r,A)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,A):s7(r,A),this.max=r=>this.overrides?.max?this.overrides.max(r):_5(r),this.min=r=>this.overrides?.min?this.overrides.min(r):$5(r),this.setMonth=(r,A)=>this.overrides?.setMonth?this.overrides.setMonth(r,A):a7(r,A),this.setYear=(r,A)=>this.overrides?.setYear?this.overrides.setYear(r,A):l7(r,A),this.startOfBroadcastWeek=(r,A)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):e1(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):da(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ca(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):r8(r),this.startOfWeek=(r,A)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Vo(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):YS(r),this.options={locale:Cv,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let A=0;A<10;A++)r[A.toString()]=n.format(A);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:A}=this.options,i=n?.code;if(i&&kt.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:A}).format(t)}catch{}const o=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,o)}}kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const oA=new kt;class t1{constructor(t,n,r=oA){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class b9{constructor(t,n){this.date=t,this.weeks=n}}class x9{constructor(t,n){this.days=n,this.weekNumber=t}}function y9(e){return h.createElement("button",{...e})}function C9(e){return h.createElement("span",{...e})}function B9(e){const{size:t=24,orientation:n="left",className:r}=e;return h.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&h.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&h.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&h.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&h.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function E9(e){const{day:t,modifiers:n,...r}=e;return h.createElement("td",{...r})}function D9(e){const{day:t,modifiers:n,...r}=e,A=h.useRef(null);return h.useEffect(()=>{n.focused&&A.current?.focus()},[n.focused]),h.createElement("button",{ref:A,...r})}var ye;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ye||(ye={}));var Dt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Dt||(Dt={}));var Or;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Or||(Or={}));var Vn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Vn||(Vn={}));function S9(e){const{options:t,className:n,components:r,classNames:A,...i}=e,o=[A[ye.Dropdown],n].join(" "),a=t?.find(({value:l})=>l===i.value);return h.createElement("span",{"data-disabled":i.disabled,className:A[ye.DropdownRoot]},h.createElement(r.Select,{className:o,...i},t?.map(({value:l,label:c,disabled:d})=>h.createElement(r.Option,{key:l,value:l,disabled:d},c))),h.createElement("span",{className:A[ye.CaptionLabel],"aria-hidden":!0},a?.label,h.createElement(r.Chevron,{orientation:"down",size:18,className:A[ye.Chevron]})))}function I9(e){return h.createElement("div",{...e})}function T9(e){return h.createElement("div",{...e})}function O9(e){const{calendarMonth:t,displayIndex:n,...r}=e;return h.createElement("div",{...r},e.children)}function Q9(e){const{calendarMonth:t,displayIndex:n,...r}=e;return h.createElement("div",{...r})}function R9(e){return h.createElement("table",{...e})}function j9(e){return h.createElement("div",{...e})}const n1=h.createContext(void 0);function Qa(){const e=h.useContext(n1);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function F9(e){const{components:t}=Qa();return h.createElement(t.Dropdown,{...e})}function L9(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:A,...i}=e,{components:o,classNames:a,labels:{labelPrevious:l,labelNext:c}}=Qa(),d=h.useCallback(f=>{A&&n?.(f)},[A,n]),u=h.useCallback(f=>{r&&t?.(f)},[r,t]);return h.createElement("nav",{...i},h.createElement(o.PreviousMonthButton,{type:"button",className:a[ye.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:u},h.createElement(o.Chevron,{disabled:r?void 0:!0,className:a[ye.Chevron],orientation:"left"})),h.createElement(o.NextMonthButton,{type:"button",className:a[ye.NextMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":c(A),onClick:d},h.createElement(o.Chevron,{disabled:A?void 0:!0,orientation:"right",className:a[ye.Chevron]})))}function P9(e){const{components:t}=Qa();return h.createElement(t.Button,{...e})}function M9(e){return h.createElement("option",{...e})}function H9(e){const{components:t}=Qa();return h.createElement(t.Button,{...e})}function k9(e){const{rootRef:t,...n}=e;return h.createElement("div",{...n,ref:t})}function N9(e){return h.createElement("select",{...e})}function U9(e){const{week:t,...n}=e;return h.createElement("tr",{...n})}function z9(e){return h.createElement("th",{...e})}function W9(e){return h.createElement("thead",{"aria-hidden":!0},h.createElement("tr",{...e}))}function X9(e){const{week:t,...n}=e;return h.createElement("th",{...n})}function G9(e){return h.createElement("th",{...e})}function V9(e){return h.createElement("tbody",{...e})}function K9(e){const{components:t}=Qa();return h.createElement(t.Dropdown,{...e})}const q9=Object.freeze(Object.defineProperty({__proto__:null,Button:y9,CaptionLabel:C9,Chevron:B9,Day:E9,DayButton:D9,Dropdown:S9,DropdownNav:I9,Footer:T9,Month:O9,MonthCaption:Q9,MonthGrid:R9,Months:j9,MonthsDropdown:F9,Nav:L9,NextMonthButton:P9,Option:M9,PreviousMonthButton:H9,Root:k9,Select:N9,Week:U9,WeekNumber:X9,WeekNumberHeader:G9,Weekday:z9,Weekdays:W9,Weeks:V9,YearsDropdown:K9},Symbol.toStringTag,{value:"Module"}));function pA(e,t,n=!1,r=oA){let{from:A,to:i}=e;const{differenceInCalendarDays:o,isSameDay:a}=r;return A&&i?(o(i,A)<0&&([A,i]=[i,A]),o(t,A)>=(n?1:0)&&o(i,t)>=(n?1:0)):!n&&i?a(i,t):!n&&A?a(A,t):!1}function Bv(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function cu(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ev(e){return!!(e&&typeof e=="object"&&"after"in e)}function Dv(e){return!!(e&&typeof e=="object"&&"before"in e)}function r1(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function A1(e,t){return Array.isArray(e)&&e.every(t.isDate)}function mA(e,t,n=oA){const r=Array.isArray(t)?t:[t],{isSameDay:A,differenceInCalendarDays:i,isAfter:o}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return A(e,a);if(A1(a,n))return a.some(l=>A(e,l));if(cu(a))return pA(a,e,!1,n);if(r1(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Bv(a)){const l=i(a.before,e),c=i(a.after,e),d=l>0,u=c<0;return o(a.before,a.after)?u&&d:d||u}return Ev(a)?i(e,a.after)>0:Dv(a)?i(a.before,e)>0:typeof a=="function"?a(e):!1})}function J9(e,t,n,r,A){const{disabled:i,hidden:o,modifiers:a,showOutsideDays:l,broadcastCalendar:c,today:d=A.today()}=t,{isSameDay:u,isSameMonth:f,startOfMonth:g,isBefore:p,endOfMonth:v,isAfter:w}=A,b=n&&g(n),C=r&&v(r),x={[Dt.focused]:[],[Dt.outside]:[],[Dt.disabled]:[],[Dt.hidden]:[],[Dt.today]:[]},y={};for(const B of e){const{date:E,displayMonth:D}=B,I=!!(D&&!f(E,D)),T=!!(b&&p(E,b)),Q=!!(C&&w(E,C)),F=!!(i&&mA(E,i,A)),U=!!(o&&mA(E,o,A))||T||Q||!c&&!l&&I||c&&l===!1&&I,z=u(E,d);I&&x.outside.push(B),F&&x.disabled.push(B),U&&x.hidden.push(B),z&&x.today.push(B),a&&Object.keys(a).forEach(k=>{const W=a?.[k];W&&mA(E,W,A)&&(y[k]?y[k].push(B):y[k]=[B])})}return B=>{const E={[Dt.focused]:!1,[Dt.disabled]:!1,[Dt.hidden]:!1,[Dt.outside]:!1,[Dt.today]:!1},D={};for(const I in x){const T=x[I];E[I]=T.some(Q=>Q===B)}for(const I in y)D[I]=y[I].some(T=>T===B);return{...E,...D}}}function Y9(e,t,n={}){return Object.entries(e).filter(([,A])=>A===!0).reduce((A,[i])=>(n[i]?A.push(n[i]):t[Dt[i]]?A.push(t[Dt[i]]):t[Or[i]]&&A.push(t[Or[i]]),A),[t[ye.Day]])}function Z9(e){return{...q9,...e}}function _9(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function $9(){const e={};for(const t in ye)e[ye[t]]=`rdp-${ye[t]}`;for(const t in Dt)e[Dt[t]]=`rdp-${Dt[t]}`;for(const t in Or)e[Or[t]]=`rdp-${Or[t]}`;for(const t in Vn)e[Vn[t]]=`rdp-${Vn[t]}`;return e}function i1(e,t,n){return(n??new kt(t)).formatMonthYear(e)}const e6=i1;function t6(e,t,n){return(n??new kt(t)).format(e,"d")}function n6(e,t=oA){return t.format(e,"LLLL")}function r6(e,t,n){return(n??new kt(t)).format(e,"cccccc")}function A6(e,t=oA){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function i6(){return""}function o1(e,t=oA){return t.format(e,"yyyy")}const o6=o1,s6=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:i1,formatDay:t6,formatMonthCaption:e6,formatMonthDropdown:n6,formatWeekNumber:A6,formatWeekNumberHeader:i6,formatWeekdayName:r6,formatYearCaption:o6,formatYearDropdown:o1},Symbol.toStringTag,{value:"Module"}));function a6(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...s6,...e}}function Sv(e,t,n,r){let A=(r??new kt(n)).format(e,"PPPP");return t.today&&(A=`Today, ${A}`),t.selected&&(A=`${A}, selected`),A}const l6=Sv;function Iv(e,t,n){return(n??new kt(t)).formatMonthYear(e)}const c6=Iv;function s1(e,t,n,r){let A=(r??new kt(n)).format(e,"PPPP");return t?.today&&(A=`Today, ${A}`),A}function a1(e){return"Choose the Month"}function l1(){return""}const d6="Go to the Next Month";function c1(e,t){return d6}function d1(e){return"Go to the Previous Month"}function u1(e,t,n){return(n??new kt(t)).format(e,"cccc")}function f1(e,t){return`Week ${e}`}function g1(e){return"Week Number"}function h1(e){return"Choose the Year"}const u6=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:c6,labelDay:l6,labelDayButton:Sv,labelGrid:Iv,labelGridcell:s1,labelMonthDropdown:a1,labelNav:l1,labelNext:c1,labelPrevious:d1,labelWeekNumber:f1,labelWeekNumberHeader:g1,labelWeekday:u1,labelYearDropdown:h1},Symbol.toStringTag,{value:"Module"})),Br=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function f6(e,t){const n=t.locale?.labels??{};return{...u6,...e??{},labelDayButton:Br(Sv,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Br(a1,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Br(c1,e?.labelNext,n.labelNext),labelPrevious:Br(d1,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Br(f1,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Br(h1,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Br(Iv,e?.labelGrid,n.labelGrid),labelGridcell:Br(s1,e?.labelGridcell,n.labelGridcell),labelNav:Br(l1,e?.labelNav,n.labelNav),labelWeekNumberHeader:Br(g1,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Br(u1,e?.labelWeekday,n.labelWeekday)}}function g6(e,t,n,r,A){const{startOfMonth:i,startOfYear:o,endOfYear:a,eachMonthOfInterval:l,getMonth:c}=A;return l({start:o(e),end:a(e)}).map(f=>{const g=r.formatMonthDropdown(f,A),p=c(f),v=t&&f<i(t)||n&&f>i(n)||!1;return{value:p,label:g,disabled:v}})}function h6(e,t={},n={}){let r={...t?.[ye.Day]};return Object.entries(e).filter(([,A])=>A===!0).forEach(([A])=>{r={...r,...n?.[A]}}),r}function p6(e,t,n,r){const A=r??e.today(),i=n?e.startOfBroadcastWeek(A,e):t?e.startOfISOWeek(A):e.startOfWeek(A),o=[];for(let a=0;a<7;a++){const l=e.addDays(i,a);o.push(l)}return o}function m6(e,t,n,r,A=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:o,eachYearOfInterval:a,getYear:l}=r,c=i(e),d=o(t),u=a({start:c,end:d});return A&&u.reverse(),u.map(f=>{const g=n.formatYearDropdown(f,r);return{value:l(f),label:g,disabled:!1}})}function v6(e,t={}){const{weekStartsOn:n,locale:r}=t,A=n??r?.options?.weekStartsOn??0,i=a=>{const l=typeof a=="number"||typeof a=="string"?new Date(a):a;return new an(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},o=a=>{const l=i(a);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(an.tz(e)),newDate:(a,l,c)=>new an(a,l,c,12,0,0,e),startOfDay:a=>i(a),startOfWeek:(a,l)=>{const c=i(a),d=l?.weekStartsOn??A,u=(c.getDay()-d+7)%7;return c.setDate(c.getDate()-u),c},startOfISOWeek:a=>{const l=i(a),c=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-c),l},startOfMonth:a=>{const l=i(a);return l.setDate(1),l},startOfYear:a=>{const l=i(a);return l.setMonth(0,1),l},endOfWeek:(a,l)=>{const c=i(a),f=(((l?.weekStartsOn??A)+6)%7-c.getDay()+7)%7;return c.setDate(c.getDate()+f),c},endOfISOWeek:a=>{const l=i(a),c=(7-l.getDay())%7;return l.setDate(l.getDate()+c),l},endOfMonth:a=>{const l=i(a);return l.setMonth(l.getMonth()+1,0),l},endOfYear:a=>{const l=i(a);return l.setMonth(11,31),l},eachMonthOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],u=new an(l.getFullYear(),l.getMonth(),1,12,0,0,e),f=c.getFullYear()*12+c.getMonth();for(;u.getFullYear()*12+u.getMonth()<=f;)d.push(new an(u,e)),u.setMonth(u.getMonth()+1,1);return d},addDays:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l),c},addWeeks:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l*7),c},addMonths:(a,l)=>{const c=i(a);return c.setMonth(c.getMonth()+l),c},addYears:(a,l)=>{const c=i(a);return c.setFullYear(c.getFullYear()+l),c},eachYearOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],u=new an(l.getFullYear(),0,1,12,0,0,e);for(;u.getFullYear()<=c.getFullYear();)d.push(new an(u,e)),u.setFullYear(u.getFullYear()+1,0,1);return d},getWeek:(a,l)=>{const c=o(a);return yv(c,{weekStartsOn:l?.weekStartsOn??A,firstWeekContainsDate:l?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const l=o(a);return xv(l)},differenceInCalendarDays:(a,l)=>{const c=o(a),d=o(l);return wv(c,d)},differenceInCalendarMonths:(a,l)=>{const c=o(a),d=o(l);return qS(c,d)}}}const Ra=e=>e instanceof HTMLElement?e:null,Cg=e=>[...e.querySelectorAll("[data-animated-month]")??[]],w6=e=>Ra(e.querySelector("[data-animated-month]")),Bg=e=>Ra(e.querySelector("[data-animated-caption]")),Eg=e=>Ra(e.querySelector("[data-animated-weeks]")),b6=e=>Ra(e.querySelector("[data-animated-nav]")),x6=e=>Ra(e.querySelector("[data-animated-weekdays]"));function y6(e,t,{classNames:n,months:r,focused:A,dateLib:i}){const o=h.useRef(null),a=h.useRef(r),l=h.useRef(!1);h.useLayoutEffect(()=>{const c=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=i.isSameMonth(r[0].date,c[0].date),u=i.isAfter(r[0].date,c[0].date),f=u?n[Vn.caption_after_enter]:n[Vn.caption_before_enter],g=u?n[Vn.weeks_after_enter]:n[Vn.weeks_before_enter],p=o.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Cg(v).forEach(x=>{if(!(x instanceof HTMLElement))return;const y=w6(x);y&&x.contains(y)&&x.removeChild(y);const B=Bg(x);B&&B.classList.remove(f);const E=Eg(x);E&&E.classList.remove(g)}),o.current=v):o.current=null,l.current||d||A)return;const w=p instanceof HTMLElement?Cg(p):[],b=Cg(e.current);if(b?.every(C=>C instanceof HTMLElement)&&w&&w.every(C=>C instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const C=b6(e.current);C&&(C.style.zIndex="1"),b.forEach((x,y)=>{const B=w[y];if(!B)return;x.style.position="relative",x.style.overflow="hidden";const E=Bg(x);E&&E.classList.add(f);const D=Eg(x);D&&D.classList.add(g);const I=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),E&&E.classList.remove(f),D&&D.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(B)&&x.removeChild(B)};B.style.pointerEvents="none",B.style.position="absolute",B.style.overflow="hidden",B.setAttribute("aria-hidden","true");const T=x6(B);T&&(T.style.opacity="0");const Q=Bg(B);Q&&(Q.classList.add(u?n[Vn.caption_before_exit]:n[Vn.caption_after_exit]),Q.addEventListener("animationend",I));const F=Eg(B);F&&F.classList.add(u?n[Vn.weeks_before_exit]:n[Vn.weeks_after_exit]),x.insertBefore(B,x.firstChild)})}})}function C6(e,t,n,r){const A=e[0],i=e[e.length-1],{ISOWeek:o,fixedWeeks:a,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:f,endOfISOWeek:g,endOfMonth:p,endOfWeek:v,isAfter:w,startOfBroadcastWeek:b,startOfISOWeek:C,startOfWeek:x}=r,y=l?b(A,r):o?C(A):x(A),B=l?f(i):o?g(p(i)):v(p(i)),E=t&&(l?f(t):o?g(t):v(t)),D=E&&w(B,E)?E:B,I=d(D,y),T=u(i,A)+1,Q=[];for(let z=0;z<=I;z++){const k=c(y,z);Q.push(k)}const U=(l?35:42)*T;if(a&&Q.length<U){const z=U-Q.length;for(let k=0;k<z;k++){const W=c(Q[Q.length-1],1);Q.push(W)}}return Q}function B6(e){const t=[];return e.reduce((n,r)=>{const A=r.weeks.reduce((i,o)=>i.concat(o.days.slice()),t.slice());return n.concat(A.slice())},t.slice())}function E6(e,t,n,r){const{numberOfMonths:A=1}=n,i=[];for(let o=0;o<A;o++){const a=r.addMonths(e,o);if(t&&a>t)break;i.push(a)}return i}function Ey(e,t,n,r){const{month:A,defaultMonth:i,today:o=r.today(),numberOfMonths:a=1}=e;let l=A||i||o;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=r;if(n&&c(n,l)<a-1){const f=-1*(a-1);l=d(n,f)}return t&&c(l,t)<0&&(l=t),u(l)}function D6(e,t,n,r){const{addDays:A,endOfBroadcastWeek:i,endOfISOWeek:o,endOfMonth:a,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:f,startOfWeek:g}=r,p=e.reduce((v,w)=>{const b=n.broadcastCalendar?u(w,r):n.ISOWeek?f(w):g(w),C=n.broadcastCalendar?i(w):n.ISOWeek?o(a(w)):l(a(w)),x=t.filter(D=>D>=b&&D<=C),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<y){const D=t.filter(I=>{const T=y-x.length;return I>C&&I<=A(C,T)});x.push(...D)}const B=x.reduce((D,I)=>{const T=n.ISOWeek?c(I):d(I),Q=D.find(U=>U.weekNumber===T),F=new t1(I,w,r);return Q?Q.days.push(F):D.push(new x9(T,[F])),D},[]),E=new b9(w,B);return v.push(E),v},[]);return n.reverseMonths?p.reverse():p}function S6(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:A,startOfDay:i,startOfMonth:o,endOfMonth:a,addYears:l,endOfYear:c,newDate:d,today:u}=t,{fromYear:f,toYear:g,fromMonth:p,toMonth:v}=e;!n&&p&&(n=p),!n&&f&&(n=t.newDate(f,0,1)),!r&&v&&(r=v),!r&&g&&(r=d(g,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=o(n):f?n=d(f,0,1):!n&&w&&(n=A(l(e.today??u(),-100))),r?r=a(r):g?r=d(g,11,31):!r&&w&&(r=c(e.today??u())),[n&&i(n),r&&i(r)]}function I6(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:A,numberOfMonths:i=1}=n,{startOfMonth:o,addMonths:a,differenceInCalendarMonths:l}=r,c=A?i:1,d=o(e);if(!t)return a(d,c);if(!(l(t,e)<i))return a(d,c)}function T6(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:A,numberOfMonths:i}=n,{startOfMonth:o,addMonths:a,differenceInCalendarMonths:l}=r,c=A?i??1:1,d=o(e);if(!t)return a(d,-c);if(!(l(d,t)<=0))return a(d,-c)}function O6(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function du(e,t){const[n,r]=h.useState(e);return[t===void 0?n:t,r]}function Q6(e,t){const[n,r]=S6(e,t),{startOfMonth:A,endOfMonth:i}=t,o=Ey(e,n,r,t),[a,l]=du(o,e.month?o:void 0);h.useEffect(()=>{const y=Ey(e,n,r,t);l(y)},[e.timeZone]);const{months:c,weeks:d,days:u,previousMonth:f,nextMonth:g}=h.useMemo(()=>{const y=E6(a,r,{numberOfMonths:e.numberOfMonths},t),B=C6(y,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),E=D6(y,B,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=O6(E),I=B6(E),T=T6(a,n,e,t),Q=I6(a,r,e,t);return{months:E,weeks:D,days:I,previousMonth:T,nextMonth:Q}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:p,onMonthChange:v}=e,w=y=>d.some(B=>B.days.some(E=>E.isEqualTo(y))),b=y=>{if(p)return;let B=A(y);n&&B<A(n)&&(B=A(n)),r&&B>A(r)&&(B=A(r)),l(B),v?.(B)};return{months:c,weeks:d,days:u,navStart:n,navEnd:r,previousMonth:f,nextMonth:g,goToMonth:b,goToDay:y=>{w(y)||b(y.date)}}}var Kr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Kr||(Kr={}));function Dy(e){return!e[Dt.disabled]&&!e[Dt.hidden]&&!e[Dt.outside]}function R6(e,t,n,r){let A,i=-1;for(const o of e){const a=t(o);Dy(a)&&(a[Dt.focused]&&i<Kr.FocusedModifier?(A=o,i=Kr.FocusedModifier):r?.isEqualTo(o)&&i<Kr.LastFocused?(A=o,i=Kr.LastFocused):n(o.date)&&i<Kr.Selected?(A=o,i=Kr.Selected):a[Dt.today]&&i<Kr.Today&&(A=o,i=Kr.Today))}return A||(A=e.find(o=>Dy(t(o)))),A}function j6(e,t,n,r,A,i,o){const{ISOWeek:a,broadcastCalendar:l}=i,{addDays:c,addMonths:d,addWeeks:u,addYears:f,endOfBroadcastWeek:g,endOfISOWeek:p,endOfWeek:v,max:w,min:b,startOfBroadcastWeek:C,startOfISOWeek:x,startOfWeek:y}=o;let E={day:c,week:u,month:d,year:f,startOfWeek:D=>l?C(D,o):a?x(D):y(D),endOfWeek:D=>l?g(D):a?p(D):v(D)}[e](n,t==="after"?1:-1);return t==="before"&&r?E=w([r,E]):t==="after"&&A&&(E=b([A,E])),E}function p1(e,t,n,r,A,i,o,a=0){if(a>365)return;const l=j6(e,t,n.date,r,A,i,o),c=!!(i.disabled&&mA(l,i.disabled,o)),d=!!(i.hidden&&mA(l,i.hidden,o)),u=l,f=new t1(l,u,o);return!c&&!d?f:p1(e,t,f,r,A,i,o,a+1)}function F6(e,t,n,r,A){const{autoFocus:i}=e,[o,a]=h.useState(),l=R6(t.days,n,r||(()=>!1),o),[c,d]=h.useState(i?l:void 0);return{isFocusTarget:v=>!!l?.isEqualTo(v),setFocused:d,focused:c,blur:()=>{a(c),d(void 0)},moveFocus:(v,w)=>{if(!c)return;const b=p1(v,w,c,t.navStart,t.navEnd,e,A);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),d(b)))}}}function L6(e,t){const{selected:n,required:r,onSelect:A}=e,[i,o]=du(n,A?n:void 0),a=A?n:i,{isSameDay:l}=t,c=g=>a?.some(p=>l(p,g))??!1,{min:d,max:u}=e;return{selected:a,select:(g,p,v)=>{let w=[...a??[]];if(c(g)){if(a?.length===d||r&&a?.length===1)return;w=a?.filter(b=>!l(b,g))}else a?.length===u?w=[g]:w=[...w,g];return A||o(w),A?.(w,g,p,v),w},isSelected:c}}function P6(e,t,n=0,r=0,A=!1,i=oA){const{from:o,to:a}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=i;let u;if(!o&&!a)u={from:e,to:n>0?void 0:e};else if(o&&!a)l(o,e)?n===0?u={from:o,to:e}:A?u={from:o,to:void 0}:u=void 0:d(e,o)?u={from:e,to:o}:u={from:o,to:e};else if(o&&a)if(l(o,e)&&l(a,e))A?u={from:o,to:a}:u=void 0;else if(l(o,e))u={from:o,to:n>0?void 0:e};else if(l(a,e))u={from:e,to:n>0?void 0:e};else if(d(e,o))u={from:e,to:a};else if(c(e,o))u={from:o,to:e};else if(c(e,a))u={from:o,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const f=i.differenceInCalendarDays(u.to,u.from);r>0&&f>r?u={from:e,to:void 0}:n>1&&f<n&&(u={from:e,to:void 0})}return u}function M6(e,t,n=oA){const r=Array.isArray(t)?t:[t];let A=e.from;const i=n.differenceInCalendarDays(e.to,e.from),o=Math.min(i,6);for(let a=0;a<=o;a++){if(r.includes(A.getDay()))return!0;A=n.addDays(A,1)}return!1}function Sy(e,t,n=oA){return pA(e,t.from,!1,n)||pA(e,t.to,!1,n)||pA(t,e.from,!1,n)||pA(t,e.to,!1,n)}function H6(e,t,n=oA){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?pA(e,a,!1,n):A1(a,n)?a.some(l=>pA(e,l,!1,n)):cu(a)?a.from&&a.to?Sy(e,{from:a.from,to:a.to},n):!1:r1(a)?M6(e,a.dayOfWeek,n):Bv(a)?n.isAfter(a.before,a.after)?Sy(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):mA(e.from,a,n)||mA(e.to,a,n):Ev(a)||Dv(a)?mA(e.from,a,n)||mA(e.to,a,n):!1))return!0;const o=r.filter(a=>typeof a=="function");if(o.length){let a=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(o.some(d=>d(a)))return!0;a=n.addDays(a,1)}}return!1}function k6(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:A,selected:i,required:o,onSelect:a}=e,[l,c]=du(i,a?i:void 0),d=a?i:l;return{selected:d,select:(g,p,v)=>{const{min:w,max:b}=e;let C;if(g){const x=d?.from,y=d?.to,B=!!x&&!!y,E=!!x&&!!y&&t.isSameDay(x,y)&&t.isSameDay(g,x);A&&(B||!d?.from)?!o&&E?C=void 0:C={from:g,to:void 0}:C=P6(g,d,w,b,o,t)}return r&&n&&C?.from&&C.to&&H6({from:C.from,to:C.to},n,t)&&(C.from=g,C.to=void 0),a||c(C),a?.(C,g,p,v),C},isSelected:g=>d&&pA(d,g,!1,t)}}function N6(e,t){const{selected:n,required:r,onSelect:A}=e,[i,o]=du(n,A?n:void 0),a=A?n:i,{isSameDay:l}=t;return{selected:a,select:(u,f,g)=>{let p=u;return!r&&a&&a&&l(u,a)&&(p=void 0),A||o(p),A?.(p,u,f,g),p},isSelected:u=>a?l(a,u):!1}}function U6(e,t){const n=N6(e,t),r=L6(e,t),A=k6(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return A;default:return}}function dr(e,t){return e instanceof an&&e.timeZone===t?e:new an(e,t)}function Ao(e,t,n){return dr(e,t)}function Iy(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Ao(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Ao(r,t):r):cu(e)?{...e,from:e.from?dr(e.from,t):e.from,to:e.to?dr(e.to,t):e.to}:Bv(e)?{before:Ao(e.before,t),after:Ao(e.after,t)}:Ev(e)?{after:Ao(e.after,t)}:Dv(e)?{before:Ao(e.before,t)}:e}function Dg(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Iy(r,t)):Iy(e,t))}function z6(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=dr(t.today,n)),t.month&&(t.month=dr(t.month,n)),t.defaultMonth&&(t.defaultMonth=dr(t.defaultMonth,n)),t.startMonth&&(t.startMonth=dr(t.startMonth,n)),t.endMonth&&(t.endMonth=dr(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=dr(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Qe=>dr(Qe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?dr(t.selected.from,n):t.selected.from,to:t.selected.to?dr(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Dg(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Dg(t.hidden,n)),t.modifiers)){const Qe={};Object.keys(t.modifiers).forEach(ze=>{Qe[ze]=Dg(t.modifiers?.[ze],n)}),t.modifiers=Qe}const{components:r,formatters:A,labels:i,dateLib:o,locale:a,classNames:l}=h.useMemo(()=>{const Qe={...Cv,...t.locale},ze=t.broadcastCalendar?1:t.weekStartsOn,we=t.noonSafe&&t.timeZone?v6(t.timeZone,{weekStartsOn:ze,locale:Qe}):void 0,Ge=t.dateLib&&we?{...we,...t.dateLib}:t.dateLib??we,ut=new kt({locale:Qe,weekStartsOn:ze,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ge);return{dateLib:ut,components:Z9(t.components),formatters:a6(t.formatters),labels:f6(t.labels,ut.options),locale:Qe,classNames:{...$9(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});const{captionLayout:c,mode:d,navLayout:u,numberOfMonths:f=1,onDayBlur:g,onDayClick:p,onDayFocus:v,onDayKeyDown:w,onDayMouseEnter:b,onDayMouseLeave:C,onNextClick:x,onPrevClick:y,showWeekNumber:B,styles:E}=t,{formatCaption:D,formatDay:I,formatMonthDropdown:T,formatWeekNumber:Q,formatWeekNumberHeader:F,formatWeekdayName:U,formatYearDropdown:z}=A,k=Q6(t,o),{days:W,months:Z,navStart:J,navEnd:Y,previousMonth:Ae,nextMonth:L,goToMonth:S}=k,M=J9(W,t,J,Y,o),{isSelected:V,select:N,selected:j}=U6(t,o)??{},{blur:G,focused:X,isFocusTarget:O,moveFocus:oe,setFocused:se}=F6(t,k,M,V??(()=>!1),o),{labelDayButton:He,labelGridcell:re,labelGrid:te,labelMonthDropdown:xe,labelNav:Oe,labelPrevious:Te,labelNext:Re,labelWeekday:lt,labelWeekNumber:le,labelWeekNumberHeader:Pe,labelYearDropdown:fe}=i,Ct=h.useMemo(()=>p6(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),xr=d!==void 0||p!==void 0,En=h.useCallback(()=>{Ae&&(S(Ae),y?.(Ae))},[Ae,S,y]),Dn=h.useCallback(()=>{L&&(S(L),x?.(L))},[S,L,x]),Sn=h.useCallback((Qe,ze)=>we=>{we.preventDefault(),we.stopPropagation(),se(Qe),!ze.disabled&&(N?.(Qe.date,ze,we),p?.(Qe.date,ze,we))},[N,p,se]),Gt=h.useCallback((Qe,ze)=>we=>{se(Qe),v?.(Qe.date,ze,we)},[v,se]),In=h.useCallback((Qe,ze)=>we=>{G(),g?.(Qe.date,ze,we)},[G,g]),zr=h.useCallback((Qe,ze)=>we=>{const Ge={ArrowLeft:[we.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[we.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[we.shiftKey?"year":"week","after"],ArrowUp:[we.shiftKey?"year":"week","before"],PageUp:[we.shiftKey?"year":"month","before"],PageDown:[we.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ge[we.key]){we.preventDefault(),we.stopPropagation();const[ut,Ne]=Ge[we.key];oe(ut,Ne)}w?.(Qe.date,ze,we)},[oe,w,t.dir]),rr=h.useCallback((Qe,ze)=>we=>{b?.(Qe.date,ze,we)},[b]),Ar=h.useCallback((Qe,ze)=>we=>{C?.(Qe.date,ze,we)},[C]),aA=h.useCallback(Qe=>ze=>{const we=Number(ze.target.value),Ge=o.setMonth(o.startOfMonth(Qe),we);S(Ge)},[o,S]),ir=h.useCallback(Qe=>ze=>{const we=Number(ze.target.value),Ge=o.setYear(o.startOfMonth(Qe),we);S(Ge)},[o,S]),{className:Tn,style:rt}=h.useMemo(()=>({className:[l[ye.Root],t.className].filter(Boolean).join(" "),style:{...E?.[ye.Root],...t.style}}),[l,t.className,t.style,E]),Bt=_9(t),or=h.useRef(null);y6(or,!!t.animate,{classNames:l,months:Z,focused:X,dateLib:o});const yr={dayPickerProps:t,selected:j,select:N,isSelected:V,months:Z,nextMonth:L,previousMonth:Ae,goToMonth:S,getModifiers:M,components:r,classNames:l,styles:E,labels:i,formatters:A};return h.createElement(n1.Provider,{value:yr},h.createElement(r.Root,{rootRef:t.animate?or:void 0,className:Tn,style:rt,dir:t.dir,id:t.id,lang:t.lang??a.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Bt},h.createElement(r.Months,{className:l[ye.Months],style:E?.[ye.Months]},!t.hideNavigation&&!u&&h.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ye.Nav],style:E?.[ye.Nav],"aria-label":Oe(),onPreviousClick:En,onNextClick:Dn,previousMonth:Ae,nextMonth:L}),Z.map((Qe,ze)=>h.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ye.Month],style:E?.[ye.Month],key:ze,displayIndex:ze,calendarMonth:Qe},u==="around"&&!t.hideNavigation&&ze===0&&h.createElement(r.PreviousMonthButton,{type:"button",className:l[ye.PreviousMonthButton],tabIndex:Ae?void 0:-1,"aria-disabled":Ae?void 0:!0,"aria-label":Te(Ae),onClick:En,"data-animated-button":t.animate?"true":void 0},h.createElement(r.Chevron,{disabled:Ae?void 0:!0,className:l[ye.Chevron],orientation:t.dir==="rtl"?"right":"left"})),h.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ye.MonthCaption],style:E?.[ye.MonthCaption],calendarMonth:Qe,displayIndex:ze},c?.startsWith("dropdown")?h.createElement(r.DropdownNav,{className:l[ye.Dropdowns],style:E?.[ye.Dropdowns]},(()=>{const we=c==="dropdown"||c==="dropdown-months"?h.createElement(r.MonthsDropdown,{key:"month",className:l[ye.MonthsDropdown],"aria-label":xe(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:aA(Qe.date),options:g6(Qe.date,J,Y,A,o),style:E?.[ye.Dropdown],value:o.getMonth(Qe.date)}):h.createElement("span",{key:"month"},T(Qe.date,o)),Ge=c==="dropdown"||c==="dropdown-years"?h.createElement(r.YearsDropdown,{key:"year",className:l[ye.YearsDropdown],"aria-label":fe(o.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:ir(Qe.date),options:m6(J,Y,A,o,!!t.reverseYears),style:E?.[ye.Dropdown],value:o.getYear(Qe.date)}):h.createElement("span",{key:"year"},z(Qe.date,o));return o.getMonthYearOrder()==="year-first"?[Ge,we]:[we,Ge]})(),h.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(Qe.date,o.options,o))):h.createElement(r.CaptionLabel,{className:l[ye.CaptionLabel],role:"status","aria-live":"polite"},D(Qe.date,o.options,o))),u==="around"&&!t.hideNavigation&&ze===f-1&&h.createElement(r.NextMonthButton,{type:"button",className:l[ye.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":Re(L),onClick:Dn,"data-animated-button":t.animate?"true":void 0},h.createElement(r.Chevron,{disabled:L?void 0:!0,className:l[ye.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ze===f-1&&u==="after"&&!t.hideNavigation&&h.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ye.Nav],style:E?.[ye.Nav],"aria-label":Oe(),onPreviousClick:En,onNextClick:Dn,previousMonth:Ae,nextMonth:L}),h.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":te(Qe.date,o.options,o)||void 0,className:l[ye.MonthGrid],style:E?.[ye.MonthGrid]},!t.hideWeekdays&&h.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ye.Weekdays],style:E?.[ye.Weekdays]},B&&h.createElement(r.WeekNumberHeader,{"aria-label":Pe(o.options),className:l[ye.WeekNumberHeader],style:E?.[ye.WeekNumberHeader],scope:"col"},F()),Ct.map(we=>h.createElement(r.Weekday,{"aria-label":lt(we,o.options,o),className:l[ye.Weekday],key:String(we),style:E?.[ye.Weekday],scope:"col"},U(we,o.options,o)))),h.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ye.Weeks],style:E?.[ye.Weeks]},Qe.weeks.map(we=>h.createElement(r.Week,{className:l[ye.Week],key:we.weekNumber,style:E?.[ye.Week],week:we},B&&h.createElement(r.WeekNumber,{week:we,style:E?.[ye.WeekNumber],"aria-label":le(we.weekNumber,{locale:a}),className:l[ye.WeekNumber],scope:"row",role:"rowheader"},Q(we.weekNumber,o)),we.days.map(Ge=>{const{date:ut}=Ge,Ne=M(Ge);if(Ne[Dt.focused]=!Ne.hidden&&!!X?.isEqualTo(Ge),Ne[Or.selected]=V?.(ut)||Ne.selected,cu(j)){const{from:Ce,to:We}=j;Ne[Or.range_start]=!!(Ce&&We&&o.isSameDay(ut,Ce)),Ne[Or.range_end]=!!(Ce&&We&&o.isSameDay(ut,We)),Ne[Or.range_middle]=pA(j,ut,!0,o)}const IA=h6(Ne,E,t.modifiersStyles),Ue=Y9(Ne,l,t.modifiersClassNames),mt=!xr&&!Ne.hidden?re(ut,Ne,o.options,o):void 0;return h.createElement(r.Day,{key:`${Ge.isoDate}_${Ge.displayMonthId}`,day:Ge,modifiers:Ne,className:Ue.join(" "),style:IA,role:"gridcell","aria-selected":Ne.selected||void 0,"aria-label":mt,"data-day":Ge.isoDate,"data-month":Ge.outside?Ge.dateMonthId:void 0,"data-selected":Ne.selected||void 0,"data-disabled":Ne.disabled||void 0,"data-hidden":Ne.hidden||void 0,"data-outside":Ge.outside||void 0,"data-focused":Ne.focused||void 0,"data-today":Ne.today||void 0},!Ne.hidden&&xr?h.createElement(r.DayButton,{className:l[ye.DayButton],style:E?.[ye.DayButton],type:"button",day:Ge,modifiers:Ne,disabled:!Ne.focused&&Ne.disabled||void 0,"aria-disabled":Ne.focused&&Ne.disabled||void 0,tabIndex:O(Ge)?0:-1,"aria-label":He(ut,Ne,o.options,o),onClick:Sn(Ge,Ne),onBlur:In(Ge,Ne),onFocus:Gt(Ge,Ne),onKeyDown:zr(Ge,Ne),onMouseEnter:rr(Ge,Ne),onMouseLeave:Ar(Ge,Ne)},I(ut,o.options,o)):!Ne.hidden&&I(Ge.date,o.options,o))})))))))),t.footer&&h.createElement(r.Footer,{className:l[ye.Footer],style:E?.[ye.Footer],role:"status","aria-live":"polite"},t.footer)))}function W6(e){let t=!1;return{promise:new Promise((r,A)=>{e.then(i=>t?A({isCanceled:t}):r(i)).catch(i=>A(t?{isCanceled:t}:i))}),cancel(){t=!0}}}function m1(){const e=h.useRef([]);h.useEffect(()=>function(){e.current.forEach(r=>r.cancel()),e.current=[]},[]);function t(n){const r=W6(n);return e.current.push(r),r.promise}return[t]}function v1(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gp(e,t){if(v1(e)&&typeof window.scrollTo=="function"){window.scrollTo(0,t);return}e instanceof HTMLElement&&(e.scrollTop=t)}function X6(e){let t=getComputedStyle(e);const n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(let A=e;A=A.parentElement;)if(t=getComputedStyle(A),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return A;return document.documentElement}function w1(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),A=t.offsetHeight/3;r.bottom+A>n.bottom?Gp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+A,e.scrollHeight)):r.top-A<n.top&&Gp(e,Math.max(t.offsetTop-A,0))}const G6=Object.freeze(Object.defineProperty({__proto__:null,getScrollParent:X6,isDocumentElement:v1,scrollIntoView:w1,scrollTo:Gp},Symbol.toStringTag,{value:"Module"})),$n=1e3,V6="24px",K6="16px",sd="1376px",ua={open:{width:"296px",padding:"32px",iconSize:40},close:{width:"64px",padding:"16px",iconSize:30}};function Ys(e){return ua[e?"open":"close"]}const q6=m.div`
|
|
1683
|
+
`,z5=({as:e,onClickAway:t,mouseEvent:n,touchEvent:r,...A})=>{const i=h.useRef(null);return h.useEffect(()=>{const o=a=>{i.current===null||i.current.contains(a.target)||t(a)};return document.addEventListener(n??"click",o),document.addEventListener(r??"touchend",o),()=>{document.removeEventListener(n??"click",o),document.removeEventListener(r??"touchend",o)}},[n,t,r]),h.createElement(e??"div",{ref:i,...A})},vv=({trigger:e,dropdown:t,align:n,onToggle:r,withBorder:A,borderColor:i,background:o,overflow:a="auto",width:l,offset:c,display:d})=>{const[u,f]=h.useState(!1),g=h.useCallback(()=>{f(C=>!C)},[]),p=h.useCallback(()=>{f(!1)},[]);h.useEffect(()=>{r?.(u)},[u,r]),h.useEffect(()=>{const C=x=>{x.key==="Escape"&&f(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[]);const v=h.useMemo(()=>Mn(),[]),w=h.useMemo(()=>`trigger-${v}`,[v]),b=h.useMemo(()=>`dropdown-${v}`,[v]);return s.jsx(z5,{onClickAway:p,children:s.jsxs(k5,{$display:d??"inline",children:[typeof e=="function"?e({role:"button","aria-expanded":u,"aria-controls":b,id:w,onClick:g}):s.jsx(N5,{role:"button","aria-expanded":u,"aria-controls":b,id:w,onClick:g,children:e}),u&&s.jsx(U5,{$offset:c,$width:l,$background:o,$overflow:a??"auto",$borderColor:i,role:"region",id:b,$withBorder:A,$align:n,"aria-labelledby":w,children:t(p)})]})})};function W5(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const X5={},Ns={};function yi(e,t){try{const r=(X5[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Ns?Ns[r]:py(r,r.split(":"))}catch{if(e in Ns)return Ns[e];const n=e?.match(G5);return n?py(e,n.slice(1)):NaN}}const G5=/([+-]\d\d):?(\d\d)?/;function py(e,t){const n=+(t[0]||0),r=+(t[1]||0),A=+(t[2]||0)/60;return Ns[e]=n*60+r>0?n*60+r+A:n*60-r-A}class $r extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(yi(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),US(this),Xp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new $r(...n,t):new $r(Date.now(),t)}withTimeZone(t){return new $r(+this,t)}getTimezoneOffset(){const t=-yi(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Xp(this),+this}[Symbol.for("constructDateFrom")](t){return new $r(+new Date(t),this.timeZone)}}const my=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!my.test(e))return;const t=e.replace(my,"$1UTC");$r.prototype[t]&&(e.startsWith("get")?$r.prototype[e]=function(){return this.internal[t]()}:($r.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),V5(this),+this},$r.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Xp(this),+this}))});function Xp(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-yi(e.timeZone,e)*60))}function V5(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),US(e)}function US(e){const t=yi(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const A=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),o=A-i,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const l=A-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const d=A>0?c.getSeconds():(c.getSeconds()-60)%60,u=Math.round(-(yi(e.timeZone,e)*60))%60;(u||d)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+d));const f=yi(e.timeZone,e),g=f>0?Math.floor(f):Math.ceil(f),v=-new Date(+e).getTimezoneOffset()-g,w=g!==n,b=v-l;if(w&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const C=yi(e.timeZone,e),x=C>0?Math.floor(C):Math.ceil(C),y=g-x;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class an extends $r{static tz(t,...n){return n.length?new an(...n,t):new an(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),A=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+A}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,A]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${A}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,A]=this.tzComponents();return`${t} GMT${n}${r}${A} (${W5(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),A=String(Math.abs(t)%60).padStart(2,"0");return[n,r,A]}withTimeZone(t){return new an(+this,t)}[Symbol.for("constructDateFrom")](t){return new an(+new Date(t),this.timeZone)}}const zS=6048e5,K5=864e5,vy=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vy in e?e[vy](t):e instanceof Date?new e.constructor(t):new Date(t)}function at(e,t){return Wt(t||e,e)}function WS(e,t,n){const r=at(e,n?.in);return isNaN(t)?Wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function XS(e,t,n){const r=at(e,n?.in);if(isNaN(t))return Wt(e,NaN);if(!t)return r;const A=r.getDate(),i=Wt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const o=i.getDate();return A>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),A),r)}let q5={};function Oa(){return q5}function Vo(e,t){const n=Oa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=at(e,t?.in),i=A.getDay(),o=(i<r?7:0)+i-r;return A.setDate(A.getDate()-o),A.setHours(0,0,0,0),A}function ca(e,t){return Vo(e,{...t,weekStartsOn:1})}function GS(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=Wt(n,0);A.setFullYear(r+1,0,4),A.setHours(0,0,0,0);const i=ca(A),o=Wt(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=ca(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function wy(e){const t=at(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function os(e,...t){const n=Wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function da(e,t){const n=at(e,t?.in);return n.setHours(0,0,0,0),n}function wv(e,t,n){const[r,A]=os(n?.in,e,t),i=da(r),o=da(A),a=+i-wy(i),l=+o-wy(o);return Math.round((a-l)/K5)}function J5(e,t){const n=GS(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ca(r)}function Y5(e,t,n){return WS(e,t*7,n)}function Z5(e,t,n){return XS(e,t*12,n)}function _5(e,t){let n,r=t?.in;return e.forEach(A=>{!r&&typeof A=="object"&&(r=Wt.bind(null,A));const i=at(A,r);(!n||n<i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function $5(e,t){let n,r=t?.in;return e.forEach(A=>{!r&&typeof A=="object"&&(r=Wt.bind(null,A));const i=at(A,r);(!n||n>i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function VS(e,t,n){const[r,A]=os(n?.in,e,t);return+da(r)==+da(A)}function KS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e8(e){return!(!KS(e)&&typeof e!="number"||isNaN(+at(e)))}function qS(e,t,n){const[r,A]=os(n?.in,e,t),i=r.getFullYear()-A.getFullYear(),o=r.getMonth()-A.getMonth();return i*12+o}function t8(e,t){const n=at(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function JS(e,t){const[n,r]=os(e,t.start,t.end);return{start:n,end:r}}function n8(e,t){const{start:n,end:r}=JS(t?.in,e);let A=+n>+r;const i=A?+n:+r,o=A?r:n;o.setHours(0,0,0,0),o.setDate(1);let a=1;const l=[];for(;+o<=i;)l.push(Wt(n,o)),o.setMonth(o.getMonth()+a);return A?l.reverse():l}function r8(e,t){const n=at(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function A8(e,t){const n=at(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function YS(e,t){const n=at(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function i8(e,t){const{start:n,end:r}=JS(t?.in,e);let A=+n>+r;const i=A?+n:+r,o=A?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let a=1;const l=[];for(;+o<=i;)l.push(Wt(n,o)),o.setFullYear(o.getFullYear()+a);return A?l.reverse():l}function ZS(e,t){const n=Oa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=at(e,t?.in),i=A.getDay(),o=(i<r?-7:0)+6-(i-r);return A.setDate(A.getDate()+o),A.setHours(23,59,59,999),A}function o8(e,t){return ZS(e,{...t,weekStartsOn:1})}const s8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a8=(e,t,n)=>{let r;const A=s8[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bA(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const l8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},d8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u8={date:bA({formats:l8,defaultWidth:"full"}),time:bA({formats:c8,defaultWidth:"full"}),dateTime:bA({formats:d8,defaultWidth:"full"})},f8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},g8=(e,t,n,r)=>f8[e];function hn(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let A;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):o;A=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;A=e.values[a]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return A[i]}}const h8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},p8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},m8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},v8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},w8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},b8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},x8=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},y8={ordinalNumber:x8,era:hn({values:h8,defaultWidth:"wide"}),quarter:hn({values:p8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hn({values:m8,defaultWidth:"wide"}),day:hn({values:v8,defaultWidth:"wide"}),dayPeriod:hn({values:w8,defaultWidth:"wide",formattingValues:b8,defaultFormattingWidth:"wide"})};function pn(e){return(t,n={})=>{const r=n.width,A=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(A);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?B8(a,u=>u.test(o)):C8(a,u=>u.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(o.length);return{value:c,rest:d}}}function C8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function B8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function bv(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const A=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(A.length);return{value:o,rest:a}}}const E8=/^(\d+)(th|st|nd|rd)?/i,D8=/\d+/i,S8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},I8={any:[/^b/i,/^(a|c)/i]},T8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},O8={any:[/1/i,/2/i,/3/i,/4/i]},Q8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},R8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},j8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},L8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},P8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},M8={ordinalNumber:bv({matchPattern:E8,parsePattern:D8,valueCallback:e=>parseInt(e,10)}),era:pn({matchPatterns:S8,defaultMatchWidth:"wide",parsePatterns:I8,defaultParseWidth:"any"}),quarter:pn({matchPatterns:T8,defaultMatchWidth:"wide",parsePatterns:O8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:Q8,defaultMatchWidth:"wide",parsePatterns:R8,defaultParseWidth:"any"}),day:pn({matchPatterns:j8,defaultMatchWidth:"wide",parsePatterns:F8,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:L8,defaultMatchWidth:"any",parsePatterns:P8,defaultParseWidth:"any"})},mo={code:"en-US",formatDistance:a8,formatLong:u8,formatRelative:g8,localize:y8,match:M8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function H8(e,t){const n=at(e,t?.in);return wv(n,YS(n))+1}function xv(e,t){const n=at(e,t?.in),r=+ca(n)-+J5(n);return Math.round(r/zS)+1}function _S(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=Oa(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??A.firstWeekContainsDate??A.locale?.options?.firstWeekContainsDate??1,o=Wt(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=Vo(o,t),l=Wt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Vo(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function k8(e,t){const n=Oa(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,A=_S(e,t),i=Wt(t?.in||e,0);return i.setFullYear(A,0,r),i.setHours(0,0,0,0),Vo(i,t)}function yv(e,t){const n=at(e,t?.in),r=+Vo(n,t)-+k8(n,t);return Math.round(r/zS)+1}function At(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const TA={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return At(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):At(n+1,2)},d(e,t){return At(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return At(e.getHours()%12||12,t.length)},H(e,t){return At(e.getHours(),t.length)},m(e,t){return At(e.getMinutes(),t.length)},s(e,t){return At(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),A=Math.trunc(r*Math.pow(10,n-3));return At(A,t.length)}},ro={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),A=r>0?r:1-r;return n.ordinalNumber(A,{unit:"year"})}return TA.y(e,t)},Y:function(e,t,n,r){const A=_S(e,r),i=A>0?A:1-A;if(t==="YY"){const o=i%100;return At(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):At(i,t.length)},R:function(e,t){const n=GS(e);return At(n,t.length)},u:function(e,t){const n=e.getFullYear();return At(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return At(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return At(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return TA.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return At(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const A=yv(e,r);return t==="wo"?n.ordinalNumber(A,{unit:"week"}):At(A,t.length)},I:function(e,t,n){const r=xv(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):At(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):TA.d(e,t)},D:function(e,t,n){const r=H8(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):At(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const A=e.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return At(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(A,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(A,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(A,{width:"short",context:"formatting"});default:return n.day(A,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const A=e.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return At(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(A,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(A,{width:"narrow",context:"standalone"});case"cccccc":return n.day(A,{width:"short",context:"standalone"});default:return n.day(A,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),A=r===0?7:r;switch(t){case"i":return String(A);case"ii":return At(A,t.length);case"io":return n.ordinalNumber(A,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const A=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let A;switch(r===12?A=ro.noon:r===0?A=ro.midnight:A=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let A;switch(r>=17?A=ro.evening:r>=12?A=ro.afternoon:r>=4?A=ro.morning:A=ro.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return TA.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):TA.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):TA.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):TA.s(e,t)},S:function(e,t){return TA.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yy(r);case"XXXX":case"XX":return gi(r);default:return gi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return yy(r);case"xxxx":case"xx":return gi(r);default:return gi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xy(r,":");default:return"GMT"+gi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xy(r,":");default:return"GMT"+gi(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return At(r,t.length)},T:function(e,t,n){return At(+e,t.length)}};function xy(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),A=Math.trunc(r/60),i=r%60;return i===0?n+String(A):n+String(A)+t+At(i,2)}function yy(e,t){return e%60===0?(e>0?"-":"+")+At(Math.abs(e)/60,2):gi(e,t)}function gi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),A=At(Math.trunc(r/60),2),i=At(r%60,2);return n+A+t+i}const Cy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},$S=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},N8=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],A=n[2];if(!A)return Cy(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Cy(r,t)).replace("{{time}}",$S(A,t))},U8={p:$S,P:N8},z8=/^D+$/,W8=/^Y+$/,X8=["D","DD","YY","YYYY"];function G8(e){return z8.test(e)}function V8(e){return W8.test(e)}function K8(e,t,n){const r=q8(e,t,n);if(console.warn(r),X8.includes(e))throw new RangeError(r)}function q8(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const J8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Z8=/^'([^]*?)'?$/,_8=/''/g,$8=/[a-zA-Z]/;function Ci(e,t,n){const r=Oa(),A=n?.locale??r.locale??mo,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=at(e,n?.in);if(!e8(a))throw new RangeError("Invalid time value");let l=t.match(Y8).map(d=>{const u=d[0];if(u==="p"||u==="P"){const f=U8[u];return f(d,A.formatLong)}return d}).join("").match(J8).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const u=d[0];if(u==="'")return{isToken:!1,value:e7(d)};if(by[u])return{isToken:!0,value:d};if(u.match($8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:d}});A.localize.preprocessor&&(l=A.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:A};return l.map(d=>{if(!d.isToken)return d.value;const u=d.value;(!n?.useAdditionalWeekYearTokens&&V8(u)||!n?.useAdditionalDayOfYearTokens&&G8(u))&&K8(u,t,String(e));const f=by[u[0]];return f(a,u,A.localize,c)}).join("")}function e7(e){const t=e.match(Z8);return t?t[1].replace(_8,"'"):e}function t7(e,t){const n=at(e,t?.in),r=n.getFullYear(),A=n.getMonth(),i=Wt(n,0);return i.setFullYear(r,A+1,0),i.setHours(0,0,0,0),i.getDate()}function n7(e,t){return at(e,t?.in).getMonth()}function r7(e,t){return at(e,t?.in).getFullYear()}function A7(e,t){return+at(e)>+at(t)}function i7(e,t){return+at(e)<+at(t)}function o7(e,t,n){const[r,A]=os(n?.in,e,t);return r.getFullYear()===A.getFullYear()&&r.getMonth()===A.getMonth()}function s7(e,t,n){const[r,A]=os(n?.in,e,t);return r.getFullYear()===A.getFullYear()}function a7(e,t,n){const r=at(e,n?.in),A=r.getFullYear(),i=r.getDate(),o=Wt(e,0);o.setFullYear(A,t,15),o.setHours(0,0,0,0);const a=t7(o);return r.setMonth(t,Math.min(i,a)),r}function l7(e,t,n){const r=at(e,n?.in);return isNaN(+r)?Wt(e,NaN):(r.setFullYear(t),r)}const By=5,c7=4;function d7(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,A=t.addDays(e,-r+1),i=t.addDays(A,By*7-1);return t.getMonth(e)===t.getMonth(i)?By:c7}function e1(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function u7(e,t){const n=e1(e,t),r=d7(e,t);return t.addDays(n,r*7-1)}const f7={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},g7=(e,t,n)=>{let r;const A=f7[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},h7={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},p7={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},m7={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},v7={date:bA({formats:h7,defaultWidth:"full"}),time:bA({formats:p7,defaultWidth:"full"}),dateTime:bA({formats:m7,defaultWidth:"full"})},w7={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},b7={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},x7=(e,t,n,r)=>t.getHours()!==1?b7[e]:w7[e],y7={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},C7={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},B7={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},E7={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},D7={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},S7={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},I7=(e,t)=>Number(e)+"º",T7={ordinalNumber:I7,era:hn({values:y7,defaultWidth:"wide"}),quarter:hn({values:C7,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:hn({values:B7,defaultWidth:"wide"}),day:hn({values:E7,defaultWidth:"wide"}),dayPeriod:hn({values:D7,defaultWidth:"wide",formattingValues:S7,defaultFormattingWidth:"wide"})},O7=/^(\d+)(º)?/i,Q7=/\d+/i,R7={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},j7={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},F7={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},L7={any:[/1/i,/2/i,/3/i,/4/i]},P7={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},M7={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},H7={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},k7={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},N7={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},U7={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},z7={ordinalNumber:bv({matchPattern:O7,parsePattern:Q7,valueCallback:function(e){return parseInt(e,10)}}),era:pn({matchPatterns:R7,defaultMatchWidth:"wide",parsePatterns:j7,defaultParseWidth:"any"}),quarter:pn({matchPatterns:F7,defaultMatchWidth:"wide",parsePatterns:L7,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:P7,defaultMatchWidth:"wide",parsePatterns:M7,defaultParseWidth:"any"}),day:pn({matchPatterns:H7,defaultMatchWidth:"wide",parsePatterns:k7,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:N7,defaultMatchWidth:"any",parsePatterns:U7,defaultParseWidth:"any"})},W7={code:"es",formatDistance:g7,formatLong:v7,formatRelative:x7,localize:T7,match:z7,options:{weekStartsOn:1,firstWeekContainsDate:1}},X7={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},G7=(e,t,n)=>{let r;const A=X7[e];return typeof A=="string"?r=A:t===1?r=A.one:r=A.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},V7={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},K7={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},q7={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},J7={date:bA({formats:V7,defaultWidth:"full"}),time:bA({formats:K7,defaultWidth:"full"}),dateTime:bA({formats:q7,defaultWidth:"full"})},Y7={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Z7=(e,t,n,r)=>Y7[e],_7={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},$7={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},e9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},t9={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},n9={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},r9=(e,t)=>{const n=Number(e),r=t?.unit;if(n===0)return"0";const A=["year","week","hour","minute","second"];let i;return n===1?i=r&&A.includes(r)?"ère":"er":i="ème",n+i},A9=["MMM","MMMM"],i9={preprocessor:(e,t)=>e.getDate()===1||!t.some(r=>r.isToken&&A9.includes(r.value))?t:t.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:r9,era:hn({values:_7,defaultWidth:"wide"}),quarter:hn({values:$7,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hn({values:e9,defaultWidth:"wide"}),day:hn({values:t9,defaultWidth:"wide"}),dayPeriod:hn({values:n9,defaultWidth:"wide"})},o9=/^(\d+)(ième|ère|ème|er|e)?/i,s9=/\d+/i,a9={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},l9={any:[/^av/i,/^ap/i]},c9={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},d9={any:[/1/i,/2/i,/3/i,/4/i]},u9={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},f9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},g9={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},h9={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},p9={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},m9={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},v9={ordinalNumber:bv({matchPattern:o9,parsePattern:s9,valueCallback:e=>parseInt(e)}),era:pn({matchPatterns:a9,defaultMatchWidth:"wide",parsePatterns:l9,defaultParseWidth:"any"}),quarter:pn({matchPatterns:c9,defaultMatchWidth:"wide",parsePatterns:d9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pn({matchPatterns:u9,defaultMatchWidth:"wide",parsePatterns:f9,defaultParseWidth:"any"}),day:pn({matchPatterns:g9,defaultMatchWidth:"wide",parsePatterns:h9,defaultParseWidth:"any"}),dayPeriod:pn({matchPatterns:p9,defaultMatchWidth:"any",parsePatterns:m9,defaultParseWidth:"any"})},w9={code:"fr",formatDistance:G7,formatLong:J7,formatRelative:Z7,localize:i9,match:v9,options:{weekStartsOn:1,firstWeekContainsDate:4}},Cv={...mo,labels:{labelDayButton:(e,t,n,r)=>{let A;r&&typeof r.format=="function"?A=r.format.bind(r):A=(o,a)=>Ci(o,a,{locale:mo,...n});let i=A(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(A,i)=>Ci(A,i,{locale:mo,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let A;r&&typeof r.format=="function"?A=r.format.bind(r):A=(o,a)=>Ci(o,a,{locale:mo,...n});let i=A(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(A,i)=>Ci(A,i,{locale:mo,...t}),r(e,"cccc")}}};class kt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?an.tz(this.options.timeZone):new this.Date,this.newDate=(r,A,i)=>this.overrides?.newDate?this.overrides.newDate(r,A,i):this.options.timeZone?new an(r,A,i,this.options.timeZone):new Date(r,A,i),this.addDays=(r,A)=>this.overrides?.addDays?this.overrides.addDays(r,A):WS(r,A),this.addMonths=(r,A)=>this.overrides?.addMonths?this.overrides.addMonths(r,A):XS(r,A),this.addWeeks=(r,A)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,A):Y5(r,A),this.addYears=(r,A)=>this.overrides?.addYears?this.overrides.addYears(r,A):Z5(r,A),this.differenceInCalendarDays=(r,A)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,A):wv(r,A),this.differenceInCalendarMonths=(r,A)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,A):qS(r,A),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):n8(r),this.eachYearOfInterval=r=>{const A=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):i8(r),i=new Set(A.map(a=>this.getYear(a)));if(i.size===A.length)return A;const o=[];return i.forEach(a=>{o.push(new Date(a,0,1))}),o},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):u7(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):o8(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):t8(r),this.endOfWeek=(r,A)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,A):ZS(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):A8(r),this.format=(r,A,i)=>{const o=this.overrides?.format?this.overrides.format(r,A,this.options):Ci(r,A,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(o):o},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):xv(r),this.getMonth=(r,A)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):n7(r,this.options),this.getYear=(r,A)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):r7(r,this.options),this.getWeek=(r,A)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):yv(r,this.options),this.isAfter=(r,A)=>this.overrides?.isAfter?this.overrides.isAfter(r,A):A7(r,A),this.isBefore=(r,A)=>this.overrides?.isBefore?this.overrides.isBefore(r,A):i7(r,A),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):KS(r),this.isSameDay=(r,A)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,A):VS(r,A),this.isSameMonth=(r,A)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,A):o7(r,A),this.isSameYear=(r,A)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,A):s7(r,A),this.max=r=>this.overrides?.max?this.overrides.max(r):_5(r),this.min=r=>this.overrides?.min?this.overrides.min(r):$5(r),this.setMonth=(r,A)=>this.overrides?.setMonth?this.overrides.setMonth(r,A):a7(r,A),this.setYear=(r,A)=>this.overrides?.setYear?this.overrides.setYear(r,A):l7(r,A),this.startOfBroadcastWeek=(r,A)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):e1(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):da(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ca(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):r8(r),this.startOfWeek=(r,A)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Vo(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):YS(r),this.options={locale:Cv,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let A=0;A<10;A++)r[A.toString()]=n.format(A);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:A}=this.options,i=n?.code;if(i&&kt.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:A}).format(t)}catch{}const o=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,o)}}kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const oA=new kt;class t1{constructor(t,n,r=oA){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class b9{constructor(t,n){this.date=t,this.weeks=n}}class x9{constructor(t,n){this.days=n,this.weekNumber=t}}function y9(e){return h.createElement("button",{...e})}function C9(e){return h.createElement("span",{...e})}function B9(e){const{size:t=24,orientation:n="left",className:r}=e;return h.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&h.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&h.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&h.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&h.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function E9(e){const{day:t,modifiers:n,...r}=e;return h.createElement("td",{...r})}function D9(e){const{day:t,modifiers:n,...r}=e,A=h.useRef(null);return h.useEffect(()=>{n.focused&&A.current?.focus()},[n.focused]),h.createElement("button",{ref:A,...r})}var ye;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ye||(ye={}));var Dt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Dt||(Dt={}));var Or;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Or||(Or={}));var Vn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Vn||(Vn={}));function S9(e){const{options:t,className:n,components:r,classNames:A,...i}=e,o=[A[ye.Dropdown],n].join(" "),a=t?.find(({value:l})=>l===i.value);return h.createElement("span",{"data-disabled":i.disabled,className:A[ye.DropdownRoot]},h.createElement(r.Select,{className:o,...i},t?.map(({value:l,label:c,disabled:d})=>h.createElement(r.Option,{key:l,value:l,disabled:d},c))),h.createElement("span",{className:A[ye.CaptionLabel],"aria-hidden":!0},a?.label,h.createElement(r.Chevron,{orientation:"down",size:18,className:A[ye.Chevron]})))}function I9(e){return h.createElement("div",{...e})}function T9(e){return h.createElement("div",{...e})}function O9(e){const{calendarMonth:t,displayIndex:n,...r}=e;return h.createElement("div",{...r},e.children)}function Q9(e){const{calendarMonth:t,displayIndex:n,...r}=e;return h.createElement("div",{...r})}function R9(e){return h.createElement("table",{...e})}function j9(e){return h.createElement("div",{...e})}const n1=h.createContext(void 0);function Qa(){const e=h.useContext(n1);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function F9(e){const{components:t}=Qa();return h.createElement(t.Dropdown,{...e})}function L9(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:A,...i}=e,{components:o,classNames:a,labels:{labelPrevious:l,labelNext:c}}=Qa(),d=h.useCallback(f=>{A&&n?.(f)},[A,n]),u=h.useCallback(f=>{r&&t?.(f)},[r,t]);return h.createElement("nav",{...i},h.createElement(o.PreviousMonthButton,{type:"button",className:a[ye.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:u},h.createElement(o.Chevron,{disabled:r?void 0:!0,className:a[ye.Chevron],orientation:"left"})),h.createElement(o.NextMonthButton,{type:"button",className:a[ye.NextMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":c(A),onClick:d},h.createElement(o.Chevron,{disabled:A?void 0:!0,orientation:"right",className:a[ye.Chevron]})))}function P9(e){const{components:t}=Qa();return h.createElement(t.Button,{...e})}function M9(e){return h.createElement("option",{...e})}function H9(e){const{components:t}=Qa();return h.createElement(t.Button,{...e})}function k9(e){const{rootRef:t,...n}=e;return h.createElement("div",{...n,ref:t})}function N9(e){return h.createElement("select",{...e})}function U9(e){const{week:t,...n}=e;return h.createElement("tr",{...n})}function z9(e){return h.createElement("th",{...e})}function W9(e){return h.createElement("thead",{"aria-hidden":!0},h.createElement("tr",{...e}))}function X9(e){const{week:t,...n}=e;return h.createElement("th",{...n})}function G9(e){return h.createElement("th",{...e})}function V9(e){return h.createElement("tbody",{...e})}function K9(e){const{components:t}=Qa();return h.createElement(t.Dropdown,{...e})}const q9=Object.freeze(Object.defineProperty({__proto__:null,Button:y9,CaptionLabel:C9,Chevron:B9,Day:E9,DayButton:D9,Dropdown:S9,DropdownNav:I9,Footer:T9,Month:O9,MonthCaption:Q9,MonthGrid:R9,Months:j9,MonthsDropdown:F9,Nav:L9,NextMonthButton:P9,Option:M9,PreviousMonthButton:H9,Root:k9,Select:N9,Week:U9,WeekNumber:X9,WeekNumberHeader:G9,Weekday:z9,Weekdays:W9,Weeks:V9,YearsDropdown:K9},Symbol.toStringTag,{value:"Module"}));function pA(e,t,n=!1,r=oA){let{from:A,to:i}=e;const{differenceInCalendarDays:o,isSameDay:a}=r;return A&&i?(o(i,A)<0&&([A,i]=[i,A]),o(t,A)>=(n?1:0)&&o(i,t)>=(n?1:0)):!n&&i?a(i,t):!n&&A?a(A,t):!1}function Bv(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function cu(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ev(e){return!!(e&&typeof e=="object"&&"after"in e)}function Dv(e){return!!(e&&typeof e=="object"&&"before"in e)}function r1(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function A1(e,t){return Array.isArray(e)&&e.every(t.isDate)}function mA(e,t,n=oA){const r=Array.isArray(t)?t:[t],{isSameDay:A,differenceInCalendarDays:i,isAfter:o}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return A(e,a);if(A1(a,n))return a.some(l=>A(e,l));if(cu(a))return pA(a,e,!1,n);if(r1(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Bv(a)){const l=i(a.before,e),c=i(a.after,e),d=l>0,u=c<0;return o(a.before,a.after)?u&&d:d||u}return Ev(a)?i(e,a.after)>0:Dv(a)?i(a.before,e)>0:typeof a=="function"?a(e):!1})}function J9(e,t,n,r,A){const{disabled:i,hidden:o,modifiers:a,showOutsideDays:l,broadcastCalendar:c,today:d=A.today()}=t,{isSameDay:u,isSameMonth:f,startOfMonth:g,isBefore:p,endOfMonth:v,isAfter:w}=A,b=n&&g(n),C=r&&v(r),x={[Dt.focused]:[],[Dt.outside]:[],[Dt.disabled]:[],[Dt.hidden]:[],[Dt.today]:[]},y={};for(const B of e){const{date:E,displayMonth:D}=B,I=!!(D&&!f(E,D)),T=!!(b&&p(E,b)),Q=!!(C&&w(E,C)),F=!!(i&&mA(E,i,A)),U=!!(o&&mA(E,o,A))||T||Q||!c&&!l&&I||c&&l===!1&&I,z=u(E,d);I&&x.outside.push(B),F&&x.disabled.push(B),U&&x.hidden.push(B),z&&x.today.push(B),a&&Object.keys(a).forEach(k=>{const W=a?.[k];W&&mA(E,W,A)&&(y[k]?y[k].push(B):y[k]=[B])})}return B=>{const E={[Dt.focused]:!1,[Dt.disabled]:!1,[Dt.hidden]:!1,[Dt.outside]:!1,[Dt.today]:!1},D={};for(const I in x){const T=x[I];E[I]=T.some(Q=>Q===B)}for(const I in y)D[I]=y[I].some(T=>T===B);return{...E,...D}}}function Y9(e,t,n={}){return Object.entries(e).filter(([,A])=>A===!0).reduce((A,[i])=>(n[i]?A.push(n[i]):t[Dt[i]]?A.push(t[Dt[i]]):t[Or[i]]&&A.push(t[Or[i]]),A),[t[ye.Day]])}function Z9(e){return{...q9,...e}}function _9(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function $9(){const e={};for(const t in ye)e[ye[t]]=`rdp-${ye[t]}`;for(const t in Dt)e[Dt[t]]=`rdp-${Dt[t]}`;for(const t in Or)e[Or[t]]=`rdp-${Or[t]}`;for(const t in Vn)e[Vn[t]]=`rdp-${Vn[t]}`;return e}function i1(e,t,n){return(n??new kt(t)).formatMonthYear(e)}const e6=i1;function t6(e,t,n){return(n??new kt(t)).format(e,"d")}function n6(e,t=oA){return t.format(e,"LLLL")}function r6(e,t,n){return(n??new kt(t)).format(e,"cccccc")}function A6(e,t=oA){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function i6(){return""}function o1(e,t=oA){return t.format(e,"yyyy")}const o6=o1,s6=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:i1,formatDay:t6,formatMonthCaption:e6,formatMonthDropdown:n6,formatWeekNumber:A6,formatWeekNumberHeader:i6,formatWeekdayName:r6,formatYearCaption:o6,formatYearDropdown:o1},Symbol.toStringTag,{value:"Module"}));function a6(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...s6,...e}}function Sv(e,t,n,r){let A=(r??new kt(n)).format(e,"PPPP");return t.today&&(A=`Today, ${A}`),t.selected&&(A=`${A}, selected`),A}const l6=Sv;function Iv(e,t,n){return(n??new kt(t)).formatMonthYear(e)}const c6=Iv;function s1(e,t,n,r){let A=(r??new kt(n)).format(e,"PPPP");return t?.today&&(A=`Today, ${A}`),A}function a1(e){return"Choose the Month"}function l1(){return""}const d6="Go to the Next Month";function c1(e,t){return d6}function d1(e){return"Go to the Previous Month"}function u1(e,t,n){return(n??new kt(t)).format(e,"cccc")}function f1(e,t){return`Week ${e}`}function g1(e){return"Week Number"}function h1(e){return"Choose the Year"}const u6=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:c6,labelDay:l6,labelDayButton:Sv,labelGrid:Iv,labelGridcell:s1,labelMonthDropdown:a1,labelNav:l1,labelNext:c1,labelPrevious:d1,labelWeekNumber:f1,labelWeekNumberHeader:g1,labelWeekday:u1,labelYearDropdown:h1},Symbol.toStringTag,{value:"Module"})),Br=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function f6(e,t){const n=t.locale?.labels??{};return{...u6,...e??{},labelDayButton:Br(Sv,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Br(a1,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Br(c1,e?.labelNext,n.labelNext),labelPrevious:Br(d1,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Br(f1,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Br(h1,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Br(Iv,e?.labelGrid,n.labelGrid),labelGridcell:Br(s1,e?.labelGridcell,n.labelGridcell),labelNav:Br(l1,e?.labelNav,n.labelNav),labelWeekNumberHeader:Br(g1,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Br(u1,e?.labelWeekday,n.labelWeekday)}}function g6(e,t,n,r,A){const{startOfMonth:i,startOfYear:o,endOfYear:a,eachMonthOfInterval:l,getMonth:c}=A;return l({start:o(e),end:a(e)}).map(f=>{const g=r.formatMonthDropdown(f,A),p=c(f),v=t&&f<i(t)||n&&f>i(n)||!1;return{value:p,label:g,disabled:v}})}function h6(e,t={},n={}){let r={...t?.[ye.Day]};return Object.entries(e).filter(([,A])=>A===!0).forEach(([A])=>{r={...r,...n?.[A]}}),r}function p6(e,t,n,r){const A=r??e.today(),i=n?e.startOfBroadcastWeek(A,e):t?e.startOfISOWeek(A):e.startOfWeek(A),o=[];for(let a=0;a<7;a++){const l=e.addDays(i,a);o.push(l)}return o}function m6(e,t,n,r,A=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:o,eachYearOfInterval:a,getYear:l}=r,c=i(e),d=o(t),u=a({start:c,end:d});return A&&u.reverse(),u.map(f=>{const g=n.formatYearDropdown(f,r);return{value:l(f),label:g,disabled:!1}})}function v6(e,t={}){const{weekStartsOn:n,locale:r}=t,A=n??r?.options?.weekStartsOn??0,i=a=>{const l=typeof a=="number"||typeof a=="string"?new Date(a):a;return new an(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},o=a=>{const l=i(a);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(an.tz(e)),newDate:(a,l,c)=>new an(a,l,c,12,0,0,e),startOfDay:a=>i(a),startOfWeek:(a,l)=>{const c=i(a),d=l?.weekStartsOn??A,u=(c.getDay()-d+7)%7;return c.setDate(c.getDate()-u),c},startOfISOWeek:a=>{const l=i(a),c=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-c),l},startOfMonth:a=>{const l=i(a);return l.setDate(1),l},startOfYear:a=>{const l=i(a);return l.setMonth(0,1),l},endOfWeek:(a,l)=>{const c=i(a),f=(((l?.weekStartsOn??A)+6)%7-c.getDay()+7)%7;return c.setDate(c.getDate()+f),c},endOfISOWeek:a=>{const l=i(a),c=(7-l.getDay())%7;return l.setDate(l.getDate()+c),l},endOfMonth:a=>{const l=i(a);return l.setMonth(l.getMonth()+1,0),l},endOfYear:a=>{const l=i(a);return l.setMonth(11,31),l},eachMonthOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],u=new an(l.getFullYear(),l.getMonth(),1,12,0,0,e),f=c.getFullYear()*12+c.getMonth();for(;u.getFullYear()*12+u.getMonth()<=f;)d.push(new an(u,e)),u.setMonth(u.getMonth()+1,1);return d},addDays:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l),c},addWeeks:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l*7),c},addMonths:(a,l)=>{const c=i(a);return c.setMonth(c.getMonth()+l),c},addYears:(a,l)=>{const c=i(a);return c.setFullYear(c.getFullYear()+l),c},eachYearOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],u=new an(l.getFullYear(),0,1,12,0,0,e);for(;u.getFullYear()<=c.getFullYear();)d.push(new an(u,e)),u.setFullYear(u.getFullYear()+1,0,1);return d},getWeek:(a,l)=>{const c=o(a);return yv(c,{weekStartsOn:l?.weekStartsOn??A,firstWeekContainsDate:l?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const l=o(a);return xv(l)},differenceInCalendarDays:(a,l)=>{const c=o(a),d=o(l);return wv(c,d)},differenceInCalendarMonths:(a,l)=>{const c=o(a),d=o(l);return qS(c,d)}}}const Ra=e=>e instanceof HTMLElement?e:null,Cg=e=>[...e.querySelectorAll("[data-animated-month]")??[]],w6=e=>Ra(e.querySelector("[data-animated-month]")),Bg=e=>Ra(e.querySelector("[data-animated-caption]")),Eg=e=>Ra(e.querySelector("[data-animated-weeks]")),b6=e=>Ra(e.querySelector("[data-animated-nav]")),x6=e=>Ra(e.querySelector("[data-animated-weekdays]"));function y6(e,t,{classNames:n,months:r,focused:A,dateLib:i}){const o=h.useRef(null),a=h.useRef(r),l=h.useRef(!1);h.useLayoutEffect(()=>{const c=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=i.isSameMonth(r[0].date,c[0].date),u=i.isAfter(r[0].date,c[0].date),f=u?n[Vn.caption_after_enter]:n[Vn.caption_before_enter],g=u?n[Vn.weeks_after_enter]:n[Vn.weeks_before_enter],p=o.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Cg(v).forEach(x=>{if(!(x instanceof HTMLElement))return;const y=w6(x);y&&x.contains(y)&&x.removeChild(y);const B=Bg(x);B&&B.classList.remove(f);const E=Eg(x);E&&E.classList.remove(g)}),o.current=v):o.current=null,l.current||d||A)return;const w=p instanceof HTMLElement?Cg(p):[],b=Cg(e.current);if(b?.every(C=>C instanceof HTMLElement)&&w&&w.every(C=>C instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const C=b6(e.current);C&&(C.style.zIndex="1"),b.forEach((x,y)=>{const B=w[y];if(!B)return;x.style.position="relative",x.style.overflow="hidden";const E=Bg(x);E&&E.classList.add(f);const D=Eg(x);D&&D.classList.add(g);const I=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),E&&E.classList.remove(f),D&&D.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(B)&&x.removeChild(B)};B.style.pointerEvents="none",B.style.position="absolute",B.style.overflow="hidden",B.setAttribute("aria-hidden","true");const T=x6(B);T&&(T.style.opacity="0");const Q=Bg(B);Q&&(Q.classList.add(u?n[Vn.caption_before_exit]:n[Vn.caption_after_exit]),Q.addEventListener("animationend",I));const F=Eg(B);F&&F.classList.add(u?n[Vn.weeks_before_exit]:n[Vn.weeks_after_exit]),x.insertBefore(B,x.firstChild)})}})}function C6(e,t,n,r){const A=e[0],i=e[e.length-1],{ISOWeek:o,fixedWeeks:a,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:f,endOfISOWeek:g,endOfMonth:p,endOfWeek:v,isAfter:w,startOfBroadcastWeek:b,startOfISOWeek:C,startOfWeek:x}=r,y=l?b(A,r):o?C(A):x(A),B=l?f(i):o?g(p(i)):v(p(i)),E=t&&(l?f(t):o?g(t):v(t)),D=E&&w(B,E)?E:B,I=d(D,y),T=u(i,A)+1,Q=[];for(let z=0;z<=I;z++){const k=c(y,z);Q.push(k)}const U=(l?35:42)*T;if(a&&Q.length<U){const z=U-Q.length;for(let k=0;k<z;k++){const W=c(Q[Q.length-1],1);Q.push(W)}}return Q}function B6(e){const t=[];return e.reduce((n,r)=>{const A=r.weeks.reduce((i,o)=>i.concat(o.days.slice()),t.slice());return n.concat(A.slice())},t.slice())}function E6(e,t,n,r){const{numberOfMonths:A=1}=n,i=[];for(let o=0;o<A;o++){const a=r.addMonths(e,o);if(t&&a>t)break;i.push(a)}return i}function Ey(e,t,n,r){const{month:A,defaultMonth:i,today:o=r.today(),numberOfMonths:a=1}=e;let l=A||i||o;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=r;if(n&&c(n,l)<a-1){const f=-1*(a-1);l=d(n,f)}return t&&c(l,t)<0&&(l=t),u(l)}function D6(e,t,n,r){const{addDays:A,endOfBroadcastWeek:i,endOfISOWeek:o,endOfMonth:a,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:f,startOfWeek:g}=r,p=e.reduce((v,w)=>{const b=n.broadcastCalendar?u(w,r):n.ISOWeek?f(w):g(w),C=n.broadcastCalendar?i(w):n.ISOWeek?o(a(w)):l(a(w)),x=t.filter(D=>D>=b&&D<=C),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<y){const D=t.filter(I=>{const T=y-x.length;return I>C&&I<=A(C,T)});x.push(...D)}const B=x.reduce((D,I)=>{const T=n.ISOWeek?c(I):d(I),Q=D.find(U=>U.weekNumber===T),F=new t1(I,w,r);return Q?Q.days.push(F):D.push(new x9(T,[F])),D},[]),E=new b9(w,B);return v.push(E),v},[]);return n.reverseMonths?p.reverse():p}function S6(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:A,startOfDay:i,startOfMonth:o,endOfMonth:a,addYears:l,endOfYear:c,newDate:d,today:u}=t,{fromYear:f,toYear:g,fromMonth:p,toMonth:v}=e;!n&&p&&(n=p),!n&&f&&(n=t.newDate(f,0,1)),!r&&v&&(r=v),!r&&g&&(r=d(g,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=o(n):f?n=d(f,0,1):!n&&w&&(n=A(l(e.today??u(),-100))),r?r=a(r):g?r=d(g,11,31):!r&&w&&(r=c(e.today??u())),[n&&i(n),r&&i(r)]}function I6(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:A,numberOfMonths:i=1}=n,{startOfMonth:o,addMonths:a,differenceInCalendarMonths:l}=r,c=A?i:1,d=o(e);if(!t)return a(d,c);if(!(l(t,e)<i))return a(d,c)}function T6(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:A,numberOfMonths:i}=n,{startOfMonth:o,addMonths:a,differenceInCalendarMonths:l}=r,c=A?i??1:1,d=o(e);if(!t)return a(d,-c);if(!(l(d,t)<=0))return a(d,-c)}function O6(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function du(e,t){const[n,r]=h.useState(e);return[t===void 0?n:t,r]}function Q6(e,t){const[n,r]=S6(e,t),{startOfMonth:A,endOfMonth:i}=t,o=Ey(e,n,r,t),[a,l]=du(o,e.month?o:void 0);h.useEffect(()=>{const y=Ey(e,n,r,t);l(y)},[e.timeZone]);const{months:c,weeks:d,days:u,previousMonth:f,nextMonth:g}=h.useMemo(()=>{const y=E6(a,r,{numberOfMonths:e.numberOfMonths},t),B=C6(y,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),E=D6(y,B,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=O6(E),I=B6(E),T=T6(a,n,e,t),Q=I6(a,r,e,t);return{months:E,weeks:D,days:I,previousMonth:T,nextMonth:Q}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:p,onMonthChange:v}=e,w=y=>d.some(B=>B.days.some(E=>E.isEqualTo(y))),b=y=>{if(p)return;let B=A(y);n&&B<A(n)&&(B=A(n)),r&&B>A(r)&&(B=A(r)),l(B),v?.(B)};return{months:c,weeks:d,days:u,navStart:n,navEnd:r,previousMonth:f,nextMonth:g,goToMonth:b,goToDay:y=>{w(y)||b(y.date)}}}var Kr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Kr||(Kr={}));function Dy(e){return!e[Dt.disabled]&&!e[Dt.hidden]&&!e[Dt.outside]}function R6(e,t,n,r){let A,i=-1;for(const o of e){const a=t(o);Dy(a)&&(a[Dt.focused]&&i<Kr.FocusedModifier?(A=o,i=Kr.FocusedModifier):r?.isEqualTo(o)&&i<Kr.LastFocused?(A=o,i=Kr.LastFocused):n(o.date)&&i<Kr.Selected?(A=o,i=Kr.Selected):a[Dt.today]&&i<Kr.Today&&(A=o,i=Kr.Today))}return A||(A=e.find(o=>Dy(t(o)))),A}function j6(e,t,n,r,A,i,o){const{ISOWeek:a,broadcastCalendar:l}=i,{addDays:c,addMonths:d,addWeeks:u,addYears:f,endOfBroadcastWeek:g,endOfISOWeek:p,endOfWeek:v,max:w,min:b,startOfBroadcastWeek:C,startOfISOWeek:x,startOfWeek:y}=o;let E={day:c,week:u,month:d,year:f,startOfWeek:D=>l?C(D,o):a?x(D):y(D),endOfWeek:D=>l?g(D):a?p(D):v(D)}[e](n,t==="after"?1:-1);return t==="before"&&r?E=w([r,E]):t==="after"&&A&&(E=b([A,E])),E}function p1(e,t,n,r,A,i,o,a=0){if(a>365)return;const l=j6(e,t,n.date,r,A,i,o),c=!!(i.disabled&&mA(l,i.disabled,o)),d=!!(i.hidden&&mA(l,i.hidden,o)),u=l,f=new t1(l,u,o);return!c&&!d?f:p1(e,t,f,r,A,i,o,a+1)}function F6(e,t,n,r,A){const{autoFocus:i}=e,[o,a]=h.useState(),l=R6(t.days,n,r||(()=>!1),o),[c,d]=h.useState(i?l:void 0);return{isFocusTarget:v=>!!l?.isEqualTo(v),setFocused:d,focused:c,blur:()=>{a(c),d(void 0)},moveFocus:(v,w)=>{if(!c)return;const b=p1(v,w,c,t.navStart,t.navEnd,e,A);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),d(b)))}}}function L6(e,t){const{selected:n,required:r,onSelect:A}=e,[i,o]=du(n,A?n:void 0),a=A?n:i,{isSameDay:l}=t,c=g=>a?.some(p=>l(p,g))??!1,{min:d,max:u}=e;return{selected:a,select:(g,p,v)=>{let w=[...a??[]];if(c(g)){if(a?.length===d||r&&a?.length===1)return;w=a?.filter(b=>!l(b,g))}else a?.length===u?w=[g]:w=[...w,g];return A||o(w),A?.(w,g,p,v),w},isSelected:c}}function P6(e,t,n=0,r=0,A=!1,i=oA){const{from:o,to:a}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=i;let u;if(!o&&!a)u={from:e,to:n>0?void 0:e};else if(o&&!a)l(o,e)?n===0?u={from:o,to:e}:A?u={from:o,to:void 0}:u=void 0:d(e,o)?u={from:e,to:o}:u={from:o,to:e};else if(o&&a)if(l(o,e)&&l(a,e))A?u={from:o,to:a}:u=void 0;else if(l(o,e))u={from:o,to:n>0?void 0:e};else if(l(a,e))u={from:e,to:n>0?void 0:e};else if(d(e,o))u={from:e,to:a};else if(c(e,o))u={from:o,to:e};else if(c(e,a))u={from:o,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const f=i.differenceInCalendarDays(u.to,u.from);r>0&&f>r?u={from:e,to:void 0}:n>1&&f<n&&(u={from:e,to:void 0})}return u}function M6(e,t,n=oA){const r=Array.isArray(t)?t:[t];let A=e.from;const i=n.differenceInCalendarDays(e.to,e.from),o=Math.min(i,6);for(let a=0;a<=o;a++){if(r.includes(A.getDay()))return!0;A=n.addDays(A,1)}return!1}function Sy(e,t,n=oA){return pA(e,t.from,!1,n)||pA(e,t.to,!1,n)||pA(t,e.from,!1,n)||pA(t,e.to,!1,n)}function H6(e,t,n=oA){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?pA(e,a,!1,n):A1(a,n)?a.some(l=>pA(e,l,!1,n)):cu(a)?a.from&&a.to?Sy(e,{from:a.from,to:a.to},n):!1:r1(a)?M6(e,a.dayOfWeek,n):Bv(a)?n.isAfter(a.before,a.after)?Sy(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):mA(e.from,a,n)||mA(e.to,a,n):Ev(a)||Dv(a)?mA(e.from,a,n)||mA(e.to,a,n):!1))return!0;const o=r.filter(a=>typeof a=="function");if(o.length){let a=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(o.some(d=>d(a)))return!0;a=n.addDays(a,1)}}return!1}function k6(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:A,selected:i,required:o,onSelect:a}=e,[l,c]=du(i,a?i:void 0),d=a?i:l;return{selected:d,select:(g,p,v)=>{const{min:w,max:b}=e;let C;if(g){const x=d?.from,y=d?.to,B=!!x&&!!y,E=!!x&&!!y&&t.isSameDay(x,y)&&t.isSameDay(g,x);A&&(B||!d?.from)?!o&&E?C=void 0:C={from:g,to:void 0}:C=P6(g,d,w,b,o,t)}return r&&n&&C?.from&&C.to&&H6({from:C.from,to:C.to},n,t)&&(C.from=g,C.to=void 0),a||c(C),a?.(C,g,p,v),C},isSelected:g=>d&&pA(d,g,!1,t)}}function N6(e,t){const{selected:n,required:r,onSelect:A}=e,[i,o]=du(n,A?n:void 0),a=A?n:i,{isSameDay:l}=t;return{selected:a,select:(u,f,g)=>{let p=u;return!r&&a&&a&&l(u,a)&&(p=void 0),A||o(p),A?.(p,u,f,g),p},isSelected:u=>a?l(a,u):!1}}function U6(e,t){const n=N6(e,t),r=L6(e,t),A=k6(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return A;default:return}}function dr(e,t){return e instanceof an&&e.timeZone===t?e:new an(e,t)}function Ao(e,t,n){return dr(e,t)}function Iy(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Ao(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Ao(r,t):r):cu(e)?{...e,from:e.from?dr(e.from,t):e.from,to:e.to?dr(e.to,t):e.to}:Bv(e)?{before:Ao(e.before,t),after:Ao(e.after,t)}:Ev(e)?{after:Ao(e.after,t)}:Dv(e)?{before:Ao(e.before,t)}:e}function Dg(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Iy(r,t)):Iy(e,t))}function z6(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=dr(t.today,n)),t.month&&(t.month=dr(t.month,n)),t.defaultMonth&&(t.defaultMonth=dr(t.defaultMonth,n)),t.startMonth&&(t.startMonth=dr(t.startMonth,n)),t.endMonth&&(t.endMonth=dr(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=dr(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Qe=>dr(Qe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?dr(t.selected.from,n):t.selected.from,to:t.selected.to?dr(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Dg(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Dg(t.hidden,n)),t.modifiers)){const Qe={};Object.keys(t.modifiers).forEach(ze=>{Qe[ze]=Dg(t.modifiers?.[ze],n)}),t.modifiers=Qe}const{components:r,formatters:A,labels:i,dateLib:o,locale:a,classNames:l}=h.useMemo(()=>{const Qe={...Cv,...t.locale},ze=t.broadcastCalendar?1:t.weekStartsOn,we=t.noonSafe&&t.timeZone?v6(t.timeZone,{weekStartsOn:ze,locale:Qe}):void 0,Ge=t.dateLib&&we?{...we,...t.dateLib}:t.dateLib??we,ut=new kt({locale:Qe,weekStartsOn:ze,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ge);return{dateLib:ut,components:Z9(t.components),formatters:a6(t.formatters),labels:f6(t.labels,ut.options),locale:Qe,classNames:{...$9(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});const{captionLayout:c,mode:d,navLayout:u,numberOfMonths:f=1,onDayBlur:g,onDayClick:p,onDayFocus:v,onDayKeyDown:w,onDayMouseEnter:b,onDayMouseLeave:C,onNextClick:x,onPrevClick:y,showWeekNumber:B,styles:E}=t,{formatCaption:D,formatDay:I,formatMonthDropdown:T,formatWeekNumber:Q,formatWeekNumberHeader:F,formatWeekdayName:U,formatYearDropdown:z}=A,k=Q6(t,o),{days:W,months:Z,navStart:Y,navEnd:J,previousMonth:Ae,nextMonth:L,goToMonth:S}=k,M=J9(W,t,Y,J,o),{isSelected:V,select:N,selected:j}=U6(t,o)??{},{blur:G,focused:X,isFocusTarget:O,moveFocus:oe,setFocused:se}=F6(t,k,M,V??(()=>!1),o),{labelDayButton:He,labelGridcell:re,labelGrid:te,labelMonthDropdown:xe,labelNav:Oe,labelPrevious:Te,labelNext:Re,labelWeekday:lt,labelWeekNumber:le,labelWeekNumberHeader:Pe,labelYearDropdown:fe}=i,Ct=h.useMemo(()=>p6(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),xr=d!==void 0||p!==void 0,En=h.useCallback(()=>{Ae&&(S(Ae),y?.(Ae))},[Ae,S,y]),Dn=h.useCallback(()=>{L&&(S(L),x?.(L))},[S,L,x]),Sn=h.useCallback((Qe,ze)=>we=>{we.preventDefault(),we.stopPropagation(),se(Qe),!ze.disabled&&(N?.(Qe.date,ze,we),p?.(Qe.date,ze,we))},[N,p,se]),Gt=h.useCallback((Qe,ze)=>we=>{se(Qe),v?.(Qe.date,ze,we)},[v,se]),In=h.useCallback((Qe,ze)=>we=>{G(),g?.(Qe.date,ze,we)},[G,g]),zr=h.useCallback((Qe,ze)=>we=>{const Ge={ArrowLeft:[we.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[we.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[we.shiftKey?"year":"week","after"],ArrowUp:[we.shiftKey?"year":"week","before"],PageUp:[we.shiftKey?"year":"month","before"],PageDown:[we.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ge[we.key]){we.preventDefault(),we.stopPropagation();const[ut,Ne]=Ge[we.key];oe(ut,Ne)}w?.(Qe.date,ze,we)},[oe,w,t.dir]),rr=h.useCallback((Qe,ze)=>we=>{b?.(Qe.date,ze,we)},[b]),Ar=h.useCallback((Qe,ze)=>we=>{C?.(Qe.date,ze,we)},[C]),aA=h.useCallback(Qe=>ze=>{const we=Number(ze.target.value),Ge=o.setMonth(o.startOfMonth(Qe),we);S(Ge)},[o,S]),ir=h.useCallback(Qe=>ze=>{const we=Number(ze.target.value),Ge=o.setYear(o.startOfMonth(Qe),we);S(Ge)},[o,S]),{className:Tn,style:rt}=h.useMemo(()=>({className:[l[ye.Root],t.className].filter(Boolean).join(" "),style:{...E?.[ye.Root],...t.style}}),[l,t.className,t.style,E]),Bt=_9(t),or=h.useRef(null);y6(or,!!t.animate,{classNames:l,months:Z,focused:X,dateLib:o});const yr={dayPickerProps:t,selected:j,select:N,isSelected:V,months:Z,nextMonth:L,previousMonth:Ae,goToMonth:S,getModifiers:M,components:r,classNames:l,styles:E,labels:i,formatters:A};return h.createElement(n1.Provider,{value:yr},h.createElement(r.Root,{rootRef:t.animate?or:void 0,className:Tn,style:rt,dir:t.dir,id:t.id,lang:t.lang??a.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Bt},h.createElement(r.Months,{className:l[ye.Months],style:E?.[ye.Months]},!t.hideNavigation&&!u&&h.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ye.Nav],style:E?.[ye.Nav],"aria-label":Oe(),onPreviousClick:En,onNextClick:Dn,previousMonth:Ae,nextMonth:L}),Z.map((Qe,ze)=>h.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ye.Month],style:E?.[ye.Month],key:ze,displayIndex:ze,calendarMonth:Qe},u==="around"&&!t.hideNavigation&&ze===0&&h.createElement(r.PreviousMonthButton,{type:"button",className:l[ye.PreviousMonthButton],tabIndex:Ae?void 0:-1,"aria-disabled":Ae?void 0:!0,"aria-label":Te(Ae),onClick:En,"data-animated-button":t.animate?"true":void 0},h.createElement(r.Chevron,{disabled:Ae?void 0:!0,className:l[ye.Chevron],orientation:t.dir==="rtl"?"right":"left"})),h.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ye.MonthCaption],style:E?.[ye.MonthCaption],calendarMonth:Qe,displayIndex:ze},c?.startsWith("dropdown")?h.createElement(r.DropdownNav,{className:l[ye.Dropdowns],style:E?.[ye.Dropdowns]},(()=>{const we=c==="dropdown"||c==="dropdown-months"?h.createElement(r.MonthsDropdown,{key:"month",className:l[ye.MonthsDropdown],"aria-label":xe(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:aA(Qe.date),options:g6(Qe.date,Y,J,A,o),style:E?.[ye.Dropdown],value:o.getMonth(Qe.date)}):h.createElement("span",{key:"month"},T(Qe.date,o)),Ge=c==="dropdown"||c==="dropdown-years"?h.createElement(r.YearsDropdown,{key:"year",className:l[ye.YearsDropdown],"aria-label":fe(o.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:ir(Qe.date),options:m6(Y,J,A,o,!!t.reverseYears),style:E?.[ye.Dropdown],value:o.getYear(Qe.date)}):h.createElement("span",{key:"year"},z(Qe.date,o));return o.getMonthYearOrder()==="year-first"?[Ge,we]:[we,Ge]})(),h.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(Qe.date,o.options,o))):h.createElement(r.CaptionLabel,{className:l[ye.CaptionLabel],role:"status","aria-live":"polite"},D(Qe.date,o.options,o))),u==="around"&&!t.hideNavigation&&ze===f-1&&h.createElement(r.NextMonthButton,{type:"button",className:l[ye.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":Re(L),onClick:Dn,"data-animated-button":t.animate?"true":void 0},h.createElement(r.Chevron,{disabled:L?void 0:!0,className:l[ye.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ze===f-1&&u==="after"&&!t.hideNavigation&&h.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ye.Nav],style:E?.[ye.Nav],"aria-label":Oe(),onPreviousClick:En,onNextClick:Dn,previousMonth:Ae,nextMonth:L}),h.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":te(Qe.date,o.options,o)||void 0,className:l[ye.MonthGrid],style:E?.[ye.MonthGrid]},!t.hideWeekdays&&h.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ye.Weekdays],style:E?.[ye.Weekdays]},B&&h.createElement(r.WeekNumberHeader,{"aria-label":Pe(o.options),className:l[ye.WeekNumberHeader],style:E?.[ye.WeekNumberHeader],scope:"col"},F()),Ct.map(we=>h.createElement(r.Weekday,{"aria-label":lt(we,o.options,o),className:l[ye.Weekday],key:String(we),style:E?.[ye.Weekday],scope:"col"},U(we,o.options,o)))),h.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ye.Weeks],style:E?.[ye.Weeks]},Qe.weeks.map(we=>h.createElement(r.Week,{className:l[ye.Week],key:we.weekNumber,style:E?.[ye.Week],week:we},B&&h.createElement(r.WeekNumber,{week:we,style:E?.[ye.WeekNumber],"aria-label":le(we.weekNumber,{locale:a}),className:l[ye.WeekNumber],scope:"row",role:"rowheader"},Q(we.weekNumber,o)),we.days.map(Ge=>{const{date:ut}=Ge,Ne=M(Ge);if(Ne[Dt.focused]=!Ne.hidden&&!!X?.isEqualTo(Ge),Ne[Or.selected]=V?.(ut)||Ne.selected,cu(j)){const{from:Ce,to:We}=j;Ne[Or.range_start]=!!(Ce&&We&&o.isSameDay(ut,Ce)),Ne[Or.range_end]=!!(Ce&&We&&o.isSameDay(ut,We)),Ne[Or.range_middle]=pA(j,ut,!0,o)}const IA=h6(Ne,E,t.modifiersStyles),Ue=Y9(Ne,l,t.modifiersClassNames),mt=!xr&&!Ne.hidden?re(ut,Ne,o.options,o):void 0;return h.createElement(r.Day,{key:`${Ge.isoDate}_${Ge.displayMonthId}`,day:Ge,modifiers:Ne,className:Ue.join(" "),style:IA,role:"gridcell","aria-selected":Ne.selected||void 0,"aria-label":mt,"data-day":Ge.isoDate,"data-month":Ge.outside?Ge.dateMonthId:void 0,"data-selected":Ne.selected||void 0,"data-disabled":Ne.disabled||void 0,"data-hidden":Ne.hidden||void 0,"data-outside":Ge.outside||void 0,"data-focused":Ne.focused||void 0,"data-today":Ne.today||void 0},!Ne.hidden&&xr?h.createElement(r.DayButton,{className:l[ye.DayButton],style:E?.[ye.DayButton],type:"button",day:Ge,modifiers:Ne,disabled:!Ne.focused&&Ne.disabled||void 0,"aria-disabled":Ne.focused&&Ne.disabled||void 0,tabIndex:O(Ge)?0:-1,"aria-label":He(ut,Ne,o.options,o),onClick:Sn(Ge,Ne),onBlur:In(Ge,Ne),onFocus:Gt(Ge,Ne),onKeyDown:zr(Ge,Ne),onMouseEnter:rr(Ge,Ne),onMouseLeave:Ar(Ge,Ne)},I(ut,o.options,o)):!Ne.hidden&&I(Ge.date,o.options,o))})))))))),t.footer&&h.createElement(r.Footer,{className:l[ye.Footer],style:E?.[ye.Footer],role:"status","aria-live":"polite"},t.footer)))}function W6(e){let t=!1;return{promise:new Promise((r,A)=>{e.then(i=>t?A({isCanceled:t}):r(i)).catch(i=>A(t?{isCanceled:t}:i))}),cancel(){t=!0}}}function m1(){const e=h.useRef([]);h.useEffect(()=>function(){e.current.forEach(r=>r.cancel()),e.current=[]},[]);function t(n){const r=W6(n);return e.current.push(r),r.promise}return[t]}function v1(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gp(e,t){if(v1(e)&&typeof window.scrollTo=="function"){window.scrollTo(0,t);return}e instanceof HTMLElement&&(e.scrollTop=t)}function X6(e){let t=getComputedStyle(e);const n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(let A=e;A=A.parentElement;)if(t=getComputedStyle(A),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return A;return document.documentElement}function w1(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),A=t.offsetHeight/3;r.bottom+A>n.bottom?Gp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+A,e.scrollHeight)):r.top-A<n.top&&Gp(e,Math.max(t.offsetTop-A,0))}const G6=Object.freeze(Object.defineProperty({__proto__:null,getScrollParent:X6,isDocumentElement:v1,scrollIntoView:w1,scrollTo:Gp},Symbol.toStringTag,{value:"Module"})),$n=1e3,V6="24px",K6="16px",sd="1376px",ua={open:{width:"296px",padding:"32px",iconSize:40},close:{width:"64px",padding:"16px",iconSize:30}};function Ys(e){return ua[e?"open":"close"]}const q6=m.div`
|
|
1684
1684
|
display: flex;
|
|
1685
1685
|
height: var(--body-height);
|
|
1686
1686
|
margin-right: 16px;
|
|
@@ -2129,7 +2129,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2129
2129
|
${Ze()}
|
|
2130
2130
|
`,FW=({onClick:e})=>s.jsxs(jW,{onClick:e,children:[s.jsx(ne,{name:"icon-times",color:"grey2"}),s.jsx(uu,{children:s.jsx(H.FormattedMessage,{id:"INPUT_SELECT_Reset"})})]}),LW=({loading:e,open:t,onClick:n,sizeVariant:r,disabled:A,expand:i,controls:o})=>s.jsxs(RW,{type:"button",tabIndex:-1,onClick:n,disabled:A,$sizeVariant:r,"aria-expanded":i,"aria-controls":o,children:[e?s.jsx(Ve,{}):s.jsx(ne,{name:`icon-angle-${t?"up":"down"}`,color:"grey5",size:r==="s"?15:20}),s.jsx(uu,{children:s.jsx(H.FormattedMessage,{id:"INPUT_SELECT_Expand"})})]});function PW(e,t){return e.findIndex(n=>_.deepEqual(n,t))}function D1(e,t,n=!0){let r=e.map(i=>({el:i,group:t(i)}));n&&(r=r.sort((i,o)=>i.group===o.group?0:i.group<o.group?-1:1));const A=r.reduce((i,{el:o,group:a},l)=>(i.get(a)?i.set(a,[...i.get(a),{...o,_index:l}]):i.set(a,[{...o,_index:l}]),i),new Map);return Array.from(A).map(([i,o])=>({label:i,options:o}))}function Rl(e,t){return t&&typeof t=="function"?t(e)!==null&&t(e)!==void 0?t(e):"":t&&typeof t=="string"?e[t]??"":e??""}function ci(e,t){return Array.isArray(e)?PW(e,t)>=0:_.deepEqual(e,t)}const MW=m.div`
|
|
2131
2131
|
margin-bottom: ${({theme:e})=>e.space.sm}px;
|
|
2132
|
-
`,HW=function({asyncPromise:e,searchable:t,showAsyncResultOnEmptySearch:n,displayOption:r=!0,displayIndicator:A=!0,iconBefore:i,value:o,allowCustomOptions:a,limit:l,noMargin:c,defaultOpen:d,...u},f){const g=H.useIntl(),{multiple:p,readOnly:v,onChange:w,required:b,getGroup:C}=u,x=le=>Rl(le,u.getLabel),y=le=>Rl(le,u.getValue),B=le=>Rl(le,u.getSearch??u.getLabel),E=h.useCallback(le=>Rl(le,C),[C]),[D]=m1(),[I,T]=h.useState(""),Q=_m(I),[F,U]=h.useState(d??!1),[z,k]=h.useState(!1),[W,Z]=h.useState(0),[J
|
|
2132
|
+
`,HW=function({asyncPromise:e,searchable:t,showAsyncResultOnEmptySearch:n,displayOption:r=!0,displayIndicator:A=!0,iconBefore:i,value:o,allowCustomOptions:a,limit:l,noMargin:c,defaultOpen:d,...u},f){const g=H.useIntl(),{multiple:p,readOnly:v,onChange:w,required:b,getGroup:C}=u,x=le=>Rl(le,u.getLabel),y=le=>Rl(le,u.getValue),B=le=>Rl(le,u.getSearch??u.getLabel),E=h.useCallback(le=>Rl(le,C),[C]),[D]=m1(),[I,T]=h.useState(""),Q=_m(I),[F,U]=h.useState(d??!1),[z,k]=h.useState(!1),[W,Z]=h.useState(0),[Y,J]=h.useState(u.loading??!1),Ae=h.useRef(!1),[L,S]=h.useState(""),M=h.useRef(null),V=h.useRef(null),[N,j]=h.useState(u.options??[]),G=h.useMemo(()=>u.htmlFor??u.name,[u.htmlFor,u.name]),X=h.useMemo(()=>i?"onClick"in i?s.jsx(jy,{ref:i.ref,as:Le,icon:i.icon,size:"medium",color:i.color,onClick:i.onClick,left:5,top:5,height:30,width:30,name:i.icon,srOnly:i.label}):s.jsx(jy,{name:i.icon,size:20,color:i.color,left:6}):null,[i]),O=h.useMemo(()=>{if(t){const le=N.filter(fe=>ci(o,fe)),Pe=o?.label?.toLowerCase?.()?.includes(I.toLowerCase())&&!!le.length;return N.filter(fe=>!I||!!Pe||new RegExp(I,"i").test(B(fe)))}return[...N.filter(le=>!le.custom),...N.filter(le=>le.custom)]},[N,I]);h.useEffect(()=>{u.options&&j(u.options)},[u.options]),h.useEffect(()=>{u.multiple||T(o==null?"":B(o).toString()?g.formatMessage({id:B(o).toString()}):B(o).toString())},[o]),h.useEffect(()=>{!t&&Ae.current&&J(u.loading??!1),e&&(n||Q)?(J(!0),Ae.current=!0,D(e(Q)).then(le=>{!a||le.some(Pe=>Pe.title===Q)||!Q?(j(le),J(u.loading??!1)):(j([{title:Q,newOption:!0},...le]),J(u.loading??!1))}).catch(le=>{le.isCanceled||J(u.loading??!1)})):J(u.loading??!1)},[Q,u.loading]),h.useEffect(()=>{!e&&!O.length?S("GLOBAL_No_Result"):e&&!O.length&&Y?S("GLOBAL_Search_Loading"):e&&!I&&(n&&O.length||!n)?S("GLOBAL_Start_typing"):e&&!O.length&&!Y?S("GLOBAL_No_Result"):S("")},[e,O,Y,n,I]);let oe=null;function se(le){oe=le,z&&(k(!1),V.current&&oe&&w1(V.current,oe))}h.useImperativeHandle(f,()=>({focus:()=>{M?.current?.focus()}}));const He=h.useCallback((le,Pe)=>{if(le?.stopPropagation(),!v){if(p)Pe.resetOptions?w(o&&Array.isArray(o)&&o.some(fe=>_.deepEqual(fe,Pe))?[]:[Pe]):w(o&&Array.isArray(o)&&o.some(fe=>_.deepEqual(fe,Pe))?o.filter(fe=>!_.deepEqual(fe,Pe)):[...Array.isArray(o)?o:[],Pe]),e&&t&&T("");else{const fe=_.deepEqual(o,Pe);fe&&!b?w(""):fe||w(Pe)}U(!1),M?.current?.focus(),le&&le.preventDefault()}},[e,p,w,v,b,t,o]),re=le=>{t&&T(le.target.value??"")},te=h.useCallback(le=>{if(!v)if(le.key==="ArrowDown"){if(!F){U(!0),k(!0);return}Z(F?(W+1)%O.length:0)}else if(le.key==="ArrowUp"){if(!F){k(!0),U(!0);return}Z(F&&W>0?W-1:O.length-1)}else if(le.code==="Space"&&!t&&!F){le.preventDefault();const Pe=O.findIndex(fe=>ci(o,fe));Z(Pe>=0?Pe:0),U(!0),k(!0)}else if(le.code==="Enter"&&(W!==void 0||a)){if(le.preventDefault(),!F){const fe=O.findIndex(Ct=>ci(o,Ct));Z(fe>=0?fe:0),U(!0),k(!0);return}const Pe=u.group?O.map(fe=>({el:fe,group:E(fe)})).sort((fe,Ct)=>fe.group===Ct.group?0:fe.group<Ct.group?-1:1).map(fe=>fe.el)[W]:O[W];Pe?(He(le,Pe),p||U(!1)):a&&O.length>0&&(He(le,O[0]),p||U(!1))}else if(le.key==="Tab"||le.key==="Escape"){const Pe=u.group?0:O.findIndex(fe=>ci(o,fe)??0);Z(Pe),U(!1)}else!p&&o&&["Backspace","Delete"].includes(le.key)&&(w(""),U(!0))},[v,W,a,p,o,F,O,E,He,w,u.group,t]),xe=!u.hideDeleteIcon&&!u.multiple&&!u.required&&!u.readOnly&&o,Oe=A&&!u.readOnly,Te=xe||Oe,Re=!!o&&!!l&&o.length===l,lt=r&&F&&(!!L||!!O.length);return s.jsxs(s.Fragment,{children:[u.multiple&&u.hideSelectedOption!==!0&&o&&Array.isArray(o)&&s.jsx(b1,{children:o.map((le,Pe)=>s.jsx(x1,{onClick:u.readOnly?void 0:fe=>{fe.stopPropagation(),u.onChange(o.filter(Ct=>!_.deepEqual(Ct,le)))},readOnly:u.readOnly,children:u?.components?.SelectedOption?s.jsx(u.components.SelectedOption,{option:le}):s.jsxs(y1,{children:[s.jsx(C1,{}),y(le)]})},`${x(le).toString().replace(/[^a-z0-9]/gi,"")}-${Pe}`))}),s.jsxs(mW,{onClickAway:()=>U(!1),className:u.className,children:[X,s.jsx(GH,{hasIconBefore:!!X,hasIconAfter:Te,ref:M,id:G,disabled:u.disabled??Re,readOnly:u.readOnly,placeholder:Re?g.formatMessage({id:"INPUT_SELECT_Has_Reached_Limit"},{limit:l}):u.placeholder,searchable:t,value:I,dataCy:u.dataCy,onChange:re,onKeyDown:te,onClick:u.readOnly?void 0:()=>{if(!F){const le=O.findIndex(Pe=>ci(o,Pe));Z(le>=0?le:0)}U(le=>!le),k(!0)},sizeVariant:u.size,noMargin:c,role:"combobox","aria-expanded":lt,"aria-controls":G+"-menu"}),xe?s.jsx(FW,{onClick:()=>u.onChange("")}):null,Oe?s.jsx(LW,{loading:Y,disabled:u.disabled,onClick:()=>U(le=>!le),open:F&&(!e||!t||!!n||!!I),sizeVariant:u.size,expand:lt,controls:G+"-menu"}):null,lt&&s.jsxs(CW,{id:G+"-menu",ref:V,sizeVariant:u.size,minWidth:!1,children:[L&&s.jsx(vW,{children:s.jsx(H.FormattedMessage,{id:L})}),!u.group&&O.map((le,Pe)=>{const fe=ci(o,le);return s.jsx(Oy,{className:le.custom?"custom":void 0,ref:Pe===W?se:void 0,onClick:Ct=>He(Ct,le),isFocused:Pe===W,"data-cy":u.dataCy&&`${u.dataCy}-option-${y(le)}`,isSelected:fe,"aria-selected":fe,children:u?.components?.Option?s.jsx(u.components.Option,{option:le}):s.jsxs(s.Fragment,{children:[x(le).toString()?g.formatMessage({id:x(le).toString()}):x(le).toString(),u.getDescription&&s.jsx(MW,{children:s.jsx(ee,{size:"s",color:"grey3",children:u.getDescription(le)})})]})},Pe)}),u.group&&D1(O,E).map((le,Pe)=>s.jsxs(wW,{children:[s.jsx(bW,{children:le.label}),s.jsx(xW,{children:le.options.map(fe=>{const Ct=ci(o,fe);return s.jsx(Oy,{onClick:xr=>He(xr,fe),"data-cy":u.dataCy&&`${u.dataCy}-group-${Pe}-option-${y(fe)}`,ref:fe._index===W?se:void 0,isFocused:fe._index===W,isSelected:Ct,"aria-selected":Ct,children:u?.components?.Option?s.jsx(u.components.Option,{option:fe}):x(fe).toString()?g.formatMessage({id:x(fe).toString()}):x(fe).toString()},fe._index)})})]},le.label))]})]})]})},Gi=h.forwardRef(HW),kW={...W7,labels:{labelDayButton:(e,t,n,r)=>{let i=(r??new kt(n)).format(e,"PPPP");return t.today&&(i=`Hoy, ${i}`),t.selected&&(i=`${i}, seleccionado`),i},labelMonthDropdown:"Elegir el mes",labelNext:"Ir al mes siguiente",labelPrevious:"Ir al mes anterior",labelWeekNumber:e=>`Semana ${e}`,labelYearDropdown:"Elegir el año",labelGrid:(e,t,n)=>(n??new kt(t)).formatMonthYear(e),labelGridcell:(e,t,n,r)=>{let i=(r??new kt(n)).format(e,"PPPP");return t?.today&&(i=`Hoy, ${i}`),i},labelNav:"Barra de navegación",labelWeekNumberHeader:"Número de semana",labelWeekday:(e,t,n)=>(n??new kt(t)).format(e,"cccc")}},NW={...w9,labels:{labelDayButton:(e,t,n,r)=>{let i=(r??new kt(n)).format(e,"PPPP");return t.today&&(i=`Aujourd'hui, ${i}`),t.selected&&(i=`${i}, sélectionné`),i},labelMonthDropdown:"Choisir le mois",labelNext:"Aller au mois suivant",labelPrevious:"Aller au mois précédent",labelWeekNumber:e=>`Semaine ${e}`,labelYearDropdown:"Choisir l'année",labelGrid:(e,t,n)=>(n??new kt(t)).formatMonthYear(e),labelGridcell:(e,t,n,r)=>{let i=(r??new kt(n)).format(e,"PPPP");return t?.today&&(i=`Aujourd'hui, ${i}`),i},labelNav:"Barre de navigation",labelWeekNumberHeader:"Numéro de semaine",labelWeekday:(e,t,n)=>(n??new kt(t)).format(e,"cccc")}},UW=`/* Variables declaration */
|
|
2133
2133
|
.rdp-root {
|
|
2134
2134
|
--rdp-accent-color: blue; /* The accent color used for selected days and UI elements. */
|
|
2135
2135
|
--rdp-accent-background-color: #f0f0ff; /* The accent background color used for selected days and UI elements. */
|
|
@@ -2674,7 +2674,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2674
2674
|
display: flex;
|
|
2675
2675
|
flex-direction: column;
|
|
2676
2676
|
overflow: hidden;
|
|
2677
|
-
`,Qv=({children:e})=>e?s.jsx(Wz,{children:e}):s.jsx(s.Fragment,{}),Rv=({title:e,subTitle:t})=>e||t?s.jsxs(zz,{children:[e&&s.jsx(ee,{variant:"h3",color:"grey6",children:e}),t&&s.jsx(ee,{color:"grey5",children:t})]}):s.jsx(s.Fragment,{}),Nn=({title:e,subTitle:t,onClickIconClose:n,overflow:r,options:A,children:i,buttons:o,isFull:a,dataCy:l,isContentBackgroundColor:c})=>s.jsxs($W,{"data-cy":l,children:[(e??n)&&s.jsxs(jS,{className:"modal-header",$modalOverflow:r,children:[s.jsx(Rv,{title:e,subTitle:t}),s.jsx(Qv,{children:A}),n&&s.jsx(FS,{children:s.jsx(Le,{icon:"icon-times",color:"grey5",onClick:n})})]}),i&&(a?s.jsx(Xz,{className:"modal-content",children:i}):s.jsx(RS,{className:"modal-content",$modalOverflow:r,$isContentBackgroundColor:c,children:i})),o&&s.jsx(gv,{$modalOverflow:r,children:o.map((d,u)=>s.jsx(me,{color:d.color,variant:d.variant,onClick:d.clickHandler,dataCy:d.dataCy,disabled
|
|
2677
|
+
`,Qv=({children:e})=>e?s.jsx(Wz,{children:e}):s.jsx(s.Fragment,{}),Rv=({title:e,subTitle:t})=>e||t?s.jsxs(zz,{children:[e&&s.jsx(ee,{variant:"h3",color:"grey6",children:e}),t&&s.jsx(ee,{color:"grey5",children:t})]}):s.jsx(s.Fragment,{}),Nn=({title:e,subTitle:t,onClickIconClose:n,overflow:r,options:A,children:i,buttons:o,isFull:a,dataCy:l,isContentBackgroundColor:c})=>s.jsxs($W,{"data-cy":l,children:[(e??n)&&s.jsxs(jS,{className:"modal-header",$modalOverflow:r,children:[s.jsx(Rv,{title:e,subTitle:t}),s.jsx(Qv,{children:A}),n&&s.jsx(FS,{children:s.jsx(Le,{icon:"icon-times",color:"grey5",onClick:n})})]}),i&&(a?s.jsx(Xz,{className:"modal-content",children:i}):s.jsx(RS,{className:"modal-content",$modalOverflow:r,$isContentBackgroundColor:c,children:i})),o&&s.jsx(gv,{$modalOverflow:r,children:o.map((d,u)=>s.jsx(me,{color:d.color,variant:d.variant,onClick:d.clickHandler,dataCy:d.dataCy,disabled:!!d.disabled||!!d.loading,loader:d.loading,children:d.children},u))})]}),eX=m.div`
|
|
2678
2678
|
display: flex;
|
|
2679
2679
|
flex: 1;
|
|
2680
2680
|
flex-direction: column;
|
|
@@ -3051,7 +3051,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
3051
3051
|
display: flex;
|
|
3052
3052
|
`,MG=({entries:e=[],onPress:t})=>{if(!e.length)return s.jsx(s.Fragment,{});const n=e.length>4,r=e.map((A,i)=>{const o=i<e.length-1?s.jsx(PG,{children:s.jsx(ne,{name:"icon-angle-right",size:10,color:"#989898"})}):s.jsx(s.Fragment,{});return A.type==="folder"||A.type==="rootFolder"?s.jsxs(LG,{onClick:()=>t(A),children:[s.jsx(ne,{name:"icon-folder",color:"folderColor"in A&&A.folderColor?A.folderColor:Hc.get().color.grey3}),s.jsx(qy,{onClick:a=>{a.preventDefault(),t(A)},children:s.jsx(cn,{label:A.title,length:n?4:20})}),o]},A.uri):s.jsx(qy,{children:s.jsx(cn,{label:A.title,length:n?4:20})},A.uri)});return s.jsx(FG,{children:r})},HG=m.div`
|
|
3053
3053
|
margin-bottom: ${({theme:e})=>e.space.sm}px;
|
|
3054
|
-
`,pu=({loadDocuments:e=!1,allowMultiSelection:t=!0,initialFolders:n=[],initialDocuments:r=[],onSelectFolder:A,onSelectDocument:i,handlers:o,onError:a,searchable:l})=>{const c=H.useIntl(),d=kn(),u={id:0,uri:"root/root",type:"rootFolder",title:c.formatMessage({id:"GLOBAL_File_Bank"}),mainType:"article",_user:{id:0,type:"user",uri:"",title:"",mainType:"",_url:"",level:5,dateCreation:"",dateModified:""},dateCreation:"",dateModified:"",_right:{create:!1,read:!1,publish:!1,administrate:!1,update:!1,delete:!1,comment:!1,member:!1},_audience:[],_url:"",_nbItems:0},[f,g]=h.useState([]),[p,v]=h.useState([]),[w,b]=h.useState({}),[C,x]=h.useState(u.uri),[y,B]=h.useState([u]),[E,D]=h.useState(!1),[I,T]=h.useState([]),[Q,F]=h.useState(r),[U,z]=h.useState(n),[k,W]=h.useState([]),[Z,
|
|
3054
|
+
`,pu=({loadDocuments:e=!1,allowMultiSelection:t=!0,initialFolders:n=[],initialDocuments:r=[],onSelectFolder:A,onSelectDocument:i,handlers:o,onError:a,searchable:l})=>{const c=H.useIntl(),d=kn(),u={id:0,uri:"root/root",type:"rootFolder",title:c.formatMessage({id:"GLOBAL_File_Bank"}),mainType:"article",_user:{id:0,type:"user",uri:"",title:"",mainType:"",_url:"",level:5,dateCreation:"",dateModified:""},dateCreation:"",dateModified:"",_right:{create:!1,read:!1,publish:!1,administrate:!1,update:!1,delete:!1,comment:!1,member:!1},_audience:[],_url:"",_nbItems:0},[f,g]=h.useState([]),[p,v]=h.useState([]),[w,b]=h.useState({}),[C,x]=h.useState(u.uri),[y,B]=h.useState([u]),[E,D]=h.useState(!1),[I,T]=h.useState([]),[Q,F]=h.useState(r),[U,z]=h.useState(n),[k,W]=h.useState([]),[Z,Y]=h.useState(!1);h.useEffect(()=>{L()},[]);const J=j=>{Y(!1),Kc(y,j)||B([...y,j]),D(!0),e?M(j.uri):S(j.uri)},Ae=j=>{Kc(y,j)||B([...y,j]),w[j.uri]||b({...w,[j.uri]:{parent:j.uri,folders:[],documents:[],_attachedFiles:j._attachedFiles}}),x(j.uri)},L=h.useCallback(async()=>{o&&(D(!0),o.filebank.getRootFolders({},{signal:d.signal}).then(j=>{j!==void 0&&(g([...f,...j.result.data]),D(!1),b({...w,"root/root":{parent:void 0,folders:j.result.data,documents:[]}}))}).catch(j=>{a&&a(j.errorMsg??c.formatMessage({id:"GLOBAL_Error"}))}))},[d.signal,f,o,c,a,w]),S=async j=>{o&&o.filebank.getFolders(j,{signal:d.signal}).then(G=>{G.result&&!w[j]&&(g([...f,...G.result]),D(!1),b({...w,[j]:{parent:j,folders:G.result,documents:[]}})),x(j)}).catch(G=>{a&&a(G.errorMsg??c.formatMessage({id:"GLOBAL_Error"}))})},M=async j=>{o&&o.filebank.getFolders(j,{signal:d.signal}).then(G=>{G.result&&!w[j]&&g([...f,...G.result]),o.filebank.getDocuments(j,{signal:d.signal}).then(X=>{X.result.data&&!w[j]&&v([...p,...X.result.data]),!w[j]&&G&&X&&b({...w,[j]:{parent:j,folders:G.result,documents:X.result.data}})}).catch(X=>{a&&a(X.errorMsg??c.formatMessage({id:"GLOBAL_Error"}))}),x(j),D(!1)}).catch(G=>{a&&a(G.errorMsg??c.formatMessage({id:"GLOBAL_Error"}))})};h.useEffect(()=>{const j=[];p.forEach(G=>{j.push(...G._attachedFiles)}),T(j)},[p]);const V=j=>j.type==="folder"||j.type==="rootFolder",N=h.useCallback(j=>{if(!j){Y(!1);return}D(!0),Y(!0),C===u.uri?o?.filebank.getRootFolders({query:j}).then(G=>{W(G.result.data)}).finally(()=>{D(!1)}):o?.filebank.searchContent({uri:C,query:j},{format:"raw-list"}).then(G=>{W(G.result.data.filter(V))}).finally(()=>{D(!1)})},[C,o?.filebank,u.uri]);return s.jsxs(s.Fragment,{children:[l&&s.jsx(HG,{children:s.jsx(zi,{onChange:N,onClickSearch:N})}),s.jsx(MG,{entries:y,onPress:j=>{Y(!1);const G=[...y];G.length=y.indexOf(j)+1,j.uri!==C&&(B(G),x(j.uri))}}),E&&s.jsx(QG,{children:s.jsx(Ve,{size:"m"})}),!E&&s.jsxs(s.Fragment,{children:[Z&&(k.length>0?s.jsx(G1,{folders:k,allowMultiSelection:t,onClickFolder:J,onSelectFolder:A!==void 0?j=>{A&&A([...f.filter(G=>j.indexOf(G.uri)!==-1)]),z(j)}:void 0}):s.jsx(X1,{children:c.formatMessage({id:"GLOBAL_No_Result"})})),w[C]&&!Z&&s.jsx(kG,{initialFolders:U,initialDocuments:Q,allowMultiSelection:t,item:w[C],onClickFolder:J,onClickDocumentAsFolder:Ae,onSelectFolder:A!==void 0?j=>{A&&A([...f.filter(G=>j.indexOf(G.uri)!==-1)]),z(j)}:void 0,onSelectDocument:i!==void 0?j=>{i&&i([...I.filter(G=>j.indexOf(G.uri)!==-1)]),F(j)}:void 0})]})]})},kG=({item:e,initialFolders:t,initialDocuments:n,allowMultiSelection:r,onClickFolder:A,onClickDocumentAsFolder:i,onSelectDocument:o,onSelectFolder:a})=>{const l=H.useIntl();return e._attachedFiles?s.jsx(Vy,{children:s.jsx(Ky,{children:s.jsx(jG,{files:e._attachedFiles,initialUris:n,allowMultiSelection:r,onSelectFile:o})})}):s.jsxs(Vy,{children:[s.jsx(G1,{folders:e.folders,initialFolders:t,allowMultiSelection:r,onClickFolder:A,onSelectFolder:a}),s.jsx(RG,{}),s.jsx(Ky,{children:s.jsx(UG,{documents:e.documents,initialDocuments:n,allowMultiSelection:r,onClickDocumentAsFolder:i,onSelectDocument:o})}),e.folders.length===0&&e.documents.length===0?s.jsx(X1,{children:l.formatMessage({id:"GLOBAL_No_Result"})}):s.jsx(s.Fragment,{})]})},NG=({folder:e,onClick:t})=>s.jsxs(ad,{onClick:n=>{n.preventDefault(),t()},href:"#",children:[s.jsx(ne,{name:e._nbItems>0?"icon-folders":"icon-folder",size:40,isMargin:!1}),s.jsx(ld,{children:e.title})]}),G1=({folders:e,initialFolders:t=[],allowMultiSelection:n=!0,onClickFolder:r,onSelectFolder:A})=>{const i=H.useIntl(),[o,a]=h.useState(1),[l,c]=h.useState(t);h.useEffect(()=>{A&&A(l)},[l]);const d={data:e,columns:[{header:i.formatMessage({id:"GLOBAL_Title"}),id:"title",cell:({row:u})=>s.jsx(kv,{opacity:Li(l,u.original.uri)?.4:1,children:s.jsx(NG,{folder:u.original,onClick:()=>r(u.original)})}),size:400,enableSorting:!1},{header:" ",id:"count",maxSize:100,enableSorting:!1,cell:({row:u})=>u.original.type==="folder"&&s.jsxs(z1,{children:[u.original._nbItems," ",i.formatMessage({id:"FOLDER_Nb_Elements"})]})},{header:" ",enableSorting:!1,cell:({row:u})=>{const f=Li(l,u.original.uri)?"contained":"outlined";return A?s.jsx(Hv,{children:s.jsx(me,{onClick:()=>c(n?Nv(l,u.original.uri):[u.original.uri]),type:"button",color:"primary",variant:f,children:i.formatMessage({id:"GLOBAL_Select"})})}):s.jsx(W1,{children:s.jsx(ne,{name:"icon-angle-right",size:32})})}}],config:{manualSortBy:!1,draggable:!1,pagination:{page:o,perPage:10,nbResults:e.length}}};return e.length?s.jsxs(s.Fragment,{children:[s.jsx(ee,{size:"l",children:i.formatMessage({id:"GLOBAL_Folders"})}),s.jsx(hu,{eventHandlers:{onPage:a},...d})]}):s.jsx(s.Fragment,{})},UG=({documents:e,initialDocuments:t,allowMultiSelection:n=!0,onClickDocumentAsFolder:r,onSelectDocument:A})=>{const i=H.useIntl(),[o,a]=h.useState(1),[l,c]=h.useState(t);h.useEffect(()=>{A&&A(l)},[l]);const d={data:e,columns:[{header:i.formatMessage({id:"GLOBAL_Title"}),id:"title",cell:({row:u})=>u.original._attachedFiles?.[0]!==void 0&&u.original._attachedFiles.length===1?s.jsxs(em,{children:[s.jsx(tm,{children:s.jsx(kv,{opacity:Li(l,u.original._attachedFiles[0].uri)?.4:1,children:s.jsxs(ad,{children:[s.jsx(Pr,{uri:_.resolveFilePath(u.original._attachedFiles[0]),size:40,mimetype:u.original._attachedFiles[0].mimetype}),s.jsx(ld,{children:u.original._attachedFiles[0].title})]})})}),s.jsx(U1,{children:A?s.jsx(Hv,{children:s.jsx(me,{onClick:()=>c(n?Nv(l,u.original._attachedFiles[0].uri):[u.original._attachedFiles[0].uri]),type:"button",color:"primary",variant:Li(l,u.original._attachedFiles[0].uri)?"contained":"outlined",children:i.formatMessage({id:"GLOBAL_Select"})})}):s.jsx(s.Fragment,{})})]}):s.jsx(s.Fragment,{children:s.jsxs(em,{onClick:()=>r(u.original),children:[s.jsx(tm,{children:s.jsxs(ad,{children:[s.jsx(Pr,{uri:void 0,size:40,mimetype:"undefined"}),s.jsxs(ld,{children:[u.original.title,s.jsx(zG,{uris:l,document:u.original})]})]})}),s.jsxs(z1,{children:[u.original._attachedFiles.length," ",i.formatMessage({id:"ARTICLE_Nb_Elements"})]}),s.jsx(W1,{children:s.jsx(ne,{name:"icon-angle-right",size:32})})]})}),size:400,enableSorting:!1}],config:{manualSortBy:!1,draggable:!1,pagination:{page:o,perPage:10,nbResults:e.length}}};return e.length?s.jsxs(s.Fragment,{children:[s.jsx(ee,{size:"l",children:i.formatMessage({id:"GLOBAL_Documents"})}),s.jsx(hu,{eventHandlers:{onPage:a},...d})]}):s.jsx(s.Fragment,{})},zG=({uris:e,document:t})=>{const n=H.useIntl();return s.jsxs(OG,{children:[t._attachedFiles.filter(r=>e.includes(r.uri)).length," ",n.formatMessage({id:"ARTICLE_Nb_Selected_Elements"})]})},WG=m.div`
|
|
3055
3055
|
display: flex;
|
|
3056
3056
|
align-items: center;
|
|
3057
3057
|
gap: 12px;
|
|
@@ -3209,7 +3209,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
3209
3209
|
background: ${({theme:e})=>e.color.white};
|
|
3210
3210
|
z-index: 2;
|
|
3211
3211
|
padding-top: ${({theme:e})=>e.space.md}px;
|
|
3212
|
-
`,aV=(e,t)=>{const{id:n=`file-${Mn()}`,name:r="attachment",content:A,token:i=void 0,accept:o,multiple:a=!1,limit:l=10,required:c=!1,network:d,onUploadSuccess:u,onUploadStart:f,onDeleteSuccess:g,existingFiles:p,deleteFile:v}=e,w=H.useIntl(),[b,C]=h.useState(0),[x]=h.useState(!1),[y,B]=h.useState(!1),[E,D]=h.useState(rV),[I,T]=h.useState(p?.map(te=>({...te,loading:!1}))??[]),[Q,F]=h.useState(!!e.directFilePopupOpening),[U,z]=h.useState("upload"),[k,W]=h.useState([]),[Z,
|
|
3212
|
+
`,aV=(e,t)=>{const{id:n=`file-${Mn()}`,name:r="attachment",content:A,token:i=void 0,accept:o,multiple:a=!1,limit:l=10,required:c=!1,network:d,onUploadSuccess:u,onUploadStart:f,onDeleteSuccess:g,existingFiles:p,deleteFile:v}=e,w=H.useIntl(),[b,C]=h.useState(0),[x]=h.useState(!1),[y,B]=h.useState(!1),[E,D]=h.useState(rV),[I,T]=h.useState(p?.map(te=>({...te,loading:!1}))??[]),[Q,F]=h.useState(!!e.directFilePopupOpening),[U,z]=h.useState("upload"),[k,W]=h.useState([]),[Z,Y]=h.useState(!1),[J,Ae]=h.useState([]),[L,S]=h.useState(),M=h.useMemo(()=>({fileBank:w.formatMessage({id:"INPUT_FILE_ADVANCED_FileBank"}),drive_microsoft_graph:w.formatMessage({id:"INPUT_FILE_ADVANCED_Microsoft_365"}),drive_dropbox:w.formatMessage({id:"INPUT_FILE_ADVANCED_Dropbox"}),drive_google:w.formatMessage({id:"INPUT_FILE_ADVANCED_Google_Drive"}),upload:w.formatMessage({id:"GLOBAL_Import"})}),[w]),V=h.useCallback(te=>{const xe=te.target,Oe=xe.files,Te=[];for(let Re=0;Re<Oe.length;Re++)Te.push(Object.assign(Oe[Re],{id:Mn()}));if(e.maxFileSize&&Te.find(lt=>lt.size>e.maxFileSize)){e.dispatchOnError?.("INPUT_FILE_ADVANCED_File_Too_Large"),xe.value="";return}if(a&&l!==1)D({...E,files:a?[...E.files,...Te]:Te}),f&&f(Te.length);else if(f&&f(),d&&"getUrl"in d&&"token"in d&&"postFile"in d){const Re=new FormData;Re.append("attrName",r),Re.append(r,Te[0]),i!==void 0&&Re.append("token",i),d.postFile(Re).then(lt=>{u&&u(lt.response.result,lt.token)})}else nm(Te[0],i,r).then(Re=>{u&&u(Re.result,Re.token)})},[l,a,r,f,u,i,E,d]),N=h.useCallback(te=>new Promise((xe,Oe)=>{v&&(T(I?.map(Te=>Te.id===te?{...Te,loading:!0}:Te)),v(te).then(()=>{T(I?.filter(Te=>Te.id!==te)),xe()}).catch(()=>{T(I?.map(Te=>Te.id===te?{...Te,loading:!1}:Te)),Oe()}))}),[v,I]),j=h.useCallback(te=>{B(!0),te.preventDefault()},[]),G=h.useCallback(te=>{te.preventDefault();const xe=te.dataTransfer.files,Oe=[];for(let Te=0;Te<xe.length;Te++)Oe.push(xe[Te]);if(e.maxFileSize&&Oe.find(Re=>Re.size>e.maxFileSize)){e.dispatchOnError?.("INPUT_FILE_ADVANCED_File_Too_Large"),B(!1);return}if(a&&l!==1)D({...E,files:a?[...E.files,...Oe]:Oe}),f&&f(Oe.length);else{if(d&&"getUrl"in d&&"token"in d&&"postFile"in d){const Te=new FormData;Te.append("attrName",r),Te.append(r,Oe[0]),i!==void 0&&Te.append("token",i),d.postFile(Te).then(Re=>{u&&u(Re.response.result,Re.token)})}else nm(Oe[0],i,r).then(Te=>{u&&u(Te.result,Te.token)});f&&f()}},[l,a,r,f,u,i,E,d]),X=h.useCallback(te=>{te.stopPropagation(),F(!0)},[]),O=h.useCallback(()=>{k.forEach(te=>{v&&v(te.id).then(()=>{W([])})}),Ae([])},[v,k]),oe=h.useCallback(()=>{e.directFilePopupOpening?e.directFilePopupOpening.onClose():F(!1),O()},[O,e.directFilePopupOpening]),se=h.useCallback(()=>{e.directFilePopupOpening?e.directFilePopupOpening.onClose():F(!1),W([]),Ae([]),Y(!1)},[e.directFilePopupOpening]),He=h.useMemo(()=>U.replace(/(drive_|_)/g,""),[U]),re=h.useCallback(()=>{k.length>0&&e.handlers?.file.copy?(Y(!0),Promise.all(k.map(async te=>{let xe=te;return te.type==="fileArticle"&&e.handlers?.file.copy&&(xe=(await e.handlers.file.copy({id:te.id,token:i,attrName:"attachment"})).result),{...xe,loading:!1}})).then(te=>{T([...I,...te]),u&&te.forEach(xe=>u(xe)),se()})):J.length>0&&L&&e.handlers?.drive.getDocument&&(Y(!0),Promise.all(J.map(async te=>(await e.handlers?.drive.getDocument({token:i,attrName:"attachment",file:{mimetype:te.mimetype,service:He,account:L.id,title:te.title,_document:te}}))?.result??{id:0,mimetype:"",title:"",type:"",loading:!0})).then(te=>{T([...I,...te.map(xe=>({...xe,loading:!1}))]),u&&te.forEach(xe=>u(xe)),se()}))},[k,e.handlers,J,L,i,I,u,se,He]);return h.useEffect(()=>{F(e.directFilePopupOpening?.open??!1)},[e.directFilePopupOpening]),s.jsxs(s.Fragment,{children:[x?s.jsx(Jy,{children:s.jsx(Ve,{})}):s.jsxs(s.Fragment,{children:[s.jsxs(nV,{children:[s.jsx(tV,{ref:t,id:n,type:e.directFilePopupOpening?"hidden":"file",required:c,name:r,multiple:a,accept:o,onChange:V,disabled:e.activeDrives&&e.activeDrives.length>0}),!e.directFilePopupOpening&&s.jsx(Jy,{className:y!==null&&y?"label-input-file dropHover":"label-input-file initHover",htmlFor:!e.activeDrives||e.activeDrives.length===0?n:void 0,onClick:e.activeDrives&&e.activeDrives.length>0?X:void 0,onMouseLeave:()=>B(!1),onDragLeave:()=>B(!1),onDrop:G,onDragOver:j,children:A??w.formatMessage({id:"FILE_Upload_Label"})})]}),a&&l!==1?s.jsx(oV,{children:E.files.map((te,xe)=>s.jsx(eV,{file:te,index:xe,token:i,attrName:r,step:b,onUploadSuccess:(Oe,Te)=>{C(Re=>Re+1),u&&u(Oe,Te)},onDeleteSuccess:()=>{D(Oe=>({...Oe,files:Oe.files.filter((Te,Re)=>Re!==xe)})),g&&g(xe)}},te.id))}):s.jsx(s.Fragment,{})]}),I&&I.length!==0&&s.jsxs(s.Fragment,{children:[s.jsx(AV,{children:s.jsx(No,{size:"s",children:w.formatMessage({id:"FILE_Existing_Files_Label"})})}),s.jsx(iV,{children:s.jsx(Ko,{files:I,onDelete:te=>N(te),mode:"edit"})})]}),(!!e.activeDrives&&e.activeDrives.length>0||!!e.directFilePopupOpening)&&s.jsx(dn,{open:Q,closeHandler:oe,variant:"fixed-height",children:s.jsxs(Nn,{overflow:"scroll",onClickIconClose:oe,title:w.formatMessage({id:"GLOBAL_Files"}),buttons:[{color:"cancel",clickHandler:oe,children:w.formatMessage({id:"GLOBAL_Cancel"}),dataCy:"inputFile-modal-cancel-btn"},{color:"valid",clickHandler:re,disabled:k.length===0&&J.length===0,loading:Z,children:w.formatMessage({id:"GLOBAL_Add"}),dataCy:"inputFile-modal-add-btn"}],children:[s.jsx(sV,{children:s.jsx(mu,{direction:"horizontal",callback:te=>{z(te),O()},entries:[{label:w.formatMessage({id:"GLOBAL_Import"}),key:"upload"},...e.activeDrives?.map(te=>({key:te,label:M[te]}))??[]],activeItem:U})}),U==="upload"&&s.jsx(Fa,{onUploadStart:()=>Y(!0),onUploadSuccess:te=>{Y(!1),W(xe=>[...xe,te])},token:i,multiple:a,deleteFile:async te=>{W(xe=>xe.filter((Oe,Te)=>te!==Te)),v&&await v(te)},id:"inner-input-file",dispatchOnError:e.dispatchOnError}),U==="fileBank"&&e.handlers&&s.jsx(pu,{handlers:e.handlers,onError:e.dispatchOnError,onSelectDocument:te=>W(te),loadDocuments:!0,allowMultiSelection:!0}),U==="drive_microsoft_graph"&&e.handlers&&s.jsx(xD,{useDocumentFilters:[],onSelectMultiDocument:Ae,onError:e.dispatchOnError,handlers:e.handlers,handleLogin:!0,onLogin:S,onLogout:()=>S(void 0)}),U==="drive_dropbox"&&e.handlers&&s.jsx(bD,{useDocumentFilters:[],onSelectMultiDocument:Ae,onError:e.dispatchOnError,handlers:e.handlers,handleLogin:!0,onLogin:S,onLogout:()=>S(void 0)}),U==="drive_google"&&s.jsx(ss,{variant:"info",message:w.formatMessage({id:"DRIVE_Google_Not_Available"})})]})})]})},Fa=h.forwardRef(aV),Yy={"4:3":75,"5:4":80,"16:9":56.25,1:100,"3:4":133,"4:5":125,"9:16":178},lV=m(mv)`
|
|
3213
3213
|
position: relative;
|
|
3214
3214
|
`,K1=m.css`
|
|
3215
3215
|
${e=>e.img&&`background-image: url("${e.img}")`};
|
|
@@ -3443,7 +3443,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
3443
3443
|
}
|
|
3444
3444
|
`,PV=m.span`
|
|
3445
3445
|
${Hr}
|
|
3446
|
-
`;function MV(e,t){if(e.dataTransfer.items){const n=Array.from(e.dataTransfer.items??[])?.[0];if(n?.kind==="file"&&t.some(r=>n.type.endsWith(r)))return!0}else{const n=Array.from(e.dataTransfer.files??[])?.[0];if(n&&t.some(r=>n.type.endsWith(r)))return!0}return!1}function HV(e,t){if(e.dataTransfer.items){const n=Array.from(e.dataTransfer.items??[])?.[0];if(n?.kind==="file"&&t.some(r=>n.type.endsWith(r)))return n.getAsFile()??void 0}else{const n=Array.from(e.dataTransfer.files??[])?.[0];if(n&&t.some(r=>n.type.endsWith(r)))return n}}const kV=({onChange:e,onLoading:t,onCrop:n,dzDimensions:r,value:A,disableCrop:i,buttonsPosition:o="inside",allowCustomRatio:a,zIndex:l,label:c,deferServerCalls:d=!1,...u},f)=>{const[g,p]=h.useState(!1),v=h.useRef(null),[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y]=h.useState(u.accept?.split(",").map(j=>j.replace(/\./g,""))??["jpg","jpeg","png"]),[B]=h.useState(u.aspectRatio),[E,D]=h.useState(0),[I,T]=h.useState(!1),[Q,F]=h.useState(A),[U,z]=h.useState();h.useEffect(()=>()=>{U&&URL.revokeObjectURL(U)},[U]);const k=h.useMemo(()=>{if(U)return U;if(Q)return`/imagecache/original/${Q.type}/${Q.id}.png?_=${Q.dateModified?ni(Q.dateModified):Date.now()}-${E}`},[Q,E,U]),W=u.attrName??u.name;h.useImperativeHandle(f,()=>({click(){v?.current?.click?.()}}),[]);function Z(j){j.preventDefault(),j.stopPropagation(),!g&&MV(j,y)&&p(!0)}function
|
|
3446
|
+
`;function MV(e,t){if(e.dataTransfer.items){const n=Array.from(e.dataTransfer.items??[])?.[0];if(n?.kind==="file"&&t.some(r=>n.type.endsWith(r)))return!0}else{const n=Array.from(e.dataTransfer.files??[])?.[0];if(n&&t.some(r=>n.type.endsWith(r)))return!0}return!1}function HV(e,t){if(e.dataTransfer.items){const n=Array.from(e.dataTransfer.items??[])?.[0];if(n?.kind==="file"&&t.some(r=>n.type.endsWith(r)))return n.getAsFile()??void 0}else{const n=Array.from(e.dataTransfer.files??[])?.[0];if(n&&t.some(r=>n.type.endsWith(r)))return n}}const kV=({onChange:e,onLoading:t,onCrop:n,dzDimensions:r,value:A,disableCrop:i,buttonsPosition:o="inside",allowCustomRatio:a,zIndex:l,label:c,deferServerCalls:d=!1,...u},f)=>{const[g,p]=h.useState(!1),v=h.useRef(null),[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y]=h.useState(u.accept?.split(",").map(j=>j.replace(/\./g,""))??["jpg","jpeg","png"]),[B]=h.useState(u.aspectRatio),[E,D]=h.useState(0),[I,T]=h.useState(!1),[Q,F]=h.useState(A),[U,z]=h.useState();h.useEffect(()=>()=>{U&&URL.revokeObjectURL(U)},[U]);const k=h.useMemo(()=>{if(U)return U;if(Q)return`/imagecache/original/${Q.type}/${Q.id}.png?_=${Q.dateModified?ni(Q.dateModified):Date.now()}-${E}`},[Q,E,U]),W=u.attrName??u.name;h.useImperativeHandle(f,()=>({click(){v?.current?.click?.()}}),[]);function Z(j){j.preventDefault(),j.stopPropagation(),!g&&MV(j,y)&&p(!0)}function Y(j){j.preventDefault(),j.stopPropagation(),p(!1)}function J(j){j.preventDefault(),j.stopPropagation(),p(!1);const G=HV(j,y);G&&W&&u.token&&(b(!0),_.file.upload({attrName:W,file:G,token:u.token}).then(X=>{F(X.response.result),e(X.response.result)}).finally(()=>b(!1)))}function Ae(){v?.current?.click?.()}const L=j=>{if(d){const X=j[0];U&&URL.revokeObjectURL(U),z(URL.createObjectURL(X)),F({id:0,type:"fileTmp",mimetype:X.type}),e(X);return}const G=j;G.length===1&&G[0].result&&(F(G[0].result),e(G[0].result))};function S(j){!W||!u.token||(b(!0),_.file.upload({attrName:W,url:j,token:u.token}).then(G=>{F(G.response.result),e(G.response.result)}).finally(()=>b(!1)))}function M(j){if(!Q)return;if(T(!0),d){const X=new Image;X.onload=()=>{const O=document.createElement("canvas"),oe=O.getContext("2d");if(!oe){T(!1);return}O.width=j.width,O.height=j.height;const se=j.rotation*Math.PI/180,He=Math.abs(Math.cos(se)),re=Math.abs(Math.sin(se)),te=X.naturalWidth*He+X.naturalHeight*re,xe=X.naturalWidth*re+X.naturalHeight*He;oe.translate(-j.x,-j.y),oe.translate(te/2,xe/2),oe.rotate(se),oe.drawImage(X,-X.naturalWidth/2,-X.naturalHeight/2),O.toBlob(Oe=>{Oe&&(U&&URL.revokeObjectURL(U),z(URL.createObjectURL(Oe)),x(!1),D(E+1),Q.id!==0&&n?n({x:j.x,y:j.y,w:j.width,h:j.height,rotation:j.rotation,killSize:!0}):e(new File([Oe],"cropped.png",{type:"image/png"}))),T(!1)},"image/png")},X.onerror=()=>T(!1),X.src=k??"";return}const G={x:j.x,y:j.y,w:j.width,h:j.height,rotation:j.rotation,killSize:!0};_.file.update(Q.id,Q.type,G).then(X=>{x(!1),D(E+1),F(X.result),e({...Q,...X.result})}).finally(()=>{T(!1)})}function V(){if(Q&&W&&u.token){if(b(!0),d){D(0),F(void 0),U&&(URL.revokeObjectURL(U),z(void 0)),e(void 0),b(!1);return}W==="image"&&Q?.type!=="fileTmp"?_.file.deleteImage(Q.id,Q?.type).then(()=>{D(0),F(void 0),e(void 0)}).finally(()=>b(!1)):_.file.deleteFile(Q.id,W,u.token).then(()=>{D(0),F(void 0),e(void 0)}).finally(()=>b(!1))}}h.useEffect(()=>{t?.(w)},[w,t]);const N=u.defaultImages??{imgs:[],columnCount:1};return s.jsx(s.Fragment,{children:u.readOnly?s.jsx(QV,{src:u.readOnlyImg,alt:""}):s.jsxs(s.Fragment,{children:[s.jsx(IV,{children:d?s.jsx(Vp,{...u,accept:y.map(j=>"."+j).join(","),onLoading:b,onChange:j=>L(j),ref:v,value:Q,deferServerCalls:!0}):s.jsx(Vp,{...u,accept:y.map(j=>"."+j).join(","),onLoading:b,onChange:j=>L(j),ref:v,value:Q})}),s.jsxs(TV,{position:N.position,columnCount:N.columnCount,children:[s.jsxs(OV,{position:N.position,columnCount:N.columnCount,dzDimensions:r,children:[s.jsx(RV,{role:"input",type:"button",$dzDimensions:r,$aspectRatio:B,className:[g?"is-dragged":void 0,w?"is-loading":void 0].join(" "),onDragOver:Z,onDragEnter:Z,onDragEnd:Y,onDragLeave:Y,onDrop:J,onClick:Ae,disabled:w,"data-cy":u.dataCy,children:Q?Q.mimetype!=="image/gif"?s.jsx(jV,{src:k,alt:""}):s.jsx("p",{children:Q.title}):s.jsxs(s.Fragment,{children:[s.jsx(PV,{children:c}),s.jsx("img",{src:SV,alt:"",style:{zIndex:2}}),s.jsx("p",{style:{zIndex:2},children:y.join(", ")})]})}),Q&&s.jsxs(q1,{position:{y:o==="inside"?"bottom":"under"},children:[s.jsx(Le,{bgBaseGrey:1,type:"button",icon:"icon-trash",tooltip:{description:"GLOBAL_Delete"},onClick:j=>{V(),j?.preventDefault()}}),!i&&Q.mimetype!=="image/gif"&&s.jsx(Le,{bgBaseGrey:1,type:"button",icon:"icon-crop",tooltip:{description:"CROP_Crop"},onClick:j=>{x(!0),j?.preventDefault()}})]})]}),N.imgs.map(({src:j,alt:G})=>s.jsx(FV,{type:"button",aspectRatio:B,onClick:()=>S(j),children:s.jsx(LV,{src:j,alt:G})},j))]}),Q&&C&&s.jsx(Uv,{zIndex:l,open:C,aspectRatio:B,allowCustomRatio:a,src:k,save:M,closeHandler:()=>{x(!1)},loading:I})]})})},NV=h.forwardRef(kV);function vu(e){return s.jsx(Ft,{...e,htmlFor:e.name,renderFunction:({value:t,...n})=>s.jsx(NV,{...e,...n,value:t??e.fieldDefaultValue})})}const UV=m.div`
|
|
3447
3447
|
display: flex;
|
|
3448
3448
|
gap: 10px;
|
|
3449
3449
|
`,zV=(e,t)=>s.jsx(UV,{children:s.jsx(br,{type:"file",id:e.name,...e,onChange:n=>{e.onChange?.(n.target.files?.[0])},ref:t})}),J1=h.forwardRef(zV);function WV(e){return s.jsx(Ft,{...e,renderFunction:({value:t,onChange:n,...r})=>s.jsx(J1,{...e,...r,onChange:n})})}const XV=(e,t)=>s.jsx(lu,{type:"password",id:e.name,...e,ref:t}),GV=h.forwardRef(XV);function VV(e){return s.jsx(Ft,{...e,renderFunction:({value:t,...n})=>s.jsx(GV,{...e,...n,value:t,ref:n.ref})})}const KV=function({iconBefore:e="icon-search",iconButtonAfter:t,...n},r){const[A,i]=h.useState(!1),o=()=>i(!0),a=()=>i(!1);return s.jsxs(_z,{children:[e&&s.jsx(Jz,{name:e,color:A?"navy":"grey2"}),s.jsx(Zz,{type:"text",id:n.name,...n,ref:r,onFocus:o,onBlur:a,hasIconButtonAfter:!!t}),t&&s.jsx(Yz,{icon:t.icon,onClick:t.onClick,srOnly:t.srOnly,"aria-expanded":t.ariaExpanded,"aria-controls":t.ariaControls})]})},qV=h.forwardRef(KV);function JV(e){return s.jsx(Ft,{...e,renderFunction:t=>s.jsx(qV,{...e,...t})})}const YV=m.textarea`
|
|
@@ -3473,8 +3473,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
3473
3473
|
padding-right: 5px;
|
|
3474
3474
|
`,nK=m(br)`
|
|
3475
3475
|
width: '100%';
|
|
3476
|
-
`,rK=(e,t)=>s.jsx(nK,{type:"text",id:e.name,...e,ref:t}),AK=h.forwardRef(rK);function La(e){const t=H.useIntl(),[n,r]=h.useState("grey3"),A=o=>r(o?"yellow":"grey3");function i(){return!!(e.isRequired&&e.value===void 0||e.value===null||e.value===""||Array.isArray(e.value)&&!e.value.length)}return s.jsxs($V,{className:e.className,margin:e.margin,width:e.width,children:[(!!e.label||!!e.helper||!!e.description||e.isRequired&&!e.readOnly)&&s.jsx(qE,{htmlFor:e.htmlFor??e.name,labelIsLegend:e.labelIsLegend,children:s.jsxs(tK,{children:[s.jsxs("div",{children:[e.label&&e.label,e.helper&&s.jsx(KE,{tooltip:e.helper,color:n}),e.description&&s.jsx(YE,{children:e.description})]}),e.isRequired&&!e.readOnly&&s.jsx(eK,{error:i(),children:t.formatMessage({id:"GLOBAL_Form_Controls_Required"})})]})}),s.jsx("div",{className:"input-wrapper",onFocus:()=>A(!0),onBlur:()=>A(!1),children:s.jsx(AK,{...e,ref:e.customRef})}),s.jsx(JE,{error:e.errors})]})}const iK=(e,t)=>s.jsx(br,{type:"time",id:e.name,...e,ref:t}),oK=h.forwardRef(iK);function sK(e){return s.jsx(Ft,{...e,renderFunction:({value:t,...n})=>s.jsx(oK,{...e,...n,value:t})})}var Ml={exports:{}},Hl={exports:{}},et={};var tC;function aK(){if(tC)return et;tC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,A=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(B){if(typeof B=="object"&&B!==null){var E=B.$$typeof;switch(E){case t:switch(B=B.type,B){case l:case c:case r:case i:case A:case u:return B;default:switch(B=B&&B.$$typeof,B){case a:case d:case p:case g:case o:return B;default:return E}}case n:return E}}}function y(B){return x(B)===c}return et.AsyncMode=l,et.ConcurrentMode=c,et.ContextConsumer=a,et.ContextProvider=o,et.Element=t,et.ForwardRef=d,et.Fragment=r,et.Lazy=p,et.Memo=g,et.Portal=n,et.Profiler=i,et.StrictMode=A,et.Suspense=u,et.isAsyncMode=function(B){return y(B)||x(B)===l},et.isConcurrentMode=y,et.isContextConsumer=function(B){return x(B)===a},et.isContextProvider=function(B){return x(B)===o},et.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===t},et.isForwardRef=function(B){return x(B)===d},et.isFragment=function(B){return x(B)===r},et.isLazy=function(B){return x(B)===p},et.isMemo=function(B){return x(B)===g},et.isPortal=function(B){return x(B)===n},et.isProfiler=function(B){return x(B)===i},et.isStrictMode=function(B){return x(B)===A},et.isSuspense=function(B){return x(B)===u},et.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===A||B===u||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===g||B.$$typeof===o||B.$$typeof===a||B.$$typeof===d||B.$$typeof===w||B.$$typeof===b||B.$$typeof===C||B.$$typeof===v)},et.typeOf=x,et}var tt={};var nC;function lK(){return nC||(nC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,A=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(re){return typeof re=="string"||typeof re=="function"||re===r||re===c||re===i||re===A||re===u||re===f||typeof re=="object"&&re!==null&&(re.$$typeof===p||re.$$typeof===g||re.$$typeof===o||re.$$typeof===a||re.$$typeof===d||re.$$typeof===w||re.$$typeof===b||re.$$typeof===C||re.$$typeof===v)}function y(re){if(typeof re=="object"&&re!==null){var te=re.$$typeof;switch(te){case t:var xe=re.type;switch(xe){case l:case c:case r:case i:case A:case u:return xe;default:var Oe=xe&&xe.$$typeof;switch(Oe){case a:case d:case p:case g:case o:return Oe;default:return te}}case n:return te}}}var B=l,E=c,D=a,I=o,T=t,Q=d,F=r,U=p,z=g,k=n,W=i,Z=A,J=u,Y=!1;function Ae(re){return Y||(Y=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(re)||y(re)===l}function L(re){return y(re)===c}function S(re){return y(re)===a}function M(re){return y(re)===o}function V(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function N(re){return y(re)===d}function j(re){return y(re)===r}function G(re){return y(re)===p}function X(re){return y(re)===g}function O(re){return y(re)===n}function oe(re){return y(re)===i}function se(re){return y(re)===A}function He(re){return y(re)===u}tt.AsyncMode=B,tt.ConcurrentMode=E,tt.ContextConsumer=D,tt.ContextProvider=I,tt.Element=T,tt.ForwardRef=Q,tt.Fragment=F,tt.Lazy=U,tt.Memo=z,tt.Portal=k,tt.Profiler=W,tt.StrictMode=Z,tt.Suspense=J,tt.isAsyncMode=Ae,tt.isConcurrentMode=L,tt.isContextConsumer=S,tt.isContextProvider=M,tt.isElement=V,tt.isForwardRef=N,tt.isFragment=j,tt.isLazy=G,tt.isMemo=X,tt.isPortal=O,tt.isProfiler=oe,tt.isStrictMode=se,tt.isSuspense=He,tt.isValidElementType=x,tt.typeOf=y})()),tt}var rC;function Z1(){return rC||(rC=1,process.env.NODE_ENV==="production"?Hl.exports=aK():Hl.exports=lK()),Hl.exports}var kg,AC;function cK(){if(AC)return kg;AC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function A(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(d){return o[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return kg=A()?Object.assign:function(i,o){for(var a,l=r(i),c,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var u in a)t.call(a,u)&&(l[u]=a[u]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},kg}var Ng,iC;function Wv(){if(iC)return Ng;iC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ng=e,Ng}var Ug,oC;function _1(){return oC||(oC=1,Ug=Function.call.bind(Object.prototype.hasOwnProperty)),Ug}var zg,sC;function dK(){if(sC)return zg;sC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wv(),n={},r=_1();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function A(i,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var u;try{if(typeof i[d]!="function"){var f=Error((l||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=i[d](o,d,l,a,null,t)}catch(p){u=p}if(u&&!(u instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var g=c?c():"";e("Failed "+a+" type: "+u.message+(g??""))}}}}return A.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},zg=A,zg}var Wg,aC;function uK(){if(aC)return Wg;aC=1;var e=Z1(),t=cK(),n=Wv(),r=_1(),A=dK(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Wg=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(L){var S=L&&(c&&L[c]||L[d]);if(typeof S=="function")return S}var f="<<anonymous>>",g={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:x,element:y(),elementType:B(),instanceOf:E,node:Q(),objectOf:I,oneOf:D,oneOfType:T,shape:U,exact:z};function p(L,S){return L===S?L!==0||1/L===1/S:L!==L&&S!==S}function v(L,S){this.message=L,this.data=S&&typeof S=="object"?S:{},this.stack=""}v.prototype=Error.prototype;function w(L){if(process.env.NODE_ENV!=="production")var S={},M=0;function V(j,G,X,O,oe,se,He){if(O=O||f,se=se||X,He!==n){if(l){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var te=O+":"+X;!S[te]&&M<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),S[te]=!0,M++)}}return G[X]==null?j?G[X]===null?new v("The "+oe+" `"+se+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new v("The "+oe+" `"+se+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:L(G,X,O,oe,se)}var N=V.bind(null,!1);return N.isRequired=V.bind(null,!0),N}function b(L){function S(M,V,N,j,G,X){var O=M[V],oe=Z(O);if(oe!==L){var se=J(O);return new v("Invalid "+j+" `"+G+"` of type "+("`"+se+"` supplied to `"+N+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return w(S)}function C(){return w(o)}function x(L){function S(M,V,N,j,G){if(typeof L!="function")return new v("Property `"+G+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var X=M[V];if(!Array.isArray(X)){var O=Z(X);return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected an array."))}for(var oe=0;oe<X.length;oe++){var se=L(X,oe,N,j,G+"["+oe+"]",n);if(se instanceof Error)return se}return null}return w(S)}function y(){function L(S,M,V,N,j){var G=S[M];if(!a(G)){var X=Z(G);return new v("Invalid "+N+" `"+j+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return w(L)}function B(){function L(S,M,V,N,j){var G=S[M];if(!e.isValidElementType(G)){var X=Z(G);return new v("Invalid "+N+" `"+j+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return w(L)}function E(L){function S(M,V,N,j,G){if(!(M[V]instanceof L)){var X=L.name||f,O=Ae(M[V]);return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected ")+("instance of `"+X+"`."))}return null}return w(S)}function D(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function S(M,V,N,j,G){for(var X=M[V],O=0;O<L.length;O++)if(p(X,L[O]))return null;var oe=JSON.stringify(L,function(He,re){var te=J(re);return te==="symbol"?String(re):re});return new v("Invalid "+j+" `"+G+"` of value `"+String(X)+"` "+("supplied to `"+N+"`, expected one of "+oe+"."))}return w(S)}function I(L){function S(M,V,N,j,G){if(typeof L!="function")return new v("Property `"+G+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected an object."));for(var oe in X)if(r(X,oe)){var se=L(X,oe,N,j,G+"."+oe,n);if(se instanceof Error)return se}return null}return w(S)}function T(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var S=0;S<L.length;S++){var M=L[S];if(typeof M!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(M)+" at index "+S+"."),o}function V(N,j,G,X,O){for(var oe=[],se=0;se<L.length;se++){var He=L[se],re=He(N,j,G,X,O,n);if(re==null)return null;re.data&&r(re.data,"expectedType")&&oe.push(re.data.expectedType)}var te=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new v("Invalid "+X+" `"+O+"` supplied to "+("`"+G+"`"+te+"."))}return w(V)}function Q(){function L(S,M,V,N,j){return k(S[M])?null:new v("Invalid "+N+" `"+j+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return w(L)}function F(L,S,M,V,N){return new v((L||"React class")+": "+S+" type `"+M+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function U(L){function S(M,V,N,j,G){var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type `"+O+"` "+("supplied to `"+N+"`, expected `object`."));for(var oe in L){var se=L[oe];if(typeof se!="function")return F(N,j,G,oe,J(se));var He=se(X,oe,N,j,G+"."+oe,n);if(He)return He}return null}return w(S)}function z(L){function S(M,V,N,j,G){var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type `"+O+"` "+("supplied to `"+N+"`, expected `object`."));var oe=t({},M[V],L);for(var se in oe){var He=L[se];if(r(L,se)&&typeof He!="function")return F(N,j,G,se,J(He));if(!He)return new v("Invalid "+j+" `"+G+"` key `"+se+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(M[V],null," ")+`
|
|
3477
|
-
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."+se,n);if(re)return re}return null}return w(S)}function k(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(k);if(L===null||a(L))return!0;var S=u(L);if(S){var M=S.call(L),V;if(S!==L.entries){for(;!(V=M.next()).done;)if(!k(V.value))return!1}else for(;!(V=M.next()).done;){var N=V.value;if(N&&!k(N[1]))return!1}}else return!1;return!0;default:return!1}}function W(L,S){return L==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function Z(L){var S=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":W(S,L)?"symbol":S}function J(L){if(typeof L>"u"||L===null)return""+L;var S=Z(L);if(S==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return S}function Y(L){var S=J(L);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Ae(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return g.checkPropTypes=A,g.resetWarningCache=A.resetWarningCache,g.PropTypes=g,g},Wg}var Xg,lC;function fK(){if(lC)return Xg;lC=1;var e=Wv();function t(){}function n(){}return n.resetWarningCache=t,Xg=function(){function r(o,a,l,c,d,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function A(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:A,element:r,elementType:r,instanceOf:A,node:r,objectOf:A,oneOf:A,oneOfType:A,shape:A,exact:A,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Xg}var cC;function Xv(){if(cC)return Ml.exports;if(cC=1,process.env.NODE_ENV!=="production"){var e=Z1(),t=!0;Ml.exports=uK()(e.isElement,t)}else Ml.exports=fK()();return Ml.exports}var $=Xv(),rm=function(){return rm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},rm.apply(this,arguments)},$1={onActivate:$.func,onAddUndo:$.func,onBeforeAddUndo:$.func,onBeforeExecCommand:$.func,onBeforeGetContent:$.func,onBeforeRenderUI:$.func,onBeforeSetContent:$.func,onBeforePaste:$.func,onBlur:$.func,onChange:$.func,onClearUndos:$.func,onClick:$.func,onContextMenu:$.func,onCommentChange:$.func,onCompositionEnd:$.func,onCompositionStart:$.func,onCompositionUpdate:$.func,onCopy:$.func,onCut:$.func,onDblclick:$.func,onDeactivate:$.func,onDirty:$.func,onDrag:$.func,onDragDrop:$.func,onDragEnd:$.func,onDragGesture:$.func,onDragOver:$.func,onDrop:$.func,onExecCommand:$.func,onFocus:$.func,onFocusIn:$.func,onFocusOut:$.func,onGetContent:$.func,onHide:$.func,onInit:$.func,onInput:$.func,onKeyDown:$.func,onKeyPress:$.func,onKeyUp:$.func,onLoadContent:$.func,onMouseDown:$.func,onMouseEnter:$.func,onMouseLeave:$.func,onMouseMove:$.func,onMouseOut:$.func,onMouseOver:$.func,onMouseUp:$.func,onNodeChange:$.func,onObjectResizeStart:$.func,onObjectResized:$.func,onObjectSelected:$.func,onPaste:$.func,onPostProcess:$.func,onPostRender:$.func,onPreProcess:$.func,onProgressState:$.func,onRedo:$.func,onRemove:$.func,onReset:$.func,onSaveContent:$.func,onSelectionChange:$.func,onSetAttrib:$.func,onSetContent:$.func,onShow:$.func,onSubmit:$.func,onUndo:$.func,onVisualAid:$.func,onSkinLoadError:$.func,onThemeLoadError:$.func,onModelLoadError:$.func,onPluginLoadError:$.func,onIconsLoadError:$.func,onLanguageLoadError:$.func,onScriptsLoad:$.func,onScriptsLoadError:$.func},gK=rm({apiKey:$.string,licenseKey:$.string,id:$.string,inline:$.bool,init:$.object,initialValue:$.string,onEditorChange:$.func,value:$.string,tagName:$.string,tabIndex:$.number,cloudChannel:$.string,plugins:$.oneOfType([$.string,$.array]),toolbar:$.oneOfType([$.string,$.array]),disabled:$.bool,readonly:$.bool,textareaName:$.string,tinymceScriptSrc:$.oneOfType([$.string,$.arrayOf($.string),$.arrayOf($.shape({src:$.string,async:$.bool,defer:$.bool}))]),rollback:$.oneOfType([$.number,$.oneOf([!1])]),scriptLoading:$.shape({async:$.bool,defer:$.bool,delay:$.number})},$1),eI=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},Gg=function(e){return typeof e=="function"},dC=function(e){return e in $1},uC=function(e){return e.substr(2)},hK=function(e,t,n,r,A,i,o){var a=Object.keys(A).filter(dC),l=Object.keys(i).filter(dC),c=a.filter(function(u){return i[u]===void 0}),d=l.filter(function(u){return A[u]===void 0});c.forEach(function(u){var f=uC(u),g=o[f];n(f,g),delete o[f]}),d.forEach(function(u){var f=r(e,u),g=uC(u);o[g]=f,t(g,f)})},pK=function(e,t,n,r,A){return hK(A,e.on.bind(e),e.off.bind(e),function(i,o){return function(a){var l;return(l=i(o))===null||l===void 0?void 0:l(a,e)}},t,n,r)},fC=0,tI=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return fC++,e+"_"+n+fC+String(t)},gC=function(e){return e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input")},hC=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},mK=function(e,t){return hC(e).concat(hC(t))},vK=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},wK=function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;n!=null;)t=n,n=t.parentNode;return t===e.ownerDocument}return e.isConnected},pC=function(e,t){e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(t):e.setMode(t))},bK=function(e){var t=eI(e);if(!t)throw new Error("tinymce should have been loaded into global scope");return t},mC=function(e){return e.options&&e.options.isRegistered("disabled")},Am=function(){return Am=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},Am.apply(this,arguments)},xK=function(e,t,n){var r,A,i=e.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=t.id,i.src=t.src,i.async=(r=t.async)!==null&&r!==void 0?r:!1,i.defer=(A=t.defer)!==null&&A!==void 0?A:!1;var o=function(){i.removeEventListener("load",o),i.removeEventListener("error",a),n(t.src)},a=function(l){i.removeEventListener("load",o),i.removeEventListener("error",a),n(t.src,l)};i.addEventListener("load",o),i.addEventListener("error",a),e.head&&e.head.appendChild(i)},yK=function(e){var t={},n=function(o,a){var l=t[o];l.done=!0,l.error=a;for(var c=0,d=l.handlers;c<d.length;c++){var u=d[c];u(o,a)}l.handlers=[]},r=function(o,a,l){var c=function(C){return l!==void 0?l(C):console.error(C)};if(o.length===0){c(new Error("At least one script must be provided"));return}for(var d=0,u=!1,f=function(C,x){u||(x?(u=!0,c(x)):++d===o.length&&a())},g=0,p=o;g<p.length;g++){var v=p[g],w=t[v.src];if(w)w.done?f(v.src,w.error):w.handlers.push(f);else{var b=tI("tiny-");t[v.src]={id:b,src:v.src,done:!1,error:null,handlers:[f]},xK(e,Am({id:b},v),n)}}},A=function(){for(var o,a=0,l=Object.values(t);a<l.length;a++){var c=l[a],d=e.getElementById(c.id);d!=null&&d.tagName==="SCRIPT"&&((o=d.parentNode)===null||o===void 0||o.removeChild(d))}t={}},i=function(){return e};return{loadScripts:r,deleteScripts:A,getDocument:i}},CK=function(){var e=[],t=function(A){var i=e.find(function(o){return o.getDocument()===A});return i===void 0&&(i=yK(A),e.push(i)),i},n=function(A,i,o,a,l){var c=function(){return t(A).loadScripts(i,a,l)};o>0?setTimeout(c,o):c()},r=function(){for(var A=e.pop();A!=null;A=e.pop())A.deleteScripts()};return{loadList:n,reinitialize:r}},BK=CK(),EK=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(r[i]=A[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Eo=function(){return Eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},Eo.apply(this,arguments)},Vg="change keyup compositionend setcontent CommentChange",DK=(function(e){EK(t,e);function t(n){var r,A,i,o=e.call(this,n)||this;return o.rollbackTimer=void 0,o.valueCursor=void 0,o.rollbackChange=function(){var a=o.editor,l=o.props.value;a&&l&&l!==o.currentContent&&a.undoManager.ignore(function(){if(a.setContent(l),o.valueCursor&&(!o.inline||a.hasFocus()))try{a.selection.moveToBookmark(o.valueCursor)}catch{}}),o.rollbackTimer=void 0},o.handleBeforeInput=function(a){if(o.props.value!==void 0&&o.props.value===o.currentContent&&o.editor&&(!o.inline||o.editor.hasFocus()))try{o.valueCursor=o.editor.selection.getBookmark(3)}catch{}},o.handleBeforeInputSpecial=function(a){(a.key==="Enter"||a.key==="Backspace"||a.key==="Delete")&&o.handleBeforeInput(a)},o.handleEditorChange=function(a){var l=o.editor;if(l&&l.initialized){var c=l.getContent();o.props.value!==void 0&&o.props.value!==c&&o.props.rollback!==!1&&(o.rollbackTimer||(o.rollbackTimer=window.setTimeout(o.rollbackChange,typeof o.props.rollback=="number"?o.props.rollback:200))),c!==o.currentContent&&(o.currentContent=c,Gg(o.props.onEditorChange)&&o.props.onEditorChange(c,l))}},o.handleEditorChangeSpecial=function(a){(a.key==="Backspace"||a.key==="Delete")&&o.handleEditorChange(a)},o.initialise=function(a){var l,c,d;a===void 0&&(a=0);var u=o.elementRef.current;if(u){if(!wK(u)){if(a===0)setTimeout(function(){return o.initialise(1)},1);else if(a<100)setTimeout(function(){return o.initialise(a+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var f=bK(o.view),g=Eo(Eo(Eo(Eo({},o.props.init),{selector:void 0,target:u,disabled:o.props.disabled,readonly:o.props.readonly,inline:o.inline,plugins:mK((l=o.props.init)===null||l===void 0?void 0:l.plugins,o.props.plugins),toolbar:(c=o.props.toolbar)!==null&&c!==void 0?c:(d=o.props.init)===null||d===void 0?void 0:d.toolbar}),o.props.licenseKey?{license_key:o.props.licenseKey}:{}),{setup:function(p){o.editor=p,o.bindHandlers({}),o.inline&&!gC(u)&&p.once("PostRender",function(v){p.setContent(o.getInitialValue(),{no_events:!0})}),o.props.init&&Gg(o.props.init.setup)&&o.props.init.setup(p),o.props.disabled&&(mC(o.editor)?o.editor.options.set("disabled",o.props.disabled):o.editor.mode.set("readonly"))},init_instance_callback:function(p){var v,w=o.getInitialValue();o.currentContent=(v=o.currentContent)!==null&&v!==void 0?v:p.getContent(),o.currentContent!==w&&(o.currentContent=w,p.setContent(w),p.undoManager.clear(),p.undoManager.add(),p.setDirty(!1)),o.props.init&&Gg(o.props.init.init_instance_callback)&&o.props.init.init_instance_callback(p)}});o.inline||(u.style.visibility=""),gC(u)&&(u.value=o.getInitialValue()),f.init(g)}},o.id=o.props.id||tI("tiny-react"),o.elementRef=bi.createRef(),o.inline=(i=(r=o.props.inline)!==null&&r!==void 0?r:(A=o.props.init)===null||A===void 0?void 0:A.inline)!==null&&i!==void 0?i:!1,o.boundHandlers={},o}return Object.defineProperty(t.prototype,"view",{get:function(){var n,r;return(r=(n=this.elementRef.current)===null||n===void 0?void 0:n.ownerDocument.defaultView)!==null&&r!==void 0?r:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(n){var r=this,A,i;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=(A=this.currentContent)!==null&&A!==void 0?A:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var o=this.editor;o.undoManager.transact(function(){var l;if(!r.inline||o.hasFocus())try{l=o.selection.getBookmark(3)}catch{}var c=r.valueCursor;if(o.setContent(r.props.value),!r.inline||o.hasFocus())for(var d=0,u=[l,c];d<u.length;d++){var f=u[d];if(f)try{o.selection.moveToBookmark(f),r.valueCursor=f;break}catch{}}})}if(this.props.readonly!==n.readonly){var a=(i=this.props.readonly)!==null&&i!==void 0?i:!1;pC(this.editor,a?"readonly":"design")}this.props.disabled!==n.disabled&&(mC(this.editor)?this.editor.options.set("disabled",this.props.disabled):pC(this.editor,this.props.disabled?"readonly":"design"))}},t.prototype.componentDidMount=function(){var n=this,r,A,i,o,a;if(eI(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(A=(r=this.props).onScriptsLoadError)===null||A===void 0||A.call(r,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((i=this.elementRef.current)===null||i===void 0)&&i.ownerDocument){var l=function(){var d,u;(u=(d=n.props).onScriptsLoad)===null||u===void 0||u.call(d),n.initialise()},c=function(d){var u,f;(f=(u=n.props).onScriptsLoadError)===null||f===void 0||f.call(u,d)};BK.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(a=(o=this.props.scriptLoading)===null||o===void 0?void 0:o.delay)!==null&&a!==void 0?a:0,l,c)}},t.prototype.componentWillUnmount=function(){var n=this,r=this.editor;r&&(r.off(Vg,this.handleEditorChange),r.off(this.beforeInputEvent(),this.handleBeforeInput),r.off("keypress",this.handleEditorChangeSpecial),r.off("keydown",this.handleBeforeInputSpecial),r.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(A){r.off(A,n.boundHandlers[A])}),this.boundHandlers={},r.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.beforeInputEvent=function(){return vK()?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var n=this.props.tagName,r=n===void 0?"div":n;return bi.createElement(r,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return bi.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var n,r,A=(n=this.props.scriptLoading)===null||n===void 0?void 0:n.async,i=(r=this.props.scriptLoading)===null||r===void 0?void 0:r.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:A,defer:i}]:this.props.tinymceScriptSrc.map(function(c){return typeof c=="string"?{src:c,async:A,defer:i}:c});var o=this.props.cloudChannel,a=this.props.apiKey?this.props.apiKey:"no-api-key",l="https://cdn.tiny.cloud/1/".concat(a,"/tinymce/").concat(o,"/tinymce.min.js");return[{src:l,async:A,defer:i}]},t.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},t.prototype.bindHandlers=function(n){var r=this;if(this.editor!==void 0){pK(this.editor,n,this.props,this.boundHandlers,function(a){return r.props[a]});var A=function(a){return a.onEditorChange!==void 0||a.value!==void 0},i=A(n),o=A(this.props);!i&&o?(this.editor.on(Vg,this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):i&&!o&&(this.editor.off(Vg,this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=gK,t.defaultProps={cloudChannel:"8"},t})(bi.Component);const SK=m.css`
|
|
3476
|
+
`,rK=(e,t)=>s.jsx(nK,{type:"text",id:e.name,...e,ref:t}),AK=h.forwardRef(rK);function La(e){const t=H.useIntl(),[n,r]=h.useState("grey3"),A=o=>r(o?"yellow":"grey3");function i(){return!!(e.isRequired&&e.value===void 0||e.value===null||e.value===""||Array.isArray(e.value)&&!e.value.length)}return s.jsxs($V,{className:e.className,margin:e.margin,width:e.width,children:[(!!e.label||!!e.helper||!!e.description||e.isRequired&&!e.readOnly)&&s.jsx(qE,{htmlFor:e.htmlFor??e.name,labelIsLegend:e.labelIsLegend,children:s.jsxs(tK,{children:[s.jsxs("div",{children:[e.label&&e.label,e.helper&&s.jsx(KE,{tooltip:e.helper,color:n}),e.description&&s.jsx(YE,{children:e.description})]}),e.isRequired&&!e.readOnly&&s.jsx(eK,{error:i(),children:t.formatMessage({id:"GLOBAL_Form_Controls_Required"})})]})}),s.jsx("div",{className:"input-wrapper",onFocus:()=>A(!0),onBlur:()=>A(!1),children:s.jsx(AK,{...e,ref:e.customRef})}),s.jsx(JE,{error:e.errors})]})}const iK=(e,t)=>s.jsx(br,{type:"time",id:e.name,...e,ref:t}),oK=h.forwardRef(iK);function sK(e){return s.jsx(Ft,{...e,renderFunction:({value:t,...n})=>s.jsx(oK,{...e,...n,value:t})})}var Ml={exports:{}},Hl={exports:{}},et={};var tC;function aK(){if(tC)return et;tC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,A=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(B){if(typeof B=="object"&&B!==null){var E=B.$$typeof;switch(E){case t:switch(B=B.type,B){case l:case c:case r:case i:case A:case u:return B;default:switch(B=B&&B.$$typeof,B){case a:case d:case p:case g:case o:return B;default:return E}}case n:return E}}}function y(B){return x(B)===c}return et.AsyncMode=l,et.ConcurrentMode=c,et.ContextConsumer=a,et.ContextProvider=o,et.Element=t,et.ForwardRef=d,et.Fragment=r,et.Lazy=p,et.Memo=g,et.Portal=n,et.Profiler=i,et.StrictMode=A,et.Suspense=u,et.isAsyncMode=function(B){return y(B)||x(B)===l},et.isConcurrentMode=y,et.isContextConsumer=function(B){return x(B)===a},et.isContextProvider=function(B){return x(B)===o},et.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===t},et.isForwardRef=function(B){return x(B)===d},et.isFragment=function(B){return x(B)===r},et.isLazy=function(B){return x(B)===p},et.isMemo=function(B){return x(B)===g},et.isPortal=function(B){return x(B)===n},et.isProfiler=function(B){return x(B)===i},et.isStrictMode=function(B){return x(B)===A},et.isSuspense=function(B){return x(B)===u},et.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===A||B===u||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===g||B.$$typeof===o||B.$$typeof===a||B.$$typeof===d||B.$$typeof===w||B.$$typeof===b||B.$$typeof===C||B.$$typeof===v)},et.typeOf=x,et}var tt={};var nC;function lK(){return nC||(nC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,A=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(re){return typeof re=="string"||typeof re=="function"||re===r||re===c||re===i||re===A||re===u||re===f||typeof re=="object"&&re!==null&&(re.$$typeof===p||re.$$typeof===g||re.$$typeof===o||re.$$typeof===a||re.$$typeof===d||re.$$typeof===w||re.$$typeof===b||re.$$typeof===C||re.$$typeof===v)}function y(re){if(typeof re=="object"&&re!==null){var te=re.$$typeof;switch(te){case t:var xe=re.type;switch(xe){case l:case c:case r:case i:case A:case u:return xe;default:var Oe=xe&&xe.$$typeof;switch(Oe){case a:case d:case p:case g:case o:return Oe;default:return te}}case n:return te}}}var B=l,E=c,D=a,I=o,T=t,Q=d,F=r,U=p,z=g,k=n,W=i,Z=A,Y=u,J=!1;function Ae(re){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(re)||y(re)===l}function L(re){return y(re)===c}function S(re){return y(re)===a}function M(re){return y(re)===o}function V(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function N(re){return y(re)===d}function j(re){return y(re)===r}function G(re){return y(re)===p}function X(re){return y(re)===g}function O(re){return y(re)===n}function oe(re){return y(re)===i}function se(re){return y(re)===A}function He(re){return y(re)===u}tt.AsyncMode=B,tt.ConcurrentMode=E,tt.ContextConsumer=D,tt.ContextProvider=I,tt.Element=T,tt.ForwardRef=Q,tt.Fragment=F,tt.Lazy=U,tt.Memo=z,tt.Portal=k,tt.Profiler=W,tt.StrictMode=Z,tt.Suspense=Y,tt.isAsyncMode=Ae,tt.isConcurrentMode=L,tt.isContextConsumer=S,tt.isContextProvider=M,tt.isElement=V,tt.isForwardRef=N,tt.isFragment=j,tt.isLazy=G,tt.isMemo=X,tt.isPortal=O,tt.isProfiler=oe,tt.isStrictMode=se,tt.isSuspense=He,tt.isValidElementType=x,tt.typeOf=y})()),tt}var rC;function Z1(){return rC||(rC=1,process.env.NODE_ENV==="production"?Hl.exports=aK():Hl.exports=lK()),Hl.exports}var kg,AC;function cK(){if(AC)return kg;AC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function A(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(d){return o[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return kg=A()?Object.assign:function(i,o){for(var a,l=r(i),c,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var u in a)t.call(a,u)&&(l[u]=a[u]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},kg}var Ng,iC;function Wv(){if(iC)return Ng;iC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ng=e,Ng}var Ug,oC;function _1(){return oC||(oC=1,Ug=Function.call.bind(Object.prototype.hasOwnProperty)),Ug}var zg,sC;function dK(){if(sC)return zg;sC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wv(),n={},r=_1();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function A(i,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var u;try{if(typeof i[d]!="function"){var f=Error((l||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=i[d](o,d,l,a,null,t)}catch(p){u=p}if(u&&!(u instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var g=c?c():"";e("Failed "+a+" type: "+u.message+(g??""))}}}}return A.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},zg=A,zg}var Wg,aC;function uK(){if(aC)return Wg;aC=1;var e=Z1(),t=cK(),n=Wv(),r=_1(),A=dK(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Wg=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(L){var S=L&&(c&&L[c]||L[d]);if(typeof S=="function")return S}var f="<<anonymous>>",g={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:x,element:y(),elementType:B(),instanceOf:E,node:Q(),objectOf:I,oneOf:D,oneOfType:T,shape:U,exact:z};function p(L,S){return L===S?L!==0||1/L===1/S:L!==L&&S!==S}function v(L,S){this.message=L,this.data=S&&typeof S=="object"?S:{},this.stack=""}v.prototype=Error.prototype;function w(L){if(process.env.NODE_ENV!=="production")var S={},M=0;function V(j,G,X,O,oe,se,He){if(O=O||f,se=se||X,He!==n){if(l){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var te=O+":"+X;!S[te]&&M<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),S[te]=!0,M++)}}return G[X]==null?j?G[X]===null?new v("The "+oe+" `"+se+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new v("The "+oe+" `"+se+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:L(G,X,O,oe,se)}var N=V.bind(null,!1);return N.isRequired=V.bind(null,!0),N}function b(L){function S(M,V,N,j,G,X){var O=M[V],oe=Z(O);if(oe!==L){var se=Y(O);return new v("Invalid "+j+" `"+G+"` of type "+("`"+se+"` supplied to `"+N+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return w(S)}function C(){return w(o)}function x(L){function S(M,V,N,j,G){if(typeof L!="function")return new v("Property `"+G+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var X=M[V];if(!Array.isArray(X)){var O=Z(X);return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected an array."))}for(var oe=0;oe<X.length;oe++){var se=L(X,oe,N,j,G+"["+oe+"]",n);if(se instanceof Error)return se}return null}return w(S)}function y(){function L(S,M,V,N,j){var G=S[M];if(!a(G)){var X=Z(G);return new v("Invalid "+N+" `"+j+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return w(L)}function B(){function L(S,M,V,N,j){var G=S[M];if(!e.isValidElementType(G)){var X=Z(G);return new v("Invalid "+N+" `"+j+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return w(L)}function E(L){function S(M,V,N,j,G){if(!(M[V]instanceof L)){var X=L.name||f,O=Ae(M[V]);return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected ")+("instance of `"+X+"`."))}return null}return w(S)}function D(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function S(M,V,N,j,G){for(var X=M[V],O=0;O<L.length;O++)if(p(X,L[O]))return null;var oe=JSON.stringify(L,function(He,re){var te=Y(re);return te==="symbol"?String(re):re});return new v("Invalid "+j+" `"+G+"` of value `"+String(X)+"` "+("supplied to `"+N+"`, expected one of "+oe+"."))}return w(S)}function I(L){function S(M,V,N,j,G){if(typeof L!="function")return new v("Property `"+G+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type "+("`"+O+"` supplied to `"+N+"`, expected an object."));for(var oe in X)if(r(X,oe)){var se=L(X,oe,N,j,G+"."+oe,n);if(se instanceof Error)return se}return null}return w(S)}function T(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var S=0;S<L.length;S++){var M=L[S];if(typeof M!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+J(M)+" at index "+S+"."),o}function V(N,j,G,X,O){for(var oe=[],se=0;se<L.length;se++){var He=L[se],re=He(N,j,G,X,O,n);if(re==null)return null;re.data&&r(re.data,"expectedType")&&oe.push(re.data.expectedType)}var te=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new v("Invalid "+X+" `"+O+"` supplied to "+("`"+G+"`"+te+"."))}return w(V)}function Q(){function L(S,M,V,N,j){return k(S[M])?null:new v("Invalid "+N+" `"+j+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return w(L)}function F(L,S,M,V,N){return new v((L||"React class")+": "+S+" type `"+M+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function U(L){function S(M,V,N,j,G){var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type `"+O+"` "+("supplied to `"+N+"`, expected `object`."));for(var oe in L){var se=L[oe];if(typeof se!="function")return F(N,j,G,oe,Y(se));var He=se(X,oe,N,j,G+"."+oe,n);if(He)return He}return null}return w(S)}function z(L){function S(M,V,N,j,G){var X=M[V],O=Z(X);if(O!=="object")return new v("Invalid "+j+" `"+G+"` of type `"+O+"` "+("supplied to `"+N+"`, expected `object`."));var oe=t({},M[V],L);for(var se in oe){var He=L[se];if(r(L,se)&&typeof He!="function")return F(N,j,G,se,Y(He));if(!He)return new v("Invalid "+j+" `"+G+"` key `"+se+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(M[V],null," ")+`
|
|
3477
|
+
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."+se,n);if(re)return re}return null}return w(S)}function k(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(k);if(L===null||a(L))return!0;var S=u(L);if(S){var M=S.call(L),V;if(S!==L.entries){for(;!(V=M.next()).done;)if(!k(V.value))return!1}else for(;!(V=M.next()).done;){var N=V.value;if(N&&!k(N[1]))return!1}}else return!1;return!0;default:return!1}}function W(L,S){return L==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function Z(L){var S=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":W(S,L)?"symbol":S}function Y(L){if(typeof L>"u"||L===null)return""+L;var S=Z(L);if(S==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return S}function J(L){var S=Y(L);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Ae(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return g.checkPropTypes=A,g.resetWarningCache=A.resetWarningCache,g.PropTypes=g,g},Wg}var Xg,lC;function fK(){if(lC)return Xg;lC=1;var e=Wv();function t(){}function n(){}return n.resetWarningCache=t,Xg=function(){function r(o,a,l,c,d,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function A(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:A,element:r,elementType:r,instanceOf:A,node:r,objectOf:A,oneOf:A,oneOfType:A,shape:A,exact:A,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Xg}var cC;function Xv(){if(cC)return Ml.exports;if(cC=1,process.env.NODE_ENV!=="production"){var e=Z1(),t=!0;Ml.exports=uK()(e.isElement,t)}else Ml.exports=fK()();return Ml.exports}var $=Xv(),rm=function(){return rm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},rm.apply(this,arguments)},$1={onActivate:$.func,onAddUndo:$.func,onBeforeAddUndo:$.func,onBeforeExecCommand:$.func,onBeforeGetContent:$.func,onBeforeRenderUI:$.func,onBeforeSetContent:$.func,onBeforePaste:$.func,onBlur:$.func,onChange:$.func,onClearUndos:$.func,onClick:$.func,onContextMenu:$.func,onCommentChange:$.func,onCompositionEnd:$.func,onCompositionStart:$.func,onCompositionUpdate:$.func,onCopy:$.func,onCut:$.func,onDblclick:$.func,onDeactivate:$.func,onDirty:$.func,onDrag:$.func,onDragDrop:$.func,onDragEnd:$.func,onDragGesture:$.func,onDragOver:$.func,onDrop:$.func,onExecCommand:$.func,onFocus:$.func,onFocusIn:$.func,onFocusOut:$.func,onGetContent:$.func,onHide:$.func,onInit:$.func,onInput:$.func,onKeyDown:$.func,onKeyPress:$.func,onKeyUp:$.func,onLoadContent:$.func,onMouseDown:$.func,onMouseEnter:$.func,onMouseLeave:$.func,onMouseMove:$.func,onMouseOut:$.func,onMouseOver:$.func,onMouseUp:$.func,onNodeChange:$.func,onObjectResizeStart:$.func,onObjectResized:$.func,onObjectSelected:$.func,onPaste:$.func,onPostProcess:$.func,onPostRender:$.func,onPreProcess:$.func,onProgressState:$.func,onRedo:$.func,onRemove:$.func,onReset:$.func,onSaveContent:$.func,onSelectionChange:$.func,onSetAttrib:$.func,onSetContent:$.func,onShow:$.func,onSubmit:$.func,onUndo:$.func,onVisualAid:$.func,onSkinLoadError:$.func,onThemeLoadError:$.func,onModelLoadError:$.func,onPluginLoadError:$.func,onIconsLoadError:$.func,onLanguageLoadError:$.func,onScriptsLoad:$.func,onScriptsLoadError:$.func},gK=rm({apiKey:$.string,licenseKey:$.string,id:$.string,inline:$.bool,init:$.object,initialValue:$.string,onEditorChange:$.func,value:$.string,tagName:$.string,tabIndex:$.number,cloudChannel:$.string,plugins:$.oneOfType([$.string,$.array]),toolbar:$.oneOfType([$.string,$.array]),disabled:$.bool,readonly:$.bool,textareaName:$.string,tinymceScriptSrc:$.oneOfType([$.string,$.arrayOf($.string),$.arrayOf($.shape({src:$.string,async:$.bool,defer:$.bool}))]),rollback:$.oneOfType([$.number,$.oneOf([!1])]),scriptLoading:$.shape({async:$.bool,defer:$.bool,delay:$.number})},$1),eI=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},Gg=function(e){return typeof e=="function"},dC=function(e){return e in $1},uC=function(e){return e.substr(2)},hK=function(e,t,n,r,A,i,o){var a=Object.keys(A).filter(dC),l=Object.keys(i).filter(dC),c=a.filter(function(u){return i[u]===void 0}),d=l.filter(function(u){return A[u]===void 0});c.forEach(function(u){var f=uC(u),g=o[f];n(f,g),delete o[f]}),d.forEach(function(u){var f=r(e,u),g=uC(u);o[g]=f,t(g,f)})},pK=function(e,t,n,r,A){return hK(A,e.on.bind(e),e.off.bind(e),function(i,o){return function(a){var l;return(l=i(o))===null||l===void 0?void 0:l(a,e)}},t,n,r)},fC=0,tI=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return fC++,e+"_"+n+fC+String(t)},gC=function(e){return e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input")},hC=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},mK=function(e,t){return hC(e).concat(hC(t))},vK=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},wK=function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;n!=null;)t=n,n=t.parentNode;return t===e.ownerDocument}return e.isConnected},pC=function(e,t){e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(t):e.setMode(t))},bK=function(e){var t=eI(e);if(!t)throw new Error("tinymce should have been loaded into global scope");return t},mC=function(e){return e.options&&e.options.isRegistered("disabled")},Am=function(){return Am=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},Am.apply(this,arguments)},xK=function(e,t,n){var r,A,i=e.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=t.id,i.src=t.src,i.async=(r=t.async)!==null&&r!==void 0?r:!1,i.defer=(A=t.defer)!==null&&A!==void 0?A:!1;var o=function(){i.removeEventListener("load",o),i.removeEventListener("error",a),n(t.src)},a=function(l){i.removeEventListener("load",o),i.removeEventListener("error",a),n(t.src,l)};i.addEventListener("load",o),i.addEventListener("error",a),e.head&&e.head.appendChild(i)},yK=function(e){var t={},n=function(o,a){var l=t[o];l.done=!0,l.error=a;for(var c=0,d=l.handlers;c<d.length;c++){var u=d[c];u(o,a)}l.handlers=[]},r=function(o,a,l){var c=function(C){return l!==void 0?l(C):console.error(C)};if(o.length===0){c(new Error("At least one script must be provided"));return}for(var d=0,u=!1,f=function(C,x){u||(x?(u=!0,c(x)):++d===o.length&&a())},g=0,p=o;g<p.length;g++){var v=p[g],w=t[v.src];if(w)w.done?f(v.src,w.error):w.handlers.push(f);else{var b=tI("tiny-");t[v.src]={id:b,src:v.src,done:!1,error:null,handlers:[f]},xK(e,Am({id:b},v),n)}}},A=function(){for(var o,a=0,l=Object.values(t);a<l.length;a++){var c=l[a],d=e.getElementById(c.id);d!=null&&d.tagName==="SCRIPT"&&((o=d.parentNode)===null||o===void 0||o.removeChild(d))}t={}},i=function(){return e};return{loadScripts:r,deleteScripts:A,getDocument:i}},CK=function(){var e=[],t=function(A){var i=e.find(function(o){return o.getDocument()===A});return i===void 0&&(i=yK(A),e.push(i)),i},n=function(A,i,o,a,l){var c=function(){return t(A).loadScripts(i,a,l)};o>0?setTimeout(c,o):c()},r=function(){for(var A=e.pop();A!=null;A=e.pop())A.deleteScripts()};return{loadList:n,reinitialize:r}},BK=CK(),EK=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(r[i]=A[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Eo=function(){return Eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])}return e},Eo.apply(this,arguments)},Vg="change keyup compositionend setcontent CommentChange",DK=(function(e){EK(t,e);function t(n){var r,A,i,o=e.call(this,n)||this;return o.rollbackTimer=void 0,o.valueCursor=void 0,o.rollbackChange=function(){var a=o.editor,l=o.props.value;a&&l&&l!==o.currentContent&&a.undoManager.ignore(function(){if(a.setContent(l),o.valueCursor&&(!o.inline||a.hasFocus()))try{a.selection.moveToBookmark(o.valueCursor)}catch{}}),o.rollbackTimer=void 0},o.handleBeforeInput=function(a){if(o.props.value!==void 0&&o.props.value===o.currentContent&&o.editor&&(!o.inline||o.editor.hasFocus()))try{o.valueCursor=o.editor.selection.getBookmark(3)}catch{}},o.handleBeforeInputSpecial=function(a){(a.key==="Enter"||a.key==="Backspace"||a.key==="Delete")&&o.handleBeforeInput(a)},o.handleEditorChange=function(a){var l=o.editor;if(l&&l.initialized){var c=l.getContent();o.props.value!==void 0&&o.props.value!==c&&o.props.rollback!==!1&&(o.rollbackTimer||(o.rollbackTimer=window.setTimeout(o.rollbackChange,typeof o.props.rollback=="number"?o.props.rollback:200))),c!==o.currentContent&&(o.currentContent=c,Gg(o.props.onEditorChange)&&o.props.onEditorChange(c,l))}},o.handleEditorChangeSpecial=function(a){(a.key==="Backspace"||a.key==="Delete")&&o.handleEditorChange(a)},o.initialise=function(a){var l,c,d;a===void 0&&(a=0);var u=o.elementRef.current;if(u){if(!wK(u)){if(a===0)setTimeout(function(){return o.initialise(1)},1);else if(a<100)setTimeout(function(){return o.initialise(a+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var f=bK(o.view),g=Eo(Eo(Eo(Eo({},o.props.init),{selector:void 0,target:u,disabled:o.props.disabled,readonly:o.props.readonly,inline:o.inline,plugins:mK((l=o.props.init)===null||l===void 0?void 0:l.plugins,o.props.plugins),toolbar:(c=o.props.toolbar)!==null&&c!==void 0?c:(d=o.props.init)===null||d===void 0?void 0:d.toolbar}),o.props.licenseKey?{license_key:o.props.licenseKey}:{}),{setup:function(p){o.editor=p,o.bindHandlers({}),o.inline&&!gC(u)&&p.once("PostRender",function(v){p.setContent(o.getInitialValue(),{no_events:!0})}),o.props.init&&Gg(o.props.init.setup)&&o.props.init.setup(p),o.props.disabled&&(mC(o.editor)?o.editor.options.set("disabled",o.props.disabled):o.editor.mode.set("readonly"))},init_instance_callback:function(p){var v,w=o.getInitialValue();o.currentContent=(v=o.currentContent)!==null&&v!==void 0?v:p.getContent(),o.currentContent!==w&&(o.currentContent=w,p.setContent(w),p.undoManager.clear(),p.undoManager.add(),p.setDirty(!1)),o.props.init&&Gg(o.props.init.init_instance_callback)&&o.props.init.init_instance_callback(p)}});o.inline||(u.style.visibility=""),gC(u)&&(u.value=o.getInitialValue()),f.init(g)}},o.id=o.props.id||tI("tiny-react"),o.elementRef=bi.createRef(),o.inline=(i=(r=o.props.inline)!==null&&r!==void 0?r:(A=o.props.init)===null||A===void 0?void 0:A.inline)!==null&&i!==void 0?i:!1,o.boundHandlers={},o}return Object.defineProperty(t.prototype,"view",{get:function(){var n,r;return(r=(n=this.elementRef.current)===null||n===void 0?void 0:n.ownerDocument.defaultView)!==null&&r!==void 0?r:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(n){var r=this,A,i;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=(A=this.currentContent)!==null&&A!==void 0?A:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var o=this.editor;o.undoManager.transact(function(){var l;if(!r.inline||o.hasFocus())try{l=o.selection.getBookmark(3)}catch{}var c=r.valueCursor;if(o.setContent(r.props.value),!r.inline||o.hasFocus())for(var d=0,u=[l,c];d<u.length;d++){var f=u[d];if(f)try{o.selection.moveToBookmark(f),r.valueCursor=f;break}catch{}}})}if(this.props.readonly!==n.readonly){var a=(i=this.props.readonly)!==null&&i!==void 0?i:!1;pC(this.editor,a?"readonly":"design")}this.props.disabled!==n.disabled&&(mC(this.editor)?this.editor.options.set("disabled",this.props.disabled):pC(this.editor,this.props.disabled?"readonly":"design"))}},t.prototype.componentDidMount=function(){var n=this,r,A,i,o,a;if(eI(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(A=(r=this.props).onScriptsLoadError)===null||A===void 0||A.call(r,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((i=this.elementRef.current)===null||i===void 0)&&i.ownerDocument){var l=function(){var d,u;(u=(d=n.props).onScriptsLoad)===null||u===void 0||u.call(d),n.initialise()},c=function(d){var u,f;(f=(u=n.props).onScriptsLoadError)===null||f===void 0||f.call(u,d)};BK.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(a=(o=this.props.scriptLoading)===null||o===void 0?void 0:o.delay)!==null&&a!==void 0?a:0,l,c)}},t.prototype.componentWillUnmount=function(){var n=this,r=this.editor;r&&(r.off(Vg,this.handleEditorChange),r.off(this.beforeInputEvent(),this.handleBeforeInput),r.off("keypress",this.handleEditorChangeSpecial),r.off("keydown",this.handleBeforeInputSpecial),r.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(A){r.off(A,n.boundHandlers[A])}),this.boundHandlers={},r.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.beforeInputEvent=function(){return vK()?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var n=this.props.tagName,r=n===void 0?"div":n;return bi.createElement(r,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return bi.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var n,r,A=(n=this.props.scriptLoading)===null||n===void 0?void 0:n.async,i=(r=this.props.scriptLoading)===null||r===void 0?void 0:r.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:A,defer:i}]:this.props.tinymceScriptSrc.map(function(c){return typeof c=="string"?{src:c,async:A,defer:i}:c});var o=this.props.cloudChannel,a=this.props.apiKey?this.props.apiKey:"no-api-key",l="https://cdn.tiny.cloud/1/".concat(a,"/tinymce/").concat(o,"/tinymce.min.js");return[{src:l,async:A,defer:i}]},t.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},t.prototype.bindHandlers=function(n){var r=this;if(this.editor!==void 0){pK(this.editor,n,this.props,this.boundHandlers,function(a){return r.props[a]});var A=function(a){return a.onEditorChange!==void 0||a.value!==void 0},i=A(n),o=A(this.props);!i&&o?(this.editor.on(Vg,this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):i&&!o&&(this.editor.off(Vg,this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=gK,t.defaultProps={cloudChannel:"8"},t})(bi.Component);const SK=m.css`
|
|
3478
3478
|
${e=>e.lines&&`
|
|
3479
3479
|
display: -webkit-box;
|
|
3480
3480
|
-webkit-line-clamp: ${e.lines};
|
|
@@ -3675,7 +3675,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
3675
3675
|
`,sq=m.div`
|
|
3676
3676
|
margin-bottom: 1px;
|
|
3677
3677
|
margin-left: 5px;
|
|
3678
|
-
`;function aq({option:e}){const t=m.useTheme(),[n,r]=h.useState(!1);return s.jsx(Aq,{children:e.custom?s.jsxs(s.Fragment,{children:[e.icon?s.jsx(iq,{children:s.jsx(ne,{name:e.icon,color:t.color.primary,size:25,variant:"circle"})}):!n&&s.jsx(Nt,{onError:()=>r(!0),alt:"tag",uri:e.uri,focusable:!0}),s.jsx(cn,{label:e.title,length:40})]}):s.jsxs(s.Fragment,{children:[e.newOption&&s.jsx(oq,{children:s.jsx(Nt,{alt:"tag",uri:e.uri,focusable:!0,cssColor:e.color??t.color.primary,iconWhite:!0})}),s.jsx(cn,{label:e.title,length:40}),e.newOption&&s.jsx(sq,{children:s.jsx(ne,{name:"icon-plus",color:"primary",size:10})})]})})}function lq({option:e}){return s.jsx(Gv,{focusable:!0,uri:e.uri,label:e.title,tooltipDescription:e.title,defaultIcon:e.icon,variant:"circle"})}const cq=({asyncPromise:e,defaultCustomOptions:t,...n},r)=>{const A=h.useMemo(()=>{if(!e)return e;const i=t?t.map(o=>({...o,custom:!0})):[];return o=>e(o).then(a=>[...a,...i])},[e,t]);return s.jsx(s.Fragment,{children:s.jsx(Gi,{getSearch:"title",components:n.components??{Option:aq,SelectedOption:lq},...n,asyncPromise:A})})},aI=h.forwardRef(cq);function lI(e){const{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,margin:c}=e,[d,u]=h.useState(!1),f=h.useMemo(()=>e.views!==void 0&&Array.isArray(e.views.activeViews)&&e.views.activeViews.length>0,[e.views]);return s.jsx(Ft,{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,margin:c,renderFunction:g=>s.jsxs(s.Fragment,{children:[s.jsx(aI,{...e,...g,iconBefore:f?{icon:"icon-search",onClick:()=>u(!0)}:void 0}),f&&e.views&&d&&s.jsx(sI,{views:e.views.activeViews,initialValues:n._getWatch(t),onConfirm:p=>{g.onChange(p),u(!1)},open:d,closeHandler:()=>{u(!1)},onError:e.views.onError,handlers:e.views.handlers})]})})}const dq=e=>_.community.autocomplete(e);function uq(e){const{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l}=e;return s.jsx(Ft,{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,renderFunction:c=>s.jsx(aI,{...e,...c,asyncPromise:dq,getSearch:"title",showAsyncResultOnEmptySearch:!0})})}const fq=e=>e&&e.trim().length>0?_.audience.autocomplete(e):new Promise(t=>t([]));function gq(e){return s.jsx(lI,{...e,asyncPromise:fq,getSearch:"title",showAsyncResultOnEmptySearch:!0})}function cI(e){const{name:t,control:n,fieldDefaultValue:r,readOnly:A,rules:i,label:o,htmlFor:a,labelIsLegend:l,description:c,helper:d,width:u,margin:f,size:g,labelMargin:p,noMargin:v,isCurrentOption:w}=e;return s.jsx(Ft,{name:t,control:n,readOnly:A,rules:i,label:o,htmlFor:a??t,labelIsLegend:l,description:c,helper:d,width:u,margin:v?"0":f??void 0,labelMargin:p,noLabel:e.noLabel,renderFunction:({onChange:b,value:C,...x})=>{const y=e.options?.find(w?B=>w(B.value,C):B=>B.value===C)??r;return y?s.jsx(Gi,{...e,value:y,onChange:B=>{b(B.value)},htmlFor:a??t,...x,required:!!e.rules?.required,size:g??"md",getLabel:"label",getValue:"value"}):s.jsx(s.Fragment,{})}})}const hq={Option:({option:e})=>{const t=H.useIntl();return s.jsxs(_e,{direction:"column",gap:0,style:{padding:"8px 0"},children:[s.jsxs(No,{children:[t.formatMessage({id:e.label}),e.recommended&&s.jsxs(s.Fragment,{children:[" (",t.formatMessage({id:"GLOBAL_Recommended"}),")"]})]}),e.description!==void 0&&s.jsx(No,{size:"s",children:t.formatMessage({id:e.description})})]})}};function fa(e){const{name:t,control:n,readOnly:r,rules:A,label:i,htmlFor:o,labelIsLegend:a,description:l,helper:c,width:d,margin:u,size:f,labelMargin:g}=e;return s.jsx(Ft,{name:t,control:n,readOnly:r,rules:A,label:i,htmlFor:o??t,labelIsLegend:a,description:l,helper:c,width:d,margin:u,labelMargin:g,noLabel:e.noLabel,renderFunction:p=>s.jsx(Gi,{...e,htmlFor:o??t,...p,required:!!e.rules?.required,size:f??"md"})})}const pq=({hierarchicalTaxonomyPromise:e,close:t,inPlace:n,options:r,updateOptions:A,limit:i})=>{const o=H.useIntl(),[a,l]=h.useState(!1),[c,d]=h.useState([]),[u,f]=h.useState([{title:o.formatMessage({id:"HOMEUSER_Home"}),uri:""}]),[g,p]=h.useState(),v=yt.useForm({defaultValues:{options:r},criteriaMode:"all"}),w=v.watch("options"),b=[{color:"cancel",clickHandler:t,children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Cancel"})},{color:"valid",children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Save"}),clickHandler:async()=>{A(w)}}],C=h.useCallback((x,y)=>{e&&(l(!0),e(x).then(B=>{const E=B.data.map(D=>({...D,label:s.jsxs(Qy,{onClick:()=>{C(D.uri,D.title)},children:[D.title,s.jsx(ne,{name:"icon-angle-right",size:12,color:"secondary"})]}),value:{...D}}));x&&y&&p({uri:x,title:y}),d(E),l(!1)}).catch(()=>{l(!1)}))},[e]);return h.useEffect(()=>{g&&u.findIndex(y=>y.uri==g?.uri)===-1&&f([...u,{uri:g.uri,title:g.title}])},[g]),h.useEffect(()=>{C("")},[]),s.jsx(Yt,{open:!0,closeHandler:t,portalId:"react-modal",inPlace:n,title:o.formatMessage({id:"GLOBAL_CHECK_BOXES"}),buttons:b,children:s.jsx(BW,{children:s.jsx(B1,{children:s.jsxs(EW,{children:[s.jsx(IW,{children:o.formatMessage({id:"HIERARCHICAL_TAXONOMY_DESCRIPTION"})}),w.length===i&&s.jsx(ss,{variant:"warning",message:o.formatMessage({id:"INPUT_SELECT_Has_Reached_Limit"},{limit:i})}),s.jsx(b1,{children:w?.map((x,y)=>s.jsx(x1,{onClick:()=>v.setValue("options",w.filter(B=>!_.deepEqual(B,x))),children:s.jsxs(y1,{children:[s.jsx(C1,{}),x.title]})},`${x.title.replace(/[^a-z0-9]/gi,"")}-${y}`))}),s.jsx(_e,{direction:"row",x:"flex-start",y:"flex-start",children:u?.length&&u.map((x,y)=>s.jsxs(Qy,{onClick:()=>{const E=[...u].findIndex(D=>D.uri==x.uri);E!==-1&&f(D=>D.slice(0,E+1)),C(x.uri)},children:[x.title,s.jsx(ne,{name:"icon-angle-right",size:12,color:"secondary"})]},y))}),a?s.jsx(Ve,{size:"m"}):c.length?s.jsx(_r,{label:"",description:"",name:"options",control:v.control,options:c,direction:"column",labelPosition:"before",checkboxMode:"checkbox",limit:i}):s.jsxs(TW,{children:[s.jsx(ne,{name:"icon-tag",size:60}),s.jsx(ee,{size:"l",variant:"p",children:o.formatMessage({id:"GLOBAL_No_Result"})}),s.jsx(me,{onClick:()=>{const x=u[u.length-2];u.length>1&&(f(y=>y.slice(0,-1)),C(x.uri,x.title))},children:o.formatMessage({id:"GLOBAL_BACK_PREVIOUS_SECTION"})})]})]})})})})},mq=({asyncPromise:e,hierarchicalTaxonomyPromise:t,displayModal:n=!0,inPlace:r=!1,placeholder:A,control:i,name:o,width:a,...l},c)=>{const d=H.useIntl(),u=h.useRef(null),f=yt.useWatch({control:i,name:o}),{field:g}=yt.useController({control:i,name:o}),p=x=>{g.onChange(x),b(!1)},v={ref:u,color:"grey2",icon:"icon-search",label:d.formatMessage({id:"GLOBAL_Search"}),onClick:()=>b(x=>!x)},[w,b]=h.useState(!1),C=h.useMemo(()=>e?x=>e(x).then(y=>y?.data??[]):void 0,[e]);return s.jsxs("div",{ref:c,children:[s.jsx(E1,{children:s.jsx(fa,{asyncPromise:C,name:o,control:i,displayOption:!0,placeholder:A,iconBefore:n?v:void 0,width:a,...l})}),n&&w&&s.jsx(pq,{inPlace:r,close:()=>b(!1),options:f,updateOptions:p,hierarchicalTaxonomyPromise:t,limit:l.limit})]})},vq=h.forwardRef(mq),wq=({asyncPromise:e,displayModal:t=!0,inPlace:n=!1,width:r,placeholder:A,onChange:i,control:o,name:a,allowCustomOptions:l,...c})=>{const d=H.useIntl(),u=h.useRef(null),f=yt.useWatch({control:o,name:a}),g=[{color:"valid",children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Save"}),clickHandler:()=>{b(!1)}}],p={ref:u,color:"grey2",icon:"icon-search",label:d.formatMessage({id:"GLOBAL_Search"}),onClick:()=>b(!w)},v={color:"grey2",icon:"icon-search"},[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y,B]=h.useState(""),[E,D]=h.useState(1),[I,T]=h.useState([]),[Q,F]=h.useState({manualSortBy:!0,draggable:!1,pagination:{page:1,perPage:1,nbResults:1}}),U=h.useMemo(()=>W=>{if(e&&(w&&!W&&I.length===0||w&&E!==Q.pagination?.page&&_.deepEqual(y.toLowerCase(),W.toLowerCase())||!w&&W!==""&&!_.deepEqual(y.toLowerCase(),W.toLowerCase())||w&&!_.deepEqual(y.toLowerCase(),W.toLowerCase()))){x(!0),_.deepEqual(y.toLowerCase(),W.toLowerCase())||B(W);const Z=_.deepEqual(y.toLowerCase(),W.toLowerCase())?E:1;return e(W,Z).then(
|
|
3678
|
+
`;function aq({option:e}){const t=m.useTheme(),[n,r]=h.useState(!1);return s.jsx(Aq,{children:e.custom?s.jsxs(s.Fragment,{children:[e.icon?s.jsx(iq,{children:s.jsx(ne,{name:e.icon,color:t.color.primary,size:25,variant:"circle"})}):!n&&s.jsx(Nt,{onError:()=>r(!0),alt:"tag",uri:e.uri,focusable:!0}),s.jsx(cn,{label:e.title,length:40})]}):s.jsxs(s.Fragment,{children:[e.newOption&&s.jsx(oq,{children:s.jsx(Nt,{alt:"tag",uri:e.uri,focusable:!0,cssColor:e.color??t.color.primary,iconWhite:!0})}),s.jsx(cn,{label:e.title,length:40}),e.newOption&&s.jsx(sq,{children:s.jsx(ne,{name:"icon-plus",color:"primary",size:10})})]})})}function lq({option:e}){return s.jsx(Gv,{focusable:!0,uri:e.uri,label:e.title,tooltipDescription:e.title,defaultIcon:e.icon,variant:"circle"})}const cq=({asyncPromise:e,defaultCustomOptions:t,...n},r)=>{const A=h.useMemo(()=>{if(!e)return e;const i=t?t.map(o=>({...o,custom:!0})):[];return o=>e(o).then(a=>[...a,...i])},[e,t]);return s.jsx(s.Fragment,{children:s.jsx(Gi,{getSearch:"title",components:n.components??{Option:aq,SelectedOption:lq},...n,asyncPromise:A})})},aI=h.forwardRef(cq);function lI(e){const{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,margin:c}=e,[d,u]=h.useState(!1),f=h.useMemo(()=>e.views!==void 0&&Array.isArray(e.views.activeViews)&&e.views.activeViews.length>0,[e.views]);return s.jsx(Ft,{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,margin:c,renderFunction:g=>s.jsxs(s.Fragment,{children:[s.jsx(aI,{...e,...g,iconBefore:f?{icon:"icon-search",onClick:()=>u(!0)}:void 0}),f&&e.views&&d&&s.jsx(sI,{views:e.views.activeViews,initialValues:n._getWatch(t),onConfirm:p=>{g.onChange(p),u(!1)},open:d,closeHandler:()=>{u(!1)},onError:e.views.onError,handlers:e.views.handlers})]})})}const dq=e=>_.community.autocomplete(e);function uq(e){const{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l}=e;return s.jsx(Ft,{name:t,control:n,rules:r,label:A,htmlFor:i,labelIsLegend:o,description:a,helper:l,renderFunction:c=>s.jsx(aI,{...e,...c,asyncPromise:dq,getSearch:"title",showAsyncResultOnEmptySearch:!0})})}const fq=e=>e&&e.trim().length>0?_.audience.autocomplete(e):new Promise(t=>t([]));function gq(e){return s.jsx(lI,{...e,asyncPromise:fq,getSearch:"title",showAsyncResultOnEmptySearch:!0})}function cI(e){const{name:t,control:n,fieldDefaultValue:r,readOnly:A,rules:i,label:o,htmlFor:a,labelIsLegend:l,description:c,helper:d,width:u,margin:f,size:g,labelMargin:p,noMargin:v,isCurrentOption:w}=e;return s.jsx(Ft,{name:t,control:n,readOnly:A,rules:i,label:o,htmlFor:a??t,labelIsLegend:l,description:c,helper:d,width:u,margin:v?"0":f??void 0,labelMargin:p,noLabel:e.noLabel,renderFunction:({onChange:b,value:C,...x})=>{const y=e.options?.find(w?B=>w(B.value,C):B=>B.value===C)??r;return y?s.jsx(Gi,{...e,value:y,onChange:B=>{b(B.value)},htmlFor:a??t,...x,required:!!e.rules?.required,size:g??"md",getLabel:"label",getValue:"value"}):s.jsx(s.Fragment,{})}})}const hq={Option:({option:e})=>{const t=H.useIntl();return s.jsxs(_e,{direction:"column",gap:0,style:{padding:"8px 0"},children:[s.jsxs(No,{children:[t.formatMessage({id:e.label}),e.recommended&&s.jsxs(s.Fragment,{children:[" (",t.formatMessage({id:"GLOBAL_Recommended"}),")"]})]}),e.description!==void 0&&s.jsx(No,{size:"s",children:t.formatMessage({id:e.description})})]})}};function fa(e){const{name:t,control:n,readOnly:r,rules:A,label:i,htmlFor:o,labelIsLegend:a,description:l,helper:c,width:d,margin:u,size:f,labelMargin:g}=e;return s.jsx(Ft,{name:t,control:n,readOnly:r,rules:A,label:i,htmlFor:o??t,labelIsLegend:a,description:l,helper:c,width:d,margin:u,labelMargin:g,noLabel:e.noLabel,renderFunction:p=>s.jsx(Gi,{...e,htmlFor:o??t,...p,required:!!e.rules?.required,size:f??"md"})})}const pq=({hierarchicalTaxonomyPromise:e,close:t,inPlace:n,options:r,updateOptions:A,limit:i})=>{const o=H.useIntl(),[a,l]=h.useState(!1),[c,d]=h.useState([]),[u,f]=h.useState([{title:o.formatMessage({id:"HOMEUSER_Home"}),uri:""}]),[g,p]=h.useState(),v=yt.useForm({defaultValues:{options:r},criteriaMode:"all"}),w=v.watch("options"),b=[{color:"cancel",clickHandler:t,children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Cancel"})},{color:"valid",children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Save"}),clickHandler:async()=>{A(w)}}],C=h.useCallback((x,y)=>{e&&(l(!0),e(x).then(B=>{const E=B.data.map(D=>({...D,label:s.jsxs(Qy,{onClick:()=>{C(D.uri,D.title)},children:[D.title,s.jsx(ne,{name:"icon-angle-right",size:12,color:"secondary"})]}),value:{...D}}));x&&y&&p({uri:x,title:y}),d(E),l(!1)}).catch(()=>{l(!1)}))},[e]);return h.useEffect(()=>{g&&u.findIndex(y=>y.uri==g?.uri)===-1&&f([...u,{uri:g.uri,title:g.title}])},[g]),h.useEffect(()=>{C("")},[]),s.jsx(Yt,{open:!0,closeHandler:t,portalId:"react-modal",inPlace:n,title:o.formatMessage({id:"GLOBAL_CHECK_BOXES"}),buttons:b,children:s.jsx(BW,{children:s.jsx(B1,{children:s.jsxs(EW,{children:[s.jsx(IW,{children:o.formatMessage({id:"HIERARCHICAL_TAXONOMY_DESCRIPTION"})}),w.length===i&&s.jsx(ss,{variant:"warning",message:o.formatMessage({id:"INPUT_SELECT_Has_Reached_Limit"},{limit:i})}),s.jsx(b1,{children:w?.map((x,y)=>s.jsx(x1,{onClick:()=>v.setValue("options",w.filter(B=>!_.deepEqual(B,x))),children:s.jsxs(y1,{children:[s.jsx(C1,{}),x.title]})},`${x.title.replace(/[^a-z0-9]/gi,"")}-${y}`))}),s.jsx(_e,{direction:"row",x:"flex-start",y:"flex-start",children:u?.length&&u.map((x,y)=>s.jsxs(Qy,{onClick:()=>{const E=[...u].findIndex(D=>D.uri==x.uri);E!==-1&&f(D=>D.slice(0,E+1)),C(x.uri)},children:[x.title,s.jsx(ne,{name:"icon-angle-right",size:12,color:"secondary"})]},y))}),a?s.jsx(Ve,{size:"m"}):c.length?s.jsx(_r,{label:"",description:"",name:"options",control:v.control,options:c,direction:"column",labelPosition:"before",checkboxMode:"checkbox",limit:i}):s.jsxs(TW,{children:[s.jsx(ne,{name:"icon-tag",size:60}),s.jsx(ee,{size:"l",variant:"p",children:o.formatMessage({id:"GLOBAL_No_Result"})}),s.jsx(me,{onClick:()=>{const x=u[u.length-2];u.length>1&&(f(y=>y.slice(0,-1)),C(x.uri,x.title))},children:o.formatMessage({id:"GLOBAL_BACK_PREVIOUS_SECTION"})})]})]})})})})},mq=({asyncPromise:e,hierarchicalTaxonomyPromise:t,displayModal:n=!0,inPlace:r=!1,placeholder:A,control:i,name:o,width:a,...l},c)=>{const d=H.useIntl(),u=h.useRef(null),f=yt.useWatch({control:i,name:o}),{field:g}=yt.useController({control:i,name:o}),p=x=>{g.onChange(x),b(!1)},v={ref:u,color:"grey2",icon:"icon-search",label:d.formatMessage({id:"GLOBAL_Search"}),onClick:()=>b(x=>!x)},[w,b]=h.useState(!1),C=h.useMemo(()=>e?x=>e(x).then(y=>y?.data??[]):void 0,[e]);return s.jsxs("div",{ref:c,children:[s.jsx(E1,{children:s.jsx(fa,{asyncPromise:C,name:o,control:i,displayOption:!0,placeholder:A,iconBefore:n?v:void 0,width:a,...l})}),n&&w&&s.jsx(pq,{inPlace:r,close:()=>b(!1),options:f,updateOptions:p,hierarchicalTaxonomyPromise:t,limit:l.limit})]})},vq=h.forwardRef(mq),wq=({asyncPromise:e,displayModal:t=!0,inPlace:n=!1,width:r,placeholder:A,onChange:i,control:o,name:a,allowCustomOptions:l,...c})=>{const d=H.useIntl(),u=h.useRef(null),f=yt.useWatch({control:o,name:a}),g=[{color:"valid",children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Save"}),clickHandler:()=>{b(!1)}}],p={ref:u,color:"grey2",icon:"icon-search",label:d.formatMessage({id:"GLOBAL_Search"}),onClick:()=>b(!w)},v={color:"grey2",icon:"icon-search"},[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y,B]=h.useState(""),[E,D]=h.useState(1),[I,T]=h.useState([]),[Q,F]=h.useState({manualSortBy:!0,draggable:!1,pagination:{page:1,perPage:1,nbResults:1}}),U=h.useMemo(()=>W=>{if(e&&(w&&!W&&I.length===0||w&&E!==Q.pagination?.page&&_.deepEqual(y.toLowerCase(),W.toLowerCase())||!w&&W!==""&&!_.deepEqual(y.toLowerCase(),W.toLowerCase())||w&&!_.deepEqual(y.toLowerCase(),W.toLowerCase()))){x(!0),_.deepEqual(y.toLowerCase(),W.toLowerCase())||B(W);const Z=_.deepEqual(y.toLowerCase(),W.toLowerCase())?E:1;return e(W,Z).then(Y=>(Y?.data&&(F({manualSortBy:!0,draggable:!1,pagination:{page:Y.page,perPage:Y.limit,nbResults:Y.cnt}}),T(Y.data)),x(!1),Y?.data??[]))}return Promise.resolve([])},[e,w,I,E,Q.pagination?.page,y]);h.useEffect(()=>{e&&E&&U(y)},[E]),h.useEffect(()=>{y&&B("")},[w]),h.useEffect(()=>{!w&&y==""&&T([])},[y]);const z={onPage:W=>{D(W)}},k=[{header:"Title",cell:({row:W})=>{const Z=W.original,Y=f?.findIndex(J=>_.deepEqual(J,Z));return s.jsx(SW,{disabled:Y===-1&&!!c.limit&&f&&f.length>=c.limit,isSelected:Y!==-1,onClick:()=>{if(Y&&Y!==-1){const J=[...f??[]];J.splice(Y,1),i(J)}else Y===-1&&i([...f??[],Z])},children:Z?.title})},enableSorting:!1}];return s.jsxs(DW,{children:[s.jsx(fa,{asyncPromise:w?()=>Promise.resolve([]):U,name:a,control:o,showAsyncResultOnEmptySearch:!0,multiple:!0,displayOption:!0,width:r,placeholder:A,iconBefore:p,allowCustomOptions:l,...c}),t&&s.jsxs(Yt,{title:A??"",open:w,closeHandler:()=>b(!1),portalId:"react-modal",inPlace:n,buttons:g,focusOnCloseRef:u,children:[c.limit&&f?.length&&f.length>=c.limit&&s.jsx(ss,{variant:"warning",message:d.formatMessage({id:"INPUT_SELECT_Has_Reached_Limit"},{limit:c.limit})}),s.jsxs(B1,{children:[s.jsx(E1,{children:s.jsx(fa,{asyncPromise:U,name:a,control:o,showAsyncResultOnEmptySearch:!0,displayOption:!1,width:"100%",placeholder:"",displayIndicator:!1,iconBefore:v,...c,htmlFor:c.htmlFor?`${c.htmlFor}-modal`:`${a}-modal`})}),s.jsx(OW,{children:C?s.jsx(Ry,{direction:"row",x:"center",y:"center",children:s.jsx(Ve,{size:"m"})}):I.length?!!I.length&&Q&&s.jsx(QW,{children:s.jsx(hu,{config:Q,data:I,columns:k,eventHandlers:z})}):s.jsx(Ry,{direction:"row",x:"center",y:"center",children:s.jsx(H.FormattedMessage,{id:"GLOBAL_No_Result"})})})]})]})]})},Pi=10,ls=800,CC=["image","video"];var pc=(e=>(e.IMAGE="image",e.VIDEO="video",e.GIF="gif",e))(pc||{});const bq=m.div`
|
|
3679
3679
|
width: 100%;
|
|
3680
3680
|
display: flex;
|
|
3681
3681
|
flex-direction: column;
|
|
@@ -4348,7 +4348,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
4348
4348
|
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
4349
4349
|
}
|
|
4350
4350
|
|
|
4351
|
-
* {
|
|
4351
|
+
th * {
|
|
4352
4352
|
background-color: ${({theme:e})=>e.color.primary};
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
@@ -4615,7 +4615,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
4615
4615
|
overflow: hidden;
|
|
4616
4616
|
`,Jne=m(_e)`
|
|
4617
4617
|
flex-shrink: 0;
|
|
4618
|
-
`,Yne=({status:e,title:t,start:n,end:r,display:A,mode:i,id:o,onClick:a,audience:l,allDay:c,textColor:d,backgroundColor:u,address:f,image:g,type:p,isVisio:v=!1,noGestion:w,canSubscribe:b,urlGestion:C,onUpdateStatus:x,isUpdateStatusLoading:y,recurrent:B,href:E})=>{const D=H.useIntl(),I=m.useTheme(),T=h.useMemo(()=>Number(o),[o]),Q=h.useMemo(()=>n&&r?Math.ceil((r.getTime()-n.getTime())/6e4):void 0,[r,n]),F=h.useMemo(()=>!Q||Q>=40?"l":Q>=20?"s":"xs",[Q]),U=h.useCallback(
|
|
4618
|
+
`,Yne=({status:e,title:t,start:n,end:r,display:A,mode:i,id:o,onClick:a,audience:l,allDay:c,textColor:d,backgroundColor:u,address:f,image:g,type:p,isVisio:v=!1,noGestion:w,canSubscribe:b,urlGestion:C,onUpdateStatus:x,isUpdateStatusLoading:y,recurrent:B,href:E})=>{const D=H.useIntl(),I=m.useTheme(),T=h.useMemo(()=>Number(o),[o]),Q=h.useMemo(()=>n&&r?Math.ceil((r.getTime()-n.getTime())/6e4):void 0,[r,n]),F=h.useMemo(()=>!Q||Q>=40?"l":Q>=20?"s":"xs",[Q]),U=h.useCallback(Y=>{switch(Y){case"available":case"visio":case"onSpot":case 1:return"🟢";case"unknown":return"🟡";case 0:case"unavailable":return"🔴";default:return"🟢"}},[]),z=h.useMemo(()=>c?D.formatMessage({id:"CALENDAR_All_Day"}):n?.getHours()+":"+("0"+n?.getMinutes()).slice(-2),[c,D,n]),k=h.useMemo(()=>n&&r&&(n.getDate()!==r.getDate()||n.getMonth()!==n.getMonth()||n.getFullYear()!==n.getFullYear()),[r,n]),W=h.useMemo(()=>e==="unknown"?"outlined":"filled",[e]),Z=h.useCallback(Y=>{a&&(Y.stopPropagation(),a(T))},[T,a]);return A==="dayGridMonth"?s.jsxs(Lne,{$backgroundColor:u,$variant:W,onClick:Z,href:E,children:[s.jsxs(_e,{gap:2,y:"center",children:[B&&s.jsx(ne,{name:"icon-refresh",size:16,color:d&&d.length>0?d:I.color.grey5,isMargin:!1}),n&&!c&&s.jsx(Q0,{$textColor:d,$size:"l",$displayVariant:W,children:z})]}),s.jsxs(Xne,{gap:2,y:"center",children:[s.jsx(Iw,{$textColor:d,$lineThrough:e==="unavailable",$variant:W,children:t}),E&&s.jsx(ne,{name:"icon-external-link",size:14,color:d&&d.length>0?d:I.color.grey5,isMargin:!1})]})]}):A==="timeGridWeek"||A==="timeGridDay"?s.jsx(Rt,{title:z+" "+U(e),position:"top",description:t,asBlock:!0,active:!!Q&&Q<30,children:s.jsxs(Hne,{$backgroundColor:u,$variant:W,$size:F,onClick:Z,href:E,children:[n&&!c&&s.jsxs(Jne,{y:"center",gap:2,children:[B&&F!=="xs"&&s.jsx(ne,{name:"icon-refresh",size:F==="l"?16:14,color:d&&d.length>0?d:I.color.grey5,isMargin:!1}),s.jsxs(Q0,{$textColor:d,$size:F,$displayVariant:W,children:[k&&`${("0"+n.getDate()).slice(-2)}/${("0"+(n.getMonth()+1)).slice(-2)} `,z]})]}),s.jsxs(qne,{y:"center",gap:2,children:[s.jsx(Gne,{$textColor:d,$lineThrough:e==="unavailable",$size:F,$variant:W,children:t}),E&&s.jsx(ne,{name:"icon-external-link",size:14,color:d&&d.length>0?d:I.color.grey5,isMargin:!1})]})]})}):A==="list"?s.jsxs(kne,{$backgroundColor:u,$variant:W,children:[s.jsxs(zne,{onClick:Z,variant:W,href:E,children:[g&&i!=="compact"&&s.jsx(Kne,{children:s.jsx(ns,{width:60,aspectRatio:1,alt:t,type:p,recordId:T,size:"original",from:"imagecache",objectFit:"cover"})}),s.jsxs(Wne,{children:[s.jsx(Rt,{description:t,asBlock:!0,children:s.jsxs(_e,{gap:4,y:"center",children:[s.jsx(Vne,{$textColor:d,$lineThrough:e==="unavailable",$variant:W,$mode:i,$image:!!g&&i!=="compact",children:t}),E&&s.jsx(ne,{name:"icon-external-link",size:16,color:d&&d.length>0?d:I.color.grey5,isMargin:!1})]})}),n&&s.jsxs(_e,{gap:4,y:"center",children:[s.jsxs(R0,{$textColor:d,$displayVariant:W,children:[k&&`${("0"+n.getDate()).slice(-2)}/${("0"+(n.getMonth()+1)).slice(-2)} `,(!k||!c)&&z,r&&(!!k||!c)&&" - ",k&&r&&`${("0"+r.getDate()).slice(-2)}/${("0"+(r.getMonth()+1)).slice(-2)} `,r&&!c&&`${r.getHours()}:${("0"+r.getMinutes()).slice(-2)}`]}),B&&s.jsx(ne,{name:"icon-refresh",size:16,color:d&&d.length>0?d:I.color.grey5,isMargin:!1})]}),f!==void 0&&s.jsx(R0,{$textColor:d,$displayVariant:W,children:f})]})]}),i!=="compact"&&s.jsxs(_e,{y:"center",gap:I.space.sm,children:[s.jsx(dd,{audience:l}),s.jsx(oO,{eventIsVisio:v,eventType:p,canSubscribe:b,status:e,urlGestion:C,noGestion:w,onUpdateStatus:Y=>x({status:Y,id:T,type:p}),loading:y(T)})]})]}):null},Zne=m.form`
|
|
4619
4619
|
display: flex;
|
|
4620
4620
|
flex-direction: column;
|
|
4621
4621
|
flex: 1;
|
|
@@ -4753,7 +4753,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
4753
4753
|
`,Tre=m(_e)`
|
|
4754
4754
|
margin-bottom: ${({theme:e})=>e.space.md}px;
|
|
4755
4755
|
flex-wrap: wrap;
|
|
4756
|
-
`,Ore=({closeHandler:e,event:t,handler:n,onError:r,onSuccess:A,extraComponent:i,onDeleteEvent:o,onClickUpdateEvent:a,onUpdateStatus:l,isUpdateStatusLoading:c,mode:d="full"})=>{const u=H.useIntl(),{control:f,handleSubmit:g,watch:p,reset:v}=yt.useForm({defaultValues:{list:"all",text:""}}),[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y,B]=h.useState(!1),[E,D]=h.useState(!1),[I,T]=h.useState(t&&"dateStart"in t&&t.dateStart?new Date(t.dateStart).getTime()-new Date().getTime():null),{formattedDate:Q}=hO(t??{}),F=h.useMemo(()=>t&&t.type!=="recurringEventOccurrence"&&"place"in t&&((t.place==="bbb"||t.place==="bbb-public")&&(!I||I>1e3*60*15)||!!t.place.match(/other:(?!http).+/)),[t,I]);h.useEffect(()=>{let Y;return(!I||I>0)&&(Y=setTimeout(()=>{T(t&&"dateStart"in t&&t.dateStart?new Date(t.dateStart).getTime()-new Date().getTime():null)},1e3)),()=>{clearTimeout(Y)}},[t,I]);const U=h.useMemo(()=>{const Y=[{label:u.formatMessage({id:"CALENDAR_Event_Revive_All"}),value:"all"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Available"}),value:"available"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Unavailable"}),value:"unavailable"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Waiting"}),value:"waiting"}];return t?._extend?.socialEventRecord?.isVisio&&(t&&"address"in t&&t.address!==""&&Y.push({label:u.formatMessage({id:"CALENDAR_Event_Revive_On_Spot"}),value:"onSpot"}),Y.push({label:u.formatMessage({id:"CALENDAR_Event_Revive_Visio"}),value:"visio"})),Y},[t,u]),z=h.useMemo(()=>{switch(t?.type){case"socialEvent":default:return u.formatMessage({id:"CALENDAR_Event"});case"meeting":return u.formatMessage({id:"CALENDAR_Meeting"});case"animatedMeeting":return u.formatMessage({id:"GLOBAL_Animated_Meeting"});case"boardCard":return u.formatMessage({id:"CALENDAR_BoardCard"});case"recurringEventOccurrence":return u.formatMessage({id:"CALENDAR_Recurring_Event"})}},[t?.type,u]),k=h.useCallback(Y=>{t&&(!Y.list||!Y.text||(x(!0),n.calendar.reviveSubmit({list:Y.list,text:Y.text,idArticle:t.id}).then(()=>{b(!1),v(),A(u.formatMessage({id:"GLOBAL_Sent"}))}).catch(Ae=>{r(Ae.errorMsg)}).finally(()=>{x(!1)})))},[t,n.calendar,u,r,A,v]),W=h.useCallback(()=>{t&&(D(!0),n.article.delete(t._extend?.recurringEventRecord?.id??t.id).then(()=>{o()}).catch(Y=>{r(Y.errorMsg)}).finally(()=>{B(!1),D(!1)}))},[t,n.article,o,r]),Z=h.useMemo(()=>!!t&&["socialEvent","meeting","recurringEventOccurrence"].includes(t.type)&&!!a,[t,a]),J=h.useMemo(()=>t?t._extend?.recurringEventRecord?.tags?_.extractTaxonomiesFromObject(t._extend.recurringEventRecord):_.extractTaxonomiesFromObject(t):[],[t]);return s.jsxs(s.Fragment,{children:[s.jsx(Qw,{portal:"global",open:!!t,position:"right",closeHandler:e,title:z,showIconClose:!0,removePadding:!0,fixed:d==="compact",offsetTop:d!=="compact"?0:"var(--body-top)",optionsButton:t&&((t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update??!1)||(t.type!=="recurringEventOccurrence"?t._right.delete:t._extend?.recurringEventRecord?._right.delete??!1))?[...(t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update??!1)?[{label:u.formatMessage({id:"GLOBAL_Edit"}),href:Z?void 0:`/?action=article-edit&idArticle=${t.id}`,onClick:Z?()=>a?.(t):void 0}]:[],...(t.type!=="recurringEventOccurrence"?t._right.delete:t._extend?.recurringEventRecord?._right.delete??!1)?[{label:u.formatMessage({id:"GLOBAL_Delete"}),onClick:()=>B(!0)}]:[]]:void 0,children:t&&s.jsxs(wre,{children:[(t.image??t._extend?.recurringEventRecord?.image)&&s.jsx(xre,{children:s.jsx(ns,{aspectRatio:2,alt:t.type==="recurringEventOccurrence"?t._extend?.recurringEventRecord?.title??"":t.title,type:t.image?t.type:t._extend?.recurringEventRecord?.type,recordId:t.image?t.id:t._extend?.recurringEventRecord?.id,size:"original",from:"imagecache",objectFit:"cover",width:"100%",timestamp:ni(t.image?t.dateModified:t._extend?.recurringEventRecord?.dateModified??"")})}),s.jsxs(bre,{$mt:!t.image&&!t._extend?.recurringEventRecord?.image,children:[s.jsx(Is,{href:t._extend?.recurringEventRecord?._url??t._url,$underline:!1,children:s.jsx(ee,{size:"xl",weight:"semiBold",children:t.type==="recurringEventOccurrence"?t._extend?.recurringEventRecord?.title:t.title})}),s.jsxs(yre,{children:[t._user&&s.jsx(Rt,{description:t._user.title,children:s.jsx(Is,{href:t._user._url,"aria-label":t._user.title,children:s.jsx(Nt,{uri:t._user.uri})})}),t._audience.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(G0,{}),s.jsx(dd,{audience:t._audience})]}),t._extend?.recurringEventRecord?._user&&s.jsx(Rt,{description:t._extend.recurringEventRecord._user.title,children:s.jsx(Is,{href:t._extend.recurringEventRecord._user._url,"aria-label":t._extend.recurringEventRecord._user.title,children:s.jsx(Nt,{uri:t._extend.recurringEventRecord._user.uri})})}),t._extend?.recurringEventRecord?._audience&&t._extend?.recurringEventRecord?._audience.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(G0,{}),s.jsx(dd,{audience:t._extend.recurringEventRecord._audience})]})]}),s.jsxs(_e,{children:[t.type!=="recurringEventOccurrence"&&"qrCodeValue"in t&&t.qrCodeValue&&s.jsx(Ire,{children:s.jsx(lre,{value:t.qrCodeValue,color:"primary"})}),s.jsxs(Cre,{children:[(("dateStart"in t&&t.dateStart)??("dateEnd"in t&&t.dateEnd))&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-calendar",color:"grey5"}),s.jsx(ee,{color:"grey5",children:Q})]}),t._extend?.recurringEventRecord?.recurrenceRuleLabel&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-refresh",color:"grey5"}),s.jsx(ee,{color:"grey5",children:t._extend?.recurringEventRecord?.recurrenceRuleLabel})]}),((t.type!=="recurringEventOccurrence"&&"address"in t&&t.address)??t._extend?.recurringEventRecord?.address)&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-location-dot",color:"grey5"}),s.jsx(ee,{color:"grey5",children:t.type!=="recurringEventOccurrence"&&"address"in t&&t.address?t.address:t._extend?.recurringEventRecord?.address})]}),t.type!=="recurringEventOccurrence"&&"place"in t&&t.place&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-camera-web",color:F?"grey3":"grey5"}),s.jsx(ee,{color:"grey5",children:t.place!=="bbb"&&t.place!=="bbb-public"&&t.place!=="visioConnect"?s.jsx(Is,{href:t.place.match(/http.*/)?.[0],target:"_blank",children:u.formatMessage({id:"CALENDAR_Event_Visio_Url"})}):s.jsx(Is,{$disabled:F,href:"webinarUrl"in t&&t.webinarUrl?t.webinarUrl:"webinarUrlForGuests"in t&&t.webinarUrlForGuests?t.webinarUrlForGuests:"visioConnectUrl"in t&&t.visioConnectUrl?t.visioConnectUrl:"",target:"_blank",children:u.formatMessage({id:"CALENDAR_Event_Visio_Url"})})})]})]})]}),(t.description??t._extend?.recurringEventRecord?.description)&&s.jsx(V0,{children:s.jsx(wn,{__html:t.description??t._extend?.recurringEventRecord?.description??""})}),t.type!=="recurringEventOccurrence"&&"agenda"in t&&t.agenda&&s.jsx(V0,{children:s.jsx(wn,{__html:t.agenda})}),((t.type!=="recurringEventOccurrence"&&t._attachedFiles&&t._attachedFiles.length>0)??(t._extend?.recurringEventRecord?._attachedFiles&&t._extend?.recurringEventRecord?._attachedFiles.length>0))&&s.jsx(Bre,{children:s.jsx(Ko,{files:t._attachedFiles&&t._attachedFiles.length>0?t._attachedFiles:t._extend?.recurringEventRecord?._attachedFiles??[]})}),((t.type!=="recurringEventOccurrence"&&"report"in t&&t.report)??(t.type!=="recurringEventOccurrence"&&"reportFile"in t&&t.reportFile))&&s.jsxs(Dre,{children:[s.jsx(ee,{size:"s",weight:"medium",color:"grey6",children:u.formatMessage({id:"CALENDAR_Event_Report"})}),t.report&&s.jsx(wn,{__html:t.report}),t.reportFile&&s.jsx(Ko,{files:[t.reportFile]})]}),s.jsx(Tre,{children:Object.entries(J).map(([Y,Ae],L)=>Ae.map(S=>S&&typeof S=="object"&&"title"in S?s.jsx(Gv,{href:"uri"in S&&Y==="tags"?`/ng/rr/search/advanced?category=article&f-tags=${S.uri}`:void 0,label:S.title,defaultIcon:"icon-hashtag",iconOptions:{size:4,background:"none"}},`tag-${L}`):null))}),t.type!=="recurringEventOccurrence"&&"socialEventUseCeiling"in t&&t.socialEventCeiling!==void 0&&t.socialEventCeiling!==null&&t.socialEventUseCeiling&&t._extend?.socialEventRecord&&s.jsx(Sre,{children:s.jsxs(ee,{size:"s",color:"grey4",textAlign:"right",children:[t.socialEventCeiling-t._extend.socialEventRecord.subscribers.length,"/",t.socialEventCeiling," ",u.formatMessage({id:"CALENDAR_Event_Remaining_Seats"})]})}),s.jsxs(Ere,{children:[(t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update)&&(t.type==="recurringEventOccurrence"||!("noGestion"in t)||!t.noGestion)&&s.jsx(me,{color:"cancel",onClick:()=>b(!0),label:u.formatMessage({id:"CALENDAR_Event_Revive"})}),s.jsx(Ot,{href:`/?action=ical&id=${t._extend?.recurringEventRecord?.id??t.id}&type=${t._extend?.recurringEventRecord?.type??t.type}`,as:"button",color:"cancel",children:"iCal"}),t._extend?.socialEventRecord?.userResponseStatus!==void 0&&(t.type==="recurringEventOccurrence"||!("noGestion"in t)||!t.noGestion)&&s.jsx(oO,{eventType:t.type,eventAddress:"address"in t?t.address:void 0,eventIsVisio:t._extend.socialEventRecord.isVisio,canSubscribe:t.type!=="recurringEventOccurrence"||!("socialEventUseCeiling"in t)||!("socialEventCeiling"in t)||!t.socialEventUseCeiling||t.socialEventCeiling===null||t.socialEventCeiling===void 0||t.socialEventUseCeiling&&t._extend.socialEventRecord.subscribers&&t._extend.socialEventRecord.subscribers.length<Number(t.socialEventCeiling),status:t._extend.socialEventRecord.userResponseStatus,noGestion:"noGestion"in t?t.noGestion??!1:!1,urlGestion:"urlGestion"in t?t.urlGestion??void 0:void 0,onUpdateStatus:Y=>l({id:t.id,type:t.type,status:Y}),loading:c(t.id)})]}),i?.(t._extend?.recurringEventRecord??t)]})]})}),s.jsxs(Ow,{maxHeight:"550px",open:w,closeHandler:()=>{b(!1),v()},title:u.formatMessage({id:"CALENDAR_Event_Revive"}),buttons:[{children:u.formatMessage({id:"GLOBAL_Cancel"}),color:"cancel",clickHandler:()=>{b(!1),v()}},{children:u.formatMessage({id:"CALENDAR_Event_Revive"}),color:"primary",loading:C,clickHandler:g(k),disabled:!p("list")||!p("text")}],onSubmit:g(k),children:[s.jsx(cI,{description:u.formatMessage({id:"CALENDAR_Event_Revive_Select_Description"}),control:f,name:"list",options:U,rules:{required:!0}}),s.jsx(zv,{label:u.formatMessage({id:"CALENDAR_Event_Revive_Message_Label"}),description:u.formatMessage({id:"CALENDAR_Event_Revive_Message_Description"}),control:f,name:"text",rules:{required:!0}})]}),s.jsx(Yt,{open:y,closeHandler:()=>B(!1),title:u.formatMessage({id:"GLOBAL_Delete"}),buttons:[{color:"cancel",clickHandler:()=>B(!1),children:u.formatMessage({id:"GLOBAL_Cancel"})},{color:"danger",clickHandler:W,loading:E,children:u.formatMessage({id:"GLOBAL_Delete"}),dataCy:"delete-continue"}],children:s.jsx(ee,{children:u.formatMessage({id:t?._extend?.recurringEventRecord?"CALENDAR_Delete_Confirmation_Recurrent":"GLOBAL_Delete_Confirmation"})})})]})},Qre=m.div`
|
|
4756
|
+
`,Ore=({closeHandler:e,event:t,handler:n,onError:r,onSuccess:A,extraComponent:i,onDeleteEvent:o,onClickUpdateEvent:a,onUpdateStatus:l,isUpdateStatusLoading:c,mode:d="full"})=>{const u=H.useIntl(),{control:f,handleSubmit:g,watch:p,reset:v}=yt.useForm({defaultValues:{list:"all",text:""}}),[w,b]=h.useState(!1),[C,x]=h.useState(!1),[y,B]=h.useState(!1),[E,D]=h.useState(!1),[I,T]=h.useState(t&&"dateStart"in t&&t.dateStart?new Date(t.dateStart).getTime()-new Date().getTime():null),{formattedDate:Q}=hO(t??{}),F=h.useMemo(()=>t&&t.type!=="recurringEventOccurrence"&&"place"in t&&((t.place==="bbb"||t.place==="bbb-public")&&(!I||I>1e3*60*15)||!!t.place.match(/other:(?!http).+/)),[t,I]);h.useEffect(()=>{let J;return(!I||I>0)&&(J=setTimeout(()=>{T(t&&"dateStart"in t&&t.dateStart?new Date(t.dateStart).getTime()-new Date().getTime():null)},1e3)),()=>{clearTimeout(J)}},[t,I]);const U=h.useMemo(()=>{const J=[{label:u.formatMessage({id:"CALENDAR_Event_Revive_All"}),value:"all"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Available"}),value:"available"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Unavailable"}),value:"unavailable"},{label:u.formatMessage({id:"CALENDAR_Event_Revive_Waiting"}),value:"waiting"}];return t?._extend?.socialEventRecord?.isVisio&&(t&&"address"in t&&t.address!==""&&J.push({label:u.formatMessage({id:"CALENDAR_Event_Revive_On_Spot"}),value:"onSpot"}),J.push({label:u.formatMessage({id:"CALENDAR_Event_Revive_Visio"}),value:"visio"})),J},[t,u]),z=h.useMemo(()=>{switch(t?.type){case"socialEvent":default:return u.formatMessage({id:"CALENDAR_Event"});case"meeting":return u.formatMessage({id:"CALENDAR_Meeting"});case"animatedMeeting":return u.formatMessage({id:"GLOBAL_Animated_Meeting"});case"boardCard":return u.formatMessage({id:"CALENDAR_BoardCard"});case"recurringEventOccurrence":return u.formatMessage({id:"CALENDAR_Recurring_Event"})}},[t?.type,u]),k=h.useCallback(J=>{t&&(!J.list||!J.text||(x(!0),n.calendar.reviveSubmit({list:J.list,text:J.text,idArticle:t.id}).then(()=>{b(!1),v(),A(u.formatMessage({id:"GLOBAL_Sent"}))}).catch(Ae=>{r(Ae.errorMsg)}).finally(()=>{x(!1)})))},[t,n.calendar,u,r,A,v]),W=h.useCallback(()=>{t&&(D(!0),n.article.delete(t._extend?.recurringEventRecord?.id??t.id).then(()=>{o()}).catch(J=>{r(J.errorMsg)}).finally(()=>{B(!1),D(!1)}))},[t,n.article,o,r]),Z=h.useMemo(()=>!!t&&["socialEvent","meeting","recurringEventOccurrence"].includes(t.type)&&!!a,[t,a]),Y=h.useMemo(()=>t?t._extend?.recurringEventRecord?.tags?_.extractTaxonomiesFromObject(t._extend.recurringEventRecord):_.extractTaxonomiesFromObject(t):[],[t]);return s.jsxs(s.Fragment,{children:[s.jsx(Qw,{portal:"global",open:!!t,position:"right",closeHandler:e,title:z,showIconClose:!0,removePadding:!0,fixed:d==="compact",offsetTop:"var(--body-top)",optionsButton:t&&((t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update??!1)||(t.type!=="recurringEventOccurrence"?t._right.delete:t._extend?.recurringEventRecord?._right.delete??!1))?[...(t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update??!1)?[{label:u.formatMessage({id:"GLOBAL_Edit"}),href:Z?void 0:`/?action=article-edit&idArticle=${t.id}`,onClick:Z?()=>a?.(t):void 0}]:[],...(t.type!=="recurringEventOccurrence"?t._right.delete:t._extend?.recurringEventRecord?._right.delete??!1)?[{label:u.formatMessage({id:"GLOBAL_Delete"}),onClick:()=>B(!0)}]:[]]:void 0,children:t&&s.jsxs(wre,{children:[(t.image??t._extend?.recurringEventRecord?.image)&&s.jsx(xre,{children:s.jsx(ns,{aspectRatio:2,alt:t.type==="recurringEventOccurrence"?t._extend?.recurringEventRecord?.title??"":t.title,type:t.image?t.type:t._extend?.recurringEventRecord?.type,recordId:t.image?t.id:t._extend?.recurringEventRecord?.id,size:"original",from:"imagecache",objectFit:"cover",width:"100%",timestamp:ni(t.image?t.dateModified:t._extend?.recurringEventRecord?.dateModified??"")})}),s.jsxs(bre,{$mt:!t.image&&!t._extend?.recurringEventRecord?.image,children:[s.jsx(Is,{href:t._extend?.recurringEventRecord?._url??t._url,$underline:!1,children:s.jsx(ee,{size:"xl",weight:"semiBold",children:t.type==="recurringEventOccurrence"?t._extend?.recurringEventRecord?.title:t.title})}),s.jsxs(yre,{children:[t._user&&s.jsx(Rt,{description:t._user.title,children:s.jsx(Is,{href:t._user._url,"aria-label":t._user.title,children:s.jsx(Nt,{uri:t._user.uri})})}),t._audience.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(G0,{}),s.jsx(dd,{audience:t._audience})]}),t._extend?.recurringEventRecord?._user&&s.jsx(Rt,{description:t._extend.recurringEventRecord._user.title,children:s.jsx(Is,{href:t._extend.recurringEventRecord._user._url,"aria-label":t._extend.recurringEventRecord._user.title,children:s.jsx(Nt,{uri:t._extend.recurringEventRecord._user.uri})})}),t._extend?.recurringEventRecord?._audience&&t._extend?.recurringEventRecord?._audience.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(G0,{}),s.jsx(dd,{audience:t._extend.recurringEventRecord._audience})]})]}),s.jsxs(_e,{children:[t.type!=="recurringEventOccurrence"&&"qrCodeValue"in t&&t.qrCodeValue&&s.jsx(Ire,{children:s.jsx(lre,{value:t.qrCodeValue,color:"primary"})}),s.jsxs(Cre,{children:[(("dateStart"in t&&t.dateStart)??("dateEnd"in t&&t.dateEnd))&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-calendar",color:"grey5"}),s.jsx(ee,{color:"grey5",children:Q})]}),t._extend?.recurringEventRecord?.recurrenceRuleLabel&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-refresh",color:"grey5"}),s.jsx(ee,{color:"grey5",children:t._extend?.recurringEventRecord?.recurrenceRuleLabel})]}),((t.type!=="recurringEventOccurrence"&&"address"in t&&t.address)??t._extend?.recurringEventRecord?.address)&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-location-dot",color:"grey5"}),s.jsx(ee,{color:"grey5",children:t.type!=="recurringEventOccurrence"&&"address"in t&&t.address?t.address:t._extend?.recurringEventRecord?.address})]}),t.type!=="recurringEventOccurrence"&&"place"in t&&t.place&&s.jsxs(Kl,{children:[s.jsx(ne,{isMargin:!1,name:"icon-camera-web",color:F?"grey3":"grey5"}),s.jsx(ee,{color:"grey5",children:t.place!=="bbb"&&t.place!=="bbb-public"&&t.place!=="visioConnect"?s.jsx(Is,{href:t.place.match(/http.*/)?.[0],target:"_blank",children:u.formatMessage({id:"CALENDAR_Event_Visio_Url"})}):s.jsx(Is,{$disabled:F,href:"webinarUrl"in t&&t.webinarUrl?t.webinarUrl:"webinarUrlForGuests"in t&&t.webinarUrlForGuests?t.webinarUrlForGuests:"visioConnectUrl"in t&&t.visioConnectUrl?t.visioConnectUrl:"",target:"_blank",children:u.formatMessage({id:"CALENDAR_Event_Visio_Url"})})})]})]})]}),(t.description??t._extend?.recurringEventRecord?.description)&&s.jsx(V0,{children:s.jsx(wn,{__html:t.description??t._extend?.recurringEventRecord?.description??""})}),t.type!=="recurringEventOccurrence"&&"agenda"in t&&t.agenda&&s.jsx(V0,{children:s.jsx(wn,{__html:t.agenda})}),((t.type!=="recurringEventOccurrence"&&t._attachedFiles&&t._attachedFiles.length>0)??(t._extend?.recurringEventRecord?._attachedFiles&&t._extend?.recurringEventRecord?._attachedFiles.length>0))&&s.jsx(Bre,{children:s.jsx(Ko,{files:t._attachedFiles&&t._attachedFiles.length>0?t._attachedFiles:t._extend?.recurringEventRecord?._attachedFiles??[]})}),((t.type!=="recurringEventOccurrence"&&"report"in t&&t.report)??(t.type!=="recurringEventOccurrence"&&"reportFile"in t&&t.reportFile))&&s.jsxs(Dre,{children:[s.jsx(ee,{size:"s",weight:"medium",color:"grey6",children:u.formatMessage({id:"CALENDAR_Event_Report"})}),t.report&&s.jsx(wn,{__html:t.report}),t.reportFile&&s.jsx(Ko,{files:[t.reportFile]})]}),s.jsx(Tre,{children:Object.entries(Y).map(([J,Ae],L)=>Ae.map(S=>S&&typeof S=="object"&&"title"in S?s.jsx(Gv,{href:"uri"in S&&J==="tags"?`/ng/rr/search/advanced?category=article&f-tags=${S.uri}`:void 0,label:S.title,defaultIcon:"icon-hashtag",iconOptions:{size:4,background:"none"}},`tag-${L}`):null))}),t.type!=="recurringEventOccurrence"&&"socialEventUseCeiling"in t&&t.socialEventCeiling!==void 0&&t.socialEventCeiling!==null&&t.socialEventUseCeiling&&t._extend?.socialEventRecord&&s.jsx(Sre,{children:s.jsxs(ee,{size:"s",color:"grey4",textAlign:"right",children:[t.socialEventCeiling-t._extend.socialEventRecord.subscribers.length,"/",t.socialEventCeiling," ",u.formatMessage({id:"CALENDAR_Event_Remaining_Seats"})]})}),s.jsxs(Ere,{children:[(t.type!=="recurringEventOccurrence"?t._right.update:t._extend?.recurringEventRecord?._right.update)&&(t.type==="recurringEventOccurrence"||!("noGestion"in t)||!t.noGestion)&&s.jsx(me,{color:"cancel",onClick:()=>b(!0),label:u.formatMessage({id:"CALENDAR_Event_Revive"})}),s.jsx(Ot,{href:`/?action=ical&id=${t._extend?.recurringEventRecord?.id??t.id}&type=${t._extend?.recurringEventRecord?.type??t.type}`,as:"button",color:"cancel",children:"iCal"}),t._extend?.socialEventRecord?.userResponseStatus!==void 0&&(t.type==="recurringEventOccurrence"||!("noGestion"in t)||!t.noGestion)&&s.jsx(oO,{eventType:t.type,eventAddress:"address"in t?t.address:void 0,eventIsVisio:t._extend.socialEventRecord.isVisio,canSubscribe:t.type!=="recurringEventOccurrence"||!("socialEventUseCeiling"in t)||!("socialEventCeiling"in t)||!t.socialEventUseCeiling||t.socialEventCeiling===null||t.socialEventCeiling===void 0||t.socialEventUseCeiling&&t._extend.socialEventRecord.subscribers&&t._extend.socialEventRecord.subscribers.length<Number(t.socialEventCeiling),status:t._extend.socialEventRecord.userResponseStatus,noGestion:"noGestion"in t?t.noGestion??!1:!1,urlGestion:"urlGestion"in t?t.urlGestion??void 0:void 0,onUpdateStatus:J=>l({id:t.id,type:t.type,status:J}),loading:c(t.id)})]}),i?.(t._extend?.recurringEventRecord??t)]})]})}),s.jsxs(Ow,{maxHeight:"550px",open:w,closeHandler:()=>{b(!1),v()},title:u.formatMessage({id:"CALENDAR_Event_Revive"}),buttons:[{children:u.formatMessage({id:"GLOBAL_Cancel"}),color:"cancel",clickHandler:()=>{b(!1),v()}},{children:u.formatMessage({id:"CALENDAR_Event_Revive"}),color:"primary",loading:C,clickHandler:g(k),disabled:!p("list")||!p("text")}],onSubmit:g(k),children:[s.jsx(cI,{description:u.formatMessage({id:"CALENDAR_Event_Revive_Select_Description"}),control:f,name:"list",options:U,rules:{required:!0}}),s.jsx(zv,{label:u.formatMessage({id:"CALENDAR_Event_Revive_Message_Label"}),description:u.formatMessage({id:"CALENDAR_Event_Revive_Message_Description"}),control:f,name:"text",rules:{required:!0}})]}),s.jsx(Yt,{open:y,closeHandler:()=>B(!1),title:u.formatMessage({id:"GLOBAL_Delete"}),buttons:[{color:"cancel",clickHandler:()=>B(!1),children:u.formatMessage({id:"GLOBAL_Cancel"})},{color:"danger",clickHandler:W,loading:E,children:u.formatMessage({id:"GLOBAL_Delete"}),dataCy:"delete-continue"}],children:s.jsx(ee,{children:u.formatMessage({id:t?._extend?.recurringEventRecord?"CALENDAR_Delete_Confirmation_Recurrent":"GLOBAL_Delete_Confirmation"})})})]})},Qre=m.div`
|
|
4757
4757
|
display: flex;
|
|
4758
4758
|
flex-direction: column;
|
|
4759
4759
|
gap: ${({theme:e})=>e.space.md}px;
|
|
@@ -4774,7 +4774,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
4774
4774
|
max-width: 200px;
|
|
4775
4775
|
`,Mre=m(_e)`
|
|
4776
4776
|
min-height: 0;
|
|
4777
|
-
`,Hre=[{label:"CALENDAR_dayGridMonth",value:"dayGridMonth"},{label:"CALENDAR_timeGridWeek",value:"timeGridWeek"},{label:"CALENDAR_timeGridDay",value:"timeGridDay"},{label:"CALENDAR_listWeek",value:"list"}],wh=(e,t)=>`${new Date(e).toISOString()}${new Date(t).toISOString()}`,kre=({events:e,loading:t,views:n=["dayGridMonth","list","timeGridDay","timeGridWeek"],handler:r,defaultView:A,fluid:i=!0,mode:o="full",fullScreen:a,deportedToolbar:l,withPadding:c=!0,eventModalExtraComponent:d,onChangeView:u,onChangeDates:f,onError:g,onSuccess:p,onDeleteEvent:v,onClickUpdateEvent:w,onUpdateStatus:b,isUpdateStatusLoading:C,onSelect:x,disableSelect:y})=>{const B=H.useIntl(),[E,D]=h.useState(""),[I,T]=h.useState(),[Q,F]=h.useState(null),U=h.useRef(null),z=h.useRef(null),k=h.useRef(null),W=h.useCallback(()=>U.current?.getApi(),[U]),Z=l?.onCalendarApiInit;h.useEffect(()=>{Z?.(W())},[Z,W]);const
|
|
4777
|
+
`,Hre=[{label:"CALENDAR_dayGridMonth",value:"dayGridMonth"},{label:"CALENDAR_timeGridWeek",value:"timeGridWeek"},{label:"CALENDAR_timeGridDay",value:"timeGridDay"},{label:"CALENDAR_listWeek",value:"list"}],wh=(e,t)=>`${new Date(e).toISOString()}${new Date(t).toISOString()}`,kre=({events:e,loading:t,views:n=["dayGridMonth","list","timeGridDay","timeGridWeek"],handler:r,defaultView:A,fluid:i=!0,mode:o="full",fullScreen:a,deportedToolbar:l,withPadding:c=!0,eventModalExtraComponent:d,onChangeView:u,onChangeDates:f,onError:g,onSuccess:p,onDeleteEvent:v,onClickUpdateEvent:w,onUpdateStatus:b,isUpdateStatusLoading:C,onSelect:x,disableSelect:y})=>{const B=H.useIntl(),[E,D]=h.useState(""),[I,T]=h.useState(),[Q,F]=h.useState(null),U=h.useRef(null),z=h.useRef(null),k=h.useRef(null),W=h.useCallback(()=>U.current?.getApi(),[U]),Z=l?.onCalendarApiInit;h.useEffect(()=>{Z?.(W())},[Z,W]);const Y=h.useMemo(()=>Hre.filter(O=>n.includes(O.value)).map(O=>({label:B.formatMessage({id:O.label}),value:O.value})),[n,B]),[J,Ae]=h.useState(Y.find(O=>O.value===A)??Y[0]),L=l?.view;h.useEffect(()=>{L&&L.value!==J.value&&(Ae(L),u?.(L)),L||u?.(J)},[L,u,J]);const S=h.useCallback(()=>{D(W()?.view.title??"")},[W]);h.useEffect(()=>{W()?.changeView(J.value==="list"?"listMonth":J.value),S()},[W,S,J]),h.useEffect(()=>{W()?.changeView(A==="list"?"listMonth":A),S()},[W,S,A]),h.useEffect(()=>{!z.current||!e||e.length===0||J.value!=="list"||requestAnimationFrame(()=>{const O=z.current?.querySelector(".fc-day-today .fc-list-day-cushion");O&&O.scrollIntoView({behavior:"instant",block:"start"})})},[e,J.value]);const M=h.useMemo(()=>{switch(B.locale){case"fr":return IJ;case"es":return SJ;default:return DJ}},[B.locale]),V=h.useMemo(()=>e?.map(O=>{let oe,se;if("dateStart"in O&&O.dateStart&&"dateEnd"in O&&O.dateEnd)oe=new Date(O.dateStart),se=new Date(O.dateEnd);else if("dateStart"in O&&O.dateStart)oe=new Date(O.dateStart);else if("dateEnd"in O&&O.dateEnd)oe=new Date(O.dateEnd);else return console.error(`Event ${O.uri} has no dateStart or dateEnd defined.`),null;return{id:O.id===-1?Mn():String(O.id),title:O.title!==""?O.title:O._extend?.recurringEventRecord?.title??"",dateStart:oe,dateEnd:se,start:oe,end:"allDay"in O&&O.allDay&&se?jt(se,1):se,status:O._extend?.socialEventRecord?.userResponseStatus??null,audience:O.type!=="recurringEventOccurrence"?O._audience:O._extend?.recurringEventRecord?._audience??[],allDay:"allDay"in O?O.allDay:!1,bgColor:O.type!=="recurringEventOccurrence"&&"backgroundColor"in O&&O.backgroundColor?O.backgroundColor:O._extend?.recurringEventRecord?.bgColor,txtColor:O.type!=="recurringEventOccurrence"&&"textColor"in O&&O.textColor?O.textColor:O._extend?.recurringEventRecord?.textColor,address:O.type!=="recurringEventOccurrence"&&"address"in O?O.address:O._extend?.recurringEventRecord?.address,hasImage:O.type!=="recurringEventOccurrence"?!!O.image:!!O._extend?.recurringEventRecord?.image,type:O.type,isVisio:O._extend?.socialEventRecord?.isVisio,noGestion:O.type!=="recurringEventOccurrence"&&"noGestion"in O?O.noGestion:void 0,uri:O.type!=="recurringEventOccurrence"?O.uri:O._extend?.recurringEventRecord?.uri,canSubscribe:O.type==="recurringEventOccurrence"||!("socialEventUseCeiling"in O)||!O.socialEventUseCeiling||O.socialEventCeiling===null||O.socialEventCeiling===void 0||O._extend?.socialEventRecord&&O._extend.socialEventRecord.subscribers.length<O.socialEventCeiling,urlGestion:O.type!=="recurringEventOccurrence"&&"urlGestion"in O?O.urlGestion:void 0,recurrent:!!O._extend?.recurringEventRecord,_url:O._url}}).filter(ID),[e]),N=h.useMemo(()=>{switch(J.value){case"dayGridMonth":return o==="compact"?{weekday:"narrow"}:I&&I>780?{weekday:"long"}:{weekday:"short"};case"timeGridWeek":return I&&I>1200?{weekday:"long",day:"2-digit",month:"2-digit"}:I&&I>750?{weekday:"short",day:"2-digit",month:"2-digit"}:I&&I>650?{weekday:"narrow",day:"2-digit",month:"2-digit"}:{day:"numeric",month:"2-digit"};default:return}},[I,J.value]);h.useEffect(()=>{const O=new ResizeObserver(oe=>{T(oe[0].contentRect.width)});return z.current&&O.observe(z.current),()=>{O.disconnect()}},[]);const j=l?.onChangeLabel;h.useEffect(()=>{j?.(E)},[j,E]);const G=h.useMemo(()=>e?.find(O=>O.uri===Q?.uri||O.type==="recurringEventOccurrence"&&wh(O.dateStart,O.dateEnd)===Q?.dates&&O._extend?.recurringEventRecord?.uri===Q?.uri),[Q?.dates,Q?.uri,e]),X=h.useCallback(O=>!["meeting","socialEvent","recurringEventOccurrence"].includes(O),[]);return s.jsxs(s.Fragment,{children:[s.jsxs(Qre,{fullScreen:a,view:J.value,withPadding:c,children:[!l&&s.jsxs(Rre,{children:[t&&s.jsx("div",{children:s.jsx(Ve,{size:"s"})}),s.jsx(jre,{size:"l",weight:"medium",children:E}),s.jsxs(Fre,{children:[s.jsx(Le,{icon:"icon-chevron-left",onClick:()=>W()?.prev(),color:"grey5"}),s.jsx(Le,{icon:"icon-chevron-right",onClick:()=>W()?.next(),color:"grey5"})]}),s.jsx(Lre,{children:s.jsx(Le,{icon:"icon-calendar",onClick:()=>W()?.today(),tooltip:{description:"CALENDAR_Today",position:"top"},color:"grey5"})}),s.jsx(Pre,{children:s.jsx(Gi,{onChange:Ae,value:J,name:"selectView",options:Y,getLabel:O=>O.label,getValue:O=>O.value,required:!0,minWidth:!1})})]}),s.jsx(Mre,{x:"center",flex:"1",children:s.jsx(Ine,{ref:z,$fluid:i,$loading:t,$fullScreen:a,$view:J.value==="list"?"list":"grid",$mode:o,children:s.jsx(YT,{selectable:!!x&&!y&&!Q&&o!=="compact",select:O=>x?.({start:O.start,end:O.allDay?jt(O.end,-1):O.end,allDay:O.allDay}),dayHeaderFormat:N,datesSet:O=>{k.current?.start.getTime()===O.start.getTime()&&k.current.end.getTime()===O.end.getTime()||(f?.(O.start,O.end),S(),k.current={start:O.start,end:O.end})},headerToolbar:!1,firstDay:1,locale:M,plugins:[nte,Ane,pte,Dne],initialView:A,events:V,slotDuration:"00:15:00",slotLabelFormat:{hour:"numeric",minute:"2-digit",omitZeroMinute:!1,meridiem:"short"},eventContent:O=>s.jsx(Yne,{id:O.event.id,status:O.event.extendedProps.status,title:O.event.title,start:O.event.start,allDay:O.event.allDay,end:O.event.end,display:J.value,mode:o,audience:O.event.extendedProps.audience,backgroundColor:O.event.extendedProps.bgColor,textColor:O.event.extendedProps.txtColor,address:O.event.extendedProps.address,image:O.event.extendedProps.hasImage,type:O.event.extendedProps.type,isVisio:O.event.extendedProps.isVisio,noGestion:O.event.extendedProps.noGestion,onClick:X(O.event.extendedProps.type)?void 0:()=>F(oe=>oe?.uri===O.event.extendedProps.uri&&oe?.dates===wh(O.event.extendedProps.dateStart,O.event.extendedProps.dateEnd)?null:{uri:O.event.extendedProps.uri,dates:wh(O.event.extendedProps.dateStart,O.event.extendedProps.dateEnd)}),href:X(O.event.extendedProps.type)?O.event.extendedProps._url:void 0,canSubscribe:O.event.extendedProps.canSubscribe,urlGestion:O.event.extendedProps.urlGestion,onUpdateStatus:b,isUpdateStatusLoading:C,recurrent:O.event.extendedProps.recurrent},`event-${Mn()}`),ref:U,allDayText:"",allDaySlot:e?.some(O=>"allDay"in O&&O.allDay),height:"100%",dayMaxEvents:o==="compact"?0:4,eventMaxStack:J.value==="timeGridWeek"?2:4,moreLinkText:o==="compact"?O=>String(O):void 0})})})]}),s.jsx(h.Suspense,{fallback:s.jsx(s.Fragment,{}),children:s.jsx(Ore,{event:G,closeHandler:()=>F(null),handler:r,onError:g,onSuccess:p,extraComponent:d,onDeleteEvent:()=>{F(null),v()},onClickUpdateEvent:w,onUpdateStatus:b,isUpdateStatusLoading:C,mode:o})})]})},Nre=m.div`
|
|
4778
4778
|
display: flex;
|
|
4779
4779
|
flex-direction: column;
|
|
4780
4780
|
`,Ure=m.div`
|
|
@@ -4853,7 +4853,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
4853
4853
|
text-decoration: none;
|
|
4854
4854
|
}
|
|
4855
4855
|
${Ze({offset:"0"})}
|
|
4856
|
-
`,iAe=({newWidgetsWrapperComponent:e,widgetListComponent:t,canComment:n,loading:r,currentUser:A,onComment:i,onError:o,tinyMCEConfig:a,token:l,handlers:c,activeDrives:d,canCreateWidget:u,socialQuestion:f,deleteFile:g,additionalExtensions:p})=>{const v=H.useIntl(),[w,b]=h.useState(!1),[C,x]=h.useState(""),[y,B]=h.useState(!0),[E,D]=h.useState(!1),[I,T]=h.useState(!1),[Q,F]=h.useState([]),[U,z]=h.useState(!1),k=h.useCallback(()=>{i({content:C,alertAuthor:E,sendAlert:y}).then(()=>{b(!1),T(!1),x(""),F([]),z(!1)})},[C,E,y,i]);return s.jsxs(s.Fragment,{children:[s.jsx(_re,{children:n?s.jsxs(s.Fragment,{children:[s.jsx(Nt,{uri:A.uri,size:5,variant:"circle"}),s.jsxs($re,{children:[s.jsxs(tAe,{children:[w&&s.jsx(eAe,{children:s.jsx(as,{...a,token:l,onChange:x,value:C,height:250,autofocus:!0,dataCy:"new-comment-tiny",additionalExtensions:p,handlers:c})}),s.jsx(AAe,{$visible:!w,onClick:()=>b(!0),"data-cy":"new-comment-input",children:v.formatMessage({id:"COMMENT_Placeholder"})}),U&&s.jsx(rAe,{children:s.jsx(Fa,{deleteFile:g,onUploadSuccess:W=>{F([...Q,W]),C||x(W.title)},onDeleteSuccess:W=>F(Q.filter((Z,
|
|
4856
|
+
`,iAe=({newWidgetsWrapperComponent:e,widgetListComponent:t,canComment:n,loading:r,currentUser:A,onComment:i,onError:o,tinyMCEConfig:a,token:l,handlers:c,activeDrives:d,canCreateWidget:u,socialQuestion:f,deleteFile:g,additionalExtensions:p})=>{const v=H.useIntl(),[w,b]=h.useState(!1),[C,x]=h.useState(""),[y,B]=h.useState(!0),[E,D]=h.useState(!1),[I,T]=h.useState(!1),[Q,F]=h.useState([]),[U,z]=h.useState(!1),k=h.useCallback(()=>{i({content:C,alertAuthor:E,sendAlert:y}).then(()=>{b(!1),T(!1),x(""),F([]),z(!1)})},[C,E,y,i]);return s.jsxs(s.Fragment,{children:[s.jsx(_re,{children:n?s.jsxs(s.Fragment,{children:[s.jsx(Nt,{uri:A.uri,size:5,variant:"circle"}),s.jsxs($re,{children:[s.jsxs(tAe,{children:[w&&s.jsx(eAe,{children:s.jsx(as,{...a,token:l,onChange:x,value:C,height:250,autofocus:!0,dataCy:"new-comment-tiny",additionalExtensions:p,handlers:c})}),s.jsx(AAe,{$visible:!w,onClick:()=>b(!0),"data-cy":"new-comment-input",children:v.formatMessage({id:"COMMENT_Placeholder"})}),U&&s.jsx(rAe,{children:s.jsx(Fa,{deleteFile:g,onUploadSuccess:W=>{F([...Q,W]),C||x(W.title)},onDeleteSuccess:W=>F(Q.filter((Z,Y)=>W!==Y)),token:l,activeDrives:d,multiple:!0,handlers:c,dispatchOnError:o,directFilePopupOpening:{open:I,onClose:()=>T(!1)}})})]}),u&&e]})]}):s.jsx(ss,{variant:"info",message:s.jsx(wn,{__html:v.formatMessage({id:"ACTIVITY_Can_Not_comment_Desc"})})})}),n&&s.jsxs(nAe,{children:[s.jsx(Rt,{description:v.formatMessage({id:"SPOTLIGHT_Send_Alert_To_Subscribers"}),children:s.jsx(Le,{bg:y?"green":"grey1",bgHover:y?"greenStrong":"grey2",color:y?"white":"grey5",iconSize:14,onClick:()=>B(!y),icon:"icon-envelope",dataCy:"comment-email-notif",srOnly:v.formatMessage({id:"SPOTLIGHT_Send_Alert_To_Subscribers"})})}),s.jsx(Rt,{description:v.formatMessage({id:"SPOTIT_Receive_A_Copy"}),children:s.jsx(Le,{bg:E?"green":"grey1",bgHover:E?"greenStrong":"grey2",color:E?"white":"grey5",iconSize:14,onClick:()=>D(!E),icon:"icon-user",dataCy:"comment-receive-copy",srOnly:v.formatMessage({id:"SPOTIT_Receive_A_Copy"})})}),u&&t,s.jsx(Rt,{description:v.formatMessage({id:"GLOBAL_Add_File"}),children:s.jsx(Le,{bg:"grey1",bgHover:"grey2",color:"grey5",iconSize:14,onClick:()=>{z(!0),b(!0),T(!0)},icon:"icon-attach",dataCy:"comment-add-file",srOnly:v.formatMessage({id:"GLOBAL_Add_File"})})}),s.jsx(me,{"data-cy":"add-comment",noMargin:!0,color:"primary",disabled:!C||!l||r,onClick:k,children:v.formatMessage({id:f?"COMMENT_Answer":"COMMENT_Add_Comment"})})]})]})},vO=({dateCreation:e,size:t,color:n="grey4",tooltipPosition:r="right"})=>{const A=H.useIntl(),[i,o]=h.useState(),a=h.useCallback(l=>{const c=new Date(l),d=new Date,u=d.getTime()-c.getTime();return u<1e3*60?A.formatMessage({id:"COMMENT_Just_Now"}):u<1e3*60*60?A.formatMessage({id:"COMMENT_Minutes_Ago"},{minutes:Math.round(u/(1e3*60))}):u<1e3*60*60*24&&c.getDate()===d.getDate()?`${ur(c.getHours())}:${ur(c.getMinutes())}`:u<1e3*60*60*24*31&&c.getMonth()===d.getMonth()?`${ur(c.getDate())}/${ur(c.getMonth()+1)}`:`${ur(c.getDate())}/${ur(c.getMonth()+1)}/${c.getFullYear()}`},[A]);return h.useEffect(()=>{o(a(e));const l=setInterval(()=>{o(a(e))},1e3*60);return()=>clearInterval(l)},[e,a]),s.jsx(Rt,{position:r,description:A.formatDate(e,{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),children:s.jsx(ee,{color:n,size:t,whiteSpace:"nowrap",children:i})})},oAe=m.div``,sAe=m(ee)`
|
|
4857
4857
|
display: flex;
|
|
4858
4858
|
justify-content: space-between;
|
|
4859
4859
|
align-items: center;
|
|
@@ -5098,7 +5098,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
5098
5098
|
margin-top: ${({theme:e})=>e.space.sm}px;
|
|
5099
5099
|
`,PAe=m.div`
|
|
5100
5100
|
margin-top: 12px;
|
|
5101
|
-
`,MAe=({isFocused:e,comment:t,token:n,tinyMCEConfig:r,onCommentUpdate:A,onCommentDelete:i,onError:o,highlightFields:a,userModel:l,userAccountStatus:c,isWidgetActive:d,getAccessHash:u,onGetHashError:f,deleteFile:g,existingWidgetsWrapperComponent:p,activeDrives:v,handlers:w,socialQuestion:b,articleId:C,onReport:x})=>{const y=m.useTheme(),B=H.useIntl(),[E,D]=h.useState(!1),[I,T]=h.useState(!1),[Q,F]=h.useState(!1),[U,z]=h.useState(!1),[k,W]=h.useState(!1),[Z,
|
|
5101
|
+
`,MAe=({isFocused:e,comment:t,token:n,tinyMCEConfig:r,onCommentUpdate:A,onCommentDelete:i,onError:o,highlightFields:a,userModel:l,userAccountStatus:c,isWidgetActive:d,getAccessHash:u,onGetHashError:f,deleteFile:g,existingWidgetsWrapperComponent:p,activeDrives:v,handlers:w,socialQuestion:b,articleId:C,onReport:x})=>{const y=m.useTheme(),B=H.useIntl(),[E,D]=h.useState(!1),[I,T]=h.useState(!1),[Q,F]=h.useState(!1),[U,z]=h.useState(!1),[k,W]=h.useState(!1),[Z,Y]=h.useState(t.description),[J,Ae]=h.useState(!1),[L,S]=h.useState(!1),[M,V]=h.useState(!0),N=h.useRef(null),j=h.useRef(null),G=kn(),X=h.useCallback(()=>{n&&Z&&(Ae(!0),A({idComment:t.id,description:Z,token:n}).then(()=>{W(!1),Ae(!1)}))},[n,t,Z,A]),O=h.useCallback(()=>{Ae(!0),i(t.id).then(()=>{z(!1),Ae(!1),b?.responseId===t.id&&b.onUnselectResponse()}).catch(te=>o?.(te.errorMsg))},[t.id,i,o,b]);h.useEffect(()=>{V(j.current!==null&&N.current!==null&&N.current.clientHeight>j.current.clientHeight);const te=new ResizeObserver(()=>{V(j.current!==null&&N.current!==null&&N.current.clientHeight>j.current.clientHeight)});return N.current&&te.observe(N.current),()=>{te.disconnect()}},[t]);const oe=h.useCallback(te=>new Promise((xe,Oe)=>{n&&g(te).then(()=>{X(),xe()}).catch(Te=>{o&&o(Te.errorMsg),Oe()})}),[g,o,n,X]),se=h.useMemo(()=>{if(t._widgets)return p(t,t._widgets,"view",!0)},[t,p]),He=h.useCallback(()=>{b&&w.questionAnswer.selectResponse({idResponse:t.id,idQuestion:C},{signal:G.signal}).then(()=>{b.onSelectResponse(t.id)}).catch(te=>{o&&!G.signal.aborted&&o(te.errorMsg)})},[G.signal,C,t.id,w.questionAnswer,o,b]),re=h.useCallback(()=>{b&&w.questionAnswer.unselectResponse({idQuestion:C},{signal:G.signal}).then(()=>{b.onUnselectResponse()}).catch(te=>{o&&!G.signal.aborted&&o(te.errorMsg)})},[G.signal,C,w.questionAnswer,o,b]);return s.jsx(SAe,{"data-cy":`comment-${t.id}`,children:s.jsxs(IAe,{$pending:t.pending,$focused:e,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[s.jsx(Rw,{children:s.jsx(Ot,{href:t._user._url,"aria-label":B.formatMessage({id:"GLOBAL_Redirect_To_User_Profile_React"},{username:t._user.title}),children:s.jsx(Nt,{uri:t._user.uri,size:5,variant:"circle",timestamp:t._user.dateModified})})}),s.jsx(J0,{children:k&&n?s.jsx(DAe,{comment:t,loading:J,token:n,activeDrives:v,commentContent:Z,setCommentContent:Y,tinyMCEConfig:r,updateComment:X,handlers:w,closeEditMode:()=>W(!1),deleteFile:g,onError:o}):s.jsxs(J0,{children:[s.jsxs(_e,{x:"space-between",children:[s.jsxs(TAe,{children:[s.jsx(xO,{uri:t._user.uri,onError:o,handlers:{user:w.user},children:s.jsxs(OAe,{children:[s.jsx(Ot,{href:t._user._url,children:t._user.title}),s.jsx(jw,{user:t._user,isUserActive:c===1})]})}),s.jsx(Ou,{size:"s",color:"grey4"}),s.jsx(vO,{dateCreation:t.dateCreation})]}),(t._right.update||t._right.delete||b?.canSelectResponse)&&s.jsxs(s.Fragment,{children:[s.jsx(QAe,{onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:s.jsx(vv,{withBorder:!0,onToggle:te=>F(te),trigger:s.jsx(RAe,{children:s.jsx(ne,{name:"icon-cogwheel",size:12,color:E||Q?I||Q?y.color.grey4:y.color.grey3:y.color.white})}),dropdown:te=>s.jsxs(s.Fragment,{children:[t._right.update&&s.jsx(bh,{onClick:()=>{te(),W(!0)},children:B.formatMessage({id:"GLOBAL_Edit"})}),t._right.delete&&s.jsx(bh,{onClick:()=>{te(),z(!0)},children:B.formatMessage({id:"GLOBAL_Delete"})}),b?.responseId===t.id&&b?.canSelectResponse&&s.jsx(bh,{onClick:()=>{te(),re()},children:B.formatMessage({id:"COMMENT_Unselect_Response"})})]}),align:"right"})}),s.jsx(Yt,{buttons:[{color:"cancel",clickHandler:()=>z(!1),children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Cancel"})},{color:"danger",clickHandler:O,children:s.jsx(H.FormattedMessage,{id:"GLOBAL_Delete"}),loading:J}],open:U,closeHandler:()=>z(!1),title:B.formatMessage({id:"GLOBAL_Delete"}),children:B.formatMessage({id:"COMMENT_Delete_Comment"})})]})]}),a&&l&&s.jsx(bO,{user:t._user,highlightFields:a,userModel:l}),b&&s.jsxs(s.Fragment,{children:[b.responseId===t.id&&s.jsx(_0,{children:s.jsx(ss,{variant:"success",message:B.formatMessage({id:"COMMENT_Chosen_Response"})})}),!b.isResolved&&b.canSelectResponse&&s.jsx(_0,{children:s.jsx(me,{onClick:He,size:"s",label:B.formatMessage({id:"COMMENT_Choose_Response"}),dataCy:"questionAnswers-select-response-button"})})]}),s.jsxs(jAe,{ref:j,$isDeployed:L,children:[s.jsx(wn,{ref:N,__html:t.description??void 0}),d&&s.jsx(FAe,{children:t._widgets&&se})]}),M&&(L?s.jsx(Z0,{onClick:()=>S(!1),children:B.formatMessage({id:"GLOBAL_See_Less"})}):s.jsx(LAe,{children:s.jsx(Z0,{onClick:()=>S(!0),children:B.formatMessage({id:"GLOBAL_See_More"})})})),t._attachedFiles&&t._attachedFiles.length>0&&s.jsx(Y0,{children:s.jsx(Ko,{files:t._attachedFiles,onError:f,getAccessHash:u,onDelete:t._right.update&&n?oe:void 0})}),t._extend.quarantine&&t._extend.quarantine.count>0&&s.jsx(Y0,{children:s.jsx(lAe,{count:t._extend.quarantine.count,commentId:t.id,load:te=>w.fileIntegrity.getCommentQuarantines(te,{formatExtension:["attachments"]}),onError:o})}),t._extend.actions&&t._extend.actions.length>0&&s.jsx(PAe,{children:s.jsx(wO,{uri:t.uri,actions:t._extend.actions,handlers:w,onReport:x})})]})})]})})},HAe=m.div`
|
|
5102
5102
|
background-color: ${({theme:e})=>e.color.grey0};
|
|
5103
5103
|
border-radius: 8px;
|
|
5104
5104
|
margin: 0 ${({$marginY:e})=>e}px;
|
|
@@ -5106,7 +5106,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
5106
5106
|
display: flex;
|
|
5107
5107
|
flex-direction: column;
|
|
5108
5108
|
gap: ${({theme:e})=>e.space.sm}px;
|
|
5109
|
-
`,NAe=({comments:e,initialCommentsNumber:t=5,currentUser:n,tinyMCEConfig:r,onComment:A,canCreateWidget:i=!1,isWidgetActive:o=!1,widgetListComponent:a,newWidgetsWrapperComponent:l,existingWidgetsWrapperComponent:c,loading:d,token:u,onCommentDelete:f,onCommentUpdate:g,onError:p,highlightFields:v,userModel:w,userAccountStatus:b,getAccessHash:C,onGetHashError:x,activeDrives:y,variant:B,canComment:E,handlers:D,socialQuestion:I,articleId:T,additionalExtensions:Q,onReport:F})=>{const U=h.useRef(null),[z,k]=h.useState(),[W,Z]=h.useState(t),
|
|
5109
|
+
`,NAe=({comments:e,initialCommentsNumber:t=5,currentUser:n,tinyMCEConfig:r,onComment:A,canCreateWidget:i=!1,isWidgetActive:o=!1,widgetListComponent:a,newWidgetsWrapperComponent:l,existingWidgetsWrapperComponent:c,loading:d,token:u,onCommentDelete:f,onCommentUpdate:g,onError:p,highlightFields:v,userModel:w,userAccountStatus:b,getAccessHash:C,onGetHashError:x,activeDrives:y,variant:B,canComment:E,handlers:D,socialQuestion:I,articleId:T,additionalExtensions:Q,onReport:F})=>{const U=h.useRef(null),[z,k]=h.useState(),[W,Z]=h.useState(t),Y=h.useCallback(()=>{Z(W+5)},[W]),J=h.useCallback(()=>{e&&(k(e.length-1),U?.current&&U.current.scrollIntoView({block:"end"}))},[e]),Ae=h.useCallback(async L=>{if(u)try{await D.file.deleteFile(L,"attachment",u)}catch(S){p&&p(S)}},[D.file,p,u]);return h.useEffect(()=>{const L=()=>{k(void 0)};return z!==void 0?document.addEventListener("click",L):document.removeEventListener("click",L),()=>{document.removeEventListener("click",L)}},[z]),s.jsx(s.Fragment,{children:s.jsxs(HAe,{$marginY:B==="modal"?8:0,children:[s.jsx(Zre,{displayedCommentsNumber:W,displayMoreComments:Y,focusLastComment:J,commentsCount:e?.length,lastCommentUser:e?.[e.length-1]?._user,variant:B}),e&&s.jsx(kAe,{ref:U,children:e.map((L,S)=>e.length-S<=W?s.jsx("div",{children:s.jsx(MAe,{isFocused:S===z,comment:L,tinyMCEConfig:r,onCommentDelete:f,onCommentUpdate:g,deleteFile:Ae,token:u,onError:p,highlightFields:v,userModel:w,userAccountStatus:b,isWidgetActive:o,onGetHashError:x,getAccessHash:C,existingWidgetsWrapperComponent:c,handlers:D,activeDrives:y,socialQuestion:I,articleId:T,onReport:F})},`comment-${S}`):null)}),s.jsx(iAe,{currentUser:n,widgetListComponent:a,newWidgetsWrapperComponent:l,canComment:E,onComment:A,tinyMCEConfig:r,activeDrives:y,socialQuestion:!!I,token:u,onError:p,handlers:D,canCreateWidget:i,deleteFile:Ae,loading:d,additionalExtensions:Q})]})})},UAe=m.span`
|
|
5110
5110
|
display: flex;
|
|
5111
5111
|
align-items: center;
|
|
5112
5112
|
gap: 8px;
|
|
@@ -5423,7 +5423,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
5423
5423
|
margin-bottom 200ms ease;
|
|
5424
5424
|
pointer-events: none;
|
|
5425
5425
|
overflow: hidden;
|
|
5426
|
-
`,CO=h.memo(({mainItems:e,stackItems:t,MainItemComponent:n,StackItemComponent:r,EmptyStateComponent:A,onItemAddFromStack:i,onItemMove:o,onItemRemove:a,canReorder:l=!0,canRemoveItems:c=!1,isStackFixed:d=!0,isItemDisabled:u,mainTitle:f,stackTitle:g,emptyStateText:p,$maxHeight:v,beforeMain:w,afterMain:b,afterStack:C,onStackItemKeyDown:x})=>{const y=H.useIntl(),B=h.useMemo(()=>f??y.formatMessage({id:"DND_MAIN_TITLE"}),[f,y]),E=h.useMemo(()=>g??y.formatMessage({id:"DND_STACK_TITLE"}),[g,y]),D=h.useMemo(()=>p??y.formatMessage({id:"DND_EMPTY_STATE"}),[p,y]),[I,T]=h.useState(null),Q=h.useCallback((S,M)=>{o(S,M)},[o]),F=h.useCallback((S,M,V)=>{i(S,M,V)},[i]),U=h.useCallback((S,M)=>{a&&a(S,M)},[a]),z=h.useCallback((S,M,V)=>{let N=S;S==="between"&&M===e.length&&(N="after-last"),T({position:N,index:M,dragType:V})},[e.length]),k=h.useCallback(()=>{T(null)},[]),W=h.useCallback((S,M)=>{if(!I)return;const V=I.index??0;i(S,V,M)},[I,i]),Z=h.useCallback(S=>{if(!I||!l)return;let M=I.index??0;S<M&&(M-=1),M=Math.max(0,M),S!==M&&o(S,M)},[I,l,o]),
|
|
5426
|
+
`,CO=h.memo(({mainItems:e,stackItems:t,MainItemComponent:n,StackItemComponent:r,EmptyStateComponent:A,onItemAddFromStack:i,onItemMove:o,onItemRemove:a,canReorder:l=!0,canRemoveItems:c=!1,isStackFixed:d=!0,isItemDisabled:u,mainTitle:f,stackTitle:g,emptyStateText:p,$maxHeight:v,beforeMain:w,afterMain:b,afterStack:C,onStackItemKeyDown:x})=>{const y=H.useIntl(),B=h.useMemo(()=>f??y.formatMessage({id:"DND_MAIN_TITLE"}),[f,y]),E=h.useMemo(()=>g??y.formatMessage({id:"DND_STACK_TITLE"}),[g,y]),D=h.useMemo(()=>p??y.formatMessage({id:"DND_EMPTY_STATE"}),[p,y]),[I,T]=h.useState(null),Q=h.useCallback((S,M)=>{o(S,M)},[o]),F=h.useCallback((S,M,V)=>{i(S,M,V)},[i]),U=h.useCallback((S,M)=>{a&&a(S,M)},[a]),z=h.useCallback((S,M,V)=>{let N=S;S==="between"&&M===e.length&&(N="after-last"),T({position:N,index:M,dragType:V})},[e.length]),k=h.useCallback(()=>{T(null)},[]),W=h.useCallback((S,M)=>{if(!I)return;const V=I.index??0;i(S,V,M)},[I,i]),Z=h.useCallback(S=>{if(!I||!l)return;let M=I.index??0;S<M&&(M-=1),M=Math.max(0,M),S!==M&&o(S,M)},[I,l,o]),Y=h.useCallback(()=>{e.length===0&&T({position:"empty",index:void 0,dragType:"stack"})},[e.length]),J=h.useCallback((S,M)=>{const V=n;return s.jsx(hie,{item:S,index:M,canReorder:l,onMove:Q,onDropFromStack:F,onHover:z,onHoverEnd:k,children:s.jsx(V,{item:S,index:M,onRemove:()=>U(S,M),canRemove:c,isDragging:!1})},`main-${S.id}`)},[n,l,c,Q,F,U,z,k]),Ae=h.useCallback((S,M)=>{const V=r,N=u?u(S,M):!1,j=x?G=>x(S,M,N,G):void 0;return s.jsx(wie,{item:S,index:M,isDisabled:N,isStackFixed:d,onKeyDown:j,children:s.jsx(V,{item:S,index:M,isDisabled:N,isDragging:!1})},`stack-${S.id}`)},[r,u,d,x]),L=h.useCallback(()=>{if(e.length===0){const M=I?.position==="empty";return A?s.jsx(A,{isDraggingOver:M}):s.jsx(Sie,{"data-testid":"one-level-empty-state",$isDraggingOver:M,children:D})}const S=[];return e.forEach((M,V)=>{V===0?S.push(s.jsx(xh,{$isActive:I?.position==="before-first"},"spacer-before-first")):S.push(s.jsx(xh,{$isActive:I?.position==="between"&&I.index===V},`spacer-${V}`)),S.push(J(M,V)),V===e.length-1&&S.push(s.jsx(xh,{$isActive:I?.position==="after-last"},"spacer-after-last"))}),s.jsx(s.Fragment,{children:S})},[e,I,A,D,J]);return s.jsx(ja,{children:s.jsxs(bie,{$maxHeight:v,children:[s.jsxs(xie,{children:[f&&s.jsx(yie,{variant:"h3",color:"grey6",children:B}),w,s.jsx(mie,{onDropFromStack:F,onAddStackItem:W,onMoveMainItem:Z,onHoverEmpty:Y,onHoverEnd:k,children:s.jsx(Cie,{children:L()})}),b]}),s.jsxs(Bie,{children:[g&&s.jsx(Eie,{variant:"h3",color:"grey6",children:E}),s.jsxs(Die,{children:[t.map((S,M)=>Ae(S,M)),C]})]})]})})});CO.displayName="JRCDndOneLevelWithStack";const Iie=CO,BO=h.memo(({data:e,ItemComponent:t,EmptyStateComponent:n,onItemMove:r,onItemMoveToSection:A,onItemRemove:i,onSectionMove:o,onSectionAdd:a,onSectionRemove:l,onSectionLabelChange:c,canAddSections:d=!0,canRemoveSections:u=!0,canEditSectionLabels:f=!0,canRemoveItems:g=!1,addSectionText:p,emptyStateText:v,stackTitle:w,sectionsTitle:b,sectionErrors:C={},sectionError:x,$maxHeight:y})=>{const B=H.useIntl(),E=h.useMemo(()=>e.customSections,[e.customSections]),D=h.useMemo(()=>e.defaultSection,[e.defaultSection]),I=h.useMemo(()=>p??B.formatMessage({id:"DND_ADD_SECTION"}),[p,B]),T=h.useMemo(()=>v??B.formatMessage({id:"DND_EMPTY_STATE"}),[v,B]),Q=h.useMemo(()=>w??B.formatMessage({id:"DND_STACK_TITLE"}),[w,B]),F=h.useMemo(()=>b??B.formatMessage({id:"DND_SECTIONS_TITLE"}),[b,B]),U=h.useMemo(()=>B.formatMessage({id:"DND_NEW_SECTION_LABEL"}),[B]),z=h.useCallback((S,M,V)=>{r(S,M,V)},[r]),k=h.useCallback((S,M,V)=>{A(S,M,V)},[A]),W=h.useCallback((S,M)=>{o(S,M)},[o]),Z=h.useCallback(()=>{a()},[a]),Y=h.useCallback(S=>{l(S)},[l]),J=h.useCallback((S,M)=>{M.trim().length>0&&c(S,M)},[c]),Ae=h.useCallback((S,M,V)=>{const N=t;return s.jsx(Dd,{type:gr.ITEM,item:S,onMove:(j,G)=>z(j,G,V),onMoveToSection:(j,G)=>k(j,G,V),sectionId:V,index:M,children:s.jsx(N,{item:S,dragHandleProps:{"aria-label":`Drag item ${String(S.id)}`},onRemove:i,sectionId:V,canRemove:g})},`${V}-${S.id}`)},[t,z,k,i,g]),L=h.useCallback((S,M)=>s.jsx(Dd,{type:gr.SECTION,item:S,onMove:W,index:M,"data-testid":`section-${S.id}`,children:s.jsxs(eie,{"data-testid":`section-wrapper-${M}`,children:[s.jsxs(tie,{$hasItems:S.items.length>0,children:[s.jsxs(nie,{children:[s.jsx(ym,{label:`Drag section handle for ${S.label}`,name:"icon-grip-dots-vertical",color:"grey4"}),f?s.jsx(rie,{name:`section-label-${S.id}`,value:S.label??"",placeholder:U,onChange:V=>J(S.id,V.target.value),"aria-label":`Edit section label for ${S.label}`,required:!0,minLength:1,$hasError:C[S.id]??!1}):s.jsx(_Ae,{children:S.label})]}),u&&s.jsx(Aie,{"data-testid":`remove-section-${M}`,onClick:()=>Y(S.id),"aria-label":`Remove section ${S.label}`,srOnly:`Drag section handle for ${S.label}`,icon:"icon-close",color:"grey4",variant:"circle",size:"small"})]}),s.jsx(Sd,{onDrop:V=>{const N=V;N.sectionId!==S.id&&k(N,S.items.length,S.id)},accept:gr.ITEM,children:s.jsxs(iie,{children:[S.items.map((V,N)=>Ae(V,N,S.id)),S.items.length===0&&(n?s.jsx(n,{sectionId:S.id,"data-testid":"empty-state"}):s.jsx(Cm,{"data-testid":"empty-state",children:T}))]})})]})},S.id),[W,f,U,C,u,n,T,J,Y,k,Ae]);return D?s.jsx(ja,{children:s.jsxs(KAe,{$maxHeight:y,children:[s.jsxs(qAe,{children:[s.jsx($0,{variant:"h3",color:"grey6",children:Q}),s.jsx(JAe,{children:s.jsx(Sd,{onDrop:S=>{const M=S;M.sectionId!==D.id&&k(M,D.items.length,D.id)},accept:gr.ITEM,children:s.jsxs(s.Fragment,{children:[D.items.map((S,M)=>Ae(S,M,D.id)),D.items.length===0&&(n?s.jsx(n,{sectionId:D.id}):s.jsx(Cm,{"data-testid":"default-empty-state",children:T}))]})})})]}),s.jsxs(YAe,{children:[s.jsx(ZAe,{children:s.jsx($0,{variant:"h3",color:"grey6",children:F})}),x&&s.jsx(sie,{children:x}),E.length>0&&s.jsx($Ae,{children:E.map((S,M)=>L(S,M))}),d&&s.jsx(oie,{onClick:Z,"aria-label":"Add new section","data-testid":"add-section-button",children:I})]})]})}):s.jsx("div",{style:{padding:"20px"},children:"Loading..."})});BO.displayName="JRCDndTwoLevelWithStack";const Tie=BO,Oie=m.form`
|
|
5427
5427
|
display: flex;
|
|
5428
5428
|
flex-direction: column;
|
|
5429
5429
|
flex: 1;
|
|
@@ -6459,7 +6459,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var re=He(X,se,N,j,G+"."
|
|
|
6459
6459
|
flex-direction: column;
|
|
6460
6460
|
gap: 8px;
|
|
6461
6461
|
width: 100%;
|
|
6462
|
-
`,Vae=({token:e,uniqid:t,content:n,inplace:r=!1,onChangeContent:A,onChangeWrapper:i,handleChange:o})=>{const a=H.useIntl(),[l,c]=h.useState(!1),[d,u]=h.useState(null),[f,g]=h.useState(0),p=h.useRef([]),v=h.useCallback(()=>{g(n?.arr?.length??0)},[n]),w=h.useCallback(()=>{if(!Array.isArray(n.arr))return;const Q=[...n.arr,{title:"",value:!1}];o({arr:Q}),v(),p.current.push(h.createRef())},[v,o,n.arr]),b=h.useCallback(Q=>{i({uniqid:t,title:Q})},[i,t]),C=(Q,F)=>{const U=n?.arr?.map((k,W)=>W!==Q?k:{...F});if(!U)return;A(t,{arr:U})},x=Q=>{const F=[...n?.arr??[]];F.splice(Q,1),A(t,{arr:F})},y=Q=>{u(Q),c(!0)},B=(Q,F)=>{const U={arr:[...n?.arr?.map((z,k)=>{if(k!==F)return z;const W=z.links?.filter((Z,
|
|
6462
|
+
`,Vae=({token:e,uniqid:t,content:n,inplace:r=!1,onChangeContent:A,onChangeWrapper:i,handleChange:o})=>{const a=H.useIntl(),[l,c]=h.useState(!1),[d,u]=h.useState(null),[f,g]=h.useState(0),p=h.useRef([]),v=h.useCallback(()=>{g(n?.arr?.length??0)},[n]),w=h.useCallback(()=>{if(!Array.isArray(n.arr))return;const Q=[...n.arr,{title:"",value:!1}];o({arr:Q}),v(),p.current.push(h.createRef())},[v,o,n.arr]),b=h.useCallback(Q=>{i({uniqid:t,title:Q})},[i,t]),C=(Q,F)=>{const U=n?.arr?.map((k,W)=>W!==Q?k:{...F});if(!U)return;A(t,{arr:U})},x=Q=>{const F=[...n?.arr??[]];F.splice(Q,1),A(t,{arr:F})},y=Q=>{u(Q),c(!0)},B=(Q,F)=>{const U={arr:[...n?.arr?.map((z,k)=>{if(k!==F)return z;const W=z.links?.filter((Z,Y)=>Y!==Q);return{...z,links:W}})??[]]};A(t,U)},E=()=>{c(!1),u(null)},D=Q=>{if(!Array.isArray(n.arr))return;const F=n.arr.map((U,z)=>{if(z===Q){const k={...U};return delete k.id,delete k.file,k}else return U});o({arr:F})},I=Q=>{A(t,Q)},T=(Q,F)=>{if(!Array.isArray(n.arr))return;const U=n.arr.map((z,k)=>k===Q?{...z,id:F.id,file:F}:z);o({arr:U})};return h.useEffect(()=>{n.arr?.length===0&&(w(),b(""),v())},[w,n.arr,b,v]),h.useEffect(()=>{p.current[f]?.current&&p.current[f].current?.focus()},[f]),s.jsxs(kO,{children:[s.jsxs(Gae,{children:[n.arr&&s.jsx(cB,{border:n.arr.length>0,children:s.jsx(Xae,{children:s.jsx(Ui,{onDrag:(Q,F)=>{if(n.arr===void 0)return;const z={arr:Xi(n.arr,Q,F)};I(z)},elms:n?.arr?n?.arr:[],renderEl:(Q,F)=>s.jsx(zae,{token:e,index:F,item:Q,setItems:C,removeItem:x,handleAddUri:y,handleRemoveUri:B,handleAddImageWidget:T,handleRemoveImage:D,handleNewItem:w,length:n?.arr?.length??0,inputRef:p.current[F]},F)})})}),s.jsx(cB,{children:s.jsx(Wae,{children:s.jsxs(NO,{onClick:w,children:[s.jsx(Le,{icon:"icon-plus",title:a.formatMessage({id:"BUTTON_Title_Add_New_Task"})}),s.jsx(ee,{size:"l",children:a.formatMessage({id:"COMMENT_WIDGET_CHECKLIST_Add_New_Task"})})]})})}),!r&&s.jsxs(s.Fragment,{children:[s.jsx("h3",{children:a.formatMessage({id:"WIDGET_Collaboration"})}),s.jsx(Lae,{initialValue:n.edit??!1,onChange:Q=>o({...n,edit:Q}),options:[{label:a.formatMessage({id:"WIDGET_Check_List_Help"}),value:1}]})]})]}),l&&s.jsx(Pae,{content:n,idx:d??-1,handleChangeContent:Q=>{Q.arr&&A(t,{arr:Q.arr}),E()},closeHandler:E})]})},Kae=m.div`
|
|
6463
6463
|
width: 100%;
|
|
6464
6464
|
height: 100%;
|
|
6465
6465
|
display: flex;
|