iking-web-ui-pro 0.2.44 → 0.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IkApprovalProcess/ik.index.es.js +3 -3
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/style.css +1 -1
- package/dist/IkTinymce/ik.index.es.js +2 -2
- package/dist/IkTinymce/ik.index.umd.js +1 -1
- package/dist/IkTinymce/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +203 -203
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +50 -50
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
v-if="item[propsField.children]?.length && item.show"\r
|
|
32
32
|
@click="changeShow(item, index)"\r
|
|
33
33
|
class="ikapprove icon-a-putongjiantoushouqi"\r
|
|
34
|
-
></i> `),(ce=W[c.propsField.children])!=null&&ce.length&&W.show?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,class:"ikapprove",onClick:q=>V(W,K),name:"iksvg_shouqi"},null,8,["onClick"])):f.createCommentVNode("v-if",!0)],14,Die)]),f.createElementVNode("ul",{class:f.normalizeClass(E(K))},[f.createElementVNode("div",{id:`children${K}`},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[c.propsField.children],(q,X)=>(f.openBlock(),f.createElementBlock("li",{class:f.normalizeClass(T(K,X)),style:f.normalizeStyle(c.needClick?"cursor: pointer;":""),key:X,onClick:Ce=>N(q,K+1+"-"+(X+1))},f.toDisplayString(q.name),15,Oie))),128))],8,Rie)],2)])}),128))]))}}),Vwe="",Iie=Gs(Zs(Nie,[["__scopeId","data-v-240cff4f"]])),s$=c=>c%1===0?c.toString():c.toFixed(2),Bie=(c,r=2)=>{if(c===void 0)return"";if(c===0)return"0 B";const a=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(c)/Math.log(1024));let i=c/Math.pow(1024,l);return(i%1===0?i.toFixed(r||0):i.toFixed(r))+" "+a[l]},Yv=(c,r)=>r?r.startsWith("http")?r:`${c||location.origin}${r}`:"",zwe="",HQ=c=>({nodeType:{发起人节点:"INITIATOR",审批节点:"APPROVE",抄送节点:"CARBON_COPY",办理节点:"DISPOSE",分支节点:"BRANCH",条件节点:"CONDITION",结束节点:"END",并行分支:"PARALLEL",子流程:"SUB_PROCESS",...c.defaultNodeType},defaultFile:{id:"id",parallelInstances:"parallelInstances",backToInstanceNodeName:"backToInstanceNodeName",backToRecordNodeName:"backToRecordNodeName",nodeId:"sortOrder",nodeType:"type",nodeTypeName:"name",approveStatus:"status",approveStatusName:"statusName",approveType:"approveType",multiExecutorType:"multiExecutorType",approveTypeName:"approveTypeName",multiExecutorTypeName:"multiExecutorTypeName",approvalCategory:"approvalCategory",isShowAdd:"initiatorSpecify",isShowAddCopy:"initiatorSpecifyCarbonCopy",executorEmpty:"executorEmpty",executorEmptyStrategy:"executorEmptyStrategy",reserveExecutorUsers:"reserveExecutorUsers",approvePersonList:"executorUsers",initiatorSpecifiedScope:"initiatorSpecifiedScope",initiatorSpecifiedScopeType:"initiatorSpecifiedScopeType",singleApproval:"singleApproval",originator:"username",...c.defaultFieldMap},statusWithoutApprover:{自动通过:"AUTO_PASS",自动拒绝:"AUTO_REJECT",自动转交管理员:"TRANSMIT_TO_MANAGER",指定人员审批:"SPECIFIED_USER",...c.statusWithoutApprover},multiple:!1,chooseType:[],statusOption:{发起:"INITIATE",等待:"WAIT",同意:"PASS",撤销:"REVOKE",拒绝:"REJECT",转交:"TRANSFER",加签:"APPEND",退回:"BACK",评论:"COMMENT",待执行:"WAITING",执行中:"RUNNING",...c.defaultStatus},listData:[]}),zQ=(c,r,a)=>{let l="";switch(r){case c.nodeType.审批节点:a&&a.length==1?l="ikapprove-ziyuan":l="ikapprove-shenpi";break;case c.nodeType.办理节点:l="ikapprove-bianji";break;case c.nodeType.抄送节点:l="ikapprove-chaosong";break;case c.nodeType.并行分支:l="ikapprove-fenzhi";break;case c.nodeType.子流程:l="ikapprove-ziliucheng1";break;default:l="ikapprove-ziyuan"}return`ikapprove ${l}`},UQ=["csv","djvu","doc","docm","docx","docxf","dot","dotm","dotx","epub","fb2","fodp","fods","fodt","htm","html","mht","odp","ods","odt","oform","otp","ots","ott","oxps","pdf","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx","rtf","txt","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xml","xps","png","jpeg","jpg","webp","video","mp4","flv","tls"],Xv=c=>{const r=f.inject("loadUrl"),a=f.computed(()=>c.loadUrl||c.fileUrl||(r==null?void 0:r.value)),l=f.inject("uploadUrl"),i=f.computed(()=>c.action||c.uploadUrl||(l==null?void 0:l.value)),m=f.inject("token"),v=f.computed(()=>c.token||(m==null?void 0:m.value)),C=f.inject("onlyofficeConfig"),E=f.computed(()=>c.onlyofficeConfig||(C==null?void 0:C.value)),T=f.inject("userInfo"),N=f.computed(()=>c.userInfo||(T==null?void 0:T.value)),V=[...UQ,...UQ.map(U=>U.toLocaleUpperCase())];return{cLoadUrl:a,cUploadUrl:i,cToken:v,cOnlyofficeConfig:E,cUserInfo:N,cOnlyofficePreviewType:V}},r$=c=>(f.pushScopeId("data-v-48f27627"),c=c(),f.popScopeId(),c),Mie={class:"approveProcess",id:"approveProcess"},Pie=["id"],Lie={class:"topBlock"},Fie={class:"left"},$ie={class:"nodeBg"},Vie=["src"],Hie={class:"right"},zie={class:"topInfo"},Uie={key:0},Wie={key:0,class:"main-text"},jie={class:"name"},Gie={key:0},Zie={key:0},qie={key:1},Kie=r$(()=>f.createElementVNode("span",{class:"red",style:{margin:"0px 5px"}}," 退回至",-1)),Yie={key:0},Xie={key:0},Qie={key:1},Jie={key:1},eae=r$(()=>f.createElementVNode("div",{class:"main-text"},"抄送人员",-1)),tae={class:"name"},nae={key:0},oae={style:{color:"#000"}},sae={class:"blue",style:{"margin-left":"5px","font-size":"12px"}},rae={key:1},iae={key:0,class:"blue",style:{"font-size":"12px"}},aae={key:1},lae={key:0,class:"blue",style:{"font-size":"12px"}},cae={key:1,class:"blue",style:{"font-size":"12px"}},uae={class:"time"},dae={key:0},fae={key:1},mae=["onClick"],hae=["onClick"],gae={key:0,class:"opinion"},pae={key:0},vae={key:1},yae=r$(()=>f.createElementVNode("span",{class:"ik-text-primary"},"添加审批人",-1)),bae={style:{color:"var(--el-text-color-primary)","margin-left":"8px"}},Cae={key:2,class:"annexImage"},_ae={key:3,class:"approveList"},wae={class:"nodeBg-list"},Sae=["src"],Eae={key:1},kae={key:2,class:"ikapprove ikapprove-duihao2 green read"},xae=["title"],Aae={key:0,class:"branch"},Tae={class:"branch-card"},Dae={class:"branch-name"},Rae={name:"IkingApprovalProcessDetail"},Oae=f.defineComponent({...Rae,props:{local:{type:Boolean,default:!1},defaultStatus:{type:Object,default:()=>({})},defaultNodeType:{type:Object,default:()=>({})},dataList:{type:Array,default:()=>[]},defaultFieldMap:{type:Object,default:()=>({})},returnNode:{type:Array,default:()=>[]},fileUrl:{type:String,default:""},kkUrl:{type:String,default:""},isOnlyOfficePreview:{type:Boolean,default:!1},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""}},emits:["preview"],setup(c,{emit:r}){const a=c,{cLoadUrl:l}=Xv(a),i=f.reactive(HQ(a));f.watch(()=>a.dataList,N=>{N&&(f.nextTick(()=>{i.listData=N}),setTimeout(()=>{a.returnNode.length&&m()},500))},{deep:!0}),f.onMounted(()=>{a.dataList.length&&(i.listData=a.dataList,setTimeout(()=>{a.returnNode.length&&m()},500))});const m=()=>{let N=null;if(a!=null&&a.returnNode)for(N of a==null?void 0:a.returnNode){if(isNaN(N[1]))return;let V=Array.from(new Array(N[1]+1).keys()).slice(N[0]);f.nextTick(()=>{v(V)})}},v=N=>{var ce,q,X;let V=document.createElement("div"),U=document.getElementById("approveProcess"),z=0,W=(ce=document.getElementById(`${N[0]}`))==null?void 0:ce.offsetWidth,K=(q=document.getElementById(`${N[0]}`))==null?void 0:q.offsetLeft,Z=(X=document.getElementById(`${N[0]}`))==null?void 0:X.offsetTop;N.forEach(Ce=>{let st=document.getElementById(`${Ce}`);z+=st.offsetHeight}),setTimeout(()=>{V.style.width=W+32+"px",V.style.height=z+"px",V.style.background="#f9f9f9",V.style.position="absolute",V.style.top=Z-16+"px",V.style.left=K-16+"px",V.style.zIndex=-1,U==null||U.appendChild(V)})},C=(N,V,U)=>{var K,Z;let z=(K=i.listData)==null?void 0:K.findIndex(ce=>ce.lineType=="dashed"),W="";if(U&&((Z=U[i.defaultFile.approvePersonList])==null?void 0:Z.findIndex(q=>q[i.defaultFile.approveStatus]===i.statusOption.执行中))>-1)return"ikapprove ikapprove-dengdai orange";switch(N){case i.statusOption.发起:W="ikapprove-duihao2 green";break;case i.statusOption.执行中:W=z==V?"ikapprove-dengdai orange":"";break;case i.statusOption.同意:W="ikapprove-duihao2 green";break;case i.statusOption.拒绝:W="ikapprove-jujue red";break;case i.statusOption.转交:W="ikapprove-zhuanjiao blue";break;case i.statusOption.加签:W="ikapprove-tianjia blue";break;case i.statusOption.退回:W="ikapprove-s_fanhui2 red";break;case i.statusOption.评论:W="ikapprove-pinglun1 blue";break}return`ikapprove ${W}`},E=(N,V)=>{N.show=!N.show;let U=document.getElementById(`${N[i.defaultFile.nodeId]}`),z=Array.from(U==null?void 0:U.getElementsByClassName("approveList"));for(let W of z)W.style.display=V},T=N=>Yv(l.value,N);return(N,V)=>{const U=f.resolveComponent("el-image"),z=f.resolveComponent("IkingApprovalProcessDetail");return f.openBlock(),f.createElementBlock("div",Mie,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.listData,(W,K)=>{var Z,ce,q,X,Ce,st,Ne,ee,xe,et;return f.openBlock(),f.createElementBlock("div",{class:"approveBlock",id:W[i.defaultFile.nodeId],key:W[i.defaultFile.nodeId]},[f.createElementVNode("div",Lie,[f.createElementVNode("div",Fie,[f.createElementVNode("span",$ie,[f.createCommentVNode(' 用户列表长度等于1, :src="formatUrl(it)"并且存在头像 '),((Z=W[i.defaultFile.approvePersonList])==null?void 0:Z.length)==1&&W[i.defaultFile.approvePersonList][0].userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,style:{width:"100%",height:"100%","border-radius":"10px"},src:T(W[i.defaultFile.approvePersonList][0].userAvatar),alt:""},null,8,Vie)):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 否则显示对应节点 "),f.createElementVNode("i",{class:f.normalizeClass(f.unref(zQ)(i,W[i.defaultFile.nodeType],W[i.defaultFile.approvePersonList]))},null,2)],2112)),f.createCommentVNode(" 审批状态图标 "),f.createElementVNode("i",{class:f.normalizeClass(C(W[i.defaultFile.approveStatus],K,W))},null,2)])]),f.createElementVNode("div",Hie,[f.createElementVNode("div",zie,[f.createElementVNode("div",null,[f.createCommentVNode(" 不是抄送节点 "),i.nodeType.抄送节点!==W[i.defaultFile.nodeType]?(f.openBlock(),f.createElementBlock("div",Uie,[f.createCommentVNode(" 撤销,评论不显示节点名称 "),W[i.defaultFile.approveStatus]!=i.statusOption.撤销&&W[i.defaultFile.approveStatus]!=i.statusOption.评论&&W[i.defaultFile.nodeType]!==i.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Wie,f.toDisplayString(W[i.defaultFile.nodeTypeName]),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 名字+审批状态 "),f.createElementVNode("div",jie,[f.createCommentVNode(" 已审批节点文本 "),W[i.defaultFile.lineType]=="solid"?(f.openBlock(),f.createElementBlock("div",Gie,[f.createElementVNode("span",{style:f.normalizeStyle({color:W[i.defaultFile.approveStatus]==i.statusOption.评论?"#000":""})},f.toDisplayString(W[i.defaultFile.originator]),5),f.createCommentVNode(" 发起,退回不显示状态 "),W[i.defaultFile.approveStatusName]&&W[i.defaultFile.approveStatus]!=i.statusOption.发起&&W[i.defaultFile.approveStatus]!=i.statusOption.退回?(f.openBlock(),f.createElementBlock("span",Zie,f.toDisplayString(W[i.defaultFile.approveStatus]==i.statusOption.评论?" 添加了评论":W!=null&&W.nodeActionAliasName?`(已${W.nodeActionAliasName})`:`(${W[i.defaultFile.approveStatusName]})`),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 退回状态显示 "),W[i.defaultFile.approveStatus]==i.statusOption.退回?(f.openBlock(),f.createElementBlock("span",qie,[Kie,f.createTextVNode(" "+f.toDisplayString(W[i.defaultFile.backToInstanceNodeName]||W[i.defaultFile.backToRecordNodeName]),1)])):f.createCommentVNode("v-if",!0)])):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 待审批节点 "),f.createElementVNode("div",null,[((ce=W[i.defaultFile.approvePersonList])==null?void 0:ce.length)==1?(f.openBlock(),f.createElementBlock("span",Yie,[f.createTextVNode(f.toDisplayString(W[i.defaultFile.originator])+" ",1),W[i.defaultFile.approveStatus]==i.statusOption.等待?(f.openBlock(),f.createElementBlock("span",Xie,f.toDisplayString(W!=null&&W.nodeActionAliasName?`(已${W.nodeActionAliasName})`:`(${W[i.defaultFile.approveStatusName]})`),1)):f.createCommentVNode("v-if",!0)])):W[i.defaultFile.approvePersonList]?(f.openBlock(),f.createElementBlock("span",Qie,f.toDisplayString(`${(q=W[i.defaultFile.approvePersonList])==null?void 0:q.length}人${W[i.defaultFile.approveTypeName]}`),1)):f.createCommentVNode("v-if",!0)])],2112))])])):(f.openBlock(),f.createElementBlock("div",Jie,[eae,f.createElementVNode("div",tae,[f.createCommentVNode(" 抄送一人时 "),((X=W[i.defaultFile.approvePersonList])==null?void 0:X.length)==1?(f.openBlock(),f.createElementBlock("span",nae,[f.createElementVNode("span",null,[f.createTextVNode("已抄送给 "),f.createElementVNode("span",oae,f.toDisplayString(W[i.defaultFile.approvePersonList][0].userName),1)]),f.createElementVNode("span",sae,f.toDisplayString(W[i.defaultFile.approvePersonList][0].status==="END"?"已读":"未读"),1)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 抄送多人时 "),((Ce=W[i.defaultFile.approvePersonList])==null?void 0:Ce.length)>1?(f.openBlock(),f.createElementBlock("span",rae,[f.createTextVNode(f.toDisplayString(`已抄送${(st=W[i.defaultFile.approvePersonList])==null?void 0:st.length}人`)+" ",1),W[i.defaultFile.allRead]?(f.openBlock(),f.createElementBlock("span",iae," 全部已读 ")):(f.openBlock(),f.createElementBlock("span",aae,[W[i.defaultFile.read]?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",lae," 全部未读 ")),W[i.defaultFile.read]?(f.openBlock(),f.createElementBlock("span",cae,f.toDisplayString(W[i.defaultFile.read])+"人已读 ",1)):f.createCommentVNode("v-if",!0)]))])):f.createCommentVNode("v-if",!0)])]))]),f.createElementVNode("div",uae,[f.createCommentVNode(" 不是抄送节点,展示时间 "),W[i.defaultFile.nodeType]!=i.nodeType.抄送节点&&W[i.defaultFile.approveStatus]!==i.statusOption.等待?(f.openBlock(),f.createElementBlock("span",dae,f.toDisplayString(f.unref(wo.ikDate).toDateTime(W[i.defaultFile.operationTime],"MM/DD HH:mm")),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 是抄送节点,并且抄送人员大于1时,展示图标 "),W[i.defaultFile.nodeType]==i.nodeType.抄送节点&&((Ne=W[i.defaultFile.approvePersonList])==null?void 0:Ne.length)>1?(f.openBlock(),f.createElementBlock("span",fae,[W!=null&&W.show?(f.openBlock(),f.createElementBlock("i",{key:0,class:"ikapprove ikapprove-a-putongjiantouzhankai",onClick:tt=>E(W,"grid")},null,8,mae)):(f.openBlock(),f.createElementBlock("i",{key:1,onClick:tt=>E(W,"none"),class:"ikapprove ikapprove-a-putongjiantoushouqi"},null,8,hae))])):f.createCommentVNode("v-if",!0)])])])]),f.createElementVNode("div",{class:"bottomBlock",style:f.normalizeStyle({borderLeft:K==i.listData.length-1?"":`2px ${W[i.defaultFile.lineType]||"dashed"} var(--el-border-color)`})},[f.createCommentVNode(" 审批意见 "),W[i.defaultFile.approveOpinion]||W[i.defaultFile.approveStatus]==i.statusOption.加签?(f.openBlock(),f.createElementBlock("div",gae,[W[i.defaultFile.approveOpinion]?(f.openBlock(),f.createElementBlock("span",pae,f.toDisplayString(W[i.defaultFile.approveOpinion]),1)):f.createCommentVNode("v-if",!0),W[i.defaultFile.approveStatus]==i.statusOption.加签?(f.openBlock(),f.createElementBlock("span",vae,[yae,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.countersignPer],(tt,je)=>(f.openBlock(),f.createElementBlock("span",bae,f.toDisplayString(tt==null?void 0:tt.userName)+f.toDisplayString(je<W[i.defaultFile.countersignPer].length-1?"、":""),1))),256))])):f.createCommentVNode("v-if",!0)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 附件 "),(ee=W[i.defaultFile.attachment])!=null&&ee.length?(f.openBlock(),f.createBlock(f.unref(TO),{key:1,list:W[i.defaultFile.attachment]},null,8,["list"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 附件图片 "),(xe=W[i.defaultFile.attachmentImg])!=null&&xe.length?(f.openBlock(),f.createElementBlock("div",Cae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.attachmentImg],(tt,je)=>(f.openBlock(),f.createElementBlock("div",{class:"image",key:je},[f.createVNode(U,{src:T(tt),"preview-src-list":W[i.defaultFile.attachmentImg].map(be=>T(be)),fit:"cover","z-index":"9999","zoom-rate":1.2,alt:T(tt)},null,8,["src","preview-src-list","alt"])]))),128))])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 抄送节点或是等待审批状态并且列表长度大于1 "),(W[i.defaultFile.nodeType]==i.nodeType.抄送节点||W[i.defaultFile.approveStatus]==i.statusOption.等待)&&((et=W[i.defaultFile.approvePersonList])==null?void 0:et.length)>1?(f.openBlock(),f.createElementBlock("div",_ae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.approvePersonList],tt=>(f.openBlock(),f.createElementBlock("div",{class:"perBlock",key:tt.userName},[f.createElementVNode("span",wae,[tt.userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,style:{width:"100%",height:"100%","border-radius":"50%"},src:T(tt.userAvatar),alt:""},null,8,Sae)):(f.openBlock(),f.createElementBlock("span",Eae,f.toDisplayString(tt.userName.slice(-2)),1)),tt.status==="END"?(f.openBlock(),f.createElementBlock("i",kae)):f.createCommentVNode("v-if",!0)]),f.createElementVNode("div",{class:"main-text",title:tt.userName},f.toDisplayString(tt.userName),9,xae)]))),128))])):f.createCommentVNode("v-if",!0)],4),W[i.defaultFile.nodeType]===i.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Aae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.parallelInstances],tt=>(f.openBlock(),f.createElementBlock("div",Tae,[f.createElementVNode("div",Dae,f.toDisplayString(tt.name),1),f.createVNode(z,f.mergeProps({ref_for:!0},a,{"data-list":(tt==null?void 0:tt.processInstanceNodes)||[]}),null,16,["data-list"])]))),256))])):f.createCommentVNode("v-if",!0)],8,Pie)}),128))])}}}),Uwe="",Nae=Gs(Zs(Oae,[["__scopeId","data-v-48f27627"]])),WQ=c=>(f.pushScopeId("data-v-319618dc"),c=c(),f.popScopeId(),c),Iae={class:"approveProcess",id:"approveProcess"},Bae={class:"node"},Mae={class:"nodeBg"},Pae={key:0,class:"info"},Lae={class:"explain"},Fae={key:0},$ae={key:0},Vae={key:1},Hae={key:0},zae={key:1},Uae={class:"personlist"},Wae={style:{width:"58px"}},jae={class:"avatar"},Gae=["src"],Zae={key:1,class:"nodeBg"},qae=["onClick"],Kae=["title"],Yae={key:0,class:"sign"},Xae={key:0},Qae=["onClick"],Jae={key:0,class:"required"},ele=WQ(()=>f.createElementVNode("i",{class:"ikapprove ikapprove-xinzeng"},null,-1)),tle={key:1,class:"node-branchs"},nle=WQ(()=>f.createElementVNode("div",{class:"branch-line"},null,-1)),ole={style:{flex:"1"}},sle={class:"node-branch"},rle={name:"IkApprovalProcess"},ile=f.defineComponent({...rle,props:{pickerUrl:{type:String,default:""},pickerConfig:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},dataList:{type:Array,default:()=>[]},defaultNodeType:{type:Object,default:()=>({})},defaultFieldMap:{type:Object,default:()=>({})},statusWithoutApprover:{type:Object,default:()=>({})}},setup(c,{expose:r}){const a=c,{cLoadUrl:l}=Xv(a),i=wo.ikStore.local.getItem("token")||"Bearer 841b7a7b0d9c4021b1655192c28ac61b",m=f.ref("sys");function v(K){const Z=window.location.search;return new URLSearchParams(Z).get(K)}function C(){var Z;const K=v("xTenant")||((Z=wo.ikStore.local.getItem("tenant"))==null?void 0:Z.code);K&&(m.value=K)}C();const E=f.reactive(HQ(a)),T=async K=>{var Z;if(K.multiple=!K[E.defaultFile.singleApproval]||K[E.defaultFile.isShowAddCopy],K.handList=K[E.defaultFile.approvePersonList]?K[E.defaultFile.approvePersonList]:[],K[E.defaultFile.nodeType]===E.nodeType.抄送节点)K.handList.forEach(ce=>{ce.elementName||(ce.elementName=ce.userName,ce.elementId=ce.userId,ce.avatar=ce.userAvatar),ce.elementType="USER",ce.disabled=!0}),K.chooseType=["user"],K.userList=[],K.depList=[];else switch(K[E.defaultFile.initiatorSpecifiedScopeType]){case"ALL":K.chooseType=["dep_user"],K.userList=[],K.depList=[];break;default:K.chooseType=["user"],K.userList=K.userList?K.userList:(Z=K[E.defaultFile.initiatorSpecifiedScope])==null?void 0:Z.map(ce=>({...ce,elementName:(ce==null?void 0:ce.executorName)||(ce==null?void 0:ce.userName),elementId:(ce==null?void 0:ce.executorId)||(ce==null?void 0:ce.userId),avatar:((ce==null?void 0:ce.executorAvatar)||(ce==null?void 0:ce.userAvatar))&&N((ce==null?void 0:ce.executorAvatar)||(ce==null?void 0:ce.userAvatar))||"",elementType:"USER"}))}f.nextTick(()=>{K.isShow=!0})},N=K=>{let Z="";return K.includes("http")||K.includes("https")?Z=K:Z=l.value?`${K.includes(l.value)?"":l.value}${K}`:`${location.origin+location.pathname}server/oss/download?fileUrl=${K}`,Z},V=(K,Z)=>{a.dataList[Z].handList=K.list;let q=(a.dataList[Z][E.defaultFile.approvePersonList]||[]).filter(Ce=>!Ce.canDele),X=K.list.map(Ce=>({...Ce,userName:Ce.elementName,userAvatar:Ce.avatar,canDele:!0}));a.dataList[Z][E.defaultFile.approvePersonList]=q.concat(X)},U=(K,Z)=>{a.dataList[K][E.defaultFile.approvePersonList].splice(Z,1),a.dataList[K].handList=a.dataList[K][E.defaultFile.approvePersonList]},z=()=>{let K=!0;return a.dataList.forEach(Z=>{var ce;Z.required=!1,Z[E.defaultFile.nodeType]==E.nodeType.审批节点&&Z[E.defaultFile.isShowAdd]&&((ce=Z[E.defaultFile.approvePersonList])!=null&&ce.length||(K=!1,Z.required=!0))}),K},W=f.computed(()=>{var K;return{propOption:{name:"elementName",id:"elementId",type:"elementType",avatar:"avatar"},typeOption:{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},api:{methods:"post",url:a.pickerUrl,headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:i,"X-Tenant":m.value},param:{rootDepartmentId:((K=wo.ikStore.local.getItem("now_shop"))==null?void 0:K.storeId)||"",rootDepartmentOnly:!1}},...a.pickerConfig}});return r({requiredVerification:z}),(K,Z)=>{const ce=f.resolveComponent("IkApprovalProcess");return f.openBlock(),f.createElementBlock("div",Iae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.dataList,(q,X)=>{var Ce,st,Ne,ee;return f.openBlock(),f.createElementBlock("div",{class:"content",key:q.id},[f.createCommentVNode(" 审批节点类型 "),f.createElementVNode("div",Bae,[f.createElementVNode("span",Mae,[f.createElementVNode("i",{class:f.normalizeClass(f.unref(zQ)(E,q[E.defaultFile.nodeType]))},null,2)]),f.createElementVNode("div",{class:"line",style:f.normalizeStyle({"border-left":X===a.dataList.length-1?"":"2px solid var(--el-border-color)"})},null,4)]),q[E.defaultFile.nodeType]!==E.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Pae,[f.createElementVNode("div",null,[f.createElementVNode("div",null,f.toDisplayString(q[E.defaultFile.nodeTypeName]),1),f.createElementVNode("div",Lae,[f.createCommentVNode(" 抄送节点 "),q[E.defaultFile.nodeType]==E.nodeType.抄送节点?(f.openBlock(),f.createElementBlock("span",Fae,[q[E.defaultFile.approvePersonList].length?(f.openBlock(),f.createElementBlock("span",$ae,f.toDisplayString(`抄送${q[E.defaultFile.approvePersonList].length}人`),1)):f.createCommentVNode("v-if",!0),q[E.defaultFile.isShowAdd]?(f.openBlock(),f.createElementBlock("span",Vae,",可添加抄送人")):f.createCommentVNode("v-if",!0)])):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 审批节点 "),f.createElementVNode("span",null,[f.createCommentVNode(" 存在审批人时 "),(Ce=q[E.defaultFile.approvePersonList])!=null&&Ce.length?(f.openBlock(),f.createElementBlock("span",Hae,f.toDisplayString(((st=q[E.defaultFile.approvePersonList])==null?void 0:st.length)==1?"1人审批":`${(Ne=q[E.defaultFile.approvePersonList])==null?void 0:Ne.length}人${q[E.defaultFile.multiExecutorTypeName]}`),1)):[E.statusWithoutApprover.自动通过,E.statusWithoutApprover.自动拒绝].includes(q[E.defaultFile.approveType])?(f.openBlock(),f.createElementBlock("span",zae,f.toDisplayString(q[E.defaultFile.approveTypeName]),1)):q[E.defaultFile.executorEmptyStrategy]&&q[E.defaultFile.executorEmpty]?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createCommentVNode(" 没有审批人,并且有指定默认审批方式 "),f.createElementVNode("span",null,[f.createTextVNode(" 未找到审批人,"),f.createElementVNode("span",null,f.toDisplayString(q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.自动通过?"将自动通过":q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.自动转交管理员?"自动转交给管理员":q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.指定人员审批?`将自动转给指定成员${q[E.defaultFile.reserveExecutorUsers]&&q[E.defaultFile.reserveExecutorUsers][0].userName}`:""),1)])],2112)):[E.nodeType.并行分支,E.nodeType.子流程].includes(q[E.defaultFile.nodeType])?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",{key:3,class:f.normalizeClass(q.required?"warn":"")}," 请选择"+f.toDisplayString(q[E.defaultFile.nodeType]===E.nodeType.办理节点?"办理人":"审批人"),3))])],2112))])]),f.createElementVNode("div",Uae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(q[E.defaultFile.approvePersonList],(xe,et)=>{var tt;return f.openBlock(),f.createElementBlock("div",{class:"list",key:xe.userId},[f.createElementVNode("div",Wae,[f.createElementVNode("div",jae,[xe.userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,src:N(xe.userAvatar),alt:""},null,8,Gae)):(f.openBlock(),f.createElementBlock("div",Zae,[f.createElementVNode("span",null,f.toDisplayString(xe.userName.slice(-2)),1)])),xe.canDele?(f.openBlock(),f.createElementBlock("i",{key:2,onClick:je=>U(X,et),class:"ikapprove ikapprove-shanchu1"},null,8,qae)):f.createCommentVNode("v-if",!0)]),f.createElementVNode("div",{class:"name",title:xe.userName},f.toDisplayString(xe.userName),9,Kae)]),f.createCommentVNode(" 显示添加人按钮,不是单选且已选中一个人的情况,显示图标 "),q[E.defaultFile.isShowAdd]&&!(q[E.defaultFile.singleApproval]&&((tt=q[E.defaultFile.approvePersonList])==null?void 0:tt.length)==1)?(f.openBlock(),f.createElementBlock("span",Yae,[f.createCommentVNode(" 抄送默认 "),q[E.defaultFile.nodeType]==E.nodeType.抄送节点?(f.openBlock(),f.createElementBlock("span",Xae,"+")):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 审批 "),f.createElementVNode("span",null,f.toDisplayString(q[E.defaultFile.multiExecutorType]=="ANY"?"/":q[E.defaultFile.multiExecutorType]=="ALL"?"+":">"),1)],2112))])):f.createCommentVNode("v-if",!0)])}),128)),f.createCommentVNode(" 显示添加人按钮,不是单选且已选中一个人的情况,显示按钮 (item[state.defaultFile.isShowAdd] && "),q[E.defaultFile.isShowAdd]&&!(q[E.defaultFile.singleApproval]&&((ee=q[E.defaultFile.approvePersonList])==null?void 0:ee.length)==1)||q[E.defaultFile.isShowAddCopy]?(f.openBlock(),f.createElementBlock("span",{key:0,class:"addBg",onClick:xe=>T(q)},[q[E.defaultFile.nodeType]==E.nodeType.审批节点?(f.openBlock(),f.createElementBlock("span",Jae)):f.createCommentVNode("v-if",!0),ele],8,Qae)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 添加人组件 "),f.createVNode(f.unref(yA),f.mergeProps({modelValue:q.handList,"onUpdate:modelValue":xe=>q.handList=xe,show:q.isShow,"onUpdate:show":xe=>q.isShow=xe,onOk:xe=>V(xe,X),multiple:q.multiple,"dep-list":q.depList,"user-list":q.userList,"organization-list":q.organizationList,ref_for:!0},W.value,{chooseType:q.chooseType}),null,16,["modelValue","onUpdate:modelValue","show","onUpdate:show","onOk","multiple","dep-list","user-list","organization-list","chooseType"])])])):(f.openBlock(),f.createElementBlock("div",tle,[nle,f.createElementVNode("div",ole,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(q.parallelInstances,(xe,et)=>(f.openBlock(),f.createElementBlock("div",{key:et,class:f.normalizeClass(`branch branch-${et}`)},[f.createElementVNode("div",sle,f.toDisplayString(xe.name),1),f.createVNode(ce,f.mergeProps({ref_for:!0},a,{dataList:xe.processInstanceNodes,style:{"margin-left":"20px"}}),null,16,["dataList"])],2))),128))])]))])}),128))])}}}),jwe="",ale=Gs(Zs(ile,[["__scopeId","data-v-319618dc"]]));var jQ={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText(c){return"另外 "+c+" 个"},noEventsText:"没有事件显示"},jR,Es,GQ,ZQ,PS,V2,qQ,KQ,YQ,GR={},XQ=[],lle=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Qv(c,r){for(var a in r)c[a]=r[a];return c}function QQ(c){var r=c.parentNode;r&&r.removeChild(c)}function rt(c,r,a){var l,i,m,v={};for(m in r)m=="key"?l=r[m]:m=="ref"?i=r[m]:v[m]=r[m];if(arguments.length>2&&(v.children=arguments.length>3?jR.call(arguments,2):a),typeof c=="function"&&c.defaultProps!=null)for(m in c.defaultProps)v[m]===void 0&&(v[m]=c.defaultProps[m]);return ZR(c,v,l,i,null)}function ZR(c,r,a,l,i){var m={type:c,props:r,key:a,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++GQ};return i==null&&Es.vnode!=null&&Es.vnode(m),m}function Bd(){return{current:null}}function Ya(c){return c.children}function cle(c,r,a,l,i){var m;for(m in a)m==="children"||m==="key"||m in r||qR(c,m,null,a[m],l);for(m in r)i&&typeof r[m]!="function"||m==="children"||m==="key"||m==="value"||m==="checked"||a[m]===r[m]||qR(c,m,r[m],a[m],l)}function JQ(c,r,a){r[0]==="-"?c.setProperty(r,a??""):c[r]=a==null?"":typeof a!="number"||lle.test(r)?a:a+"px"}function qR(c,r,a,l,i){var m;e:if(r==="style")if(typeof a=="string")c.style.cssText=a;else{if(typeof l=="string"&&(c.style.cssText=l=""),l)for(r in l)a&&r in a||JQ(c.style,r,"");if(a)for(r in a)l&&a[r]===l[r]||JQ(c.style,r,a[r])}else if(r[0]==="o"&&r[1]==="n")m=r!==(r=r.replace(/Capture$/,"")),r=r.toLowerCase()in c?r.toLowerCase().slice(2):r.slice(2),c.l||(c.l={}),c.l[r+m]=a,a?l||c.addEventListener(r,m?tJ:eJ,m):c.removeEventListener(r,m?tJ:eJ,m);else if(r!=="dangerouslySetInnerHTML"){if(i)r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!=="width"&&r!=="height"&&r!=="href"&&r!=="list"&&r!=="form"&&r!=="tabIndex"&&r!=="download"&&r in c)try{c[r]=a??"";break e}catch{}typeof a=="function"||(a==null||a===!1&&r.indexOf("-")==-1?c.removeAttribute(r):c.setAttribute(r,a))}}function eJ(c){PS=!0;try{return this.l[c.type+!1](Es.event?Es.event(c):c)}finally{PS=!1}}function tJ(c){PS=!0;try{return this.l[c.type+!0](Es.event?Es.event(c):c)}finally{PS=!1}}function sm(c,r){this.props=c,this.context=r}function sA(c,r){if(r==null)return c.__?sA(c.__,c.__.__k.indexOf(c)+1):null;for(var a;r<c.__k.length;r++)if((a=c.__k[r])!=null&&a.__e!=null)return a.__e;return typeof c.type=="function"?sA(c):null}function nJ(c){var r,a;if((c=c.__)!=null&&c.__c!=null){for(c.__e=c.__c.base=null,r=0;r<c.__k.length;r++)if((a=c.__k[r])!=null&&a.__e!=null){c.__e=c.__c.base=a.__e;break}return nJ(c)}}function ule(c){PS?setTimeout(c):KQ(c)}function i$(c){(!c.__d&&(c.__d=!0)&&V2.push(c)&&!KR.__r++||qQ!==Es.debounceRendering)&&((qQ=Es.debounceRendering)||ule)(KR)}function KR(){var c,r,a,l,i,m,v,C;for(V2.sort(function(E,T){return E.__v.__b-T.__v.__b});c=V2.shift();)c.__d&&(r=V2.length,l=void 0,i=void 0,v=(m=(a=c).__v).__e,(C=a.__P)&&(l=[],(i=Qv({},m)).__v=m.__v+1,a$(C,m,i,a.__n,C.ownerSVGElement!==void 0,m.__h!=null?[v]:null,l,v??sA(m),m.__h),aJ(l,m),m.__e!=v&&nJ(m)),V2.length>r&&V2.sort(function(E,T){return E.__v.__b-T.__v.__b}));KR.__r=0}function oJ(c,r,a,l,i,m,v,C,E,T){var N,V,U,z,W,K,Z,ce=l&&l.__k||XQ,q=ce.length;for(a.__k=[],N=0;N<r.length;N++)if((z=a.__k[N]=(z=r[N])==null||typeof z=="boolean"?null:typeof z=="string"||typeof z=="number"||typeof z=="bigint"?ZR(null,z,null,null,z):Array.isArray(z)?ZR(Ya,{children:z},null,null,null):z.__b>0?ZR(z.type,z.props,z.key,z.ref?z.ref:null,z.__v):z)!=null){if(z.__=a,z.__b=a.__b+1,(U=ce[N])===null||U&&z.key==U.key&&z.type===U.type)ce[N]=void 0;else for(V=0;V<q;V++){if((U=ce[V])&&z.key==U.key&&z.type===U.type){ce[V]=void 0;break}U=null}a$(c,z,U=U||GR,i,m,v,C,E,T),W=z.__e,(V=z.ref)&&U.ref!=V&&(Z||(Z=[]),U.ref&&Z.push(U.ref,null,z),Z.push(V,z.__c||W,z)),W!=null?(K==null&&(K=W),typeof z.type=="function"&&z.__k===U.__k?z.__d=E=sJ(z,E,c):E=rJ(c,z,U,ce,W,E),typeof a.type=="function"&&(a.__d=E)):E&&U.__e==E&&E.parentNode!=c&&(E=sA(U))}for(a.__e=K,N=q;N--;)ce[N]!=null&&(typeof a.type=="function"&&ce[N].__e!=null&&ce[N].__e==a.__d&&(a.__d=iJ(l).nextSibling),cJ(ce[N],ce[N]));if(Z)for(N=0;N<Z.length;N++)lJ(Z[N],Z[++N],Z[++N])}function sJ(c,r,a){for(var l,i=c.__k,m=0;i&&m<i.length;m++)(l=i[m])&&(l.__=c,r=typeof l.type=="function"?sJ(l,r,a):rJ(a,l,l,i,l.__e,r));return r}function YR(c,r){return r=r||[],c==null||typeof c=="boolean"||(Array.isArray(c)?c.some(function(a){YR(a,r)}):r.push(c)),r}function rJ(c,r,a,l,i,m){var v,C,E;if(r.__d!==void 0)v=r.__d,r.__d=void 0;else if(a==null||i!=m||i.parentNode==null)e:if(m==null||m.parentNode!==c)c.appendChild(i),v=null;else{for(C=m,E=0;(C=C.nextSibling)&&E<l.length;E+=1)if(C==i)break e;c.insertBefore(i,m),v=m}return v!==void 0?v:i.nextSibling}function iJ(c){var r,a,l;if(c.type==null||typeof c.type=="string")return c.__e;if(c.__k){for(r=c.__k.length-1;r>=0;r--)if((a=c.__k[r])&&(l=iJ(a)))return l}return null}function a$(c,r,a,l,i,m,v,C,E){var T,N,V,U,z,W,K,Z,ce,q,X,Ce,st,Ne,ee,xe=r.type;if(r.constructor!==void 0)return null;a.__h!=null&&(E=a.__h,C=r.__e=a.__e,r.__h=null,m=[C]),(T=Es.__b)&&T(r);try{e:if(typeof xe=="function"){if(Z=r.props,ce=(T=xe.contextType)&&l[T.__c],q=T?ce?ce.props.value:T.__:l,a.__c?K=(N=r.__c=a.__c).__=N.__E:("prototype"in xe&&xe.prototype.render?r.__c=N=new xe(Z,q):(r.__c=N=new sm(Z,q),N.constructor=xe,N.render=fle),ce&&ce.sub(N),N.props=Z,N.state||(N.state={}),N.context=q,N.__n=l,V=N.__d=!0,N.__h=[],N._sb=[]),N.__s==null&&(N.__s=N.state),xe.getDerivedStateFromProps!=null&&(N.__s==N.state&&(N.__s=Qv({},N.__s)),Qv(N.__s,xe.getDerivedStateFromProps(Z,N.__s))),U=N.props,z=N.state,N.__v=r,V)xe.getDerivedStateFromProps==null&&N.componentWillMount!=null&&N.componentWillMount(),N.componentDidMount!=null&&N.__h.push(N.componentDidMount);else{if(xe.getDerivedStateFromProps==null&&Z!==U&&N.componentWillReceiveProps!=null&&N.componentWillReceiveProps(Z,q),!N.__e&&N.shouldComponentUpdate!=null&&N.shouldComponentUpdate(Z,N.__s,q)===!1||r.__v===a.__v){for(r.__v!==a.__v&&(N.props=Z,N.state=N.__s,N.__d=!1),r.__e=a.__e,r.__k=a.__k,r.__k.forEach(function(et){et&&(et.__=r)}),X=0;X<N._sb.length;X++)N.__h.push(N._sb[X]);N._sb=[],N.__h.length&&v.push(N);break e}N.componentWillUpdate!=null&&N.componentWillUpdate(Z,N.__s,q),N.componentDidUpdate!=null&&N.__h.push(function(){N.componentDidUpdate(U,z,W)})}if(N.context=q,N.props=Z,N.__P=c,Ce=Es.__r,st=0,"prototype"in xe&&xe.prototype.render){for(N.state=N.__s,N.__d=!1,Ce&&Ce(r),T=N.render(N.props,N.state,N.context),Ne=0;Ne<N._sb.length;Ne++)N.__h.push(N._sb[Ne]);N._sb=[]}else do N.__d=!1,Ce&&Ce(r),T=N.render(N.props,N.state,N.context),N.state=N.__s;while(N.__d&&++st<25);N.state=N.__s,N.getChildContext!=null&&(l=Qv(Qv({},l),N.getChildContext())),V||N.getSnapshotBeforeUpdate==null||(W=N.getSnapshotBeforeUpdate(U,z)),ee=T!=null&&T.type===Ya&&T.key==null?T.props.children:T,oJ(c,Array.isArray(ee)?ee:[ee],r,a,l,i,m,v,C,E),N.base=r.__e,r.__h=null,N.__h.length&&v.push(N),K&&(N.__E=N.__=null),N.__e=!1}else m==null&&r.__v===a.__v?(r.__k=a.__k,r.__e=a.__e):r.__e=dle(a.__e,r,a,l,i,m,v,E);(T=Es.diffed)&&T(r)}catch(et){r.__v=null,(E||m!=null)&&(r.__e=C,r.__h=!!E,m[m.indexOf(C)]=null),Es.__e(et,r,a)}}function aJ(c,r){Es.__c&&Es.__c(r,c),c.some(function(a){try{c=a.__h,a.__h=[],c.some(function(l){l.call(a)})}catch(l){Es.__e(l,a.__v)}})}function dle(c,r,a,l,i,m,v,C){var E,T,N,V=a.props,U=r.props,z=r.type,W=0;if(z==="svg"&&(i=!0),m!=null){for(;W<m.length;W++)if((E=m[W])&&"setAttribute"in E==!!z&&(z?E.localName===z:E.nodeType===3)){c=E,m[W]=null;break}}if(c==null){if(z===null)return document.createTextNode(U);c=i?document.createElementNS("http://www.w3.org/2000/svg",z):document.createElement(z,U.is&&U),m=null,C=!1}if(z===null)V===U||C&&c.data===U||(c.data=U);else{if(m=m&&jR.call(c.childNodes),T=(V=a.props||GR).dangerouslySetInnerHTML,N=U.dangerouslySetInnerHTML,!C){if(m!=null)for(V={},W=0;W<c.attributes.length;W++)V[c.attributes[W].name]=c.attributes[W].value;(N||T)&&(N&&(T&&N.__html==T.__html||N.__html===c.innerHTML)||(c.innerHTML=N&&N.__html||""))}if(cle(c,U,V,i,C),N)r.__k=[];else if(W=r.props.children,oJ(c,Array.isArray(W)?W:[W],r,a,l,i&&z!=="foreignObject",m,v,m?m[0]:a.__k&&sA(a,0),C),m!=null)for(W=m.length;W--;)m[W]!=null&&QQ(m[W]);C||("value"in U&&(W=U.value)!==void 0&&(W!==c.value||z==="progress"&&!W||z==="option"&&W!==V.value)&&qR(c,"value",W,V.value,!1),"checked"in U&&(W=U.checked)!==void 0&&W!==c.checked&&qR(c,"checked",W,V.checked,!1))}return c}function lJ(c,r,a){try{typeof c=="function"?c(r):c.current=r}catch(l){Es.__e(l,a)}}function cJ(c,r,a){var l,i;if(Es.unmount&&Es.unmount(c),(l=c.ref)&&(l.current&&l.current!==c.__e||lJ(l,null,r)),(l=c.__c)!=null){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(m){Es.__e(m,r)}l.base=l.__P=null,c.__c=void 0}if(l=c.__k)for(i=0;i<l.length;i++)l[i]&&cJ(l[i],r,a||typeof c.type!="function");a||c.__e==null||QQ(c.__e),c.__=c.__e=c.__d=void 0}function fle(c,r,a){return this.constructor(c,a)}function rA(c,r,a){var l,i,m;Es.__&&Es.__(c,r),i=(l=typeof a=="function")?null:a&&a.__k||r.__k,m=[],a$(r,c=(!l&&a||r).__k=rt(Ya,null,[c]),i||GR,GR,r.ownerSVGElement!==void 0,!l&&a?[a]:i?null:r.firstChild?jR.call(r.childNodes):null,m,!l&&a?a:i?i.__e:r.firstChild,l),aJ(m,c)}function mle(c,r){var a={__c:r="__cC"+YQ++,__:c,Consumer:function(l,i){return l.children(i)},Provider:function(l){var i,m;return this.getChildContext||(i=[],(m={})[r]=this,this.getChildContext=function(){return m},this.shouldComponentUpdate=function(v){this.props.value!==v.value&&i.some(function(C){C.__e=!0,i$(C)})},this.sub=function(v){i.push(v);var C=v.componentWillUnmount;v.componentWillUnmount=function(){i.splice(i.indexOf(v),1),C&&C.call(v)}}),l.children}};return a.Provider.__=a.Consumer.contextType=a}jR=XQ.slice,Es={__e:function(c,r,a,l){for(var i,m,v;r=r.__;)if((i=r.__c)&&!i.__)try{if((m=i.constructor)&&m.getDerivedStateFromError!=null&&(i.setState(m.getDerivedStateFromError(c)),v=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(c,l||{}),v=i.__d),v)return i.__E=i}catch(C){c=C}throw c}},GQ=0,ZQ=function(c){return c!=null&&c.constructor===void 0},PS=!1,sm.prototype.setState=function(c,r){var a;a=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qv({},this.state),typeof c=="function"&&(c=c(Qv({},a),this.props)),c&&Qv(a,c),c!=null&&this.__v&&(r&&this._sb.push(r),i$(this))},sm.prototype.forceUpdate=function(c){this.__v&&(this.__e=!0,c&&this.__h.push(c),i$(this))},sm.prototype.render=Ya,V2=[],KQ=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,KR.__r=0,YQ=0;var Cp,l$,uJ,dJ=[],c$=[],fJ=Es.__b,mJ=Es.__r,hJ=Es.diffed,gJ=Es.__c,pJ=Es.unmount;function hle(){for(var c;c=dJ.shift();)if(c.__P&&c.__H)try{c.__H.__h.forEach(XR),c.__H.__h.forEach(u$),c.__H.__h=[]}catch(r){c.__H.__h=[],Es.__e(r,c.__v)}}Es.__b=function(c){Cp=null,fJ&&fJ(c)},Es.__r=function(c){mJ&&mJ(c);var r=(Cp=c.__c).__H;r&&(l$===Cp?(r.__h=[],Cp.__h=[],r.__.forEach(function(a){a.__N&&(a.__=a.__N),a.__V=c$,a.__N=a.i=void 0})):(r.__h.forEach(XR),r.__h.forEach(u$),r.__h=[])),l$=Cp},Es.diffed=function(c){hJ&&hJ(c);var r=c.__c;r&&r.__H&&(r.__H.__h.length&&(dJ.push(r)!==1&&uJ===Es.requestAnimationFrame||((uJ=Es.requestAnimationFrame)||gle)(hle)),r.__H.__.forEach(function(a){a.i&&(a.__H=a.i),a.__V!==c$&&(a.__=a.__V),a.i=void 0,a.__V=c$})),l$=Cp=null},Es.__c=function(c,r){r.some(function(a){try{a.__h.forEach(XR),a.__h=a.__h.filter(function(l){return!l.__||u$(l)})}catch(l){r.some(function(i){i.__h&&(i.__h=[])}),r=[],Es.__e(l,a.__v)}}),gJ&&gJ(c,r)},Es.unmount=function(c){pJ&&pJ(c);var r,a=c.__c;a&&a.__H&&(a.__H.__.forEach(function(l){try{XR(l)}catch(i){r=i}}),a.__H=void 0,r&&Es.__e(r,a.__v))};var vJ=typeof requestAnimationFrame=="function";function gle(c){var r,a=function(){clearTimeout(l),vJ&&cancelAnimationFrame(r),setTimeout(c)},l=setTimeout(a,100);vJ&&(r=requestAnimationFrame(a))}function XR(c){var r=Cp,a=c.__c;typeof a=="function"&&(c.__c=void 0,a()),Cp=r}function u$(c){var r=Cp;c.__c=c.__(),Cp=r}function ple(c,r){for(var a in r)c[a]=r[a];return c}function yJ(c,r){for(var a in c)if(a!=="__source"&&!(a in r))return!0;for(var l in r)if(l!=="__source"&&c[l]!==r[l])return!0;return!1}function bJ(c){this.props=c}(bJ.prototype=new sm).isPureReactComponent=!0,bJ.prototype.shouldComponentUpdate=function(c,r){return yJ(this.props,c)||yJ(this.state,r)};var CJ=Es.__b;Es.__b=function(c){c.type&&c.type.__f&&c.ref&&(c.props.ref=c.ref,c.ref=null),CJ&&CJ(c)};var vle=Es.__e;Es.__e=function(c,r,a,l){if(c.then){for(var i,m=r;m=m.__;)if((i=m.__c)&&i.__c)return r.__e==null&&(r.__e=a.__e,r.__k=a.__k),i.__c(c,r)}vle(c,r,a,l)};var _J=Es.unmount;function wJ(c,r,a){return c&&(c.__c&&c.__c.__H&&(c.__c.__H.__.forEach(function(l){typeof l.__c=="function"&&l.__c()}),c.__c.__H=null),(c=ple({},c)).__c!=null&&(c.__c.__P===a&&(c.__c.__P=r),c.__c=null),c.__k=c.__k&&c.__k.map(function(l){return wJ(l,r,a)})),c}function SJ(c,r,a){return c&&(c.__v=null,c.__k=c.__k&&c.__k.map(function(l){return SJ(l,r,a)}),c.__c&&c.__c.__P===r&&(c.__e&&a.insertBefore(c.__e,c.__d),c.__c.__e=!0,c.__c.__P=a)),c}function d$(){this.__u=0,this.t=null,this.__b=null}function EJ(c){var r=c.__.__c;return r&&r.__a&&r.__a(c)}function QR(){this.u=null,this.o=null}Es.unmount=function(c){var r=c.__c;r&&r.__R&&r.__R(),r&&c.__h===!0&&(c.type=null),_J&&_J(c)},(d$.prototype=new sm).__c=function(c,r){var a=r.__c,l=this;l.t==null&&(l.t=[]),l.t.push(a);var i=EJ(l.__v),m=!1,v=function(){m||(m=!0,a.__R=null,i?i(C):C())};a.__R=v;var C=function(){if(!--l.__u){if(l.state.__a){var T=l.state.__a;l.__v.__k[0]=SJ(T,T.__c.__P,T.__c.__O)}var N;for(l.setState({__a:l.__b=null});N=l.t.pop();)N.forceUpdate()}},E=r.__h===!0;l.__u++||E||l.setState({__a:l.__b=l.__v.__k[0]}),c.then(v,v)},d$.prototype.componentWillUnmount=function(){this.t=[]},d$.prototype.render=function(c,r){if(this.__b){if(this.__v.__k){var a=document.createElement("div"),l=this.__v.__k[0].__c;this.__v.__k[0]=wJ(this.__b,a,l.__O=l.__P)}this.__b=null}var i=r.__a&&rt(Ya,null,c.fallback);return i&&(i.__h=null),[rt(Ya,null,r.__a?null:c.children),i]};var kJ=function(c,r,a){if(++a[1]===a[0]&&c.o.delete(r),c.props.revealOrder&&(c.props.revealOrder[0]!=="t"||!c.o.size))for(a=c.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;c.u=a=a[2]}};function yle(c){return this.getChildContext=function(){return c.context},c.children}function ble(c){var r=this,a=c.i;r.componentWillUnmount=function(){rA(null,r.l),r.l=null,r.i=null},r.i&&r.i!==a&&r.componentWillUnmount(),c.__v?(r.l||(r.i=a,r.l={nodeType:1,parentNode:a,childNodes:[],appendChild:function(l){this.childNodes.push(l),r.i.appendChild(l)},insertBefore:function(l,i){this.childNodes.push(l),r.i.appendChild(l)},removeChild:function(l){this.childNodes.splice(this.childNodes.indexOf(l)>>>1,1),r.i.removeChild(l)}}),rA(rt(yle,{context:r.context},c.__v),r.l)):r.l&&r.componentWillUnmount()}function Cle(c,r){var a=rt(ble,{__v:c,i:r});return a.containerInfo=r,a}(QR.prototype=new sm).__a=function(c){var r=this,a=EJ(r.__v),l=r.o.get(c);return l[0]++,function(i){var m=function(){r.props.revealOrder?(l.push(i),kJ(r,c,l)):i()};a?a(m):m()}},QR.prototype.render=function(c){this.u=null,this.o=new Map;var r=YR(c.children);c.revealOrder&&c.revealOrder[0]==="b"&&r.reverse();for(var a=r.length;a--;)this.o.set(r[a],this.u=[1,0,this.u]);return c.children},QR.prototype.componentDidUpdate=QR.prototype.componentDidMount=function(){var c=this;this.o.forEach(function(r,a){kJ(c,a,r)})};var _le=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,wle=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Sle=typeof document<"u",Ele=function(c){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(c)};sm.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(c){Object.defineProperty(sm.prototype,c,{configurable:!0,get:function(){return this["UNSAFE_"+c]},set:function(r){Object.defineProperty(this,c,{configurable:!0,writable:!0,value:r})}})});var xJ=Es.event;function kle(){}function xle(){return this.cancelBubble}function Ale(){return this.defaultPrevented}Es.event=function(c){return xJ&&(c=xJ(c)),c.persist=kle,c.isPropagationStopped=xle,c.isDefaultPrevented=Ale,c.nativeEvent=c};var AJ={configurable:!0,get:function(){return this.class}},TJ=Es.vnode;Es.vnode=function(c){var r=c.type,a=c.props,l=a;if(typeof r=="string"){var i=r.indexOf("-")===-1;for(var m in l={},a){var v=a[m];Sle&&m==="children"&&r==="noscript"||m==="value"&&"defaultValue"in a&&v==null||(m==="defaultValue"&&"value"in a&&a.value==null?m="value":m==="download"&&v===!0?v="":/ondoubleclick/i.test(m)?m="ondblclick":/^onchange(textarea|input)/i.test(m+r)&&!Ele(a.type)?m="oninput":/^onfocus$/i.test(m)?m="onfocusin":/^onblur$/i.test(m)?m="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(m)?m=m.toLowerCase():i&&wle.test(m)?m=m.replace(/[A-Z0-9]/g,"-$&").toLowerCase():v===null&&(v=void 0),/^oninput$/i.test(m)&&(m=m.toLowerCase(),l[m]&&(m="oninputCapture")),l[m]=v)}r=="select"&&l.multiple&&Array.isArray(l.value)&&(l.value=YR(a.children).forEach(function(C){C.props.selected=l.value.indexOf(C.props.value)!=-1})),r=="select"&&l.defaultValue!=null&&(l.value=YR(a.children).forEach(function(C){C.props.selected=l.multiple?l.defaultValue.indexOf(C.props.value)!=-1:l.defaultValue==C.props.value})),c.props=l,a.class!=a.className&&(AJ.enumerable="className"in a,a.className!=null&&(l.class=a.className),Object.defineProperty(l,"className",AJ))}c.$$typeof=_le,TJ&&TJ(c)};var DJ=Es.__r;Es.__r=function(c){DJ&&DJ(c),c.__c};const RJ=[],f$=new Map;function m$(c){RJ.push(c),f$.forEach(r=>{NJ(r,c)})}function Tle(c){c.isConnected&&c.getRootNode&&OJ(c.getRootNode())}function OJ(c){let r=f$.get(c);if(!r||!r.isConnected){if(r=c.querySelector("style[data-fullcalendar]"),!r){r=document.createElement("style"),r.setAttribute("data-fullcalendar","");const a=Rle();a&&(r.nonce=a);const l=c===document?document.head:c,i=c===document?l.querySelector("script,link[rel=stylesheet],link[as=style],style"):l.firstChild;l.insertBefore(r,i)}f$.set(c,r),Dle(r)}}function Dle(c){for(const r of RJ)NJ(c,r)}function NJ(c,r){const{sheet:a}=c,l=a.cssRules.length;r.split("}").forEach((i,m)=>{i=i.trim(),i&&a.insertRule(i+"}",l+m)})}let h$;function Rle(){return h$===void 0&&(h$=Ole()),h$}function Ole(){const c=document.querySelector('meta[name="csp-nonce"]');if(c&&c.hasAttribute("content"))return c.getAttribute("content");const r=document.querySelector("script[nonce]");return r&&r.nonce||""}typeof document<"u"&&OJ(document);var Nle=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';m$(Nle);class g${constructor(r){this.drainedOption=r,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(r){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),r==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),r))}pause(r=""){let{pauseDepths:a}=this;a[r]=(a[r]||0)+1,this.clearTimeout()}resume(r="",a){let{pauseDepths:l}=this;r in l&&(a?delete l[r]:(l[r]-=1,l[r]<=0&&delete l[r]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function p$(c){c.parentNode&&c.parentNode.removeChild(c)}function td(c,r){if(c.closest)return c.closest(r);if(!document.documentElement.contains(c))return null;do{if(Ile(c,r))return c;c=c.parentElement||c.parentNode}while(c!==null&&c.nodeType===1);return null}function Ile(c,r){return(c.matches||c.matchesSelector||c.msMatchesSelector).call(c,r)}function Ble(c,r){let a=c instanceof HTMLElement?[c]:c,l=[];for(let i=0;i<a.length;i+=1){let m=a[i].querySelectorAll(r);for(let v=0;v<m.length;v+=1)l.push(m[v])}return l}const Mle=/(top|left|right|bottom|width|height)$/i;function iA(c,r){for(let a in r)IJ(c,a,r[a])}function IJ(c,r,a){a==null?c.style[r]="":typeof a=="number"&&Mle.test(r)?c.style[r]=`${a}px`:c.style[r]=a}function BJ(c){var r,a;return(a=(r=c.composedPath)===null||r===void 0?void 0:r.call(c)[0])!==null&&a!==void 0?a:c.target}let MJ=0;function JR(){return MJ+=1,"fc-dom-"+MJ}function eO(c){c.preventDefault()}function Ple(c,r){return a=>{let l=td(a.target,c);l&&r.call(l,a,l)}}function PJ(c,r,a,l){let i=Ple(a,l);return c.addEventListener(r,i),()=>{c.removeEventListener(r,i)}}function Lle(c,r,a,l){let i;return PJ(c,"mouseover",r,(m,v)=>{if(v!==i){i=v,a(m,v);let C=E=>{i=null,l(E,v),v.removeEventListener("mouseleave",C)};v.addEventListener("mouseleave",C)}})}const LJ=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Fle(c,r){let a=l=>{r(l),LJ.forEach(i=>{c.removeEventListener(i,a)})};LJ.forEach(l=>{c.addEventListener(l,a)})}function FJ(c){return Object.assign({onClick:c},$J(c))}function $J(c){return{tabIndex:0,onKeyDown(r){(r.key==="Enter"||r.key===" ")&&(c(r),r.preventDefault())}}}let VJ=0;function H2(){return VJ+=1,String(VJ)}function v$(){document.body.classList.add("fc-not-allowed")}function y$(){document.body.classList.remove("fc-not-allowed")}function $le(c){c.style.userSelect="none",c.style.webkitUserSelect="none",c.addEventListener("selectstart",eO)}function Vle(c){c.style.userSelect="",c.style.webkitUserSelect="",c.removeEventListener("selectstart",eO)}function Hle(c){c.addEventListener("contextmenu",eO)}function zle(c){c.removeEventListener("contextmenu",eO)}function Ule(c){let r=[],a=[],l,i;for(typeof c=="string"?a=c.split(/\s*,\s*/):typeof c=="function"?a=[c]:Array.isArray(c)&&(a=c),l=0;l<a.length;l+=1)i=a[l],typeof i=="string"?r.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&r.push({func:i});return r}function Wle(c,r,a){let l,i;for(l=0;l<a.length;l+=1)if(i=jle(c,r,a[l]),i)return i;return 0}function jle(c,r,a){return a.func?a.func(c,r):Gle(c[a.field],r[a.field])*(a.order||1)}function Gle(c,r){return!c&&!r?0:r==null?-1:c==null?1:typeof c=="string"||typeof r=="string"?String(c).localeCompare(String(r)):c-r}function LS(c,r){let a=String(c);return"000".substr(0,r-a.length)+a}function aA(c,r,a){return typeof c=="function"?c(...r):typeof c=="string"?r.reduce((l,i,m)=>l.replace("$"+m,i||""),c):a}function Zle(c,r){return c-r}function tO(c){return c%1===0}function qle(c){let r=c.querySelector(".fc-scrollgrid-shrink-frame"),a=c.querySelector(".fc-scrollgrid-shrink-cushion");if(!r)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!a)throw new Error("needs fc-scrollgrid-shrink-cushion className");return c.getBoundingClientRect().width-r.getBoundingClientRect().width+a.getBoundingClientRect().width}const HJ=["years","months","days","milliseconds"],Kle=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ni(c,r){return typeof c=="string"?Yle(c):typeof c=="object"&&c?zJ(c):typeof c=="number"?zJ({[r||"milliseconds"]:c}):null}function Yle(c){let r=Kle.exec(c);if(r){let a=r[1]?-1:1;return{years:0,months:0,days:a*(r[2]?parseInt(r[2],10):0),milliseconds:a*((r[3]?parseInt(r[3],10):0)*60*60*1e3+(r[4]?parseInt(r[4],10):0)*60*1e3+(r[5]?parseInt(r[5],10):0)*1e3+(r[6]?parseInt(r[6],10):0))}}return null}function zJ(c){let r={years:c.years||c.year||0,months:c.months||c.month||0,days:c.days||c.day||0,milliseconds:(c.hours||c.hour||0)*60*60*1e3+(c.minutes||c.minute||0)*60*1e3+(c.seconds||c.second||0)*1e3+(c.milliseconds||c.millisecond||c.ms||0)},a=c.weeks||c.week;return a&&(r.days+=a*7,r.specifiedWeeks=!0),r}function Xle(c,r){return c.years===r.years&&c.months===r.months&&c.days===r.days&&c.milliseconds===r.milliseconds}function b$(c,r){return{years:c.years+r.years,months:c.months+r.months,days:c.days+r.days,milliseconds:c.milliseconds+r.milliseconds}}function Qle(c,r){return{years:c.years-r.years,months:c.months-r.months,days:c.days-r.days,milliseconds:c.milliseconds-r.milliseconds}}function Jle(c,r){return{years:c.years*r,months:c.months*r,days:c.days*r,milliseconds:c.milliseconds*r}}function ece(c){return FS(c)/365}function tce(c){return FS(c)/30}function FS(c){return rg(c)/864e5}function rg(c){return c.years*(365*864e5)+c.months*(30*864e5)+c.days*864e5+c.milliseconds}function C$(c,r){let a=null;for(let l=0;l<HJ.length;l+=1){let i=HJ[l];if(r[i]){let m=c[i]/r[i];if(!tO(m)||a!==null&&a!==m)return null;a=m}else if(c[i])return null}return a}function _$(c){let r=c.milliseconds;if(r){if(r%1e3!==0)return{unit:"millisecond",value:r};if(r%(1e3*60)!==0)return{unit:"second",value:r/1e3};if(r%(1e3*60*60)!==0)return{unit:"minute",value:r/(1e3*60)};if(r)return{unit:"hour",value:r/(1e3*60*60)}}return c.days?c.specifiedWeeks&&c.days%7===0?{unit:"week",value:c.days/7}:{unit:"day",value:c.days}:c.months?{unit:"month",value:c.months}:c.years?{unit:"year",value:c.years}:{unit:"millisecond",value:0}}function Jv(c,r,a){if(c===r)return!0;let l=c.length,i;if(l!==r.length)return!1;for(i=0;i<l;i+=1)if(!(a?a(c[i],r[i]):c[i]===r[i]))return!1;return!0}const nce=["sun","mon","tue","wed","thu","fri","sat"];function UJ(c,r){let a=ty(c);return a[2]+=r*7,yf(a)}function nd(c,r){let a=ty(c);return a[2]+=r,yf(a)}function ey(c,r){let a=ty(c);return a[6]+=r,yf(a)}function oce(c,r){return z2(c,r)/7}function z2(c,r){return(r.valueOf()-c.valueOf())/(1e3*60*60*24)}function sce(c,r){return(r.valueOf()-c.valueOf())/(1e3*60*60)}function rce(c,r){return(r.valueOf()-c.valueOf())/(1e3*60)}function ice(c,r){return(r.valueOf()-c.valueOf())/1e3}function ace(c,r){let a=Oa(c),l=Oa(r);return{years:0,months:0,days:Math.round(z2(a,l)),milliseconds:r.valueOf()-l.valueOf()-(c.valueOf()-a.valueOf())}}function lce(c,r){let a=nO(c,r);return a!==null&&a%7===0?a/7:null}function nO(c,r){return ny(c)===ny(r)?Math.round(z2(c,r)):null}function Oa(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()])}function cce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours()])}function uce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes()])}function dce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds()])}function fce(c,r,a){let l=c.getUTCFullYear(),i=w$(c,l,r,a);if(i<1)return w$(c,l-1,r,a);let m=w$(c,l+1,r,a);return m>=1?Math.min(i,m):i}function w$(c,r,a,l){let i=yf([r,0,1+mce(r,a,l)]),m=Oa(c),v=Math.round(z2(i,m));return Math.floor(v/7)+1}function mce(c,r,a){let l=7+r-a;return-((7+yf([c,0,l]).getUTCDay()-r)%7)+l-1}function WJ(c){return[c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds()]}function jJ(c){return new Date(c[0],c[1]||0,c[2]==null?1:c[2],c[3]||0,c[4]||0,c[5]||0)}function ty(c){return[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()]}function yf(c){return c.length===1&&(c=c.concat([0])),new Date(Date.UTC(...c))}function GJ(c){return!isNaN(c.valueOf())}function ny(c){return c.getUTCHours()*1e3*60*60+c.getUTCMinutes()*1e3*60+c.getUTCSeconds()*1e3+c.getUTCMilliseconds()}function ZJ(c,r,a=!1){let l=c.toISOString();return l=l.replace(".000",""),a&&(l=l.replace("T00:00:00Z","")),l.length>10&&(r==null?l=l.replace("Z",""):r!==0&&(l=l.replace("Z",E$(r,!0)))),l}function S$(c){return c.toISOString().replace(/T.*$/,"")}function hce(c){return c.toISOString().match(/^\d{4}-\d{2}/)[0]}function gce(c){return LS(c.getUTCHours(),2)+":"+LS(c.getUTCMinutes(),2)+":"+LS(c.getUTCSeconds(),2)}function E$(c,r=!1){let a=c<0?"-":"+",l=Math.abs(c),i=Math.floor(l/60),m=Math.round(l%60);return r?`${a+LS(i,2)}:${LS(m,2)}`:`GMT${a}${i}${m?`:${LS(m,2)}`:""}`}function Ms(c,r,a){let l,i;return function(...m){if(!l)i=c.apply(this,m);else if(!Jv(l,m)){a&&a(i);let v=c.apply(this,m);(!r||!r(v,i))&&(i=v)}return l=m,i}}function oO(c,r,a){let l,i;return m=>{if(!l)i=c.call(this,m);else if(!_p(l,m)){a&&a(i);let v=c.call(this,m);(!r||!r(v,i))&&(i=v)}return l=m,i}}const qJ={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},sO={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},rO=/\s*([ap])\.?m\.?/i,pce=/,/g,vce=/\s+/g,yce=/\u200e/g,bce=/UTC|GMT/;class Cce{constructor(r){let a={},l={},i=0;for(let m in r)m in qJ?(l[m]=r[m],i=Math.max(qJ[m],i)):(a[m]=r[m],m in sO&&(i=Math.max(sO[m],i)));this.standardDateProps=a,this.extendedSettings=l,this.severity=i,this.buildFormattingFunc=Ms(KJ)}format(r,a){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,a)(r)}formatRange(r,a,l,i){let{standardDateProps:m,extendedSettings:v}=this,C=xce(r.marker,a.marker,l.calendarSystem);if(!C)return this.format(r,l);let E=C;E>1&&(m.year==="numeric"||m.year==="2-digit")&&(m.month==="numeric"||m.month==="2-digit")&&(m.day==="numeric"||m.day==="2-digit")&&(E=1);let T=this.format(r,l),N=this.format(a,l);if(T===N)return T;let V=Ace(m,E),U=KJ(V,v,l),z=U(r),W=U(a),K=Tce(T,z,N,W),Z=v.separator||i||l.defaultSeparator||"";return K?K.before+z+Z+W+K.after:T+Z+N}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function KJ(c,r,a){let l=Object.keys(c).length;return l===1&&c.timeZoneName==="short"?i=>E$(i.timeZoneOffset):l===0&&r.week?i=>kce(a.computeWeekNumber(i.marker),a.weekText,a.weekTextLong,a.locale,r.week):_ce(c,r,a)}function _ce(c,r,a){c=Object.assign({},c),r=Object.assign({},r),wce(c,r),c.timeZone="UTC";let l=new Intl.DateTimeFormat(a.locale.codes,c),i;if(r.omitZeroMinute){let m=Object.assign({},c);delete m.minute,i=new Intl.DateTimeFormat(a.locale.codes,m)}return m=>{let{marker:v}=m,C;i&&!v.getUTCMinutes()?C=i:C=l;let E=C.format(v);return Sce(E,m,c,r,a)}}function wce(c,r){c.timeZoneName&&(c.hour||(c.hour="2-digit"),c.minute||(c.minute="2-digit")),c.timeZoneName==="long"&&(c.timeZoneName="short"),r.omitZeroMinute&&(c.second||c.millisecond)&&delete r.omitZeroMinute}function Sce(c,r,a,l,i){return c=c.replace(yce,""),a.timeZoneName==="short"&&(c=Ece(c,i.timeZone==="UTC"||r.timeZoneOffset==null?"UTC":E$(r.timeZoneOffset))),l.omitCommas&&(c=c.replace(pce,"").trim()),l.omitZeroMinute&&(c=c.replace(":00","")),l.meridiem===!1?c=c.replace(rO,"").trim():l.meridiem==="narrow"?c=c.replace(rO,(m,v)=>v.toLocaleLowerCase()):l.meridiem==="short"?c=c.replace(rO,(m,v)=>`${v.toLocaleLowerCase()}m`):l.meridiem==="lowercase"&&(c=c.replace(rO,m=>m.toLocaleLowerCase())),c=c.replace(vce," "),c=c.trim(),c}function Ece(c,r){let a=!1;return c=c.replace(bce,()=>(a=!0,r)),a||(c+=` ${r}`),c}function kce(c,r,a,l,i){let m=[];return i==="long"?m.push(a):(i==="short"||i==="narrow")&&m.push(r),(i==="long"||i==="short")&&m.push(" "),m.push(l.simpleNumberFormat.format(c)),l.options.direction==="rtl"&&m.reverse(),m.join("")}function xce(c,r,a){return a.getMarkerYear(c)!==a.getMarkerYear(r)?5:a.getMarkerMonth(c)!==a.getMarkerMonth(r)?4:a.getMarkerDay(c)!==a.getMarkerDay(r)?2:ny(c)!==ny(r)?1:0}function Ace(c,r){let a={};for(let l in c)(!(l in sO)||sO[l]<=r)&&(a[l]=c[l]);return a}function Tce(c,r,a,l){let i=0;for(;i<c.length;){let m=c.indexOf(r,i);if(m===-1)break;let v=c.substr(0,m);i=m+r.length;let C=c.substr(i),E=0;for(;E<a.length;){let T=a.indexOf(l,E);if(T===-1)break;let N=a.substr(0,T);E=T+l.length;let V=a.substr(E);if(v===N&&C===V)return{before:v,after:C}}}return null}function YJ(c,r){let a=r.markerToArray(c.marker);return{marker:c.marker,timeZoneOffset:c.timeZoneOffset,array:a,year:a[0],month:a[1],day:a[2],hour:a[3],minute:a[4],second:a[5],millisecond:a[6]}}function iO(c,r,a,l){let i=YJ(c,a.calendarSystem),m=r?YJ(r,a.calendarSystem):null;return{date:i,start:i,end:m,timeZone:a.timeZone,localeCodes:a.locale.codes,defaultSeparator:l||a.defaultSeparator}}class Dce{constructor(r){this.cmdStr=r}format(r,a,l){return a.cmdFormatter(this.cmdStr,iO(r,null,a,l))}formatRange(r,a,l,i){return l.cmdFormatter(this.cmdStr,iO(r,a,l,i))}}class Rce{constructor(r){this.func=r}format(r,a,l){return this.func(iO(r,null,a,l))}formatRange(r,a,l,i){return this.func(iO(r,a,l,i))}}function El(c){return typeof c=="object"&&c?new Cce(c):typeof c=="string"?new Dce(c):typeof c=="function"?new Rce(c):null}const XJ={navLinkDayClick:Zt,navLinkWeekClick:Zt,duration:ni,bootstrapFontAwesome:Zt,buttonIcons:Zt,customButtons:Zt,defaultAllDayEventDuration:ni,defaultTimedEventDuration:ni,nextDayThreshold:ni,scrollTime:ni,scrollTimeReset:Boolean,slotMinTime:ni,slotMaxTime:ni,dayPopoverFormat:El,slotDuration:ni,snapDuration:ni,headerToolbar:Zt,footerToolbar:Zt,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:El,dayHeaderClassNames:Zt,dayHeaderContent:Zt,dayHeaderDidMount:Zt,dayHeaderWillUnmount:Zt,dayCellClassNames:Zt,dayCellContent:Zt,dayCellDidMount:Zt,dayCellWillUnmount:Zt,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Zt,weekNumbers:Boolean,weekNumberClassNames:Zt,weekNumberContent:Zt,weekNumberDidMount:Zt,weekNumberWillUnmount:Zt,editable:Boolean,viewClassNames:Zt,viewDidMount:Zt,viewWillUnmount:Zt,nowIndicator:Boolean,nowIndicatorClassNames:Zt,nowIndicatorContent:Zt,nowIndicatorDidMount:Zt,nowIndicatorWillUnmount:Zt,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Zt,locale:Zt,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Zt,eventOrder:Ule,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Zt,contentHeight:Zt,direction:String,weekNumberFormat:El,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Zt,initialDate:Zt,now:Zt,eventDataTransform:Zt,stickyHeaderDates:Zt,stickyFooterScrollbar:Zt,viewHeight:Zt,defaultAllDay:Boolean,eventSourceFailure:Zt,eventSourceSuccess:Zt,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Zt,eventConstraint:Zt,eventAllow:Zt,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Zt,eventContent:Zt,eventDidMount:Zt,eventWillUnmount:Zt,selectConstraint:Zt,selectOverlap:Zt,selectAllow:Zt,droppable:Boolean,unselectCancel:String,slotLabelFormat:Zt,slotLaneClassNames:Zt,slotLaneContent:Zt,slotLaneDidMount:Zt,slotLaneWillUnmount:Zt,slotLabelClassNames:Zt,slotLabelContent:Zt,slotLabelDidMount:Zt,slotLabelWillUnmount:Zt,dayMaxEvents:Zt,dayMaxEventRows:Zt,dayMinWidth:Number,slotLabelInterval:ni,allDayText:String,allDayClassNames:Zt,allDayContent:Zt,allDayDidMount:Zt,allDayWillUnmount:Zt,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:El,rerenderDelay:Number,moreLinkText:Zt,moreLinkHint:Zt,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Zt,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ni,hiddenDays:Zt,fixedWeekCount:Boolean,validRange:Zt,visibleRange:Zt,titleFormat:Zt,eventInteractive:Boolean,noEventsText:String,viewHint:Zt,navLinkHint:Zt,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Zt,moreLinkClassNames:Zt,moreLinkContent:Zt,moreLinkDidMount:Zt,moreLinkWillUnmount:Zt,monthStartFormat:El,handleCustomRendering:Zt,customRenderingMetaMap:Zt,customRenderingReplaces:Boolean},lA={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},QJ={datesSet:Zt,eventsSet:Zt,eventAdd:Zt,eventChange:Zt,eventRemove:Zt,windowResize:Zt,eventClick:Zt,eventMouseEnter:Zt,eventMouseLeave:Zt,select:Zt,unselect:Zt,loading:Zt,_unmount:Zt,_beforeprint:Zt,_afterprint:Zt,_noEventDrop:Zt,_noEventResize:Zt,_resize:Zt,_scrollRequest:Zt},JJ={buttonText:Zt,buttonHints:Zt,views:Zt,plugins:Zt,initialEvents:Zt,events:Zt,eventSources:Zt},U2={headerToolbar:W2,footerToolbar:W2,buttonText:W2,buttonHints:W2,buttonIcons:W2,dateIncrement:W2,plugins:aO,events:aO,eventSources:aO,resources:aO};function W2(c,r){return typeof c=="object"&&typeof r=="object"&&c&&r?_p(c,r):c===r}function aO(c,r){return Array.isArray(c)&&Array.isArray(r)?Jv(c,r):c===r}const Oce={type:String,component:Zt,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Zt,usesMinMaxTime:Boolean,classNames:Zt,content:Zt,didMount:Zt,willUnmount:Zt};function k$(c){return A$(c,U2)}function x$(c,r){let a={},l={};for(let i in r)i in c&&(a[i]=r[i](c[i]));for(let i in c)i in r||(l[i]=c[i]);return{refined:a,extra:l}}function Zt(c){return c}const{hasOwnProperty:lO}=Object.prototype;function A$(c,r){let a={};if(r){for(let l in r)if(r[l]===W2){let i=[];for(let m=c.length-1;m>=0;m-=1){let v=c[m][l];if(typeof v=="object"&&v)i.unshift(v);else if(v!==void 0){a[l]=v;break}}i.length&&(a[l]=A$(i))}}for(let l=c.length-1;l>=0;l-=1){let i=c[l];for(let m in i)m in a||(a[m]=i[m])}return a}function j2(c,r){let a={};for(let l in c)r(c[l],l)&&(a[l]=c[l]);return a}function Z1(c,r){let a={};for(let l in c)a[l]=r(c[l],l);return a}function eee(c){let r={};for(let a of c)r[a]=!0;return r}function T$(c){let r=[];for(let a in c)r.push(c[a]);return r}function _p(c,r){if(c===r)return!0;for(let a in c)if(lO.call(c,a)&&!(a in r))return!1;for(let a in r)if(lO.call(r,a)&&c[a]!==r[a])return!1;return!0}const Nce=/^on[A-Z]/;function Ice(c,r){const a=D$(c,r);for(let l of a)if(!Nce.test(l))return!1;return!0}function D$(c,r){let a=[];for(let l in c)lO.call(c,l)&&(l in r||a.push(l));for(let l in r)lO.call(r,l)&&c[l]!==r[l]&&a.push(l);return a}function R$(c,r,a={}){if(c===r)return!0;for(let l in r)if(!(l in c&&Bce(c[l],r[l],a[l])))return!1;for(let l in c)if(!(l in r))return!1;return!0}function Bce(c,r,a){return c===r||a===!0?!0:a?a(c,r):!1}function Mce(c,r=0,a,l=1){let i=[];a==null&&(a=Object.keys(c).length);for(let m=r;m<a;m+=l){let v=c[m];v!==void 0&&i.push(v)}return i}let tee={};function Pce(c,r){tee[c]=r}function Lce(c){return new tee[c]}class Fce{getMarkerYear(r){return r.getUTCFullYear()}getMarkerMonth(r){return r.getUTCMonth()}getMarkerDay(r){return r.getUTCDate()}arrayToMarker(r){return yf(r)}markerToArray(r){return ty(r)}}Pce("gregory",Fce);const $ce=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Vce(c){let r=$ce.exec(c);if(r){let a=new Date(Date.UTC(Number(r[1]),r[3]?Number(r[3])-1:0,Number(r[5]||1),Number(r[7]||0),Number(r[8]||0),Number(r[10]||0),r[12]?+`0.${r[12]}`*1e3:0));if(GJ(a)){let l=null;return r[13]&&(l=(r[15]==="-"?-1:1)*(Number(r[16]||0)*60+Number(r[18]||0))),{marker:a,isTimeUnspecified:!r[6],timeZoneOffset:l}}}return null}class Hce{constructor(r){let a=this.timeZone=r.timeZone,l=a!=="local"&&a!=="UTC";r.namedTimeZoneImpl&&l&&(this.namedTimeZoneImpl=new r.namedTimeZoneImpl(a)),this.canComputeOffset=!!(!l||this.namedTimeZoneImpl),this.calendarSystem=Lce(r.calendarSystem),this.locale=r.locale,this.weekDow=r.locale.week.dow,this.weekDoy=r.locale.week.doy,r.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof r.firstDay=="number"&&(this.weekDow=r.firstDay),typeof r.weekNumberCalculation=="function"&&(this.weekNumberFunc=r.weekNumberCalculation),this.weekText=r.weekText!=null?r.weekText:r.locale.options.weekText,this.weekTextLong=(r.weekTextLong!=null?r.weekTextLong:r.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=r.cmdFormatter,this.defaultSeparator=r.defaultSeparator}createMarker(r){let a=this.createMarkerMeta(r);return a===null?null:a.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):yf(WJ(new Date))}createMarkerMeta(r){if(typeof r=="string")return this.parse(r);let a=null;return typeof r=="number"?a=this.timestampToMarker(r):r instanceof Date?(r=r.valueOf(),isNaN(r)||(a=this.timestampToMarker(r))):Array.isArray(r)&&(a=yf(r)),a===null||!GJ(a)?null:{marker:a,isTimeUnspecified:!1,forcedTzo:null}}parse(r){let a=Vce(r);if(a===null)return null;let{marker:l}=a,i=null;return a.timeZoneOffset!==null&&(this.canComputeOffset?l=this.timestampToMarker(l.valueOf()-a.timeZoneOffset*60*1e3):i=a.timeZoneOffset),{marker:l,isTimeUnspecified:a.isTimeUnspecified,forcedTzo:i}}getYear(r){return this.calendarSystem.getMarkerYear(r)}getMonth(r){return this.calendarSystem.getMarkerMonth(r)}getDay(r){return this.calendarSystem.getMarkerDay(r)}add(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]+=a.years,l[1]+=a.months,l[2]+=a.days,l[6]+=a.milliseconds,this.calendarSystem.arrayToMarker(l)}subtract(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]-=a.years,l[1]-=a.months,l[2]-=a.days,l[6]-=a.milliseconds,this.calendarSystem.arrayToMarker(l)}addYears(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]+=a,this.calendarSystem.arrayToMarker(l)}addMonths(r,a){let l=this.calendarSystem.markerToArray(r);return l[1]+=a,this.calendarSystem.arrayToMarker(l)}diffWholeYears(r,a){let{calendarSystem:l}=this;return ny(r)===ny(a)&&l.getMarkerDay(r)===l.getMarkerDay(a)&&l.getMarkerMonth(r)===l.getMarkerMonth(a)?l.getMarkerYear(a)-l.getMarkerYear(r):null}diffWholeMonths(r,a){let{calendarSystem:l}=this;return ny(r)===ny(a)&&l.getMarkerDay(r)===l.getMarkerDay(a)?l.getMarkerMonth(a)-l.getMarkerMonth(r)+(l.getMarkerYear(a)-l.getMarkerYear(r))*12:null}greatestWholeUnit(r,a){let l=this.diffWholeYears(r,a);return l!==null?{unit:"year",value:l}:(l=this.diffWholeMonths(r,a),l!==null?{unit:"month",value:l}:(l=lce(r,a),l!==null?{unit:"week",value:l}:(l=nO(r,a),l!==null?{unit:"day",value:l}:(l=sce(r,a),tO(l)?{unit:"hour",value:l}:(l=rce(r,a),tO(l)?{unit:"minute",value:l}:(l=ice(r,a),tO(l)?{unit:"second",value:l}:{unit:"millisecond",value:a.valueOf()-r.valueOf()}))))))}countDurationsBetween(r,a,l){let i;return l.years&&(i=this.diffWholeYears(r,a),i!==null)?i/ece(l):l.months&&(i=this.diffWholeMonths(r,a),i!==null)?i/tce(l):l.days&&(i=nO(r,a),i!==null)?i/FS(l):(a.valueOf()-r.valueOf())/rg(l)}startOf(r,a){return a==="year"?this.startOfYear(r):a==="month"?this.startOfMonth(r):a==="week"?this.startOfWeek(r):a==="day"?Oa(r):a==="hour"?cce(r):a==="minute"?uce(r):a==="second"?dce(r):null}startOfYear(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r)])}startOfMonth(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r),this.calendarSystem.getMarkerMonth(r)])}startOfWeek(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r),this.calendarSystem.getMarkerMonth(r),r.getUTCDate()-(r.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(r){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(r)):fce(r,this.weekDow,this.weekDoy)}format(r,a,l={}){return a.format({marker:r,timeZoneOffset:l.forcedTzo!=null?l.forcedTzo:this.offsetForMarker(r)},this)}formatRange(r,a,l,i={}){return i.isEndExclusive&&(a=ey(a,-1)),l.formatRange({marker:r,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(r)},{marker:a,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(a)},this,i.defaultSeparator)}formatIso(r,a={}){let l=null;return a.omitTimeZoneOffset||(a.forcedTzo!=null?l=a.forcedTzo:l=this.offsetForMarker(r)),ZJ(r,l,a.omitTime)}timestampToMarker(r){return this.timeZone==="local"?yf(WJ(new Date(r))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(r):yf(this.namedTimeZoneImpl.timestampToArray(r))}offsetForMarker(r){return this.timeZone==="local"?-jJ(ty(r)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ty(r)):null}toDate(r,a){return this.timeZone==="local"?jJ(ty(r)):this.timeZone==="UTC"?new Date(r.valueOf()):this.namedTimeZoneImpl?new Date(r.valueOf()-this.namedTimeZoneImpl.offsetForArray(ty(r))*1e3*60):new Date(r.valueOf()-(a||0))}}class cA{constructor(r){this.iconOverrideOption&&this.setIconOverride(r[this.iconOverrideOption])}setIconOverride(r){let a,l;if(typeof r=="object"&&r){a=Object.assign({},this.iconClasses);for(l in r)a[l]=this.applyIconOverridePrefix(r[l]);this.iconClasses=a}else r===!1&&(this.iconClasses={})}applyIconOverridePrefix(r){let a=this.iconOverridePrefix;return a&&r.indexOf(a)!==0&&(r=a+r),r}getClass(r){return this.classes[r]||""}getIconClass(r,a){let l;return a&&this.rtlIconClasses?l=this.rtlIconClasses[r]||this.iconClasses[r]:l=this.iconClasses[r],l?`${this.baseIconClass} ${l}`:""}getCustomButtonIconClass(r){let a;return this.iconOverrideCustomButtonOption&&(a=r[this.iconOverrideCustomButtonOption],a)?`${this.baseIconClass} ${this.applyIconOverridePrefix(a)}`:""}}cA.prototype.classes={},cA.prototype.iconClasses={},cA.prototype.baseIconClass="",cA.prototype.iconOverridePrefix="";function cO(c){c();let r=Es.debounceRendering,a=[];function l(i){a.push(i)}for(Es.debounceRendering=l,rA(rt(zce,{}),document.createElement("div"));a.length;)a.shift()();Es.debounceRendering=r}class zce extends sm{render(){return rt("div",{})}componentDidMount(){this.setState({})}}function nee(c){let r=mle(c),a=r.Provider;return r.Provider=function(){let l=!this.getChildContext,i=a.apply(this,arguments);if(l){let m=[];this.shouldComponentUpdate=v=>{this.props.value!==v.value&&m.forEach(C=>{C.context=v.value,C.forceUpdate()})},this.sub=v=>{m.push(v);let C=v.componentWillUnmount;v.componentWillUnmount=()=>{m.splice(m.indexOf(v),1),C&&C.call(v)}}}return i},r}class Uce{constructor(r,a,l,i){this.execFunc=r,this.emitter=a,this.scrollTime=l,this.scrollTimeReset=i,this.handleScrollRequest=m=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},m),this.drain()},a.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(r){r&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const q1=nee({});function Wce(c,r,a,l,i,m,v,C,E,T,N,V,U){return{dateEnv:i,options:a,pluginHooks:v,emitter:T,dispatch:C,getCurrentData:E,calendarApi:N,viewSpec:c,viewApi:r,dateProfileGenerator:l,theme:m,isRtl:a.direction==="rtl",addResizeHandler(z){T.on("_resize",z)},removeResizeHandler(z){T.off("_resize",z)},createScrollResponder(z){return new Uce(z,T,ni(a.scrollTime),a.scrollTimeReset)},registerInteractiveComponent:V,unregisterInteractiveComponent:U}}class G2 extends sm{shouldComponentUpdate(r,a){return this.debug&&console.log(D$(r,this.props),D$(a,this.state)),!R$(this.props,r,this.propEquality)||!R$(this.state,a,this.stateEquality)}safeSetState(r){R$(this.state,Object.assign(Object.assign({},this.state),r),this.stateEquality)||this.setState(r)}}G2.addPropsEquality=jce,G2.addStateEquality=Gce,G2.contextType=q1,G2.prototype.propEquality={},G2.prototype.stateEquality={};class Li extends G2{}Li.contextType=q1;function jce(c){let r=Object.create(this.prototype.propEquality);Object.assign(r,c),this.prototype.propEquality=r}function Gce(c){let r=Object.create(this.prototype.stateEquality);Object.assign(r,c),this.prototype.stateEquality=r}function K1(c,r){typeof c=="function"?c(r):c&&(c.current=r)}class O$ extends Li{constructor(){super(...arguments),this.id=H2(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=r=>{const{options:a}=this.context,{generatorName:l}=this.props;(!a.customRenderingReplaces||!N$(l,a))&&this.updateElRef(r)},this.updateElRef=r=>{this.props.elRef&&K1(this.props.elRef,r)}}render(){const{props:r,context:a}=this,{options:l}=a,{customGenerator:i,defaultGenerator:m,renderProps:v}=r,C=oee(r,[],this.handleEl);let E=!1,T,N=[],V;if(i!=null){const U=typeof i=="function"?i(v,rt):i;if(U===!0)E=!0;else{const z=U&&typeof U=="object";z&&"html"in U?C.dangerouslySetInnerHTML={__html:U.html}:z&&"domNodes"in U?N=Array.prototype.slice.call(U.domNodes):(z?ZQ(U):typeof U!="function")?T=U:V=U}}else E=!N$(r.generatorName,l);return E&&m&&(T=m(v)),this.queuedDomNodes=N,this.currentGeneratorMeta=V,rt(r.elTag,C,T)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(r){var a;const{props:l,context:i}=this,{handleCustomRendering:m,customRenderingMetaMap:v}=i.options;if(m){const C=(a=this.currentGeneratorMeta)!==null&&a!==void 0?a:v==null?void 0:v[l.generatorName];C&&m(Object.assign(Object.assign({id:this.id,isActive:r,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:C},l),{elClasses:(l.elClasses||[]).filter(Zce)}))}}applyQueueudDomNodes(){const{queuedDomNodes:r,currentDomNodes:a}=this,l=this.base;if(!Jv(r,a)){a.forEach(p$);for(let i of r)l.appendChild(i);this.currentDomNodes=r}}}O$.addPropsEquality({elClasses:Jv,elStyle:_p,elAttrs:Ice,renderProps:_p});function N$(c,r){var a;return!!(r.handleCustomRendering&&c&&(!((a=r.customRenderingMetaMap)===null||a===void 0)&&a[c]))}function oee(c,r,a){const l=Object.assign(Object.assign({},c.elAttrs),{ref:a});return(c.elClasses||r)&&(l.className=(c.elClasses||[]).concat(r||[]).concat(l.className||[]).filter(Boolean).join(" ")),c.elStyle&&(l.style=c.elStyle),l}function Zce(c){return!!c}const see=nee(0);class rm extends sm{constructor(){super(...arguments),this.InnerContent=qce.bind(void 0,this),this.handleEl=r=>{this.el=r,this.props.elRef&&(K1(this.props.elRef,r),r&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:r}=this,a=Kce(r.classNameGenerator,r.renderProps);if(r.children){const l=oee(r,a,this.handleEl),i=r.children(this.InnerContent,r.renderProps,l);return r.elTag?rt(r.elTag,l,i):i}else return rt(O$,Object.assign(Object.assign({},r),{elRef:this.handleEl,elTag:r.elTag||"div",elClasses:(r.elClasses||[]).concat(a),renderId:this.context}))}componentDidMount(){var r,a;this.el?(a=(r=this.props).didMount)===null||a===void 0||a.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var r,a;(a=(r=this.props).willUnmount)===null||a===void 0||a.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}rm.contextType=see;function qce(c,r){const a=c.props;return rt(O$,Object.assign({renderProps:a.renderProps,generatorName:a.generatorName,customGenerator:a.customGenerator,defaultGenerator:a.defaultGenerator,renderId:c.context},r))}function Kce(c,r){const a=typeof c=="function"?c(r):c||[];return typeof a=="string"?[a]:a}class uO extends Li{render(){let{props:r,context:a}=this,{options:l}=a,i={view:a.viewApi};return rt(rm,Object.assign({},r,{elTag:r.elTag||"div",elClasses:[...ree(r.viewSpec),...r.elClasses||[]],renderProps:i,classNameGenerator:l.viewClassNames,generatorName:void 0,didMount:l.viewDidMount,willUnmount:l.viewWillUnmount}),()=>r.children)}}function ree(c){return[`fc-${c.type}-view`,"fc-view"]}function Yce(c,r){let a=null,l=null;return c.start&&(a=r.createMarker(c.start)),c.end&&(l=r.createMarker(c.end)),!a&&!l||a&&l&&l<a?null:{start:a,end:l}}function iee(c,r){let a=[],{start:l}=r,i,m;for(c.sort(Xce),i=0;i<c.length;i+=1)m=c[i],m.start>l&&a.push({start:l,end:m.start}),m.end>l&&(l=m.end);return l<r.end&&a.push({start:l,end:r.end}),a}function Xce(c,r){return c.start.valueOf()-r.start.valueOf()}function Z2(c,r){let{start:a,end:l}=c,i=null;return r.start!==null&&(a===null?a=r.start:a=new Date(Math.max(a.valueOf(),r.start.valueOf()))),r.end!=null&&(l===null?l=r.end:l=new Date(Math.min(l.valueOf(),r.end.valueOf()))),(a===null||l===null||a<l)&&(i={start:a,end:l}),i}function Qce(c,r){return(c.start===null?null:c.start.valueOf())===(r.start===null?null:r.start.valueOf())&&(c.end===null?null:c.end.valueOf())===(r.end===null?null:r.end.valueOf())}function I$(c,r){return(c.end===null||r.start===null||c.end>r.start)&&(c.start===null||r.end===null||c.start<r.end)}function dO(c,r){return(c.start===null||r.start!==null&&r.start>=c.start)&&(c.end===null||r.end!==null&&r.end<=c.end)}function Y1(c,r){return(c.start===null||r>=c.start)&&(c.end===null||r<c.end)}function Jce(c,r){return r.start!=null&&c<r.start?r.start:r.end!=null&&c>=r.end?new Date(r.end.valueOf()-1):c}function aee(c){let r=Math.floor(z2(c.start,c.end))||1,a=Oa(c.start),l=nd(a,r);return{start:a,end:l}}function lee(c,r=ni(0)){let a=null,l=null;if(c.end){l=Oa(c.end);let i=c.end.valueOf()-l.valueOf();i&&i>=rg(r)&&(l=nd(l,1))}return c.start&&(a=Oa(c.start),l&&l<=a&&(l=nd(a,1))),{start:a,end:l}}function $S(c,r,a,l){return l==="year"?ni(a.diffWholeYears(c,r),"year"):l==="month"?ni(a.diffWholeMonths(c,r),"month"):ace(c,r)}function eue(c,r){switch(r.type){case"CHANGE_DATE":return r.dateMarker;default:return c}}function tue(c,r){let a=c.initialDate;return a!=null?r.createMarker(a):uA(c.now,r)}function uA(c,r){return typeof c=="function"&&(c=c()),c==null?r.createNowMarker():r.createMarker(c)}class cee{constructor(r){this.props=r,this.nowDate=uA(r.nowInput,r.dateEnv),this.initHiddenDays()}buildPrev(r,a,l){let{dateEnv:i}=this.props,m=i.subtract(i.startOf(a,r.currentRangeUnit),r.dateIncrement);return this.build(m,-1,l)}buildNext(r,a,l){let{dateEnv:i}=this.props,m=i.add(i.startOf(a,r.currentRangeUnit),r.dateIncrement);return this.build(m,1,l)}build(r,a,l=!0){let{props:i}=this,m,v,C,E,T,N;return m=this.buildValidRange(),m=this.trimHiddenDays(m),l&&(r=Jce(r,m)),v=this.buildCurrentRangeInfo(r,a),C=/^(year|month|week|day)$/.test(v.unit),E=this.buildRenderRange(this.trimHiddenDays(v.range),v.unit,C),E=this.trimHiddenDays(E),T=E,i.showNonCurrentDates||(T=Z2(T,v.range)),T=this.adjustActiveRange(T),T=Z2(T,m),N=I$(v.range,m),Y1(E,r)||(r=E.start),{currentDate:r,validRange:m,currentRange:v.range,currentRangeUnit:v.unit,isRangeAllDay:C,activeRange:T,renderRange:E,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:N,dateIncrement:this.buildDateIncrement(v.duration)}}buildValidRange(){let r=this.props.validRangeInput,a=typeof r=="function"?r.call(this.props.calendarApi,this.nowDate):r;return this.refineRange(a)||{start:null,end:null}}buildCurrentRangeInfo(r,a){let{props:l}=this,i=null,m=null,v=null,C;return l.duration?(i=l.duration,m=l.durationUnit,v=this.buildRangeFromDuration(r,a,i,m)):(C=this.props.dayCount)?(m="day",v=this.buildRangeFromDayCount(r,a,C)):(v=this.buildCustomVisibleRange(r))?m=l.dateEnv.greatestWholeUnit(v.start,v.end).unit:(i=this.getFallbackDuration(),m=_$(i).unit,v=this.buildRangeFromDuration(r,a,i,m)),{duration:i,unit:m,range:v}}getFallbackDuration(){return ni({day:1})}adjustActiveRange(r){let{dateEnv:a,usesMinMaxTime:l,slotMinTime:i,slotMaxTime:m}=this.props,{start:v,end:C}=r;return l&&(FS(i)<0&&(v=Oa(v),v=a.add(v,i)),FS(m)>1&&(C=Oa(C),C=nd(C,-1),C=a.add(C,m))),{start:v,end:C}}buildRangeFromDuration(r,a,l,i){let{dateEnv:m,dateAlignment:v}=this.props,C,E,T;if(!v){let{dateIncrement:V}=this.props;V&&rg(V)<rg(l)?v=_$(V).unit:v=i}FS(l)<=1&&this.isHiddenDay(C)&&(C=this.skipHiddenDays(C,a),C=Oa(C));function N(){C=m.startOf(r,v),E=m.add(C,l),T={start:C,end:E}}return N(),this.trimHiddenDays(T)||(r=this.skipHiddenDays(r,a),N()),T}buildRangeFromDayCount(r,a,l){let{dateEnv:i,dateAlignment:m}=this.props,v=0,C=r,E;m&&(C=i.startOf(C,m)),C=Oa(C),C=this.skipHiddenDays(C,a),E=C;do E=nd(E,1),this.isHiddenDay(E)||(v+=1);while(v<l);return{start:C,end:E}}buildCustomVisibleRange(r){let{props:a}=this,l=a.visibleRangeInput,i=typeof l=="function"?l.call(a.calendarApi,a.dateEnv.toDate(r)):l,m=this.refineRange(i);return m&&(m.start==null||m.end==null)?null:m}buildRenderRange(r,a,l){return r}buildDateIncrement(r){let{dateIncrement:a}=this.props,l;return a||((l=this.props.dateAlignment)?ni(1,l):r||ni({days:1}))}refineRange(r){if(r){let a=Yce(r,this.props.dateEnv);return a&&(a=lee(a)),a}return null}initHiddenDays(){let r=this.props.hiddenDays||[],a=[],l=0,i;for(this.props.weekends===!1&&r.push(0,6),i=0;i<7;i+=1)(a[i]=r.indexOf(i)!==-1)||(l+=1);if(!l)throw new Error("invalid hiddenDays");this.isHiddenDayHash=a}trimHiddenDays(r){let{start:a,end:l}=r;return a&&(a=this.skipHiddenDays(a)),l&&(l=this.skipHiddenDays(l,-1,!0)),a==null||l==null||a<l?{start:a,end:l}:null}isHiddenDay(r){return r instanceof Date&&(r=r.getUTCDay()),this.isHiddenDayHash[r]}skipHiddenDays(r,a=1,l=!1){for(;this.isHiddenDayHash[(r.getUTCDay()+(l?a:0)+7)%7];)r=nd(r,a);return r}}function B$(c,r,a,l){return{instanceId:H2(),defId:c,range:r,forcedStartTzo:a??null,forcedEndTzo:l??null}}function nue(c,r,a,l){for(let i=0;i<l.length;i+=1){let m=l[i].parse(c,a);if(m){let{allDay:v}=c;return v==null&&(v=r,v==null&&(v=m.allDayGuess,v==null&&(v=!1))),{allDay:v,duration:m.duration,typeData:m.typeData,typeId:i}}}return null}function q2(c,r,a){let{dateEnv:l,pluginHooks:i,options:m}=a,{defs:v,instances:C}=c;C=j2(C,E=>!v[E.defId].recurringDef);for(let E in v){let T=v[E];if(T.recurringDef){let{duration:N}=T.recurringDef;N||(N=T.allDay?m.defaultAllDayEventDuration:m.defaultTimedEventDuration);let V=oue(T,N,r,l,i.recurringTypes);for(let U of V){let z=B$(E,{start:U,end:l.add(U,N)});C[z.instanceId]=z}}}return{defs:v,instances:C}}function oue(c,r,a,l,i){let v=i[c.recurringDef.typeId].expand(c.recurringDef.typeData,{start:l.subtract(a.start,r),end:a.end},l);return c.allDay&&(v=v.map(Oa)),v}const fO={id:String,groupId:String,title:String,url:String,interactive:Boolean},uee={start:Zt,end:Zt,date:Zt,allDay:Boolean},sue=Object.assign(Object.assign(Object.assign({},fO),uee),{extendedProps:Zt});function dee(c,r,a,l,i=M$(a),m,v){let{refined:C,extra:E}=fee(c,a,i),T=iue(r,a),N=nue(C,T,a.dateEnv,a.pluginHooks.recurringTypes);if(N){let U=P$(C,E,r?r.sourceId:"",N.allDay,!!N.duration,a,m);return U.recurringDef={typeId:N.typeId,typeData:N.typeData,duration:N.duration},{def:U,instance:null}}let V=rue(C,T,a,l);if(V){let U=P$(C,E,r?r.sourceId:"",V.allDay,V.hasEnd,a,m),z=B$(U.defId,V.range,V.forcedStartTzo,V.forcedEndTzo);return v&&U.publicId&&v[U.publicId]&&(z.instanceId=v[U.publicId]),{def:U,instance:z}}return null}function fee(c,r,a=M$(r)){return x$(c,a)}function M$(c){return Object.assign(Object.assign(Object.assign({},hO),sue),c.pluginHooks.eventRefiners)}function P$(c,r,a,l,i,m,v){let C={title:c.title||"",groupId:c.groupId||"",publicId:c.id||"",url:c.url||"",recurringDef:null,defId:(v&&c.id?v[c.id]:"")||H2(),sourceId:a,allDay:l,hasEnd:i,interactive:c.interactive,ui:gO(c,m),extendedProps:Object.assign(Object.assign({},c.extendedProps||{}),r)};for(let E of m.pluginHooks.eventDefMemberAdders)Object.assign(C,E(c));return Object.freeze(C.ui.classNames),Object.freeze(C.extendedProps),C}function rue(c,r,a,l){let{allDay:i}=c,m,v=null,C=!1,E,T=null,N=c.start!=null?c.start:c.date;if(m=a.dateEnv.createMarkerMeta(N),m)v=m.marker;else if(!l)return null;return c.end!=null&&(E=a.dateEnv.createMarkerMeta(c.end)),i==null&&(r!=null?i=r:i=(!m||m.isTimeUnspecified)&&(!E||E.isTimeUnspecified)),i&&v&&(v=Oa(v)),E&&(T=E.marker,i&&(T=Oa(T)),v&&T<=v&&(T=null)),T?C=!0:l||(C=a.options.forceEventDuration||!1,T=a.dateEnv.add(v,i?a.options.defaultAllDayEventDuration:a.options.defaultTimedEventDuration)),{allDay:i,hasEnd:C,range:{start:v,end:T},forcedStartTzo:m?m.forcedTzo:null,forcedEndTzo:E?E.forcedTzo:null}}function iue(c,r){let a=null;return c&&(a=c.defaultAllDay),a==null&&(a=r.options.defaultAllDay),a}function dA(c,r,a,l,i,m){let v=im(),C=M$(a);for(let E of c){let T=dee(E,r,a,l,C,i,m);T&&L$(T,v)}return v}function L$(c,r=im()){return r.defs[c.def.defId]=c.def,c.instance&&(r.instances[c.instance.instanceId]=c.instance),r}function F$(c,r){let a=c.instances[r];if(a){let l=c.defs[a.defId],i=mO(c,m=>aue(l,m));return i.defs[l.defId]=l,i.instances[a.instanceId]=a,i}return im()}function aue(c,r){return!!(c.groupId&&c.groupId===r.groupId)}function im(){return{defs:{},instances:{}}}function $$(c,r){return{defs:Object.assign(Object.assign({},c.defs),r.defs),instances:Object.assign(Object.assign({},c.instances),r.instances)}}function mO(c,r){let a=j2(c.defs,r),l=j2(c.instances,i=>a[i.defId]);return{defs:a,instances:l}}function lue(c,r){let{defs:a,instances:l}=c,i={},m={};for(let v in a)r.defs[v]||(i[v]=a[v]);for(let v in l)!r.instances[v]&&i[l[v].defId]&&(m[v]=l[v]);return{defs:i,instances:m}}function cue(c,r){return Array.isArray(c)?dA(c,null,r,!0):typeof c=="object"&&c?dA([c],null,r,!0):c!=null?String(c):null}function mee(c){return Array.isArray(c)?c:typeof c=="string"?c.split(/\s+/):[]}const hO={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Zt,overlap:Zt,allow:Zt,className:mee,classNames:mee,color:String,backgroundColor:String,borderColor:String,textColor:String},uue={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function gO(c,r){let a=cue(c.constraint,r);return{display:c.display||null,startEditable:c.startEditable!=null?c.startEditable:c.editable,durationEditable:c.durationEditable!=null?c.durationEditable:c.editable,constraints:a!=null?[a]:[],overlap:c.overlap!=null?c.overlap:null,allows:c.allow!=null?[c.allow]:[],backgroundColor:c.backgroundColor||c.color||"",borderColor:c.borderColor||c.color||"",textColor:c.textColor||"",classNames:(c.className||[]).concat(c.classNames||[])}}function hee(c){return c.reduce(due,uue)}function due(c,r){return{display:r.display!=null?r.display:c.display,startEditable:r.startEditable!=null?r.startEditable:c.startEditable,durationEditable:r.durationEditable!=null?r.durationEditable:c.durationEditable,constraints:c.constraints.concat(r.constraints),overlap:typeof r.overlap=="boolean"?r.overlap:c.overlap,allows:c.allows.concat(r.allows),backgroundColor:r.backgroundColor||c.backgroundColor,borderColor:r.borderColor||c.borderColor,textColor:r.textColor||c.textColor,classNames:c.classNames.concat(r.classNames)}}const fue={id:String,defaultAllDay:Boolean,url:String,format:String,events:Zt,eventDataTransform:Zt,success:Zt,failure:Zt};function gee(c,r,a=pee(r)){let l;if(typeof c=="string"?l={url:c}:typeof c=="function"||Array.isArray(c)?l={events:c}:typeof c=="object"&&c&&(l=c),l){let{refined:i,extra:m}=x$(l,a),v=mue(i,r);if(v)return{_raw:c,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:H2(),sourceDefId:v.sourceDefId,meta:v.meta,ui:gO(i,r),extendedProps:m}}return null}function pee(c){return Object.assign(Object.assign(Object.assign({},hO),fue),c.pluginHooks.eventSourceRefiners)}function mue(c,r){let a=r.pluginHooks.eventSourceDefs;for(let l=a.length-1;l>=0;l-=1){let m=a[l].parseMeta(c);if(m)return{sourceDefId:l,meta:m}}return null}function hue(c,r,a,l,i){switch(r.type){case"RECEIVE_EVENTS":return gue(c,a[r.sourceId],r.fetchId,r.fetchRange,r.rawEvents,i);case"RESET_RAW_EVENTS":return pue(c,a[r.sourceId],r.rawEvents,l.activeRange,i);case"ADD_EVENTS":return vue(c,r.eventStore,l?l.activeRange:null,i);case"RESET_EVENTS":return r.eventStore;case"MERGE_EVENTS":return $$(c,r.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return l?q2(c,l.activeRange,i):c;case"REMOVE_EVENTS":return lue(c,r.eventStore);case"REMOVE_EVENT_SOURCE":return Cee(c,r.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return mO(c,m=>!m.sourceId);case"REMOVE_ALL_EVENTS":return im();default:return c}}function gue(c,r,a,l,i,m){if(r&&a===r.latestFetchId){let v=dA(vee(i,r,m),r,m);return l&&(v=q2(v,l,m)),$$(Cee(c,r.sourceId),v)}return c}function pue(c,r,a,l,i){const{defIdMap:m,instanceIdMap:v}=bue(c);let C=dA(vee(a,r,i),r,i,!1,m,v);return q2(C,l,i)}function vee(c,r,a){let l=a.options.eventDataTransform,i=r?r.eventDataTransform:null;return i&&(c=yee(c,i)),l&&(c=yee(c,l)),c}function yee(c,r){let a;if(!r)a=c;else{a=[];for(let l of c){let i=r(l);i?a.push(i):i==null&&a.push(l)}}return a}function vue(c,r,a,l){return a&&(r=q2(r,a,l)),$$(c,r)}function bee(c,r,a){let{defs:l}=c,i=Z1(c.instances,m=>l[m.defId].allDay?m:Object.assign(Object.assign({},m),{range:{start:a.createMarker(r.toDate(m.range.start,m.forcedStartTzo)),end:a.createMarker(r.toDate(m.range.end,m.forcedEndTzo))},forcedStartTzo:a.canComputeOffset?null:m.forcedStartTzo,forcedEndTzo:a.canComputeOffset?null:m.forcedEndTzo}));return{defs:l,instances:i}}function Cee(c,r){return mO(c,a=>a.sourceId!==r)}function yue(c,r){return{defs:c.defs,instances:j2(c.instances,a=>!r[a.instanceId])}}function bue(c){const{defs:r,instances:a}=c,l={},i={};for(let m in r){const v=r[m],{publicId:C}=v;C&&(l[C]=m)}for(let m in a){const v=a[m],C=r[v.defId],{publicId:E}=C;E&&(i[E]=m)}return{defIdMap:l,instanceIdMap:i}}class pO{constructor(){this.handlers={},this.thisContext=null}setThisContext(r){this.thisContext=r}setOptions(r){this.options=r}on(r,a){Cue(this.handlers,r,a)}off(r,a){_ue(this.handlers,r,a)}trigger(r,...a){let l=this.handlers[r]||[],i=this.options&&this.options[r],m=[].concat(i||[],l);for(let v of m)v.apply(this.thisContext,a)}hasHandlers(r){return!!(this.handlers[r]&&this.handlers[r].length||this.options&&this.options[r])}}function Cue(c,r,a){(c[r]||(c[r]=[])).push(a)}function _ue(c,r,a){a?c[r]&&(c[r]=c[r].filter(l=>l!==a)):delete c[r]}const wue={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Sue(c,r){return dA(Eue(c),null,r)}function Eue(c){let r;return c===!0?r=[{}]:Array.isArray(c)?r=c.filter(a=>a.daysOfWeek):typeof c=="object"&&c?r=[c]:r=[],r=r.map(a=>Object.assign(Object.assign({},wue),a)),r}function _ee(c,r,a){a.emitter.trigger("select",Object.assign(Object.assign({},V$(c,a)),{jsEvent:r?r.origEvent:null,view:a.viewApi||a.calendarApi.view}))}function kue(c,r){r.emitter.trigger("unselect",{jsEvent:c?c.origEvent:null,view:r.viewApi||r.calendarApi.view})}function V$(c,r){let a={};for(let l of r.pluginHooks.dateSpanTransforms)Object.assign(a,l(c,r));return Object.assign(a,$ue(c,r.dateEnv)),a}function wee(c,r,a){let{dateEnv:l,options:i}=a,m=r;return c?(m=Oa(m),m=l.add(m,i.defaultAllDayEventDuration)):m=l.add(m,i.defaultTimedEventDuration),m}function H$(c,r,a,l){let i=vO(c.defs,r),m=im();for(let v in c.defs){let C=c.defs[v];m.defs[v]=xue(C,i[v],a,l)}for(let v in c.instances){let C=c.instances[v],E=m.defs[C.defId];m.instances[v]=Aue(C,E,i[C.defId],a,l)}return m}function xue(c,r,a,l){let i=a.standardProps||{};i.hasEnd==null&&r.durationEditable&&(a.startDelta||a.endDelta)&&(i.hasEnd=!0);let m=Object.assign(Object.assign(Object.assign({},c),i),{ui:Object.assign(Object.assign({},c.ui),i.ui)});a.extendedProps&&(m.extendedProps=Object.assign(Object.assign({},m.extendedProps),a.extendedProps));for(let v of l.pluginHooks.eventDefMutationAppliers)v(m,a,l);return!m.hasEnd&&l.options.forceEventDuration&&(m.hasEnd=!0),m}function Aue(c,r,a,l,i){let{dateEnv:m}=i,v=l.standardProps&&l.standardProps.allDay===!0,C=l.standardProps&&l.standardProps.hasEnd===!1,E=Object.assign({},c);return v&&(E.range=aee(E.range)),l.datesDelta&&a.startEditable&&(E.range={start:m.add(E.range.start,l.datesDelta),end:m.add(E.range.end,l.datesDelta)}),l.startDelta&&a.durationEditable&&(E.range={start:m.add(E.range.start,l.startDelta),end:E.range.end}),l.endDelta&&a.durationEditable&&(E.range={start:E.range.start,end:m.add(E.range.end,l.endDelta)}),C&&(E.range={start:E.range.start,end:wee(r.allDay,E.range.start,i)}),r.allDay&&(E.range={start:Oa(E.range.start),end:Oa(E.range.end)}),E.range.end<E.range.start&&(E.range.end=wee(r.allDay,E.range.start,i)),E}class VS{constructor(r,a){this.context=r,this.internalEventSource=a}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class fl{constructor(r,a,l){this._context=r,this._def=a,this._instance=l||null}setProp(r,a){if(r in uee)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(r==="id")a=fO[r](a),this.mutate({standardProps:{publicId:a}});else if(r in fO)a=fO[r](a),this.mutate({standardProps:{[r]:a}});else if(r in hO){let l=hO[r](a);r==="color"?l={backgroundColor:a,borderColor:a}:r==="editable"?l={startEditable:a,durationEditable:a}:l={[r]:a},this.mutate({standardProps:{ui:l}})}else console.warn(`Could not set prop '${r}'. Use setExtendedProp instead.`)}setExtendedProp(r,a){this.mutate({extendedProps:{[r]:a}})}setStart(r,a={}){let{dateEnv:l}=this._context,i=l.createMarker(r);if(i&&this._instance){let m=this._instance.range,v=$S(m.start,i,l,a.granularity);a.maintainDuration?this.mutate({datesDelta:v}):this.mutate({startDelta:v})}}setEnd(r,a={}){let{dateEnv:l}=this._context,i;if(!(r!=null&&(i=l.createMarker(r),!i))&&this._instance)if(i){let m=$S(this._instance.range.end,i,l,a.granularity);this.mutate({endDelta:m})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(r,a,l={}){let{dateEnv:i}=this._context,m={allDay:l.allDay},v=i.createMarker(r),C;if(v&&!(a!=null&&(C=i.createMarker(a),!C))&&this._instance){let E=this._instance.range;l.allDay===!0&&(E=aee(E));let T=$S(E.start,v,i,l.granularity);if(C){let N=$S(E.end,C,i,l.granularity);Xle(T,N)?this.mutate({datesDelta:T,standardProps:m}):this.mutate({startDelta:T,endDelta:N,standardProps:m})}else m.hasEnd=!1,this.mutate({datesDelta:T,standardProps:m})}}moveStart(r){let a=ni(r);a&&this.mutate({startDelta:a})}moveEnd(r){let a=ni(r);a&&this.mutate({endDelta:a})}moveDates(r){let a=ni(r);a&&this.mutate({datesDelta:a})}setAllDay(r,a={}){let l={allDay:r},{maintainDuration:i}=a;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==r&&(l.hasEnd=i),this.mutate({standardProps:l})}formatRange(r){let{dateEnv:a}=this._context,l=this._instance,i=El(r);return this._def.hasEnd?a.formatRange(l.range.start,l.range.end,i,{forcedStartTzo:l.forcedStartTzo,forcedEndTzo:l.forcedEndTzo}):a.format(l.range.start,i,{forcedTzo:l.forcedStartTzo})}mutate(r){let a=this._instance;if(a){let l=this._def,i=this._context,{eventStore:m}=i.getCurrentData(),v=F$(m,a.instanceId);v=H$(v,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},r,i);let E=new fl(i,l,a);this._def=v.defs[l.defId],this._instance=v.instances[a.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:v}),i.emitter.trigger("eventChange",{oldEvent:E,event:this,relatedEvents:K2(v,i,a),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:m})}})}}remove(){let r=this._context,a=See(this);r.dispatch({type:"REMOVE_EVENTS",eventStore:a}),r.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){r.dispatch({type:"MERGE_EVENTS",eventStore:a})}})}get source(){let{sourceId:r}=this._def;return r?new VS(this._context,this._context.getCurrentData().eventSources[r]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let r=this._instance;return r?this._context.dateEnv.formatIso(r.range.start,{omitTime:this._def.allDay,forcedTzo:r.forcedStartTzo}):""}get endStr(){let r=this._instance;return r&&this._def.hasEnd?this._context.dateEnv.formatIso(r.range.end,{omitTime:this._def.allDay,forcedTzo:r.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(r={}){let a=this._def,{ui:l}=a,{startStr:i,endStr:m}=this,v={allDay:a.allDay};return a.title&&(v.title=a.title),i&&(v.start=i),m&&(v.end=m),a.publicId&&(v.id=a.publicId),a.groupId&&(v.groupId=a.groupId),a.url&&(v.url=a.url),l.display&&l.display!=="auto"&&(v.display=l.display),r.collapseColor&&l.backgroundColor&&l.backgroundColor===l.borderColor?v.color=l.backgroundColor:(l.backgroundColor&&(v.backgroundColor=l.backgroundColor),l.borderColor&&(v.borderColor=l.borderColor)),l.textColor&&(v.textColor=l.textColor),l.classNames.length&&(v.classNames=l.classNames),Object.keys(a.extendedProps).length&&(r.collapseExtendedProps?Object.assign(v,a.extendedProps):v.extendedProps=a.extendedProps),v}toJSON(){return this.toPlainObject()}}function See(c){let r=c._def,a=c._instance;return{defs:{[r.defId]:r},instances:a?{[a.instanceId]:a}:{}}}function K2(c,r,a){let{defs:l,instances:i}=c,m=[],v=a?a.instanceId:"";for(let C in i){let E=i[C],T=l[E.defId];E.instanceId!==v&&m.push(new fl(r,T,E))}return m}function Eee(c,r,a,l){let i={},m={},v={},C=[],E=[],T=vO(c.defs,r);for(let N in c.defs){let V=c.defs[N];T[V.defId].display==="inverse-background"&&(V.groupId?(i[V.groupId]=[],v[V.groupId]||(v[V.groupId]=V)):m[N]=[])}for(let N in c.instances){let V=c.instances[N],U=c.defs[V.defId],z=T[U.defId],W=V.range,K=!U.allDay&&l?lee(W,l):W,Z=Z2(K,a);Z&&(z.display==="inverse-background"?U.groupId?i[U.groupId].push(Z):m[V.defId].push(Z):z.display!=="none"&&(z.display==="background"?C:E).push({def:U,ui:z,instance:V,range:Z,isStart:K.start&&K.start.valueOf()===Z.start.valueOf(),isEnd:K.end&&K.end.valueOf()===Z.end.valueOf()}))}for(let N in i){let V=i[N],U=iee(V,a);for(let z of U){let W=v[N],K=T[W.defId];C.push({def:W,ui:K,instance:null,range:z,isStart:!1,isEnd:!1})}}for(let N in m){let V=m[N],U=iee(V,a);for(let z of U)C.push({def:c.defs[N],ui:T[N],instance:null,range:z,isStart:!1,isEnd:!1})}return{bg:C,fg:E}}function Tue(c){return c.ui.display==="background"||c.ui.display==="inverse-background"}function kee(c,r){c.fcSeg=r}function HS(c){return c.fcSeg||c.parentNode.fcSeg||null}function vO(c,r){return Z1(c,a=>xee(a,r))}function xee(c,r){let a=[];return r[""]&&a.push(r[""]),r[c.defId]&&a.push(r[c.defId]),a.push(c.ui),hee(a)}function Aee(c,r){let a=c.map(Due);return a.sort((l,i)=>Wle(l,i,r)),a.map(l=>l._seg)}function Due(c){let{eventRange:r}=c,a=r.def,l=r.instance?r.instance.range:r.range,i=l.start?l.start.valueOf():0,m=l.end?l.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},a.extendedProps),a),{id:a.publicId,start:i,end:m,duration:m-i,allDay:Number(a.allDay),_seg:c})}function Rue(c,r){let{pluginHooks:a}=r,l=a.isDraggableTransformers,{def:i,ui:m}=c.eventRange,v=m.startEditable;for(let C of l)v=C(v,i,m,r);return v}function Oue(c,r){return c.isStart&&c.eventRange.ui.durationEditable&&r.options.eventResizableFromStart}function Nue(c,r){return c.isEnd&&c.eventRange.ui.durationEditable}function Tee(c,r,a,l,i,m,v){let{dateEnv:C,options:E}=a,{displayEventTime:T,displayEventEnd:N}=E,V=c.eventRange.def,U=c.eventRange.instance;T==null&&(T=l!==!1),N==null&&(N=i!==!1);let z=U.range.start,W=U.range.end,K=m||c.start||c.eventRange.range.start,Z=v||c.end||c.eventRange.range.end,ce=Oa(z).valueOf()===Oa(K).valueOf(),q=Oa(ey(W,-1)).valueOf()===Oa(ey(Z,-1)).valueOf();return T&&!V.allDay&&(ce||q)?(K=ce?z:K,Z=q?W:Z,N&&V.hasEnd?C.formatRange(K,Z,r,{forcedStartTzo:m?null:U.forcedStartTzo,forcedEndTzo:v?null:U.forcedEndTzo}):C.format(K,r,{forcedTzo:m?null:U.forcedStartTzo})):""}function oy(c,r,a){let l=c.eventRange.range;return{isPast:l.end<=(a||r.start),isFuture:l.start>=(a||r.end),isToday:r&&Y1(r,l.start)}}function Iue(c){let r=["fc-event"];return c.isMirror&&r.push("fc-event-mirror"),c.isDraggable&&r.push("fc-event-draggable"),(c.isStartResizable||c.isEndResizable)&&r.push("fc-event-resizable"),c.isDragging&&r.push("fc-event-dragging"),c.isResizing&&r.push("fc-event-resizing"),c.isSelected&&r.push("fc-event-selected"),c.isStart&&r.push("fc-event-start"),c.isEnd&&r.push("fc-event-end"),c.isPast&&r.push("fc-event-past"),c.isToday&&r.push("fc-event-today"),c.isFuture&&r.push("fc-event-future"),r}function Dee(c){return c.instance?c.instance.instanceId:`${c.def.defId}:${c.range.start.toISOString()}`}function Ree(c,r){let{def:a,instance:l}=c.eventRange,{url:i}=a;if(i)return{href:i};let{emitter:m,options:v}=r,{eventInteractive:C}=v;return C==null&&(C=a.interactive,C==null&&(C=!!m.hasHandlers("eventClick"))),C?$J(E=>{m.trigger("eventClick",{el:E.target,event:new fl(r,a,l),jsEvent:E,view:r.viewApi})}):{}}const Bue={start:Zt,end:Zt,allDay:Boolean};function Mue(c,r,a){let l=Pue(c,r),{range:i}=l;if(!i.start)return null;if(!i.end){if(a==null)return null;i.end=r.add(i.start,a)}return l}function Pue(c,r){let{refined:a,extra:l}=x$(c,Bue),i=a.start?r.createMarkerMeta(a.start):null,m=a.end?r.createMarkerMeta(a.end):null,{allDay:v}=a;return v==null&&(v=i&&i.isTimeUnspecified&&(!m||m.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:m?m.marker:null},allDay:v},l)}function Lue(c,r){return Qce(c.range,r.range)&&c.allDay===r.allDay&&Fue(c,r)}function Fue(c,r){for(let a in r)if(a!=="range"&&a!=="allDay"&&c[a]!==r[a])return!1;for(let a in c)if(!(a in r))return!1;return!0}function $ue(c,r){return Object.assign(Object.assign({},Nee(c.range,r,c.allDay)),{allDay:c.allDay})}function Oee(c,r,a){return Object.assign(Object.assign({},Nee(c,r,a)),{timeZone:r.timeZone})}function Nee(c,r,a){return{start:r.toDate(c.start),end:r.toDate(c.end),startStr:r.formatIso(c.start,{omitTime:a}),endStr:r.formatIso(c.end,{omitTime:a})}}function Vue(c,r,a){let l=fee({editable:!1},a),i=P$(l.refined,l.extra,"",c.allDay,!0,a);return{def:i,ui:xee(i,r),instance:B$(i.defId,c.range),range:c.range,isStart:!0,isEnd:!0}}function Hue(c,r,a){let l=!1,i=function(C){l||(l=!0,r(C))},m=function(C){l||(l=!0,a(C))},v=c(i,m);v&&typeof v.then=="function"&&v.then(i,m)}class Iee extends Error{constructor(r,a){super(r),this.response=a}}function zue(c,r,a){c=c.toUpperCase();const l={method:c};return c==="GET"?r+=(r.indexOf("?")===-1?"?":"&")+new URLSearchParams(a):(l.body=new URLSearchParams(a),l.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(r,l).then(i=>{if(i.ok)return i.json().then(m=>[m,i],()=>{throw new Iee("Failure parsing JSON",i)});throw new Iee("Request failed",i)})}let z$;function Bee(){return z$==null&&(z$=Uue()),z$}function Uue(){if(typeof document>"u")return!0;let c=document.createElement("div");c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.innerHTML="<table><tr><td><div></div></td></tr></table>",c.querySelector("table").style.height="100px",c.querySelector("div").style.height="100%",document.body.appendChild(c);let a=c.querySelector("div").offsetHeight>0;return document.body.removeChild(c),a}class Wue extends Li{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{cO(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{cO(()=>{this.setState({forPrint:!1})})}}render(){let{props:r}=this,{options:a}=r,{forPrint:l}=this.state,i=l||a.height==="auto"||a.contentHeight==="auto",m=!i&&a.height!=null?a.height:"",v=["fc",l?"fc-media-print":"fc-media-screen",`fc-direction-${a.direction}`,r.theme.getClass("root")];return Bee()||v.push("fc-liquid-hack"),r.children(v,m,i,l)}componentDidMount(){let{emitter:r}=this.props;r.on("_beforeprint",this.handleBeforePrint),r.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:r}=this.props;r.off("_beforeprint",this.handleBeforePrint),r.off("_afterprint",this.handleAfterPrint)}}class zS{constructor(r){this.component=r.component,this.isHitComboAllowed=r.isHitComboAllowed||null}destroy(){}}function jue(c,r){return{component:c,el:r.el,useEventCenter:r.useEventCenter!=null?r.useEventCenter:!0,isHitComboAllowed:r.isHitComboAllowed||null}}function U$(c){return{[c.component.uid]:c}}const W$={};class Gue{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(r){this.currentDataManager.dispatch(r)}get view(){return this.getCurrentData().viewApi}batchRendering(r){r()}updateSize(){this.trigger("_resize",!0)}setOption(r,a){this.dispatch({type:"SET_OPTION",optionName:r,rawOptionValue:a})}getOption(r){return this.currentDataManager.currentCalendarOptionsInput[r]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(r,a){let{currentDataManager:l}=this;l.currentCalendarOptionsRefiners[r]?l.emitter.on(r,a):console.warn(`Unknown listener name '${r}'`)}off(r,a){this.currentDataManager.emitter.off(r,a)}trigger(r,...a){this.currentDataManager.emitter.trigger(r,...a)}changeView(r,a){this.batchRendering(()=>{if(this.unselect(),a)if(a.start&&a.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:a});else{let{dateEnv:l}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r,dateMarker:l.createMarker(a)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r})})}zoomTo(r,a){let l=this.getCurrentData(),i;a=a||"day",i=l.viewSpecs[a]||this.getUnitViewSpec(a),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:r}):this.dispatch({type:"CHANGE_DATE",dateMarker:r})}getUnitViewSpec(r){let{viewSpecs:a,toolbarConfig:l}=this.getCurrentData(),i=[].concat(l.header?l.header.viewsWithButtons:[],l.footer?l.footer.viewsWithButtons:[]),m,v;for(let C in a)i.push(C);for(m=0;m<i.length;m+=1)if(v=a[i[m]],v&&v.singleUnit===r)return v;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.addYears(r.currentDate,-1)})}nextYear(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.addYears(r.currentDate,1)})}today(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:uA(r.calendarOptions.now,r.dateEnv)})}gotoDate(r){let a=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:a.dateEnv.createMarker(r)})}incrementDate(r){let a=this.getCurrentData(),l=ni(r);l&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:a.dateEnv.add(a.currentDate,l)}))}getDate(){let r=this.getCurrentData();return r.dateEnv.toDate(r.currentDate)}formatDate(r,a){let{dateEnv:l}=this.getCurrentData();return l.format(l.createMarker(r),El(a))}formatRange(r,a,l){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(r),i.createMarker(a),El(l),l)}formatIso(r,a){let{dateEnv:l}=this.getCurrentData();return l.formatIso(l.createMarker(r),{omitTime:a})}select(r,a){let l;a==null?r.start!=null?l=r:l={start:r,end:null}:l={start:r,end:a};let i=this.getCurrentData(),m=Mue(l,i.dateEnv,ni({days:1}));m&&(this.dispatch({type:"SELECT_DATES",selection:m}),_ee(m,null,i))}unselect(r){let a=this.getCurrentData();a.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),kue(r,a))}addEvent(r,a){if(r instanceof fl){let v=r._def,C=r._instance;return this.getCurrentData().eventStore.defs[v.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:L$({def:v,instance:C})}),this.triggerEventAdd(r)),r}let l=this.getCurrentData(),i;if(a instanceof VS)i=a.internalEventSource;else if(typeof a=="boolean")a&&([i]=T$(l.eventSources));else if(a!=null){let v=this.getEventSourceById(a);if(!v)return console.warn(`Could not find an event source with ID "${a}"`),null;i=v.internalEventSource}let m=dee(r,i,l,!1);if(m){let v=new fl(l,m.def,m.def.recurringDef?null:m.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:L$(m)}),this.triggerEventAdd(v),v}return null}triggerEventAdd(r){let{emitter:a}=this.getCurrentData();a.trigger("eventAdd",{event:r,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:See(r)})}})}getEventById(r){let a=this.getCurrentData(),{defs:l,instances:i}=a.eventStore;r=String(r);for(let m in l){let v=l[m];if(v.publicId===r){if(v.recurringDef)return new fl(a,v,null);for(let C in i){let E=i[C];if(E.defId===v.defId)return new fl(a,v,E)}}}return null}getEvents(){let r=this.getCurrentData();return K2(r.eventStore,r)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let r=this.getCurrentData(),a=r.eventSources,l=[];for(let i in a)l.push(new VS(r,a[i]));return l}getEventSourceById(r){let a=this.getCurrentData(),l=a.eventSources;r=String(r);for(let i in l)if(l[i].publicId===r)return new VS(a,l[i]);return null}addEventSource(r){let a=this.getCurrentData();if(r instanceof VS)return a.eventSources[r.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r.internalEventSource]}),r;let l=gee(r,a);return l?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[l]}),new VS(a,l)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(r){let a=ni(r);a&&this.trigger("_scrollRequest",{time:a})}}function Zue(c,r){return c.left>=r.left&&c.left<r.right&&c.top>=r.top&&c.top<r.bottom}function Mee(c,r){let a={left:Math.max(c.left,r.left),right:Math.min(c.right,r.right),top:Math.max(c.top,r.top),bottom:Math.min(c.bottom,r.bottom)};return a.left<a.right&&a.top<a.bottom?a:!1}function que(c,r){return{left:Math.min(Math.max(c.left,r.left),r.right),top:Math.min(Math.max(c.top,r.top),r.bottom)}}function Kue(c){return{left:(c.left+c.right)/2,top:(c.top+c.bottom)/2}}function Yue(c,r){return{left:c.left-r.left,top:c.top-r.top}}const j$=im();class Xue{constructor(){this.getKeysForEventDefs=Ms(this._getKeysForEventDefs),this.splitDateSelection=Ms(this._splitDateSpan),this.splitEventStore=Ms(this._splitEventStore),this.splitIndividualUi=Ms(this._splitIndividualUi),this.splitEventDrag=Ms(this._splitInteraction),this.splitEventResize=Ms(this._splitInteraction),this.eventUiBuilders={}}splitProps(r){let a=this.getKeyInfo(r),l=this.getKeysForEventDefs(r.eventStore),i=this.splitDateSelection(r.dateSelection),m=this.splitIndividualUi(r.eventUiBases,l),v=this.splitEventStore(r.eventStore,l),C=this.splitEventDrag(r.eventDrag),E=this.splitEventResize(r.eventResize),T={};this.eventUiBuilders=Z1(a,(N,V)=>this.eventUiBuilders[V]||Ms(Que));for(let N in a){let V=a[N],U=v[N]||j$,z=this.eventUiBuilders[N];T[N]={businessHours:V.businessHours||r.businessHours,dateSelection:i[N]||null,eventStore:U,eventUiBases:z(r.eventUiBases[""],V.ui,m[N]),eventSelection:U.instances[r.eventSelection]?r.eventSelection:"",eventDrag:C[N]||null,eventResize:E[N]||null}}return T}_splitDateSpan(r){let a={};if(r){let l=this.getKeysForDateSpan(r);for(let i of l)a[i]=r}return a}_getKeysForEventDefs(r){return Z1(r.defs,a=>this.getKeysForEventDef(a))}_splitEventStore(r,a){let{defs:l,instances:i}=r,m={};for(let v in l)for(let C of a[v])m[C]||(m[C]=im()),m[C].defs[v]=l[v];for(let v in i){let C=i[v];for(let E of a[C.defId])m[E]&&(m[E].instances[v]=C)}return m}_splitIndividualUi(r,a){let l={};for(let i in r)if(i)for(let m of a[i])l[m]||(l[m]={}),l[m][i]=r[i];return l}_splitInteraction(r){let a={};if(r){let l=this._splitEventStore(r.affectedEvents,this._getKeysForEventDefs(r.affectedEvents)),i=this._getKeysForEventDefs(r.mutatedEvents),m=this._splitEventStore(r.mutatedEvents,i),v=C=>{a[C]||(a[C]={affectedEvents:l[C]||j$,mutatedEvents:m[C]||j$,isEvent:r.isEvent})};for(let C in l)v(C);for(let C in m)v(C)}return a}}function Que(c,r,a){let l=[];c&&l.push(c),r&&l.push(r);let i={"":hee(l)};return a&&Object.assign(i,a),i}function Pee(c,r,a,l){return{dow:c.getUTCDay(),isDisabled:!!(l&&!Y1(l.activeRange,c)),isOther:!!(l&&!Y1(l.currentRange,c)),isToday:!!(r&&Y1(r,c)),isPast:!!(a?c<a:r&&c<r.start),isFuture:!!(a?c>a:r&&c>=r.end)}}function G$(c,r){let a=["fc-day",`fc-day-${nce[c.dow]}`];return c.isDisabled?a.push("fc-day-disabled"):(c.isToday&&(a.push("fc-day-today"),a.push(r.getClass("today"))),c.isPast&&a.push("fc-day-past"),c.isFuture&&a.push("fc-day-future"),c.isOther&&a.push("fc-day-other")),a}const Jue=El({year:"numeric",month:"long",day:"numeric"}),ede=El({week:"long"});function yO(c,r,a="day",l=!0){const{dateEnv:i,options:m,calendarApi:v}=c;let C=i.format(r,a==="week"?ede:Jue);if(m.navLinks){let E=i.toDate(r);const T=N=>{let V=a==="day"?m.navLinkDayClick:a==="week"?m.navLinkWeekClick:null;typeof V=="function"?V.call(v,i.toDate(r),N):(typeof V=="string"&&(a=V),v.zoomTo(r,a))};return Object.assign({title:aA(m.navLinkHint,[C,E],C),"data-navlink":""},l?FJ(T):{onClick:T})}return{"aria-label":C}}let Z$=null;function tde(){return Z$===null&&(Z$=nde()),Z$}function nde(){let c=document.createElement("div");iA(c,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),c.innerHTML="<div></div>",document.body.appendChild(c);let a=c.firstChild.getBoundingClientRect().left>c.getBoundingClientRect().left;return p$(c),a}let q$;function ode(){return q$||(q$=sde()),q$}function sde(){let c=document.createElement("div");c.style.overflow="scroll",c.style.position="absolute",c.style.top="-9999px",c.style.left="-9999px",document.body.appendChild(c);let r=Lee(c);return document.body.removeChild(c),r}function Lee(c){return{x:c.offsetHeight-c.clientHeight,y:c.offsetWidth-c.clientWidth}}function rde(c,r=!1){let a=window.getComputedStyle(c),l=parseInt(a.borderLeftWidth,10)||0,i=parseInt(a.borderRightWidth,10)||0,m=parseInt(a.borderTopWidth,10)||0,v=parseInt(a.borderBottomWidth,10)||0,C=Lee(c),E=C.y-l-i,T=C.x-m-v,N={borderLeft:l,borderRight:i,borderTop:m,borderBottom:v,scrollbarBottom:T,scrollbarLeft:0,scrollbarRight:0};return tde()&&a.direction==="rtl"?N.scrollbarLeft=E:N.scrollbarRight=E,r&&(N.paddingLeft=parseInt(a.paddingLeft,10)||0,N.paddingRight=parseInt(a.paddingRight,10)||0,N.paddingTop=parseInt(a.paddingTop,10)||0,N.paddingBottom=parseInt(a.paddingBottom,10)||0),N}function ide(c,r=!1,a){let l=a?c.getBoundingClientRect():K$(c),i=rde(c,r),m={left:l.left+i.borderLeft+i.scrollbarLeft,right:l.right-i.borderRight-i.scrollbarRight,top:l.top+i.borderTop,bottom:l.bottom-i.borderBottom-i.scrollbarBottom};return r&&(m.left+=i.paddingLeft,m.right-=i.paddingRight,m.top+=i.paddingTop,m.bottom-=i.paddingBottom),m}function K$(c){let r=c.getBoundingClientRect();return{left:r.left+window.scrollX,top:r.top+window.scrollY,right:r.right+window.scrollX,bottom:r.bottom+window.scrollY}}function ade(c){let r=Fee(c),a=c.getBoundingClientRect();for(let l of r){let i=Mee(a,l.getBoundingClientRect());if(i)a=i;else return null}return a}function Fee(c){let r=[];for(;c instanceof HTMLElement;){let a=window.getComputedStyle(c);if(a.position==="fixed")break;/(auto|scroll)/.test(a.overflow+a.overflowY+a.overflowX)&&r.push(c),c=c.parentNode}return r}class US{constructor(r,a,l,i){this.els=a;let m=this.originClientRect=r.getBoundingClientRect();l&&this.buildElHorizontals(m.left),i&&this.buildElVerticals(m.top)}buildElHorizontals(r){let a=[],l=[];for(let i of this.els){let m=i.getBoundingClientRect();a.push(m.left-r),l.push(m.right-r)}this.lefts=a,this.rights=l}buildElVerticals(r){let a=[],l=[];for(let i of this.els){let m=i.getBoundingClientRect();a.push(m.top-r),l.push(m.bottom-r)}this.tops=a,this.bottoms=l}leftToIndex(r){let{lefts:a,rights:l}=this,i=a.length,m;for(m=0;m<i;m+=1)if(r>=a[m]&&r<l[m])return m}topToIndex(r){let{tops:a,bottoms:l}=this,i=a.length,m;for(m=0;m<i;m+=1)if(r>=a[m]&&r<l[m])return m}getWidth(r){return this.rights[r]-this.lefts[r]}getHeight(r){return this.bottoms[r]-this.tops[r]}similarTo(r){return bO(this.tops||[],r.tops||[])&&bO(this.bottoms||[],r.bottoms||[])&&bO(this.lefts||[],r.lefts||[])&&bO(this.rights||[],r.rights||[])}}function bO(c,r){const a=c.length;if(a!==r.length)return!1;for(let l=0;l<a;l++)if(Math.round(c[l])!==Math.round(r[l]))return!1;return!0}class Y${getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class lde extends Y${constructor(r){super(),this.el=r}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(r){this.el.scrollTop=r}setScrollLeft(r){this.el.scrollLeft=r}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class cde extends Y${getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(r){window.scroll(window.scrollX,r)}setScrollLeft(r){window.scroll(r,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class wp extends Li{constructor(){super(...arguments),this.uid=H2()}prepareHits(){}queryHit(r,a,l,i){return null}isValidSegDownEl(r){return!this.props.eventDrag&&!this.props.eventResize&&!td(r,".fc-event-mirror")}isValidDateDownEl(r){return!td(r,".fc-event:not(.fc-bg-event)")&&!td(r,".fc-more-link")&&!td(r,"a[data-navlink]")&&!td(r,".fc-popover")}}class $ee{constructor(r=a=>a.thickness||1){this.getEntryThickness=r,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(r){let a=[];for(let l of r)this.insertEntry(l,a);return a}insertEntry(r,a){let l=this.findInsertion(r);this.isInsertionValid(l,r)?this.insertEntryAt(r,l):this.handleInvalidInsertion(l,r,a)}isInsertionValid(r,a){return(this.maxCoord===-1||r.levelCoord+this.getEntryThickness(a)<=this.maxCoord)&&(this.maxStackCnt===-1||r.stackCnt<this.maxStackCnt)}handleInvalidInsertion(r,a,l){if(this.allowReslicing&&r.touchingEntry){const i=Object.assign(Object.assign({},a),{span:Q$(a.span,r.touchingEntry.span)});l.push(i),this.splitEntry(a,r.touchingEntry,l)}else l.push(a)}splitEntry(r,a,l){let i=r.span,m=a.span;i.start<m.start&&this.insertEntry({index:r.index,thickness:r.thickness,span:{start:i.start,end:m.start}},l),i.end>m.end&&this.insertEntry({index:r.index,thickness:r.thickness,span:{start:m.end,end:i.end}},l)}insertEntryAt(r,a){let{entriesByLevel:l,levelCoords:i}=this;a.lateral===-1?(J$(i,a.level,a.levelCoord),J$(l,a.level,[r])):J$(l[a.level],a.lateral,r),this.stackCnts[Y2(r)]=a.stackCnt}findInsertion(r){let{levelCoords:a,entriesByLevel:l,strictOrder:i,stackCnts:m}=this,v=a.length,C=0,E=-1,T=-1,N=null,V=0;for(let W=0;W<v;W+=1){const K=a[W];if(!i&&K>=C+this.getEntryThickness(r))break;let Z=l[W],ce,q=eV(Z,r.span.start,X$),X=q[0]+q[1];for(;(ce=Z[X])&&ce.span.start<r.span.end;){let Ce=K+this.getEntryThickness(ce);Ce>C&&(C=Ce,N=ce,E=W,T=X),Ce===C&&(V=Math.max(V,m[Y2(ce)]+1)),X+=1}}let U=0;if(N)for(U=E+1;U<v&&a[U]<C;)U+=1;let z=-1;return U<v&&a[U]===C&&(z=eV(l[U],r.span.end,X$)[0]),{touchingLevel:E,touchingLateral:T,touchingEntry:N,stackCnt:V,levelCoord:C,level:U,lateral:z}}toRects(){let{entriesByLevel:r,levelCoords:a}=this,l=r.length,i=[];for(let m=0;m<l;m+=1){let v=r[m],C=a[m];for(let E of v)i.push(Object.assign(Object.assign({},E),{thickness:this.getEntryThickness(E),levelCoord:C}))}return i}}function X$(c){return c.span.end}function Y2(c){return c.index+":"+c.span.start}function ude(c){let r=[];for(let a of c){let l=[],i={span:a.span,entries:[a]};for(let m of r)Q$(m.span,i.span)?i={entries:m.entries.concat(i.entries),span:dde(m.span,i.span)}:l.push(m);l.push(i),r=l}return r}function dde(c,r){return{start:Math.min(c.start,r.start),end:Math.max(c.end,r.end)}}function Q$(c,r){let a=Math.max(c.start,r.start),l=Math.min(c.end,r.end);return a<l?{start:a,end:l}:null}function J$(c,r,a){c.splice(r,0,a)}function eV(c,r,a){let l=0,i=c.length;if(!i||r<a(c[l]))return[0,0];if(r>a(c[i-1]))return[i,0];for(;l<i;){let m=Math.floor(l+(i-l)/2),v=a(c[m]);if(r<v)i=m;else if(r>v)l=m+1;else return[m,1]}return[l,0]}class fde{constructor(r,a){this.emitter=new pO}destroy(){}setMirrorIsVisible(r){}setMirrorNeedsRevert(r){}setAutoScrollEnabled(r){}}const tV={};function mde(c,r){return!c||r>10?El({weekday:"short"}):r>1?El({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):El({weekday:"long"})}const Vee="fc-col-header-cell";function Hee(c){return c.text}class hde extends Li{render(){let{dateEnv:r,options:a,theme:l,viewApi:i}=this.context,{props:m}=this,{date:v,dateProfile:C}=m,E=Pee(v,m.todayRange,null,C),T=[Vee].concat(G$(E,l)),N=r.format(v,m.dayHeaderFormat),V=!E.isDisabled&&m.colCnt>1?yO(this.context,v):{},U=Object.assign(Object.assign(Object.assign({date:r.toDate(v),view:i},m.extraRenderProps),{text:N}),E);return rt(rm,{elTag:"th",elClasses:T,elAttrs:Object.assign({role:"columnheader",colSpan:m.colSpan,"data-date":E.isDisabled?void 0:S$(v)},m.extraDataAttrs),renderProps:U,generatorName:"dayHeaderContent",customGenerator:a.dayHeaderContent,defaultGenerator:Hee,classNameGenerator:a.dayHeaderClassNames,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},z=>rt("div",{className:"fc-scrollgrid-sync-inner"},!E.isDisabled&&rt(z,{elTag:"a",elAttrs:V,elClasses:["fc-col-header-cell-cushion",m.isSticky&&"fc-sticky"]})))}}const gde=El({weekday:"long"});class pde extends Li{render(){let{props:r}=this,{dateEnv:a,theme:l,viewApi:i,options:m}=this.context,v=nd(new Date(2592e5),r.dow),C={dow:r.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},E=a.format(v,r.dayHeaderFormat),T=Object.assign(Object.assign(Object.assign(Object.assign({date:v},C),{view:i}),r.extraRenderProps),{text:E});return rt(rm,{elTag:"th",elClasses:[Vee,...G$(C,l),...r.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:r.colSpan},r.extraDataAttrs),renderProps:T,generatorName:"dayHeaderContent",customGenerator:m.dayHeaderContent,defaultGenerator:Hee,classNameGenerator:m.dayHeaderClassNames,didMount:m.dayHeaderDidMount,willUnmount:m.dayHeaderWillUnmount},N=>rt("div",{className:"fc-scrollgrid-sync-inner"},rt(N,{elTag:"a",elClasses:["fc-col-header-cell-cushion",r.isSticky&&"fc-sticky"],elAttrs:{"aria-label":a.format(v,gde)}})))}}class fA extends sm{constructor(r,a){super(r,a),this.initialNowDate=uA(a.options.now,a.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:r,state:a}=this;return r.children(a.nowDate,a.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(r){r.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:r,context:a}=this,l=ey(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=a.dateEnv.startOf(l,r.unit),m=a.dateEnv.add(i,ni(1,r.unit)),v=m.valueOf()-l.valueOf();return v=Math.min(1e3*60*60*24,v),{currentState:{nowDate:i,todayRange:zee(i)},nextState:{nowDate:m,todayRange:zee(m)},waitMs:v}}setTimeout(){let{nextState:r,waitMs:a}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(r,()=>{this.setTimeout()})},a)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}fA.contextType=q1;function zee(c){let r=Oa(c),a=nd(r,1);return{start:r,end:a}}class Uee extends Li{constructor(){super(...arguments),this.createDayHeaderFormatter=Ms(vde)}render(){let{context:r}=this,{dates:a,dateProfile:l,datesRepDistinctDays:i,renderIntro:m}=this.props,v=this.createDayHeaderFormatter(r.options.dayHeaderFormat,i,a.length);return rt(fA,{unit:"day"},(C,E)=>rt("tr",{role:"row"},m&&m("day"),a.map(T=>i?rt(hde,{key:T.toISOString(),date:T,dateProfile:l,todayRange:E,colCnt:a.length,dayHeaderFormat:v}):rt(pde,{key:T.getUTCDay(),dow:T.getUTCDay(),dayHeaderFormat:v}))))}}function vde(c,r,a){return c||mde(r,a)}class Wee{constructor(r,a){let l=r.start,{end:i}=r,m=[],v=[],C=-1;for(;l<i;)a.isHiddenDay(l)?m.push(C+.5):(C+=1,m.push(C),v.push(l)),l=nd(l,1);this.dates=v,this.indices=m,this.cnt=v.length}sliceRange(r){let a=this.getDateDayIndex(r.start),l=this.getDateDayIndex(nd(r.end,-1)),i=Math.max(0,a),m=Math.min(this.cnt-1,l);return i=Math.ceil(i),m=Math.floor(m),i<=m?{firstIndex:i,lastIndex:m,isStart:a===i,isEnd:l===m}:null}getDateDayIndex(r){let{indices:a}=this,l=Math.floor(z2(this.dates[0],r));return l<0?a[0]-1:l>=a.length?a[a.length-1]+1:a[l]}}class jee{constructor(r,a){let{dates:l}=r,i,m,v;if(a){for(m=l[0].getUTCDay(),i=1;i<l.length&&l[i].getUTCDay()!==m;i+=1);v=Math.ceil(l.length/i)}else v=1,i=l.length;this.rowCnt=v,this.colCnt=i,this.daySeries=r,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let r=[];for(let a=0;a<this.rowCnt;a+=1){let l=[];for(let i=0;i<this.colCnt;i+=1)l.push(this.buildCell(a,i));r.push(l)}return r}buildCell(r,a){let l=this.daySeries.dates[r*this.colCnt+a];return{key:l.toISOString(),date:l}}buildHeaderDates(){let r=[];for(let a=0;a<this.colCnt;a+=1)r.push(this.cells[0][a].date);return r}sliceRange(r){let{colCnt:a}=this,l=this.daySeries.sliceRange(r),i=[];if(l){let{firstIndex:m,lastIndex:v}=l,C=m;for(;C<=v;){let E=Math.floor(C/a),T=Math.min((E+1)*a,v+1);i.push({row:E,firstCol:C%a,lastCol:(T-1)%a,isStart:l.isStart&&C===m,isEnd:l.isEnd&&T-1===v}),C=T}}return i}}class Gee{constructor(){this.sliceBusinessHours=Ms(this._sliceBusinessHours),this.sliceDateSelection=Ms(this._sliceDateSpan),this.sliceEventStore=Ms(this._sliceEventStore),this.sliceEventDrag=Ms(this._sliceInteraction),this.sliceEventResize=Ms(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(r,a,l,i,...m){let{eventUiBases:v}=r,C=this.sliceEventStore(r.eventStore,v,a,l,...m);return{dateSelectionSegs:this.sliceDateSelection(r.dateSelection,a,l,v,i,...m),businessHourSegs:this.sliceBusinessHours(r.businessHours,a,l,i,...m),fgEventSegs:C.fg,bgEventSegs:C.bg,eventDrag:this.sliceEventDrag(r.eventDrag,v,a,l,...m),eventResize:this.sliceEventResize(r.eventResize,v,a,l,...m),eventSelection:r.eventSelection}}sliceNowDate(r,a,l,i,...m){return this._sliceDateSpan({range:{start:r,end:ey(r,1)},allDay:!1},a,l,{},i,...m)}_sliceBusinessHours(r,a,l,i,...m){return r?this._sliceEventStore(q2(r,CO(a,!!l),i),{},a,l,...m).bg:[]}_sliceEventStore(r,a,l,i,...m){if(r){let v=Eee(r,a,CO(l,!!i),i);return{bg:this.sliceEventRanges(v.bg,m),fg:this.sliceEventRanges(v.fg,m)}}return{bg:[],fg:[]}}_sliceInteraction(r,a,l,i,...m){if(!r)return null;let v=Eee(r.mutatedEvents,a,CO(l,!!i),i);return{segs:this.sliceEventRanges(v.fg,m),affectedInstances:r.affectedEvents.instances,isEvent:r.isEvent}}_sliceDateSpan(r,a,l,i,m,...v){if(!r)return[];let C=CO(a,!!l),E=Z2(r.range,C);if(E){r=Object.assign(Object.assign({},r),{range:E});let T=Vue(r,i,m),N=this.sliceRange(r.range,...v);for(let V of N)V.eventRange=T;return N}return[]}sliceEventRanges(r,a){let l=[];for(let i of r)l.push(...this.sliceEventRange(i,a));return l}sliceEventRange(r,a){let l=r.range;this.forceDayIfListItem&&r.ui.display==="list-item"&&(l={start:l.start,end:nd(l.start,1)});let i=this.sliceRange(l,...a);for(let m of i)m.eventRange=r,m.isStart=r.isStart&&m.isStart,m.isEnd=r.isEnd&&m.isEnd;return i}}function CO(c,r){let a=c.activeRange;return r?a:{start:ey(a.start,c.slotMinTime.milliseconds),end:ey(a.end,c.slotMaxTime.milliseconds-864e5)}}function Zee(c,r,a){let{instances:l}=c.mutatedEvents;for(let i in l)if(!dO(r.validRange,l[i].range))return!1;return qee({eventDrag:c},a)}function yde(c,r,a){return dO(r.validRange,c.range)?qee({dateSelection:c},a):!1}function qee(c,r){let a=r.getCurrentData(),l=Object.assign({businessHours:a.businessHours,dateSelection:"",eventStore:a.eventStore,eventUiBases:a.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},c);return(r.pluginHooks.isPropsValid||bde)(l,r)}function bde(c,r,a={},l){return!(c.eventDrag&&!Cde(c,r,a,l)||c.dateSelection&&!_de(c,r,a,l))}function Cde(c,r,a,l){let i=r.getCurrentData(),m=c.eventDrag,v=m.mutatedEvents,C=v.defs,E=v.instances,T=vO(C,m.isEvent?c.eventUiBases:{"":i.selectionConfig});l&&(T=Z1(T,l));let N=yue(c.eventStore,m.affectedEvents.instances),V=N.defs,U=N.instances,z=vO(V,c.eventUiBases);for(let W in E){let K=E[W],Z=K.range,ce=T[K.defId],q=C[K.defId];if(!Kee(ce.constraints,Z,N,c.businessHours,r))return!1;let{eventOverlap:X}=r.options,Ce=typeof X=="function"?X:null;for(let Ne in U){let ee=U[Ne];if(I$(Z,ee.range)&&(z[ee.defId].overlap===!1&&m.isEvent||ce.overlap===!1||Ce&&!Ce(new fl(r,V[ee.defId],ee),new fl(r,q,K))))return!1}let st=i.eventStore;for(let Ne of ce.allows){let ee=Object.assign(Object.assign({},a),{range:K.range,allDay:q.allDay}),xe=st.defs[q.defId],et=st.instances[W],tt;if(xe?tt=new fl(r,xe,et):tt=new fl(r,q),!Ne(V$(ee,r),tt))return!1}}return!0}function _de(c,r,a,l){let i=c.eventStore,m=i.defs,v=i.instances,C=c.dateSelection,E=C.range,{selectionConfig:T}=r.getCurrentData();if(l&&(T=l(T)),!Kee(T.constraints,E,i,c.businessHours,r))return!1;let{selectOverlap:N}=r.options,V=typeof N=="function"?N:null;for(let U in v){let z=v[U];if(I$(E,z.range)&&(T.overlap===!1||V&&!V(new fl(r,m[z.defId],z),null)))return!1}for(let U of T.allows){let z=Object.assign(Object.assign({},a),C);if(!U(V$(z,r),null))return!1}return!0}function Kee(c,r,a,l,i){for(let m of c)if(!Sde(wde(m,r,a,l,i),r))return!1;return!0}function wde(c,r,a,l,i){return c==="businessHours"?nV(q2(l,r,i)):typeof c=="string"?nV(mO(a,m=>m.groupId===c)):typeof c=="object"&&c?nV(q2(c,r,i)):[]}function nV(c){let{instances:r}=c,a=[];for(let l in r)a.push(r[l].range);return a}function Sde(c,r){for(let a of c)if(dO(a,r))return!0;return!1}const _O=/^(visible|hidden)$/;class Ede extends Li{constructor(){super(...arguments),this.handleEl=r=>{this.el=r,K1(this.props.elRef,r)}}render(){let{props:r}=this,{liquid:a,liquidIsAbsolute:l}=r,i=a&&l,m=["fc-scroller"];return a&&(l?m.push("fc-scroller-liquid-absolute"):m.push("fc-scroller-liquid")),rt("div",{ref:this.handleEl,className:m.join(" "),style:{overflowX:r.overflowX,overflowY:r.overflowY,left:i&&-(r.overcomeLeft||0)||"",right:i&&-(r.overcomeRight||0)||"",bottom:i&&-(r.overcomeBottom||0)||"",marginLeft:!i&&-(r.overcomeLeft||0)||"",marginRight:!i&&-(r.overcomeRight||0)||"",marginBottom:!i&&-(r.overcomeBottom||0)||"",maxHeight:r.maxHeight||""}},r.children)}needsXScrolling(){if(_O.test(this.props.overflowX))return!1;let{el:r}=this,a=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:l}=r;for(let i=0;i<l.length;i+=1)if(l[i].getBoundingClientRect().width>a)return!0;return!1}needsYScrolling(){if(_O.test(this.props.overflowY))return!1;let{el:r}=this,a=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:l}=r;for(let i=0;i<l.length;i+=1)if(l[i].getBoundingClientRect().height>a)return!0;return!1}getXScrollbarWidth(){return _O.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return _O.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class X1{constructor(r){this.masterCallback=r,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(a,l)=>{let{depths:i,currentMap:m}=this,v=!1,C=!1;a!==null?(v=l in m,m[l]=a,i[l]=(i[l]||0)+1,C=!0):(i[l]-=1,i[l]||(delete m[l],delete this.callbackMap[l],v=!0)),this.masterCallback&&(v&&this.masterCallback(null,String(l)),C&&this.masterCallback(a,String(l)))}}createRef(r){let a=this.callbackMap[r];return a||(a=this.callbackMap[r]=l=>{this.handleValue(l,String(r))}),a}collect(r,a,l){return Mce(this.currentMap,r,a,l)}getAll(){return T$(this.currentMap)}}function kde(c){let r=Ble(c,".fc-scrollgrid-shrink"),a=0;for(let l of r)a=Math.max(a,qle(l));return Math.ceil(a)}function Yee(c,r){return c.liquid&&r.liquid}function xde(c,r){return r.maxHeight!=null||Yee(c,r)}function Ade(c,r,a,l){let{expandRows:i}=a;return typeof r.content=="function"?r.content(a):rt("table",{role:"presentation",className:[r.tableClassName,c.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:a.tableMinWidth,width:a.clientWidth,height:i?a.clientHeight:""}},a.tableColGroupNode,rt(l?"thead":"tbody",{role:"presentation"},typeof r.rowContent=="function"?r.rowContent(a):r.rowContent))}function Tde(c,r){return Jv(c,r,_p)}function Dde(c,r){let a=[];for(let l of c){let i=l.span||1;for(let m=0;m<i;m+=1)a.push(rt("col",{style:{width:l.width==="shrink"?Rde(r):l.width||"",minWidth:l.minWidth||""}}))}return rt("colgroup",{},...a)}function Rde(c){return c??4}function Ode(c){for(let r of c)if(r.width==="shrink")return!0;return!1}function Nde(c,r){let a=["fc-scrollgrid",r.theme.getClass("table")];return c&&a.push("fc-scrollgrid-liquid"),a}function Ide(c,r){let a=["fc-scrollgrid-section",`fc-scrollgrid-section-${c.type}`,c.className];return r&&c.liquid&&c.maxHeight==null&&a.push("fc-scrollgrid-section-liquid"),c.isSticky&&a.push("fc-scrollgrid-section-sticky"),a}function oV(c){return rt("div",{className:"fc-scrollgrid-sticky-shim",style:{width:c.clientWidth,minWidth:c.tableMinWidth}})}function wO(c){let{stickyHeaderDates:r}=c;return(r==null||r==="auto")&&(r=c.height==="auto"||c.viewHeight==="auto"),r}function Xee(c){let{stickyFooterScrollbar:r}=c;return(r==null||r==="auto")&&(r=c.height==="auto"||c.viewHeight==="auto"),r}class sV extends Li{constructor(){super(...arguments),this.processCols=Ms(r=>r,Tde),this.renderMicroColGroup=Ms(Dde),this.scrollerRefs=new X1,this.scrollerElRefs=new X1(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:r,state:a,context:l}=this,i=r.sections||[],m=this.processCols(r.cols),v=this.renderMicroColGroup(m,a.shrinkWidth),C=Nde(r.liquid,l);r.collapsibleWidth&&C.push("fc-scrollgrid-collapsible");let E=i.length,T=0,N,V=[],U=[],z=[];for(;T<E&&(N=i[T]).type==="header";)V.push(this.renderSection(N,v,!0)),T+=1;for(;T<E&&(N=i[T]).type==="body";)U.push(this.renderSection(N,v,!1)),T+=1;for(;T<E&&(N=i[T]).type==="footer";)z.push(this.renderSection(N,v,!0)),T+=1;let W=!Bee();const K={role:"rowgroup"};return rt("table",{role:"grid",className:C.join(" "),style:{height:r.height}},!!(!W&&V.length)&&rt("thead",K,...V),!!(!W&&U.length)&&rt("tbody",K,...U),!!(!W&&z.length)&&rt("tfoot",K,...z),W&&rt("tbody",K,...V,...U,...z))}renderSection(r,a,l){return"outerContent"in r?rt(Ya,{key:r.key},r.outerContent):rt("tr",{key:r.key,role:"presentation",className:Ide(r,this.props.liquid).join(" ")},this.renderChunkTd(r,a,r.chunk,l))}renderChunkTd(r,a,l,i){if("outerContent"in l)return l.outerContent;let{props:m}=this,{forceYScrollbars:v,scrollerClientWidths:C,scrollerClientHeights:E}=this.state,T=xde(m,r),N=Yee(m,r),V=m.liquid?v?"scroll":T?"auto":"hidden":"visible",U=r.key,z=Ade(r,l,{tableColGroupNode:a,tableMinWidth:"",clientWidth:!m.collapsibleWidth&&C[U]!==void 0?C[U]:null,clientHeight:E[U]!==void 0?E[U]:null,expandRows:r.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return rt(i?"th":"td",{ref:l.elRef,role:"presentation"},rt("div",{className:`fc-scroller-harness${N?" fc-scroller-harness-liquid":""}`},rt(Ede,{ref:this.scrollerRefs.createRef(U),elRef:this.scrollerElRefs.createRef(U),overflowY:V,overflowX:m.liquid?"hidden":"visible",maxHeight:r.maxHeight,liquid:N,liquidIsAbsolute:!0},z)))}_handleScrollerEl(r,a){let l=Bde(this.props.sections,a);l&&K1(l.chunk.scrollerElRef,r)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return Ode(this.props.cols)?kde(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let r=ode(),{scrollerRefs:a,scrollerElRefs:l}=this,i=!1,m={},v={};for(let C in a.currentMap){let E=a.currentMap[C];if(E&&E.needsYScrolling()){i=!0;break}}for(let C of this.props.sections){let E=C.key,T=l.currentMap[E];if(T){let N=T.parentNode;m[E]=Math.floor(N.getBoundingClientRect().width-(i?r.y:0)),v[E]=Math.floor(N.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:m,scrollerClientHeights:v}}}sV.addStateEquality({scrollerClientWidths:_p,scrollerClientHeights:_p});function Bde(c,r){for(let a of c)if(a.key===r)return a;return null}class rV extends Li{constructor(){super(...arguments),this.handleEl=r=>{this.el=r,r&&kee(r,this.props.seg)}}render(){const{props:r,context:a}=this,{options:l}=a,{seg:i}=r,{eventRange:m}=i,{ui:v}=m,C={event:new fl(a,m.def,m.instance),view:a.viewApi,timeText:r.timeText,textColor:v.textColor,backgroundColor:v.backgroundColor,borderColor:v.borderColor,isDraggable:!r.disableDragging&&Rue(i,a),isStartResizable:!r.disableResizing&&Oue(i,a),isEndResizable:!r.disableResizing&&Nue(i),isMirror:!!(r.isDragging||r.isResizing||r.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!r.isPast,isFuture:!!r.isFuture,isToday:!!r.isToday,isSelected:!!r.isSelected,isDragging:!!r.isDragging,isResizing:!!r.isResizing};return rt(rm,Object.assign({},r,{elRef:this.handleEl,elClasses:[...Iue(C),...i.eventRange.ui.classNames,...r.elClasses||[]],renderProps:C,generatorName:"eventContent",customGenerator:l.eventContent,defaultGenerator:r.defaultGenerator,classNameGenerator:l.eventClassNames,didMount:l.eventDidMount,willUnmount:l.eventWillUnmount}))}componentDidUpdate(r){this.el&&this.props.seg!==r.seg&&kee(this.el,this.props.seg)}}class Qee extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{seg:i}=r,{ui:m}=i.eventRange,v=l.eventTimeFormat||r.defaultTimeFormat,C=Tee(i,v,a,r.defaultDisplayEventTime,r.defaultDisplayEventEnd);return rt(rV,Object.assign({},r,{elTag:"a",elStyle:{borderColor:m.borderColor,backgroundColor:m.backgroundColor},elAttrs:Ree(i,a),defaultGenerator:Mde,timeText:C}),(E,T)=>rt(Ya,null,rt(E,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:T.textColor}}),!!T.isStartResizable&&rt("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!T.isEndResizable&&rt("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}function Mde(c){return rt("div",{className:"fc-event-main-frame"},c.timeText&&rt("div",{className:"fc-event-time"},c.timeText),rt("div",{className:"fc-event-title-container"},rt("div",{className:"fc-event-title fc-sticky"},c.event.title||rt(Ya,null," "))))}const iV=c=>rt(q1.Consumer,null,r=>{let{options:a}=r,l={isAxis:c.isAxis,date:r.dateEnv.toDate(c.date),view:r.viewApi};return rt(rm,Object.assign({},c,{elTag:c.elTag||"div",renderProps:l,generatorName:"nowIndicatorContent",customGenerator:a.nowIndicatorContent,classNameGenerator:a.nowIndicatorClassNames,didMount:a.nowIndicatorDidMount,willUnmount:a.nowIndicatorWillUnmount}))}),Pde=El({day:"numeric"});class aV extends Li{constructor(){super(...arguments),this.refineRenderProps=oO(Lde)}render(){let{props:r,context:a}=this,{options:l}=a,i=this.refineRenderProps({date:r.date,dateProfile:r.dateProfile,todayRange:r.todayRange,isMonthStart:r.isMonthStart||!1,showDayNumber:r.showDayNumber,extraRenderProps:r.extraRenderProps,viewApi:a.viewApi,dateEnv:a.dateEnv,monthStartFormat:l.monthStartFormat});return rt(rm,Object.assign({},r,{elClasses:[...G$(i,a.theme),...r.elClasses||[]],elAttrs:Object.assign(Object.assign({},r.elAttrs),i.isDisabled?{}:{"data-date":S$(r.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:l.dayCellContent,defaultGenerator:r.defaultGenerator,classNameGenerator:i.isDisabled?void 0:l.dayCellClassNames,didMount:l.dayCellDidMount,willUnmount:l.dayCellWillUnmount}))}}function lV(c){return!!(c.dayCellContent||N$("dayCellContent",c))}function Lde(c){let{date:r,dateEnv:a,dateProfile:l,isMonthStart:i}=c,m=Pee(r,c.todayRange,null,l),v=c.showDayNumber?a.format(r,i?c.monthStartFormat:Pde):"";return Object.assign(Object.assign(Object.assign({date:a.toDate(r),view:c.viewApi},m),{isMonthStart:i,dayNumberText:v}),c.extraRenderProps)}class Jee extends Li{render(){let{props:r}=this,{seg:a}=r;return rt(rV,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:a.eventRange.ui.backgroundColor},defaultGenerator:Fde,seg:a,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:r.isPast,isFuture:r.isFuture,isToday:r.isToday,disableDragging:!0,disableResizing:!0})}}function Fde(c){let{title:r}=c.event;return r&&rt("div",{className:"fc-event-title"},c.event.title)}function ete(c){return rt("div",{className:`fc-${c}`})}const tte=c=>rt(q1.Consumer,null,r=>{let{dateEnv:a,options:l}=r,{date:i}=c,m=l.weekNumberFormat||c.defaultFormat,v=a.computeWeekNumber(i),C=a.format(i,m);return rt(rm,Object.assign({},c,{renderProps:{num:v,text:C,date:i},generatorName:"weekNumberContent",customGenerator:l.weekNumberContent,defaultGenerator:$de,classNameGenerator:l.weekNumberClassNames,didMount:l.weekNumberDidMount,willUnmount:l.weekNumberWillUnmount}))});function $de(c){return c.text}const cV=10;class Vde extends Li{constructor(){super(...arguments),this.state={titleId:JR()},this.handleRootEl=r=>{this.rootEl=r,this.props.elRef&&K1(this.props.elRef,r)},this.handleDocumentMouseDown=r=>{const a=BJ(r);this.rootEl.contains(a)||this.handleCloseClick()},this.handleDocumentKeyDown=r=>{r.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:r}=this.props;r&&r()}}render(){let{theme:r,options:a}=this.context,{props:l,state:i}=this,m=["fc-popover",r.getClass("popover")].concat(l.extraClassNames||[]);return Cle(rt("div",Object.assign({},l.extraAttrs,{id:l.id,className:m.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),rt("div",{className:"fc-popover-header "+r.getClass("popoverHeader")},rt("span",{className:"fc-popover-title",id:i.titleId},l.title),rt("span",{className:"fc-popover-close "+r.getIconClass("close"),title:a.closeHint,onClick:this.handleCloseClick})),rt("div",{className:"fc-popover-body "+r.getClass("popoverContent")},l.children)),l.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:r}=this.context,{alignmentEl:a,alignGridTop:l}=this.props,{rootEl:i}=this,m=ade(a);if(m){let v=i.getBoundingClientRect(),C=l?td(a,".fc-scrollgrid").getBoundingClientRect().top:m.top,E=r?m.right-v.width:m.left;C=Math.max(C,cV),E=Math.min(E,document.documentElement.clientWidth-cV-v.width),E=Math.max(E,cV);let T=i.offsetParent.getBoundingClientRect();iA(i,{top:C-T.top,left:E-T.left})}}}class Hde extends wp{constructor(){super(...arguments),this.handleRootEl=r=>{this.rootEl=r,r?this.context.registerInteractiveComponent(this,{el:r,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:r,dateEnv:a}=this.context,{props:l}=this,{startDate:i,todayRange:m,dateProfile:v}=l,C=a.format(i,r.dayPopoverFormat);return rt(aV,{elRef:this.handleRootEl,date:i,dateProfile:v,todayRange:m},(E,T,N)=>rt(Vde,{elRef:N.ref,id:l.id,title:C,extraClassNames:["fc-more-popover"].concat(N.className||[]),extraAttrs:N,parentEl:l.parentEl,alignmentEl:l.alignmentEl,alignGridTop:l.alignGridTop,onClose:l.onClose},lV(r)&&rt(E,{elTag:"div",elClasses:["fc-more-popover-misc"]}),l.children))}queryHit(r,a,l,i){let{rootEl:m,props:v}=this;return r>=0&&r<l&&a>=0&&a<i?{dateProfile:v.dateProfile,dateSpan:Object.assign({allDay:!v.forceTimed,range:{start:v.startDate,end:v.endDate}},v.extraDateSpan),dayEl:m,rect:{left:0,top:0,right:l,bottom:i},layer:1}:null}}class nte extends Li{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:JR()},this.handleLinkEl=r=>{this.linkEl=r,this.props.elRef&&K1(this.props.elRef,r)},this.handleClick=r=>{let{props:a,context:l}=this,{moreLinkClick:i}=l.options,m=ote(a).start;function v(C){let{def:E,instance:T,range:N}=C.eventRange;return{event:new fl(l,E,T),start:l.dateEnv.toDate(N.start),end:l.dateEnv.toDate(N.end),isStart:C.isStart,isEnd:C.isEnd}}typeof i=="function"&&(i=i({date:m,allDay:!!a.allDayDate,allSegs:a.allSegs.map(v),hiddenSegs:a.hiddenSegs.map(v),jsEvent:r,view:l.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&l.calendarApi.zoomTo(m,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:r,state:a}=this;return rt(q1.Consumer,null,l=>{let{viewApi:i,options:m,calendarApi:v}=l,{moreLinkText:C}=m,{moreCnt:E}=r,T=ote(r),N=typeof C=="function"?C.call(v,E):`+${E} ${C}`,V=aA(m.moreLinkHint,[E],N),U={num:E,shortText:`+${E}`,text:N,view:i};return rt(Ya,null,!!r.moreCnt&&rt(rm,{elTag:r.elTag||"a",elRef:this.handleLinkEl,elClasses:[...r.elClasses||[],"fc-more-link"],elStyle:r.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},r.elAttrs),FJ(this.handleClick)),{title:V,"aria-expanded":a.isPopoverOpen,"aria-controls":a.isPopoverOpen?a.popoverId:""}),renderProps:U,generatorName:"moreLinkContent",customGenerator:m.moreLinkContent,defaultGenerator:r.defaultGenerator||zde,classNameGenerator:m.moreLinkClassNames,didMount:m.moreLinkDidMount,willUnmount:m.moreLinkWillUnmount},r.children),a.isPopoverOpen&&rt(Hde,{id:a.popoverId,startDate:T.start,endDate:T.end,dateProfile:r.dateProfile,todayRange:r.todayRange,extraDateSpan:r.extraDateSpan,parentEl:this.parentEl,alignmentEl:r.alignmentElRef?r.alignmentElRef.current:this.linkEl,alignGridTop:r.alignGridTop,forceTimed:r.forceTimed,onClose:this.handlePopoverClose},r.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=td(this.linkEl,".fc-view-harness"))}}function zde(c){return c.text}function ote(c){if(c.allDayDate)return{start:c.allDayDate,end:nd(c.allDayDate,1)};let{hiddenSegs:r}=c;return{start:ste(r),end:Wde(r)}}function ste(c){return c.reduce(Ude).eventRange.range.start}function Ude(c,r){return c.eventRange.range.start<r.eventRange.range.start?c:r}function Wde(c){return c.reduce(jde).eventRange.range.end}function jde(c,r){return c.eventRange.range.end>r.eventRange.range.end?c:r}class Gde{constructor(){this.handlers=[]}set(r){this.currentValue=r;for(let a of this.handlers)a(r)}subscribe(r){this.handlers.push(r),this.currentValue!==void 0&&r(this.currentValue)}}class Zde extends Gde{constructor(){super(...arguments),this.map=new Map}handle(r){const{map:a}=this;let l=!1;r.isActive?(a.set(r.id,r),l=!0):a.has(r.id)&&(a.delete(r.id),l=!0),l&&this.set(a)}}const qde=[],rte={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},ite=Object.assign(Object.assign({},rte),{buttonHints:{prev:"Previous $0",next:"Next $0",today(c,r){return r==="day"?"Today":`This ${c}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(c){return`Show ${c} more event${c===1?"":"s"}`}});function Kde(c){let r=c.length>0?c[0].code:"en",a=qde.concat(c),l={en:ite};for(let i of a)l[i.code]=i;return{map:l,defaultCode:r}}function ate(c,r){return typeof c=="object"&&!Array.isArray(c)?lte(c.code,[c.code],c):Yde(c,r)}function Yde(c,r){let a=[].concat(c||[]),l=Xde(a,r)||ite;return lte(c,a,l)}function Xde(c,r){for(let a=0;a<c.length;a+=1){let l=c[a].toLocaleLowerCase().split("-");for(let i=l.length;i>0;i-=1){let m=l.slice(0,i).join("-");if(r[m])return r[m]}}return null}function lte(c,r,a){let l=A$([rte,a],["buttonText"]);delete l.code;let{week:i}=l;return delete l.week,{codeArg:c,codes:r,week:i,simpleNumberFormat:new Intl.NumberFormat(c),options:l}}function Q1(c){return{id:H2(),name:c.name,premiumReleaseDate:c.premiumReleaseDate?new Date(c.premiumReleaseDate):void 0,deps:c.deps||[],reducers:c.reducers||[],isLoadingFuncs:c.isLoadingFuncs||[],contextInit:[].concat(c.contextInit||[]),eventRefiners:c.eventRefiners||{},eventDefMemberAdders:c.eventDefMemberAdders||[],eventSourceRefiners:c.eventSourceRefiners||{},isDraggableTransformers:c.isDraggableTransformers||[],eventDragMutationMassagers:c.eventDragMutationMassagers||[],eventDefMutationAppliers:c.eventDefMutationAppliers||[],dateSelectionTransformers:c.dateSelectionTransformers||[],datePointTransforms:c.datePointTransforms||[],dateSpanTransforms:c.dateSpanTransforms||[],views:c.views||{},viewPropsTransformers:c.viewPropsTransformers||[],isPropsValid:c.isPropsValid||null,externalDefTransforms:c.externalDefTransforms||[],viewContainerAppends:c.viewContainerAppends||[],eventDropTransformers:c.eventDropTransformers||[],componentInteractions:c.componentInteractions||[],calendarInteractions:c.calendarInteractions||[],themeClasses:c.themeClasses||{},eventSourceDefs:c.eventSourceDefs||[],cmdFormatter:c.cmdFormatter,recurringTypes:c.recurringTypes||[],namedTimeZonedImpl:c.namedTimeZonedImpl,initialView:c.initialView||"",elementDraggingImpl:c.elementDraggingImpl,optionChangeHandlers:c.optionChangeHandlers||{},scrollGridImpl:c.scrollGridImpl||null,listenerRefiners:c.listenerRefiners||{},optionRefiners:c.optionRefiners||{},propSetHandlers:c.propSetHandlers||{}}}function Qde(c,r){let a={},l={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(m){for(let v of m){const C=v.name,E=a[C];E===void 0?(a[C]=v.id,i(v.deps),l=efe(l,v)):E!==v.id&&console.warn(`Duplicate plugin '${C}'`)}}return c&&i(c),i(r),l}function Jde(){let c=[],r=[],a;return(l,i)=>((!a||!Jv(l,c)||!Jv(i,r))&&(a=Qde(l,i)),c=l,r=i,a)}function efe(c,r){return{premiumReleaseDate:tfe(c.premiumReleaseDate,r.premiumReleaseDate),reducers:c.reducers.concat(r.reducers),isLoadingFuncs:c.isLoadingFuncs.concat(r.isLoadingFuncs),contextInit:c.contextInit.concat(r.contextInit),eventRefiners:Object.assign(Object.assign({},c.eventRefiners),r.eventRefiners),eventDefMemberAdders:c.eventDefMemberAdders.concat(r.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},c.eventSourceRefiners),r.eventSourceRefiners),isDraggableTransformers:c.isDraggableTransformers.concat(r.isDraggableTransformers),eventDragMutationMassagers:c.eventDragMutationMassagers.concat(r.eventDragMutationMassagers),eventDefMutationAppliers:c.eventDefMutationAppliers.concat(r.eventDefMutationAppliers),dateSelectionTransformers:c.dateSelectionTransformers.concat(r.dateSelectionTransformers),datePointTransforms:c.datePointTransforms.concat(r.datePointTransforms),dateSpanTransforms:c.dateSpanTransforms.concat(r.dateSpanTransforms),views:Object.assign(Object.assign({},c.views),r.views),viewPropsTransformers:c.viewPropsTransformers.concat(r.viewPropsTransformers),isPropsValid:r.isPropsValid||c.isPropsValid,externalDefTransforms:c.externalDefTransforms.concat(r.externalDefTransforms),viewContainerAppends:c.viewContainerAppends.concat(r.viewContainerAppends),eventDropTransformers:c.eventDropTransformers.concat(r.eventDropTransformers),calendarInteractions:c.calendarInteractions.concat(r.calendarInteractions),componentInteractions:c.componentInteractions.concat(r.componentInteractions),themeClasses:Object.assign(Object.assign({},c.themeClasses),r.themeClasses),eventSourceDefs:c.eventSourceDefs.concat(r.eventSourceDefs),cmdFormatter:r.cmdFormatter||c.cmdFormatter,recurringTypes:c.recurringTypes.concat(r.recurringTypes),namedTimeZonedImpl:r.namedTimeZonedImpl||c.namedTimeZonedImpl,initialView:c.initialView||r.initialView,elementDraggingImpl:c.elementDraggingImpl||r.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},c.optionChangeHandlers),r.optionChangeHandlers),scrollGridImpl:r.scrollGridImpl||c.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},c.listenerRefiners),r.listenerRefiners),optionRefiners:Object.assign(Object.assign({},c.optionRefiners),r.optionRefiners),propSetHandlers:Object.assign(Object.assign({},c.propSetHandlers),r.propSetHandlers)}}function tfe(c,r){return c===void 0?r:r===void 0?c:new Date(Math.max(c.valueOf(),r.valueOf()))}class sy extends cA{}sy.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},sy.prototype.baseIconClass="fc-icon",sy.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},sy.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},sy.prototype.iconOverrideOption="buttonIcons",sy.prototype.iconOverrideCustomButtonOption="icon",sy.prototype.iconOverridePrefix="fc-icon-";function nfe(c,r){let a={},l;for(l in c)uV(l,a,c,r);for(l in r)uV(l,a,c,r);return a}function uV(c,r,a,l){if(r[c])return r[c];let i=ofe(c,r,a,l);return i&&(r[c]=i),i}function ofe(c,r,a,l){let i=a[c],m=l[c],v=N=>i&&i[N]!==null?i[N]:m&&m[N]!==null?m[N]:null,C=v("component"),E=v("superType"),T=null;if(E){if(E===c)throw new Error("Can't have a custom view type that references itself");T=uV(E,r,a,l)}return!C&&T&&(C=T.component),C?{type:c,component:C,defaults:Object.assign(Object.assign({},T?T.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},T?T.overrides:{}),m?m.rawOptions:{})}:null}function cte(c){return Z1(c,sfe)}function sfe(c){let r=typeof c=="function"?{component:c}:c,{component:a}=r;return r.content?a=ute(r):a&&!(a.prototype instanceof Li)&&(a=ute(Object.assign(Object.assign({},r),{content:a}))),{superType:r.type,component:a,rawOptions:r}}function ute(c){return r=>rt(q1.Consumer,null,a=>rt(rm,{elTag:"div",elClasses:ree(a.viewSpec),renderProps:Object.assign(Object.assign({},r),{nextDayThreshold:a.options.nextDayThreshold}),generatorName:void 0,customGenerator:c.content,classNameGenerator:c.classNames,didMount:c.didMount,willUnmount:c.willUnmount}))}function rfe(c,r,a,l){let i=cte(c),m=cte(r.views),v=nfe(i,m);return Z1(v,C=>ife(C,m,r,a,l))}function ife(c,r,a,l,i){let m=c.overrides.duration||c.defaults.duration||l.duration||a.duration,v=null,C="",E="",T={};if(m&&(v=afe(m),v)){let U=_$(v);C=U.unit,U.value===1&&(E=C,T=r[C]?r[C].rawOptions:{})}let N=U=>{let z=U.buttonText||{},W=c.defaults.buttonTextKey;return W!=null&&z[W]!=null?z[W]:z[c.type]!=null?z[c.type]:z[E]!=null?z[E]:null},V=U=>{let z=U.buttonHints||{},W=c.defaults.buttonTextKey;return W!=null&&z[W]!=null?z[W]:z[c.type]!=null?z[c.type]:z[E]!=null?z[E]:null};return{type:c.type,component:c.component,duration:v,durationUnit:C,singleUnit:E,optionDefaults:c.defaults,optionOverrides:Object.assign(Object.assign({},T),c.overrides),buttonTextOverride:N(l)||N(a)||c.overrides.buttonText,buttonTextDefault:N(i)||c.defaults.buttonText||N(lA)||c.type,buttonTitleOverride:V(l)||V(a)||c.overrides.buttonHint,buttonTitleDefault:V(i)||c.defaults.buttonHint||V(lA)}}let dte={};function afe(c){let r=JSON.stringify(c),a=dte[r];return a===void 0&&(a=ni(c),dte[r]=a),a}function lfe(c,r){switch(r.type){case"CHANGE_VIEW_TYPE":c=r.viewType}return c}function cfe(c,r){switch(r.type){case"SET_OPTION":return Object.assign(Object.assign({},c),{[r.optionName]:r.rawOptionValue});default:return c}}function ufe(c,r,a,l){let i;switch(r.type){case"CHANGE_VIEW_TYPE":return l.build(r.dateMarker||a);case"CHANGE_DATE":return l.build(r.dateMarker);case"PREV":if(i=l.buildPrev(c,a),i.isValid)return i;break;case"NEXT":if(i=l.buildNext(c,a),i.isValid)return i;break}return c}function dfe(c,r,a){let l=r?r.activeRange:null;return mte({},yfe(c,a),l,a)}function ffe(c,r,a,l){let i=a?a.activeRange:null;switch(r.type){case"ADD_EVENT_SOURCES":return mte(c,r.sources,i,l);case"REMOVE_EVENT_SOURCE":return hfe(c,r.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return a?hte(c,i,l):c;case"FETCH_EVENT_SOURCES":return dV(c,r.sourceIds?eee(r.sourceIds):gte(c,l),i,r.isRefetch||!1,l);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return vfe(c,r.sourceId,r.fetchId,r.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return c}}function mfe(c,r,a){let l=r?r.activeRange:null;return dV(c,gte(c,a),l,!0,a)}function fte(c){for(let r in c)if(c[r].isFetching)return!0;return!1}function mte(c,r,a,l){let i={};for(let m of r)i[m.sourceId]=m;return a&&(i=hte(i,a,l)),Object.assign(Object.assign({},c),i)}function hfe(c,r){return j2(c,a=>a.sourceId!==r)}function hte(c,r,a){return dV(c,j2(c,l=>gfe(l,r,a)),r,!1,a)}function gfe(c,r,a){return pte(c,a)?!a.options.lazyFetching||!c.fetchRange||c.isFetching||r.start<c.fetchRange.start||r.end>c.fetchRange.end:!c.latestFetchId}function dV(c,r,a,l,i){let m={};for(let v in c){let C=c[v];r[v]?m[v]=pfe(C,a,l,i):m[v]=C}return m}function pfe(c,r,a,l){let{options:i,calendarApi:m}=l,v=l.pluginHooks.eventSourceDefs[c.sourceDefId],C=H2();return v.fetch({eventSource:c,range:r,isRefetch:a,context:l},E=>{let{rawEvents:T}=E;i.eventSourceSuccess&&(T=i.eventSourceSuccess.call(m,T,E.response)||T),c.success&&(T=c.success.call(m,T,E.response)||T),l.dispatch({type:"RECEIVE_EVENTS",sourceId:c.sourceId,fetchId:C,fetchRange:r,rawEvents:T})},E=>{let T=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(m,E),T=!0),c.failure&&(c.failure(E),T=!0),T||console.warn(E.message,E),l.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:c.sourceId,fetchId:C,fetchRange:r,error:E})}),Object.assign(Object.assign({},c),{isFetching:!0,latestFetchId:C})}function vfe(c,r,a,l){let i=c[r];return i&&a===i.latestFetchId?Object.assign(Object.assign({},c),{[r]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:l})}):c}function gte(c,r){return j2(c,a=>pte(a,r))}function yfe(c,r){let a=pee(r),l=[].concat(c.eventSources||[]),i=[];c.initialEvents&&l.unshift(c.initialEvents),c.events&&l.unshift(c.events);for(let m of l){let v=gee(m,r,a);v&&i.push(v)}return i}function pte(c,r){return!r.pluginHooks.eventSourceDefs[c.sourceDefId].ignoreRange}function bfe(c,r){switch(r.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return r.selection;default:return c}}function Cfe(c,r){switch(r.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return r.eventInstanceId;default:return c}}function _fe(c,r){let a;switch(r.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return a=r.state,{affectedEvents:a.affectedEvents,mutatedEvents:a.mutatedEvents,isEvent:a.isEvent};default:return c}}function wfe(c,r){let a;switch(r.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return a=r.state,{affectedEvents:a.affectedEvents,mutatedEvents:a.mutatedEvents,isEvent:a.isEvent};default:return c}}function Sfe(c,r,a,l,i){let m=c.headerToolbar?vte(c.headerToolbar,c,r,a,l,i):null,v=c.footerToolbar?vte(c.footerToolbar,c,r,a,l,i):null;return{header:m,footer:v}}function vte(c,r,a,l,i,m){let v={},C=[],E=!1;for(let T in c){let N=c[T],V=Efe(N,r,a,l,i,m);v[T]=V.widgets,C.push(...V.viewsWithButtons),E=E||V.hasTitle}return{sectionWidgets:v,viewsWithButtons:C,hasTitle:E}}function Efe(c,r,a,l,i,m){let v=r.direction==="rtl",C=r.customButtons||{},E=a.buttonText||{},T=r.buttonText||{},N=a.buttonHints||{},V=r.buttonHints||{},U=c?c.split(" "):[],z=[],W=!1;return{widgets:U.map(Z=>Z.split(",").map(ce=>{if(ce==="title")return W=!0,{buttonName:ce};let q,X,Ce,st,Ne,ee;if(q=C[ce])Ce=xe=>{q.click&&q.click.call(xe.target,xe,xe.target)},(st=l.getCustomButtonIconClass(q))||(st=l.getIconClass(ce,v))||(Ne=q.text),ee=q.hint||q.text;else if(X=i[ce]){z.push(ce),Ce=()=>{m.changeView(ce)},(Ne=X.buttonTextOverride)||(st=l.getIconClass(ce,v))||(Ne=X.buttonTextDefault);let xe=X.buttonTextOverride||X.buttonTextDefault;ee=aA(X.buttonTitleOverride||X.buttonTitleDefault||r.viewHint,[xe,ce],xe)}else if(m[ce])if(Ce=()=>{m[ce]()},(Ne=E[ce])||(st=l.getIconClass(ce,v))||(Ne=T[ce]),ce==="prevYear"||ce==="nextYear"){let xe=ce==="prevYear"?"prev":"next";ee=aA(N[xe]||V[xe],[T.year||"year","year"],T[ce])}else ee=xe=>aA(N[ce]||V[ce],[T[xe]||xe,xe],T[ce]);return{buttonName:ce,buttonClick:Ce,buttonIcon:st,buttonText:Ne,buttonHint:ee}})),viewsWithButtons:z,hasTitle:W}}class kfe{constructor(r,a,l){this.type=r,this.getCurrentData=a,this.dateEnv=l}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(r){return this.getCurrentData().options[r]}}const xfe=Q1({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(c){return Array.isArray(c.events)?c.events:null},fetch(c,r){r({rawEvents:c.eventSource.meta})}}]}),Afe=Q1({name:"func-event-source",eventSourceDefs:[{parseMeta(c){return typeof c.events=="function"?c.events:null},fetch(c,r,a){const{dateEnv:l}=c.context,i=c.eventSource.meta;Hue(i.bind(null,Oee(c.range,l)),m=>r({rawEvents:m}),a)}}]}),Tfe=Q1({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:Zt,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(c){return c.url&&(c.format==="json"||!c.format)?{url:c.url,format:"json",method:(c.method||"GET").toUpperCase(),extraParams:c.extraParams,startParam:c.startParam,endParam:c.endParam,timeZoneParam:c.timeZoneParam}:null},fetch(c,r,a){const{meta:l}=c.eventSource,i=Dfe(l,c.range,c.context);zue(l.method,l.url,i).then(([m,v])=>{r({rawEvents:m,response:v})},a)}}]});function Dfe(c,r,a){let{dateEnv:l,options:i}=a,m,v,C,E,T={};return m=c.startParam,m==null&&(m=i.startParam),v=c.endParam,v==null&&(v=i.endParam),C=c.timeZoneParam,C==null&&(C=i.timeZoneParam),typeof c.extraParams=="function"?E=c.extraParams():E=c.extraParams||{},Object.assign(T,E),T[m]=l.formatIso(r.start),T[v]=l.formatIso(r.end),l.timeZone!=="local"&&(T[C]=l.timeZone),T}const Rfe=Q1({name:"simple-recurring-event",recurringTypes:[{parse(c,r){if(c.daysOfWeek||c.startTime||c.endTime||c.startRecur||c.endRecur){let a={daysOfWeek:c.daysOfWeek||null,startTime:c.startTime||null,endTime:c.endTime||null,startRecur:c.startRecur?r.createMarker(c.startRecur):null,endRecur:c.endRecur?r.createMarker(c.endRecur):null},l;return c.duration&&(l=c.duration),!l&&c.startTime&&c.endTime&&(l=Qle(c.endTime,c.startTime)),{allDayGuess:!c.startTime&&!c.endTime,duration:l,typeData:a}}return null},expand(c,r,a){let l=Z2(r,{start:c.startRecur,end:c.endRecur});return l?Ofe(c.daysOfWeek,c.startTime,l,a):[]}}],eventRefiners:{daysOfWeek:Zt,startTime:ni,endTime:ni,duration:ni,startRecur:Zt,endRecur:Zt}});function Ofe(c,r,a,l){let i=c?eee(c):null,m=Oa(a.start),v=a.end,C=[];for(;m<v;){let E;(!i||i[m.getUTCDay()])&&(r?E=l.add(m,r):E=m,C.push(E)),m=nd(m,1)}return C}const Nfe=Q1({name:"change-handler",optionChangeHandlers:{events(c,r){yte([c],r)},eventSources:yte}});function yte(c,r){let a=T$(r.getCurrentData().eventSources);if(a.length===1&&c.length===1&&Array.isArray(a[0]._raw)&&Array.isArray(c[0])){r.dispatch({type:"RESET_RAW_EVENTS",sourceId:a[0].sourceId,rawEvents:c[0]});return}let l=[];for(let i of c){let m=!1;for(let v=0;v<a.length;v+=1)if(a[v]._raw===i){a.splice(v,1),m=!0;break}m||l.push(i)}for(let i of a)r.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of l)r.calendarApi.addEventSource(i)}function Ife(c,r){r.emitter.trigger("datesSet",Object.assign(Object.assign({},Oee(c.activeRange,r.dateEnv)),{view:r.viewApi}))}function Bfe(c,r){let{emitter:a}=r;a.hasHandlers("eventsSet")&&a.trigger("eventsSet",K2(c,r))}const Mfe=[xfe,Afe,Tfe,Rfe,Nfe,Q1({name:"misc",isLoadingFuncs:[c=>fte(c.eventSources)],propSetHandlers:{dateProfile:Ife,eventStore:Bfe}})];class Pfe{constructor(r,a){this.runTaskOption=r,this.drainedOption=a,this.queue=[],this.delayedRunner=new g$(this.drain.bind(this))}request(r,a){this.queue.push(r),this.delayedRunner.request(a)}pause(r){this.delayedRunner.pause(r)}resume(r,a){this.delayedRunner.resume(r,a)}drain(){let{queue:r}=this;for(;r.length;){let a=[],l;for(;l=r.shift();)this.runTask(l),a.push(l);this.drained(a)}}runTask(r){this.runTaskOption&&this.runTaskOption(r)}drained(r){this.drainedOption&&this.drainedOption(r)}}function Lfe(c,r,a){let l;return/^(year|month)$/.test(c.currentRangeUnit)?l=c.currentRange:l=c.activeRange,a.formatRange(l.start,l.end,El(r.titleFormat||Ffe(c)),{isEndExclusive:c.isRangeAllDay,defaultSeparator:r.titleRangeSeparator})}function Ffe(c){let{currentRangeUnit:r}=c;if(r==="year")return{year:"numeric"};if(r==="month")return{year:"numeric",month:"long"};let a=nO(c.currentRange.start,c.currentRange.end);return a!==null&&a>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class $fe{constructor(r){this.computeCurrentViewData=Ms(this._computeCurrentViewData),this.organizeRawLocales=Ms(Kde),this.buildLocale=Ms(ate),this.buildPluginHooks=Jde(),this.buildDateEnv=Ms(Vfe),this.buildTheme=Ms(Hfe),this.parseToolbars=Ms(Sfe),this.buildViewSpecs=Ms(rfe),this.buildDateProfileGenerator=oO(zfe),this.buildViewApi=Ms(Ufe),this.buildViewUiProps=oO(Gfe),this.buildEventUiBySource=Ms(Wfe,_p),this.buildEventUiBases=Ms(jfe),this.parseContextBusinessHours=oO(Zfe),this.buildTitle=Ms(Lfe),this.emitter=new pO,this.actionRunner=new Pfe(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=U=>{this.actionRunner.request(U)},this.props=r,this.actionRunner.pause();let a={},l=this.computeOptionsData(r.optionOverrides,a,r.calendarApi),i=l.calendarOptions.initialView||l.pluginHooks.initialView,m=this.computeCurrentViewData(i,l,r.optionOverrides,a);r.calendarApi.currentDataManager=this,this.emitter.setThisContext(r.calendarApi),this.emitter.setOptions(m.options);let v=tue(l.calendarOptions,l.dateEnv),C=m.dateProfileGenerator.build(v);Y1(C.activeRange,v)||(v=C.currentRange.start);let E={dateEnv:l.dateEnv,options:l.calendarOptions,pluginHooks:l.pluginHooks,calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let U of l.pluginHooks.contextInit)U(E);let T=dfe(l.calendarOptions,C,E),N={dynamicOptionOverrides:a,currentViewType:i,currentDate:v,dateProfile:C,businessHours:this.parseContextBusinessHours(E),eventSources:T,eventUiBases:{},eventStore:im(),renderableEventStore:im(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(E).selectionConfig},V=Object.assign(Object.assign({},E),N);for(let U of l.pluginHooks.reducers)Object.assign(N,U(null,null,V));fV(N,E)&&this.emitter.trigger("loading",!0),this.state=N,this.updateData(),this.actionRunner.resume()}resetOptions(r,a){let{props:l}=this;a===void 0?l.optionOverrides=r:(l.optionOverrides=Object.assign(Object.assign({},l.optionOverrides||{}),r),this.optionsForRefining.push(...a)),(a===void 0||a.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(r){let{props:a,state:l,emitter:i}=this,m=cfe(l.dynamicOptionOverrides,r),v=this.computeOptionsData(a.optionOverrides,m,a.calendarApi),C=lfe(l.currentViewType,r),E=this.computeCurrentViewData(C,v,a.optionOverrides,m);a.calendarApi.currentDataManager=this,i.setThisContext(a.calendarApi),i.setOptions(E.options);let T={dateEnv:v.dateEnv,options:v.calendarOptions,pluginHooks:v.pluginHooks,calendarApi:a.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:N,dateProfile:V}=l;this.data&&this.data.dateProfileGenerator!==E.dateProfileGenerator&&(V=E.dateProfileGenerator.build(N)),N=eue(N,r),V=ufe(V,r,N,E.dateProfileGenerator),(r.type==="PREV"||r.type==="NEXT"||!Y1(V.currentRange,N))&&(N=V.currentRange.start);let U=ffe(l.eventSources,r,V,T),z=hue(l.eventStore,r,U,V,T),K=fte(U)&&!E.options.progressiveEventRendering&&l.renderableEventStore||z,{eventUiSingleBase:Z,selectionConfig:ce}=this.buildViewUiProps(T),q=this.buildEventUiBySource(U),X=this.buildEventUiBases(K.defs,Z,q),Ce={dynamicOptionOverrides:m,currentViewType:C,currentDate:N,dateProfile:V,eventSources:U,eventStore:z,renderableEventStore:K,selectionConfig:ce,eventUiBases:X,businessHours:this.parseContextBusinessHours(T),dateSelection:bfe(l.dateSelection,r),eventSelection:Cfe(l.eventSelection,r),eventDrag:_fe(l.eventDrag,r),eventResize:wfe(l.eventResize,r)},st=Object.assign(Object.assign({},T),Ce);for(let xe of v.pluginHooks.reducers)Object.assign(Ce,xe(l,r,st));let Ne=fV(l,T),ee=fV(Ce,T);!Ne&&ee?i.trigger("loading",!0):Ne&&!ee&&i.trigger("loading",!1),this.state=Ce,a.onAction&&a.onAction(r)}updateData(){let{props:r,state:a}=this,l=this.data,i=this.computeOptionsData(r.optionOverrides,a.dynamicOptionOverrides,r.calendarApi),m=this.computeCurrentViewData(a.currentViewType,i,r.optionOverrides,a.dynamicOptionOverrides),v=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(a.dateProfile,m.options,i.dateEnv),calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),m),a),C=i.pluginHooks.optionChangeHandlers,E=l&&l.calendarOptions,T=i.calendarOptions;if(E&&E!==T){E.timeZone!==T.timeZone&&(a.eventSources=v.eventSources=mfe(v.eventSources,a.dateProfile,v),a.eventStore=v.eventStore=bee(v.eventStore,l.dateEnv,v.dateEnv),a.renderableEventStore=v.renderableEventStore=bee(v.renderableEventStore,l.dateEnv,v.dateEnv));for(let N in C)(this.optionsForHandling.indexOf(N)!==-1||E[N]!==T[N])&&C[N](T[N],v)}this.optionsForHandling=[],r.onData&&r.onData(v)}computeOptionsData(r,a,l){if(!this.optionsForRefining.length&&r===this.stableOptionOverrides&&a===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:m,localeDefaults:v,availableLocaleData:C,extra:E}=this.processRawCalendarOptions(r,a);bte(E);let T=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,m,C,i.defaultRangeSeparator),N=this.buildViewSpecs(m.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,v),V=this.buildTheme(i,m),U=this.parseToolbars(i,this.stableOptionOverrides,V,N,l);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:m,dateEnv:T,viewSpecs:N,theme:V,toolbarConfig:U,localeDefaults:v,availableRawLocales:C.map}}processRawCalendarOptions(r,a){let{locales:l,locale:i}=k$([lA,r,a]),m=this.organizeRawLocales(l),v=m.map,C=this.buildLocale(i||m.defaultCode,v).options,E=this.buildPluginHooks(r.plugins||[],Mfe),T=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ),QJ),JJ),E.listenerRefiners),E.optionRefiners),N={},V=k$([lA,C,r,a]),U={},z=this.currentCalendarOptionsInput,W=this.currentCalendarOptionsRefined,K=!1;for(let Z in V)this.optionsForRefining.indexOf(Z)===-1&&(V[Z]===z[Z]||U2[Z]&&Z in z&&U2[Z](z[Z],V[Z]))?U[Z]=W[Z]:T[Z]?(U[Z]=T[Z](V[Z]),K=!0):N[Z]=z[Z];return K&&(this.currentCalendarOptionsInput=V,this.currentCalendarOptionsRefined=U,this.stableOptionOverrides=r,this.stableDynamicOptionOverrides=a),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:E,availableLocaleData:m,localeDefaults:C,extra:N}}_computeCurrentViewData(r,a,l,i){let m=a.viewSpecs[r];if(!m)throw new Error(`viewType "${r}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:v,extra:C}=this.processRawViewOptions(m,a.pluginHooks,a.localeDefaults,l,i);bte(C);let E=this.buildDateProfileGenerator({dateProfileGeneratorClass:m.optionDefaults.dateProfileGeneratorClass,duration:m.duration,durationUnit:m.durationUnit,usesMinMaxTime:m.optionDefaults.usesMinMaxTime,dateEnv:a.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:v.slotMinTime,slotMaxTime:v.slotMaxTime,showNonCurrentDates:v.showNonCurrentDates,dayCount:v.dayCount,dateAlignment:v.dateAlignment,dateIncrement:v.dateIncrement,hiddenDays:v.hiddenDays,weekends:v.weekends,nowInput:v.now,validRangeInput:v.validRange,visibleRangeInput:v.visibleRange,fixedWeekCount:v.fixedWeekCount}),T=this.buildViewApi(r,this.getCurrentData,a.dateEnv);return{viewSpec:m,options:v,dateProfileGenerator:E,viewApi:T}}processRawViewOptions(r,a,l,i,m){let v=k$([lA,r.optionDefaults,l,i,r.optionOverrides,m]),C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ),QJ),JJ),Oce),a.listenerRefiners),a.optionRefiners),E={},T=this.currentViewOptionsInput,N=this.currentViewOptionsRefined,V=!1,U={};for(let z in v)v[z]===T[z]||U2[z]&&U2[z](v[z],T[z])?E[z]=N[z]:(v[z]===this.currentCalendarOptionsInput[z]||U2[z]&&U2[z](v[z],this.currentCalendarOptionsInput[z])?z in this.currentCalendarOptionsRefined&&(E[z]=this.currentCalendarOptionsRefined[z]):C[z]?E[z]=C[z](v[z]):U[z]=v[z],V=!0);return V&&(this.currentViewOptionsInput=v,this.currentViewOptionsRefined=E),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:U}}}function Vfe(c,r,a,l,i,m,v,C){let E=ate(r||v.defaultCode,v.map);return new Hce({calendarSystem:"gregory",timeZone:c,namedTimeZoneImpl:m.namedTimeZonedImpl,locale:E,weekNumberCalculation:a,firstDay:l,weekText:i,cmdFormatter:m.cmdFormatter,defaultSeparator:C})}function Hfe(c,r){let a=r.themeClasses[c.themeSystem]||sy;return new a(c)}function zfe(c){let r=c.dateProfileGeneratorClass||cee;return new r(c)}function Ufe(c,r,a){return new kfe(c,r,a)}function Wfe(c){return Z1(c,r=>r.ui)}function jfe(c,r,a){let l={"":r};for(let i in c){let m=c[i];m.sourceId&&a[m.sourceId]&&(l[i]=a[m.sourceId])}return l}function Gfe(c){let{options:r}=c;return{eventUiSingleBase:gO({display:r.eventDisplay,editable:r.editable,startEditable:r.eventStartEditable,durationEditable:r.eventDurationEditable,constraint:r.eventConstraint,overlap:typeof r.eventOverlap=="boolean"?r.eventOverlap:void 0,allow:r.eventAllow,backgroundColor:r.eventBackgroundColor,borderColor:r.eventBorderColor,textColor:r.eventTextColor,color:r.eventColor},c),selectionConfig:gO({constraint:r.selectConstraint,overlap:typeof r.selectOverlap=="boolean"?r.selectOverlap:void 0,allow:r.selectAllow},c)}}function fV(c,r){for(let a of r.pluginHooks.isLoadingFuncs)if(a(c))return!0;return!1}function Zfe(c){return Sue(c.options.businessHours,c)}function bte(c,r){for(let a in c)console.warn(`Unknown option '${a}'`+(r?` for view '${r}'`:""))}class qfe extends Li{render(){let r=this.props.widgetGroups.map(a=>this.renderWidgetGroup(a));return rt("div",{className:"fc-toolbar-chunk"},...r)}renderWidgetGroup(r){let{props:a}=this,{theme:l}=this.context,i=[],m=!0;for(let v of r){let{buttonName:C,buttonClick:E,buttonText:T,buttonIcon:N,buttonHint:V}=v;if(C==="title")m=!1,i.push(rt("h2",{className:"fc-toolbar-title",id:a.titleId},a.title));else{let U=C===a.activeButton,z=!a.isTodayEnabled&&C==="today"||!a.isPrevEnabled&&C==="prev"||!a.isNextEnabled&&C==="next",W=[`fc-${C}-button`,l.getClass("button")];U&&W.push(l.getClass("buttonActive")),i.push(rt("button",{type:"button",title:typeof V=="function"?V(a.navUnit):V,disabled:z,"aria-pressed":U,className:W.join(" "),onClick:E},T||(N?rt("span",{className:N,role:"img"}):"")))}}if(i.length>1){let v=m&&l.getClass("buttonGroup")||"";return rt("div",{className:v},...i)}return i[0]}}class Cte extends Li{render(){let{model:r,extraClassName:a}=this.props,l=!1,i,m,v=r.sectionWidgets,C=v.center;return v.left?(l=!0,i=v.left):i=v.start,v.right?(l=!0,m=v.right):m=v.end,rt("div",{className:[a||"","fc-toolbar",l?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",C||[]),this.renderSection("end",m||[]))}renderSection(r,a){let{props:l}=this;return rt(qfe,{key:r,widgetGroups:a,title:l.title,navUnit:l.navUnit,activeButton:l.activeButton,isTodayEnabled:l.isTodayEnabled,isPrevEnabled:l.isPrevEnabled,isNextEnabled:l.isNextEnabled,titleId:l.titleId})}}class Kfe extends Li{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=r=>{this.el=r,K1(this.props.elRef,r),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:r,state:a}=this,{aspectRatio:l}=r,i=["fc-view-harness",l||r.liquid||r.height?"fc-view-harness-active":"fc-view-harness-passive"],m="",v="";return l?a.availableWidth!==null?m=a.availableWidth/l:v=`${1/l*100}%`:m=r.height||"",rt("div",{"aria-labelledby":r.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:m,paddingBottom:v}},r.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class Yfe extends zS{constructor(r){super(r),this.handleSegClick=(a,l)=>{let{component:i}=this,{context:m}=i,v=HS(l);if(v&&i.isValidSegDownEl(a.target)){let C=td(a.target,".fc-event-forced-url"),E=C?C.querySelector("a[href]").href:"";m.emitter.trigger("eventClick",{el:l,event:new fl(i.context,v.eventRange.def,v.eventRange.instance),jsEvent:a,view:m.viewApi}),E&&!a.defaultPrevented&&(window.location.href=E)}},this.destroy=PJ(r.el,"click",".fc-event",this.handleSegClick)}}class Xfe extends zS{constructor(r){super(r),this.handleEventElRemove=a=>{a===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(a,l)=>{HS(l)&&(this.currentSegEl=l,this.triggerEvent("eventMouseEnter",a,l))},this.handleSegLeave=(a,l)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",a,l))},this.removeHoverListeners=Lle(r.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(r,a,l){let{component:i}=this,{context:m}=i,v=HS(l);(!a||i.isValidSegDownEl(a.target))&&m.emitter.trigger(r,{el:l,event:new fl(m,v.eventRange.def,v.eventRange.instance),jsEvent:a,view:m.viewApi})}}class Qfe extends G2{constructor(){super(...arguments),this.buildViewContext=Ms(Wce),this.buildViewPropTransformers=Ms(eme),this.buildToolbarProps=Ms(Jfe),this.headerRef=Bd(),this.footerRef=Bd(),this.interactionsStore={},this.state={viewLabelId:JR()},this.registerInteractiveComponent=(r,a)=>{let l=jue(r,a),v=[Yfe,Xfe].concat(this.props.pluginHooks.componentInteractions).map(C=>new C(l));this.interactionsStore[r.uid]=v,W$[r.uid]=l},this.unregisterInteractiveComponent=r=>{let a=this.interactionsStore[r.uid];if(a){for(let l of a)l.destroy();delete this.interactionsStore[r.uid]}delete W$[r.uid]},this.resizeRunner=new g$(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=r=>{let{options:a}=this.props;a.handleWindowResize&&r.target===window&&this.resizeRunner.request(a.windowResizeDelay)}}render(){let{props:r}=this,{toolbarConfig:a,options:l}=r,i=this.buildToolbarProps(r.viewSpec,r.dateProfile,r.dateProfileGenerator,r.currentDate,uA(r.options.now,r.dateEnv),r.viewTitle),m=!1,v="",C;r.isHeightAuto||r.forPrint?v="":l.height!=null?m=!0:l.contentHeight!=null?v=l.contentHeight:C=Math.max(l.aspectRatio,.5);let E=this.buildViewContext(r.viewSpec,r.viewApi,r.options,r.dateProfileGenerator,r.dateEnv,r.theme,r.pluginHooks,r.dispatch,r.getCurrentData,r.emitter,r.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),T=a.header&&a.header.hasTitle?this.state.viewLabelId:void 0;return rt(q1.Provider,{value:E},a.header&&rt(Cte,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:a.header,titleId:T},i)),rt(Kfe,{liquid:m,height:v,aspectRatio:C,labeledById:T},this.renderView(r),this.buildAppendContent()),a.footer&&rt(Cte,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:a.footer,titleId:""},i)))}componentDidMount(){let{props:r}=this;this.calendarInteractions=r.pluginHooks.calendarInteractions.map(l=>new l(r)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:a}=r.pluginHooks;for(let l in a)a[l](r[l],r)}componentDidUpdate(r){let{props:a}=this,{propSetHandlers:l}=a.pluginHooks;for(let i in l)a[i]!==r[i]&&l[i](a[i],a)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let r of this.calendarInteractions)r.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:r}=this,a=r.pluginHooks.viewContainerAppends.map(l=>l(r));return rt(Ya,{},...a)}renderView(r){let{pluginHooks:a}=r,{viewSpec:l}=r,i={dateProfile:r.dateProfile,businessHours:r.businessHours,eventStore:r.renderableEventStore,eventUiBases:r.eventUiBases,dateSelection:r.dateSelection,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,isHeightAuto:r.isHeightAuto,forPrint:r.forPrint},m=this.buildViewPropTransformers(a.viewPropsTransformers);for(let C of m)Object.assign(i,C.transform(i,r));let v=l.component;return rt(v,Object.assign({},i))}}function Jfe(c,r,a,l,i,m){let v=a.build(i,void 0,!1),C=a.buildPrev(r,l,!1),E=a.buildNext(r,l,!1);return{title:m,activeButton:c.type,navUnit:c.singleUnit,isTodayEnabled:v.isValid&&!Y1(r.currentRange,i),isPrevEnabled:C.isValid,isNextEnabled:E.isValid}}function eme(c){return c.map(r=>new r)}let tme=class extends Gue{constructor(r,a={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=l=>{switch(l.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=l=>{this.currentData=l,this.renderRunner.request(l.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:l}=this;cO(()=>{rA(rt(Wue,{options:l.calendarOptions,theme:l.theme,emitter:l.emitter},(i,m,v,C)=>(this.setClassNames(i),this.setHeight(m),rt(see.Provider,{value:this.customContentRenderId},rt(Qfe,Object.assign({isHeightAuto:v,forPrint:C},l))))),this.el)})}else this.isRendered&&(this.isRendered=!1,rA(null,this.el),this.setClassNames([]),this.setHeight(""))},Tle(r),this.el=r,this.renderRunner=new g$(this.handleRenderRequest),new $fe({optionOverrides:a,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let r=this.isRendering;r?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),r&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){cO(()=>{super.updateSize()})}batchRendering(r){this.renderRunner.pause("batchRendering"),r(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(r,a){this.currentDataManager.resetOptions(r,a)}setClassNames(r){if(!Jv(r,this.currentClassNames)){let{classList:a}=this.el;for(let l of this.currentClassNames)a.remove(l);for(let l of r)a.add(l);this.currentClassNames=r}}setHeight(r){IJ(this.el,"height",r)}};const nme={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},_te=f.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(c){return{...c,customRenderingMetaMap:rme(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const c=[];for(const r of this.customRenderingMap.values())c.push(f.h(ome,{key:r.id,customRendering:r}));return f.h("div",{attrs:{"data-fc-render-id":this.renderId}},f.h(f.Fragment,c))},mounted(){const c=new Zde;this.handleCustomRendering=c.handle.bind(c);const r=this.buildOptions(this.options),a=new tme(this.$el,r);this.calendar=a,a.render(),c.subscribe(l=>{this.customRenderingMap=l,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:sme()}),ome=f.defineComponent({props:{customRendering:Object},render(){const c=this.customRendering,r=typeof c.generatorMeta=="function"?c.generatorMeta(c.renderProps):c.generatorMeta;return f.h(f.Teleport,{to:c.containerEl},r)}});function eSe(c){return c}function sme(){let c={options:{deep:!0,handler(r){let a=this.getApi();a.pauseRendering();let l=this.buildOptions(r);a.resetOptions(l),this.renderId++}}};for(let r in nme)c[`options.${r}`]={deep:!0,handler(a){if(a!==void 0){let l=this.getApi();l.pauseRendering(),l.resetOptions({[r]:a},[r]),this.renderId++}}};return c}function rme(c){const r={};for(const a in c)r[ime(a)]=c[a];return r}function ime(c){return c.split("-").map((r,a)=>a?ame(r):r).join("")}function ame(c){return c.charAt(0).toUpperCase()+c.slice(1)}class lme extends wp{constructor(){super(...arguments),this.headerElRef=Bd()}renderSimpleLayout(r,a){let{props:l,context:i}=this,m=[],v=wO(i.options);return r&&m.push({type:"header",key:"header",isSticky:v,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}}),m.push({type:"body",key:"body",liquid:!0,chunk:{content:a}}),rt(uO,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},rt(sV,{liquid:!l.isHeightAuto&&!l.forPrint,collapsibleWidth:l.forPrint,cols:[],sections:m}))}renderHScrollLayout(r,a,l,i){let m=this.context.pluginHooks.scrollGridImpl;if(!m)throw new Error("No ScrollGrid implementation");let{props:v,context:C}=this,E=!v.forPrint&&wO(C.options),T=!v.forPrint&&Xee(C.options),N=[];return r&&N.push({type:"header",key:"header",isSticky:E,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}]}),N.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:a}]}),T&&N.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:oV}]}),rt(uO,{elClasses:["fc-daygrid"],viewSpec:C.viewSpec},rt(m,{liquid:!v.isHeightAuto&&!v.forPrint,forPrint:v.forPrint,collapsibleWidth:v.forPrint,colGroups:[{cols:[{span:l,minWidth:i}]}],sections:N}))}}function SO(c,r){let a=[];for(let l=0;l<r;l+=1)a[l]=[];for(let l of c)a[l.row].push(l);return a}function EO(c,r){let a=[];for(let l=0;l<r;l+=1)a[l]=[];for(let l of c)a[l.firstCol].push(l);return a}function wte(c,r){let a=[];if(c){for(let l=0;l<r;l+=1)a[l]={affectedInstances:c.affectedInstances,isEvent:c.isEvent,segs:[]};for(let l of c.segs)a[l.row].segs.push(l)}else for(let l=0;l<r;l+=1)a[l]=null;return a}const Ste=El({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ete(c){let{display:r}=c.eventRange.ui;return r==="list-item"||r==="auto"&&!c.eventRange.def.allDay&&c.firstCol===c.lastCol&&c.isStart&&c.isEnd}class kte extends Li{render(){let{props:r}=this;return rt(Qee,Object.assign({},r,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Ste,defaultDisplayEventEnd:r.defaultDisplayEventEnd,disableResizing:!r.seg.eventRange.def.allDay}))}}class xte extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{seg:i}=r,m=l.eventTimeFormat||Ste,v=Tee(i,m,a,!0,r.defaultDisplayEventEnd);return rt(rV,Object.assign({},r,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Ree(r.seg,a),defaultGenerator:cme,timeText:v,isResizing:!1,isDateSelecting:!1}))}}function cme(c){return rt(Ya,null,rt("div",{className:"fc-daygrid-event-dot",style:{borderColor:c.borderColor||c.backgroundColor}}),c.timeText&&rt("div",{className:"fc-event-time"},c.timeText),rt("div",{className:"fc-event-title"},c.event.title||rt(Ya,null," ")))}class ume extends Li{constructor(){super(...arguments),this.compileSegs=Ms(dme)}render(){let{props:r}=this,{allSegs:a,invisibleSegs:l}=this.compileSegs(r.singlePlacements);return rt(nte,{elClasses:["fc-daygrid-more-link"],dateProfile:r.dateProfile,todayRange:r.todayRange,allDayDate:r.allDayDate,moreCnt:r.moreCnt,allSegs:a,hiddenSegs:l,alignmentElRef:r.alignmentElRef,alignGridTop:r.alignGridTop,extraDateSpan:r.extraDateSpan,popoverContent:()=>{let i=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return rt(Ya,null,a.map(m=>{let v=m.eventRange.instance.instanceId;return rt("div",{className:"fc-daygrid-event-harness",key:v,style:{visibility:i[v]?"hidden":""}},Ete(m)?rt(xte,Object.assign({seg:m,isDragging:!1,isSelected:v===r.eventSelection,defaultDisplayEventEnd:!1},oy(m,r.todayRange))):rt(kte,Object.assign({seg:m,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:v===r.eventSelection,defaultDisplayEventEnd:!1},oy(m,r.todayRange))))}))}})}}function dme(c){let r=[],a=[];for(let l of c)r.push(l.seg),l.isVisible||a.push(l.seg);return{allSegs:r,invisibleSegs:a}}const fme=El({week:"narrow"});class mme extends wp{constructor(){super(...arguments),this.rootElRef=Bd(),this.state={dayNumberId:JR()},this.handleRootEl=r=>{K1(this.rootElRef,r),K1(this.props.elRef,r)}}render(){let{context:r,props:a,state:l,rootElRef:i}=this,{options:m,dateEnv:v}=r,{date:C,dateProfile:E}=a;const T=a.showDayNumber&&gme(C,E.currentRange,v);return rt(aV,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...a.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},a.extraDataAttrs),a.showDayNumber?{"aria-labelledby":l.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:hme,date:C,dateProfile:E,todayRange:a.todayRange,showDayNumber:a.showDayNumber,isMonthStart:T,extraRenderProps:a.extraRenderProps},(N,V)=>rt("div",{ref:a.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:a.minHeight}},a.showWeekNumber&&rt(tte,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:yO(r,C,"week"),date:C,defaultFormat:fme}),!V.isDisabled&&(a.showDayNumber||lV(m)||a.forceDayTop)?rt("div",{className:"fc-daygrid-day-top"},rt(N,{elTag:"a",elClasses:["fc-daygrid-day-number",T&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},yO(r,C)),{id:l.dayNumberId})})):a.showDayNumber?rt("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},rt("a",{className:"fc-daygrid-day-number"}," ")):void 0,rt("div",{className:"fc-daygrid-day-events",ref:a.fgContentElRef},a.fgContent,rt("div",{className:"fc-daygrid-day-bottom",style:{marginTop:a.moreMarginTop}},rt(ume,{allDayDate:C,singlePlacements:a.singlePlacements,moreCnt:a.moreCnt,alignmentElRef:i,alignGridTop:!a.showDayNumber,extraDateSpan:a.extraDateSpan,dateProfile:a.dateProfile,eventSelection:a.eventSelection,eventDrag:a.eventDrag,eventResize:a.eventResize,todayRange:a.todayRange}))),rt("div",{className:"fc-daygrid-day-bg"},a.bgContent)))}}function hme(c){return c.dayNumberText||rt(Ya,null," ")}function gme(c,r,a){const{start:l,end:i}=r,m=ey(i,-1),v=a.getYear(l),C=a.getMonth(l),E=a.getYear(m),T=a.getMonth(m);return!(v===E&&C===T)&&(c.valueOf()===l.valueOf()||a.getDay(c)===1&&c.valueOf()<i.valueOf())}function Ate(c){return c.eventRange.instance.instanceId+":"+c.firstCol}function Tte(c){return Ate(c)+":"+c.lastCol}function pme(c,r,a,l,i,m,v){let C=new bme(ce=>{let q=c[ce.index].eventRange.instance.instanceId+":"+ce.span.start+":"+(ce.span.end-1);return i[q]||1});C.allowReslicing=!0,C.strictOrder=l,r===!0||a===!0?(C.maxCoord=m,C.hiddenConsumes=!0):typeof r=="number"?C.maxStackCnt=r:typeof a=="number"&&(C.maxStackCnt=a,C.hiddenConsumes=!0);let E=[],T=[];for(let ce=0;ce<c.length;ce+=1){let q=c[ce],X=Tte(q);i[X]!=null?E.push({index:ce,span:{start:q.firstCol,end:q.lastCol+1}}):T.push(q)}let N=C.addSegs(E),V=C.toRects(),{singleColPlacements:U,multiColPlacements:z,leftoverMargins:W}=vme(V,c,v),K=[],Z=[];for(let ce of T){z[ce.firstCol].push({seg:ce,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let q=ce.firstCol;q<=ce.lastCol;q+=1)U[q].push({seg:WS(ce,q,q+1,v),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let ce=0;ce<v.length;ce+=1)K.push(0);for(let ce of N){let q=c[ce.index],X=ce.span;z[X.start].push({seg:WS(q,X.start,X.end,v),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let Ce=X.start;Ce<X.end;Ce+=1)K[Ce]+=1,U[Ce].push({seg:WS(q,Ce,Ce+1,v),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let ce=0;ce<v.length;ce+=1)Z.push(W[ce]);return{singleColPlacements:U,multiColPlacements:z,moreCnts:K,moreMarginTops:Z}}function vme(c,r,a){let l=yme(c,a.length),i=[],m=[],v=[];for(let C=0;C<a.length;C+=1){let E=l[C],T=[],N=0,V=0;for(let z of E){let W=r[z.index];T.push({seg:WS(W,C,C+1,a),isVisible:!0,isAbsolute:!1,absoluteTop:z.levelCoord,marginTop:z.levelCoord-N}),N=z.levelCoord+z.thickness}let U=[];N=0,V=0;for(let z of E){let W=r[z.index],K=z.span.end-z.span.start>1,Z=z.span.start===C;V+=z.levelCoord-N,N=z.levelCoord+z.thickness,K?(V+=z.thickness,Z&&U.push({seg:WS(W,z.span.start,z.span.end,a),isVisible:!0,isAbsolute:!0,absoluteTop:z.levelCoord,marginTop:0})):Z&&(U.push({seg:WS(W,z.span.start,z.span.end,a),isVisible:!0,isAbsolute:!1,absoluteTop:z.levelCoord,marginTop:V}),V=0)}i.push(T),m.push(U),v.push(V)}return{singleColPlacements:i,multiColPlacements:m,leftoverMargins:v}}function yme(c,r){let a=[];for(let l=0;l<r;l+=1)a.push([]);for(let l of c)for(let i=l.span.start;i<l.span.end;i+=1)a[i].push(l);return a}function WS(c,r,a,l){if(c.firstCol===r&&c.lastCol===a-1)return c;let i=c.eventRange,m=i.range,v=Z2(m,{start:l[r].date,end:nd(l[a-1].date,1)});return Object.assign(Object.assign({},c),{firstCol:r,lastCol:a-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:v},isStart:c.isStart&&v.start.valueOf()===m.start.valueOf(),isEnd:c.isEnd&&v.end.valueOf()===m.end.valueOf()})}class bme extends $ee{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(r){const a=super.addSegs(r),{entriesByLevel:l}=this,i=m=>!this.forceHidden[Y2(m)];for(let m=0;m<l.length;m+=1)l[m]=l[m].filter(i);return a}handleInvalidInsertion(r,a,l){const{entriesByLevel:i,forceHidden:m}=this,{touchingEntry:v,touchingLevel:C,touchingLateral:E}=r;if(this.hiddenConsumes&&v){const T=Y2(v);if(!m[T])if(this.allowReslicing){const N=Object.assign(Object.assign({},v),{span:Q$(v.span,a.span)}),V=Y2(N);m[V]=!0,i[C][E]=N,l.push(N),this.splitEntry(v,a,l)}else m[T]=!0,l.push(v)}super.handleInvalidInsertion(r,a,l)}}class Dte extends wp{constructor(){super(...arguments),this.cellElRefs=new X1,this.frameElRefs=new X1,this.fgElRefs=new X1,this.segHarnessRefs=new X1,this.rootElRef=Bd(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=r=>{r&&this.updateSizing(!0)}}render(){let{props:r,state:a,context:l}=this,{options:i}=l,m=r.cells.length,v=EO(r.businessHourSegs,m),C=EO(r.bgEventSegs,m),E=EO(this.getHighlightSegs(),m),T=EO(this.getMirrorSegs(),m),{singleColPlacements:N,multiColPlacements:V,moreCnts:U,moreMarginTops:z}=pme(Aee(r.fgEventSegs,i.eventOrder),r.dayMaxEvents,r.dayMaxEventRows,i.eventOrderStrict,a.segHeights,a.maxContentHeight,r.cells),W=r.eventDrag&&r.eventDrag.affectedInstances||r.eventResize&&r.eventResize.affectedInstances||{};return rt("tr",{ref:this.rootElRef,role:"row"},r.renderIntro&&r.renderIntro(),r.cells.map((K,Z)=>{let ce=this.renderFgSegs(Z,r.forPrint?N[Z]:V[Z],r.todayRange,W),q=this.renderFgSegs(Z,Cme(T[Z],V),r.todayRange,{},!!r.eventDrag,!!r.eventResize,!1);return rt(mme,{key:K.key,elRef:this.cellElRefs.createRef(K.key),innerElRef:this.frameElRefs.createRef(K.key),dateProfile:r.dateProfile,date:K.date,showDayNumber:r.showDayNumbers,showWeekNumber:r.showWeekNumbers&&Z===0,forceDayTop:r.showWeekNumbers,todayRange:r.todayRange,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,extraRenderProps:K.extraRenderProps,extraDataAttrs:K.extraDataAttrs,extraClassNames:K.extraClassNames,extraDateSpan:K.extraDateSpan,moreCnt:U[Z],moreMarginTop:z[Z],singlePlacements:N[Z],fgContentElRef:this.fgElRefs.createRef(K.key),fgContent:rt(Ya,null,rt(Ya,null,ce),rt(Ya,null,q)),bgContent:rt(Ya,null,this.renderFillSegs(E[Z],"highlight"),this.renderFillSegs(v[Z],"non-business"),this.renderFillSegs(C[Z],"bg-event")),minHeight:r.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(r,a){let l=this.props;this.updateSizing(!_p(r,l))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:r}=this;return r.eventDrag&&r.eventDrag.segs.length?r.eventDrag.segs:r.eventResize&&r.eventResize.segs.length?r.eventResize.segs:r.dateSelectionSegs}getMirrorSegs(){let{props:r}=this;return r.eventResize&&r.eventResize.segs.length?r.eventResize.segs:[]}renderFgSegs(r,a,l,i,m,v,C){let{context:E}=this,{eventSelection:T}=this.props,{framePositions:N}=this.state,V=this.props.cells.length===1,U=m||v||C,z=[];if(N)for(let W of a){let{seg:K}=W,{instanceId:Z}=K.eventRange.instance,ce=W.isVisible&&!i[Z],q=W.isAbsolute,X="",Ce="";q&&(E.isRtl?(Ce=0,X=N.lefts[K.lastCol]-N.lefts[K.firstCol]):(X=0,Ce=N.rights[K.firstCol]-N.rights[K.lastCol])),z.push(rt("div",{className:"fc-daygrid-event-harness"+(q?" fc-daygrid-event-harness-abs":""),key:Ate(K),ref:U?null:this.segHarnessRefs.createRef(Tte(K)),style:{visibility:ce?"":"hidden",marginTop:q?"":W.marginTop,top:q?W.absoluteTop:"",left:X,right:Ce}},Ete(K)?rt(xte,Object.assign({seg:K,isDragging:m,isSelected:Z===T,defaultDisplayEventEnd:V},oy(K,l))):rt(kte,Object.assign({seg:K,isDragging:m,isResizing:v,isDateSelecting:C,isSelected:Z===T,defaultDisplayEventEnd:V},oy(K,l)))))}return z}renderFillSegs(r,a){let{isRtl:l}=this.context,{todayRange:i}=this.props,{framePositions:m}=this.state,v=[];if(m)for(let C of r){let E=l?{right:0,left:m.lefts[C.lastCol]-m.lefts[C.firstCol]}:{left:0,right:m.rights[C.firstCol]-m.rights[C.lastCol]};v.push(rt("div",{key:Dee(C.eventRange),className:"fc-daygrid-bg-harness",style:E},a==="bg-event"?rt(Jee,Object.assign({seg:C},oy(C,i))):ete(a)))}return rt(Ya,{},...v)}updateSizing(r){let{props:a,state:l,frameElRefs:i}=this;if(!a.forPrint&&a.clientWidth!==null){if(r){let E=a.cells.map(T=>i.currentMap[T.key]);if(E.length){let T=this.rootElRef.current,N=new US(T,E,!0,!1);(!l.framePositions||!l.framePositions.similarTo(N))&&this.setState({framePositions:new US(T,E,!0,!1)})}}const m=this.state.segHeights,v=this.querySegHeights(),C=a.dayMaxEvents===!0||a.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},m),v),maxContentHeight:C?this.computeMaxContentHeight():null})}}querySegHeights(){let r=this.segHarnessRefs.currentMap,a={};for(let l in r){let i=Math.round(r[l].getBoundingClientRect().height);a[l]=Math.max(a[l]||0,i)}return a}computeMaxContentHeight(){let r=this.props.cells[0].key,a=this.cellElRefs.currentMap[r],l=this.fgElRefs.currentMap[r];return a.getBoundingClientRect().bottom-l.getBoundingClientRect().top}getCellEls(){let r=this.cellElRefs.currentMap;return this.props.cells.map(a=>r[a.key])}}Dte.addStateEquality({segHeights:_p});function Cme(c,r){if(!c.length)return[];let a=_me(r);return c.map(l=>({seg:l,isVisible:!0,isAbsolute:!0,absoluteTop:a[l.eventRange.instance.instanceId],marginTop:0}))}function _me(c){let r={};for(let a of c)for(let l of a)r[l.seg.eventRange.instance.instanceId]=l.absoluteTop;return r}class wme extends wp{constructor(){super(...arguments),this.splitBusinessHourSegs=Ms(SO),this.splitBgEventSegs=Ms(SO),this.splitFgEventSegs=Ms(SO),this.splitDateSelectionSegs=Ms(SO),this.splitEventDrag=Ms(wte),this.splitEventResize=Ms(wte),this.rowRefs=new X1}render(){let{props:r,context:a}=this,l=r.cells.length,i=this.splitBusinessHourSegs(r.businessHourSegs,l),m=this.splitBgEventSegs(r.bgEventSegs,l),v=this.splitFgEventSegs(r.fgEventSegs,l),C=this.splitDateSelectionSegs(r.dateSelectionSegs,l),E=this.splitEventDrag(r.eventDrag,l),T=this.splitEventResize(r.eventResize,l),N=l>=7&&r.clientWidth?r.clientWidth/a.options.aspectRatio/6:null;return rt(fA,{unit:"day"},(V,U)=>rt(Ya,null,r.cells.map((z,W)=>rt(Dte,{ref:this.rowRefs.createRef(W),key:z.length?z[0].date.toISOString():W,showDayNumbers:l>1,showWeekNumbers:r.showWeekNumbers,todayRange:U,dateProfile:r.dateProfile,cells:z,renderIntro:r.renderRowIntro,businessHourSegs:i[W],eventSelection:r.eventSelection,bgEventSegs:m[W].filter(Sme),fgEventSegs:v[W],dateSelectionSegs:C[W],eventDrag:E[W],eventResize:T[W],dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,clientWidth:r.clientWidth,clientHeight:r.clientHeight,cellMinHeight:N,forPrint:r.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const r=this.rowRefs.currentMap[0].getCellEls()[0],a=r?r.closest(".fc-daygrid-body"):null;a&&(this.rootEl=a,this.context.registerInteractiveComponent(this,{el:a,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new US(this.rootEl,this.rowRefs.collect().map(r=>r.getCellEls()[0]),!1,!0),this.colPositions=new US(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(r,a){let{colPositions:l,rowPositions:i}=this,m=l.leftToIndex(r),v=i.topToIndex(a);if(v!=null&&m!=null){let C=this.props.cells[v][m];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(v,m),allDay:!0},C.extraDateSpan),dayEl:this.getCellEl(v,m),rect:{left:l.lefts[m],right:l.rights[m],top:i.tops[v],bottom:i.bottoms[v]},layer:0}}return null}getCellEl(r,a){return this.rowRefs.currentMap[r].getCellEls()[a]}getCellRange(r,a){let l=this.props.cells[r][a].date,i=nd(l,1);return{start:l,end:i}}}function Sme(c){return c.eventRange.def.allDay}class Eme extends wp{constructor(){super(...arguments),this.elRef=Bd(),this.needsScrollReset=!1}render(){let{props:r}=this,{dayMaxEventRows:a,dayMaxEvents:l,expandRows:i}=r,m=l===!0||a===!0;m&&!i&&(m=!1,a=null,l=null);let v=["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return rt("div",{ref:this.elRef,className:v.join(" "),style:{width:r.clientWidth,minWidth:r.tableMinWidth}},rt("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:r.clientWidth,minWidth:r.tableMinWidth,height:i?r.clientHeight:""}},r.colGroupNode,rt("tbody",{role:"presentation"},rt(wme,{dateProfile:r.dateProfile,cells:r.cells,renderRowIntro:r.renderRowIntro,showWeekNumbers:r.showWeekNumbers,clientWidth:r.clientWidth,clientHeight:r.clientHeight,businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,fgEventSegs:r.fgEventSegs,dateSelectionSegs:r.dateSelectionSegs,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,dayMaxEvents:l,dayMaxEventRows:a,forPrint:r.forPrint,isHitComboAllowed:r.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(r){r.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const r=kme(this.elRef.current,this.props.dateProfile);if(r){const a=r.closest(".fc-daygrid-body"),l=a.closest(".fc-scroller"),i=r.getBoundingClientRect().top-a.getBoundingClientRect().top;l.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function kme(c,r){let a;return r.currentRangeUnit.match(/year|month/)&&(a=c.querySelector(`[data-date="${hce(r.currentDate)}-01"]`)),a||(a=c.querySelector(`[data-date="${S$(r.currentDate)}"]`)),a}class xme extends Gee{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(r,a){return a.sliceRange(r)}}class Rte extends wp{constructor(){super(...arguments),this.slicer=new xme,this.tableRef=Bd()}render(){let{props:r,context:a}=this;return rt(Eme,Object.assign({ref:this.tableRef},this.slicer.sliceProps(r,r.dateProfile,r.nextDayThreshold,a,r.dayTableModel),{dateProfile:r.dateProfile,cells:r.dayTableModel.cells,colGroupNode:r.colGroupNode,tableMinWidth:r.tableMinWidth,renderRowIntro:r.renderRowIntro,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.showWeekNumbers,expandRows:r.expandRows,headerAlignElRef:r.headerAlignElRef,clientWidth:r.clientWidth,clientHeight:r.clientHeight,forPrint:r.forPrint}))}}class Ame extends lme{constructor(){super(...arguments),this.buildDayTableModel=Ms(Tme),this.headerRef=Bd(),this.tableRef=Bd()}render(){let{options:r,dateProfileGenerator:a}=this.context,{props:l}=this,i=this.buildDayTableModel(l.dateProfile,a),m=r.dayHeaders&&rt(Uee,{ref:this.headerRef,dateProfile:l.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),v=C=>rt(Rte,{ref:this.tableRef,dateProfile:l.dateProfile,dayTableModel:i,businessHours:l.businessHours,dateSelection:l.dateSelection,eventStore:l.eventStore,eventUiBases:l.eventUiBases,eventSelection:l.eventSelection,eventDrag:l.eventDrag,eventResize:l.eventResize,nextDayThreshold:r.nextDayThreshold,colGroupNode:C.tableColGroupNode,tableMinWidth:C.tableMinWidth,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.weekNumbers,expandRows:!l.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:C.clientWidth,clientHeight:C.clientHeight,forPrint:l.forPrint});return r.dayMinWidth?this.renderHScrollLayout(m,v,i.colCnt,r.dayMinWidth):this.renderSimpleLayout(m,v)}}function Tme(c,r){let a=new Wee(c.renderRange,r);return new jee(a,/year|month|week/.test(c.currentRangeUnit))}class Dme extends cee{buildRenderRange(r,a,l){let i=super.buildRenderRange(r,a,l),{props:m}=this;return Rme({currentRange:i,snapToWeek:/^(year|month)$/.test(a),fixedWeekCount:m.fixedWeekCount,dateEnv:m.dateEnv})}}function Rme(c){let{dateEnv:r,currentRange:a}=c,{start:l,end:i}=a,m;if(c.snapToWeek&&(l=r.startOfWeek(l),m=r.startOfWeek(i),m.valueOf()!==i.valueOf()&&(i=UJ(m,1))),c.fixedWeekCount){let v=r.startOfWeek(r.startOfMonth(nd(a.end,-1))),C=Math.ceil(oce(v,i));i=UJ(i,6-C)}return{start:l,end:i}}var Ome=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';m$(Ome);var Ote=Q1({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Ame,dateProfileGeneratorClass:Dme},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class Nme extends Xue{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(r){return r.allDay?["allDay"]:["timed"]}getKeysForEventDef(r){return r.allDay?Tue(r)?["timed","allDay"]:["allDay"]:["timed"]}}const Ime=El({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Nte(c){let r=["fc-timegrid-slot","fc-timegrid-slot-label",c.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return rt(q1.Consumer,null,a=>{if(!c.isLabeled)return rt("td",{className:r.join(" "),"data-time":c.isoTimeStr});let{dateEnv:l,options:i,viewApi:m}=a,v=i.slotLabelFormat==null?Ime:Array.isArray(i.slotLabelFormat)?El(i.slotLabelFormat[0]):El(i.slotLabelFormat),C={level:0,time:c.time,date:l.toDate(c.date),view:m,text:l.format(c.date,v)};return rt(rm,{elTag:"td",elClasses:r,elAttrs:{"data-time":c.isoTimeStr},renderProps:C,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Bme,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},E=>rt("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},rt(E,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function Bme(c){return c.text}class Mme extends Li{render(){return this.props.slatMetas.map(r=>rt("tr",{key:r.key},rt(Nte,Object.assign({},r))))}}const Pme=El({week:"short"}),Lme=5;class Fme extends wp{constructor(){super(...arguments),this.allDaySplitter=new Nme,this.headerElRef=Bd(),this.rootElRef=Bd(),this.scrollerElRef=Bd(),this.state={slatCoords:null},this.handleScrollTopRequest=r=>{let a=this.scrollerElRef.current;a&&(a.scrollTop=r)},this.renderHeadAxis=(r,a="")=>{let{options:l}=this.context,{dateProfile:i}=this.props,m=i.renderRange,C=z2(m.start,m.end)===1?yO(this.context,m.start,"week"):{};return l.weekNumbers&&r==="day"?rt(tte,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:m.start,defaultFormat:Pme},E=>rt("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:a}},rt(E,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:C}))):rt("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},rt("div",{className:"fc-timegrid-axis-frame",style:{height:a}}))},this.renderTableRowAxis=r=>{let{options:a,viewApi:l}=this.context,i={text:a.allDayText,view:l};return rt(rm,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:a.allDayContent,defaultGenerator:$me,classNameGenerator:a.allDayClassNames,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount},m=>rt("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",r==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:r}},rt(m,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=r=>{this.setState({slatCoords:r})}}renderSimpleLayout(r,a,l){let{context:i,props:m}=this,v=[],C=wO(i.options);return r&&v.push({type:"header",key:"header",isSticky:C,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}}),a&&(v.push({type:"body",key:"all-day",chunk:{content:a}}),v.push({type:"body",key:"all-day-divider",outerContent:rt("tr",{role:"presentation",className:"fc-scrollgrid-section"},rt("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),v.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:l}}),rt(uO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},rt(sV,{liquid:!m.isHeightAuto&&!m.forPrint,collapsibleWidth:m.forPrint,cols:[{width:"shrink"}],sections:v}))}renderHScrollLayout(r,a,l,i,m,v,C){let E=this.context.pluginHooks.scrollGridImpl;if(!E)throw new Error("No ScrollGrid implementation");let{context:T,props:N}=this,V=!N.forPrint&&wO(T.options),U=!N.forPrint&&Xee(T.options),z=[];r&&z.push({type:"header",key:"header",isSticky:V,syncRowHeights:!0,chunks:[{key:"axis",rowContent:K=>rt("tr",{role:"presentation"},this.renderHeadAxis("day",K.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}]}),a&&(z.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:K=>rt("tr",{role:"presentation"},this.renderTableRowAxis(K.rowSyncHeights[0]))},{key:"cols",content:a}]}),z.push({key:"all-day-divider",type:"body",outerContent:rt("tr",{role:"presentation",className:"fc-scrollgrid-section"},rt("td",{colSpan:2,className:"fc-timegrid-divider "+T.theme.getClass("tableCellShaded")}))}));let W=T.options.nowIndicator;return z.push({type:"body",key:"body",liquid:!0,expandRows:!!T.options.expandRows,chunks:[{key:"axis",content:K=>rt("div",{className:"fc-timegrid-axis-chunk"},rt("table",{"aria-hidden":!0,style:{height:K.expandRows?K.clientHeight:""}},K.tableColGroupNode,rt("tbody",null,rt(Mme,{slatMetas:v}))),rt("div",{className:"fc-timegrid-now-indicator-container"},rt(fA,{unit:W?"minute":"day"},Z=>{let ce=W&&C&&C.safeComputeTop(Z);return typeof ce=="number"?rt(iV,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:ce},isAxis:!0,date:Z}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:l}]}),U&&z.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:oV},{key:"cols",content:oV}]}),rt(uO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:T.viewSpec},rt(E,{liquid:!N.isHeightAuto&&!N.forPrint,forPrint:N.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:m}]}],sections:z}))}getAllDayMaxEventProps(){let{dayMaxEvents:r,dayMaxEventRows:a}=this.context.options;return(r===!0||a===!0)&&(r=void 0,a=Lme),{dayMaxEvents:r,dayMaxEventRows:a}}}function $me(c){return c.text}class Vme{constructor(r,a,l){this.positions=r,this.dateProfile=a,this.slotDuration=l}safeComputeTop(r){let{dateProfile:a}=this;if(Y1(a.currentRange,r)){let l=Oa(r),i=r.valueOf()-l.valueOf();if(i>=rg(a.slotMinTime)&&i<rg(a.slotMaxTime))return this.computeTimeTop(ni(i))}return null}computeDateTop(r,a){return a||(a=Oa(r)),this.computeTimeTop(ni(r.valueOf()-a.valueOf()))}computeTimeTop(r){let{positions:a,dateProfile:l}=this,i=a.els.length,m=(r.milliseconds-rg(l.slotMinTime))/rg(this.slotDuration),v,C;return m=Math.max(0,m),m=Math.min(i,m),v=Math.floor(m),v=Math.min(v,i-1),C=m-v,a.tops[v]+a.getHeight(v)*C}}class Hme extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{slatElRefs:i}=r;return rt("tbody",null,r.slatMetas.map((m,v)=>{let C={time:m.time,date:a.dateEnv.toDate(m.date),view:a.viewApi};return rt("tr",{key:m.key,ref:i.createRef(m.key)},r.axis&&rt(Nte,Object.assign({},m)),rt(rm,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!m.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":m.isoTimeStr},renderProps:C,generatorName:"slotLaneContent",customGenerator:l.slotLaneContent,classNameGenerator:l.slotLaneClassNames,didMount:l.slotLaneDidMount,willUnmount:l.slotLaneWillUnmount}))}))}}class zme extends Li{constructor(){super(...arguments),this.rootElRef=Bd(),this.slatElRefs=new X1}render(){let{props:r,context:a}=this;return rt("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},rt("table",{"aria-hidden":!0,className:a.theme.getClass("table"),style:{minWidth:r.tableMinWidth,width:r.clientWidth,height:r.minHeight}},r.tableColGroupNode,rt(Hme,{slatElRefs:this.slatElRefs,axis:r.axis,slatMetas:r.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:r,props:a}=this;a.onCoords&&a.clientWidth!==null&&this.rootElRef.current.offsetHeight&&a.onCoords(new Vme(new US(this.rootElRef.current,Ume(this.slatElRefs.currentMap,a.slatMetas),!1,!0),this.props.dateProfile,r.options.slotDuration))}}function Ume(c,r){return r.map(a=>c[a.key])}function mA(c,r){let a=[],l;for(l=0;l<r;l+=1)a.push([]);if(c)for(l=0;l<c.length;l+=1)a[c[l].col].push(c[l]);return a}function Ite(c,r){let a=[];if(c){for(let l=0;l<r;l+=1)a[l]={affectedInstances:c.affectedInstances,isEvent:c.isEvent,segs:[]};for(let l of c.segs)a[l.col].segs.push(l)}else for(let l=0;l<r;l+=1)a[l]=null;return a}class Wme extends Li{render(){let{props:r}=this;return rt(nte,{elClasses:["fc-timegrid-more-link"],elStyle:{top:r.top,bottom:r.bottom},allDayDate:null,moreCnt:r.hiddenSegs.length,allSegs:r.hiddenSegs,hiddenSegs:r.hiddenSegs,extraDateSpan:r.extraDateSpan,dateProfile:r.dateProfile,todayRange:r.todayRange,popoverContent:()=>Lte(r.hiddenSegs,r),defaultGenerator:jme,forceTimed:!0},a=>rt(a,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function jme(c){return c.shortText}function Gme(c,r,a){let l=new $ee;r!=null&&(l.strictOrder=r),a!=null&&(l.maxStackCnt=a);let i=l.addSegs(c),m=ude(i),v=Zme(l);return v=Xme(v,1),{segRects:Qme(v),hiddenGroups:m}}function Zme(c){const{entriesByLevel:r}=c,a=mV((l,i)=>l+":"+i,(l,i)=>{let m=Yme(c,l,i),v=Bte(m,a),C=r[l][i];return[Object.assign(Object.assign({},C),{nextLevelNodes:v[0]}),C.thickness+v[1]]});return Bte(r.length?{level:0,lateralStart:0,lateralEnd:r[0].length}:null,a)[0]}function Bte(c,r){if(!c)return[[],0];let{level:a,lateralStart:l,lateralEnd:i}=c,m=l,v=[];for(;m<i;)v.push(r(a,m)),m+=1;return v.sort(qme),[v.map(Kme),v[0][1]]}function qme(c,r){return r[1]-c[1]}function Kme(c){return c[0]}function Yme(c,r,a){let{levelCoords:l,entriesByLevel:i}=c,m=i[r][a],v=l[r]+m.thickness,C=l.length,E=r;for(;E<C&&l[E]<v;E+=1);for(;E<C;E+=1){let T=i[E],N,V=eV(T,m.span.start,X$),U=V[0]+V[1],z=U;for(;(N=T[z])&&N.span.start<m.span.end;)z+=1;if(U<z)return{level:E,lateralStart:U,lateralEnd:z}}return null}function Xme(c,r){const a=mV((l,i,m)=>Y2(l),(l,i,m)=>{let{nextLevelNodes:v,thickness:C}=l,E=C+m,T=C/E,N,V=[];if(!v.length)N=r;else for(let z of v)if(N===void 0){let W=a(z,i,E);N=W[0],V.push(W[1])}else{let W=a(z,N,0);V.push(W[1])}let U=(N-i)*T;return[N-U,Object.assign(Object.assign({},l),{thickness:U,nextLevelNodes:V})]});return c.map(l=>a(l,0,0)[1])}function Qme(c){let r=[];const a=mV((i,m,v)=>Y2(i),(i,m,v)=>{let C=Object.assign(Object.assign({},i),{levelCoord:m,stackDepth:v,stackForward:0});return r.push(C),C.stackForward=l(i.nextLevelNodes,m+i.thickness,v+1)+1});function l(i,m,v){let C=0;for(let E of i)C=Math.max(a(E,m,v),C);return C}return l(c,0,0),r}function mV(c,r){const a={};return(...l)=>{let i=c(...l);return i in a?a[i]:a[i]=r(...l)}}function Mte(c,r,a=null,l=0){let i=[];if(a)for(let m=0;m<c.length;m+=1){let v=c[m],C=a.computeDateTop(v.start,r),E=Math.max(C+(l||0),a.computeDateTop(v.end,r));i.push({start:Math.round(C),end:Math.round(E)})}return i}function Jme(c,r,a,l){let i=[],m=[];for(let T=0;T<c.length;T+=1){let N=r[T];N?i.push({index:T,thickness:1,span:N}):m.push(c[T])}let{segRects:v,hiddenGroups:C}=Gme(i,a,l),E=[];for(let T of v)E.push({seg:c[T.index],rect:T});for(let T of m)E.push({seg:T,rect:null});return{segPlacements:E,hiddenGroups:C}}const ehe=El({hour:"numeric",minute:"2-digit",meridiem:!1});class Pte extends Li{render(){return rt(Qee,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ehe}))}}class the extends Li{constructor(){super(...arguments),this.sortEventSegs=Ms(Aee)}render(){let{props:r,context:a}=this,{options:l}=a,i=l.selectMirror,m=r.eventDrag&&r.eventDrag.segs||r.eventResize&&r.eventResize.segs||i&&r.dateSelectionSegs||[],v=r.eventDrag&&r.eventDrag.affectedInstances||r.eventResize&&r.eventResize.affectedInstances||{},C=this.sortEventSegs(r.fgEventSegs,l.eventOrder);return rt(aV,{elTag:"td",elRef:r.elRef,elClasses:["fc-timegrid-col",...r.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},r.extraDataAttrs),date:r.date,dateProfile:r.dateProfile,todayRange:r.todayRange,extraRenderProps:r.extraRenderProps},E=>rt("div",{className:"fc-timegrid-col-frame"},rt("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(r.businessHourSegs,"non-business"),this.renderFillSegs(r.bgEventSegs,"bg-event"),this.renderFillSegs(r.dateSelectionSegs,"highlight")),rt("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(C,v,!1,!1,!1)),rt("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(m,{},!!r.eventDrag,!!r.eventResize,!!i,"mirror")),rt("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(r.nowIndicatorSegs)),lV(l)&&rt(E,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(r,a,l,i,m,v){let{props:C}=this;return C.forPrint?Lte(r,C):this.renderPositionedFgSegs(r,a,l,i,m,v)}renderPositionedFgSegs(r,a,l,i,m,v){let{eventMaxStack:C,eventShortHeight:E,eventOrderStrict:T,eventMinHeight:N}=this.context.options,{date:V,slatCoords:U,eventSelection:z,todayRange:W,nowDate:K}=this.props,Z=l||i||m,ce=Mte(r,V,U,N),{segPlacements:q,hiddenGroups:X}=Jme(r,ce,T,C);return rt(Ya,null,this.renderHiddenGroups(X,r),q.map(Ce=>{let{seg:st,rect:Ne}=Ce,ee=st.eventRange.instance.instanceId,xe=Z||!!(!a[ee]&&Ne),et=hV(Ne&&Ne.span),tt=!Z&&Ne?this.computeSegHStyle(Ne):{left:0,right:0},je=!!Ne&&Ne.stackForward>0,be=!!Ne&&Ne.span.end-Ne.span.start<E;return rt("div",{className:"fc-timegrid-event-harness"+(je?" fc-timegrid-event-harness-inset":""),key:v||ee,style:Object.assign(Object.assign({visibility:xe?"":"hidden"},et),tt)},rt(Pte,Object.assign({seg:st,isDragging:l,isResizing:i,isDateSelecting:m,isSelected:ee===z,isShort:be},oy(st,W,K))))}))}renderHiddenGroups(r,a){let{extraDateSpan:l,dateProfile:i,todayRange:m,nowDate:v,eventSelection:C,eventDrag:E,eventResize:T}=this.props;return rt(Ya,null,r.map(N=>{let V=hV(N.span),U=nhe(N.entries,a);return rt(Wme,{key:ZJ(ste(U)),hiddenSegs:U,top:V.top,bottom:V.bottom,extraDateSpan:l,dateProfile:i,todayRange:m,nowDate:v,eventSelection:C,eventDrag:E,eventResize:T})}))}renderFillSegs(r,a){let{props:l,context:i}=this,v=Mte(r,l.date,l.slatCoords,i.options.eventMinHeight).map((C,E)=>{let T=r[E];return rt("div",{key:Dee(T.eventRange),className:"fc-timegrid-bg-harness",style:hV(C)},a==="bg-event"?rt(Jee,Object.assign({seg:T},oy(T,l.todayRange,l.nowDate))):ete(a))});return rt(Ya,null,v)}renderNowIndicator(r){let{slatCoords:a,date:l}=this.props;return a?r.map((i,m)=>rt(iV,{key:m,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:a.computeDateTop(i.start,l)},isAxis:!1,date:l})):null}computeSegHStyle(r){let{isRtl:a,options:l}=this.context,i=l.slotEventOverlap,m=r.levelCoord,v=r.levelCoord+r.thickness,C,E;i&&(v=Math.min(1,m+(v-m)*2)),a?(C=1-v,E=m):(C=m,E=1-v);let T={zIndex:r.stackDepth+1,left:C*100+"%",right:E*100+"%"};return i&&!r.stackForward&&(T[a?"marginLeft":"marginRight"]=10*2),T}}function Lte(c,{todayRange:r,nowDate:a,eventSelection:l,eventDrag:i,eventResize:m}){let v=(i?i.affectedInstances:null)||(m?m.affectedInstances:null)||{};return rt(Ya,null,c.map(C=>{let E=C.eventRange.instance.instanceId;return rt("div",{key:E,style:{visibility:v[E]?"hidden":""}},rt(Pte,Object.assign({seg:C,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:E===l,isShort:!1},oy(C,r,a))))}))}function hV(c){return c?{top:c.start,bottom:-c.end}:{top:"",bottom:""}}function nhe(c,r){return c.map(a=>r[a.index])}class ohe extends Li{constructor(){super(...arguments),this.splitFgEventSegs=Ms(mA),this.splitBgEventSegs=Ms(mA),this.splitBusinessHourSegs=Ms(mA),this.splitNowIndicatorSegs=Ms(mA),this.splitDateSelectionSegs=Ms(mA),this.splitEventDrag=Ms(Ite),this.splitEventResize=Ms(Ite),this.rootElRef=Bd(),this.cellElRefs=new X1}render(){let{props:r,context:a}=this,l=a.options.nowIndicator&&r.slatCoords&&r.slatCoords.safeComputeTop(r.nowDate),i=r.cells.length,m=this.splitFgEventSegs(r.fgEventSegs,i),v=this.splitBgEventSegs(r.bgEventSegs,i),C=this.splitBusinessHourSegs(r.businessHourSegs,i),E=this.splitNowIndicatorSegs(r.nowIndicatorSegs,i),T=this.splitDateSelectionSegs(r.dateSelectionSegs,i),N=this.splitEventDrag(r.eventDrag,i),V=this.splitEventResize(r.eventResize,i);return rt("div",{className:"fc-timegrid-cols",ref:this.rootElRef},rt("table",{role:"presentation",style:{minWidth:r.tableMinWidth,width:r.clientWidth}},r.tableColGroupNode,rt("tbody",{role:"presentation"},rt("tr",{role:"row"},r.axis&&rt("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},rt("div",{className:"fc-timegrid-col-frame"},rt("div",{className:"fc-timegrid-now-indicator-container"},typeof l=="number"&&rt(iV,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:l},isAxis:!0,date:r.nowDate})))),r.cells.map((U,z)=>rt(the,{key:U.key,elRef:this.cellElRefs.createRef(U.key),dateProfile:r.dateProfile,date:U.date,nowDate:r.nowDate,todayRange:r.todayRange,extraRenderProps:U.extraRenderProps,extraDataAttrs:U.extraDataAttrs,extraClassNames:U.extraClassNames,extraDateSpan:U.extraDateSpan,fgEventSegs:m[z],bgEventSegs:v[z],businessHourSegs:C[z],nowIndicatorSegs:E[z],dateSelectionSegs:T[z],eventDrag:N[z],eventResize:V[z],slatCoords:r.slatCoords,eventSelection:r.eventSelection,forPrint:r.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:r}=this;r.onColCoords&&r.clientWidth!==null&&r.onColCoords(new US(this.rootElRef.current,she(this.cellElRefs.currentMap,r.cells),!0,!1))}}function she(c,r){return r.map(a=>c[a.key])}class rhe extends wp{constructor(){super(...arguments),this.processSlotOptions=Ms(ihe),this.state={slatCoords:null},this.handleRootEl=r=>{r?this.context.registerInteractiveComponent(this,{el:r,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=r=>{let{onScrollTopRequest:a}=this.props,{slatCoords:l}=this.state;if(a&&l){if(r.time){let i=l.computeTimeTop(r.time);i=Math.ceil(i),i&&(i+=1),a(i)}return!0}return!1},this.handleColCoords=r=>{this.colCoords=r},this.handleSlatCoords=r=>{this.setState({slatCoords:r}),this.props.onSlatCoords&&this.props.onSlatCoords(r)}}render(){let{props:r,state:a}=this;return rt("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:r.clientWidth,minWidth:r.tableMinWidth}},rt(zme,{axis:r.axis,dateProfile:r.dateProfile,slatMetas:r.slatMetas,clientWidth:r.clientWidth,minHeight:r.expandRows?r.clientHeight:"",tableMinWidth:r.tableMinWidth,tableColGroupNode:r.axis?r.tableColGroupNode:null,onCoords:this.handleSlatCoords}),rt(ohe,{cells:r.cells,axis:r.axis,dateProfile:r.dateProfile,businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,fgEventSegs:r.fgEventSegs,dateSelectionSegs:r.dateSelectionSegs,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,todayRange:r.todayRange,nowDate:r.nowDate,nowIndicatorSegs:r.nowIndicatorSegs,clientWidth:r.clientWidth,tableMinWidth:r.tableMinWidth,tableColGroupNode:r.tableColGroupNode,slatCoords:a.slatCoords,onColCoords:this.handleColCoords,forPrint:r.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(r){this.scrollResponder.update(r.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(r,a){let{dateEnv:l,options:i}=this.context,{colCoords:m}=this,{dateProfile:v}=this.props,{slatCoords:C}=this.state,{snapDuration:E,snapsPerSlot:T}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),N=m.leftToIndex(r),V=C.positions.topToIndex(a);if(N!=null&&V!=null){let U=this.props.cells[N],z=C.positions.tops[V],W=C.positions.getHeight(V),K=(a-z)/W,Z=Math.floor(K*T),ce=V*T+Z,q=this.props.cells[N].date,X=b$(v.slotMinTime,Jle(E,ce)),Ce=l.add(q,X),st=l.add(Ce,E);return{dateProfile:v,dateSpan:Object.assign({range:{start:Ce,end:st},allDay:!1},U.extraDateSpan),dayEl:m.els[N],rect:{left:m.lefts[N],right:m.rights[N],top:z,bottom:z+W},layer:0}}return null}}function ihe(c,r){let a=r||c,l=C$(c,a);return l===null&&(a=c,l=1),{snapDuration:a,snapsPerSlot:l}}class ahe extends Gee{sliceRange(r,a){let l=[];for(let i=0;i<a.length;i+=1){let m=Z2(r,a[i]);m&&l.push({start:m.start,end:m.end,isStart:m.start.valueOf()===r.start.valueOf(),isEnd:m.end.valueOf()===r.end.valueOf(),col:i})}return l}}class lhe extends wp{constructor(){super(...arguments),this.buildDayRanges=Ms(che),this.slicer=new ahe,this.timeColsRef=Bd()}render(){let{props:r,context:a}=this,{dateProfile:l,dayTableModel:i}=r,{nowIndicator:m,nextDayThreshold:v}=a.options,C=this.buildDayRanges(i,l,a.dateEnv);return rt(fA,{unit:m?"minute":"day"},(E,T)=>rt(rhe,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(r,l,null,a,C),{forPrint:r.forPrint,axis:r.axis,dateProfile:l,slatMetas:r.slatMetas,slotDuration:r.slotDuration,cells:i.cells[0],tableColGroupNode:r.tableColGroupNode,tableMinWidth:r.tableMinWidth,clientWidth:r.clientWidth,clientHeight:r.clientHeight,expandRows:r.expandRows,nowDate:E,nowIndicatorSegs:m&&this.slicer.sliceNowDate(E,l,v,a,C),todayRange:T,onScrollTopRequest:r.onScrollTopRequest,onSlatCoords:r.onSlatCoords})))}}function che(c,r,a){let l=[];for(let i of c.headerDates)l.push({start:a.add(i,r.slotMinTime),end:a.add(i,r.slotMaxTime)});return l}const Fte=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function uhe(c,r,a,l,i){let m=new Date(0),v=c,C=ni(0),E=a||dhe(l),T=[];for(;rg(v)<rg(r);){let N=i.add(m,v),V=C$(C,E)!==null;T.push({date:N,time:v,key:N.toISOString(),isoTimeStr:gce(N),isLabeled:V}),v=b$(v,l),C=b$(C,l)}return T}function dhe(c){let r,a,l;for(r=Fte.length-1;r>=0;r-=1)if(a=ni(Fte[r]),l=C$(a,c),l!==null&&l>1)return a;return c}class fhe extends Fme{constructor(){super(...arguments),this.buildTimeColsModel=Ms(mhe),this.buildSlatMetas=Ms(uhe)}render(){let{options:r,dateEnv:a,dateProfileGenerator:l}=this.context,{props:i}=this,{dateProfile:m}=i,v=this.buildTimeColsModel(m,l),C=this.allDaySplitter.splitProps(i),E=this.buildSlatMetas(m.slotMinTime,m.slotMaxTime,r.slotLabelInterval,r.slotDuration,a),{dayMinWidth:T}=r,N=!T,V=T,U=r.dayHeaders&&rt(Uee,{dates:v.headerDates,dateProfile:m,datesRepDistinctDays:!0,renderIntro:N?this.renderHeadAxis:null}),z=r.allDaySlot!==!1&&(K=>rt(Rte,Object.assign({},C.allDay,{dateProfile:m,dayTableModel:v,nextDayThreshold:r.nextDayThreshold,tableMinWidth:K.tableMinWidth,colGroupNode:K.tableColGroupNode,renderRowIntro:N?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:K.clientWidth,clientHeight:K.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),W=K=>rt(lhe,Object.assign({},C.timed,{dayTableModel:v,dateProfile:m,axis:N,slotDuration:r.slotDuration,slatMetas:E,forPrint:i.forPrint,tableColGroupNode:K.tableColGroupNode,tableMinWidth:K.tableMinWidth,clientWidth:K.clientWidth,clientHeight:K.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:K.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return V?this.renderHScrollLayout(U,z,W,v.colCnt,T,E,this.state.slatCoords):this.renderSimpleLayout(U,z,W)}}function mhe(c,r){let a=new Wee(c.renderRange,r);return new jee(a,!1)}var hhe='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';m$(hhe);var $te=Q1({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:fhe,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});tV.touchMouseIgnoreWait=500;let gV=0,kO=0,pV=!1;class Vte{constructor(r){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=a=>{if(!this.shouldIgnoreMouse()&&ghe(a)&&this.tryStart(a)){let l=this.createEventFromMouse(a,!0);this.emitter.trigger("pointerdown",l),this.initScrollWatch(l),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=a=>{let l=this.createEventFromMouse(a);this.recordCoords(l),this.emitter.trigger("pointermove",l)},this.handleMouseUp=a=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(a)),this.cleanup()},this.handleTouchStart=a=>{if(this.tryStart(a)){this.isTouchDragging=!0;let l=this.createEventFromTouch(a,!0);this.emitter.trigger("pointerdown",l),this.initScrollWatch(l);let i=a.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=a=>{let l=this.createEventFromTouch(a);this.recordCoords(l),this.emitter.trigger("pointermove",l)},this.handleTouchEnd=a=>{if(this.isDragging){let l=a.target;l.removeEventListener("touchmove",this.handleTouchMove),l.removeEventListener("touchend",this.handleTouchEnd),l.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(a)),this.cleanup(),this.isTouchDragging=!1,phe()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=a=>{if(!this.shouldIgnoreMove){let l=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:a,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:l,pageY:i,deltaX:l-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=r,this.emitter=new pO,r.addEventListener("mousedown",this.handleMouseDown),r.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),vhe()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),yhe()}tryStart(r){let a=this.querySubjectEl(r),l=r.target;return a&&(!this.handleSelector||td(l,this.handleSelector))?(this.subjectEl=a,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){pV=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(r){return this.selector?td(r.target,this.selector):this.containerEl}shouldIgnoreMouse(){return gV||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(pV=!0)}initScrollWatch(r){this.shouldWatchScroll&&(this.recordCoords(r),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(r){this.shouldWatchScroll&&(this.prevPageX=r.pageX,this.prevPageY=r.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(r,a){let l=0,i=0;return a?(this.origPageX=r.pageX,this.origPageY=r.pageY):(l=r.pageX-this.origPageX,i=r.pageY-this.origPageY),{origEvent:r,isTouch:!1,subjectEl:this.subjectEl,pageX:r.pageX,pageY:r.pageY,deltaX:l,deltaY:i}}createEventFromTouch(r,a){let l=r.touches,i,m,v=0,C=0;return l&&l.length?(i=l[0].pageX,m=l[0].pageY):(i=r.pageX,m=r.pageY),a?(this.origPageX=i,this.origPageY=m):(v=i-this.origPageX,C=m-this.origPageY),{origEvent:r,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:m,deltaX:v,deltaY:C}}}function ghe(c){return c.button===0&&!c.ctrlKey}function phe(){gV+=1,setTimeout(()=>{gV-=1},tV.touchMouseIgnoreWait)}function vhe(){kO+=1,kO===1&&window.addEventListener("touchmove",Hte,{passive:!1})}function yhe(){kO-=1,kO||window.removeEventListener("touchmove",Hte,{passive:!1})}function Hte(c){pV&&c.preventDefault()}class bhe{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(r,a,l){this.sourceEl=r,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=a-window.scrollX,this.origScreenY=l-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(r,a){this.deltaX=r-window.scrollX-this.origScreenX,this.deltaY=a-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(r){r?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=r,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=r)}stop(r,a){let l=()=>{this.cleanup(),a()};r&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(l,this.revertDuration):setTimeout(l,0)}doRevertAnimation(r,a){let l=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();l.style.transition="top "+a+"ms,left "+a+"ms",iA(l,{left:i.left,top:i.top}),Fle(l,()=>{l.style.transition="",r()})}cleanup(){this.mirrorEl&&(p$(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&iA(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let r=this.sourceElRect,a=this.mirrorEl;return a||(a=this.mirrorEl=this.sourceEl.cloneNode(!0),a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.pointerEvents="none",a.classList.add("fc-event-dragging"),iA(a,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:r.right-r.left,height:r.bottom-r.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(a)),a}}class zte extends Y${constructor(r,a){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=r,this.doesListening=a,this.scrollTop=this.origScrollTop=r.getScrollTop(),this.scrollLeft=this.origScrollLeft=r.getScrollLeft(),this.scrollWidth=r.getScrollWidth(),this.scrollHeight=r.getScrollHeight(),this.clientWidth=r.getClientWidth(),this.clientHeight=r.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(r){this.scrollController.setScrollTop(r),this.doesListening||(this.scrollTop=Math.max(Math.min(r,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(r){this.scrollController.setScrollLeft(r),this.doesListening||(this.scrollLeft=Math.max(Math.min(r,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class Ute extends zte{constructor(r,a){super(new lde(r),a)}getEventTarget(){return this.scrollController.el}computeClientRect(){return ide(this.scrollController.el)}}class Che extends zte{constructor(r){super(new cde,r)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const Wte=typeof performance=="function"?performance.now:Date.now;class _he{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let r=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(r){let a=Wte();this.handleSide(r,(a-this.msSinceRequest)/1e3),this.requestAnimation(a)}else this.isAnimating=!1}}}start(r,a,l){this.isEnabled&&(this.scrollCaches=this.buildCaches(l),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(r,a))}handleMove(r,a){if(this.isEnabled){let l=r-window.scrollX,i=a-window.scrollY,m=this.pointerScreenY===null?0:i-this.pointerScreenY,v=this.pointerScreenX===null?0:l-this.pointerScreenX;m<0?this.everMovedUp=!0:m>0&&(this.everMovedDown=!0),v<0?this.everMovedLeft=!0:v>0&&(this.everMovedRight=!0),this.pointerScreenX=l,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Wte()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let r of this.scrollCaches)r.destroy();this.scrollCaches=null}}requestAnimation(r){this.msSinceRequest=r,requestAnimationFrame(this.animate)}handleSide(r,a){let{scrollCache:l}=r,{edgeThreshold:i}=this,m=i-r.distance,v=m*m/(i*i)*this.maxVelocity*a,C=1;switch(r.name){case"left":C=-1;case"right":l.setScrollLeft(l.getScrollLeft()+v*C);break;case"top":C=-1;case"bottom":l.setScrollTop(l.getScrollTop()+v*C);break}}computeBestEdge(r,a){let{edgeThreshold:l}=this,i=null,m=this.scrollCaches||[];for(let v of m){let C=v.clientRect,E=r-C.left,T=C.right-r,N=a-C.top,V=C.bottom-a;E>=0&&T>=0&&N>=0&&V>=0&&(N<=l&&this.everMovedUp&&v.canScrollUp()&&(!i||i.distance>N)&&(i={scrollCache:v,name:"top",distance:N}),V<=l&&this.everMovedDown&&v.canScrollDown()&&(!i||i.distance>V)&&(i={scrollCache:v,name:"bottom",distance:V}),E<=l&&this.everMovedLeft&&v.canScrollLeft()&&(!i||i.distance>E)&&(i={scrollCache:v,name:"left",distance:E}),T<=l&&this.everMovedRight&&v.canScrollRight()&&(!i||i.distance>T)&&(i={scrollCache:v,name:"right",distance:T}))}return i}buildCaches(r){return this.queryScrollEls(r).map(a=>a===window?new Che(!1):new Ute(a,!1))}queryScrollEls(r){let a=[];for(let l of this.scrollQuery)typeof l=="object"?a.push(l):a.push(...Array.prototype.slice.call(r.getRootNode().querySelectorAll(l)));return a}}class hA extends fde{constructor(r,a){super(r),this.containerEl=r,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,$le(document.body),Hle(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let m=this.minDistance,v,{deltaX:C,deltaY:E}=i;v=C*C+E*E,v>=m*m&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,Vle(document.body),zle(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let l=this.pointer=new Vte(r);l.emitter.on("pointerdown",this.onPointerDown),l.emitter.on("pointermove",this.onPointerMove),l.emitter.on("pointerup",this.onPointerUp),a&&(l.selector=a),this.mirror=new bhe,this.autoScroller=new _he}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(r){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(r)},this.delay):this.handleDelayEnd(r)}handleDelayEnd(r){this.isDelayEnded=!0,this.tryStartDrag(r)}handleDistanceSurpassed(r){this.isDistanceSurpassed=!0,this.tryStartDrag(r)}tryStartDrag(r){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(r.pageX,r.pageY,this.containerEl),this.emitter.trigger("dragstart",r),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(r){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,r))}stopDrag(r){this.isDragging=!1,this.emitter.trigger("dragend",r)}setIgnoreMove(r){this.pointer.shouldIgnoreMove=r}setMirrorIsVisible(r){this.mirror.setIsVisible(r)}setMirrorNeedsRevert(r){this.mirrorNeedsRevert=r}setAutoScrollEnabled(r){this.autoScroller.isEnabled=r}}class whe{constructor(r){this.el=r,this.origRect=K$(r),this.scrollCaches=Fee(r).map(a=>new Ute(a,!0))}destroy(){for(let r of this.scrollCaches)r.destroy()}computeLeft(){let r=this.origRect.left;for(let a of this.scrollCaches)r+=a.origScrollLeft-a.getScrollLeft();return r}computeTop(){let r=this.origRect.top;for(let a of this.scrollCaches)r+=a.origScrollTop-a.getScrollTop();return r}isWithinClipping(r,a){let l={left:r,top:a};for(let i of this.scrollCaches)if(!She(i.getEventTarget())&&!Zue(l,i.clientRect))return!1;return!0}}function She(c){let r=c.tagName;return r==="HTML"||r==="BODY"}class xO{constructor(r,a){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=l=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(l),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",l)):i.setIgnoreMove(!0)},this.handleDragStart=l=>{this.emitter.trigger("dragstart",l),this.handleMove(l,!0)},this.handleDragMove=l=>{this.emitter.trigger("dragmove",l),this.handleMove(l)},this.handlePointerUp=l=>{this.releaseHits(),this.emitter.trigger("pointerup",l)},this.handleDragEnd=l=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,l),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",l)},this.droppableStore=a,r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("dragmove",this.handleDragMove),r.emitter.on("pointerup",this.handlePointerUp),r.emitter.on("dragend",this.handleDragEnd),this.dragging=r,this.emitter=new pO}processFirstCoord(r){let a={left:r.pageX,top:r.pageY},l=a,i=r.subjectEl,m;i instanceof HTMLElement&&(m=K$(i),l=que(l,m));let v=this.initialHit=this.queryHitForOffset(l.left,l.top);if(v){if(this.useSubjectCenter&&m){let C=Mee(m,v.rect);C&&(l=Kue(C))}this.coordAdjust=Yue(l,a)}else this.coordAdjust={left:0,top:0}}handleMove(r,a){let l=this.queryHitForOffset(r.pageX+this.coordAdjust.left,r.pageY+this.coordAdjust.top);(a||!AO(this.movingHit,l))&&(this.movingHit=l,this.emitter.trigger("hitupdate",l,!1,r))}prepareHits(){this.offsetTrackers=Z1(this.droppableStore,r=>(r.component.prepareHits(),new whe(r.el)))}releaseHits(){let{offsetTrackers:r}=this;for(let a in r)r[a].destroy();this.offsetTrackers={}}queryHitForOffset(r,a){let{droppableStore:l,offsetTrackers:i}=this,m=null;for(let v in l){let C=l[v].component,E=i[v];if(E&&E.isWithinClipping(r,a)){let T=E.computeLeft(),N=E.computeTop(),V=r-T,U=a-N,{origRect:z}=E,W=z.right-z.left,K=z.bottom-z.top;if(V>=0&&V<W&&U>=0&&U<K){let Z=C.queryHit(V,U,W,K);Z&&dO(Z.dateProfile.activeRange,Z.dateSpan.range)&&(this.disablePointCheck||E.el.contains(document.elementFromPoint(V+T-window.scrollX,U+N-window.scrollY)))&&(!m||Z.layer>m.layer)&&(Z.componentId=v,Z.context=C.context,Z.rect.left+=T,Z.rect.right+=T,Z.rect.top+=N,Z.rect.bottom+=N,m=Z)}}}return m}}function AO(c,r){return!c&&!r?!0:!!c!=!!r?!1:Lue(c.dateSpan,r.dateSpan)}function jte(c,r){let a={};for(let l of r.pluginHooks.datePointTransforms)Object.assign(a,l(c,r));return Object.assign(a,Ehe(c,r.dateEnv)),a}function Ehe(c,r){return{date:r.toDate(c.range.start),dateStr:r.formatIso(c.range.start,{omitTime:c.allDay}),allDay:c.allDay}}class khe extends zS{constructor(r){super(r),this.handlePointerDown=l=>{let{dragging:i}=this,m=l.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(m))},this.handleDragEnd=l=>{let{component:i}=this,{pointer:m}=this.dragging;if(!m.wasTouchScroll){let{initialHit:v,finalHit:C}=this.hitDragging;if(v&&C&&AO(v,C)){let{context:E}=i,T=Object.assign(Object.assign({},jte(v.dateSpan,E)),{dayEl:v.dayEl,jsEvent:l.origEvent,view:E.viewApi||E.calendarApi.view});E.emitter.trigger("dateClick",T)}}},this.dragging=new hA(r.el),this.dragging.autoScroller.isEnabled=!1;let a=this.hitDragging=new xO(this.dragging,U$(r));a.emitter.on("pointerdown",this.handlePointerDown),a.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class xhe extends zS{constructor(r){super(r),this.dragSelection=null,this.handlePointerDown=v=>{let{component:C,dragging:E}=this,{options:T}=C.context,N=T.selectable&&C.isValidDateDownEl(v.origEvent.target);E.setIgnoreMove(!N),E.delay=v.isTouch?Ahe(C):null},this.handleDragStart=v=>{this.component.context.calendarApi.unselect(v)},this.handleHitUpdate=(v,C)=>{let{context:E}=this.component,T=null,N=!1;if(v){let V=this.hitDragging.initialHit;v.componentId===V.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(V,v)||(T=The(V,v,E.pluginHooks.dateSelectionTransformers)),(!T||!yde(T,v.dateProfile,E))&&(N=!0,T=null)}T?E.dispatch({type:"SELECT_DATES",selection:T}):C||E.dispatch({type:"UNSELECT_DATES"}),N?v$():y$(),C||(this.dragSelection=T)},this.handlePointerUp=v=>{this.dragSelection&&(_ee(this.dragSelection,v,this.component.context),this.dragSelection=null)};let{component:a}=r,{options:l}=a.context,i=this.dragging=new hA(r.el);i.touchScrollAllowed=!1,i.minDistance=l.selectMinDistance||0,i.autoScroller.isEnabled=l.dragScroll;let m=this.hitDragging=new xO(this.dragging,U$(r));m.emitter.on("pointerdown",this.handlePointerDown),m.emitter.on("dragstart",this.handleDragStart),m.emitter.on("hitupdate",this.handleHitUpdate),m.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Ahe(c){let{options:r}=c.context,a=r.selectLongPressDelay;return a==null&&(a=r.longPressDelay),a}function The(c,r,a){let l=c.dateSpan,i=r.dateSpan,m=[l.range.start,l.range.end,i.range.start,i.range.end];m.sort(Zle);let v={};for(let C of a){let E=C(c,r);if(E===!1)return null;E&&Object.assign(v,E)}return v.range={start:m[0],end:m[3]},v.allDay=l.allDay,v}class gA extends zS{constructor(r){super(r),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=v=>{let C=v.origEvent.target,{component:E,dragging:T}=this,{mirror:N}=T,{options:V}=E.context,U=E.context;this.subjectEl=v.subjectEl;let z=this.subjectSeg=HS(v.subjectEl),K=(this.eventRange=z.eventRange).instance.instanceId;this.relevantEvents=F$(U.getCurrentData().eventStore,K),T.minDistance=v.isTouch?0:V.eventDragMinDistance,T.delay=v.isTouch&&K!==E.props.eventSelection?Rhe(E):null,V.fixedMirrorParent?N.parentNode=V.fixedMirrorParent:N.parentNode=td(C,".fc"),N.revertDuration=V.dragRevertDuration;let Z=E.isValidSegDownEl(C)&&!td(C,".fc-event-resizer");T.setIgnoreMove(!Z),this.isDragging=Z&&v.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=v=>{let C=this.component.context,E=this.eventRange,T=E.instance.instanceId;v.isTouch?T!==this.component.props.eventSelection&&C.dispatch({type:"SELECT_EVENT",eventInstanceId:T}):C.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(C.calendarApi.unselect(v),C.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new fl(C,E.def,E.instance),jsEvent:v.origEvent,view:C.viewApi}))},this.handleHitUpdate=(v,C)=>{if(!this.isDragging)return;let E=this.relevantEvents,T=this.hitDragging.initialHit,N=this.component.context,V=null,U=null,z=null,W=!1,K={affectedEvents:E,mutatedEvents:im(),isEvent:!0};if(v){V=v.context;let Z=V.options;N===V||Z.editable&&Z.droppable?(U=Dhe(T,v,this.eventRange.instance.range.start,V.getCurrentData().pluginHooks.eventDragMutationMassagers),U&&(z=H$(E,V.getCurrentData().eventUiBases,U,V),K.mutatedEvents=z,Zee(K,v.dateProfile,V)||(W=!0,U=null,z=null,K.mutatedEvents=im()))):V=null}this.displayDrag(V,K),W?v$():y$(),C||(N===V&&AO(T,v)&&(U=null),this.dragging.setMirrorNeedsRevert(!U),this.dragging.setMirrorIsVisible(!v||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=V,this.validMutation=U,this.mutatedRelevantEvents=z)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=v=>{if(this.isDragging){let C=this.component.context,E=C.viewApi,{receivingContext:T,validMutation:N}=this,V=this.eventRange.def,U=this.eventRange.instance,z=new fl(C,V,U),W=this.relevantEvents,K=this.mutatedRelevantEvents,{finalHit:Z}=this.hitDragging;if(this.clearDrag(),C.emitter.trigger("eventDragStop",{el:this.subjectEl,event:z,jsEvent:v.origEvent,view:E}),N){if(T===C){let ce=new fl(C,K.defs[V.defId],U?K.instances[U.instanceId]:null);C.dispatch({type:"MERGE_EVENTS",eventStore:K});let q={oldEvent:z,event:ce,relatedEvents:K2(K,C,U),revert(){C.dispatch({type:"MERGE_EVENTS",eventStore:W})}},X={};for(let Ce of C.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(X,Ce(N,C));C.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},q),X),{el:v.subjectEl,delta:N.datesDelta,jsEvent:v.origEvent,view:E})),C.emitter.trigger("eventChange",q)}else if(T){let ce={event:z,relatedEvents:K2(W,C,U),revert(){C.dispatch({type:"MERGE_EVENTS",eventStore:W})}};C.emitter.trigger("eventLeave",Object.assign(Object.assign({},ce),{draggedEl:v.subjectEl,view:E})),C.dispatch({type:"REMOVE_EVENTS",eventStore:W}),C.emitter.trigger("eventRemove",ce);let q=K.defs[V.defId],X=K.instances[U.instanceId],Ce=new fl(T,q,X);T.dispatch({type:"MERGE_EVENTS",eventStore:K});let st={event:Ce,relatedEvents:K2(K,T,X),revert(){T.dispatch({type:"REMOVE_EVENTS",eventStore:K})}};T.emitter.trigger("eventAdd",st),v.isTouch&&T.dispatch({type:"SELECT_EVENT",eventInstanceId:U.instanceId}),T.emitter.trigger("drop",Object.assign(Object.assign({},jte(Z.dateSpan,T)),{draggedEl:v.subjectEl,jsEvent:v.origEvent,view:Z.context.viewApi})),T.emitter.trigger("eventReceive",Object.assign(Object.assign({},st),{draggedEl:v.subjectEl,view:Z.context.viewApi}))}}else C.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:a}=this,{options:l}=a.context,i=this.dragging=new hA(r.el);i.pointer.selector=gA.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=l.dragScroll;let m=this.hitDragging=new xO(this.dragging,W$);m.useSubjectCenter=r.useEventCenter,m.emitter.on("pointerdown",this.handlePointerDown),m.emitter.on("dragstart",this.handleDragStart),m.emitter.on("hitupdate",this.handleHitUpdate),m.emitter.on("pointerup",this.handlePointerUp),m.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(r,a){let l=this.component.context,i=this.receivingContext;i&&i!==r&&(i===l?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:a.affectedEvents,mutatedEvents:im(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),r&&r.dispatch({type:"SET_EVENT_DRAG",state:a})}clearDrag(){let r=this.component.context,{receivingContext:a}=this;a&&a.dispatch({type:"UNSET_EVENT_DRAG"}),r!==a&&r.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}gA.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Dhe(c,r,a,l){let i=c.dateSpan,m=r.dateSpan,v=i.range.start,C=m.range.start,E={};i.allDay!==m.allDay&&(E.allDay=m.allDay,E.hasEnd=r.context.options.allDayMaintainDuration,m.allDay?v=Oa(a):v=a);let T=$S(v,C,c.context.dateEnv,c.componentId===r.componentId?c.largeUnit:null);T.milliseconds&&(E.allDay=!1);let N={datesDelta:T,standardProps:E};for(let V of l)V(N,c,r);return N}function Rhe(c){let{options:r}=c.context,a=r.eventLongPressDelay;return a==null&&(a=r.longPressDelay),a}class Ohe extends zS{constructor(r){super(r),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=m=>{let{component:v}=this,C=this.querySegEl(m),E=HS(C),T=this.eventRange=E.eventRange;this.dragging.minDistance=v.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(m.origEvent.target)||m.isTouch&&this.component.props.eventSelection!==T.instance.instanceId)},this.handleDragStart=m=>{let{context:v}=this.component,C=this.eventRange;this.relevantEvents=F$(v.getCurrentData().eventStore,this.eventRange.instance.instanceId);let E=this.querySegEl(m);this.draggingSegEl=E,this.draggingSeg=HS(E),v.calendarApi.unselect(),v.emitter.trigger("eventResizeStart",{el:E,event:new fl(v,C.def,C.instance),jsEvent:m.origEvent,view:v.viewApi})},this.handleHitUpdate=(m,v,C)=>{let{context:E}=this.component,T=this.relevantEvents,N=this.hitDragging.initialHit,V=this.eventRange.instance,U=null,z=null,W=!1,K={affectedEvents:T,mutatedEvents:im(),isEvent:!0};m&&(m.componentId===N.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(N,m)||(U=Nhe(N,m,C.subjectEl.classList.contains("fc-event-resizer-start"),V.range))),U&&(z=H$(T,E.getCurrentData().eventUiBases,U,E),K.mutatedEvents=z,Zee(K,m.dateProfile,E)||(W=!0,U=null,z=null,K.mutatedEvents=null)),z?E.dispatch({type:"SET_EVENT_RESIZE",state:K}):E.dispatch({type:"UNSET_EVENT_RESIZE"}),W?v$():y$(),v||(U&&AO(N,m)&&(U=null),this.validMutation=U,this.mutatedRelevantEvents=z)},this.handleDragEnd=m=>{let{context:v}=this.component,C=this.eventRange.def,E=this.eventRange.instance,T=new fl(v,C,E),N=this.relevantEvents,V=this.mutatedRelevantEvents;if(v.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:T,jsEvent:m.origEvent,view:v.viewApi}),this.validMutation){let U=new fl(v,V.defs[C.defId],E?V.instances[E.instanceId]:null);v.dispatch({type:"MERGE_EVENTS",eventStore:V});let z={oldEvent:T,event:U,relatedEvents:K2(V,v,E),revert(){v.dispatch({type:"MERGE_EVENTS",eventStore:N})}};v.emitter.trigger("eventResize",Object.assign(Object.assign({},z),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||ni(0),endDelta:this.validMutation.endDelta||ni(0),jsEvent:m.origEvent,view:v.viewApi})),v.emitter.trigger("eventChange",z)}else v.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:a}=r,l=this.dragging=new hA(r.el);l.pointer.selector=".fc-event-resizer",l.touchScrollAllowed=!1,l.autoScroller.isEnabled=a.context.options.dragScroll;let i=this.hitDragging=new xO(this.dragging,U$(r));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(r){return td(r.subjectEl,".fc-event")}}function Nhe(c,r,a,l){let i=c.context.dateEnv,m=c.dateSpan.range.start,v=r.dateSpan.range.start,C=$S(m,v,i,c.largeUnit);if(a){if(i.add(l.start,C)<l.end)return{startDelta:C}}else if(i.add(l.end,C)>l.start)return{endDelta:C};return null}class Ihe{constructor(r){this.context=r,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=l=>{l.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=l=>{let i=this.context.options.unselectCancel,m=BJ(l.origEvent);this.matchesCancel=!!td(m,i),this.matchesEvent=!!td(m,gA.SELECTOR)},this.onDocumentPointerUp=l=>{let{context:i}=this,{documentPointer:m}=this,v=i.getCurrentData();if(!m.wasTouchScroll){if(v.dateSelection&&!this.isRecentPointerDateSelect){let C=i.options.unselectAuto;C&&(!C||!this.matchesCancel)&&i.calendarApi.unselect(l)}v.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let a=this.documentPointer=new Vte(document);a.shouldIgnoreMove=!0,a.shouldWatchScroll=!1,a.emitter.on("pointerdown",this.onDocumentPointerDown),a.emitter.on("pointerup",this.onDocumentPointerUp),r.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const Bhe={fixedMirrorParent:Zt},Mhe={dateClick:Zt,eventDragStart:Zt,eventDragStop:Zt,eventDrop:Zt,eventResizeStart:Zt,eventResizeStop:Zt,eventResize:Zt,drop:Zt,eventReceive:Zt,eventLeave:Zt};tV.dataAttrPrefix="";var Gte=Q1({name:"@fullcalendar/interaction",componentInteractions:[khe,xhe,gA,Ohe],calendarInteractions:[Ihe],elementDraggingImpl:hA,optionRefiners:Bhe,listenerRefiners:Mhe});let Phe=0,Lhe=new Date().toISOString().replace(/T.*$/,"");const Fhe=[{id:$he(),title:"All-day event",start:Lhe}];function $he(){return String(Phe++)}const pA=c=>(f.pushScopeId("data-v-1fa0e0e1"),c=c(),f.popScopeId(),c),Vhe={class:"demo-app"},Hhe={class:"demo-app-main"},zhe={class:"title-line"},Uhe=["title","onClick"],Whe={key:0,style:{width:"90%"}},jhe=pA(()=>f.createElementVNode("span",{class:"to"},"至",-1)),Ghe={key:1,style:{width:"90%"}},Zhe=pA(()=>f.createElementVNode("span",{class:"to"},"至",-1)),qhe={key:2,style:{width:"90%",display:"flex","align-items":"center","justify-content":"space-between"}},Khe={key:0,style:{"margin-left":"2%"}},Yhe=pA(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),Xhe={key:1},Qhe=pA(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),Jhe={key:0,class:"placeholder"},ege={class:"info"},tge=pA(()=>f.createElementVNode("img",{src:"https://img1.baidu.com/it/u=1960110688,1786190632&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=281",alt:""},null,-1)),nge={class:"dialog-footer"},oge={name:"IkApprovalProcess"},sge=f.defineComponent({...oge,props:{dataList:{type:Array,default:()=>[]},defaultNodeType:{type:Object,default:()=>({})},defaultFieldMap:{type:Object,default:()=>({})},statusWithoutApprover:{type:Object,default:()=>({})}},emits:["delete","success"],setup(c,{emit:r}){const a=r,l=K=>{if(C.selectInfo=K,m(),K.view.type=="dayGridMonth"){let ce=K.end.getTime()-864e5;C.timeType="month",C.form.startDate=wo.ikDate.toYMD(K.start),C.form.endDate=wo.ikDate.toYMD(new Date(ce))}else K.view.type=="timeGridWeek"?(C.timeType="week",C.form.startDate=wo.ikDate.toYMDHM(K.start),C.form.endDate=wo.ikDate.toYMDHM(K.end)):K.view.type=="timeGridDay"&&(C.timeType="day",C.form.startDate=wo.ikDate.toYMD(K.start),C.form.endDate=wo.ikDate.toYMD(K.start),C.form.startTime=wo.ikDate.toDateTime(K.start),C.form.endTime=wo.ikDate.toDateTime(K.end));K.view.calendar.unselect(),f.nextTick(()=>{C.title="新建日程",C.dialogVisible=!0})},i=(K,Z)=>{C.title="修改日程",C.dialogVisible=!0},m=K=>{fetch("http://192.168.2.45:6002/component/pick/mix",{method:"POST",body:JSON.stringify({parentDepartmentId:K||"",name:""}),headers:{Authorization:"Bearer iking","Content-Type":"application/json"}}).then(q=>{q.json().then(X=>{const{success:Ce,data:st}=X;if(!Ce)return;const{departments:Ne,users:ee,roles:xe,posts:et}=st;C.depList=Ne,C.userList=ee,C.roleList=xe,C.postList=et})}).catch(q=>{console.info("error: ",q)})},v=K=>{C.currentEvents=K},C=f.reactive({allDay:!1,dialogVisible:!1,form:{title:"",type:1,startDate:"",endDate:"",startTime:"",endTime:"",personList:[],location:""},formRef:null,title:"新建日程",timeType:"month",handList:[],isShow:!1,depList:[],userList:[],roleList:[],postList:[],selectInfo:{},calendarOptions:{locale:jQ,plugins:[Ote,$te,Gte],headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},firstDay:1,initialView:"dayGridMonth",initialEvents:Fhe,editable:!0,selectable:!0,selectMirror:!0,dayMaxEvents:!0,weekends:!0,select:l,eventClick:K=>i(),eventsSet:v},currentEvents:[]}),E=()=>{var K;(K=C.formRef)==null||K.resetFields(),C.form={title:"",type:1,startDate:"",endDate:"",startTime:"",endTime:"",personList:[],location:""},C.dialogVisible=!1},T=async()=>{var ce,q,X,Ce;let K=(q=(ce=C.selectInfo)==null?void 0:ce.view)==null?void 0:q.calendar,Z={id:new Date().getTime(),title:C.form.title,start:(X=C.selectInfo)==null?void 0:X.startStr,end:(Ce=C.selectInfo)==null?void 0:Ce.endStr,allDay:C.allDay};await K.addEvent(Z),a("success",Z),E()},N=K=>{Lt.ElMessageBox.confirm(`你确定删除事件'${K.event.title}'?`,"Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(()=>{Lt.ElMessage({type:"success",message:"删除成功"}),K.event.remove(),a("delete",K.event)})},V=K=>{C.handList=K.list,C.form.personList=K.list},U=()=>{C.isShow=!0},z=K=>{m(K==null?void 0:K.elementId)},W=K=>{C.form.personList.splice(K,1),C.handList=C.form.personList};return(K,Z)=>{const ce=f.resolveComponent("el-checkbox");return f.openBlock(),f.createElementBlock("div",Vhe,[f.createElementVNode("div",Hhe,[f.createVNode(f.unref(_te),{class:"demo-app-calendar",options:C.calendarOptions},{eventContent:f.withCtx(q=>[f.createElementVNode("div",zhe,[f.createElementVNode("span",{class:"title",title:q.event.title,onClick:f.withModifiers(X=>i(),["stop"])},f.toDisplayString(q.event.title),9,Uhe),f.createVNode(f.unref(Lt.ElIcon),{size:16,onClick:f.withModifiers(X=>N(q),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(OQ))]),_:2},1032,["onClick"])])]),_:1},8,["options"])]),f.createCommentVNode(" 新建日程 "),f.createVNode(f.unref(Lt.ElDialog),{modelValue:C.dialogVisible,"onUpdate:modelValue":Z[12]||(Z[12]=q=>C.dialogVisible=q),title:C.title,width:"30%",ref:"formRef",onClose:E},{footer:f.withCtx(()=>[f.createElementVNode("span",nge,[f.createVNode(f.unref(Lt.ElButton),{onClick:E},{default:f.withCtx(()=>[f.createTextVNode("取消")]),_:1}),f.createVNode(f.unref(Lt.ElButton),{type:"primary",onClick:T},{default:f.withCtx(()=>[f.createTextVNode("确定")]),_:1})])]),default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElForm),{model:C.form},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(DQ))]),_:1}),f.createVNode(f.unref(Lt.ElInput),{modelValue:C.form.title,"onUpdate:modelValue":Z[0]||(Z[0]=q=>C.form.title=q),placeholder:`添加${C.form.type==1?"会议":"活动"}标题`,style:{width:"70%"},clearable:""},null,8,["modelValue","placeholder"]),f.createVNode(f.unref(Lt.ElSelect),{modelValue:C.form.type,"onUpdate:modelValue":Z[1]||(Z[1]=q=>C.form.type=q),style:{width:"20%"}},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElOption),{label:"会议",value:1}),f.createVNode(f.unref(Lt.ElOption),{label:"活动",value:2})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(RQ))]),_:1}),C.timeType=="month"?(f.openBlock(),f.createElementBlock("div",Whe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[2]||(Z[2]=q=>C.form.startDate=q),type:"date",placeholder:"开始日期",style:{width:"48%"}},null,8,["modelValue"]),jhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[3]||(Z[3]=q=>C.form.endDate=q),type:"date",placeholder:"结束日期",style:{width:"48%"}},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0),C.timeType=="week"?(f.openBlock(),f.createElementBlock("div",Ghe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[4]||(Z[4]=q=>C.form.startDate=q),type:"datetime",placeholder:"开始日期",style:{width:"48%"},format:"YYYY-MM-DD HH:mm"},null,8,["modelValue"]),Zhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[5]||(Z[5]=q=>C.form.endDate=q),type:"datetime",placeholder:"结束日期",style:{width:"48%"},format:"YYYY-MM-DD HH:mm"},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0),C.timeType=="day"?(f.openBlock(),f.createElementBlock("div",qhe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[6]||(Z[6]=q=>C.form.startDate=q),type:"date",placeholder:"开始日期",style:f.normalizeStyle({width:C.allDay?"45%":"90%"})},null,8,["modelValue","style"]),C.allDay?(f.openBlock(),f.createElementBlock("div",Xhe,[Qhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[9]||(Z[9]=q=>C.form.endDate=q),type:"date",placeholder:"结束日期",style:{width:"90%"}},null,8,["modelValue"])])):(f.openBlock(),f.createElementBlock("div",Khe,[f.createVNode(f.unref(Lt.ElTimePicker),{modelValue:C.form.startTime,"onUpdate:modelValue":Z[7]||(Z[7]=q=>C.form.startTime=q),type:"datetime",placeholder:"开始日期",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"]),Yhe,f.createVNode(f.unref(Lt.ElTimePicker),{modelValue:C.form.endTime,"onUpdate:modelValue":Z[8]||(Z[8]=q=>C.form.endTime=q),type:"datetime",placeholder:"结束日期",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"])])),f.createVNode(ce,{modelValue:C.allDay,"onUpdate:modelValue":Z[10]||(Z[10]=q=>C.allDay=q),label:"全天",style:{"margin-left":"2%"}},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0)]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(uie))]),_:1}),f.createElementVNode("div",{class:"personBlock",onClick:f.withModifiers(U,["stop"])},[C.form.personList.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(C.form.personList,(q,X)=>(f.openBlock(),f.createElementBlock("div",{key:X,class:"nameBlock"},[f.createElementVNode("div",ege,[tge,f.createElementVNode("div",null,f.toDisplayString(q.elementName),1)]),f.createVNode(f.unref(Lt.ElIcon),{class:"close",onClick:f.withModifiers(Ce=>W(X),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:2},1032,["onClick"])]))),128)):(f.openBlock(),f.createElementBlock("span",Jhe,"添加参与人"))])]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(Yre))]),_:1}),f.createVNode(f.unref(Lt.ElInput),{modelValue:C.form.location,"onUpdate:modelValue":Z[11]||(Z[11]=q=>C.form.location=q),placeholder:"添加地点",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),f.createCommentVNode(" 选人组件 "),f.createVNode(f.unref(yA),{modelValue:C.handList,"onUpdate:modelValue":Z[13]||(Z[13]=q=>C.handList=q),show:C.isShow,"onUpdate:show":Z[14]||(Z[14]=q=>C.isShow=q),onOk:V,multiple:!0,"type-option":{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},"dep-list":C.depList,"user-list":C.userList,"prop-option":{name:"elementName",id:"elementId",type:"elementType",avatar:"avatar"},chooseType:["user"],onHandChild:z},null,8,["modelValue","show","dep-list","user-list"])])}}}),nSe="",rge=Gs(Zs(sge,[["__scopeId","data-v-1fa0e0e1"]])),ige=c=>(f.pushScopeId("data-v-a26cdcaf"),c=c(),f.popScopeId(),c),age={class:"ik-hor-step-content"},lge=[ige(()=>f.createElementVNode("i",{class:"ik-hor-step_line_inner"},null,-1))],cge=["onClick"],uge={class:"ik-hor-step_main"},dge=["id","onClick"],fge=["id","onClick"],mge=f.defineComponent({__name:"IKHorizontalStepBar",props:{spaceNum:{type:String,default:"58px"},active:{type:Number,default:null},activeColor:{type:String,default:""},needClick:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},alignCenter:{type:Boolean,default:!1},propsField:{type:Object,default:()=>({title:"title",description:"description",value:"value"})}},emits:["click","update:active"],setup(c,{emit:r}){const a=c,l=r,i=f.ref(!1),m=f.ref(),v=f.ref(),C=f.ref(!1);f.watch(()=>a.active,K=>{let Z=document.getElementById("stepItemContent"),ce=document.getElementById(`stepItem${K}`),q=document.getElementById("stepItem0");const X=ce&&q?(ce==null?void 0:ce.offsetLeft)-(q==null?void 0:q.offsetLeft):0;Z&&ce&&(Z.scrollLeft=X>(Z==null?void 0:Z.clientWidth)?X-(Z==null?void 0:Z.offsetLeft):0)}),f.watch(()=>a.list,()=>{f.nextTick(()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce,window.addEventListener("resize",K,!0)});const K=()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce}},{deep:!0}),f.onMounted(()=>{f.nextTick(()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce,window.addEventListener("resize",K,!0)});const K=()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce}});const E=(K,Z)=>{if(!a.needClick)return;l("update:active",Z),l("click",K);let ce=document.getElementById("stepItemContent"),q=document.getElementById(`stepItem${Z}`),X=document.getElementById("stepItem0");const Ce=q&&X?(q==null?void 0:q.offsetLeft)-(X==null?void 0:X.offsetLeft):0;ce&&q&&(ce.scrollLeft=Ce>(ce==null?void 0:ce.clientWidth)?Ce-(ce==null?void 0:ce.offsetLeft):0)},T=()=>{let K=document.getElementById("stepItemContent");K&&(K.scrollLeft=K.scrollLeft-20)},N=()=>{let K=document.getElementById("stepItemContent");K&&(K.scrollLeft=K.scrollLeft+20)},V=()=>{clearInterval(v.value);let K=document.getElementById("stepItemContent");C.value=!1,v.value=setInterval(()=>{C.value=!0,K&&(K.scrollLeft=K.scrollLeft-20)},100)},U=()=>{clearInterval(v.value),C.value||T()},z=()=>{clearInterval(m.value);let K=document.getElementById("stepItemContent");C.value=!1,m.value=setInterval(()=>{C.value=!0,K&&(K.scrollLeft=K.scrollLeft+20)},100)},W=()=>{clearInterval(m.value),C.value||N()};return(K,Z)=>{const ce=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",age,[i.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"icon-left",onMousedown:V,onMouseup:U,onClick:T},[f.createVNode(ce,{class:"operation-icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(n$),{size:"26px"})]),_:1})],32)):f.createCommentVNode("v-if",!0),f.createElementVNode("div",{class:"step-item-content",id:"stepItemContent",style:f.normalizeStyle({justifyContent:i.value?"flex-start":"center"})},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.list,(q,X)=>{var Ce;return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(`${c.alignCenter?"ik-hor-step-item":""} step-item ${X<=c.active?"step-item-active":""}`),style:f.normalizeStyle({width:c.alignCenter?`calc(100%/${(Ce=c.list)==null?void 0:Ce.length})`:""}),key:X},[f.createElementVNode("div",{class:f.normalizeClass(`${c.alignCenter?"ik-hor-step_head":""} `)},[X!==0?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(`ik-hor-step_line step-border ${X<=c.active?"step-border-greater-than":""}`),style:f.normalizeStyle({width:`${c.spaceNum.indexOf("px")!=-1?c.spaceNum:`${c.spaceNum}px`}`})},lge,6)):f.createCommentVNode("v-if",!0),f.createElementVNode("div",{class:f.normalizeClass(`step-num ${X===c.active?"step-num-active":X<c.active?"step-num-greater-than":""}`),onClick:st=>E(q,X),style:f.normalizeStyle({backgroundColor:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"})},[f.renderSlot(K.$slots,"icon",{data:{item:q,index:X}},()=>[f.createTextVNode(f.toDisplayString(X+1),1)],!0)],14,cge)],2),f.createElementVNode("div",uge,[f.createElementVNode("div",{id:`stepItem${X}`,class:f.normalizeClass(`step-label ${c.active===X?"step-label-active":X<c.active?"step-label-greater-than":""} step-item-${X}`),style:f.normalizeStyle({color:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"}),onClick:st=>E(q,X)},f.toDisplayString(q[c.propsField.title]),15,dge),f.createElementVNode("div",{id:`stepItemDesc${X}`,class:f.normalizeClass(`step-description step-label ${c.active===X?"step-label-active":X<c.active?"step-label-greater-than":""} step-item-${X}`),style:f.normalizeStyle({color:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"}),onClick:st=>E(q,X)},f.toDisplayString(q[c.propsField.description]),15,fge)])],6)}),128))],4),i.value?(f.openBlock(),f.createElementBlock("div",{key:1,class:"icon-right",onMousedown:z,onMouseup:W,onClick:N},[f.createVNode(ce,{class:"operation-icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})],32)):f.createCommentVNode("v-if",!0)])}}}),rSe="",hge=Gs(Zs(mge,[["__scopeId","data-v-a26cdcaf"]])),gge=["onClick"],pge={class:"fileName simple"},vge=["onClick"],yge={class:"text"},bge={class:"fileName"},Cge={class:"size"},_ge=f.defineComponent({__name:"IkPreviewFile",props:{list:{type:Array,default:()=>[]},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},field:{required:!0,type:Object,default:()=>({})},iconSize:{type:Number,default:40},showBg:{type:Boolean,default:!0},width:{type:Number||String,default:"100%"},iconHoverShow:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},simple:{type:Boolean,default:!1}},emits:["handPreview"],setup(c,{emit:r}){const a=c,{cLoadUrl:l,cOnlyofficeConfig:i,cOnlyofficePreviewType:m}=Xv(a),v=r,C=f.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"size",...a.field})),E=f.ref({}),T=f.ref(!1),N=W=>{var K,Z;E.value={...W,name:W.name,url:Yv(l.value,W[C.value.url]||((Z=(K=W==null?void 0:W.response)==null?void 0:K.data)==null?void 0:Z.id)||(W==null?void 0:W.id))},a.isOnlyOfficePreview&&(T.value=!0),v("handPreview",E.value)},V=W=>{wo.ikFile.downloadFile(Yv(l.value,W[C.value.url]||W.attachmentId||W.id),W[C.value.name]||W.attachmentName)},U=f.computed(()=>wo.paramType.isNumber(a.width)?`${a.width}px`:a.width),z=f.computed(()=>a.list.map(W=>{var Z;const K=W[C.value.name]||W.attachmentName;return{...W,name:K,size:W[C.value.size]||(W==null?void 0:W.fileSize)||(W==null?void 0:W.attachmentSize),suffix:W[C.value.suffix]||(W==null?void 0:W.attachmentSuffix)||((Z=K.split("."))==null?void 0:Z.at(-1))}}));return(W,K)=>{var ce,q,X;const Z=f.resolveComponent("tmplate");return f.openBlock(),f.createElementBlock(f.Fragment,null,[(ce=c.list)!=null&&ce.length?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[c.simple?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(z.value,(Ce,st)=>(f.openBlock(),f.createElementBlock("div",{class:"iking-privew-annex simple",onClick:Ne=>N(Ce),style:f.normalizeStyle({width:U.value})},[f.createElementVNode("div",pge,f.toDisplayString(Ce.name),1),f.createElementVNode("div",{class:f.normalizeClass(["flex flex-center",{"hover-show":c.iconHoverShow}])},[f.createVNode(f.unref(cr),{name:"iksvg_daochu",onClick:f.withModifiers(Ne=>V(Ce),["stop"]),size:20,active:""},null,8,["onClick"]),f.unref(m).includes(Ce.suffix)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_yulan",size:20,active:""})):f.createCommentVNode("v-if",!0),f.renderSlot(W.$slots,"operation",{data:{...Ce,findex:st}})],2)],12,gge))),256)):(f.openBlock(),f.createBlock(Z,{key:1},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(z.value,(Ce,st)=>{var Ne;return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["iking-privew-annex",{"is-bg":c.showBg}]),key:st,style:f.normalizeStyle({marginBottom:st==((Ne=c.list)==null?void 0:Ne.length)-1?"0":"10px",width:U.value})},[f.createElementVNode("div",{class:"file-card",onClick:ee=>N(Ce)},[f.createVNode(f.unref(UR),{file:Ce,style:f.normalizeStyle({height:`${c.iconSize}px`}),class:"ikui-w-auto",fields:C.value},null,8,["file","style","fields"]),f.createElementVNode("div",yge,[f.createElementVNode("div",bge,f.toDisplayString(Ce.name),1),f.createElementVNode("div",Cge,f.toDisplayString(f.unref(Bie)(Ce.size)),1)]),f.createElementVNode("div",{class:f.normalizeClass(["flex flex-center",{"hover-show":c.iconHoverShow}])},[f.createVNode(f.unref(cr),{name:"iksvg_daochu",onClick:f.withModifiers(ee=>V(Ce),["stop"]),bg:c.showBg,size:c.showBg?"default":20,title:"下载"},null,8,["onClick","bg","size"]),f.unref(m).includes(Ce.suffix)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_yulan",bg:c.showBg,size:c.showBg?"default":20,title:"预览"},null,8,["bg","size"])):f.createCommentVNode("v-if",!0),f.renderSlot(W.$slots,"operation",{data:{...Ce,findex:st}})],2)],8,vge)],6)}),128))]),_:3}))],64)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(vV),{show:T.value,"onUpdate:show":K[0]||(K[0]=Ce=>T.value=Ce),loadUrl:f.unref(l),file:E.value,onlyofficeServer:((q=f.unref(i))==null?void 0:q.serverUrl)||c.onlyofficeServer,onlyOfficeConfig:f.unref(i),onlyOfficeAccept:((X=f.unref(i))==null?void 0:X.accept)||c.onlyOfficeAccept},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig","onlyOfficeAccept"])],64)}}}),aSe="",TO=Gs(_ge),wge=f.defineComponent({__name:"IkPreviewFileDialog",props:f.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(c){const r=c,a=f.useModel(c,"show"),l=f.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...r.field})),i=f.ref(null),m=f.ref(null),v=f.reactive({image:!1,office:!1,video:!1}),C=T=>{var N,V,U,z,W,K,Z;try{const ce=((N=T==null?void 0:T.response)==null?void 0:N.data)||T,q=ce[l.value.url]||(ce==null?void 0:ce.id)||ce.attachmentId,X=(V=ce[l.value.suffix]||ce.attachmentSuffix)==null?void 0:V.toLowerCase(),Ce=ce[l.value.name]||(ce==null?void 0:ce.attachmentName)||(ce==null?void 0:ce.originName);if(m.value={...T,name:T[l.value.name],url:Yv(r.loadUrl,q)},T&&Pc(T,l.value)==="image"){v.image=!0;return}else if(T&&Pc(T,l.value)==="video"){v.video=!0;return}else if((((U=r.onlyOfficeConfig)==null?void 0:U.accept)||r.onlyOfficeAccept).includes(X)){v.office=!0,i.value={...r.onlyOfficeConfig,editorConfig:{...((z=r.onlyOfficeConfig)==null?void 0:z.editorConfig)||{},customization:{...((K=(W=r.onlyOfficeConfig)==null?void 0:W.editorConfig)==null?void 0:K.customization)||{},review:{reviewDisplay:"final"}}},document:{key:wo.buildUUID(),title:Ce,url:Yv(r.loadUrl,q),fileType:X,...((Z=r.onlyOfficeConfig)==null?void 0:Z.document)||{}},documentType:ire(X)};return}}catch(ce){console.info("预览错误: ",ce)}};f.watch([a,r.file],([T,N])=>{T&&f.nextTick(()=>{C(r.file)})});const E=()=>{a.value=!1,v.office=!1,v.image=!1,v.video=!1,m.value=null};return(T,N)=>{var V,U,z;return a.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(V=m.value)!=null&&V.url&&v.image?(f.openBlock(),f.createBlock(f.unref(OV),{key:0,onClose:N[0]||(N[0]=W=>E()),ref:"previewImgRef","url-list":[(U=m.value)==null?void 0:U.url],teleported:"","z-index":9999},null,8,["url-list"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),f.createCommentVNode(" 文档类 "),f.createVNode(f.unref(Poe),{modelValue:v.video,"onUpdate:modelValue":N[1]||(N[1]=W=>v.video=W),url:(z=m.value)==null?void 0:z.url},null,8,["modelValue","url"]),f.createVNode(f.unref(nne),{modelValue:v.office,"onUpdate:modelValue":N[2]||(N[2]=W=>v.office=W),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:E,"modal-class":"ik-only-preview-dialog"},{default:f.withCtx(()=>{var W;return[f.createVNode(f.unref(wne),{"config-options":i.value,"document-server-url":((W=c.onlyOfficeConfig)==null?void 0:W.serverUrl)||c.onlyofficeServer},null,8,["config-options","document-server-url"])]}),_:1},8,["modelValue"])],64)):f.createCommentVNode("v-if",!0)}}}),lSe="",vV=Gs(wge),Sge="data:image/webp;base64,UklGRnoEAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBImAAAAA2AYm3bsuhFm7u72wZoTrbGIcoKaKyAROJQbQmW2IVb/WkW3ZmPd3ymRMQEwJfV56QRo5pHErkUkFdQWRJpeGW6SoL9EvaWxAdbAeiVd5gyAK5NAdOtv4uNfsT21TUukBVjgFubBOQS+Ip7G/k2LpatkF2hAuBI5siAdsL2j3DHQrJ7NKDbUIyOj3bhqADBsgNPUqUlgncLVlA4IOwBAABwDQCdASowADAAPm0yk0ckIyGhJzgMkIANiWwArDM9tzexcZ3vwYZdKHIB749Ap5gP1E/YD34/QB6AH+A9F//S+w1z2/sz/5DzdDABM7ldHg1iMkeWX8LH9T1VzicAWGJgnNq4e/5P/NObJOBUhFC8dPnhmAD+9wGzP9Zfeg5ENi90xn4awZvrlCLnfwvZX//s4u6n2Pa2TF/r8wh0GtdNNJIBMRbrMaCBwyl6z86DqQgvpixbIdOVbwZFf/7KjC+uzJ5nNRyJ1Rpab8pIf2m1+SBOfX9w7EFXUErK8NSCsePMPazMXKH5y9Wl+nfiSrmsv079Fk6NkDF3Dxr+C+Rp4UdG/f3kP8PZfd/FyRupWURiDOrAjLamuF4OPo2BylwD7ulmdgDn4BEMXuvpYCACy4yCVjgsOzqToG2rSfJOtxy6Hh1/B2gu7X1MdJpHsdHdUrlRzTLKyV3wZG5a64SKKB2/QGk8IRZT0veUdDeo579/WyTU3ujQZeKNBS9ANlv1muyN9Kf5bm1f3UoPm/KnDkqf/1f2jf6aQJ7IYNod25fVfhRX+l1u9qBzs/bVezF7ZgC2LOuuJl1Tvwgeujpg9Uc/m0A9X878DzEkgxP/sPGviOfCElM1J/Kr3TTCwCkfW+K3oZuMB7HAAAA=",Ege=c=>(f.pushScopeId("data-v-6aec3725"),c=c(),f.popScopeId(),c),kge={class:"ik-flie-list"},xge={class:"name"},Age={key:1},Tge=["src"],Dge={class:"file-icon"},Rge={class:"file-name-loading"},Oge={class:"file-name"},Nge={key:0},Ige={key:0,class:"file-size"},Bge={class:"name"},Mge={class:"file-name-loading"},Pge={class:"file-name"},Lge={class:"file-size"},Fge={class:"operate-btn"},$ge={class:"card"},Vge={class:"title"},Hge=Ege(()=>f.createElementVNode("img",{src:Sge,class:"w-[48px] h-[48px]"},null,-1)),zge={class:"ik-flie-list"},Uge={class:"name"},Wge={key:1},jge=["src"],Gge={class:"file-icon"},Zge={class:"file-name-loading"},qge={class:"file-name"},Kge={key:0},Yge={key:0,class:"file-size"},Xge={key:0},Qge=f.defineComponent({__name:"index",props:f.mergeModels({showIcon:{type:Boolean,default:!0},title:{type:String,default:"上传文件"},action:{type:String,default:""},type:{type:String,default:"button"},headers:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},limit:{type:Number,default:1},size:{type:Number,default:50},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},limitText:{type:String,default:""},defaultFileds:{type:Object,default:()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize"})},preview:{type:Boolean,default:!1},customIconData:{type:Object,default:()=>({})},customIconFields:{type:Object,default:()=>({type:"type",icon:"icon"})},disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},imageMode:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},trueDelete:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:f.mergeModels(["delete","exceed","handPreview","success","error","outSize"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=r,i=f.useModel(c,"modelValue"),v={...{name:"name",url:"url",suffix:"suffix",size:"size"},...a.defaultFileds},{cLoadUrl:C,cUploadUrl:E,cOnlyofficeConfig:T,cOnlyofficePreviewType:N}=Xv(a),V=f.computed(()=>a.size),U=f.ref(null),z=f.ref([]),W=f.ref({}),K=f.ref(!1),Z=F=>{const _n=F.size/1024/1024;return _n<V.value?!0:(l("outSize"),Lt.ElMessage({message:`上传文件大小(${_n.toFixed(4)}MB)超出允许最大值(${a.size}MB),请重新选择`,type:"warning",showClose:!0,duration:5e3}),!1)},ce=f.computed(()=>{const{accept:F}=a;return F==="*"?"*":`${F.toLowerCase()},${F.toUpperCase()}`}),q=(F,_n)=>{var kt,We;if(F.size/1024/1024<V.value||f.nextTick(()=>{i.value.pop()}),a.accept!=="*"){const at=(kt=ce.value)==null?void 0:kt.split(",");!at.includes((We=F==null?void 0:F.raw)==null?void 0:We.type)&&!at.includes(`.${F.name.split(".").pop()}`)&&(Lt.ElMessage({message:`不允许的上传文件格式(${F.name}),请重新选择`,type:"warning",showClose:!0,duration:5e3}),f.nextTick(()=>{i.value.pop()}))}},X=()=>!1,Ce=(F,_n)=>{var Ge,Et;F.status="ready",_n!==void 0&&z.value.splice(_n,1),(Ge=U.value)==null||Ge.handleStart(F.raw),(Et=U.value)==null||Et.submit()},st=(F,_n)=>{var Ge;F.splice(a.limit===1?1:a.limit),F.forEach(Et=>{var kt;(kt=U.value)==null||kt.handleStart(Et)}),(Ge=U.value)==null||Ge.submit(),Lt.ElMessage({message:(a==null?void 0:a.limitText)||`最大可上传${a.limit}个文件,已忽略超出文件`,type:"warning",showClose:!0,duration:5e3}),l("exceed",F)},Ne=(F,_n,Ge)=>{F.success?l("success",F,_n,Ge):(l("error",F,_n,Ge),be(_n),z.value.push(_n))},ee=(F,_n,Ge)=>{z.value.push(_n),l("error",F,_n,Ge)},xe=F=>{var _n,Ge;W.value={...F,name:F[v.name],url:Yv(C.value,F[v.url]||((Ge=(_n=F==null?void 0:F.response)==null?void 0:_n.data)==null?void 0:Ge.id))},a.isOnlyOfficePreview&&(K.value=!0),l("handPreview",W.value)},et=F=>{wo.ikFile.downloadByOnlineUrl(F[v.url],F[v.name])},tt=(F,_n=!1)=>{var Ge;(Ge=U.value)==null||Ge.abort(F)},je={Authorization:"Bearer iking","X-Tenant":"sys","Content-Type":"application/x-www-form-urlencoded"},be=F=>{var _n,Ge,Et,kt,We;try{F.status!=="success"&&tt(F),(_n=U.value)==null||_n.handleRemove(F),i.value=i.value.filter(at=>at.uid!==F.uid),l("delete",F),a.trueDelete&&e$.post(E.value.replace("/oss/upload","/oss/delete"),{fileUrl:((Et=(Ge=F==null?void 0:F.response)==null?void 0:Ge.data)==null?void 0:Et.id)||((kt=F==null?void 0:F.data)==null?void 0:kt.id)||(F==null?void 0:F.id)||F[v.url]},{headers:je})}catch(at){(We=U.value)==null||We.handleRemove(F),i.value=i.value.filter(Sn=>Sn.uid!==F.uid),l("delete",F),console.error(at)}},An=(F,_n)=>{z.value.splice(_n,1)},fn=f.computed(()=>i.value.length>=a.limit||a.disabled),Vt=F=>{var Ge,Et,kt;const _n=((Et=(Ge=F==null?void 0:F.response)==null?void 0:Ge.data)==null?void 0:Et[v.suffix])||((kt=F==null?void 0:F.data)==null?void 0:kt[v.suffix])||(F==null?void 0:F[v.suffix]);return N.includes(_n)};return(F,_n)=>{var Ge;return f.openBlock(),f.createElementBlock(f.Fragment,null,[c.preview?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[c.type==="button"?(f.openBlock(),f.createBlock(f.unref(Lt.ElUpload),f.mergeProps({key:0,class:"ik-file-upload"},F.$attrs,{accept:c.accept,action:f.unref(E),"file-list":i.value,"onUpdate:fileList":_n[0]||(_n[0]=Et=>i.value=Et),ref_key:"refUpload",ref:U,"auto-upload":!0,"before-upload":Z,"before-remove":X,"on-exceed":st,"on-change":q,multiple:c.multiple,headers:c.headers,limit:c.limit,"on-success":Ne,"on-error":ee}),{trigger:f.withCtx(()=>[F.$slots.trigger?f.renderSlot(F.$slots,"trigger",{key:0},void 0,!0):(f.openBlock(),f.createBlock(f.unref(Lt.ElButton),{key:1,disabled:fn.value},f.createSlots({default:f.withCtx(()=>[f.createTextVNode(" "+f.toDisplayString(c.title),1)]),_:2},[c.showIcon?{name:"icon",fn:f.withCtx(()=>[f.createVNode(f.unref(cr),{name:"iksvg_daoru",disabled:fn.value},null,8,["disabled"])]),key:"0"}:void 0]),1032,["disabled"]))]),file:f.withCtx(({file:Et})=>[f.createElementVNode("div",kge,[f.createElementVNode("div",xge,[!F.$slots.fileIcon&&(!c.customIconData[f.unref(Pc)(Et,v)]||!c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon])?(f.openBlock(),f.createBlock(f.unref(UR),{key:0,type:f.unref(Pc)(Et,v)},null,8,["type"])):!F.$slots.fileIcon&&c.customIconData[f.unref(Pc)(Et,v)]&&c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon]?(f.openBlock(),f.createElementBlock("div",Age,[c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.type]==="img"?(f.openBlock(),f.createElementBlock("img",{key:0,src:c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,Tge)):(f.openBlock(),f.createElementBlock("span",{key:1,class:f.normalizeClass([c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],"file-icon-size"])},null,2))])):f.createCommentVNode("v-if",!0),f.createElementVNode("div",Dge,[f.renderSlot(F.$slots,"fileIcon",{file:Et},void 0,!0)]),f.createElementVNode("div",Rge,[f.createElementVNode("p",Oge,[f.createTextVNode(f.toDisplayString(Et[v.name]||Et.name)+" ",1),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createElementBlock("span",Nge,"("+f.toDisplayString(Et.percentage)+"%)",1)):f.createCommentVNode("v-if",!0)]),Et.status==="success"?(f.openBlock(),f.createElementBlock("p",Ige,f.toDisplayString(f.unref(s$)((Et[v.size]||Et.size)/1024/1024))+"MB ",1)):f.createCommentVNode("v-if",!0),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createBlock(f.unref(Lt.ElProgress),{key:1,"text-inside":"",percentage:Et.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):f.createCommentVNode("v-if",!0)])]),f.createElementVNode("div",null,[Et.status==="success"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[Vt(Et)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,onClick:kt=>xe(Et),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(cr),{onClick:f.withModifiers(kt=>be(Et),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(f.openBlock(),f.createBlock(f.unref(cr),{key:1,onClick:f.withModifiers(kt=>be(Et),["stop"]),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))])])]),default:f.withCtx(()=>{var Et;return[!c.preview&&c.tip?(f.openBlock(),f.createBlock(f.unref(Lt.ElTooltip),{key:0,effect:"dark",content:a.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(MQ))]),_:1})]),_:1},8,["content"])):f.createCommentVNode("v-if",!0),(Et=z.value)!=null&&Et.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(z.value,(kt,We)=>(f.openBlock(),f.createElementBlock("div",{class:"ik-error-flie-list",key:kt.uid},[f.createElementVNode("div",Bge,[f.createVNode(f.unref(Lt.ElIcon),{size:32,class:"info",style:{"vertical-align":"middle"}},{default:f.withCtx(()=>[f.createVNode(f.unref(hie))]),_:1}),f.createElementVNode("div",Mge,[f.createElementVNode("p",Pge,f.toDisplayString(kt[v.name]||kt.name),1),f.createElementVNode("p",Lge,f.toDisplayString(f.unref(s$)(kt.size/1024/1024))+"MB ",1)])]),f.createElementVNode("div",Fge,[f.createVNode(f.unref(cr),{onClick:f.withModifiers(at=>Ce(kt,We),["stop"]),name:"iksvg_zhongzhi",title:"重新上传",bg:"",size:"default"},null,8,["onClick"]),f.createVNode(f.unref(cr),{onClick:f.withModifiers(at=>An(kt,We),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])])]))),128)):f.createCommentVNode("v-if",!0)]}),_:3},16,["accept","action","file-list","multiple","headers","limit"])):(f.openBlock(),f.createBlock(f.unref(Lt.ElUpload),f.mergeProps({key:1,"file-list":i.value,"onUpdate:fileList":_n[1]||(_n[1]=Et=>i.value=Et),class:["ik-file-pload-card",{plain:c.plain}],"auto-upload":!0},F.$attrs,{accept:c.accept,action:f.unref(E),disabled:fn.value,ref_key:"refUpload",ref:U,"before-upload":Z,"before-remove":X,"on-exceed":st,multiple:c.multiple,headers:c.headers,limit:c.limit,"on-success":Ne,"on-error":ee,"on-change":q}),{file:f.withCtx(({file:Et})=>[f.createElementVNode("div",zge,[f.createElementVNode("div",Uge,[!F.$slots.fileIcon&&(!c.customIconData[f.unref(Pc)(Et,v)]||!c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon])?(f.openBlock(),f.createBlock(f.unref(UR),{key:0,type:f.unref(Pc)(Et,v)},null,8,["type"])):!F.$slots.fileIcon&&c.customIconData[f.unref(Pc)(Et,v)]&&c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon]?(f.openBlock(),f.createElementBlock("div",Wge,[c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.type]==="img"?(f.openBlock(),f.createElementBlock("img",{key:0,src:c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,jge)):(f.openBlock(),f.createElementBlock("span",{key:1,class:f.normalizeClass([c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],"file-icon-size"])},null,2))])):f.createCommentVNode("v-if",!0),f.createElementVNode("div",Gge,[f.renderSlot(F.$slots,"fileIcon",{file:Et},void 0,!0)]),f.createElementVNode("div",Zge,[f.createElementVNode("p",qge,[f.createTextVNode(f.toDisplayString(Et[v.name]||Et.name)+" ",1),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createElementBlock("span",Kge,"("+f.toDisplayString(Et.percentage)+"%)",1)):f.createCommentVNode("v-if",!0)]),Et.status==="success"?(f.openBlock(),f.createElementBlock("p",Yge,f.toDisplayString(f.unref(s$)((Et[v.size]||Et.size)/1024/1024))+"MB ",1)):f.createCommentVNode("v-if",!0),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createBlock(f.unref(Lt.ElProgress),{key:1,"text-inside":"",percentage:Et.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):f.createCommentVNode("v-if",!0)])]),c.preview?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[(c.preview||Et.percentage===100)&&Vt(Et)?(f.openBlock(),f.createBlock(f.unref(Lt.ElIcon),{key:0,title:"预览",class:"primary"},{default:f.withCtx(()=>[f.createVNode(f.unref(fie),{onClick:kt=>xe(Et)},null,8,["onClick"])]),_:2},1024)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(Lt.ElIcon),{title:"下载",class:"primary"},{default:f.withCtx(()=>[f.createVNode(f.unref(IQ),{onClick:kt=>et(Et)},null,8,["onClick"])]),_:2},1024)],64)):(f.openBlock(),f.createElementBlock("div",Xge,[Et.status==="success"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[Vt(Et)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,onClick:kt=>xe(Et),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(cr),{onClick:kt=>be(Et),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(f.openBlock(),f.createBlock(f.unref(cr),{key:1,onClick:kt=>be(Et),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))]))])]),default:f.withCtx(()=>[f.createElementVNode("div",$ge,[f.createElementVNode("div",Vge,[c.imageMode?f.renderSlot(F.$slots,"image",{key:0},()=>[Hge],!0):c.showIcon?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,name:"iksvg_img_shangchuanhetongfujianbeifen",type:"primary",bg:"",size:40})):f.createCommentVNode("v-if",!0),f.createElementVNode("span",null,[f.createTextVNode(f.toDisplayString(c.title)+" ",1),!c.preview&&c.tip?(f.openBlock(),f.createBlock(f.unref(Lt.ElTooltip),{key:0,effect:"dark",content:a.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(MQ))]),_:1})]),_:1},8,["content"])):f.createCommentVNode("v-if",!0)])]),f.createVNode(f.unref(cr),{name:"iksvg_daoru",bg:"",size:24,width:40,padding:"0"})])]),_:3},16,["file-list","class","accept","action","disabled","multiple","headers","limit"]))],64)),f.createVNode(f.unref(vV),{show:K.value,"onUpdate:show":_n[2]||(_n[2]=Et=>K.value=Et),loadUrl:f.unref(C),file:W.value,onlyofficeServer:((Ge=f.unref(T))==null?void 0:Ge.serverUrl)||c.onlyofficeServer,onlyOfficeConfig:f.unref(T)},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig"])],64)}}}),cSe="",uSe="",Jge=Gs(Zs(Qge,[["__scopeId","data-v-6aec3725"]])),epe={},tpe={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},npe=[f.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),f.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),f.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),f.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),f.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),f.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),f.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),f.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function ope(c,r){return f.openBlock(),f.createElementBlock("svg",tpe,npe)}const spe=Zs(epe,[["render",ope]]),Zte=c=>(f.pushScopeId("data-v-70fba8d8"),c=c(),f.popScopeId(),c),rpe={key:1,class:"upload-btn"},ipe={class:"tip"},ape={class:"loading-statu"},lpe={class:"operate-btn"},cpe={key:0},upe={class:"el-upload-list el-upload-list--picture-card"},dpe=["onClick"],fpe=Zte(()=>f.createElementVNode("span",{class:"error"},"上传错误",-1)),mpe=Zte(()=>f.createElementVNode("p",null,"点击重新上传",-1)),hpe=["src"],gpe={class:"demo-image__preview"},ppe=f.defineComponent({__name:"index",props:f.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:Number,default:106},height:{type:Number,default:106}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:f.mergeModels(["delete","success"],["update:modelValue"]),setup(c,{emit:r}){f.useCssVars(Ge=>({"1c9589a2":E.value,"2b2330de":T.value,e201c302:_n.value,"19d5a46d":F.value}));const a=c,l=f.useModel(c,"modelValue"),i=Ge=>Array.isArray(Ge)?Ge.map(Et=>{var at,Sn;const kt=((at=Et.url)==null?void 0:at.startsWith("http"))||((Sn=Et.url)==null?void 0:Sn.startsWith("blob")),We=(Et==null?void 0:Et.url)||Et;return{...Et.url?Et:{url:We},__url:kt?We:`${v.value}${We}`}}):Ge?[{url:Ge,__url:Ge!=null&&Ge.startsWith("http")||Ge!=null&&Ge.startsWith("blob")?Ge:`${v.value}${Ge}`}]:[];f.watch(()=>l.value,Ge=>{!Ge||!Ge.length?U.value=[]:U.value=wo._.cloneDeep(i(Ge))},{deep:!0});const m=r,{cLoadUrl:v,cUploadUrl:C}=Xv(a),E=f.computed(()=>`${a.width}px`),T=f.computed(()=>`${a.height}px`),N=f.computed(()=>a.size),V=f.ref(null),U=f.ref(i(l.value)),z=f.ref([]),W=f.ref(!1),K=f.ref(0),Z=f.computed(()=>a.tipText||`最多可上传${a.limit}张图片, 每张图片不能超过${a.size}MB`),ce=(Ge,Et)=>{},q=Ge=>{if(!Ge.type.includes("image")){Lt.ElMessage.warning("只允许上传图片!");try{U.value.pop()}catch{}return!1}if(!(Ge.size/1024/1024<N.value)){Lt.ElMessage.warning(`图片大小超出系统限制的${a.size}MB!`);try{U.value.pop()}catch{}return!1}return!0},X=()=>!1,Ce=(Ge,Et)=>{var kt,We;Ge.status="ready",Et!==void 0&&z.value.splice(Et,1),(kt=V.value)==null||kt.handleStart(Ge.raw),(We=V.value)==null||We.submit()},st=(Ge,Et)=>{var Sn,lt;const kt=l.value.length,We=a.limit-kt;let at=0;for(;at<We&&at<(Ge==null?void 0:Ge.length);)(Sn=V.value)==null||Sn.handleStart(Ge==null?void 0:Ge[at]),(lt=V.value)==null||lt.submit(),at++},{formItem:Ne}=Lt.useFormItem(),ee=(Ge,Et,kt)=>{m("success",Ge,Et,kt),l.value=U.value,Ne==null||Ne.validate("change")},xe=(Ge,Et,kt)=>{z.value.push({...Et,__url:Et.url})},et=Ge=>{var Et;W.value=!0,K.value=Array.isArray(l==null?void 0:l.value)?(Et=l==null?void 0:l.value)==null?void 0:Et.findIndex(kt=>kt.url===Ge.url):0},tt=Ge=>{wo.ikFile.downloadFile(Ge.__url||Ge.url,Ge.name||Ge.url)},je=Ge=>{var Et;(Et=V.value)==null||Et.abort(Ge)},be=Ge=>{var Et;Ge.status!=="success"&&je(Ge),l.value=(Et=U.value)==null?void 0:Et.filter(kt=>kt.uid!==Ge.uid),m("delete",Ge)},An=(Ge,Et)=>{z.value.splice(Et,1)},fn=f.computed(()=>U.value.length+z.value.length<a.limit),Vt=f.computed(()=>l.value.length>=a.limit||a.disabled),F=f.computed(()=>{var Ge;return!((Ge=l.value)!=null&&Ge.length)&&!z.value.length||a.limit===1||typeof l.value=="string"?"0":`${a.width+8}px`}),_n=f.computed(()=>{var Ge;return!((Ge=l.value)!=null&&Ge.length)&&!z.value.length&&typeof l.value!="string"||a.limit===1?"none":"absolute"});return(Ge,Et)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createVNode(f.unref(Lt.ElUpload),f.mergeProps({class:["ik-image-upload",{preview:c.preview,"hide-upload":!fn.value&&c.limit===1,disabled:Vt.value}],ref_key:"refUpload",ref:V,"list-type":"picture-card",accept:c.accept,action:f.unref(C),headers:c.headers,data:c.data,"file-list":U.value,"onUpdate:fileList":Et[0]||(Et[0]=kt=>U.value=kt),multiple:c.multiple,limit:c.limit,"on-change":ce,"before-upload":q,"before-remove":X,"on-exceed":st,"on-success":ee,"on-error":xe,drag:""},Ge.$attrs,{disabled:Vt.value}),f.createSlots({trigger:f.withCtx(()=>[Ge.$slots.trigger?f.renderSlot(Ge.$slots,"trigger",{key:0},void 0,!0):(f.openBlock(),f.createElementBlock("div",rpe,[f.createVNode(f.unref(Lt.ElIcon),{size:20},{default:f.withCtx(()=>[f.createVNode(f.unref(cr),{name:"iksvg_guanbibeifen",disabled:Vt.value},null,8,["disabled"])]),_:1}),f.createElementVNode("span",null,f.toDisplayString(c.title),1)]))]),file:f.withCtx(({file:kt,index:We})=>[f.createElementVNode("div",{class:f.normalizeClass(["load-list",{loading:kt.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[f.withDirectives(f.createElementVNode("div",ape,[f.createVNode(spe),f.createTextVNode(" 上传"+f.toDisplayString(kt.percentage)+"% ",1)],512),[[f.vShow,kt.status==="uploading"]]),f.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),f.createVNode(f.unref(Lt.ElImage),{style:{width:"100%",height:"100%"},src:kt.__url||kt.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),f.createElementVNode("span",lpe,[f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>et(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(FQ))]),_:2},1032,["onClick"])]),f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>tt(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(IQ))]),_:2},1032,["onClick"])]),c.preview?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",cpe,[f.createVNode(f.unref(Lt.ElIcon),{type:"warning",onClick:at=>be(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(NQ))]),_:2},1032,["onClick"])]))])],2)]),default:f.withCtx(()=>[f.createElementVNode("ul",upe,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(z.value,(kt,We)=>(f.openBlock(),f.createElementBlock("li",{class:"el-upload-list__item",key:kt.uid},[f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>An(kt,We)},{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:2},1032,["onClick"])]),f.createElementVNode("div",{class:f.normalizeClass(["load-list",{loading:kt.status==="uploading",fail:kt.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[f.withDirectives(f.createElementVNode("div",{class:"loading-statu",onClick:at=>Ce(kt,We)},[f.createVNode(f.unref(Lt.ElIcon),{size:24},{default:f.withCtx(()=>[f.createVNode(f.unref(PQ))]),_:1}),fpe,mpe],8,dpe),[[f.vShow,kt.status==="fail"]]),f.createElementVNode("img",{src:kt.__url,alt:"",style:f.normalizeStyle({"object-fit":c.fit})},null,12,hpe)],2)]))),128))])]),_:2},[c.tip?{name:"tip",fn:f.withCtx(()=>[f.createElementVNode("span",ipe,f.toDisplayString(Z.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),f.createCommentVNode(" 文件预览 "),f.createElementVNode("div",gpe,[W.value?(f.openBlock(),f.createBlock(f.unref(OV),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:Et[1]||(Et[1]=()=>{W.value=!1}),"url-list":i(U.value).map(kt=>kt.__url),"initial-index":K.value},null,8,["url-list","initial-index"])):f.createCommentVNode("v-if",!0)])],64))}}),CSe="",vpe=Gs(Zs(ppe,[["__scopeId","data-v-70fba8d8"]])),ype=["src"],bpe={name:"IkPrintConfig"},Cpe=f.defineComponent({...bpe,props:{id:{},srcPrefix:{default:""},token:{}},emits:["created"],setup(c,{emit:r}){const a=c,l=r,i=f.computed(()=>!!a.id),m=f.reactive({currentId:a.id,loading:!0,src:""}),v=async()=>{fetch(`${a.srcPrefix??""}/jmreport/save`,{method:"POST",body:JSON.stringify({}),headers:{"Content-Type":"application/json",Authorization:a.token??""}}).then(E=>E.json()).then(({code:E,result:T})=>{if(E===200){const N=T.id;m.currentId=N,m.src=`${a.srcPrefix??""}/jmreport/index/${m.currentId}?token=${a.token}&menuType=printinfo`,l("created",m.currentId)}}).catch(E=>{console.error(E)})},C=()=>{if(!i.value){v();return}m.src=`${a.srcPrefix??""}/jmreport/index/${m.currentId}?token=${a.token}`};return f.onMounted(()=>{C()}),(E,T)=>m.src?(f.openBlock(),f.createElementBlock("iframe",{key:0,width:"100%",height:"100%",src:m.src,frameborder:"0"},null,8,ype)):f.createCommentVNode("v-if",!0)}}),_pe=Gs(Cpe),wpe=["src"],Spe={name:"IkPrintView"},Epe=f.defineComponent({...Spe,props:{modelValue:{type:Boolean,default:!1},templateId:{},dataId:{},srcPrefix:{default:""},token:{},idKey:{default:"id"},width:{default:"100%"},height:{default:"calc(100vh - 186px)"}},emits:["update:modelValue"],setup(c,{emit:r}){const a=c,l=r,i=f.computed({get:()=>a.modelValue,set:C=>{l("update:modelValue",C)}}),m=f.reactive({src:"",showIframe:!1}),v=()=>{m.showIframe=!1,m.src=`${a.srcPrefix}/jmreport/view/${a.templateId}?token=${a.token??""}&${a.idKey}=${a.dataId}`,setTimeout(()=>{m.showIframe=!0},300)};return f.watch(()=>i.value,C=>{C&&v()}),f.onMounted(()=>{i.value&&v()}),(C,E)=>{const T=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(T,{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=N=>i.value=N),fullscreen:"",title:"预览"},{default:f.withCtx(()=>[f.createElementVNode("div",{style:f.normalizeStyle({width:a.width,height:a.height})},[m.showIframe?(f.openBlock(),f.createElementBlock("iframe",{key:0,width:"100%",height:"100%",src:m.src,frameborder:"0"},null,8,wpe)):f.createCommentVNode("v-if",!0)],4)]),_:1},8,["modelValue"])}}}),kpe=Gs(Epe),xpe={class:"ik-full-calendar"},Ape=["onClick"],Tpe={key:0,class:"event-title allday"},Dpe={key:0,class:"event-title-time"},Rpe={key:1,class:"event-title no-allday"},Ope={class:"event-title-time"},Npe={class:"event-title-text"},Ipe={name:"IkFullCalendar"},Bpe=f.defineComponent({...Ipe,props:{options:{default:{}},removable:{type:Boolean,default:!0},modelValue:{default:[]},tooltipFieldName:{default:"remark"}},emits:["added","deleted","update:modelValue","eventClick","deleteClick","dateSelect"],setup(c,{expose:r,emit:a}){const l=c,i=f.computed({get:()=>l.modelValue,set:q=>m("update:modelValue",q)}),m=a,v=f.ref(null),C=q=>{},E=f.ref("dayGridMonth"),T=q=>{m("dateSelect",q)},N=q=>{m("eventClick",q)},V=q=>{m("deleteClick",q)},U=()=>({locale:jQ,plugins:[Ote,Gte,$te],headerToolbar:{left:"dayGridMonth,timeGridWeek,timeGridDay prev,today,next",center:"title",right:""},firstDay:1,initialView:"dayGridMonth",weekends:!0,editable:!0,selectable:!0,selectMirror:!0,dateClick:C,select:T,...l.options,events:i.value}),z=f.reactive({timeType:"month",options:U()}),W=f.ref(null),K=()=>{var q;z.options=U(),(q=v.value)==null||q.buildOptions(z.options)};r({...{prev:()=>{var q;(q=W.value)==null||q.prev()},next:()=>{var q;(q=W.value)==null||q.next()},today:()=>{var q;(q=W.value)==null||q.today()},changeView:q=>{var X;(X=W.value)==null||X.changeView(q),E.value=q},getDate:()=>{var q;return(q=W.value)==null?void 0:q.getDate()},getView:()=>{var q;return(q=W.value)==null?void 0:q.view},unselect:()=>{var q;return(q=W.value)==null?void 0:q.unselect()}}}),f.watch(()=>i.value,()=>{K()});const ce=()=>{var q;W.value=(q=v.value)==null?void 0:q.getApi()};return f.onMounted(()=>{ce()}),(q,X)=>{const Ce=f.resolveComponent("el-tooltip"),st=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",xpe,[f.createVNode(f.unref(_te),{ref_key:"_ref",ref:v,options:z.options,style:{height:"100%"}},{eventContent:f.withCtx(Ne=>[f.createElementVNode("div",{class:"title-line",onClick:ee=>N(Ne)},[f.createVNode(Ce,null,{content:f.withCtx(()=>{var ee,xe;return[f.createCommentVNode(" {{arg}} "),f.createTextVNode(" "+f.toDisplayString((xe=(ee=Ne.event)==null?void 0:ee.extendedProps)==null?void 0:xe[l.tooltipFieldName]),1)]}),default:f.withCtx(()=>[Ne.event.allDay?(f.openBlock(),f.createElementBlock("span",Tpe,[E.value==="dayGridMonth"?(f.openBlock(),f.createElementBlock("span",Dpe,f.toDisplayString("(全天)"))):f.createCommentVNode("v-if",!0),f.createElementVNode("span",null,f.toDisplayString(Ne.event.title),1)])):(f.openBlock(),f.createElementBlock("span",Rpe,[f.createElementVNode("span",Ope,f.toDisplayString(f.unref(wo.ikDate).toDateTime(Ne.event.startStr,"HH:mm")),1),f.createElementVNode("span",Npe,f.toDisplayString(Ne.event.title),1)]))]),_:2},1024),l.removable?(f.openBlock(),f.createBlock(st,{key:0,size:16,onClick:f.withModifiers(ee=>V(Ne),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(OQ))]),_:2},1032,["onClick"])):f.createCommentVNode("v-if",!0)],8,Ape)]),_:1},8,["options"])])}}}),wSe="",Mpe=Zs(Bpe,[["__scopeId","data-v-f0925ff8"]]);let Ppe=class{constructor(){MS(this,"id",new Date().getTime());MS(this,"title","");MS(this,"start","");MS(this,"end","");MS(this,"allDay",!1);MS(this,"extendedProps",{})}};const qte=Gs(Mpe),Lpe={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},Fpe={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$pe=["xlink:href"],Vpe=["src"],Hpe={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},zpe=["xlink:href"],Upe=["src"],Wpe=f.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},setup(c){const r=c,a=f.computed(()=>r),l=f.computed(()=>{const{name:m}=a.value;return/^http?:\/\//.test(m)?"img":/i-[^:]+:[^:]+/.test(m)?"unocss":m!=null&&m.startsWith("iksig")?"iksig":m!=null&&m.includes(":")?"iconify":m!=null&&m.startsWith("iksvg")?"svg":"i"}),i=f.computed(()=>{const m=[];if(a.value.flip)switch(a.value.flip){case"horizontal":m.push("rotateY(180deg)");break;case"vertical":m.push("rotateX(180deg)");break;case"both":m.push("rotateX(180deg)"),m.push("rotateY(180deg)");break}a.value.rotate&&m.push(`rotate(${a.value.rotate%360}deg)`);const v={pointerEvents:a.value.disabled?"none":"auto",...a.value.color&&{color:a.value.color},...a.value.size&&{fontSize:typeof a.value.size=="number"?`${a.value.size}px`:a.value.size},...m.length&&{transform:m.join(" ")},padding:a.value.showBg||a.value.bg?a.value.padding:0,...a.value.color&&l.value!=="iksig"?{"--ik-color-icon-dark":a.value.color,"--ik-color-icon-light":a.value.colorLight||wo.ikColor.setOpacity(a.value.color,a.value.opacity)}:{}};return a.value.width&&(v.width=v.height=typeof a.value.width=="number"?`${a.value.width}px`:a.value.width),v});return(m,v)=>{const C=f.resolveComponent("el-tooltip"),E=f.resolveComponent("el-button");return a.value.tableIconType==="icon"||!a.value.tableIconType?(f.openBlock(),f.createElementBlock("span",Lpe,[a.value.notip||!a.value.title?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[m.name]:l.value==="unocss","show-bg":a.value.showBg||a.value.bg,default:a.value.size==="default",small:a.value.size==="small",big:a.value.size==="big",warning:a.value.warning||a.value.type==="warning",primary:a.value.primary||a.value.type==="primary",success:m.success||a.value.type==="success",error:a.value.error||a.value.type==="error",active:a.value.active,disabled:a.value.disabled}]),style:f.normalizeStyle(i.value)},[f.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),l.value==="iksig"?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(`iksig ${a.value.name}`),style:f.normalizeStyle(i.value)},null,6)):l.value==="svg"?(f.openBlock(),f.createElementBlock("svg",Fpe,[f.createElementVNode("use",{"xlink:href":`#${a.value.name}`},null,8,$pe)])):l.value==="img"?(f.openBlock(),f.createElementBlock("img",{key:2,src:a.value.name,class:"h-[1em] w-[1em]"},null,8,Vpe)):(f.openBlock(),f.createElementBlock("i",{key:3,class:f.normalizeClass(a.value.name),style:f.normalizeStyle(i.value)},null,6))],6)):(f.openBlock(),f.createBlock(C,{key:1,content:a.value.title,placement:"top"},{default:f.withCtx(()=>[f.createElementVNode("i",{class:f.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[m.name]:l.value==="unocss","show-bg":a.value.showBg||a.value.bg,default:a.value.size==="default",small:a.value.size==="small",big:a.value.size==="big",warning:a.value.warning||a.value.type==="warning",primary:m.primary||a.value.type==="primary",success:m.success||a.value.type==="success",error:a.value.error||a.value.type==="error",active:a.value.active}]),style:f.normalizeStyle(i.value)},[l.value==="iksig"?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(`iksig ${a.value.name}`),style:f.normalizeStyle(i.value)},null,6)):l.value==="svg"?(f.openBlock(),f.createElementBlock("svg",Hpe,[f.createElementVNode("use",{"xlink:href":`#${a.value.name}`},null,8,zpe)])):l.value==="img"?(f.openBlock(),f.createElementBlock("img",{key:2,src:a.value.name,class:"h-[1em] w-[1em]"},null,8,Upe)):(f.openBlock(),f.createElementBlock("i",{key:3,class:f.normalizeClass(a.value.name),style:f.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(f.openBlock(),f.createBlock(E,{key:1,type:["warning","error"].includes(a.value.type)?"danger":""},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a.value.title),1)]),_:1},8,["type"]))}}}),SSe="",cr=Gs(Zs(Wpe,[["__scopeId","data-v-52806adf"]])),yV=c=>(f.pushScopeId("data-v-e308f501"),c=c(),f.popScopeId(),c),jpe={class:"ik-schedule"},Gpe={class:"ik-schedule__left"},Zpe={class:"ik-schedule__header"},qpe={class:"ik-schedule__title"},Kpe=yV(()=>f.createElementVNode("div",{class:"ik-schedule__header-right"},null,-1)),Ype={class:"ik-schedule__body"},Xpe={style:{"font-size":"18px"}},Qpe={key:0},Jpe={style:{width:"90%",display:"flex","align-items":"center","justify-content":"space-between"}},e1e={key:0,style:{"margin-left":"2%"}},t1e=yV(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),n1e={key:1},o1e=yV(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),s1e={class:"dialog-footer"},r1e={name:"IkSchedule"},i1e=f.defineComponent({...r1e,props:{modelValue:{default:[]},options:{default:{initialView:"dayGridMonth"}},editVisible:{type:Boolean},removable:{type:Boolean,default:!0}},emits:["update:modelValue","added","updated","deleted","editOpen","submit","update:editVisible","submitAdd","submitUpdate","submitDelete"],setup(c,{expose:r,emit:a}){var ee;const l=c,i=a,m=!!f.useSlots().form,v=f.computed({get:()=>l.modelValue,set:xe=>{i("update:modelValue",xe)}}),C=f.computed(()=>({...l.options,headerToolbar:!1})),E=f.reactive({currentView:(ee=l.options)==null?void 0:ee.initialView,viewTitle:"",rightLabel:"今日",timeType:"month",currentDate:null}),T=f.ref(null),N=xe=>{var et;(et=T.value)==null||et.changeView(xe),E.currentView=xe,V()},V=()=>{var et;const xe=(et=T.value)==null?void 0:et.getView();E.viewTitle=xe==null?void 0:xe.title},U=()=>{var xe;(xe=T.value)==null||xe.prev(),V()},z=()=>{var xe;(xe=T.value)==null||xe.next(),V()},W=()=>{var xe;(xe=T.value)==null||xe.today(),V()},K=xe=>E.currentView===xe,Z=f.ref(null),ce={createDefaultForm:()=>({title:"",allDay:!1,type:1,startDate:"",endDate:"",startTime:"",endTime:"",location:"",remark:""}),close:()=>{X.value=!1},customSubmit:xe=>{var tt,je;let et={...xe,id:void 0,allDay:q.form.allDay,start:(tt=q.selectInfo)==null?void 0:tt.startStr,end:(je=q.selectInfo)==null?void 0:je.endStr};ce.operation(et),ce.close()},operation:xe=>{var et;q.operation==="add"?i("submitAdd",xe):(xe.id=(et=q.editEvent)==null?void 0:et.id,i("submitUpdate",xe))},submit:async()=>{var et,tt;if(m){i("submit");return}if(!q.form.title){Lt.ElMessage.info("标题不能为空");return}if(!q.form.allDay&&(!q.form.startTime||!q.form.endTime)){Lt.ElMessage.info("时间不能为空");return}let xe={id:void 0,title:q.form.title,allDay:q.form.allDay,start:(et=q.selectInfo)==null?void 0:et.startStr,end:(tt=q.selectInfo)==null?void 0:tt.endStr,extendedProps:{...q.form}};if(xe.allDay)xe.start=wo.ikDate.toDate(q.form.startDate),xe.end=wo.ikDate.toDate(q.form.endDate);else{const je=wo.ikDate.toDate(q.form.startDate),be=wo.ikDate.toDateTime(q.form.startTime).substring(10),An=wo.ikDate.toDateTime(q.form.endTime).substring(10);xe.start=`${je}${be}`,xe.end=`${je}${An}`,xe.extendedProps.startTime=xe.start,xe.extendedProps.endTime=xe.end}ce.operation(xe),ce.close()},reset:()=>{var xe;q.form=ce.createDefaultForm(),(xe=Z.value)==null||xe.clearValidate()},edit:()=>{q.editable=!0,q.title="编辑日程"},cancelEdit:()=>{q.editable=!1,q.title="日程信息"},del:()=>{Ne(q.clickInfo)}},q=f.reactive({operation:"update",selectInfo:{},editEvent:void 0,title:"",visible:!1,allDay:!1,form:ce.createDefaultForm(),editable:!1,clickInfo:null}),X=f.computed({get:()=>q.visible,set:xe=>{q.visible=xe}}),Ce=xe=>{var et;if(q.form.allDay=xe.allDay,q.selectInfo=xe,ce.reset(),xe.view.type=="dayGridMonth"){let tt=xe.end.getTime()-864e5;E.timeType="month",q.form.startDate=wo.ikDate.toYMD(xe.start),q.form.endDate=wo.ikDate.toYMD(new Date(tt)),q.form.allDay=!0}else xe.view.type=="timeGridWeek"?E.timeType="week":xe.view.type=="timeGridDay"&&(E.timeType="day"),q.form.startDate=wo.ikDate.toYMD(xe.start),q.form.endDate=wo.ikDate.toYMD(xe.start),q.form.startTime=wo.ikDate.toDateTime(xe.start),q.form.endTime=wo.ikDate.toDateTime(xe.end);(et=T.value)==null||et.unselect(),f.nextTick(()=>{q.title="新建日程",q.operation="add",q.editable=!0,X.value=!0,i("editOpen",JSON.parse(JSON.stringify(q)))})},st=xe=>{q.title="日程信息",q.operation="update",q.clickInfo=xe,q.editEvent=xe.event;debugger;q.editEvent.allDay?(q.form.startDate=q.editEvent.startStr,q.form.endDate=q.editEvent.startStr):(q.form.startDate=q.editEvent.startStr,q.form.startTime=q.editEvent.start,q.form.endTime=q.editEvent.end),q.form.title=q.editEvent.title,q.form.allDay=q.editEvent.allDay,sre.copyValue(q.form,q.editEvent.extendedProps),ce.cancelEdit(),X.value=!0,i("editOpen",JSON.parse(JSON.stringify(q)))},Ne=xe=>{Lt.ElMessageBox.confirm(`你确定删除事件 ${xe.event.title} ?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ce.close(),i("submitDelete",xe.event.id)})};return r({customSubmit:xe=>ce.customSubmit(xe)}),f.onMounted(()=>{V()}),(xe,et)=>{const tt=f.resolveComponent("el-button"),je=f.resolveComponent("el-button-group"),be=f.resolveComponent("el-icon"),An=f.resolveComponent("el-space"),fn=f.resolveComponent("el-input"),Vt=f.resolveComponent("el-form-item"),F=f.resolveComponent("el-date-picker"),_n=f.resolveComponent("el-time-picker"),Ge=f.resolveComponent("el-checkbox"),Et=f.resolveComponent("el-form"),kt=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock("div",jpe,[f.createElementVNode("div",Gpe,[f.createElementVNode("div",Zpe,[f.createVNode(An,{style:{"flex-shrink":"0"},size:24},{default:f.withCtx(()=>[f.createVNode(je,null,{default:f.withCtx(()=>[f.createVNode(tt,{onClick:et[0]||(et[0]=We=>N("dayGridMonth")),type:K("dayGridMonth")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("月")]),_:1},8,["type"]),f.createVNode(tt,{onClick:et[1]||(et[1]=We=>N("timeGridWeek")),type:K("timeGridWeek")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("周")]),_:1},8,["type"]),f.createVNode(tt,{onClick:et[2]||(et[2]=We=>N("timeGridDay")),type:K("timeGridDay")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("日")]),_:1},8,["type"])]),_:1}),f.createElementVNode("span",qpe,f.toDisplayString(E.viewTitle),1),f.createVNode(je,{style:{"flex-shrink":"0"}},{default:f.withCtx(()=>[f.createVNode(tt,{onClick:U},{default:f.withCtx(()=>[f.createVNode(be,null,{default:f.withCtx(()=>[f.createVNode(f.unref(n$))]),_:1})]),_:1}),f.createVNode(tt,{onClick:W},{default:f.withCtx(()=>[f.createTextVNode("今天")]),_:1}),f.createVNode(tt,{onClick:z},{default:f.withCtx(()=>[f.createVNode(be,null,{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})]),_:1})]),_:1})]),_:1}),Kpe]),f.createElementVNode("div",Ype,[f.createVNode(f.unref(qte),{removable:xe.removable,onDateSelect:Ce,onDeleteClick:Ne,onEventClick:st,ref_key:"_refCalendar",ref:T,options:C.value,modelValue:v.value,"onUpdate:modelValue":et[3]||(et[3]=We=>v.value=We)},null,8,["removable","options","modelValue"])])]),f.createCommentVNode(" 新建/修改对话框 "),f.createVNode(kt,{width:"700px",modelValue:X.value,"onUpdate:modelValue":et[11]||(et[11]=We=>X.value=We)},{header:f.withCtx(()=>[f.createElementVNode("div",null,[f.createElementVNode("span",Xpe,f.toDisplayString(q.title),1),q.operation==="update"?(f.openBlock(),f.createElementBlock("span",Qpe,[q.editable?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,style:{"margin-left":"4px"},name:"iksvg_qiehuan-daohang",onClick:ce.cancelEdit},null,8,["onClick"])):(f.openBlock(),f.createBlock(f.unref(cr),{key:0,style:{"margin-left":"4px"},name:"iksvg_xiugai",onClick:ce.edit},null,8,["onClick"]))])):f.createCommentVNode("v-if",!0)])]),footer:f.withCtx(()=>[f.createElementVNode("span",s1e,[f.renderSlot(xe.$slots,"form-footer",{},()=>[f.createElementVNode("span",null,[f.createVNode(tt,{onClick:ce.close},{default:f.withCtx(()=>[f.createTextVNode("取消")]),_:1},8,["onClick"]),f.createVNode(tt,{onClick:ce.del},{default:f.withCtx(()=>[f.createTextVNode("删除")]),_:1},8,["onClick"]),f.createVNode(tt,{type:"primary",onClick:ce.submit},{default:f.withCtx(()=>[f.createTextVNode("确定")]),_:1},8,["onClick"])])],!0)])]),default:f.withCtx(()=>[f.renderSlot(xe.$slots,"form",{},()=>[f.createVNode(Et,{ref_key:"_editFormRef",ref:Z,model:q.form,disabled:!q.editable},{default:f.withCtx(()=>[f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(DQ))]),_:1}),f.createVNode(fn,{modelValue:q.form.title,"onUpdate:modelValue":et[4]||(et[4]=We=>q.form.title=We),placeholder:"请输入标题",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(RQ))]),_:1}),f.createElementVNode("div",Jpe,[f.createVNode(F,{disabled:"",modelValue:q.form.startDate,"onUpdate:modelValue":et[5]||(et[5]=We=>q.form.startDate=We),type:"date",placeholder:"开始日期",style:f.normalizeStyle({width:q.form.allDay?"45%":"90%"})},null,8,["modelValue","style"]),q.form.allDay?(f.openBlock(),f.createElementBlock("div",n1e,[o1e,f.createVNode(F,{disabled:"",modelValue:q.form.endDate,"onUpdate:modelValue":et[8]||(et[8]=We=>q.form.endDate=We),type:"date",placeholder:"结束日期",style:{width:"90%"}},null,8,["modelValue"])])):(f.openBlock(),f.createElementBlock("div",e1e,[f.createVNode(_n,{modelValue:q.form.startTime,"onUpdate:modelValue":et[6]||(et[6]=We=>q.form.startTime=We),type:"datetime",placeholder:"开始时间",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"]),t1e,f.createVNode(_n,{modelValue:q.form.endTime,"onUpdate:modelValue":et[7]||(et[7]=We=>q.form.endTime=We),type:"datetime",placeholder:"结束时间",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"])])),f.createVNode(Ge,{modelValue:q.form.allDay,"onUpdate:modelValue":et[9]||(et[9]=We=>q.form.allDay=We),label:"全天",style:{"margin-left":"2%"}},null,8,["modelValue"])])]),_:1}),f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(jre))]),_:1}),f.createVNode(fn,{type:"textarea",modelValue:q.form.remark,"onUpdate:modelValue":et[10]||(et[10]=We=>q.form.remark=We),placeholder:"描述",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","disabled"])],!0)]),_:3},8,["modelValue"])])}}}),kSe="",a1e=Gs(Zs(i1e,[["__scopeId","data-v-e308f501"]])),l1e={key:0,class:"ik-tabs-split overflow-overlay gl-padding"},c1e=f.defineComponent({__name:"IkPageTabs",props:f.mergeModels({tabs:{type:Array,default:()=>[]},defaultSlot:{type:Boolean,default:!0},lazyTab:{type:Boolean,default:!1},split:{type:Boolean,default:!1}},{modelValue:{type:String||Number,default:""},modelModifiers:{}}),emits:f.mergeModels(["tabClick","search"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=r,i=f.useModel(c,"modelValue"),m=f.ref(new Map);for(const C of a.tabs)m.value.set(C.id,a.lazyTab?C.id!==i.value:!1);const v=C=>{i.value=C.paneName,m.value.get(C.paneName)||l("tabClick",C.paneName,C),m.value.set(C.paneName,!1)};return(C,E)=>{const T=f.resolveComponent("el-tab-pane"),N=f.resolveComponent("el-tabs");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createCommentVNode(' <div class="flex-1 contents"> '),f.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=V=>i.value=V),class:f.normalizeClass(["ik-tabs",{"is-default":C.$slots.default,"split gl-padding gl-container":c.split}]),onTabClick:v},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.tabs,V=>(f.openBlock(),f.createBlock(T,{key:V.id,disabled:V==null?void 0:V.disabled,name:V.id},{label:f.withCtx(()=>[f.createElementVNode("span",null,f.toDisplayString(V.label),1)]),default:f.withCtx(()=>[!C.$slots.default&&!m.value.get(V.id)&&!c.split?f.renderSlot(C.$slots,V.id,{key:0},void 0,!0):f.createCommentVNode("v-if",!0)]),_:2},1032,["disabled","name"]))),128)),f.createCommentVNode(" 当存在默认slot且需要展示默认slot时 "),C.$slots.default&&c.defaultSlot&&!c.split?f.renderSlot(C.$slots,"default",{key:0},void 0,!0):f.createCommentVNode("v-if",!0)]),_:3},8,["modelValue","class"]),c.split?(f.openBlock(),f.createElementBlock("div",l1e,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.tabs,V=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[!C.$slots.default&&!m.value.get(V.id)?f.renderSlot(C.$slots,V.id,{key:0},void 0,!0):f.createCommentVNode("v-if",!0)],64))),256)),C.$slots.default&&c.defaultSlot?f.renderSlot(C.$slots,"default",{key:0},void 0,!0):f.createCommentVNode("v-if",!0)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" </div> ")],64)}}}),ASe="",u1e=Gs(Zs(c1e,[["__scopeId","data-v-e282a7f2"]]));var J1=(c=>(c.input="input",c.area="area",c.number="number",c.select="select",c.date="date",c.datetime="datetime",c.checkbox="checkbox",c.radio="radio",c.treeselect="treeselect",c.choosePerson="choosePerson",c))(J1||{}),X2=(c=>(c.year="year",c.month="month",c.date="date",c.dates="dates",c.datetime="datetime",c.week="week",c.datetimerange="datetimerange",c.daterange="daterange",c.monthrange="monthrange",c))(X2||{});function Kte(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!f.isVNode(c)}const d1e=f.defineComponent({name:"IkSearchAuto",props:{list:{required:!0,type:Array,default:()=>[]},shadow:{type:String,default:"never"},immediate:{type:Boolean,default:!0},tab:{type:String,default:""},search:{type:Function,default:null},loading:{type:Boolean,default:!1}},emits:["search","pickerChange"],setup(c,{emit:r,expose:a}){const l=f.ref(),i={},m=f.ref({}),v=f.ref([]),C=f.ref({...m.value});f.watch(v,(at,Sn)=>{const lt=Sn.filter($t=>!at.includes($t));if(lt.length){let $t=!1;lt.forEach(Ze=>{C.value[Ze]!==void 0&&($t=!0),C.value[Ze]=void 0}),$t&&r("search",C.value)}});const E=()=>{v.value=[],c.list.forEach(at=>{var Sn,lt;m.value[at.key]=m.value[at.value],i[at.key]=i[at.value],v.value.push(at.key),(Sn=C.value)[lt=at.key]??(Sn[lt]=at.value||null)})};E(),f.watch(()=>c.list,()=>{E()});const T=f.computed(()=>v.value.map(at=>c.list.find(Sn=>Sn.key===at))),N=()=>{var at;C.value.page=1,(at=c.search)==null||at.call(c,C.value),r("search",C.value)};a({resetForm:()=>{var at,Sn;(Sn=(at=l.value)==null?void 0:at.resetFields)==null||Sn.call(at),N()},reRequest:()=>{N()}});const z=()=>{var at;r("search",C.value),(at=c.search)==null||at.call(c,C.value)},W=at=>{at.key==="Enter"&&N()},K=()=>{var at;(at=l.value)==null||at.resetFields(),N()};c.immediate&&N();const Z=({maxlength:at,minlength:Sn,key:lt,disabled:$t,placeholder:Ze,formProp:ct={},value:oe,label:po})=>f.createVNode(Lt.ElInput,f.mergeProps({modelValue:C.value[lt],"onUpdate:modelValue":[Nn=>C.value[lt]=Nn,Nn=>C.value[lt]=Nn],clearable:!0,maxlength:at,minlength:Sn,disabled:$t,onBlur:()=>z()},ct,{placeholder:(ct==null?void 0:ct.placeholder)||Ze||`请输入${po||""}`}),null),ce=({key:at,placeholder:Sn,max:lt,min:$t,disabled:Ze,precision:ct,step:oe=1,label:po,formProp:Nn={}})=>f.createVNode(Lt.ElInputNumber,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":yo=>C.value[at]=yo,clearable:!0,max:lt,min:$t,disabled:Ze,precision:ct,step:oe,onChange:()=>z()},Nn,{placeholder:(Nn==null?void 0:Nn.placeholder)||Sn||`请输入${po||""}`}),null),q=({key:at,placeholder:Sn,disabled:lt,options:$t,label:Ze,multiple:ct=!1,filterable:oe=!0,formProp:po={}})=>f.createVNode(Lt.ElSelect,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,clearable:!0,disabled:lt,multiple:ct,filterable:oe,onChange:()=>z()},po,{placeholder:(po==null?void 0:po.placeholder)||Sn||`请选择${Ze||""}`}),{default:()=>[$t==null?void 0:$t.map(Nn=>f.createVNode(Lt.ElOption,{key:Nn.value,label:Nn.label,value:Nn.value},null))]}),X=({key:at,disabled:Sn,options:lt,formProp:$t={}})=>f.createVNode(Lt.ElRadioGroup,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ze=>C.value[at]=Ze,disabled:Sn,onChange:()=>z()},$t),{default:()=>[lt==null?void 0:lt.map(Ze=>($t==null?void 0:$t.radioType)==="button"?f.createVNode(Lt.ElRadioButton,{key:Ze.value,label:Ze.value,name:Ze.label},null):f.createVNode(Lt.ElRadio,{key:Ze.value,label:Ze.value,name:Ze.label},null))]}),Ce=({key:at,disabled:Sn,options:lt,min:$t,max:Ze,formProp:ct={}})=>f.createVNode(Lt.ElCheckboxGroup,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":oe=>C.value[at]=oe,disabled:Sn,max:Ze,min:$t,onChange:()=>z()},ct),{default:()=>[lt==null?void 0:lt.map(oe=>f.createVNode(Lt.ElCheckbox,{key:oe.value,label:oe.label,value:oe.value},null))]}),st=({key:at,label:Sn,formProp:lt={},placeholder:$t})=>f.createVNode(Lt.ElDatePicker,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ze=>C.value[at]=Ze,onChange:()=>z()},lt,{placeholder:(lt==null?void 0:lt.placeholder)||$t||`请选择${Sn}时间`}),null),Ne=({key:at,disabled:Sn,editable:lt=!0,startPlaceholder:$t="开始日期",endplaceholder:Ze="结束日期",dateType:ct=X2.date,format:oe,placeholder:po="请选择日期",popperclass:Nn,rangeSeparator:yo="-",defaultValue:Fo,defaultTime:gi,valueFormat:vt,disabledDate:Wt=()=>!1,formProp:St={}})=>{let Ue=oe;if(Ue)switch(ct){case X2.date:case X2.dates:Ue="YYYY-MM-DD";break;case X2.year:Ue="YYYY";break;case X2.month:Ue="YYYY-MM";break;case X2.week:Ue="YYYY-MM-DD";break;default:Ue=""}return f.createVNode(Lt.ElDatePicker,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":In=>C.value[at]=In,onChange:()=>z(),disabled:Sn,type:ct,editable:lt,startPlaceholder:$t,endPlaceholder:Ze,rangeSeparator:yo,format:Ue,popperClass:Nn,defaultValue:Fo,defaultTime:gi,valueFormat:vt,disabledDate:Wt},St,{placeholder:(St==null?void 0:St.placeholder)||po||"请选择日期"}),null)},ee=({key:at,options:Sn,multiple:lt=!1,filterable:$t=!0,nodeKey:Ze="id",props:ct,highlightCurrent:oe=!0,defaultExpandAll:po=!1,expandOnClickNode:Nn=!1,placeholder:yo="全部",checkOnClickNode:Fo=!1,showCheckbox:gi=!1,checkStrictly:vt=!0,defaultCheckedKeys:Wt=[],currentNodeKey:St="",accordion:Ue=!1,formProp:In={},label:xt})=>f.createVNode(Lt.ElTreeSelect,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ct=>C.value[at]=Ct,data:Sn,onChange:()=>z(),clearable:!0,multiple:lt,props:ct,placeholder:yo,filterable:$t,nodeKey:Ze,highlightCurrent:oe,defaultExpandAll:po,expandOnClickNode:Nn,checkOnClickNode:Fo,showCheckbox:gi,checkStrictly:vt,defaultCheckedKeys:Wt,currentNodeKey:St,accordion:Ue},In,{placeholder:(In==null?void 0:In.placeholder)||yo||`请选择${xt||""}`}),null),xe=({key:at,selectKey:Sn,placeholder:lt,disabled:$t,options:Ze,multiple:ct=!1,filterable:oe=!0,formProp:po={}})=>f.createVNode(Lt.ElInput,f.mergeProps({disabled:$t,modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,onBlur:()=>z()},po,{placeholder:(po==null?void 0:po.placeholder)||lt||"全部"}),{prepend:()=>f.createVNode(Lt.ElSelect,f.mergeProps({disabled:$t,multiple:ct,filterable:oe,modelValue:C.value[Sn],"onUpdate:modelValue":Nn=>C.value[Sn]=Nn,onChange:()=>z()},po),{default:()=>[Ze==null?void 0:Ze.map(Nn=>f.createVNode(Lt.ElOption,{key:Nn.value,label:Nn.label,value:Nn.value},null))]})}),et="",tt="iking",je=f.ref(null),be=f.ref([]),An=f.ref(!1),fn=f.ref(""),Vt=new Map,F=at=>{An.value=!0,be.value=Vt.has(at)?Vt.get(at):C.value[at],fn.value=at},_n=()=>{Vt.set(fn.value,[]),fn.value="",z()},Ge=at=>{var Sn,lt;C.value[fn.value]=(Sn=at.list.map($t=>$t.elementName))==null?void 0:Sn.join(","),Vt.set(fn.value,at.list),r("search",C.value),r("pickerChange",at),(lt=c.search)==null||lt.call(c,C.value)},Et=({key:at,placeholder:Sn,typeOption:lt,_list:$t,maxlength:Ze,minlength:ct,disabled:oe,formProp:po})=>f.createVNode(Lt.ElInput,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,clearable:!0,maxlength:Ze,minlength:ct,disabled:oe},po,{onClick:()=>F(at),onClear:()=>_n(),placeholder:(po==null?void 0:po.placeholder)||Sn||`点击选择${label||"人员"}`}),null),kt=at=>{switch(at.type){case"":case void 0:case J1.input:case"el-input":return Z(at);case J1.number:case"el-input-number":return ce(at);case J1.select:case"el-select":return q(at);case J1.checkbox:case"el-checkbox":return Ce(at);case J1.radio:case"el-radio-group":case"el-radio":return X(at);case J1.date:case"el-date-picker":return Ne(at);case"el-time-select":return st(at);case J1.treeselect:case"el-tree-select":return ee(at);case J1.choosePerson:return Et(at);case"select-input":return xe(at);default:return f.createVNode(f.Fragment,null,null)}},We=f.computed(()=>{var lt;const at=[],Sn=T.value.length-1;return(lt=T.value)==null||lt.forEach(($t,Ze)=>{let ct,oe;if(!$t)return[];const po=$t.col||1;at.push(f.createVNode(Lt.ElCol,{xl:{span:po*6},lg:{span:po*6},md:{span:po*12},sm:{span:po*24}},{default:()=>[Ze===Sn?f.createVNode("div",{class:"last-form"},[f.createVNode(Lt.ElFormItem,{label:$t.type==="select-input"?"":$t.label,prop:$t.key},Kte(ct=kt($t))?ct:{default:()=>[ct]}),f.createVNode(cr,{name:"icon-sousuo1",pop:!0,title:"搜索",size:"big","show-bg":!0,width:40,onClick:()=>z()},null),f.createVNode(cr,{name:"icon-zhongzhi",pop:!0,title:"重置并搜索",size:"big","show-bg":!0,width:40,onClick:()=>K()},null)]):f.createVNode(Lt.ElFormItem,{label:$t.type==="select-input"?"":$t.label,prop:$t.key},Kte(oe=kt($t))?oe:{default:()=>[oe]})]}))}),at});return()=>f.createVNode(f.Fragment,null,[f.createVNode(Lt.ElCard,{class:"gl-search-card",shadow:c.shadow},{default:()=>[f.createVNode(Lt.ElForm,{class:"auto-search-form",onKeyup:W,ref:l,model:C.value},{default:()=>[f.createVNode(Lt.ElRow,{gutter:16},{default:()=>[We.value]})]})]}),f.createVNode(yA,{ref:je.value,modelValue:be.value,"onUpdate:modelValue":at=>be.value=at,show:An.value,"onUpdate:show":at=>An.value=at,"append-to-body":!0,api:{methods:"post",url:`${et}/server/component/pick/mix`,headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:tt}},tabs:["group","role","post"],chooseType:["user"],typeOption:{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},propOption:{name:"elementName",id:"elementId",type:"elementType"},onOk:at=>Ge(at)},null)])}}),f1e={class:"header-left"},m1e={class:"title"},h1e={class:"flex items-center"},g1e=f.defineComponent({__name:"IkPageHead",props:f.mergeModels({headerTitle:{type:String,default:""},headerBorder:{type:Boolean,default:!1},fields:{required:!0,type:Array,default:()=>[]},search:{type:Function,default:null},loading:{type:Boolean,default:!1},tabId:{type:Number||String,default:0},exportBtn:{type:Boolean,default:!1},refreshBtn:{type:Boolean,default:!1},settingBtn:{type:Boolean,default:!0},defaultShow:{type:Boolean,default:!1},headerHeight:{type:Number,default:66}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(c){f.useCssVars(T=>({"59e2b6b4":E}));const r=c,a=f.useModel(c,"modelValue"),l=f.ref(r.defaultShow),i=()=>{l.value=!l.value},m=f.computed(()=>r.fields.filter(T=>!T.onlyForm)),v=f.computed(()=>{var T;return(T=r.fields)==null?void 0:T.filter(N=>N.search)}),C=f.computed(()=>v.value.length),E=`${r.headerHeight}px`;return(T,N)=>{const V=f.resolveComponent("el-card");return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["ik-page-header",{"show-search":l.value}])},[f.createElementVNode("div",{class:"header",style:f.normalizeStyle({borderColor:c.headerBorder?"var(--ik-border-color)":"transparent",marginBottom:c.headerBorder?"8px":"0"})},[f.createElementVNode("div",f1e,[f.createCommentVNode(' 左侧标题、tab页或自定义内容 v-if="!$slots.headerLeft" '),f.createElementVNode("span",m1e,f.toDisplayString(c.headerTitle),1),f.renderSlot(T.$slots,"headerLeft",{},void 0,!0)]),f.createCommentVNode(" 默认按钮 "),f.createElementVNode("div",h1e,[f.createCommentVNode(" 右侧操作或自定义内容 "),f.renderSlot(T.$slots,"headerRight",{},void 0,!0),c.exportBtn?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_xiazai",type:"primary",title:"导出","show-bg":"",size:"default"})):f.createCommentVNode("v-if",!0),C.value?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,name:"iksvg_shaixuan1",size:"default",title:l.value?"收起筛选条件":"展开筛选条件","show-bg":"",onClick:i},null,8,["title"])):f.createCommentVNode("v-if",!0),c.refreshBtn?(f.openBlock(),f.createBlock(f.unref(cr),{key:2,name:"iksvg_zhongzhi1",title:"保留搜索条件刷新","show-bg":"",size:"default",onClick:c.search},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(` <IkSvgIcon\r
|
|
34
|
+
></i> `),(ce=W[c.propsField.children])!=null&&ce.length&&W.show?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,class:"ikapprove",onClick:q=>V(W,K),name:"iksvg_shouqi"},null,8,["onClick"])):f.createCommentVNode("v-if",!0)],14,Die)]),f.createElementVNode("ul",{class:f.normalizeClass(E(K))},[f.createElementVNode("div",{id:`children${K}`},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[c.propsField.children],(q,X)=>(f.openBlock(),f.createElementBlock("li",{class:f.normalizeClass(T(K,X)),style:f.normalizeStyle(c.needClick?"cursor: pointer;":""),key:X,onClick:Ce=>N(q,K+1+"-"+(X+1))},f.toDisplayString(q.name),15,Oie))),128))],8,Rie)],2)])}),128))]))}}),Vwe="",Iie=Gs(Zs(Nie,[["__scopeId","data-v-240cff4f"]])),s$=c=>c%1===0?c.toString():c.toFixed(2),Bie=(c,r=2)=>{if(c===void 0)return"";if(c===0)return"0 B";const a=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(c)/Math.log(1024));let i=c/Math.pow(1024,l);return(i%1===0?i.toFixed(r||0):i.toFixed(r))+" "+a[l]},Yv=(c,r)=>r?r.startsWith("http")?r:`${c||location.origin}${r}`:"",zwe="",HQ=c=>({nodeType:{发起人节点:"INITIATOR",审批节点:"APPROVE",抄送节点:"CARBON_COPY",办理节点:"DISPOSE",分支节点:"BRANCH",条件节点:"CONDITION",结束节点:"END",并行分支:"PARALLEL",子流程:"SUB_PROCESS",...c.defaultNodeType},defaultFile:{id:"id",parallelInstances:"parallelInstances",backToInstanceNodeName:"backToInstanceNodeName",backToRecordNodeName:"backToRecordNodeName",nodeId:"sortOrder",nodeType:"type",nodeTypeName:"name",approveStatus:"status",approveStatusName:"statusName",approveType:"approveType",multiExecutorType:"multiExecutorType",approveTypeName:"approveTypeName",multiExecutorTypeName:"multiExecutorTypeName",approvalCategory:"approvalCategory",isShowAdd:"initiatorSpecify",isShowAddCopy:"initiatorSpecifyCarbonCopy",executorEmpty:"executorEmpty",executorEmptyStrategy:"executorEmptyStrategy",reserveExecutorUsers:"reserveExecutorUsers",approvePersonList:"executorUsers",initiatorSpecifiedScope:"initiatorSpecifiedScope",initiatorSpecifiedScopeType:"initiatorSpecifiedScopeType",singleApproval:"singleApproval",originator:"username",...c.defaultFieldMap},statusWithoutApprover:{自动通过:"AUTO_PASS",自动拒绝:"AUTO_REJECT",自动转交管理员:"TRANSMIT_TO_MANAGER",指定人员审批:"SPECIFIED_USER",...c.statusWithoutApprover},multiple:!1,chooseType:[],statusOption:{发起:"INITIATE",等待:"WAIT",同意:"PASS",撤销:"REVOKE",拒绝:"REJECT",转交:"TRANSFER",加签:"APPEND",退回:"BACK",评论:"COMMENT",待执行:"WAITING",执行中:"RUNNING",...c.defaultStatus},listData:[]}),zQ=(c,r,a)=>{let l="";switch(r){case c.nodeType.审批节点:a&&a.length==1?l="ikapprove-ziyuan":l="ikapprove-shenpi";break;case c.nodeType.办理节点:l="ikapprove-bianji";break;case c.nodeType.抄送节点:l="ikapprove-chaosong";break;case c.nodeType.并行分支:l="ikapprove-fenzhi";break;case c.nodeType.子流程:l="ikapprove-ziliucheng1";break;default:l="ikapprove-ziyuan"}return`ikapprove ${l}`},UQ=["csv","djvu","doc","docm","docx","docxf","dot","dotm","dotx","epub","fb2","fodp","fods","fodt","htm","html","mht","odp","ods","odt","oform","otp","ots","ott","oxps","pdf","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx","rtf","txt","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xml","xps","png","jpeg","jpg","webp","video","mp4","flv","tls"],Xv=c=>{const r=f.inject("loadUrl"),a=f.computed(()=>c.loadUrl||c.fileUrl||(r==null?void 0:r.value)),l=f.inject("uploadUrl"),i=f.computed(()=>c.action||c.uploadUrl||(l==null?void 0:l.value)),m=f.inject("token"),v=f.computed(()=>c.token||(m==null?void 0:m.value)),C=f.inject("onlyofficeConfig"),E=f.computed(()=>c.onlyofficeConfig||(C==null?void 0:C.value)),T=f.inject("userInfo"),N=f.computed(()=>c.userInfo||(T==null?void 0:T.value)),V=[...UQ,...UQ.map(U=>U.toLocaleUpperCase())];return{cLoadUrl:a,cUploadUrl:i,cToken:v,cOnlyofficeConfig:E,cUserInfo:N,cOnlyofficePreviewType:V}},r$=c=>(f.pushScopeId("data-v-48f27627"),c=c(),f.popScopeId(),c),Mie={class:"approveProcess",id:"approveProcess"},Pie=["id"],Lie={class:"topBlock"},Fie={class:"left"},$ie={class:"nodeBg"},Vie=["src"],Hie={class:"right"},zie={class:"topInfo"},Uie={key:0},Wie={key:0,class:"main-text"},jie={class:"name"},Gie={key:0},Zie={key:0},qie={key:1},Kie=r$(()=>f.createElementVNode("span",{class:"red",style:{margin:"0px 5px"}}," 退回至",-1)),Yie={key:0},Xie={key:0},Qie={key:1},Jie={key:1},eae=r$(()=>f.createElementVNode("div",{class:"main-text"},"抄送人员",-1)),tae={class:"name"},nae={key:0},oae={style:{color:"#000"}},sae={class:"blue",style:{"margin-left":"5px","font-size":"12px"}},rae={key:1},iae={key:0,class:"blue",style:{"font-size":"12px"}},aae={key:1},lae={key:0,class:"blue",style:{"font-size":"12px"}},cae={key:1,class:"blue",style:{"font-size":"12px"}},uae={class:"time"},dae={key:0},fae={key:1},mae=["onClick"],hae=["onClick"],gae={key:0,class:"opinion"},pae={key:0},vae={key:1},yae=r$(()=>f.createElementVNode("span",{class:"ik-text-primary"},"添加审批人",-1)),bae={style:{color:"var(--el-text-color-primary)","margin-left":"8px"}},Cae={key:2,class:"annexImage"},_ae={key:3,class:"approveList"},wae={class:"nodeBg-list"},Sae=["src"],Eae={key:1},kae={key:2,class:"ikapprove ikapprove-duihao2 green read"},xae=["title"],Aae={key:0,class:"branch"},Tae={class:"branch-card"},Dae={class:"branch-name"},Rae={name:"IkingApprovalProcessDetail"},Oae=f.defineComponent({...Rae,props:{local:{type:Boolean,default:!1},defaultStatus:{type:Object,default:()=>({})},defaultNodeType:{type:Object,default:()=>({})},dataList:{type:Array,default:()=>[]},defaultFieldMap:{type:Object,default:()=>({})},returnNode:{type:Array,default:()=>[]},fileUrl:{type:String,default:""},kkUrl:{type:String,default:""},isOnlyOfficePreview:{type:Boolean,default:!1},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""}},emits:["preview"],setup(c,{emit:r}){const a=c,{cLoadUrl:l}=Xv(a),i=f.reactive(HQ(a));f.watch(()=>a.dataList,N=>{N&&(f.nextTick(()=>{i.listData=N}),setTimeout(()=>{a.returnNode.length&&m()},500))},{deep:!0}),f.onMounted(()=>{a.dataList.length&&(i.listData=a.dataList,setTimeout(()=>{a.returnNode.length&&m()},500))});const m=()=>{let N=null;if(a!=null&&a.returnNode)for(N of a==null?void 0:a.returnNode){if(isNaN(N[1]))return;let V=Array.from(new Array(N[1]+1).keys()).slice(N[0]);f.nextTick(()=>{v(V)})}},v=N=>{var ce,q,X;let V=document.createElement("div"),U=document.getElementById("approveProcess"),z=0,W=(ce=document.getElementById(`${N[0]}`))==null?void 0:ce.offsetWidth,K=(q=document.getElementById(`${N[0]}`))==null?void 0:q.offsetLeft,Z=(X=document.getElementById(`${N[0]}`))==null?void 0:X.offsetTop;N.forEach(Ce=>{let st=document.getElementById(`${Ce}`);z+=st.offsetHeight}),setTimeout(()=>{V.style.width=W+32+"px",V.style.height=z+"px",V.style.background="#f9f9f9",V.style.position="absolute",V.style.top=Z-16+"px",V.style.left=K-16+"px",V.style.zIndex=-1,U==null||U.appendChild(V)})},C=(N,V,U)=>{var K,Z;let z=(K=i.listData)==null?void 0:K.findIndex(ce=>ce.lineType=="dashed"),W="";if(U&&((Z=U[i.defaultFile.approvePersonList])==null?void 0:Z.findIndex(q=>q[i.defaultFile.approveStatus]===i.statusOption.执行中))>-1)return"ikapprove ikapprove-dengdai orange";switch(N){case i.statusOption.发起:W="ikapprove-duihao2 green";break;case i.statusOption.执行中:W=z==V?"ikapprove-dengdai orange":"";break;case i.statusOption.同意:W="ikapprove-duihao2 green";break;case i.statusOption.拒绝:W="ikapprove-jujue red";break;case i.statusOption.转交:W="ikapprove-zhuanjiao blue";break;case i.statusOption.加签:W="ikapprove-tianjia blue";break;case i.statusOption.退回:W="ikapprove-s_fanhui2 red";break;case i.statusOption.评论:W="ikapprove-pinglun1 blue";break}return`ikapprove ${W}`},E=(N,V)=>{N.show=!N.show;let U=document.getElementById(`${N[i.defaultFile.nodeId]}`),z=Array.from(U==null?void 0:U.getElementsByClassName("approveList"));for(let W of z)W.style.display=V},T=N=>Yv(l.value,N);return(N,V)=>{const U=f.resolveComponent("el-image"),z=f.resolveComponent("IkingApprovalProcessDetail");return f.openBlock(),f.createElementBlock("div",Mie,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.listData,(W,K)=>{var Z,ce,q,X,Ce,st,Ne,ee,xe,et;return f.openBlock(),f.createElementBlock("div",{class:"approveBlock",id:W[i.defaultFile.nodeId],key:W[i.defaultFile.nodeId]},[f.createElementVNode("div",Lie,[f.createElementVNode("div",Fie,[f.createElementVNode("span",$ie,[f.createCommentVNode(' 用户列表长度等于1, :src="formatUrl(it)"并且存在头像 '),((Z=W[i.defaultFile.approvePersonList])==null?void 0:Z.length)==1&&W[i.defaultFile.approvePersonList][0].userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,style:{width:"100%",height:"100%","border-radius":"10px"},src:T(W[i.defaultFile.approvePersonList][0].userAvatar),alt:""},null,8,Vie)):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 否则显示对应节点 "),f.createElementVNode("i",{class:f.normalizeClass(f.unref(zQ)(i,W[i.defaultFile.nodeType],W[i.defaultFile.approvePersonList]))},null,2)],2112)),f.createCommentVNode(" 审批状态图标 "),f.createElementVNode("i",{class:f.normalizeClass(C(W[i.defaultFile.approveStatus],K,W))},null,2)])]),f.createElementVNode("div",Hie,[f.createElementVNode("div",zie,[f.createElementVNode("div",null,[f.createCommentVNode(" 不是抄送节点 "),i.nodeType.抄送节点!==W[i.defaultFile.nodeType]?(f.openBlock(),f.createElementBlock("div",Uie,[f.createCommentVNode(" 撤销,评论不显示节点名称 "),W[i.defaultFile.approveStatus]!=i.statusOption.撤销&&W[i.defaultFile.approveStatus]!=i.statusOption.评论&&W[i.defaultFile.nodeType]!==i.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Wie,f.toDisplayString(W[i.defaultFile.nodeTypeName]),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 名字+审批状态 "),f.createElementVNode("div",jie,[f.createCommentVNode(" 已审批节点文本 "),W[i.defaultFile.lineType]=="solid"?(f.openBlock(),f.createElementBlock("div",Gie,[f.createElementVNode("span",{style:f.normalizeStyle({color:W[i.defaultFile.approveStatus]==i.statusOption.评论?"#000":""})},f.toDisplayString(W[i.defaultFile.originator]),5),f.createCommentVNode(" 发起,退回不显示状态 "),W[i.defaultFile.approveStatusName]&&W[i.defaultFile.approveStatus]!=i.statusOption.发起&&W[i.defaultFile.approveStatus]!=i.statusOption.退回?(f.openBlock(),f.createElementBlock("span",Zie,f.toDisplayString(W[i.defaultFile.approveStatus]==i.statusOption.评论?" 添加了评论":W!=null&&W.nodeActionAliasName?`(已${W.nodeActionAliasName})`:`(${W[i.defaultFile.approveStatusName]})`),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 退回状态显示 "),W[i.defaultFile.approveStatus]==i.statusOption.退回?(f.openBlock(),f.createElementBlock("span",qie,[Kie,f.createTextVNode(" "+f.toDisplayString(W[i.defaultFile.backToInstanceNodeName]||W[i.defaultFile.backToRecordNodeName]),1)])):f.createCommentVNode("v-if",!0)])):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 待审批节点 "),f.createElementVNode("div",null,[((ce=W[i.defaultFile.approvePersonList])==null?void 0:ce.length)==1?(f.openBlock(),f.createElementBlock("span",Yie,[f.createTextVNode(f.toDisplayString(W[i.defaultFile.originator])+" ",1),W[i.defaultFile.approveStatus]==i.statusOption.等待?(f.openBlock(),f.createElementBlock("span",Xie,f.toDisplayString(W!=null&&W.nodeActionAliasName?`(已${W.nodeActionAliasName})`:`(${W[i.defaultFile.approveStatusName]})`),1)):f.createCommentVNode("v-if",!0)])):W[i.defaultFile.approvePersonList]?(f.openBlock(),f.createElementBlock("span",Qie,f.toDisplayString(`${(q=W[i.defaultFile.approvePersonList])==null?void 0:q.length}人${W[i.defaultFile.approveTypeName]}`),1)):f.createCommentVNode("v-if",!0)])],2112))])])):(f.openBlock(),f.createElementBlock("div",Jie,[eae,f.createElementVNode("div",tae,[f.createCommentVNode(" 抄送一人时 "),((X=W[i.defaultFile.approvePersonList])==null?void 0:X.length)==1?(f.openBlock(),f.createElementBlock("span",nae,[f.createElementVNode("span",null,[f.createTextVNode("已抄送给 "),f.createElementVNode("span",oae,f.toDisplayString(W[i.defaultFile.approvePersonList][0].userName),1)]),f.createElementVNode("span",sae,f.toDisplayString(W[i.defaultFile.approvePersonList][0].status==="END"?"已读":"未读"),1)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 抄送多人时 "),((Ce=W[i.defaultFile.approvePersonList])==null?void 0:Ce.length)>1?(f.openBlock(),f.createElementBlock("span",rae,[f.createTextVNode(f.toDisplayString(`已抄送${(st=W[i.defaultFile.approvePersonList])==null?void 0:st.length}人`)+" ",1),W[i.defaultFile.allRead]?(f.openBlock(),f.createElementBlock("span",iae," 全部已读 ")):(f.openBlock(),f.createElementBlock("span",aae,[W[i.defaultFile.read]?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",lae," 全部未读 ")),W[i.defaultFile.read]?(f.openBlock(),f.createElementBlock("span",cae,f.toDisplayString(W[i.defaultFile.read])+"人已读 ",1)):f.createCommentVNode("v-if",!0)]))])):f.createCommentVNode("v-if",!0)])]))]),f.createElementVNode("div",uae,[f.createCommentVNode(" 不是抄送节点,展示时间 "),W[i.defaultFile.nodeType]!=i.nodeType.抄送节点&&W[i.defaultFile.approveStatus]!==i.statusOption.等待?(f.openBlock(),f.createElementBlock("span",dae,f.toDisplayString(f.unref(wo.ikDate).toDateTime(W[i.defaultFile.operationTime],"MM/DD HH:mm")),1)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 是抄送节点,并且抄送人员大于1时,展示图标 "),W[i.defaultFile.nodeType]==i.nodeType.抄送节点&&((Ne=W[i.defaultFile.approvePersonList])==null?void 0:Ne.length)>1?(f.openBlock(),f.createElementBlock("span",fae,[W!=null&&W.show?(f.openBlock(),f.createElementBlock("i",{key:0,class:"ikapprove ikapprove-a-putongjiantouzhankai",onClick:tt=>E(W,"grid")},null,8,mae)):(f.openBlock(),f.createElementBlock("i",{key:1,onClick:tt=>E(W,"none"),class:"ikapprove ikapprove-a-putongjiantoushouqi"},null,8,hae))])):f.createCommentVNode("v-if",!0)])])])]),f.createElementVNode("div",{class:"bottomBlock",style:f.normalizeStyle({borderLeft:K==i.listData.length-1?"":`2px ${W[i.defaultFile.lineType]||"dashed"} var(--el-border-color)`})},[f.createCommentVNode(" 审批意见 "),W[i.defaultFile.approveOpinion]||W[i.defaultFile.approveStatus]==i.statusOption.加签?(f.openBlock(),f.createElementBlock("div",gae,[W[i.defaultFile.approveOpinion]?(f.openBlock(),f.createElementBlock("span",pae,f.toDisplayString(W[i.defaultFile.approveOpinion]),1)):f.createCommentVNode("v-if",!0),W[i.defaultFile.approveStatus]==i.statusOption.加签?(f.openBlock(),f.createElementBlock("span",vae,[yae,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.countersignPer],(tt,je)=>(f.openBlock(),f.createElementBlock("span",bae,f.toDisplayString(tt==null?void 0:tt.userName)+f.toDisplayString(je<W[i.defaultFile.countersignPer].length-1?"、":""),1))),256))])):f.createCommentVNode("v-if",!0)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 附件 "),(ee=W[i.defaultFile.attachment])!=null&&ee.length?(f.openBlock(),f.createBlock(f.unref(TO),{key:1,list:W[i.defaultFile.attachment]},null,8,["list"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 附件图片 "),(xe=W[i.defaultFile.attachmentImg])!=null&&xe.length?(f.openBlock(),f.createElementBlock("div",Cae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.attachmentImg],(tt,je)=>(f.openBlock(),f.createElementBlock("div",{class:"image",key:je},[f.createVNode(U,{src:T(tt),"preview-src-list":W[i.defaultFile.attachmentImg].map(be=>T(be)),fit:"cover","z-index":"9999","zoom-rate":1.2,alt:T(tt)},null,8,["src","preview-src-list","alt"])]))),128))])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 抄送节点或是等待审批状态并且列表长度大于1 "),(W[i.defaultFile.nodeType]==i.nodeType.抄送节点||W[i.defaultFile.approveStatus]==i.statusOption.等待)&&((et=W[i.defaultFile.approvePersonList])==null?void 0:et.length)>1?(f.openBlock(),f.createElementBlock("div",_ae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.approvePersonList],tt=>(f.openBlock(),f.createElementBlock("div",{class:"perBlock",key:tt.userName},[f.createElementVNode("span",wae,[tt.userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,style:{width:"100%",height:"100%","border-radius":"50%"},src:T(tt.userAvatar),alt:""},null,8,Sae)):(f.openBlock(),f.createElementBlock("span",Eae,f.toDisplayString(tt.userName.slice(-2)),1)),tt.status==="END"?(f.openBlock(),f.createElementBlock("i",kae)):f.createCommentVNode("v-if",!0)]),f.createElementVNode("div",{class:"main-text",title:tt.userName},f.toDisplayString(tt.userName),9,xae)]))),128))])):f.createCommentVNode("v-if",!0)],4),W[i.defaultFile.nodeType]===i.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Aae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W[i.defaultFile.parallelInstances],tt=>(f.openBlock(),f.createElementBlock("div",Tae,[f.createElementVNode("div",Dae,f.toDisplayString(tt.name),1),f.createVNode(z,f.mergeProps({ref_for:!0},a,{"data-list":(tt==null?void 0:tt.processInstanceNodes)||[]}),null,16,["data-list"])]))),256))])):f.createCommentVNode("v-if",!0)],8,Pie)}),128))])}}}),Uwe="",Nae=Gs(Zs(Oae,[["__scopeId","data-v-48f27627"]])),WQ=c=>(f.pushScopeId("data-v-4f37c57c"),c=c(),f.popScopeId(),c),Iae={class:"approveProcess",id:"approveProcess"},Bae={class:"node"},Mae={class:"nodeBg"},Pae={key:0,class:"info"},Lae={class:"explain"},Fae={key:0},$ae={key:0},Vae={key:1},Hae={key:0},zae={key:1},Uae={class:"personlist"},Wae={style:{width:"58px"}},jae={class:"avatar"},Gae=["src"],Zae={key:1,class:"nodeBg"},qae=["onClick"],Kae=["title"],Yae={key:0,class:"sign"},Xae={key:0},Qae=["onClick"],Jae={key:0,class:"required"},ele=WQ(()=>f.createElementVNode("i",{class:"ikapprove ikapprove-xinzeng"},null,-1)),tle={key:1,class:"node-branchs"},nle=WQ(()=>f.createElementVNode("div",{class:"branch-line"},null,-1)),ole={style:{flex:"1"}},sle={class:"node-branch"},rle={name:"IkApprovalProcess"},ile=f.defineComponent({...rle,props:{pickerUrl:{type:String,default:""},pickerConfig:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},dataList:{type:Array,default:()=>[]},defaultNodeType:{type:Object,default:()=>({})},defaultFieldMap:{type:Object,default:()=>({})},statusWithoutApprover:{type:Object,default:()=>({})}},setup(c,{expose:r}){const a=c,{cLoadUrl:l}=Xv(a),i=wo.ikStore.local.getItem("token")||"Bearer 4db1039f04334180849002932f6a1fc6",m=f.ref("sys");function v(K){const Z=window.location.search;return new URLSearchParams(Z).get(K)}function C(){var Z;const K=v("xTenant")||((Z=wo.ikStore.local.getItem("tenant"))==null?void 0:Z.code);K&&(m.value=K)}C();const E=f.reactive(HQ(a)),T=async K=>{var Z;if(K.multiple=!K[E.defaultFile.singleApproval]||K[E.defaultFile.isShowAddCopy],K.handList=K[E.defaultFile.approvePersonList]?K[E.defaultFile.approvePersonList]:[],K[E.defaultFile.nodeType]===E.nodeType.抄送节点)K.handList.forEach(ce=>{ce.elementName||(ce.elementName=ce.userName,ce.elementId=ce.userId,ce.avatar=ce.userAvatar),ce.elementType="USER",ce.disabled=!0}),K.chooseType=["user"],K.userList=[],K.depList=[];else switch(K[E.defaultFile.initiatorSpecifiedScopeType]){case"ALL":K.chooseType=["dep_user"],K.userList=[],K.depList=[];break;default:K.chooseType=["user"],K.userList=K.userList?K.userList:(Z=K[E.defaultFile.initiatorSpecifiedScope])==null?void 0:Z.map(ce=>({...ce,elementName:(ce==null?void 0:ce.executorName)||(ce==null?void 0:ce.userName),elementId:(ce==null?void 0:ce.executorId)||(ce==null?void 0:ce.userId),avatar:((ce==null?void 0:ce.executorAvatar)||(ce==null?void 0:ce.userAvatar))&&N((ce==null?void 0:ce.executorAvatar)||(ce==null?void 0:ce.userAvatar))||"",elementType:"USER"}))}f.nextTick(()=>{K.isShow=!0})},N=K=>{let Z="";return K.includes("http")||K.includes("https")?Z=K:Z=l.value?`${K.includes(l.value)?"":l.value}${K}`:`${location.origin+location.pathname}server/oss/download?fileUrl=${K}`,Z},V=(K,Z)=>{a.dataList[Z].handList=K.list;let q=(a.dataList[Z][E.defaultFile.approvePersonList]||[]).filter(Ce=>!Ce.canDele),X=K.list.map(Ce=>({...Ce,userName:Ce.elementName,userAvatar:Ce.avatar,canDele:!0}));a.dataList[Z][E.defaultFile.approvePersonList]=q.concat(X)},U=(K,Z)=>{a.dataList[K][E.defaultFile.approvePersonList].splice(Z,1),a.dataList[K].handList=a.dataList[K][E.defaultFile.approvePersonList]},z=()=>{let K=!0;return a.dataList.forEach(Z=>{var ce;Z.required=!1,Z[E.defaultFile.nodeType]==E.nodeType.审批节点&&Z[E.defaultFile.isShowAdd]&&((ce=Z[E.defaultFile.approvePersonList])!=null&&ce.length||(K=!1,Z.required=!0))}),K},W=f.computed(()=>{var K;return{propOption:{name:"elementName",id:"elementId",type:"elementType",avatar:"avatar"},typeOption:{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},api:{methods:"post",url:a.pickerUrl,headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:i,"X-Tenant":m.value},param:{rootDepartmentId:((K=wo.ikStore.local.getItem("now_shop"))==null?void 0:K.storeId)||"",rootDepartmentOnly:!1}},...a.pickerConfig}});return r({requiredVerification:z}),(K,Z)=>{const ce=f.resolveComponent("IkApprovalProcess");return f.openBlock(),f.createElementBlock("div",Iae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.dataList,(q,X)=>{var Ce,st,Ne,ee;return f.openBlock(),f.createElementBlock("div",{class:"content",key:q.id},[f.createCommentVNode(" 审批节点类型 "),f.createElementVNode("div",Bae,[f.createElementVNode("span",Mae,[f.createElementVNode("i",{class:f.normalizeClass(f.unref(zQ)(E,q[E.defaultFile.nodeType]))},null,2)]),f.createElementVNode("div",{class:"line",style:f.normalizeStyle({"border-left":X===a.dataList.length-1?"":"2px solid var(--el-border-color)"})},null,4)]),q[E.defaultFile.nodeType]!==E.nodeType.并行分支?(f.openBlock(),f.createElementBlock("div",Pae,[f.createElementVNode("div",null,[f.createElementVNode("div",null,f.toDisplayString(q[E.defaultFile.nodeTypeName]),1),f.createElementVNode("div",Lae,[f.createCommentVNode(" 抄送节点 "),q[E.defaultFile.nodeType]==E.nodeType.抄送节点?(f.openBlock(),f.createElementBlock("span",Fae,[q[E.defaultFile.approvePersonList].length?(f.openBlock(),f.createElementBlock("span",$ae,f.toDisplayString(`抄送${q[E.defaultFile.approvePersonList].length}人`),1)):f.createCommentVNode("v-if",!0),q[E.defaultFile.isShowAdd]?(f.openBlock(),f.createElementBlock("span",Vae,",可添加抄送人")):f.createCommentVNode("v-if",!0)])):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 审批节点 "),f.createElementVNode("span",null,[f.createCommentVNode(" 存在审批人时 "),(Ce=q[E.defaultFile.approvePersonList])!=null&&Ce.length?(f.openBlock(),f.createElementBlock("span",Hae,f.toDisplayString(((st=q[E.defaultFile.approvePersonList])==null?void 0:st.length)==1?"1人审批":`${(Ne=q[E.defaultFile.approvePersonList])==null?void 0:Ne.length}人${q[E.defaultFile.multiExecutorTypeName]}`),1)):[E.statusWithoutApprover.自动通过,E.statusWithoutApprover.自动拒绝].includes(q[E.defaultFile.approveType])?(f.openBlock(),f.createElementBlock("span",zae,f.toDisplayString(q[E.defaultFile.approveTypeName]),1)):q[E.defaultFile.executorEmptyStrategy]&&q[E.defaultFile.executorEmpty]?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createCommentVNode(" 没有审批人,并且有指定默认审批方式 "),f.createElementVNode("span",null,[f.createTextVNode(" 未找到审批人,"),f.createElementVNode("span",null,f.toDisplayString(q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.自动通过?"将自动通过":q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.自动转交管理员?"自动转交给管理员":q[E.defaultFile.executorEmptyStrategy]==E.statusWithoutApprover.指定人员审批?`将自动转给指定成员${q[E.defaultFile.reserveExecutorUsers]&&q[E.defaultFile.reserveExecutorUsers][0].userName}`:""),1)])],2112)):[E.nodeType.并行分支,E.nodeType.子流程].includes(q[E.defaultFile.nodeType])?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",{key:3,class:f.normalizeClass(q.required?"warn":"")}," 请选择"+f.toDisplayString(q[E.defaultFile.nodeType]===E.nodeType.办理节点?"办理人":"审批人"),3))])],2112))])]),f.createElementVNode("div",Uae,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(q[E.defaultFile.approvePersonList],(xe,et)=>{var tt;return f.openBlock(),f.createElementBlock("div",{class:"list",key:xe.userId},[f.createElementVNode("div",Wae,[f.createElementVNode("div",jae,[xe.userAvatar?(f.openBlock(),f.createElementBlock("img",{key:0,src:N(xe.userAvatar),alt:""},null,8,Gae)):(f.openBlock(),f.createElementBlock("div",Zae,[f.createElementVNode("span",null,f.toDisplayString(xe.userName.slice(-2)),1)])),xe.canDele?(f.openBlock(),f.createElementBlock("i",{key:2,onClick:je=>U(X,et),class:"ikapprove ikapprove-shanchu1"},null,8,qae)):f.createCommentVNode("v-if",!0)]),f.createElementVNode("div",{class:"name",title:xe.userName},f.toDisplayString(xe.userName),9,Kae)]),f.createCommentVNode(" 显示添加人按钮,不是单选且已选中一个人的情况,显示图标 "),q[E.defaultFile.isShowAdd]&&!(q[E.defaultFile.singleApproval]&&((tt=q[E.defaultFile.approvePersonList])==null?void 0:tt.length)==1)?(f.openBlock(),f.createElementBlock("span",Yae,[f.createCommentVNode(" 抄送默认 "),q[E.defaultFile.nodeType]==E.nodeType.抄送节点?(f.openBlock(),f.createElementBlock("span",Xae,"+")):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" 审批 "),f.createElementVNode("span",null,f.toDisplayString(q[E.defaultFile.multiExecutorType]=="ANY"?"/":q[E.defaultFile.multiExecutorType]=="ALL"?"+":">"),1)],2112))])):f.createCommentVNode("v-if",!0)])}),128)),f.createCommentVNode(" 显示添加人按钮,不是单选且已选中一个人的情况,显示按钮 (item[state.defaultFile.isShowAdd] && "),q[E.defaultFile.isShowAdd]&&!(q[E.defaultFile.singleApproval]&&((ee=q[E.defaultFile.approvePersonList])==null?void 0:ee.length)==1)||q[E.defaultFile.isShowAddCopy]?(f.openBlock(),f.createElementBlock("span",{key:0,class:"addBg",onClick:xe=>T(q)},[q[E.defaultFile.nodeType]==E.nodeType.审批节点?(f.openBlock(),f.createElementBlock("span",Jae)):f.createCommentVNode("v-if",!0),ele],8,Qae)):f.createCommentVNode("v-if",!0),f.createCommentVNode(" 添加人组件 "),f.createVNode(f.unref(yA),f.mergeProps({modelValue:q.handList,"onUpdate:modelValue":xe=>q.handList=xe,show:q.isShow,"onUpdate:show":xe=>q.isShow=xe,onOk:xe=>V(xe,X),multiple:q.multiple,"dep-list":q.depList,"user-list":q.userList,"organization-list":q.organizationList,ref_for:!0},W.value,{chooseType:q.chooseType}),null,16,["modelValue","onUpdate:modelValue","show","onUpdate:show","onOk","multiple","dep-list","user-list","organization-list","chooseType"])])])):(f.openBlock(),f.createElementBlock("div",tle,[nle,f.createElementVNode("div",ole,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(q.parallelInstances,(xe,et)=>(f.openBlock(),f.createElementBlock("div",{key:et,class:f.normalizeClass(`branch branch-${et}`)},[f.createElementVNode("div",sle,f.toDisplayString(xe.name),1),f.createVNode(ce,f.mergeProps({ref_for:!0},a,{dataList:xe.processInstanceNodes,style:{"margin-left":"20px"}}),null,16,["dataList"])],2))),128))])]))])}),128))])}}}),jwe="",ale=Gs(Zs(ile,[["__scopeId","data-v-4f37c57c"]]));var jQ={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText(c){return"另外 "+c+" 个"},noEventsText:"没有事件显示"},jR,Es,GQ,ZQ,PS,V2,qQ,KQ,YQ,GR={},XQ=[],lle=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Qv(c,r){for(var a in r)c[a]=r[a];return c}function QQ(c){var r=c.parentNode;r&&r.removeChild(c)}function rt(c,r,a){var l,i,m,v={};for(m in r)m=="key"?l=r[m]:m=="ref"?i=r[m]:v[m]=r[m];if(arguments.length>2&&(v.children=arguments.length>3?jR.call(arguments,2):a),typeof c=="function"&&c.defaultProps!=null)for(m in c.defaultProps)v[m]===void 0&&(v[m]=c.defaultProps[m]);return ZR(c,v,l,i,null)}function ZR(c,r,a,l,i){var m={type:c,props:r,key:a,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++GQ};return i==null&&Es.vnode!=null&&Es.vnode(m),m}function Bd(){return{current:null}}function Ya(c){return c.children}function cle(c,r,a,l,i){var m;for(m in a)m==="children"||m==="key"||m in r||qR(c,m,null,a[m],l);for(m in r)i&&typeof r[m]!="function"||m==="children"||m==="key"||m==="value"||m==="checked"||a[m]===r[m]||qR(c,m,r[m],a[m],l)}function JQ(c,r,a){r[0]==="-"?c.setProperty(r,a??""):c[r]=a==null?"":typeof a!="number"||lle.test(r)?a:a+"px"}function qR(c,r,a,l,i){var m;e:if(r==="style")if(typeof a=="string")c.style.cssText=a;else{if(typeof l=="string"&&(c.style.cssText=l=""),l)for(r in l)a&&r in a||JQ(c.style,r,"");if(a)for(r in a)l&&a[r]===l[r]||JQ(c.style,r,a[r])}else if(r[0]==="o"&&r[1]==="n")m=r!==(r=r.replace(/Capture$/,"")),r=r.toLowerCase()in c?r.toLowerCase().slice(2):r.slice(2),c.l||(c.l={}),c.l[r+m]=a,a?l||c.addEventListener(r,m?tJ:eJ,m):c.removeEventListener(r,m?tJ:eJ,m);else if(r!=="dangerouslySetInnerHTML"){if(i)r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!=="width"&&r!=="height"&&r!=="href"&&r!=="list"&&r!=="form"&&r!=="tabIndex"&&r!=="download"&&r in c)try{c[r]=a??"";break e}catch{}typeof a=="function"||(a==null||a===!1&&r.indexOf("-")==-1?c.removeAttribute(r):c.setAttribute(r,a))}}function eJ(c){PS=!0;try{return this.l[c.type+!1](Es.event?Es.event(c):c)}finally{PS=!1}}function tJ(c){PS=!0;try{return this.l[c.type+!0](Es.event?Es.event(c):c)}finally{PS=!1}}function sm(c,r){this.props=c,this.context=r}function sA(c,r){if(r==null)return c.__?sA(c.__,c.__.__k.indexOf(c)+1):null;for(var a;r<c.__k.length;r++)if((a=c.__k[r])!=null&&a.__e!=null)return a.__e;return typeof c.type=="function"?sA(c):null}function nJ(c){var r,a;if((c=c.__)!=null&&c.__c!=null){for(c.__e=c.__c.base=null,r=0;r<c.__k.length;r++)if((a=c.__k[r])!=null&&a.__e!=null){c.__e=c.__c.base=a.__e;break}return nJ(c)}}function ule(c){PS?setTimeout(c):KQ(c)}function i$(c){(!c.__d&&(c.__d=!0)&&V2.push(c)&&!KR.__r++||qQ!==Es.debounceRendering)&&((qQ=Es.debounceRendering)||ule)(KR)}function KR(){var c,r,a,l,i,m,v,C;for(V2.sort(function(E,T){return E.__v.__b-T.__v.__b});c=V2.shift();)c.__d&&(r=V2.length,l=void 0,i=void 0,v=(m=(a=c).__v).__e,(C=a.__P)&&(l=[],(i=Qv({},m)).__v=m.__v+1,a$(C,m,i,a.__n,C.ownerSVGElement!==void 0,m.__h!=null?[v]:null,l,v??sA(m),m.__h),aJ(l,m),m.__e!=v&&nJ(m)),V2.length>r&&V2.sort(function(E,T){return E.__v.__b-T.__v.__b}));KR.__r=0}function oJ(c,r,a,l,i,m,v,C,E,T){var N,V,U,z,W,K,Z,ce=l&&l.__k||XQ,q=ce.length;for(a.__k=[],N=0;N<r.length;N++)if((z=a.__k[N]=(z=r[N])==null||typeof z=="boolean"?null:typeof z=="string"||typeof z=="number"||typeof z=="bigint"?ZR(null,z,null,null,z):Array.isArray(z)?ZR(Ya,{children:z},null,null,null):z.__b>0?ZR(z.type,z.props,z.key,z.ref?z.ref:null,z.__v):z)!=null){if(z.__=a,z.__b=a.__b+1,(U=ce[N])===null||U&&z.key==U.key&&z.type===U.type)ce[N]=void 0;else for(V=0;V<q;V++){if((U=ce[V])&&z.key==U.key&&z.type===U.type){ce[V]=void 0;break}U=null}a$(c,z,U=U||GR,i,m,v,C,E,T),W=z.__e,(V=z.ref)&&U.ref!=V&&(Z||(Z=[]),U.ref&&Z.push(U.ref,null,z),Z.push(V,z.__c||W,z)),W!=null?(K==null&&(K=W),typeof z.type=="function"&&z.__k===U.__k?z.__d=E=sJ(z,E,c):E=rJ(c,z,U,ce,W,E),typeof a.type=="function"&&(a.__d=E)):E&&U.__e==E&&E.parentNode!=c&&(E=sA(U))}for(a.__e=K,N=q;N--;)ce[N]!=null&&(typeof a.type=="function"&&ce[N].__e!=null&&ce[N].__e==a.__d&&(a.__d=iJ(l).nextSibling),cJ(ce[N],ce[N]));if(Z)for(N=0;N<Z.length;N++)lJ(Z[N],Z[++N],Z[++N])}function sJ(c,r,a){for(var l,i=c.__k,m=0;i&&m<i.length;m++)(l=i[m])&&(l.__=c,r=typeof l.type=="function"?sJ(l,r,a):rJ(a,l,l,i,l.__e,r));return r}function YR(c,r){return r=r||[],c==null||typeof c=="boolean"||(Array.isArray(c)?c.some(function(a){YR(a,r)}):r.push(c)),r}function rJ(c,r,a,l,i,m){var v,C,E;if(r.__d!==void 0)v=r.__d,r.__d=void 0;else if(a==null||i!=m||i.parentNode==null)e:if(m==null||m.parentNode!==c)c.appendChild(i),v=null;else{for(C=m,E=0;(C=C.nextSibling)&&E<l.length;E+=1)if(C==i)break e;c.insertBefore(i,m),v=m}return v!==void 0?v:i.nextSibling}function iJ(c){var r,a,l;if(c.type==null||typeof c.type=="string")return c.__e;if(c.__k){for(r=c.__k.length-1;r>=0;r--)if((a=c.__k[r])&&(l=iJ(a)))return l}return null}function a$(c,r,a,l,i,m,v,C,E){var T,N,V,U,z,W,K,Z,ce,q,X,Ce,st,Ne,ee,xe=r.type;if(r.constructor!==void 0)return null;a.__h!=null&&(E=a.__h,C=r.__e=a.__e,r.__h=null,m=[C]),(T=Es.__b)&&T(r);try{e:if(typeof xe=="function"){if(Z=r.props,ce=(T=xe.contextType)&&l[T.__c],q=T?ce?ce.props.value:T.__:l,a.__c?K=(N=r.__c=a.__c).__=N.__E:("prototype"in xe&&xe.prototype.render?r.__c=N=new xe(Z,q):(r.__c=N=new sm(Z,q),N.constructor=xe,N.render=fle),ce&&ce.sub(N),N.props=Z,N.state||(N.state={}),N.context=q,N.__n=l,V=N.__d=!0,N.__h=[],N._sb=[]),N.__s==null&&(N.__s=N.state),xe.getDerivedStateFromProps!=null&&(N.__s==N.state&&(N.__s=Qv({},N.__s)),Qv(N.__s,xe.getDerivedStateFromProps(Z,N.__s))),U=N.props,z=N.state,N.__v=r,V)xe.getDerivedStateFromProps==null&&N.componentWillMount!=null&&N.componentWillMount(),N.componentDidMount!=null&&N.__h.push(N.componentDidMount);else{if(xe.getDerivedStateFromProps==null&&Z!==U&&N.componentWillReceiveProps!=null&&N.componentWillReceiveProps(Z,q),!N.__e&&N.shouldComponentUpdate!=null&&N.shouldComponentUpdate(Z,N.__s,q)===!1||r.__v===a.__v){for(r.__v!==a.__v&&(N.props=Z,N.state=N.__s,N.__d=!1),r.__e=a.__e,r.__k=a.__k,r.__k.forEach(function(et){et&&(et.__=r)}),X=0;X<N._sb.length;X++)N.__h.push(N._sb[X]);N._sb=[],N.__h.length&&v.push(N);break e}N.componentWillUpdate!=null&&N.componentWillUpdate(Z,N.__s,q),N.componentDidUpdate!=null&&N.__h.push(function(){N.componentDidUpdate(U,z,W)})}if(N.context=q,N.props=Z,N.__P=c,Ce=Es.__r,st=0,"prototype"in xe&&xe.prototype.render){for(N.state=N.__s,N.__d=!1,Ce&&Ce(r),T=N.render(N.props,N.state,N.context),Ne=0;Ne<N._sb.length;Ne++)N.__h.push(N._sb[Ne]);N._sb=[]}else do N.__d=!1,Ce&&Ce(r),T=N.render(N.props,N.state,N.context),N.state=N.__s;while(N.__d&&++st<25);N.state=N.__s,N.getChildContext!=null&&(l=Qv(Qv({},l),N.getChildContext())),V||N.getSnapshotBeforeUpdate==null||(W=N.getSnapshotBeforeUpdate(U,z)),ee=T!=null&&T.type===Ya&&T.key==null?T.props.children:T,oJ(c,Array.isArray(ee)?ee:[ee],r,a,l,i,m,v,C,E),N.base=r.__e,r.__h=null,N.__h.length&&v.push(N),K&&(N.__E=N.__=null),N.__e=!1}else m==null&&r.__v===a.__v?(r.__k=a.__k,r.__e=a.__e):r.__e=dle(a.__e,r,a,l,i,m,v,E);(T=Es.diffed)&&T(r)}catch(et){r.__v=null,(E||m!=null)&&(r.__e=C,r.__h=!!E,m[m.indexOf(C)]=null),Es.__e(et,r,a)}}function aJ(c,r){Es.__c&&Es.__c(r,c),c.some(function(a){try{c=a.__h,a.__h=[],c.some(function(l){l.call(a)})}catch(l){Es.__e(l,a.__v)}})}function dle(c,r,a,l,i,m,v,C){var E,T,N,V=a.props,U=r.props,z=r.type,W=0;if(z==="svg"&&(i=!0),m!=null){for(;W<m.length;W++)if((E=m[W])&&"setAttribute"in E==!!z&&(z?E.localName===z:E.nodeType===3)){c=E,m[W]=null;break}}if(c==null){if(z===null)return document.createTextNode(U);c=i?document.createElementNS("http://www.w3.org/2000/svg",z):document.createElement(z,U.is&&U),m=null,C=!1}if(z===null)V===U||C&&c.data===U||(c.data=U);else{if(m=m&&jR.call(c.childNodes),T=(V=a.props||GR).dangerouslySetInnerHTML,N=U.dangerouslySetInnerHTML,!C){if(m!=null)for(V={},W=0;W<c.attributes.length;W++)V[c.attributes[W].name]=c.attributes[W].value;(N||T)&&(N&&(T&&N.__html==T.__html||N.__html===c.innerHTML)||(c.innerHTML=N&&N.__html||""))}if(cle(c,U,V,i,C),N)r.__k=[];else if(W=r.props.children,oJ(c,Array.isArray(W)?W:[W],r,a,l,i&&z!=="foreignObject",m,v,m?m[0]:a.__k&&sA(a,0),C),m!=null)for(W=m.length;W--;)m[W]!=null&&QQ(m[W]);C||("value"in U&&(W=U.value)!==void 0&&(W!==c.value||z==="progress"&&!W||z==="option"&&W!==V.value)&&qR(c,"value",W,V.value,!1),"checked"in U&&(W=U.checked)!==void 0&&W!==c.checked&&qR(c,"checked",W,V.checked,!1))}return c}function lJ(c,r,a){try{typeof c=="function"?c(r):c.current=r}catch(l){Es.__e(l,a)}}function cJ(c,r,a){var l,i;if(Es.unmount&&Es.unmount(c),(l=c.ref)&&(l.current&&l.current!==c.__e||lJ(l,null,r)),(l=c.__c)!=null){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(m){Es.__e(m,r)}l.base=l.__P=null,c.__c=void 0}if(l=c.__k)for(i=0;i<l.length;i++)l[i]&&cJ(l[i],r,a||typeof c.type!="function");a||c.__e==null||QQ(c.__e),c.__=c.__e=c.__d=void 0}function fle(c,r,a){return this.constructor(c,a)}function rA(c,r,a){var l,i,m;Es.__&&Es.__(c,r),i=(l=typeof a=="function")?null:a&&a.__k||r.__k,m=[],a$(r,c=(!l&&a||r).__k=rt(Ya,null,[c]),i||GR,GR,r.ownerSVGElement!==void 0,!l&&a?[a]:i?null:r.firstChild?jR.call(r.childNodes):null,m,!l&&a?a:i?i.__e:r.firstChild,l),aJ(m,c)}function mle(c,r){var a={__c:r="__cC"+YQ++,__:c,Consumer:function(l,i){return l.children(i)},Provider:function(l){var i,m;return this.getChildContext||(i=[],(m={})[r]=this,this.getChildContext=function(){return m},this.shouldComponentUpdate=function(v){this.props.value!==v.value&&i.some(function(C){C.__e=!0,i$(C)})},this.sub=function(v){i.push(v);var C=v.componentWillUnmount;v.componentWillUnmount=function(){i.splice(i.indexOf(v),1),C&&C.call(v)}}),l.children}};return a.Provider.__=a.Consumer.contextType=a}jR=XQ.slice,Es={__e:function(c,r,a,l){for(var i,m,v;r=r.__;)if((i=r.__c)&&!i.__)try{if((m=i.constructor)&&m.getDerivedStateFromError!=null&&(i.setState(m.getDerivedStateFromError(c)),v=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(c,l||{}),v=i.__d),v)return i.__E=i}catch(C){c=C}throw c}},GQ=0,ZQ=function(c){return c!=null&&c.constructor===void 0},PS=!1,sm.prototype.setState=function(c,r){var a;a=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qv({},this.state),typeof c=="function"&&(c=c(Qv({},a),this.props)),c&&Qv(a,c),c!=null&&this.__v&&(r&&this._sb.push(r),i$(this))},sm.prototype.forceUpdate=function(c){this.__v&&(this.__e=!0,c&&this.__h.push(c),i$(this))},sm.prototype.render=Ya,V2=[],KQ=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,KR.__r=0,YQ=0;var Cp,l$,uJ,dJ=[],c$=[],fJ=Es.__b,mJ=Es.__r,hJ=Es.diffed,gJ=Es.__c,pJ=Es.unmount;function hle(){for(var c;c=dJ.shift();)if(c.__P&&c.__H)try{c.__H.__h.forEach(XR),c.__H.__h.forEach(u$),c.__H.__h=[]}catch(r){c.__H.__h=[],Es.__e(r,c.__v)}}Es.__b=function(c){Cp=null,fJ&&fJ(c)},Es.__r=function(c){mJ&&mJ(c);var r=(Cp=c.__c).__H;r&&(l$===Cp?(r.__h=[],Cp.__h=[],r.__.forEach(function(a){a.__N&&(a.__=a.__N),a.__V=c$,a.__N=a.i=void 0})):(r.__h.forEach(XR),r.__h.forEach(u$),r.__h=[])),l$=Cp},Es.diffed=function(c){hJ&&hJ(c);var r=c.__c;r&&r.__H&&(r.__H.__h.length&&(dJ.push(r)!==1&&uJ===Es.requestAnimationFrame||((uJ=Es.requestAnimationFrame)||gle)(hle)),r.__H.__.forEach(function(a){a.i&&(a.__H=a.i),a.__V!==c$&&(a.__=a.__V),a.i=void 0,a.__V=c$})),l$=Cp=null},Es.__c=function(c,r){r.some(function(a){try{a.__h.forEach(XR),a.__h=a.__h.filter(function(l){return!l.__||u$(l)})}catch(l){r.some(function(i){i.__h&&(i.__h=[])}),r=[],Es.__e(l,a.__v)}}),gJ&&gJ(c,r)},Es.unmount=function(c){pJ&&pJ(c);var r,a=c.__c;a&&a.__H&&(a.__H.__.forEach(function(l){try{XR(l)}catch(i){r=i}}),a.__H=void 0,r&&Es.__e(r,a.__v))};var vJ=typeof requestAnimationFrame=="function";function gle(c){var r,a=function(){clearTimeout(l),vJ&&cancelAnimationFrame(r),setTimeout(c)},l=setTimeout(a,100);vJ&&(r=requestAnimationFrame(a))}function XR(c){var r=Cp,a=c.__c;typeof a=="function"&&(c.__c=void 0,a()),Cp=r}function u$(c){var r=Cp;c.__c=c.__(),Cp=r}function ple(c,r){for(var a in r)c[a]=r[a];return c}function yJ(c,r){for(var a in c)if(a!=="__source"&&!(a in r))return!0;for(var l in r)if(l!=="__source"&&c[l]!==r[l])return!0;return!1}function bJ(c){this.props=c}(bJ.prototype=new sm).isPureReactComponent=!0,bJ.prototype.shouldComponentUpdate=function(c,r){return yJ(this.props,c)||yJ(this.state,r)};var CJ=Es.__b;Es.__b=function(c){c.type&&c.type.__f&&c.ref&&(c.props.ref=c.ref,c.ref=null),CJ&&CJ(c)};var vle=Es.__e;Es.__e=function(c,r,a,l){if(c.then){for(var i,m=r;m=m.__;)if((i=m.__c)&&i.__c)return r.__e==null&&(r.__e=a.__e,r.__k=a.__k),i.__c(c,r)}vle(c,r,a,l)};var _J=Es.unmount;function wJ(c,r,a){return c&&(c.__c&&c.__c.__H&&(c.__c.__H.__.forEach(function(l){typeof l.__c=="function"&&l.__c()}),c.__c.__H=null),(c=ple({},c)).__c!=null&&(c.__c.__P===a&&(c.__c.__P=r),c.__c=null),c.__k=c.__k&&c.__k.map(function(l){return wJ(l,r,a)})),c}function SJ(c,r,a){return c&&(c.__v=null,c.__k=c.__k&&c.__k.map(function(l){return SJ(l,r,a)}),c.__c&&c.__c.__P===r&&(c.__e&&a.insertBefore(c.__e,c.__d),c.__c.__e=!0,c.__c.__P=a)),c}function d$(){this.__u=0,this.t=null,this.__b=null}function EJ(c){var r=c.__.__c;return r&&r.__a&&r.__a(c)}function QR(){this.u=null,this.o=null}Es.unmount=function(c){var r=c.__c;r&&r.__R&&r.__R(),r&&c.__h===!0&&(c.type=null),_J&&_J(c)},(d$.prototype=new sm).__c=function(c,r){var a=r.__c,l=this;l.t==null&&(l.t=[]),l.t.push(a);var i=EJ(l.__v),m=!1,v=function(){m||(m=!0,a.__R=null,i?i(C):C())};a.__R=v;var C=function(){if(!--l.__u){if(l.state.__a){var T=l.state.__a;l.__v.__k[0]=SJ(T,T.__c.__P,T.__c.__O)}var N;for(l.setState({__a:l.__b=null});N=l.t.pop();)N.forceUpdate()}},E=r.__h===!0;l.__u++||E||l.setState({__a:l.__b=l.__v.__k[0]}),c.then(v,v)},d$.prototype.componentWillUnmount=function(){this.t=[]},d$.prototype.render=function(c,r){if(this.__b){if(this.__v.__k){var a=document.createElement("div"),l=this.__v.__k[0].__c;this.__v.__k[0]=wJ(this.__b,a,l.__O=l.__P)}this.__b=null}var i=r.__a&&rt(Ya,null,c.fallback);return i&&(i.__h=null),[rt(Ya,null,r.__a?null:c.children),i]};var kJ=function(c,r,a){if(++a[1]===a[0]&&c.o.delete(r),c.props.revealOrder&&(c.props.revealOrder[0]!=="t"||!c.o.size))for(a=c.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;c.u=a=a[2]}};function yle(c){return this.getChildContext=function(){return c.context},c.children}function ble(c){var r=this,a=c.i;r.componentWillUnmount=function(){rA(null,r.l),r.l=null,r.i=null},r.i&&r.i!==a&&r.componentWillUnmount(),c.__v?(r.l||(r.i=a,r.l={nodeType:1,parentNode:a,childNodes:[],appendChild:function(l){this.childNodes.push(l),r.i.appendChild(l)},insertBefore:function(l,i){this.childNodes.push(l),r.i.appendChild(l)},removeChild:function(l){this.childNodes.splice(this.childNodes.indexOf(l)>>>1,1),r.i.removeChild(l)}}),rA(rt(yle,{context:r.context},c.__v),r.l)):r.l&&r.componentWillUnmount()}function Cle(c,r){var a=rt(ble,{__v:c,i:r});return a.containerInfo=r,a}(QR.prototype=new sm).__a=function(c){var r=this,a=EJ(r.__v),l=r.o.get(c);return l[0]++,function(i){var m=function(){r.props.revealOrder?(l.push(i),kJ(r,c,l)):i()};a?a(m):m()}},QR.prototype.render=function(c){this.u=null,this.o=new Map;var r=YR(c.children);c.revealOrder&&c.revealOrder[0]==="b"&&r.reverse();for(var a=r.length;a--;)this.o.set(r[a],this.u=[1,0,this.u]);return c.children},QR.prototype.componentDidUpdate=QR.prototype.componentDidMount=function(){var c=this;this.o.forEach(function(r,a){kJ(c,a,r)})};var _le=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,wle=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Sle=typeof document<"u",Ele=function(c){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(c)};sm.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(c){Object.defineProperty(sm.prototype,c,{configurable:!0,get:function(){return this["UNSAFE_"+c]},set:function(r){Object.defineProperty(this,c,{configurable:!0,writable:!0,value:r})}})});var xJ=Es.event;function kle(){}function xle(){return this.cancelBubble}function Ale(){return this.defaultPrevented}Es.event=function(c){return xJ&&(c=xJ(c)),c.persist=kle,c.isPropagationStopped=xle,c.isDefaultPrevented=Ale,c.nativeEvent=c};var AJ={configurable:!0,get:function(){return this.class}},TJ=Es.vnode;Es.vnode=function(c){var r=c.type,a=c.props,l=a;if(typeof r=="string"){var i=r.indexOf("-")===-1;for(var m in l={},a){var v=a[m];Sle&&m==="children"&&r==="noscript"||m==="value"&&"defaultValue"in a&&v==null||(m==="defaultValue"&&"value"in a&&a.value==null?m="value":m==="download"&&v===!0?v="":/ondoubleclick/i.test(m)?m="ondblclick":/^onchange(textarea|input)/i.test(m+r)&&!Ele(a.type)?m="oninput":/^onfocus$/i.test(m)?m="onfocusin":/^onblur$/i.test(m)?m="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(m)?m=m.toLowerCase():i&&wle.test(m)?m=m.replace(/[A-Z0-9]/g,"-$&").toLowerCase():v===null&&(v=void 0),/^oninput$/i.test(m)&&(m=m.toLowerCase(),l[m]&&(m="oninputCapture")),l[m]=v)}r=="select"&&l.multiple&&Array.isArray(l.value)&&(l.value=YR(a.children).forEach(function(C){C.props.selected=l.value.indexOf(C.props.value)!=-1})),r=="select"&&l.defaultValue!=null&&(l.value=YR(a.children).forEach(function(C){C.props.selected=l.multiple?l.defaultValue.indexOf(C.props.value)!=-1:l.defaultValue==C.props.value})),c.props=l,a.class!=a.className&&(AJ.enumerable="className"in a,a.className!=null&&(l.class=a.className),Object.defineProperty(l,"className",AJ))}c.$$typeof=_le,TJ&&TJ(c)};var DJ=Es.__r;Es.__r=function(c){DJ&&DJ(c),c.__c};const RJ=[],f$=new Map;function m$(c){RJ.push(c),f$.forEach(r=>{NJ(r,c)})}function Tle(c){c.isConnected&&c.getRootNode&&OJ(c.getRootNode())}function OJ(c){let r=f$.get(c);if(!r||!r.isConnected){if(r=c.querySelector("style[data-fullcalendar]"),!r){r=document.createElement("style"),r.setAttribute("data-fullcalendar","");const a=Rle();a&&(r.nonce=a);const l=c===document?document.head:c,i=c===document?l.querySelector("script,link[rel=stylesheet],link[as=style],style"):l.firstChild;l.insertBefore(r,i)}f$.set(c,r),Dle(r)}}function Dle(c){for(const r of RJ)NJ(c,r)}function NJ(c,r){const{sheet:a}=c,l=a.cssRules.length;r.split("}").forEach((i,m)=>{i=i.trim(),i&&a.insertRule(i+"}",l+m)})}let h$;function Rle(){return h$===void 0&&(h$=Ole()),h$}function Ole(){const c=document.querySelector('meta[name="csp-nonce"]');if(c&&c.hasAttribute("content"))return c.getAttribute("content");const r=document.querySelector("script[nonce]");return r&&r.nonce||""}typeof document<"u"&&OJ(document);var Nle=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';m$(Nle);class g${constructor(r){this.drainedOption=r,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(r){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),r==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),r))}pause(r=""){let{pauseDepths:a}=this;a[r]=(a[r]||0)+1,this.clearTimeout()}resume(r="",a){let{pauseDepths:l}=this;r in l&&(a?delete l[r]:(l[r]-=1,l[r]<=0&&delete l[r]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function p$(c){c.parentNode&&c.parentNode.removeChild(c)}function td(c,r){if(c.closest)return c.closest(r);if(!document.documentElement.contains(c))return null;do{if(Ile(c,r))return c;c=c.parentElement||c.parentNode}while(c!==null&&c.nodeType===1);return null}function Ile(c,r){return(c.matches||c.matchesSelector||c.msMatchesSelector).call(c,r)}function Ble(c,r){let a=c instanceof HTMLElement?[c]:c,l=[];for(let i=0;i<a.length;i+=1){let m=a[i].querySelectorAll(r);for(let v=0;v<m.length;v+=1)l.push(m[v])}return l}const Mle=/(top|left|right|bottom|width|height)$/i;function iA(c,r){for(let a in r)IJ(c,a,r[a])}function IJ(c,r,a){a==null?c.style[r]="":typeof a=="number"&&Mle.test(r)?c.style[r]=`${a}px`:c.style[r]=a}function BJ(c){var r,a;return(a=(r=c.composedPath)===null||r===void 0?void 0:r.call(c)[0])!==null&&a!==void 0?a:c.target}let MJ=0;function JR(){return MJ+=1,"fc-dom-"+MJ}function eO(c){c.preventDefault()}function Ple(c,r){return a=>{let l=td(a.target,c);l&&r.call(l,a,l)}}function PJ(c,r,a,l){let i=Ple(a,l);return c.addEventListener(r,i),()=>{c.removeEventListener(r,i)}}function Lle(c,r,a,l){let i;return PJ(c,"mouseover",r,(m,v)=>{if(v!==i){i=v,a(m,v);let C=E=>{i=null,l(E,v),v.removeEventListener("mouseleave",C)};v.addEventListener("mouseleave",C)}})}const LJ=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Fle(c,r){let a=l=>{r(l),LJ.forEach(i=>{c.removeEventListener(i,a)})};LJ.forEach(l=>{c.addEventListener(l,a)})}function FJ(c){return Object.assign({onClick:c},$J(c))}function $J(c){return{tabIndex:0,onKeyDown(r){(r.key==="Enter"||r.key===" ")&&(c(r),r.preventDefault())}}}let VJ=0;function H2(){return VJ+=1,String(VJ)}function v$(){document.body.classList.add("fc-not-allowed")}function y$(){document.body.classList.remove("fc-not-allowed")}function $le(c){c.style.userSelect="none",c.style.webkitUserSelect="none",c.addEventListener("selectstart",eO)}function Vle(c){c.style.userSelect="",c.style.webkitUserSelect="",c.removeEventListener("selectstart",eO)}function Hle(c){c.addEventListener("contextmenu",eO)}function zle(c){c.removeEventListener("contextmenu",eO)}function Ule(c){let r=[],a=[],l,i;for(typeof c=="string"?a=c.split(/\s*,\s*/):typeof c=="function"?a=[c]:Array.isArray(c)&&(a=c),l=0;l<a.length;l+=1)i=a[l],typeof i=="string"?r.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&r.push({func:i});return r}function Wle(c,r,a){let l,i;for(l=0;l<a.length;l+=1)if(i=jle(c,r,a[l]),i)return i;return 0}function jle(c,r,a){return a.func?a.func(c,r):Gle(c[a.field],r[a.field])*(a.order||1)}function Gle(c,r){return!c&&!r?0:r==null?-1:c==null?1:typeof c=="string"||typeof r=="string"?String(c).localeCompare(String(r)):c-r}function LS(c,r){let a=String(c);return"000".substr(0,r-a.length)+a}function aA(c,r,a){return typeof c=="function"?c(...r):typeof c=="string"?r.reduce((l,i,m)=>l.replace("$"+m,i||""),c):a}function Zle(c,r){return c-r}function tO(c){return c%1===0}function qle(c){let r=c.querySelector(".fc-scrollgrid-shrink-frame"),a=c.querySelector(".fc-scrollgrid-shrink-cushion");if(!r)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!a)throw new Error("needs fc-scrollgrid-shrink-cushion className");return c.getBoundingClientRect().width-r.getBoundingClientRect().width+a.getBoundingClientRect().width}const HJ=["years","months","days","milliseconds"],Kle=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ni(c,r){return typeof c=="string"?Yle(c):typeof c=="object"&&c?zJ(c):typeof c=="number"?zJ({[r||"milliseconds"]:c}):null}function Yle(c){let r=Kle.exec(c);if(r){let a=r[1]?-1:1;return{years:0,months:0,days:a*(r[2]?parseInt(r[2],10):0),milliseconds:a*((r[3]?parseInt(r[3],10):0)*60*60*1e3+(r[4]?parseInt(r[4],10):0)*60*1e3+(r[5]?parseInt(r[5],10):0)*1e3+(r[6]?parseInt(r[6],10):0))}}return null}function zJ(c){let r={years:c.years||c.year||0,months:c.months||c.month||0,days:c.days||c.day||0,milliseconds:(c.hours||c.hour||0)*60*60*1e3+(c.minutes||c.minute||0)*60*1e3+(c.seconds||c.second||0)*1e3+(c.milliseconds||c.millisecond||c.ms||0)},a=c.weeks||c.week;return a&&(r.days+=a*7,r.specifiedWeeks=!0),r}function Xle(c,r){return c.years===r.years&&c.months===r.months&&c.days===r.days&&c.milliseconds===r.milliseconds}function b$(c,r){return{years:c.years+r.years,months:c.months+r.months,days:c.days+r.days,milliseconds:c.milliseconds+r.milliseconds}}function Qle(c,r){return{years:c.years-r.years,months:c.months-r.months,days:c.days-r.days,milliseconds:c.milliseconds-r.milliseconds}}function Jle(c,r){return{years:c.years*r,months:c.months*r,days:c.days*r,milliseconds:c.milliseconds*r}}function ece(c){return FS(c)/365}function tce(c){return FS(c)/30}function FS(c){return rg(c)/864e5}function rg(c){return c.years*(365*864e5)+c.months*(30*864e5)+c.days*864e5+c.milliseconds}function C$(c,r){let a=null;for(let l=0;l<HJ.length;l+=1){let i=HJ[l];if(r[i]){let m=c[i]/r[i];if(!tO(m)||a!==null&&a!==m)return null;a=m}else if(c[i])return null}return a}function _$(c){let r=c.milliseconds;if(r){if(r%1e3!==0)return{unit:"millisecond",value:r};if(r%(1e3*60)!==0)return{unit:"second",value:r/1e3};if(r%(1e3*60*60)!==0)return{unit:"minute",value:r/(1e3*60)};if(r)return{unit:"hour",value:r/(1e3*60*60)}}return c.days?c.specifiedWeeks&&c.days%7===0?{unit:"week",value:c.days/7}:{unit:"day",value:c.days}:c.months?{unit:"month",value:c.months}:c.years?{unit:"year",value:c.years}:{unit:"millisecond",value:0}}function Jv(c,r,a){if(c===r)return!0;let l=c.length,i;if(l!==r.length)return!1;for(i=0;i<l;i+=1)if(!(a?a(c[i],r[i]):c[i]===r[i]))return!1;return!0}const nce=["sun","mon","tue","wed","thu","fri","sat"];function UJ(c,r){let a=ty(c);return a[2]+=r*7,yf(a)}function nd(c,r){let a=ty(c);return a[2]+=r,yf(a)}function ey(c,r){let a=ty(c);return a[6]+=r,yf(a)}function oce(c,r){return z2(c,r)/7}function z2(c,r){return(r.valueOf()-c.valueOf())/(1e3*60*60*24)}function sce(c,r){return(r.valueOf()-c.valueOf())/(1e3*60*60)}function rce(c,r){return(r.valueOf()-c.valueOf())/(1e3*60)}function ice(c,r){return(r.valueOf()-c.valueOf())/1e3}function ace(c,r){let a=Oa(c),l=Oa(r);return{years:0,months:0,days:Math.round(z2(a,l)),milliseconds:r.valueOf()-l.valueOf()-(c.valueOf()-a.valueOf())}}function lce(c,r){let a=nO(c,r);return a!==null&&a%7===0?a/7:null}function nO(c,r){return ny(c)===ny(r)?Math.round(z2(c,r)):null}function Oa(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()])}function cce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours()])}function uce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes()])}function dce(c){return yf([c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds()])}function fce(c,r,a){let l=c.getUTCFullYear(),i=w$(c,l,r,a);if(i<1)return w$(c,l-1,r,a);let m=w$(c,l+1,r,a);return m>=1?Math.min(i,m):i}function w$(c,r,a,l){let i=yf([r,0,1+mce(r,a,l)]),m=Oa(c),v=Math.round(z2(i,m));return Math.floor(v/7)+1}function mce(c,r,a){let l=7+r-a;return-((7+yf([c,0,l]).getUTCDay()-r)%7)+l-1}function WJ(c){return[c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds()]}function jJ(c){return new Date(c[0],c[1]||0,c[2]==null?1:c[2],c[3]||0,c[4]||0,c[5]||0)}function ty(c){return[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()]}function yf(c){return c.length===1&&(c=c.concat([0])),new Date(Date.UTC(...c))}function GJ(c){return!isNaN(c.valueOf())}function ny(c){return c.getUTCHours()*1e3*60*60+c.getUTCMinutes()*1e3*60+c.getUTCSeconds()*1e3+c.getUTCMilliseconds()}function ZJ(c,r,a=!1){let l=c.toISOString();return l=l.replace(".000",""),a&&(l=l.replace("T00:00:00Z","")),l.length>10&&(r==null?l=l.replace("Z",""):r!==0&&(l=l.replace("Z",E$(r,!0)))),l}function S$(c){return c.toISOString().replace(/T.*$/,"")}function hce(c){return c.toISOString().match(/^\d{4}-\d{2}/)[0]}function gce(c){return LS(c.getUTCHours(),2)+":"+LS(c.getUTCMinutes(),2)+":"+LS(c.getUTCSeconds(),2)}function E$(c,r=!1){let a=c<0?"-":"+",l=Math.abs(c),i=Math.floor(l/60),m=Math.round(l%60);return r?`${a+LS(i,2)}:${LS(m,2)}`:`GMT${a}${i}${m?`:${LS(m,2)}`:""}`}function Ms(c,r,a){let l,i;return function(...m){if(!l)i=c.apply(this,m);else if(!Jv(l,m)){a&&a(i);let v=c.apply(this,m);(!r||!r(v,i))&&(i=v)}return l=m,i}}function oO(c,r,a){let l,i;return m=>{if(!l)i=c.call(this,m);else if(!_p(l,m)){a&&a(i);let v=c.call(this,m);(!r||!r(v,i))&&(i=v)}return l=m,i}}const qJ={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},sO={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},rO=/\s*([ap])\.?m\.?/i,pce=/,/g,vce=/\s+/g,yce=/\u200e/g,bce=/UTC|GMT/;class Cce{constructor(r){let a={},l={},i=0;for(let m in r)m in qJ?(l[m]=r[m],i=Math.max(qJ[m],i)):(a[m]=r[m],m in sO&&(i=Math.max(sO[m],i)));this.standardDateProps=a,this.extendedSettings=l,this.severity=i,this.buildFormattingFunc=Ms(KJ)}format(r,a){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,a)(r)}formatRange(r,a,l,i){let{standardDateProps:m,extendedSettings:v}=this,C=xce(r.marker,a.marker,l.calendarSystem);if(!C)return this.format(r,l);let E=C;E>1&&(m.year==="numeric"||m.year==="2-digit")&&(m.month==="numeric"||m.month==="2-digit")&&(m.day==="numeric"||m.day==="2-digit")&&(E=1);let T=this.format(r,l),N=this.format(a,l);if(T===N)return T;let V=Ace(m,E),U=KJ(V,v,l),z=U(r),W=U(a),K=Tce(T,z,N,W),Z=v.separator||i||l.defaultSeparator||"";return K?K.before+z+Z+W+K.after:T+Z+N}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function KJ(c,r,a){let l=Object.keys(c).length;return l===1&&c.timeZoneName==="short"?i=>E$(i.timeZoneOffset):l===0&&r.week?i=>kce(a.computeWeekNumber(i.marker),a.weekText,a.weekTextLong,a.locale,r.week):_ce(c,r,a)}function _ce(c,r,a){c=Object.assign({},c),r=Object.assign({},r),wce(c,r),c.timeZone="UTC";let l=new Intl.DateTimeFormat(a.locale.codes,c),i;if(r.omitZeroMinute){let m=Object.assign({},c);delete m.minute,i=new Intl.DateTimeFormat(a.locale.codes,m)}return m=>{let{marker:v}=m,C;i&&!v.getUTCMinutes()?C=i:C=l;let E=C.format(v);return Sce(E,m,c,r,a)}}function wce(c,r){c.timeZoneName&&(c.hour||(c.hour="2-digit"),c.minute||(c.minute="2-digit")),c.timeZoneName==="long"&&(c.timeZoneName="short"),r.omitZeroMinute&&(c.second||c.millisecond)&&delete r.omitZeroMinute}function Sce(c,r,a,l,i){return c=c.replace(yce,""),a.timeZoneName==="short"&&(c=Ece(c,i.timeZone==="UTC"||r.timeZoneOffset==null?"UTC":E$(r.timeZoneOffset))),l.omitCommas&&(c=c.replace(pce,"").trim()),l.omitZeroMinute&&(c=c.replace(":00","")),l.meridiem===!1?c=c.replace(rO,"").trim():l.meridiem==="narrow"?c=c.replace(rO,(m,v)=>v.toLocaleLowerCase()):l.meridiem==="short"?c=c.replace(rO,(m,v)=>`${v.toLocaleLowerCase()}m`):l.meridiem==="lowercase"&&(c=c.replace(rO,m=>m.toLocaleLowerCase())),c=c.replace(vce," "),c=c.trim(),c}function Ece(c,r){let a=!1;return c=c.replace(bce,()=>(a=!0,r)),a||(c+=` ${r}`),c}function kce(c,r,a,l,i){let m=[];return i==="long"?m.push(a):(i==="short"||i==="narrow")&&m.push(r),(i==="long"||i==="short")&&m.push(" "),m.push(l.simpleNumberFormat.format(c)),l.options.direction==="rtl"&&m.reverse(),m.join("")}function xce(c,r,a){return a.getMarkerYear(c)!==a.getMarkerYear(r)?5:a.getMarkerMonth(c)!==a.getMarkerMonth(r)?4:a.getMarkerDay(c)!==a.getMarkerDay(r)?2:ny(c)!==ny(r)?1:0}function Ace(c,r){let a={};for(let l in c)(!(l in sO)||sO[l]<=r)&&(a[l]=c[l]);return a}function Tce(c,r,a,l){let i=0;for(;i<c.length;){let m=c.indexOf(r,i);if(m===-1)break;let v=c.substr(0,m);i=m+r.length;let C=c.substr(i),E=0;for(;E<a.length;){let T=a.indexOf(l,E);if(T===-1)break;let N=a.substr(0,T);E=T+l.length;let V=a.substr(E);if(v===N&&C===V)return{before:v,after:C}}}return null}function YJ(c,r){let a=r.markerToArray(c.marker);return{marker:c.marker,timeZoneOffset:c.timeZoneOffset,array:a,year:a[0],month:a[1],day:a[2],hour:a[3],minute:a[4],second:a[5],millisecond:a[6]}}function iO(c,r,a,l){let i=YJ(c,a.calendarSystem),m=r?YJ(r,a.calendarSystem):null;return{date:i,start:i,end:m,timeZone:a.timeZone,localeCodes:a.locale.codes,defaultSeparator:l||a.defaultSeparator}}class Dce{constructor(r){this.cmdStr=r}format(r,a,l){return a.cmdFormatter(this.cmdStr,iO(r,null,a,l))}formatRange(r,a,l,i){return l.cmdFormatter(this.cmdStr,iO(r,a,l,i))}}class Rce{constructor(r){this.func=r}format(r,a,l){return this.func(iO(r,null,a,l))}formatRange(r,a,l,i){return this.func(iO(r,a,l,i))}}function El(c){return typeof c=="object"&&c?new Cce(c):typeof c=="string"?new Dce(c):typeof c=="function"?new Rce(c):null}const XJ={navLinkDayClick:Zt,navLinkWeekClick:Zt,duration:ni,bootstrapFontAwesome:Zt,buttonIcons:Zt,customButtons:Zt,defaultAllDayEventDuration:ni,defaultTimedEventDuration:ni,nextDayThreshold:ni,scrollTime:ni,scrollTimeReset:Boolean,slotMinTime:ni,slotMaxTime:ni,dayPopoverFormat:El,slotDuration:ni,snapDuration:ni,headerToolbar:Zt,footerToolbar:Zt,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:El,dayHeaderClassNames:Zt,dayHeaderContent:Zt,dayHeaderDidMount:Zt,dayHeaderWillUnmount:Zt,dayCellClassNames:Zt,dayCellContent:Zt,dayCellDidMount:Zt,dayCellWillUnmount:Zt,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Zt,weekNumbers:Boolean,weekNumberClassNames:Zt,weekNumberContent:Zt,weekNumberDidMount:Zt,weekNumberWillUnmount:Zt,editable:Boolean,viewClassNames:Zt,viewDidMount:Zt,viewWillUnmount:Zt,nowIndicator:Boolean,nowIndicatorClassNames:Zt,nowIndicatorContent:Zt,nowIndicatorDidMount:Zt,nowIndicatorWillUnmount:Zt,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Zt,locale:Zt,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Zt,eventOrder:Ule,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Zt,contentHeight:Zt,direction:String,weekNumberFormat:El,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Zt,initialDate:Zt,now:Zt,eventDataTransform:Zt,stickyHeaderDates:Zt,stickyFooterScrollbar:Zt,viewHeight:Zt,defaultAllDay:Boolean,eventSourceFailure:Zt,eventSourceSuccess:Zt,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Zt,eventConstraint:Zt,eventAllow:Zt,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Zt,eventContent:Zt,eventDidMount:Zt,eventWillUnmount:Zt,selectConstraint:Zt,selectOverlap:Zt,selectAllow:Zt,droppable:Boolean,unselectCancel:String,slotLabelFormat:Zt,slotLaneClassNames:Zt,slotLaneContent:Zt,slotLaneDidMount:Zt,slotLaneWillUnmount:Zt,slotLabelClassNames:Zt,slotLabelContent:Zt,slotLabelDidMount:Zt,slotLabelWillUnmount:Zt,dayMaxEvents:Zt,dayMaxEventRows:Zt,dayMinWidth:Number,slotLabelInterval:ni,allDayText:String,allDayClassNames:Zt,allDayContent:Zt,allDayDidMount:Zt,allDayWillUnmount:Zt,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:El,rerenderDelay:Number,moreLinkText:Zt,moreLinkHint:Zt,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Zt,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ni,hiddenDays:Zt,fixedWeekCount:Boolean,validRange:Zt,visibleRange:Zt,titleFormat:Zt,eventInteractive:Boolean,noEventsText:String,viewHint:Zt,navLinkHint:Zt,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Zt,moreLinkClassNames:Zt,moreLinkContent:Zt,moreLinkDidMount:Zt,moreLinkWillUnmount:Zt,monthStartFormat:El,handleCustomRendering:Zt,customRenderingMetaMap:Zt,customRenderingReplaces:Boolean},lA={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},QJ={datesSet:Zt,eventsSet:Zt,eventAdd:Zt,eventChange:Zt,eventRemove:Zt,windowResize:Zt,eventClick:Zt,eventMouseEnter:Zt,eventMouseLeave:Zt,select:Zt,unselect:Zt,loading:Zt,_unmount:Zt,_beforeprint:Zt,_afterprint:Zt,_noEventDrop:Zt,_noEventResize:Zt,_resize:Zt,_scrollRequest:Zt},JJ={buttonText:Zt,buttonHints:Zt,views:Zt,plugins:Zt,initialEvents:Zt,events:Zt,eventSources:Zt},U2={headerToolbar:W2,footerToolbar:W2,buttonText:W2,buttonHints:W2,buttonIcons:W2,dateIncrement:W2,plugins:aO,events:aO,eventSources:aO,resources:aO};function W2(c,r){return typeof c=="object"&&typeof r=="object"&&c&&r?_p(c,r):c===r}function aO(c,r){return Array.isArray(c)&&Array.isArray(r)?Jv(c,r):c===r}const Oce={type:String,component:Zt,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Zt,usesMinMaxTime:Boolean,classNames:Zt,content:Zt,didMount:Zt,willUnmount:Zt};function k$(c){return A$(c,U2)}function x$(c,r){let a={},l={};for(let i in r)i in c&&(a[i]=r[i](c[i]));for(let i in c)i in r||(l[i]=c[i]);return{refined:a,extra:l}}function Zt(c){return c}const{hasOwnProperty:lO}=Object.prototype;function A$(c,r){let a={};if(r){for(let l in r)if(r[l]===W2){let i=[];for(let m=c.length-1;m>=0;m-=1){let v=c[m][l];if(typeof v=="object"&&v)i.unshift(v);else if(v!==void 0){a[l]=v;break}}i.length&&(a[l]=A$(i))}}for(let l=c.length-1;l>=0;l-=1){let i=c[l];for(let m in i)m in a||(a[m]=i[m])}return a}function j2(c,r){let a={};for(let l in c)r(c[l],l)&&(a[l]=c[l]);return a}function Z1(c,r){let a={};for(let l in c)a[l]=r(c[l],l);return a}function eee(c){let r={};for(let a of c)r[a]=!0;return r}function T$(c){let r=[];for(let a in c)r.push(c[a]);return r}function _p(c,r){if(c===r)return!0;for(let a in c)if(lO.call(c,a)&&!(a in r))return!1;for(let a in r)if(lO.call(r,a)&&c[a]!==r[a])return!1;return!0}const Nce=/^on[A-Z]/;function Ice(c,r){const a=D$(c,r);for(let l of a)if(!Nce.test(l))return!1;return!0}function D$(c,r){let a=[];for(let l in c)lO.call(c,l)&&(l in r||a.push(l));for(let l in r)lO.call(r,l)&&c[l]!==r[l]&&a.push(l);return a}function R$(c,r,a={}){if(c===r)return!0;for(let l in r)if(!(l in c&&Bce(c[l],r[l],a[l])))return!1;for(let l in c)if(!(l in r))return!1;return!0}function Bce(c,r,a){return c===r||a===!0?!0:a?a(c,r):!1}function Mce(c,r=0,a,l=1){let i=[];a==null&&(a=Object.keys(c).length);for(let m=r;m<a;m+=l){let v=c[m];v!==void 0&&i.push(v)}return i}let tee={};function Pce(c,r){tee[c]=r}function Lce(c){return new tee[c]}class Fce{getMarkerYear(r){return r.getUTCFullYear()}getMarkerMonth(r){return r.getUTCMonth()}getMarkerDay(r){return r.getUTCDate()}arrayToMarker(r){return yf(r)}markerToArray(r){return ty(r)}}Pce("gregory",Fce);const $ce=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Vce(c){let r=$ce.exec(c);if(r){let a=new Date(Date.UTC(Number(r[1]),r[3]?Number(r[3])-1:0,Number(r[5]||1),Number(r[7]||0),Number(r[8]||0),Number(r[10]||0),r[12]?+`0.${r[12]}`*1e3:0));if(GJ(a)){let l=null;return r[13]&&(l=(r[15]==="-"?-1:1)*(Number(r[16]||0)*60+Number(r[18]||0))),{marker:a,isTimeUnspecified:!r[6],timeZoneOffset:l}}}return null}class Hce{constructor(r){let a=this.timeZone=r.timeZone,l=a!=="local"&&a!=="UTC";r.namedTimeZoneImpl&&l&&(this.namedTimeZoneImpl=new r.namedTimeZoneImpl(a)),this.canComputeOffset=!!(!l||this.namedTimeZoneImpl),this.calendarSystem=Lce(r.calendarSystem),this.locale=r.locale,this.weekDow=r.locale.week.dow,this.weekDoy=r.locale.week.doy,r.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof r.firstDay=="number"&&(this.weekDow=r.firstDay),typeof r.weekNumberCalculation=="function"&&(this.weekNumberFunc=r.weekNumberCalculation),this.weekText=r.weekText!=null?r.weekText:r.locale.options.weekText,this.weekTextLong=(r.weekTextLong!=null?r.weekTextLong:r.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=r.cmdFormatter,this.defaultSeparator=r.defaultSeparator}createMarker(r){let a=this.createMarkerMeta(r);return a===null?null:a.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):yf(WJ(new Date))}createMarkerMeta(r){if(typeof r=="string")return this.parse(r);let a=null;return typeof r=="number"?a=this.timestampToMarker(r):r instanceof Date?(r=r.valueOf(),isNaN(r)||(a=this.timestampToMarker(r))):Array.isArray(r)&&(a=yf(r)),a===null||!GJ(a)?null:{marker:a,isTimeUnspecified:!1,forcedTzo:null}}parse(r){let a=Vce(r);if(a===null)return null;let{marker:l}=a,i=null;return a.timeZoneOffset!==null&&(this.canComputeOffset?l=this.timestampToMarker(l.valueOf()-a.timeZoneOffset*60*1e3):i=a.timeZoneOffset),{marker:l,isTimeUnspecified:a.isTimeUnspecified,forcedTzo:i}}getYear(r){return this.calendarSystem.getMarkerYear(r)}getMonth(r){return this.calendarSystem.getMarkerMonth(r)}getDay(r){return this.calendarSystem.getMarkerDay(r)}add(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]+=a.years,l[1]+=a.months,l[2]+=a.days,l[6]+=a.milliseconds,this.calendarSystem.arrayToMarker(l)}subtract(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]-=a.years,l[1]-=a.months,l[2]-=a.days,l[6]-=a.milliseconds,this.calendarSystem.arrayToMarker(l)}addYears(r,a){let l=this.calendarSystem.markerToArray(r);return l[0]+=a,this.calendarSystem.arrayToMarker(l)}addMonths(r,a){let l=this.calendarSystem.markerToArray(r);return l[1]+=a,this.calendarSystem.arrayToMarker(l)}diffWholeYears(r,a){let{calendarSystem:l}=this;return ny(r)===ny(a)&&l.getMarkerDay(r)===l.getMarkerDay(a)&&l.getMarkerMonth(r)===l.getMarkerMonth(a)?l.getMarkerYear(a)-l.getMarkerYear(r):null}diffWholeMonths(r,a){let{calendarSystem:l}=this;return ny(r)===ny(a)&&l.getMarkerDay(r)===l.getMarkerDay(a)?l.getMarkerMonth(a)-l.getMarkerMonth(r)+(l.getMarkerYear(a)-l.getMarkerYear(r))*12:null}greatestWholeUnit(r,a){let l=this.diffWholeYears(r,a);return l!==null?{unit:"year",value:l}:(l=this.diffWholeMonths(r,a),l!==null?{unit:"month",value:l}:(l=lce(r,a),l!==null?{unit:"week",value:l}:(l=nO(r,a),l!==null?{unit:"day",value:l}:(l=sce(r,a),tO(l)?{unit:"hour",value:l}:(l=rce(r,a),tO(l)?{unit:"minute",value:l}:(l=ice(r,a),tO(l)?{unit:"second",value:l}:{unit:"millisecond",value:a.valueOf()-r.valueOf()}))))))}countDurationsBetween(r,a,l){let i;return l.years&&(i=this.diffWholeYears(r,a),i!==null)?i/ece(l):l.months&&(i=this.diffWholeMonths(r,a),i!==null)?i/tce(l):l.days&&(i=nO(r,a),i!==null)?i/FS(l):(a.valueOf()-r.valueOf())/rg(l)}startOf(r,a){return a==="year"?this.startOfYear(r):a==="month"?this.startOfMonth(r):a==="week"?this.startOfWeek(r):a==="day"?Oa(r):a==="hour"?cce(r):a==="minute"?uce(r):a==="second"?dce(r):null}startOfYear(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r)])}startOfMonth(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r),this.calendarSystem.getMarkerMonth(r)])}startOfWeek(r){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(r),this.calendarSystem.getMarkerMonth(r),r.getUTCDate()-(r.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(r){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(r)):fce(r,this.weekDow,this.weekDoy)}format(r,a,l={}){return a.format({marker:r,timeZoneOffset:l.forcedTzo!=null?l.forcedTzo:this.offsetForMarker(r)},this)}formatRange(r,a,l,i={}){return i.isEndExclusive&&(a=ey(a,-1)),l.formatRange({marker:r,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(r)},{marker:a,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(a)},this,i.defaultSeparator)}formatIso(r,a={}){let l=null;return a.omitTimeZoneOffset||(a.forcedTzo!=null?l=a.forcedTzo:l=this.offsetForMarker(r)),ZJ(r,l,a.omitTime)}timestampToMarker(r){return this.timeZone==="local"?yf(WJ(new Date(r))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(r):yf(this.namedTimeZoneImpl.timestampToArray(r))}offsetForMarker(r){return this.timeZone==="local"?-jJ(ty(r)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ty(r)):null}toDate(r,a){return this.timeZone==="local"?jJ(ty(r)):this.timeZone==="UTC"?new Date(r.valueOf()):this.namedTimeZoneImpl?new Date(r.valueOf()-this.namedTimeZoneImpl.offsetForArray(ty(r))*1e3*60):new Date(r.valueOf()-(a||0))}}class cA{constructor(r){this.iconOverrideOption&&this.setIconOverride(r[this.iconOverrideOption])}setIconOverride(r){let a,l;if(typeof r=="object"&&r){a=Object.assign({},this.iconClasses);for(l in r)a[l]=this.applyIconOverridePrefix(r[l]);this.iconClasses=a}else r===!1&&(this.iconClasses={})}applyIconOverridePrefix(r){let a=this.iconOverridePrefix;return a&&r.indexOf(a)!==0&&(r=a+r),r}getClass(r){return this.classes[r]||""}getIconClass(r,a){let l;return a&&this.rtlIconClasses?l=this.rtlIconClasses[r]||this.iconClasses[r]:l=this.iconClasses[r],l?`${this.baseIconClass} ${l}`:""}getCustomButtonIconClass(r){let a;return this.iconOverrideCustomButtonOption&&(a=r[this.iconOverrideCustomButtonOption],a)?`${this.baseIconClass} ${this.applyIconOverridePrefix(a)}`:""}}cA.prototype.classes={},cA.prototype.iconClasses={},cA.prototype.baseIconClass="",cA.prototype.iconOverridePrefix="";function cO(c){c();let r=Es.debounceRendering,a=[];function l(i){a.push(i)}for(Es.debounceRendering=l,rA(rt(zce,{}),document.createElement("div"));a.length;)a.shift()();Es.debounceRendering=r}class zce extends sm{render(){return rt("div",{})}componentDidMount(){this.setState({})}}function nee(c){let r=mle(c),a=r.Provider;return r.Provider=function(){let l=!this.getChildContext,i=a.apply(this,arguments);if(l){let m=[];this.shouldComponentUpdate=v=>{this.props.value!==v.value&&m.forEach(C=>{C.context=v.value,C.forceUpdate()})},this.sub=v=>{m.push(v);let C=v.componentWillUnmount;v.componentWillUnmount=()=>{m.splice(m.indexOf(v),1),C&&C.call(v)}}}return i},r}class Uce{constructor(r,a,l,i){this.execFunc=r,this.emitter=a,this.scrollTime=l,this.scrollTimeReset=i,this.handleScrollRequest=m=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},m),this.drain()},a.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(r){r&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const q1=nee({});function Wce(c,r,a,l,i,m,v,C,E,T,N,V,U){return{dateEnv:i,options:a,pluginHooks:v,emitter:T,dispatch:C,getCurrentData:E,calendarApi:N,viewSpec:c,viewApi:r,dateProfileGenerator:l,theme:m,isRtl:a.direction==="rtl",addResizeHandler(z){T.on("_resize",z)},removeResizeHandler(z){T.off("_resize",z)},createScrollResponder(z){return new Uce(z,T,ni(a.scrollTime),a.scrollTimeReset)},registerInteractiveComponent:V,unregisterInteractiveComponent:U}}class G2 extends sm{shouldComponentUpdate(r,a){return this.debug&&console.log(D$(r,this.props),D$(a,this.state)),!R$(this.props,r,this.propEquality)||!R$(this.state,a,this.stateEquality)}safeSetState(r){R$(this.state,Object.assign(Object.assign({},this.state),r),this.stateEquality)||this.setState(r)}}G2.addPropsEquality=jce,G2.addStateEquality=Gce,G2.contextType=q1,G2.prototype.propEquality={},G2.prototype.stateEquality={};class Li extends G2{}Li.contextType=q1;function jce(c){let r=Object.create(this.prototype.propEquality);Object.assign(r,c),this.prototype.propEquality=r}function Gce(c){let r=Object.create(this.prototype.stateEquality);Object.assign(r,c),this.prototype.stateEquality=r}function K1(c,r){typeof c=="function"?c(r):c&&(c.current=r)}class O$ extends Li{constructor(){super(...arguments),this.id=H2(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=r=>{const{options:a}=this.context,{generatorName:l}=this.props;(!a.customRenderingReplaces||!N$(l,a))&&this.updateElRef(r)},this.updateElRef=r=>{this.props.elRef&&K1(this.props.elRef,r)}}render(){const{props:r,context:a}=this,{options:l}=a,{customGenerator:i,defaultGenerator:m,renderProps:v}=r,C=oee(r,[],this.handleEl);let E=!1,T,N=[],V;if(i!=null){const U=typeof i=="function"?i(v,rt):i;if(U===!0)E=!0;else{const z=U&&typeof U=="object";z&&"html"in U?C.dangerouslySetInnerHTML={__html:U.html}:z&&"domNodes"in U?N=Array.prototype.slice.call(U.domNodes):(z?ZQ(U):typeof U!="function")?T=U:V=U}}else E=!N$(r.generatorName,l);return E&&m&&(T=m(v)),this.queuedDomNodes=N,this.currentGeneratorMeta=V,rt(r.elTag,C,T)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(r){var a;const{props:l,context:i}=this,{handleCustomRendering:m,customRenderingMetaMap:v}=i.options;if(m){const C=(a=this.currentGeneratorMeta)!==null&&a!==void 0?a:v==null?void 0:v[l.generatorName];C&&m(Object.assign(Object.assign({id:this.id,isActive:r,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:C},l),{elClasses:(l.elClasses||[]).filter(Zce)}))}}applyQueueudDomNodes(){const{queuedDomNodes:r,currentDomNodes:a}=this,l=this.base;if(!Jv(r,a)){a.forEach(p$);for(let i of r)l.appendChild(i);this.currentDomNodes=r}}}O$.addPropsEquality({elClasses:Jv,elStyle:_p,elAttrs:Ice,renderProps:_p});function N$(c,r){var a;return!!(r.handleCustomRendering&&c&&(!((a=r.customRenderingMetaMap)===null||a===void 0)&&a[c]))}function oee(c,r,a){const l=Object.assign(Object.assign({},c.elAttrs),{ref:a});return(c.elClasses||r)&&(l.className=(c.elClasses||[]).concat(r||[]).concat(l.className||[]).filter(Boolean).join(" ")),c.elStyle&&(l.style=c.elStyle),l}function Zce(c){return!!c}const see=nee(0);class rm extends sm{constructor(){super(...arguments),this.InnerContent=qce.bind(void 0,this),this.handleEl=r=>{this.el=r,this.props.elRef&&(K1(this.props.elRef,r),r&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:r}=this,a=Kce(r.classNameGenerator,r.renderProps);if(r.children){const l=oee(r,a,this.handleEl),i=r.children(this.InnerContent,r.renderProps,l);return r.elTag?rt(r.elTag,l,i):i}else return rt(O$,Object.assign(Object.assign({},r),{elRef:this.handleEl,elTag:r.elTag||"div",elClasses:(r.elClasses||[]).concat(a),renderId:this.context}))}componentDidMount(){var r,a;this.el?(a=(r=this.props).didMount)===null||a===void 0||a.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var r,a;(a=(r=this.props).willUnmount)===null||a===void 0||a.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}rm.contextType=see;function qce(c,r){const a=c.props;return rt(O$,Object.assign({renderProps:a.renderProps,generatorName:a.generatorName,customGenerator:a.customGenerator,defaultGenerator:a.defaultGenerator,renderId:c.context},r))}function Kce(c,r){const a=typeof c=="function"?c(r):c||[];return typeof a=="string"?[a]:a}class uO extends Li{render(){let{props:r,context:a}=this,{options:l}=a,i={view:a.viewApi};return rt(rm,Object.assign({},r,{elTag:r.elTag||"div",elClasses:[...ree(r.viewSpec),...r.elClasses||[]],renderProps:i,classNameGenerator:l.viewClassNames,generatorName:void 0,didMount:l.viewDidMount,willUnmount:l.viewWillUnmount}),()=>r.children)}}function ree(c){return[`fc-${c.type}-view`,"fc-view"]}function Yce(c,r){let a=null,l=null;return c.start&&(a=r.createMarker(c.start)),c.end&&(l=r.createMarker(c.end)),!a&&!l||a&&l&&l<a?null:{start:a,end:l}}function iee(c,r){let a=[],{start:l}=r,i,m;for(c.sort(Xce),i=0;i<c.length;i+=1)m=c[i],m.start>l&&a.push({start:l,end:m.start}),m.end>l&&(l=m.end);return l<r.end&&a.push({start:l,end:r.end}),a}function Xce(c,r){return c.start.valueOf()-r.start.valueOf()}function Z2(c,r){let{start:a,end:l}=c,i=null;return r.start!==null&&(a===null?a=r.start:a=new Date(Math.max(a.valueOf(),r.start.valueOf()))),r.end!=null&&(l===null?l=r.end:l=new Date(Math.min(l.valueOf(),r.end.valueOf()))),(a===null||l===null||a<l)&&(i={start:a,end:l}),i}function Qce(c,r){return(c.start===null?null:c.start.valueOf())===(r.start===null?null:r.start.valueOf())&&(c.end===null?null:c.end.valueOf())===(r.end===null?null:r.end.valueOf())}function I$(c,r){return(c.end===null||r.start===null||c.end>r.start)&&(c.start===null||r.end===null||c.start<r.end)}function dO(c,r){return(c.start===null||r.start!==null&&r.start>=c.start)&&(c.end===null||r.end!==null&&r.end<=c.end)}function Y1(c,r){return(c.start===null||r>=c.start)&&(c.end===null||r<c.end)}function Jce(c,r){return r.start!=null&&c<r.start?r.start:r.end!=null&&c>=r.end?new Date(r.end.valueOf()-1):c}function aee(c){let r=Math.floor(z2(c.start,c.end))||1,a=Oa(c.start),l=nd(a,r);return{start:a,end:l}}function lee(c,r=ni(0)){let a=null,l=null;if(c.end){l=Oa(c.end);let i=c.end.valueOf()-l.valueOf();i&&i>=rg(r)&&(l=nd(l,1))}return c.start&&(a=Oa(c.start),l&&l<=a&&(l=nd(a,1))),{start:a,end:l}}function $S(c,r,a,l){return l==="year"?ni(a.diffWholeYears(c,r),"year"):l==="month"?ni(a.diffWholeMonths(c,r),"month"):ace(c,r)}function eue(c,r){switch(r.type){case"CHANGE_DATE":return r.dateMarker;default:return c}}function tue(c,r){let a=c.initialDate;return a!=null?r.createMarker(a):uA(c.now,r)}function uA(c,r){return typeof c=="function"&&(c=c()),c==null?r.createNowMarker():r.createMarker(c)}class cee{constructor(r){this.props=r,this.nowDate=uA(r.nowInput,r.dateEnv),this.initHiddenDays()}buildPrev(r,a,l){let{dateEnv:i}=this.props,m=i.subtract(i.startOf(a,r.currentRangeUnit),r.dateIncrement);return this.build(m,-1,l)}buildNext(r,a,l){let{dateEnv:i}=this.props,m=i.add(i.startOf(a,r.currentRangeUnit),r.dateIncrement);return this.build(m,1,l)}build(r,a,l=!0){let{props:i}=this,m,v,C,E,T,N;return m=this.buildValidRange(),m=this.trimHiddenDays(m),l&&(r=Jce(r,m)),v=this.buildCurrentRangeInfo(r,a),C=/^(year|month|week|day)$/.test(v.unit),E=this.buildRenderRange(this.trimHiddenDays(v.range),v.unit,C),E=this.trimHiddenDays(E),T=E,i.showNonCurrentDates||(T=Z2(T,v.range)),T=this.adjustActiveRange(T),T=Z2(T,m),N=I$(v.range,m),Y1(E,r)||(r=E.start),{currentDate:r,validRange:m,currentRange:v.range,currentRangeUnit:v.unit,isRangeAllDay:C,activeRange:T,renderRange:E,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:N,dateIncrement:this.buildDateIncrement(v.duration)}}buildValidRange(){let r=this.props.validRangeInput,a=typeof r=="function"?r.call(this.props.calendarApi,this.nowDate):r;return this.refineRange(a)||{start:null,end:null}}buildCurrentRangeInfo(r,a){let{props:l}=this,i=null,m=null,v=null,C;return l.duration?(i=l.duration,m=l.durationUnit,v=this.buildRangeFromDuration(r,a,i,m)):(C=this.props.dayCount)?(m="day",v=this.buildRangeFromDayCount(r,a,C)):(v=this.buildCustomVisibleRange(r))?m=l.dateEnv.greatestWholeUnit(v.start,v.end).unit:(i=this.getFallbackDuration(),m=_$(i).unit,v=this.buildRangeFromDuration(r,a,i,m)),{duration:i,unit:m,range:v}}getFallbackDuration(){return ni({day:1})}adjustActiveRange(r){let{dateEnv:a,usesMinMaxTime:l,slotMinTime:i,slotMaxTime:m}=this.props,{start:v,end:C}=r;return l&&(FS(i)<0&&(v=Oa(v),v=a.add(v,i)),FS(m)>1&&(C=Oa(C),C=nd(C,-1),C=a.add(C,m))),{start:v,end:C}}buildRangeFromDuration(r,a,l,i){let{dateEnv:m,dateAlignment:v}=this.props,C,E,T;if(!v){let{dateIncrement:V}=this.props;V&&rg(V)<rg(l)?v=_$(V).unit:v=i}FS(l)<=1&&this.isHiddenDay(C)&&(C=this.skipHiddenDays(C,a),C=Oa(C));function N(){C=m.startOf(r,v),E=m.add(C,l),T={start:C,end:E}}return N(),this.trimHiddenDays(T)||(r=this.skipHiddenDays(r,a),N()),T}buildRangeFromDayCount(r,a,l){let{dateEnv:i,dateAlignment:m}=this.props,v=0,C=r,E;m&&(C=i.startOf(C,m)),C=Oa(C),C=this.skipHiddenDays(C,a),E=C;do E=nd(E,1),this.isHiddenDay(E)||(v+=1);while(v<l);return{start:C,end:E}}buildCustomVisibleRange(r){let{props:a}=this,l=a.visibleRangeInput,i=typeof l=="function"?l.call(a.calendarApi,a.dateEnv.toDate(r)):l,m=this.refineRange(i);return m&&(m.start==null||m.end==null)?null:m}buildRenderRange(r,a,l){return r}buildDateIncrement(r){let{dateIncrement:a}=this.props,l;return a||((l=this.props.dateAlignment)?ni(1,l):r||ni({days:1}))}refineRange(r){if(r){let a=Yce(r,this.props.dateEnv);return a&&(a=lee(a)),a}return null}initHiddenDays(){let r=this.props.hiddenDays||[],a=[],l=0,i;for(this.props.weekends===!1&&r.push(0,6),i=0;i<7;i+=1)(a[i]=r.indexOf(i)!==-1)||(l+=1);if(!l)throw new Error("invalid hiddenDays");this.isHiddenDayHash=a}trimHiddenDays(r){let{start:a,end:l}=r;return a&&(a=this.skipHiddenDays(a)),l&&(l=this.skipHiddenDays(l,-1,!0)),a==null||l==null||a<l?{start:a,end:l}:null}isHiddenDay(r){return r instanceof Date&&(r=r.getUTCDay()),this.isHiddenDayHash[r]}skipHiddenDays(r,a=1,l=!1){for(;this.isHiddenDayHash[(r.getUTCDay()+(l?a:0)+7)%7];)r=nd(r,a);return r}}function B$(c,r,a,l){return{instanceId:H2(),defId:c,range:r,forcedStartTzo:a??null,forcedEndTzo:l??null}}function nue(c,r,a,l){for(let i=0;i<l.length;i+=1){let m=l[i].parse(c,a);if(m){let{allDay:v}=c;return v==null&&(v=r,v==null&&(v=m.allDayGuess,v==null&&(v=!1))),{allDay:v,duration:m.duration,typeData:m.typeData,typeId:i}}}return null}function q2(c,r,a){let{dateEnv:l,pluginHooks:i,options:m}=a,{defs:v,instances:C}=c;C=j2(C,E=>!v[E.defId].recurringDef);for(let E in v){let T=v[E];if(T.recurringDef){let{duration:N}=T.recurringDef;N||(N=T.allDay?m.defaultAllDayEventDuration:m.defaultTimedEventDuration);let V=oue(T,N,r,l,i.recurringTypes);for(let U of V){let z=B$(E,{start:U,end:l.add(U,N)});C[z.instanceId]=z}}}return{defs:v,instances:C}}function oue(c,r,a,l,i){let v=i[c.recurringDef.typeId].expand(c.recurringDef.typeData,{start:l.subtract(a.start,r),end:a.end},l);return c.allDay&&(v=v.map(Oa)),v}const fO={id:String,groupId:String,title:String,url:String,interactive:Boolean},uee={start:Zt,end:Zt,date:Zt,allDay:Boolean},sue=Object.assign(Object.assign(Object.assign({},fO),uee),{extendedProps:Zt});function dee(c,r,a,l,i=M$(a),m,v){let{refined:C,extra:E}=fee(c,a,i),T=iue(r,a),N=nue(C,T,a.dateEnv,a.pluginHooks.recurringTypes);if(N){let U=P$(C,E,r?r.sourceId:"",N.allDay,!!N.duration,a,m);return U.recurringDef={typeId:N.typeId,typeData:N.typeData,duration:N.duration},{def:U,instance:null}}let V=rue(C,T,a,l);if(V){let U=P$(C,E,r?r.sourceId:"",V.allDay,V.hasEnd,a,m),z=B$(U.defId,V.range,V.forcedStartTzo,V.forcedEndTzo);return v&&U.publicId&&v[U.publicId]&&(z.instanceId=v[U.publicId]),{def:U,instance:z}}return null}function fee(c,r,a=M$(r)){return x$(c,a)}function M$(c){return Object.assign(Object.assign(Object.assign({},hO),sue),c.pluginHooks.eventRefiners)}function P$(c,r,a,l,i,m,v){let C={title:c.title||"",groupId:c.groupId||"",publicId:c.id||"",url:c.url||"",recurringDef:null,defId:(v&&c.id?v[c.id]:"")||H2(),sourceId:a,allDay:l,hasEnd:i,interactive:c.interactive,ui:gO(c,m),extendedProps:Object.assign(Object.assign({},c.extendedProps||{}),r)};for(let E of m.pluginHooks.eventDefMemberAdders)Object.assign(C,E(c));return Object.freeze(C.ui.classNames),Object.freeze(C.extendedProps),C}function rue(c,r,a,l){let{allDay:i}=c,m,v=null,C=!1,E,T=null,N=c.start!=null?c.start:c.date;if(m=a.dateEnv.createMarkerMeta(N),m)v=m.marker;else if(!l)return null;return c.end!=null&&(E=a.dateEnv.createMarkerMeta(c.end)),i==null&&(r!=null?i=r:i=(!m||m.isTimeUnspecified)&&(!E||E.isTimeUnspecified)),i&&v&&(v=Oa(v)),E&&(T=E.marker,i&&(T=Oa(T)),v&&T<=v&&(T=null)),T?C=!0:l||(C=a.options.forceEventDuration||!1,T=a.dateEnv.add(v,i?a.options.defaultAllDayEventDuration:a.options.defaultTimedEventDuration)),{allDay:i,hasEnd:C,range:{start:v,end:T},forcedStartTzo:m?m.forcedTzo:null,forcedEndTzo:E?E.forcedTzo:null}}function iue(c,r){let a=null;return c&&(a=c.defaultAllDay),a==null&&(a=r.options.defaultAllDay),a}function dA(c,r,a,l,i,m){let v=im(),C=M$(a);for(let E of c){let T=dee(E,r,a,l,C,i,m);T&&L$(T,v)}return v}function L$(c,r=im()){return r.defs[c.def.defId]=c.def,c.instance&&(r.instances[c.instance.instanceId]=c.instance),r}function F$(c,r){let a=c.instances[r];if(a){let l=c.defs[a.defId],i=mO(c,m=>aue(l,m));return i.defs[l.defId]=l,i.instances[a.instanceId]=a,i}return im()}function aue(c,r){return!!(c.groupId&&c.groupId===r.groupId)}function im(){return{defs:{},instances:{}}}function $$(c,r){return{defs:Object.assign(Object.assign({},c.defs),r.defs),instances:Object.assign(Object.assign({},c.instances),r.instances)}}function mO(c,r){let a=j2(c.defs,r),l=j2(c.instances,i=>a[i.defId]);return{defs:a,instances:l}}function lue(c,r){let{defs:a,instances:l}=c,i={},m={};for(let v in a)r.defs[v]||(i[v]=a[v]);for(let v in l)!r.instances[v]&&i[l[v].defId]&&(m[v]=l[v]);return{defs:i,instances:m}}function cue(c,r){return Array.isArray(c)?dA(c,null,r,!0):typeof c=="object"&&c?dA([c],null,r,!0):c!=null?String(c):null}function mee(c){return Array.isArray(c)?c:typeof c=="string"?c.split(/\s+/):[]}const hO={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Zt,overlap:Zt,allow:Zt,className:mee,classNames:mee,color:String,backgroundColor:String,borderColor:String,textColor:String},uue={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function gO(c,r){let a=cue(c.constraint,r);return{display:c.display||null,startEditable:c.startEditable!=null?c.startEditable:c.editable,durationEditable:c.durationEditable!=null?c.durationEditable:c.editable,constraints:a!=null?[a]:[],overlap:c.overlap!=null?c.overlap:null,allows:c.allow!=null?[c.allow]:[],backgroundColor:c.backgroundColor||c.color||"",borderColor:c.borderColor||c.color||"",textColor:c.textColor||"",classNames:(c.className||[]).concat(c.classNames||[])}}function hee(c){return c.reduce(due,uue)}function due(c,r){return{display:r.display!=null?r.display:c.display,startEditable:r.startEditable!=null?r.startEditable:c.startEditable,durationEditable:r.durationEditable!=null?r.durationEditable:c.durationEditable,constraints:c.constraints.concat(r.constraints),overlap:typeof r.overlap=="boolean"?r.overlap:c.overlap,allows:c.allows.concat(r.allows),backgroundColor:r.backgroundColor||c.backgroundColor,borderColor:r.borderColor||c.borderColor,textColor:r.textColor||c.textColor,classNames:c.classNames.concat(r.classNames)}}const fue={id:String,defaultAllDay:Boolean,url:String,format:String,events:Zt,eventDataTransform:Zt,success:Zt,failure:Zt};function gee(c,r,a=pee(r)){let l;if(typeof c=="string"?l={url:c}:typeof c=="function"||Array.isArray(c)?l={events:c}:typeof c=="object"&&c&&(l=c),l){let{refined:i,extra:m}=x$(l,a),v=mue(i,r);if(v)return{_raw:c,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:H2(),sourceDefId:v.sourceDefId,meta:v.meta,ui:gO(i,r),extendedProps:m}}return null}function pee(c){return Object.assign(Object.assign(Object.assign({},hO),fue),c.pluginHooks.eventSourceRefiners)}function mue(c,r){let a=r.pluginHooks.eventSourceDefs;for(let l=a.length-1;l>=0;l-=1){let m=a[l].parseMeta(c);if(m)return{sourceDefId:l,meta:m}}return null}function hue(c,r,a,l,i){switch(r.type){case"RECEIVE_EVENTS":return gue(c,a[r.sourceId],r.fetchId,r.fetchRange,r.rawEvents,i);case"RESET_RAW_EVENTS":return pue(c,a[r.sourceId],r.rawEvents,l.activeRange,i);case"ADD_EVENTS":return vue(c,r.eventStore,l?l.activeRange:null,i);case"RESET_EVENTS":return r.eventStore;case"MERGE_EVENTS":return $$(c,r.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return l?q2(c,l.activeRange,i):c;case"REMOVE_EVENTS":return lue(c,r.eventStore);case"REMOVE_EVENT_SOURCE":return Cee(c,r.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return mO(c,m=>!m.sourceId);case"REMOVE_ALL_EVENTS":return im();default:return c}}function gue(c,r,a,l,i,m){if(r&&a===r.latestFetchId){let v=dA(vee(i,r,m),r,m);return l&&(v=q2(v,l,m)),$$(Cee(c,r.sourceId),v)}return c}function pue(c,r,a,l,i){const{defIdMap:m,instanceIdMap:v}=bue(c);let C=dA(vee(a,r,i),r,i,!1,m,v);return q2(C,l,i)}function vee(c,r,a){let l=a.options.eventDataTransform,i=r?r.eventDataTransform:null;return i&&(c=yee(c,i)),l&&(c=yee(c,l)),c}function yee(c,r){let a;if(!r)a=c;else{a=[];for(let l of c){let i=r(l);i?a.push(i):i==null&&a.push(l)}}return a}function vue(c,r,a,l){return a&&(r=q2(r,a,l)),$$(c,r)}function bee(c,r,a){let{defs:l}=c,i=Z1(c.instances,m=>l[m.defId].allDay?m:Object.assign(Object.assign({},m),{range:{start:a.createMarker(r.toDate(m.range.start,m.forcedStartTzo)),end:a.createMarker(r.toDate(m.range.end,m.forcedEndTzo))},forcedStartTzo:a.canComputeOffset?null:m.forcedStartTzo,forcedEndTzo:a.canComputeOffset?null:m.forcedEndTzo}));return{defs:l,instances:i}}function Cee(c,r){return mO(c,a=>a.sourceId!==r)}function yue(c,r){return{defs:c.defs,instances:j2(c.instances,a=>!r[a.instanceId])}}function bue(c){const{defs:r,instances:a}=c,l={},i={};for(let m in r){const v=r[m],{publicId:C}=v;C&&(l[C]=m)}for(let m in a){const v=a[m],C=r[v.defId],{publicId:E}=C;E&&(i[E]=m)}return{defIdMap:l,instanceIdMap:i}}class pO{constructor(){this.handlers={},this.thisContext=null}setThisContext(r){this.thisContext=r}setOptions(r){this.options=r}on(r,a){Cue(this.handlers,r,a)}off(r,a){_ue(this.handlers,r,a)}trigger(r,...a){let l=this.handlers[r]||[],i=this.options&&this.options[r],m=[].concat(i||[],l);for(let v of m)v.apply(this.thisContext,a)}hasHandlers(r){return!!(this.handlers[r]&&this.handlers[r].length||this.options&&this.options[r])}}function Cue(c,r,a){(c[r]||(c[r]=[])).push(a)}function _ue(c,r,a){a?c[r]&&(c[r]=c[r].filter(l=>l!==a)):delete c[r]}const wue={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Sue(c,r){return dA(Eue(c),null,r)}function Eue(c){let r;return c===!0?r=[{}]:Array.isArray(c)?r=c.filter(a=>a.daysOfWeek):typeof c=="object"&&c?r=[c]:r=[],r=r.map(a=>Object.assign(Object.assign({},wue),a)),r}function _ee(c,r,a){a.emitter.trigger("select",Object.assign(Object.assign({},V$(c,a)),{jsEvent:r?r.origEvent:null,view:a.viewApi||a.calendarApi.view}))}function kue(c,r){r.emitter.trigger("unselect",{jsEvent:c?c.origEvent:null,view:r.viewApi||r.calendarApi.view})}function V$(c,r){let a={};for(let l of r.pluginHooks.dateSpanTransforms)Object.assign(a,l(c,r));return Object.assign(a,$ue(c,r.dateEnv)),a}function wee(c,r,a){let{dateEnv:l,options:i}=a,m=r;return c?(m=Oa(m),m=l.add(m,i.defaultAllDayEventDuration)):m=l.add(m,i.defaultTimedEventDuration),m}function H$(c,r,a,l){let i=vO(c.defs,r),m=im();for(let v in c.defs){let C=c.defs[v];m.defs[v]=xue(C,i[v],a,l)}for(let v in c.instances){let C=c.instances[v],E=m.defs[C.defId];m.instances[v]=Aue(C,E,i[C.defId],a,l)}return m}function xue(c,r,a,l){let i=a.standardProps||{};i.hasEnd==null&&r.durationEditable&&(a.startDelta||a.endDelta)&&(i.hasEnd=!0);let m=Object.assign(Object.assign(Object.assign({},c),i),{ui:Object.assign(Object.assign({},c.ui),i.ui)});a.extendedProps&&(m.extendedProps=Object.assign(Object.assign({},m.extendedProps),a.extendedProps));for(let v of l.pluginHooks.eventDefMutationAppliers)v(m,a,l);return!m.hasEnd&&l.options.forceEventDuration&&(m.hasEnd=!0),m}function Aue(c,r,a,l,i){let{dateEnv:m}=i,v=l.standardProps&&l.standardProps.allDay===!0,C=l.standardProps&&l.standardProps.hasEnd===!1,E=Object.assign({},c);return v&&(E.range=aee(E.range)),l.datesDelta&&a.startEditable&&(E.range={start:m.add(E.range.start,l.datesDelta),end:m.add(E.range.end,l.datesDelta)}),l.startDelta&&a.durationEditable&&(E.range={start:m.add(E.range.start,l.startDelta),end:E.range.end}),l.endDelta&&a.durationEditable&&(E.range={start:E.range.start,end:m.add(E.range.end,l.endDelta)}),C&&(E.range={start:E.range.start,end:wee(r.allDay,E.range.start,i)}),r.allDay&&(E.range={start:Oa(E.range.start),end:Oa(E.range.end)}),E.range.end<E.range.start&&(E.range.end=wee(r.allDay,E.range.start,i)),E}class VS{constructor(r,a){this.context=r,this.internalEventSource=a}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class fl{constructor(r,a,l){this._context=r,this._def=a,this._instance=l||null}setProp(r,a){if(r in uee)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(r==="id")a=fO[r](a),this.mutate({standardProps:{publicId:a}});else if(r in fO)a=fO[r](a),this.mutate({standardProps:{[r]:a}});else if(r in hO){let l=hO[r](a);r==="color"?l={backgroundColor:a,borderColor:a}:r==="editable"?l={startEditable:a,durationEditable:a}:l={[r]:a},this.mutate({standardProps:{ui:l}})}else console.warn(`Could not set prop '${r}'. Use setExtendedProp instead.`)}setExtendedProp(r,a){this.mutate({extendedProps:{[r]:a}})}setStart(r,a={}){let{dateEnv:l}=this._context,i=l.createMarker(r);if(i&&this._instance){let m=this._instance.range,v=$S(m.start,i,l,a.granularity);a.maintainDuration?this.mutate({datesDelta:v}):this.mutate({startDelta:v})}}setEnd(r,a={}){let{dateEnv:l}=this._context,i;if(!(r!=null&&(i=l.createMarker(r),!i))&&this._instance)if(i){let m=$S(this._instance.range.end,i,l,a.granularity);this.mutate({endDelta:m})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(r,a,l={}){let{dateEnv:i}=this._context,m={allDay:l.allDay},v=i.createMarker(r),C;if(v&&!(a!=null&&(C=i.createMarker(a),!C))&&this._instance){let E=this._instance.range;l.allDay===!0&&(E=aee(E));let T=$S(E.start,v,i,l.granularity);if(C){let N=$S(E.end,C,i,l.granularity);Xle(T,N)?this.mutate({datesDelta:T,standardProps:m}):this.mutate({startDelta:T,endDelta:N,standardProps:m})}else m.hasEnd=!1,this.mutate({datesDelta:T,standardProps:m})}}moveStart(r){let a=ni(r);a&&this.mutate({startDelta:a})}moveEnd(r){let a=ni(r);a&&this.mutate({endDelta:a})}moveDates(r){let a=ni(r);a&&this.mutate({datesDelta:a})}setAllDay(r,a={}){let l={allDay:r},{maintainDuration:i}=a;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==r&&(l.hasEnd=i),this.mutate({standardProps:l})}formatRange(r){let{dateEnv:a}=this._context,l=this._instance,i=El(r);return this._def.hasEnd?a.formatRange(l.range.start,l.range.end,i,{forcedStartTzo:l.forcedStartTzo,forcedEndTzo:l.forcedEndTzo}):a.format(l.range.start,i,{forcedTzo:l.forcedStartTzo})}mutate(r){let a=this._instance;if(a){let l=this._def,i=this._context,{eventStore:m}=i.getCurrentData(),v=F$(m,a.instanceId);v=H$(v,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},r,i);let E=new fl(i,l,a);this._def=v.defs[l.defId],this._instance=v.instances[a.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:v}),i.emitter.trigger("eventChange",{oldEvent:E,event:this,relatedEvents:K2(v,i,a),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:m})}})}}remove(){let r=this._context,a=See(this);r.dispatch({type:"REMOVE_EVENTS",eventStore:a}),r.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){r.dispatch({type:"MERGE_EVENTS",eventStore:a})}})}get source(){let{sourceId:r}=this._def;return r?new VS(this._context,this._context.getCurrentData().eventSources[r]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let r=this._instance;return r?this._context.dateEnv.formatIso(r.range.start,{omitTime:this._def.allDay,forcedTzo:r.forcedStartTzo}):""}get endStr(){let r=this._instance;return r&&this._def.hasEnd?this._context.dateEnv.formatIso(r.range.end,{omitTime:this._def.allDay,forcedTzo:r.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(r={}){let a=this._def,{ui:l}=a,{startStr:i,endStr:m}=this,v={allDay:a.allDay};return a.title&&(v.title=a.title),i&&(v.start=i),m&&(v.end=m),a.publicId&&(v.id=a.publicId),a.groupId&&(v.groupId=a.groupId),a.url&&(v.url=a.url),l.display&&l.display!=="auto"&&(v.display=l.display),r.collapseColor&&l.backgroundColor&&l.backgroundColor===l.borderColor?v.color=l.backgroundColor:(l.backgroundColor&&(v.backgroundColor=l.backgroundColor),l.borderColor&&(v.borderColor=l.borderColor)),l.textColor&&(v.textColor=l.textColor),l.classNames.length&&(v.classNames=l.classNames),Object.keys(a.extendedProps).length&&(r.collapseExtendedProps?Object.assign(v,a.extendedProps):v.extendedProps=a.extendedProps),v}toJSON(){return this.toPlainObject()}}function See(c){let r=c._def,a=c._instance;return{defs:{[r.defId]:r},instances:a?{[a.instanceId]:a}:{}}}function K2(c,r,a){let{defs:l,instances:i}=c,m=[],v=a?a.instanceId:"";for(let C in i){let E=i[C],T=l[E.defId];E.instanceId!==v&&m.push(new fl(r,T,E))}return m}function Eee(c,r,a,l){let i={},m={},v={},C=[],E=[],T=vO(c.defs,r);for(let N in c.defs){let V=c.defs[N];T[V.defId].display==="inverse-background"&&(V.groupId?(i[V.groupId]=[],v[V.groupId]||(v[V.groupId]=V)):m[N]=[])}for(let N in c.instances){let V=c.instances[N],U=c.defs[V.defId],z=T[U.defId],W=V.range,K=!U.allDay&&l?lee(W,l):W,Z=Z2(K,a);Z&&(z.display==="inverse-background"?U.groupId?i[U.groupId].push(Z):m[V.defId].push(Z):z.display!=="none"&&(z.display==="background"?C:E).push({def:U,ui:z,instance:V,range:Z,isStart:K.start&&K.start.valueOf()===Z.start.valueOf(),isEnd:K.end&&K.end.valueOf()===Z.end.valueOf()}))}for(let N in i){let V=i[N],U=iee(V,a);for(let z of U){let W=v[N],K=T[W.defId];C.push({def:W,ui:K,instance:null,range:z,isStart:!1,isEnd:!1})}}for(let N in m){let V=m[N],U=iee(V,a);for(let z of U)C.push({def:c.defs[N],ui:T[N],instance:null,range:z,isStart:!1,isEnd:!1})}return{bg:C,fg:E}}function Tue(c){return c.ui.display==="background"||c.ui.display==="inverse-background"}function kee(c,r){c.fcSeg=r}function HS(c){return c.fcSeg||c.parentNode.fcSeg||null}function vO(c,r){return Z1(c,a=>xee(a,r))}function xee(c,r){let a=[];return r[""]&&a.push(r[""]),r[c.defId]&&a.push(r[c.defId]),a.push(c.ui),hee(a)}function Aee(c,r){let a=c.map(Due);return a.sort((l,i)=>Wle(l,i,r)),a.map(l=>l._seg)}function Due(c){let{eventRange:r}=c,a=r.def,l=r.instance?r.instance.range:r.range,i=l.start?l.start.valueOf():0,m=l.end?l.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},a.extendedProps),a),{id:a.publicId,start:i,end:m,duration:m-i,allDay:Number(a.allDay),_seg:c})}function Rue(c,r){let{pluginHooks:a}=r,l=a.isDraggableTransformers,{def:i,ui:m}=c.eventRange,v=m.startEditable;for(let C of l)v=C(v,i,m,r);return v}function Oue(c,r){return c.isStart&&c.eventRange.ui.durationEditable&&r.options.eventResizableFromStart}function Nue(c,r){return c.isEnd&&c.eventRange.ui.durationEditable}function Tee(c,r,a,l,i,m,v){let{dateEnv:C,options:E}=a,{displayEventTime:T,displayEventEnd:N}=E,V=c.eventRange.def,U=c.eventRange.instance;T==null&&(T=l!==!1),N==null&&(N=i!==!1);let z=U.range.start,W=U.range.end,K=m||c.start||c.eventRange.range.start,Z=v||c.end||c.eventRange.range.end,ce=Oa(z).valueOf()===Oa(K).valueOf(),q=Oa(ey(W,-1)).valueOf()===Oa(ey(Z,-1)).valueOf();return T&&!V.allDay&&(ce||q)?(K=ce?z:K,Z=q?W:Z,N&&V.hasEnd?C.formatRange(K,Z,r,{forcedStartTzo:m?null:U.forcedStartTzo,forcedEndTzo:v?null:U.forcedEndTzo}):C.format(K,r,{forcedTzo:m?null:U.forcedStartTzo})):""}function oy(c,r,a){let l=c.eventRange.range;return{isPast:l.end<=(a||r.start),isFuture:l.start>=(a||r.end),isToday:r&&Y1(r,l.start)}}function Iue(c){let r=["fc-event"];return c.isMirror&&r.push("fc-event-mirror"),c.isDraggable&&r.push("fc-event-draggable"),(c.isStartResizable||c.isEndResizable)&&r.push("fc-event-resizable"),c.isDragging&&r.push("fc-event-dragging"),c.isResizing&&r.push("fc-event-resizing"),c.isSelected&&r.push("fc-event-selected"),c.isStart&&r.push("fc-event-start"),c.isEnd&&r.push("fc-event-end"),c.isPast&&r.push("fc-event-past"),c.isToday&&r.push("fc-event-today"),c.isFuture&&r.push("fc-event-future"),r}function Dee(c){return c.instance?c.instance.instanceId:`${c.def.defId}:${c.range.start.toISOString()}`}function Ree(c,r){let{def:a,instance:l}=c.eventRange,{url:i}=a;if(i)return{href:i};let{emitter:m,options:v}=r,{eventInteractive:C}=v;return C==null&&(C=a.interactive,C==null&&(C=!!m.hasHandlers("eventClick"))),C?$J(E=>{m.trigger("eventClick",{el:E.target,event:new fl(r,a,l),jsEvent:E,view:r.viewApi})}):{}}const Bue={start:Zt,end:Zt,allDay:Boolean};function Mue(c,r,a){let l=Pue(c,r),{range:i}=l;if(!i.start)return null;if(!i.end){if(a==null)return null;i.end=r.add(i.start,a)}return l}function Pue(c,r){let{refined:a,extra:l}=x$(c,Bue),i=a.start?r.createMarkerMeta(a.start):null,m=a.end?r.createMarkerMeta(a.end):null,{allDay:v}=a;return v==null&&(v=i&&i.isTimeUnspecified&&(!m||m.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:m?m.marker:null},allDay:v},l)}function Lue(c,r){return Qce(c.range,r.range)&&c.allDay===r.allDay&&Fue(c,r)}function Fue(c,r){for(let a in r)if(a!=="range"&&a!=="allDay"&&c[a]!==r[a])return!1;for(let a in c)if(!(a in r))return!1;return!0}function $ue(c,r){return Object.assign(Object.assign({},Nee(c.range,r,c.allDay)),{allDay:c.allDay})}function Oee(c,r,a){return Object.assign(Object.assign({},Nee(c,r,a)),{timeZone:r.timeZone})}function Nee(c,r,a){return{start:r.toDate(c.start),end:r.toDate(c.end),startStr:r.formatIso(c.start,{omitTime:a}),endStr:r.formatIso(c.end,{omitTime:a})}}function Vue(c,r,a){let l=fee({editable:!1},a),i=P$(l.refined,l.extra,"",c.allDay,!0,a);return{def:i,ui:xee(i,r),instance:B$(i.defId,c.range),range:c.range,isStart:!0,isEnd:!0}}function Hue(c,r,a){let l=!1,i=function(C){l||(l=!0,r(C))},m=function(C){l||(l=!0,a(C))},v=c(i,m);v&&typeof v.then=="function"&&v.then(i,m)}class Iee extends Error{constructor(r,a){super(r),this.response=a}}function zue(c,r,a){c=c.toUpperCase();const l={method:c};return c==="GET"?r+=(r.indexOf("?")===-1?"?":"&")+new URLSearchParams(a):(l.body=new URLSearchParams(a),l.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(r,l).then(i=>{if(i.ok)return i.json().then(m=>[m,i],()=>{throw new Iee("Failure parsing JSON",i)});throw new Iee("Request failed",i)})}let z$;function Bee(){return z$==null&&(z$=Uue()),z$}function Uue(){if(typeof document>"u")return!0;let c=document.createElement("div");c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.innerHTML="<table><tr><td><div></div></td></tr></table>",c.querySelector("table").style.height="100px",c.querySelector("div").style.height="100%",document.body.appendChild(c);let a=c.querySelector("div").offsetHeight>0;return document.body.removeChild(c),a}class Wue extends Li{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{cO(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{cO(()=>{this.setState({forPrint:!1})})}}render(){let{props:r}=this,{options:a}=r,{forPrint:l}=this.state,i=l||a.height==="auto"||a.contentHeight==="auto",m=!i&&a.height!=null?a.height:"",v=["fc",l?"fc-media-print":"fc-media-screen",`fc-direction-${a.direction}`,r.theme.getClass("root")];return Bee()||v.push("fc-liquid-hack"),r.children(v,m,i,l)}componentDidMount(){let{emitter:r}=this.props;r.on("_beforeprint",this.handleBeforePrint),r.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:r}=this.props;r.off("_beforeprint",this.handleBeforePrint),r.off("_afterprint",this.handleAfterPrint)}}class zS{constructor(r){this.component=r.component,this.isHitComboAllowed=r.isHitComboAllowed||null}destroy(){}}function jue(c,r){return{component:c,el:r.el,useEventCenter:r.useEventCenter!=null?r.useEventCenter:!0,isHitComboAllowed:r.isHitComboAllowed||null}}function U$(c){return{[c.component.uid]:c}}const W$={};class Gue{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(r){this.currentDataManager.dispatch(r)}get view(){return this.getCurrentData().viewApi}batchRendering(r){r()}updateSize(){this.trigger("_resize",!0)}setOption(r,a){this.dispatch({type:"SET_OPTION",optionName:r,rawOptionValue:a})}getOption(r){return this.currentDataManager.currentCalendarOptionsInput[r]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(r,a){let{currentDataManager:l}=this;l.currentCalendarOptionsRefiners[r]?l.emitter.on(r,a):console.warn(`Unknown listener name '${r}'`)}off(r,a){this.currentDataManager.emitter.off(r,a)}trigger(r,...a){this.currentDataManager.emitter.trigger(r,...a)}changeView(r,a){this.batchRendering(()=>{if(this.unselect(),a)if(a.start&&a.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:a});else{let{dateEnv:l}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r,dateMarker:l.createMarker(a)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:r})})}zoomTo(r,a){let l=this.getCurrentData(),i;a=a||"day",i=l.viewSpecs[a]||this.getUnitViewSpec(a),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:r}):this.dispatch({type:"CHANGE_DATE",dateMarker:r})}getUnitViewSpec(r){let{viewSpecs:a,toolbarConfig:l}=this.getCurrentData(),i=[].concat(l.header?l.header.viewsWithButtons:[],l.footer?l.footer.viewsWithButtons:[]),m,v;for(let C in a)i.push(C);for(m=0;m<i.length;m+=1)if(v=a[i[m]],v&&v.singleUnit===r)return v;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.addYears(r.currentDate,-1)})}nextYear(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.addYears(r.currentDate,1)})}today(){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:uA(r.calendarOptions.now,r.dateEnv)})}gotoDate(r){let a=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:a.dateEnv.createMarker(r)})}incrementDate(r){let a=this.getCurrentData(),l=ni(r);l&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:a.dateEnv.add(a.currentDate,l)}))}getDate(){let r=this.getCurrentData();return r.dateEnv.toDate(r.currentDate)}formatDate(r,a){let{dateEnv:l}=this.getCurrentData();return l.format(l.createMarker(r),El(a))}formatRange(r,a,l){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(r),i.createMarker(a),El(l),l)}formatIso(r,a){let{dateEnv:l}=this.getCurrentData();return l.formatIso(l.createMarker(r),{omitTime:a})}select(r,a){let l;a==null?r.start!=null?l=r:l={start:r,end:null}:l={start:r,end:a};let i=this.getCurrentData(),m=Mue(l,i.dateEnv,ni({days:1}));m&&(this.dispatch({type:"SELECT_DATES",selection:m}),_ee(m,null,i))}unselect(r){let a=this.getCurrentData();a.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),kue(r,a))}addEvent(r,a){if(r instanceof fl){let v=r._def,C=r._instance;return this.getCurrentData().eventStore.defs[v.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:L$({def:v,instance:C})}),this.triggerEventAdd(r)),r}let l=this.getCurrentData(),i;if(a instanceof VS)i=a.internalEventSource;else if(typeof a=="boolean")a&&([i]=T$(l.eventSources));else if(a!=null){let v=this.getEventSourceById(a);if(!v)return console.warn(`Could not find an event source with ID "${a}"`),null;i=v.internalEventSource}let m=dee(r,i,l,!1);if(m){let v=new fl(l,m.def,m.def.recurringDef?null:m.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:L$(m)}),this.triggerEventAdd(v),v}return null}triggerEventAdd(r){let{emitter:a}=this.getCurrentData();a.trigger("eventAdd",{event:r,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:See(r)})}})}getEventById(r){let a=this.getCurrentData(),{defs:l,instances:i}=a.eventStore;r=String(r);for(let m in l){let v=l[m];if(v.publicId===r){if(v.recurringDef)return new fl(a,v,null);for(let C in i){let E=i[C];if(E.defId===v.defId)return new fl(a,v,E)}}}return null}getEvents(){let r=this.getCurrentData();return K2(r.eventStore,r)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let r=this.getCurrentData(),a=r.eventSources,l=[];for(let i in a)l.push(new VS(r,a[i]));return l}getEventSourceById(r){let a=this.getCurrentData(),l=a.eventSources;r=String(r);for(let i in l)if(l[i].publicId===r)return new VS(a,l[i]);return null}addEventSource(r){let a=this.getCurrentData();if(r instanceof VS)return a.eventSources[r.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r.internalEventSource]}),r;let l=gee(r,a);return l?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[l]}),new VS(a,l)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(r){let a=ni(r);a&&this.trigger("_scrollRequest",{time:a})}}function Zue(c,r){return c.left>=r.left&&c.left<r.right&&c.top>=r.top&&c.top<r.bottom}function Mee(c,r){let a={left:Math.max(c.left,r.left),right:Math.min(c.right,r.right),top:Math.max(c.top,r.top),bottom:Math.min(c.bottom,r.bottom)};return a.left<a.right&&a.top<a.bottom?a:!1}function que(c,r){return{left:Math.min(Math.max(c.left,r.left),r.right),top:Math.min(Math.max(c.top,r.top),r.bottom)}}function Kue(c){return{left:(c.left+c.right)/2,top:(c.top+c.bottom)/2}}function Yue(c,r){return{left:c.left-r.left,top:c.top-r.top}}const j$=im();class Xue{constructor(){this.getKeysForEventDefs=Ms(this._getKeysForEventDefs),this.splitDateSelection=Ms(this._splitDateSpan),this.splitEventStore=Ms(this._splitEventStore),this.splitIndividualUi=Ms(this._splitIndividualUi),this.splitEventDrag=Ms(this._splitInteraction),this.splitEventResize=Ms(this._splitInteraction),this.eventUiBuilders={}}splitProps(r){let a=this.getKeyInfo(r),l=this.getKeysForEventDefs(r.eventStore),i=this.splitDateSelection(r.dateSelection),m=this.splitIndividualUi(r.eventUiBases,l),v=this.splitEventStore(r.eventStore,l),C=this.splitEventDrag(r.eventDrag),E=this.splitEventResize(r.eventResize),T={};this.eventUiBuilders=Z1(a,(N,V)=>this.eventUiBuilders[V]||Ms(Que));for(let N in a){let V=a[N],U=v[N]||j$,z=this.eventUiBuilders[N];T[N]={businessHours:V.businessHours||r.businessHours,dateSelection:i[N]||null,eventStore:U,eventUiBases:z(r.eventUiBases[""],V.ui,m[N]),eventSelection:U.instances[r.eventSelection]?r.eventSelection:"",eventDrag:C[N]||null,eventResize:E[N]||null}}return T}_splitDateSpan(r){let a={};if(r){let l=this.getKeysForDateSpan(r);for(let i of l)a[i]=r}return a}_getKeysForEventDefs(r){return Z1(r.defs,a=>this.getKeysForEventDef(a))}_splitEventStore(r,a){let{defs:l,instances:i}=r,m={};for(let v in l)for(let C of a[v])m[C]||(m[C]=im()),m[C].defs[v]=l[v];for(let v in i){let C=i[v];for(let E of a[C.defId])m[E]&&(m[E].instances[v]=C)}return m}_splitIndividualUi(r,a){let l={};for(let i in r)if(i)for(let m of a[i])l[m]||(l[m]={}),l[m][i]=r[i];return l}_splitInteraction(r){let a={};if(r){let l=this._splitEventStore(r.affectedEvents,this._getKeysForEventDefs(r.affectedEvents)),i=this._getKeysForEventDefs(r.mutatedEvents),m=this._splitEventStore(r.mutatedEvents,i),v=C=>{a[C]||(a[C]={affectedEvents:l[C]||j$,mutatedEvents:m[C]||j$,isEvent:r.isEvent})};for(let C in l)v(C);for(let C in m)v(C)}return a}}function Que(c,r,a){let l=[];c&&l.push(c),r&&l.push(r);let i={"":hee(l)};return a&&Object.assign(i,a),i}function Pee(c,r,a,l){return{dow:c.getUTCDay(),isDisabled:!!(l&&!Y1(l.activeRange,c)),isOther:!!(l&&!Y1(l.currentRange,c)),isToday:!!(r&&Y1(r,c)),isPast:!!(a?c<a:r&&c<r.start),isFuture:!!(a?c>a:r&&c>=r.end)}}function G$(c,r){let a=["fc-day",`fc-day-${nce[c.dow]}`];return c.isDisabled?a.push("fc-day-disabled"):(c.isToday&&(a.push("fc-day-today"),a.push(r.getClass("today"))),c.isPast&&a.push("fc-day-past"),c.isFuture&&a.push("fc-day-future"),c.isOther&&a.push("fc-day-other")),a}const Jue=El({year:"numeric",month:"long",day:"numeric"}),ede=El({week:"long"});function yO(c,r,a="day",l=!0){const{dateEnv:i,options:m,calendarApi:v}=c;let C=i.format(r,a==="week"?ede:Jue);if(m.navLinks){let E=i.toDate(r);const T=N=>{let V=a==="day"?m.navLinkDayClick:a==="week"?m.navLinkWeekClick:null;typeof V=="function"?V.call(v,i.toDate(r),N):(typeof V=="string"&&(a=V),v.zoomTo(r,a))};return Object.assign({title:aA(m.navLinkHint,[C,E],C),"data-navlink":""},l?FJ(T):{onClick:T})}return{"aria-label":C}}let Z$=null;function tde(){return Z$===null&&(Z$=nde()),Z$}function nde(){let c=document.createElement("div");iA(c,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),c.innerHTML="<div></div>",document.body.appendChild(c);let a=c.firstChild.getBoundingClientRect().left>c.getBoundingClientRect().left;return p$(c),a}let q$;function ode(){return q$||(q$=sde()),q$}function sde(){let c=document.createElement("div");c.style.overflow="scroll",c.style.position="absolute",c.style.top="-9999px",c.style.left="-9999px",document.body.appendChild(c);let r=Lee(c);return document.body.removeChild(c),r}function Lee(c){return{x:c.offsetHeight-c.clientHeight,y:c.offsetWidth-c.clientWidth}}function rde(c,r=!1){let a=window.getComputedStyle(c),l=parseInt(a.borderLeftWidth,10)||0,i=parseInt(a.borderRightWidth,10)||0,m=parseInt(a.borderTopWidth,10)||0,v=parseInt(a.borderBottomWidth,10)||0,C=Lee(c),E=C.y-l-i,T=C.x-m-v,N={borderLeft:l,borderRight:i,borderTop:m,borderBottom:v,scrollbarBottom:T,scrollbarLeft:0,scrollbarRight:0};return tde()&&a.direction==="rtl"?N.scrollbarLeft=E:N.scrollbarRight=E,r&&(N.paddingLeft=parseInt(a.paddingLeft,10)||0,N.paddingRight=parseInt(a.paddingRight,10)||0,N.paddingTop=parseInt(a.paddingTop,10)||0,N.paddingBottom=parseInt(a.paddingBottom,10)||0),N}function ide(c,r=!1,a){let l=a?c.getBoundingClientRect():K$(c),i=rde(c,r),m={left:l.left+i.borderLeft+i.scrollbarLeft,right:l.right-i.borderRight-i.scrollbarRight,top:l.top+i.borderTop,bottom:l.bottom-i.borderBottom-i.scrollbarBottom};return r&&(m.left+=i.paddingLeft,m.right-=i.paddingRight,m.top+=i.paddingTop,m.bottom-=i.paddingBottom),m}function K$(c){let r=c.getBoundingClientRect();return{left:r.left+window.scrollX,top:r.top+window.scrollY,right:r.right+window.scrollX,bottom:r.bottom+window.scrollY}}function ade(c){let r=Fee(c),a=c.getBoundingClientRect();for(let l of r){let i=Mee(a,l.getBoundingClientRect());if(i)a=i;else return null}return a}function Fee(c){let r=[];for(;c instanceof HTMLElement;){let a=window.getComputedStyle(c);if(a.position==="fixed")break;/(auto|scroll)/.test(a.overflow+a.overflowY+a.overflowX)&&r.push(c),c=c.parentNode}return r}class US{constructor(r,a,l,i){this.els=a;let m=this.originClientRect=r.getBoundingClientRect();l&&this.buildElHorizontals(m.left),i&&this.buildElVerticals(m.top)}buildElHorizontals(r){let a=[],l=[];for(let i of this.els){let m=i.getBoundingClientRect();a.push(m.left-r),l.push(m.right-r)}this.lefts=a,this.rights=l}buildElVerticals(r){let a=[],l=[];for(let i of this.els){let m=i.getBoundingClientRect();a.push(m.top-r),l.push(m.bottom-r)}this.tops=a,this.bottoms=l}leftToIndex(r){let{lefts:a,rights:l}=this,i=a.length,m;for(m=0;m<i;m+=1)if(r>=a[m]&&r<l[m])return m}topToIndex(r){let{tops:a,bottoms:l}=this,i=a.length,m;for(m=0;m<i;m+=1)if(r>=a[m]&&r<l[m])return m}getWidth(r){return this.rights[r]-this.lefts[r]}getHeight(r){return this.bottoms[r]-this.tops[r]}similarTo(r){return bO(this.tops||[],r.tops||[])&&bO(this.bottoms||[],r.bottoms||[])&&bO(this.lefts||[],r.lefts||[])&&bO(this.rights||[],r.rights||[])}}function bO(c,r){const a=c.length;if(a!==r.length)return!1;for(let l=0;l<a;l++)if(Math.round(c[l])!==Math.round(r[l]))return!1;return!0}class Y${getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class lde extends Y${constructor(r){super(),this.el=r}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(r){this.el.scrollTop=r}setScrollLeft(r){this.el.scrollLeft=r}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class cde extends Y${getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(r){window.scroll(window.scrollX,r)}setScrollLeft(r){window.scroll(r,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class wp extends Li{constructor(){super(...arguments),this.uid=H2()}prepareHits(){}queryHit(r,a,l,i){return null}isValidSegDownEl(r){return!this.props.eventDrag&&!this.props.eventResize&&!td(r,".fc-event-mirror")}isValidDateDownEl(r){return!td(r,".fc-event:not(.fc-bg-event)")&&!td(r,".fc-more-link")&&!td(r,"a[data-navlink]")&&!td(r,".fc-popover")}}class $ee{constructor(r=a=>a.thickness||1){this.getEntryThickness=r,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(r){let a=[];for(let l of r)this.insertEntry(l,a);return a}insertEntry(r,a){let l=this.findInsertion(r);this.isInsertionValid(l,r)?this.insertEntryAt(r,l):this.handleInvalidInsertion(l,r,a)}isInsertionValid(r,a){return(this.maxCoord===-1||r.levelCoord+this.getEntryThickness(a)<=this.maxCoord)&&(this.maxStackCnt===-1||r.stackCnt<this.maxStackCnt)}handleInvalidInsertion(r,a,l){if(this.allowReslicing&&r.touchingEntry){const i=Object.assign(Object.assign({},a),{span:Q$(a.span,r.touchingEntry.span)});l.push(i),this.splitEntry(a,r.touchingEntry,l)}else l.push(a)}splitEntry(r,a,l){let i=r.span,m=a.span;i.start<m.start&&this.insertEntry({index:r.index,thickness:r.thickness,span:{start:i.start,end:m.start}},l),i.end>m.end&&this.insertEntry({index:r.index,thickness:r.thickness,span:{start:m.end,end:i.end}},l)}insertEntryAt(r,a){let{entriesByLevel:l,levelCoords:i}=this;a.lateral===-1?(J$(i,a.level,a.levelCoord),J$(l,a.level,[r])):J$(l[a.level],a.lateral,r),this.stackCnts[Y2(r)]=a.stackCnt}findInsertion(r){let{levelCoords:a,entriesByLevel:l,strictOrder:i,stackCnts:m}=this,v=a.length,C=0,E=-1,T=-1,N=null,V=0;for(let W=0;W<v;W+=1){const K=a[W];if(!i&&K>=C+this.getEntryThickness(r))break;let Z=l[W],ce,q=eV(Z,r.span.start,X$),X=q[0]+q[1];for(;(ce=Z[X])&&ce.span.start<r.span.end;){let Ce=K+this.getEntryThickness(ce);Ce>C&&(C=Ce,N=ce,E=W,T=X),Ce===C&&(V=Math.max(V,m[Y2(ce)]+1)),X+=1}}let U=0;if(N)for(U=E+1;U<v&&a[U]<C;)U+=1;let z=-1;return U<v&&a[U]===C&&(z=eV(l[U],r.span.end,X$)[0]),{touchingLevel:E,touchingLateral:T,touchingEntry:N,stackCnt:V,levelCoord:C,level:U,lateral:z}}toRects(){let{entriesByLevel:r,levelCoords:a}=this,l=r.length,i=[];for(let m=0;m<l;m+=1){let v=r[m],C=a[m];for(let E of v)i.push(Object.assign(Object.assign({},E),{thickness:this.getEntryThickness(E),levelCoord:C}))}return i}}function X$(c){return c.span.end}function Y2(c){return c.index+":"+c.span.start}function ude(c){let r=[];for(let a of c){let l=[],i={span:a.span,entries:[a]};for(let m of r)Q$(m.span,i.span)?i={entries:m.entries.concat(i.entries),span:dde(m.span,i.span)}:l.push(m);l.push(i),r=l}return r}function dde(c,r){return{start:Math.min(c.start,r.start),end:Math.max(c.end,r.end)}}function Q$(c,r){let a=Math.max(c.start,r.start),l=Math.min(c.end,r.end);return a<l?{start:a,end:l}:null}function J$(c,r,a){c.splice(r,0,a)}function eV(c,r,a){let l=0,i=c.length;if(!i||r<a(c[l]))return[0,0];if(r>a(c[i-1]))return[i,0];for(;l<i;){let m=Math.floor(l+(i-l)/2),v=a(c[m]);if(r<v)i=m;else if(r>v)l=m+1;else return[m,1]}return[l,0]}class fde{constructor(r,a){this.emitter=new pO}destroy(){}setMirrorIsVisible(r){}setMirrorNeedsRevert(r){}setAutoScrollEnabled(r){}}const tV={};function mde(c,r){return!c||r>10?El({weekday:"short"}):r>1?El({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):El({weekday:"long"})}const Vee="fc-col-header-cell";function Hee(c){return c.text}class hde extends Li{render(){let{dateEnv:r,options:a,theme:l,viewApi:i}=this.context,{props:m}=this,{date:v,dateProfile:C}=m,E=Pee(v,m.todayRange,null,C),T=[Vee].concat(G$(E,l)),N=r.format(v,m.dayHeaderFormat),V=!E.isDisabled&&m.colCnt>1?yO(this.context,v):{},U=Object.assign(Object.assign(Object.assign({date:r.toDate(v),view:i},m.extraRenderProps),{text:N}),E);return rt(rm,{elTag:"th",elClasses:T,elAttrs:Object.assign({role:"columnheader",colSpan:m.colSpan,"data-date":E.isDisabled?void 0:S$(v)},m.extraDataAttrs),renderProps:U,generatorName:"dayHeaderContent",customGenerator:a.dayHeaderContent,defaultGenerator:Hee,classNameGenerator:a.dayHeaderClassNames,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},z=>rt("div",{className:"fc-scrollgrid-sync-inner"},!E.isDisabled&&rt(z,{elTag:"a",elAttrs:V,elClasses:["fc-col-header-cell-cushion",m.isSticky&&"fc-sticky"]})))}}const gde=El({weekday:"long"});class pde extends Li{render(){let{props:r}=this,{dateEnv:a,theme:l,viewApi:i,options:m}=this.context,v=nd(new Date(2592e5),r.dow),C={dow:r.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},E=a.format(v,r.dayHeaderFormat),T=Object.assign(Object.assign(Object.assign(Object.assign({date:v},C),{view:i}),r.extraRenderProps),{text:E});return rt(rm,{elTag:"th",elClasses:[Vee,...G$(C,l),...r.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:r.colSpan},r.extraDataAttrs),renderProps:T,generatorName:"dayHeaderContent",customGenerator:m.dayHeaderContent,defaultGenerator:Hee,classNameGenerator:m.dayHeaderClassNames,didMount:m.dayHeaderDidMount,willUnmount:m.dayHeaderWillUnmount},N=>rt("div",{className:"fc-scrollgrid-sync-inner"},rt(N,{elTag:"a",elClasses:["fc-col-header-cell-cushion",r.isSticky&&"fc-sticky"],elAttrs:{"aria-label":a.format(v,gde)}})))}}class fA extends sm{constructor(r,a){super(r,a),this.initialNowDate=uA(a.options.now,a.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:r,state:a}=this;return r.children(a.nowDate,a.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(r){r.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:r,context:a}=this,l=ey(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=a.dateEnv.startOf(l,r.unit),m=a.dateEnv.add(i,ni(1,r.unit)),v=m.valueOf()-l.valueOf();return v=Math.min(1e3*60*60*24,v),{currentState:{nowDate:i,todayRange:zee(i)},nextState:{nowDate:m,todayRange:zee(m)},waitMs:v}}setTimeout(){let{nextState:r,waitMs:a}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(r,()=>{this.setTimeout()})},a)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}fA.contextType=q1;function zee(c){let r=Oa(c),a=nd(r,1);return{start:r,end:a}}class Uee extends Li{constructor(){super(...arguments),this.createDayHeaderFormatter=Ms(vde)}render(){let{context:r}=this,{dates:a,dateProfile:l,datesRepDistinctDays:i,renderIntro:m}=this.props,v=this.createDayHeaderFormatter(r.options.dayHeaderFormat,i,a.length);return rt(fA,{unit:"day"},(C,E)=>rt("tr",{role:"row"},m&&m("day"),a.map(T=>i?rt(hde,{key:T.toISOString(),date:T,dateProfile:l,todayRange:E,colCnt:a.length,dayHeaderFormat:v}):rt(pde,{key:T.getUTCDay(),dow:T.getUTCDay(),dayHeaderFormat:v}))))}}function vde(c,r,a){return c||mde(r,a)}class Wee{constructor(r,a){let l=r.start,{end:i}=r,m=[],v=[],C=-1;for(;l<i;)a.isHiddenDay(l)?m.push(C+.5):(C+=1,m.push(C),v.push(l)),l=nd(l,1);this.dates=v,this.indices=m,this.cnt=v.length}sliceRange(r){let a=this.getDateDayIndex(r.start),l=this.getDateDayIndex(nd(r.end,-1)),i=Math.max(0,a),m=Math.min(this.cnt-1,l);return i=Math.ceil(i),m=Math.floor(m),i<=m?{firstIndex:i,lastIndex:m,isStart:a===i,isEnd:l===m}:null}getDateDayIndex(r){let{indices:a}=this,l=Math.floor(z2(this.dates[0],r));return l<0?a[0]-1:l>=a.length?a[a.length-1]+1:a[l]}}class jee{constructor(r,a){let{dates:l}=r,i,m,v;if(a){for(m=l[0].getUTCDay(),i=1;i<l.length&&l[i].getUTCDay()!==m;i+=1);v=Math.ceil(l.length/i)}else v=1,i=l.length;this.rowCnt=v,this.colCnt=i,this.daySeries=r,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let r=[];for(let a=0;a<this.rowCnt;a+=1){let l=[];for(let i=0;i<this.colCnt;i+=1)l.push(this.buildCell(a,i));r.push(l)}return r}buildCell(r,a){let l=this.daySeries.dates[r*this.colCnt+a];return{key:l.toISOString(),date:l}}buildHeaderDates(){let r=[];for(let a=0;a<this.colCnt;a+=1)r.push(this.cells[0][a].date);return r}sliceRange(r){let{colCnt:a}=this,l=this.daySeries.sliceRange(r),i=[];if(l){let{firstIndex:m,lastIndex:v}=l,C=m;for(;C<=v;){let E=Math.floor(C/a),T=Math.min((E+1)*a,v+1);i.push({row:E,firstCol:C%a,lastCol:(T-1)%a,isStart:l.isStart&&C===m,isEnd:l.isEnd&&T-1===v}),C=T}}return i}}class Gee{constructor(){this.sliceBusinessHours=Ms(this._sliceBusinessHours),this.sliceDateSelection=Ms(this._sliceDateSpan),this.sliceEventStore=Ms(this._sliceEventStore),this.sliceEventDrag=Ms(this._sliceInteraction),this.sliceEventResize=Ms(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(r,a,l,i,...m){let{eventUiBases:v}=r,C=this.sliceEventStore(r.eventStore,v,a,l,...m);return{dateSelectionSegs:this.sliceDateSelection(r.dateSelection,a,l,v,i,...m),businessHourSegs:this.sliceBusinessHours(r.businessHours,a,l,i,...m),fgEventSegs:C.fg,bgEventSegs:C.bg,eventDrag:this.sliceEventDrag(r.eventDrag,v,a,l,...m),eventResize:this.sliceEventResize(r.eventResize,v,a,l,...m),eventSelection:r.eventSelection}}sliceNowDate(r,a,l,i,...m){return this._sliceDateSpan({range:{start:r,end:ey(r,1)},allDay:!1},a,l,{},i,...m)}_sliceBusinessHours(r,a,l,i,...m){return r?this._sliceEventStore(q2(r,CO(a,!!l),i),{},a,l,...m).bg:[]}_sliceEventStore(r,a,l,i,...m){if(r){let v=Eee(r,a,CO(l,!!i),i);return{bg:this.sliceEventRanges(v.bg,m),fg:this.sliceEventRanges(v.fg,m)}}return{bg:[],fg:[]}}_sliceInteraction(r,a,l,i,...m){if(!r)return null;let v=Eee(r.mutatedEvents,a,CO(l,!!i),i);return{segs:this.sliceEventRanges(v.fg,m),affectedInstances:r.affectedEvents.instances,isEvent:r.isEvent}}_sliceDateSpan(r,a,l,i,m,...v){if(!r)return[];let C=CO(a,!!l),E=Z2(r.range,C);if(E){r=Object.assign(Object.assign({},r),{range:E});let T=Vue(r,i,m),N=this.sliceRange(r.range,...v);for(let V of N)V.eventRange=T;return N}return[]}sliceEventRanges(r,a){let l=[];for(let i of r)l.push(...this.sliceEventRange(i,a));return l}sliceEventRange(r,a){let l=r.range;this.forceDayIfListItem&&r.ui.display==="list-item"&&(l={start:l.start,end:nd(l.start,1)});let i=this.sliceRange(l,...a);for(let m of i)m.eventRange=r,m.isStart=r.isStart&&m.isStart,m.isEnd=r.isEnd&&m.isEnd;return i}}function CO(c,r){let a=c.activeRange;return r?a:{start:ey(a.start,c.slotMinTime.milliseconds),end:ey(a.end,c.slotMaxTime.milliseconds-864e5)}}function Zee(c,r,a){let{instances:l}=c.mutatedEvents;for(let i in l)if(!dO(r.validRange,l[i].range))return!1;return qee({eventDrag:c},a)}function yde(c,r,a){return dO(r.validRange,c.range)?qee({dateSelection:c},a):!1}function qee(c,r){let a=r.getCurrentData(),l=Object.assign({businessHours:a.businessHours,dateSelection:"",eventStore:a.eventStore,eventUiBases:a.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},c);return(r.pluginHooks.isPropsValid||bde)(l,r)}function bde(c,r,a={},l){return!(c.eventDrag&&!Cde(c,r,a,l)||c.dateSelection&&!_de(c,r,a,l))}function Cde(c,r,a,l){let i=r.getCurrentData(),m=c.eventDrag,v=m.mutatedEvents,C=v.defs,E=v.instances,T=vO(C,m.isEvent?c.eventUiBases:{"":i.selectionConfig});l&&(T=Z1(T,l));let N=yue(c.eventStore,m.affectedEvents.instances),V=N.defs,U=N.instances,z=vO(V,c.eventUiBases);for(let W in E){let K=E[W],Z=K.range,ce=T[K.defId],q=C[K.defId];if(!Kee(ce.constraints,Z,N,c.businessHours,r))return!1;let{eventOverlap:X}=r.options,Ce=typeof X=="function"?X:null;for(let Ne in U){let ee=U[Ne];if(I$(Z,ee.range)&&(z[ee.defId].overlap===!1&&m.isEvent||ce.overlap===!1||Ce&&!Ce(new fl(r,V[ee.defId],ee),new fl(r,q,K))))return!1}let st=i.eventStore;for(let Ne of ce.allows){let ee=Object.assign(Object.assign({},a),{range:K.range,allDay:q.allDay}),xe=st.defs[q.defId],et=st.instances[W],tt;if(xe?tt=new fl(r,xe,et):tt=new fl(r,q),!Ne(V$(ee,r),tt))return!1}}return!0}function _de(c,r,a,l){let i=c.eventStore,m=i.defs,v=i.instances,C=c.dateSelection,E=C.range,{selectionConfig:T}=r.getCurrentData();if(l&&(T=l(T)),!Kee(T.constraints,E,i,c.businessHours,r))return!1;let{selectOverlap:N}=r.options,V=typeof N=="function"?N:null;for(let U in v){let z=v[U];if(I$(E,z.range)&&(T.overlap===!1||V&&!V(new fl(r,m[z.defId],z),null)))return!1}for(let U of T.allows){let z=Object.assign(Object.assign({},a),C);if(!U(V$(z,r),null))return!1}return!0}function Kee(c,r,a,l,i){for(let m of c)if(!Sde(wde(m,r,a,l,i),r))return!1;return!0}function wde(c,r,a,l,i){return c==="businessHours"?nV(q2(l,r,i)):typeof c=="string"?nV(mO(a,m=>m.groupId===c)):typeof c=="object"&&c?nV(q2(c,r,i)):[]}function nV(c){let{instances:r}=c,a=[];for(let l in r)a.push(r[l].range);return a}function Sde(c,r){for(let a of c)if(dO(a,r))return!0;return!1}const _O=/^(visible|hidden)$/;class Ede extends Li{constructor(){super(...arguments),this.handleEl=r=>{this.el=r,K1(this.props.elRef,r)}}render(){let{props:r}=this,{liquid:a,liquidIsAbsolute:l}=r,i=a&&l,m=["fc-scroller"];return a&&(l?m.push("fc-scroller-liquid-absolute"):m.push("fc-scroller-liquid")),rt("div",{ref:this.handleEl,className:m.join(" "),style:{overflowX:r.overflowX,overflowY:r.overflowY,left:i&&-(r.overcomeLeft||0)||"",right:i&&-(r.overcomeRight||0)||"",bottom:i&&-(r.overcomeBottom||0)||"",marginLeft:!i&&-(r.overcomeLeft||0)||"",marginRight:!i&&-(r.overcomeRight||0)||"",marginBottom:!i&&-(r.overcomeBottom||0)||"",maxHeight:r.maxHeight||""}},r.children)}needsXScrolling(){if(_O.test(this.props.overflowX))return!1;let{el:r}=this,a=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:l}=r;for(let i=0;i<l.length;i+=1)if(l[i].getBoundingClientRect().width>a)return!0;return!1}needsYScrolling(){if(_O.test(this.props.overflowY))return!1;let{el:r}=this,a=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:l}=r;for(let i=0;i<l.length;i+=1)if(l[i].getBoundingClientRect().height>a)return!0;return!1}getXScrollbarWidth(){return _O.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return _O.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class X1{constructor(r){this.masterCallback=r,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(a,l)=>{let{depths:i,currentMap:m}=this,v=!1,C=!1;a!==null?(v=l in m,m[l]=a,i[l]=(i[l]||0)+1,C=!0):(i[l]-=1,i[l]||(delete m[l],delete this.callbackMap[l],v=!0)),this.masterCallback&&(v&&this.masterCallback(null,String(l)),C&&this.masterCallback(a,String(l)))}}createRef(r){let a=this.callbackMap[r];return a||(a=this.callbackMap[r]=l=>{this.handleValue(l,String(r))}),a}collect(r,a,l){return Mce(this.currentMap,r,a,l)}getAll(){return T$(this.currentMap)}}function kde(c){let r=Ble(c,".fc-scrollgrid-shrink"),a=0;for(let l of r)a=Math.max(a,qle(l));return Math.ceil(a)}function Yee(c,r){return c.liquid&&r.liquid}function xde(c,r){return r.maxHeight!=null||Yee(c,r)}function Ade(c,r,a,l){let{expandRows:i}=a;return typeof r.content=="function"?r.content(a):rt("table",{role:"presentation",className:[r.tableClassName,c.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:a.tableMinWidth,width:a.clientWidth,height:i?a.clientHeight:""}},a.tableColGroupNode,rt(l?"thead":"tbody",{role:"presentation"},typeof r.rowContent=="function"?r.rowContent(a):r.rowContent))}function Tde(c,r){return Jv(c,r,_p)}function Dde(c,r){let a=[];for(let l of c){let i=l.span||1;for(let m=0;m<i;m+=1)a.push(rt("col",{style:{width:l.width==="shrink"?Rde(r):l.width||"",minWidth:l.minWidth||""}}))}return rt("colgroup",{},...a)}function Rde(c){return c??4}function Ode(c){for(let r of c)if(r.width==="shrink")return!0;return!1}function Nde(c,r){let a=["fc-scrollgrid",r.theme.getClass("table")];return c&&a.push("fc-scrollgrid-liquid"),a}function Ide(c,r){let a=["fc-scrollgrid-section",`fc-scrollgrid-section-${c.type}`,c.className];return r&&c.liquid&&c.maxHeight==null&&a.push("fc-scrollgrid-section-liquid"),c.isSticky&&a.push("fc-scrollgrid-section-sticky"),a}function oV(c){return rt("div",{className:"fc-scrollgrid-sticky-shim",style:{width:c.clientWidth,minWidth:c.tableMinWidth}})}function wO(c){let{stickyHeaderDates:r}=c;return(r==null||r==="auto")&&(r=c.height==="auto"||c.viewHeight==="auto"),r}function Xee(c){let{stickyFooterScrollbar:r}=c;return(r==null||r==="auto")&&(r=c.height==="auto"||c.viewHeight==="auto"),r}class sV extends Li{constructor(){super(...arguments),this.processCols=Ms(r=>r,Tde),this.renderMicroColGroup=Ms(Dde),this.scrollerRefs=new X1,this.scrollerElRefs=new X1(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:r,state:a,context:l}=this,i=r.sections||[],m=this.processCols(r.cols),v=this.renderMicroColGroup(m,a.shrinkWidth),C=Nde(r.liquid,l);r.collapsibleWidth&&C.push("fc-scrollgrid-collapsible");let E=i.length,T=0,N,V=[],U=[],z=[];for(;T<E&&(N=i[T]).type==="header";)V.push(this.renderSection(N,v,!0)),T+=1;for(;T<E&&(N=i[T]).type==="body";)U.push(this.renderSection(N,v,!1)),T+=1;for(;T<E&&(N=i[T]).type==="footer";)z.push(this.renderSection(N,v,!0)),T+=1;let W=!Bee();const K={role:"rowgroup"};return rt("table",{role:"grid",className:C.join(" "),style:{height:r.height}},!!(!W&&V.length)&&rt("thead",K,...V),!!(!W&&U.length)&&rt("tbody",K,...U),!!(!W&&z.length)&&rt("tfoot",K,...z),W&&rt("tbody",K,...V,...U,...z))}renderSection(r,a,l){return"outerContent"in r?rt(Ya,{key:r.key},r.outerContent):rt("tr",{key:r.key,role:"presentation",className:Ide(r,this.props.liquid).join(" ")},this.renderChunkTd(r,a,r.chunk,l))}renderChunkTd(r,a,l,i){if("outerContent"in l)return l.outerContent;let{props:m}=this,{forceYScrollbars:v,scrollerClientWidths:C,scrollerClientHeights:E}=this.state,T=xde(m,r),N=Yee(m,r),V=m.liquid?v?"scroll":T?"auto":"hidden":"visible",U=r.key,z=Ade(r,l,{tableColGroupNode:a,tableMinWidth:"",clientWidth:!m.collapsibleWidth&&C[U]!==void 0?C[U]:null,clientHeight:E[U]!==void 0?E[U]:null,expandRows:r.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return rt(i?"th":"td",{ref:l.elRef,role:"presentation"},rt("div",{className:`fc-scroller-harness${N?" fc-scroller-harness-liquid":""}`},rt(Ede,{ref:this.scrollerRefs.createRef(U),elRef:this.scrollerElRefs.createRef(U),overflowY:V,overflowX:m.liquid?"hidden":"visible",maxHeight:r.maxHeight,liquid:N,liquidIsAbsolute:!0},z)))}_handleScrollerEl(r,a){let l=Bde(this.props.sections,a);l&&K1(l.chunk.scrollerElRef,r)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return Ode(this.props.cols)?kde(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let r=ode(),{scrollerRefs:a,scrollerElRefs:l}=this,i=!1,m={},v={};for(let C in a.currentMap){let E=a.currentMap[C];if(E&&E.needsYScrolling()){i=!0;break}}for(let C of this.props.sections){let E=C.key,T=l.currentMap[E];if(T){let N=T.parentNode;m[E]=Math.floor(N.getBoundingClientRect().width-(i?r.y:0)),v[E]=Math.floor(N.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:m,scrollerClientHeights:v}}}sV.addStateEquality({scrollerClientWidths:_p,scrollerClientHeights:_p});function Bde(c,r){for(let a of c)if(a.key===r)return a;return null}class rV extends Li{constructor(){super(...arguments),this.handleEl=r=>{this.el=r,r&&kee(r,this.props.seg)}}render(){const{props:r,context:a}=this,{options:l}=a,{seg:i}=r,{eventRange:m}=i,{ui:v}=m,C={event:new fl(a,m.def,m.instance),view:a.viewApi,timeText:r.timeText,textColor:v.textColor,backgroundColor:v.backgroundColor,borderColor:v.borderColor,isDraggable:!r.disableDragging&&Rue(i,a),isStartResizable:!r.disableResizing&&Oue(i,a),isEndResizable:!r.disableResizing&&Nue(i),isMirror:!!(r.isDragging||r.isResizing||r.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!r.isPast,isFuture:!!r.isFuture,isToday:!!r.isToday,isSelected:!!r.isSelected,isDragging:!!r.isDragging,isResizing:!!r.isResizing};return rt(rm,Object.assign({},r,{elRef:this.handleEl,elClasses:[...Iue(C),...i.eventRange.ui.classNames,...r.elClasses||[]],renderProps:C,generatorName:"eventContent",customGenerator:l.eventContent,defaultGenerator:r.defaultGenerator,classNameGenerator:l.eventClassNames,didMount:l.eventDidMount,willUnmount:l.eventWillUnmount}))}componentDidUpdate(r){this.el&&this.props.seg!==r.seg&&kee(this.el,this.props.seg)}}class Qee extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{seg:i}=r,{ui:m}=i.eventRange,v=l.eventTimeFormat||r.defaultTimeFormat,C=Tee(i,v,a,r.defaultDisplayEventTime,r.defaultDisplayEventEnd);return rt(rV,Object.assign({},r,{elTag:"a",elStyle:{borderColor:m.borderColor,backgroundColor:m.backgroundColor},elAttrs:Ree(i,a),defaultGenerator:Mde,timeText:C}),(E,T)=>rt(Ya,null,rt(E,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:T.textColor}}),!!T.isStartResizable&&rt("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!T.isEndResizable&&rt("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}function Mde(c){return rt("div",{className:"fc-event-main-frame"},c.timeText&&rt("div",{className:"fc-event-time"},c.timeText),rt("div",{className:"fc-event-title-container"},rt("div",{className:"fc-event-title fc-sticky"},c.event.title||rt(Ya,null," "))))}const iV=c=>rt(q1.Consumer,null,r=>{let{options:a}=r,l={isAxis:c.isAxis,date:r.dateEnv.toDate(c.date),view:r.viewApi};return rt(rm,Object.assign({},c,{elTag:c.elTag||"div",renderProps:l,generatorName:"nowIndicatorContent",customGenerator:a.nowIndicatorContent,classNameGenerator:a.nowIndicatorClassNames,didMount:a.nowIndicatorDidMount,willUnmount:a.nowIndicatorWillUnmount}))}),Pde=El({day:"numeric"});class aV extends Li{constructor(){super(...arguments),this.refineRenderProps=oO(Lde)}render(){let{props:r,context:a}=this,{options:l}=a,i=this.refineRenderProps({date:r.date,dateProfile:r.dateProfile,todayRange:r.todayRange,isMonthStart:r.isMonthStart||!1,showDayNumber:r.showDayNumber,extraRenderProps:r.extraRenderProps,viewApi:a.viewApi,dateEnv:a.dateEnv,monthStartFormat:l.monthStartFormat});return rt(rm,Object.assign({},r,{elClasses:[...G$(i,a.theme),...r.elClasses||[]],elAttrs:Object.assign(Object.assign({},r.elAttrs),i.isDisabled?{}:{"data-date":S$(r.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:l.dayCellContent,defaultGenerator:r.defaultGenerator,classNameGenerator:i.isDisabled?void 0:l.dayCellClassNames,didMount:l.dayCellDidMount,willUnmount:l.dayCellWillUnmount}))}}function lV(c){return!!(c.dayCellContent||N$("dayCellContent",c))}function Lde(c){let{date:r,dateEnv:a,dateProfile:l,isMonthStart:i}=c,m=Pee(r,c.todayRange,null,l),v=c.showDayNumber?a.format(r,i?c.monthStartFormat:Pde):"";return Object.assign(Object.assign(Object.assign({date:a.toDate(r),view:c.viewApi},m),{isMonthStart:i,dayNumberText:v}),c.extraRenderProps)}class Jee extends Li{render(){let{props:r}=this,{seg:a}=r;return rt(rV,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:a.eventRange.ui.backgroundColor},defaultGenerator:Fde,seg:a,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:r.isPast,isFuture:r.isFuture,isToday:r.isToday,disableDragging:!0,disableResizing:!0})}}function Fde(c){let{title:r}=c.event;return r&&rt("div",{className:"fc-event-title"},c.event.title)}function ete(c){return rt("div",{className:`fc-${c}`})}const tte=c=>rt(q1.Consumer,null,r=>{let{dateEnv:a,options:l}=r,{date:i}=c,m=l.weekNumberFormat||c.defaultFormat,v=a.computeWeekNumber(i),C=a.format(i,m);return rt(rm,Object.assign({},c,{renderProps:{num:v,text:C,date:i},generatorName:"weekNumberContent",customGenerator:l.weekNumberContent,defaultGenerator:$de,classNameGenerator:l.weekNumberClassNames,didMount:l.weekNumberDidMount,willUnmount:l.weekNumberWillUnmount}))});function $de(c){return c.text}const cV=10;class Vde extends Li{constructor(){super(...arguments),this.state={titleId:JR()},this.handleRootEl=r=>{this.rootEl=r,this.props.elRef&&K1(this.props.elRef,r)},this.handleDocumentMouseDown=r=>{const a=BJ(r);this.rootEl.contains(a)||this.handleCloseClick()},this.handleDocumentKeyDown=r=>{r.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:r}=this.props;r&&r()}}render(){let{theme:r,options:a}=this.context,{props:l,state:i}=this,m=["fc-popover",r.getClass("popover")].concat(l.extraClassNames||[]);return Cle(rt("div",Object.assign({},l.extraAttrs,{id:l.id,className:m.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),rt("div",{className:"fc-popover-header "+r.getClass("popoverHeader")},rt("span",{className:"fc-popover-title",id:i.titleId},l.title),rt("span",{className:"fc-popover-close "+r.getIconClass("close"),title:a.closeHint,onClick:this.handleCloseClick})),rt("div",{className:"fc-popover-body "+r.getClass("popoverContent")},l.children)),l.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:r}=this.context,{alignmentEl:a,alignGridTop:l}=this.props,{rootEl:i}=this,m=ade(a);if(m){let v=i.getBoundingClientRect(),C=l?td(a,".fc-scrollgrid").getBoundingClientRect().top:m.top,E=r?m.right-v.width:m.left;C=Math.max(C,cV),E=Math.min(E,document.documentElement.clientWidth-cV-v.width),E=Math.max(E,cV);let T=i.offsetParent.getBoundingClientRect();iA(i,{top:C-T.top,left:E-T.left})}}}class Hde extends wp{constructor(){super(...arguments),this.handleRootEl=r=>{this.rootEl=r,r?this.context.registerInteractiveComponent(this,{el:r,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:r,dateEnv:a}=this.context,{props:l}=this,{startDate:i,todayRange:m,dateProfile:v}=l,C=a.format(i,r.dayPopoverFormat);return rt(aV,{elRef:this.handleRootEl,date:i,dateProfile:v,todayRange:m},(E,T,N)=>rt(Vde,{elRef:N.ref,id:l.id,title:C,extraClassNames:["fc-more-popover"].concat(N.className||[]),extraAttrs:N,parentEl:l.parentEl,alignmentEl:l.alignmentEl,alignGridTop:l.alignGridTop,onClose:l.onClose},lV(r)&&rt(E,{elTag:"div",elClasses:["fc-more-popover-misc"]}),l.children))}queryHit(r,a,l,i){let{rootEl:m,props:v}=this;return r>=0&&r<l&&a>=0&&a<i?{dateProfile:v.dateProfile,dateSpan:Object.assign({allDay:!v.forceTimed,range:{start:v.startDate,end:v.endDate}},v.extraDateSpan),dayEl:m,rect:{left:0,top:0,right:l,bottom:i},layer:1}:null}}class nte extends Li{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:JR()},this.handleLinkEl=r=>{this.linkEl=r,this.props.elRef&&K1(this.props.elRef,r)},this.handleClick=r=>{let{props:a,context:l}=this,{moreLinkClick:i}=l.options,m=ote(a).start;function v(C){let{def:E,instance:T,range:N}=C.eventRange;return{event:new fl(l,E,T),start:l.dateEnv.toDate(N.start),end:l.dateEnv.toDate(N.end),isStart:C.isStart,isEnd:C.isEnd}}typeof i=="function"&&(i=i({date:m,allDay:!!a.allDayDate,allSegs:a.allSegs.map(v),hiddenSegs:a.hiddenSegs.map(v),jsEvent:r,view:l.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&l.calendarApi.zoomTo(m,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:r,state:a}=this;return rt(q1.Consumer,null,l=>{let{viewApi:i,options:m,calendarApi:v}=l,{moreLinkText:C}=m,{moreCnt:E}=r,T=ote(r),N=typeof C=="function"?C.call(v,E):`+${E} ${C}`,V=aA(m.moreLinkHint,[E],N),U={num:E,shortText:`+${E}`,text:N,view:i};return rt(Ya,null,!!r.moreCnt&&rt(rm,{elTag:r.elTag||"a",elRef:this.handleLinkEl,elClasses:[...r.elClasses||[],"fc-more-link"],elStyle:r.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},r.elAttrs),FJ(this.handleClick)),{title:V,"aria-expanded":a.isPopoverOpen,"aria-controls":a.isPopoverOpen?a.popoverId:""}),renderProps:U,generatorName:"moreLinkContent",customGenerator:m.moreLinkContent,defaultGenerator:r.defaultGenerator||zde,classNameGenerator:m.moreLinkClassNames,didMount:m.moreLinkDidMount,willUnmount:m.moreLinkWillUnmount},r.children),a.isPopoverOpen&&rt(Hde,{id:a.popoverId,startDate:T.start,endDate:T.end,dateProfile:r.dateProfile,todayRange:r.todayRange,extraDateSpan:r.extraDateSpan,parentEl:this.parentEl,alignmentEl:r.alignmentElRef?r.alignmentElRef.current:this.linkEl,alignGridTop:r.alignGridTop,forceTimed:r.forceTimed,onClose:this.handlePopoverClose},r.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=td(this.linkEl,".fc-view-harness"))}}function zde(c){return c.text}function ote(c){if(c.allDayDate)return{start:c.allDayDate,end:nd(c.allDayDate,1)};let{hiddenSegs:r}=c;return{start:ste(r),end:Wde(r)}}function ste(c){return c.reduce(Ude).eventRange.range.start}function Ude(c,r){return c.eventRange.range.start<r.eventRange.range.start?c:r}function Wde(c){return c.reduce(jde).eventRange.range.end}function jde(c,r){return c.eventRange.range.end>r.eventRange.range.end?c:r}class Gde{constructor(){this.handlers=[]}set(r){this.currentValue=r;for(let a of this.handlers)a(r)}subscribe(r){this.handlers.push(r),this.currentValue!==void 0&&r(this.currentValue)}}class Zde extends Gde{constructor(){super(...arguments),this.map=new Map}handle(r){const{map:a}=this;let l=!1;r.isActive?(a.set(r.id,r),l=!0):a.has(r.id)&&(a.delete(r.id),l=!0),l&&this.set(a)}}const qde=[],rte={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},ite=Object.assign(Object.assign({},rte),{buttonHints:{prev:"Previous $0",next:"Next $0",today(c,r){return r==="day"?"Today":`This ${c}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(c){return`Show ${c} more event${c===1?"":"s"}`}});function Kde(c){let r=c.length>0?c[0].code:"en",a=qde.concat(c),l={en:ite};for(let i of a)l[i.code]=i;return{map:l,defaultCode:r}}function ate(c,r){return typeof c=="object"&&!Array.isArray(c)?lte(c.code,[c.code],c):Yde(c,r)}function Yde(c,r){let a=[].concat(c||[]),l=Xde(a,r)||ite;return lte(c,a,l)}function Xde(c,r){for(let a=0;a<c.length;a+=1){let l=c[a].toLocaleLowerCase().split("-");for(let i=l.length;i>0;i-=1){let m=l.slice(0,i).join("-");if(r[m])return r[m]}}return null}function lte(c,r,a){let l=A$([rte,a],["buttonText"]);delete l.code;let{week:i}=l;return delete l.week,{codeArg:c,codes:r,week:i,simpleNumberFormat:new Intl.NumberFormat(c),options:l}}function Q1(c){return{id:H2(),name:c.name,premiumReleaseDate:c.premiumReleaseDate?new Date(c.premiumReleaseDate):void 0,deps:c.deps||[],reducers:c.reducers||[],isLoadingFuncs:c.isLoadingFuncs||[],contextInit:[].concat(c.contextInit||[]),eventRefiners:c.eventRefiners||{},eventDefMemberAdders:c.eventDefMemberAdders||[],eventSourceRefiners:c.eventSourceRefiners||{},isDraggableTransformers:c.isDraggableTransformers||[],eventDragMutationMassagers:c.eventDragMutationMassagers||[],eventDefMutationAppliers:c.eventDefMutationAppliers||[],dateSelectionTransformers:c.dateSelectionTransformers||[],datePointTransforms:c.datePointTransforms||[],dateSpanTransforms:c.dateSpanTransforms||[],views:c.views||{},viewPropsTransformers:c.viewPropsTransformers||[],isPropsValid:c.isPropsValid||null,externalDefTransforms:c.externalDefTransforms||[],viewContainerAppends:c.viewContainerAppends||[],eventDropTransformers:c.eventDropTransformers||[],componentInteractions:c.componentInteractions||[],calendarInteractions:c.calendarInteractions||[],themeClasses:c.themeClasses||{},eventSourceDefs:c.eventSourceDefs||[],cmdFormatter:c.cmdFormatter,recurringTypes:c.recurringTypes||[],namedTimeZonedImpl:c.namedTimeZonedImpl,initialView:c.initialView||"",elementDraggingImpl:c.elementDraggingImpl,optionChangeHandlers:c.optionChangeHandlers||{},scrollGridImpl:c.scrollGridImpl||null,listenerRefiners:c.listenerRefiners||{},optionRefiners:c.optionRefiners||{},propSetHandlers:c.propSetHandlers||{}}}function Qde(c,r){let a={},l={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(m){for(let v of m){const C=v.name,E=a[C];E===void 0?(a[C]=v.id,i(v.deps),l=efe(l,v)):E!==v.id&&console.warn(`Duplicate plugin '${C}'`)}}return c&&i(c),i(r),l}function Jde(){let c=[],r=[],a;return(l,i)=>((!a||!Jv(l,c)||!Jv(i,r))&&(a=Qde(l,i)),c=l,r=i,a)}function efe(c,r){return{premiumReleaseDate:tfe(c.premiumReleaseDate,r.premiumReleaseDate),reducers:c.reducers.concat(r.reducers),isLoadingFuncs:c.isLoadingFuncs.concat(r.isLoadingFuncs),contextInit:c.contextInit.concat(r.contextInit),eventRefiners:Object.assign(Object.assign({},c.eventRefiners),r.eventRefiners),eventDefMemberAdders:c.eventDefMemberAdders.concat(r.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},c.eventSourceRefiners),r.eventSourceRefiners),isDraggableTransformers:c.isDraggableTransformers.concat(r.isDraggableTransformers),eventDragMutationMassagers:c.eventDragMutationMassagers.concat(r.eventDragMutationMassagers),eventDefMutationAppliers:c.eventDefMutationAppliers.concat(r.eventDefMutationAppliers),dateSelectionTransformers:c.dateSelectionTransformers.concat(r.dateSelectionTransformers),datePointTransforms:c.datePointTransforms.concat(r.datePointTransforms),dateSpanTransforms:c.dateSpanTransforms.concat(r.dateSpanTransforms),views:Object.assign(Object.assign({},c.views),r.views),viewPropsTransformers:c.viewPropsTransformers.concat(r.viewPropsTransformers),isPropsValid:r.isPropsValid||c.isPropsValid,externalDefTransforms:c.externalDefTransforms.concat(r.externalDefTransforms),viewContainerAppends:c.viewContainerAppends.concat(r.viewContainerAppends),eventDropTransformers:c.eventDropTransformers.concat(r.eventDropTransformers),calendarInteractions:c.calendarInteractions.concat(r.calendarInteractions),componentInteractions:c.componentInteractions.concat(r.componentInteractions),themeClasses:Object.assign(Object.assign({},c.themeClasses),r.themeClasses),eventSourceDefs:c.eventSourceDefs.concat(r.eventSourceDefs),cmdFormatter:r.cmdFormatter||c.cmdFormatter,recurringTypes:c.recurringTypes.concat(r.recurringTypes),namedTimeZonedImpl:r.namedTimeZonedImpl||c.namedTimeZonedImpl,initialView:c.initialView||r.initialView,elementDraggingImpl:c.elementDraggingImpl||r.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},c.optionChangeHandlers),r.optionChangeHandlers),scrollGridImpl:r.scrollGridImpl||c.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},c.listenerRefiners),r.listenerRefiners),optionRefiners:Object.assign(Object.assign({},c.optionRefiners),r.optionRefiners),propSetHandlers:Object.assign(Object.assign({},c.propSetHandlers),r.propSetHandlers)}}function tfe(c,r){return c===void 0?r:r===void 0?c:new Date(Math.max(c.valueOf(),r.valueOf()))}class sy extends cA{}sy.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},sy.prototype.baseIconClass="fc-icon",sy.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},sy.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},sy.prototype.iconOverrideOption="buttonIcons",sy.prototype.iconOverrideCustomButtonOption="icon",sy.prototype.iconOverridePrefix="fc-icon-";function nfe(c,r){let a={},l;for(l in c)uV(l,a,c,r);for(l in r)uV(l,a,c,r);return a}function uV(c,r,a,l){if(r[c])return r[c];let i=ofe(c,r,a,l);return i&&(r[c]=i),i}function ofe(c,r,a,l){let i=a[c],m=l[c],v=N=>i&&i[N]!==null?i[N]:m&&m[N]!==null?m[N]:null,C=v("component"),E=v("superType"),T=null;if(E){if(E===c)throw new Error("Can't have a custom view type that references itself");T=uV(E,r,a,l)}return!C&&T&&(C=T.component),C?{type:c,component:C,defaults:Object.assign(Object.assign({},T?T.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},T?T.overrides:{}),m?m.rawOptions:{})}:null}function cte(c){return Z1(c,sfe)}function sfe(c){let r=typeof c=="function"?{component:c}:c,{component:a}=r;return r.content?a=ute(r):a&&!(a.prototype instanceof Li)&&(a=ute(Object.assign(Object.assign({},r),{content:a}))),{superType:r.type,component:a,rawOptions:r}}function ute(c){return r=>rt(q1.Consumer,null,a=>rt(rm,{elTag:"div",elClasses:ree(a.viewSpec),renderProps:Object.assign(Object.assign({},r),{nextDayThreshold:a.options.nextDayThreshold}),generatorName:void 0,customGenerator:c.content,classNameGenerator:c.classNames,didMount:c.didMount,willUnmount:c.willUnmount}))}function rfe(c,r,a,l){let i=cte(c),m=cte(r.views),v=nfe(i,m);return Z1(v,C=>ife(C,m,r,a,l))}function ife(c,r,a,l,i){let m=c.overrides.duration||c.defaults.duration||l.duration||a.duration,v=null,C="",E="",T={};if(m&&(v=afe(m),v)){let U=_$(v);C=U.unit,U.value===1&&(E=C,T=r[C]?r[C].rawOptions:{})}let N=U=>{let z=U.buttonText||{},W=c.defaults.buttonTextKey;return W!=null&&z[W]!=null?z[W]:z[c.type]!=null?z[c.type]:z[E]!=null?z[E]:null},V=U=>{let z=U.buttonHints||{},W=c.defaults.buttonTextKey;return W!=null&&z[W]!=null?z[W]:z[c.type]!=null?z[c.type]:z[E]!=null?z[E]:null};return{type:c.type,component:c.component,duration:v,durationUnit:C,singleUnit:E,optionDefaults:c.defaults,optionOverrides:Object.assign(Object.assign({},T),c.overrides),buttonTextOverride:N(l)||N(a)||c.overrides.buttonText,buttonTextDefault:N(i)||c.defaults.buttonText||N(lA)||c.type,buttonTitleOverride:V(l)||V(a)||c.overrides.buttonHint,buttonTitleDefault:V(i)||c.defaults.buttonHint||V(lA)}}let dte={};function afe(c){let r=JSON.stringify(c),a=dte[r];return a===void 0&&(a=ni(c),dte[r]=a),a}function lfe(c,r){switch(r.type){case"CHANGE_VIEW_TYPE":c=r.viewType}return c}function cfe(c,r){switch(r.type){case"SET_OPTION":return Object.assign(Object.assign({},c),{[r.optionName]:r.rawOptionValue});default:return c}}function ufe(c,r,a,l){let i;switch(r.type){case"CHANGE_VIEW_TYPE":return l.build(r.dateMarker||a);case"CHANGE_DATE":return l.build(r.dateMarker);case"PREV":if(i=l.buildPrev(c,a),i.isValid)return i;break;case"NEXT":if(i=l.buildNext(c,a),i.isValid)return i;break}return c}function dfe(c,r,a){let l=r?r.activeRange:null;return mte({},yfe(c,a),l,a)}function ffe(c,r,a,l){let i=a?a.activeRange:null;switch(r.type){case"ADD_EVENT_SOURCES":return mte(c,r.sources,i,l);case"REMOVE_EVENT_SOURCE":return hfe(c,r.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return a?hte(c,i,l):c;case"FETCH_EVENT_SOURCES":return dV(c,r.sourceIds?eee(r.sourceIds):gte(c,l),i,r.isRefetch||!1,l);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return vfe(c,r.sourceId,r.fetchId,r.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return c}}function mfe(c,r,a){let l=r?r.activeRange:null;return dV(c,gte(c,a),l,!0,a)}function fte(c){for(let r in c)if(c[r].isFetching)return!0;return!1}function mte(c,r,a,l){let i={};for(let m of r)i[m.sourceId]=m;return a&&(i=hte(i,a,l)),Object.assign(Object.assign({},c),i)}function hfe(c,r){return j2(c,a=>a.sourceId!==r)}function hte(c,r,a){return dV(c,j2(c,l=>gfe(l,r,a)),r,!1,a)}function gfe(c,r,a){return pte(c,a)?!a.options.lazyFetching||!c.fetchRange||c.isFetching||r.start<c.fetchRange.start||r.end>c.fetchRange.end:!c.latestFetchId}function dV(c,r,a,l,i){let m={};for(let v in c){let C=c[v];r[v]?m[v]=pfe(C,a,l,i):m[v]=C}return m}function pfe(c,r,a,l){let{options:i,calendarApi:m}=l,v=l.pluginHooks.eventSourceDefs[c.sourceDefId],C=H2();return v.fetch({eventSource:c,range:r,isRefetch:a,context:l},E=>{let{rawEvents:T}=E;i.eventSourceSuccess&&(T=i.eventSourceSuccess.call(m,T,E.response)||T),c.success&&(T=c.success.call(m,T,E.response)||T),l.dispatch({type:"RECEIVE_EVENTS",sourceId:c.sourceId,fetchId:C,fetchRange:r,rawEvents:T})},E=>{let T=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(m,E),T=!0),c.failure&&(c.failure(E),T=!0),T||console.warn(E.message,E),l.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:c.sourceId,fetchId:C,fetchRange:r,error:E})}),Object.assign(Object.assign({},c),{isFetching:!0,latestFetchId:C})}function vfe(c,r,a,l){let i=c[r];return i&&a===i.latestFetchId?Object.assign(Object.assign({},c),{[r]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:l})}):c}function gte(c,r){return j2(c,a=>pte(a,r))}function yfe(c,r){let a=pee(r),l=[].concat(c.eventSources||[]),i=[];c.initialEvents&&l.unshift(c.initialEvents),c.events&&l.unshift(c.events);for(let m of l){let v=gee(m,r,a);v&&i.push(v)}return i}function pte(c,r){return!r.pluginHooks.eventSourceDefs[c.sourceDefId].ignoreRange}function bfe(c,r){switch(r.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return r.selection;default:return c}}function Cfe(c,r){switch(r.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return r.eventInstanceId;default:return c}}function _fe(c,r){let a;switch(r.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return a=r.state,{affectedEvents:a.affectedEvents,mutatedEvents:a.mutatedEvents,isEvent:a.isEvent};default:return c}}function wfe(c,r){let a;switch(r.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return a=r.state,{affectedEvents:a.affectedEvents,mutatedEvents:a.mutatedEvents,isEvent:a.isEvent};default:return c}}function Sfe(c,r,a,l,i){let m=c.headerToolbar?vte(c.headerToolbar,c,r,a,l,i):null,v=c.footerToolbar?vte(c.footerToolbar,c,r,a,l,i):null;return{header:m,footer:v}}function vte(c,r,a,l,i,m){let v={},C=[],E=!1;for(let T in c){let N=c[T],V=Efe(N,r,a,l,i,m);v[T]=V.widgets,C.push(...V.viewsWithButtons),E=E||V.hasTitle}return{sectionWidgets:v,viewsWithButtons:C,hasTitle:E}}function Efe(c,r,a,l,i,m){let v=r.direction==="rtl",C=r.customButtons||{},E=a.buttonText||{},T=r.buttonText||{},N=a.buttonHints||{},V=r.buttonHints||{},U=c?c.split(" "):[],z=[],W=!1;return{widgets:U.map(Z=>Z.split(",").map(ce=>{if(ce==="title")return W=!0,{buttonName:ce};let q,X,Ce,st,Ne,ee;if(q=C[ce])Ce=xe=>{q.click&&q.click.call(xe.target,xe,xe.target)},(st=l.getCustomButtonIconClass(q))||(st=l.getIconClass(ce,v))||(Ne=q.text),ee=q.hint||q.text;else if(X=i[ce]){z.push(ce),Ce=()=>{m.changeView(ce)},(Ne=X.buttonTextOverride)||(st=l.getIconClass(ce,v))||(Ne=X.buttonTextDefault);let xe=X.buttonTextOverride||X.buttonTextDefault;ee=aA(X.buttonTitleOverride||X.buttonTitleDefault||r.viewHint,[xe,ce],xe)}else if(m[ce])if(Ce=()=>{m[ce]()},(Ne=E[ce])||(st=l.getIconClass(ce,v))||(Ne=T[ce]),ce==="prevYear"||ce==="nextYear"){let xe=ce==="prevYear"?"prev":"next";ee=aA(N[xe]||V[xe],[T.year||"year","year"],T[ce])}else ee=xe=>aA(N[ce]||V[ce],[T[xe]||xe,xe],T[ce]);return{buttonName:ce,buttonClick:Ce,buttonIcon:st,buttonText:Ne,buttonHint:ee}})),viewsWithButtons:z,hasTitle:W}}class kfe{constructor(r,a,l){this.type=r,this.getCurrentData=a,this.dateEnv=l}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(r){return this.getCurrentData().options[r]}}const xfe=Q1({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(c){return Array.isArray(c.events)?c.events:null},fetch(c,r){r({rawEvents:c.eventSource.meta})}}]}),Afe=Q1({name:"func-event-source",eventSourceDefs:[{parseMeta(c){return typeof c.events=="function"?c.events:null},fetch(c,r,a){const{dateEnv:l}=c.context,i=c.eventSource.meta;Hue(i.bind(null,Oee(c.range,l)),m=>r({rawEvents:m}),a)}}]}),Tfe=Q1({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:Zt,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(c){return c.url&&(c.format==="json"||!c.format)?{url:c.url,format:"json",method:(c.method||"GET").toUpperCase(),extraParams:c.extraParams,startParam:c.startParam,endParam:c.endParam,timeZoneParam:c.timeZoneParam}:null},fetch(c,r,a){const{meta:l}=c.eventSource,i=Dfe(l,c.range,c.context);zue(l.method,l.url,i).then(([m,v])=>{r({rawEvents:m,response:v})},a)}}]});function Dfe(c,r,a){let{dateEnv:l,options:i}=a,m,v,C,E,T={};return m=c.startParam,m==null&&(m=i.startParam),v=c.endParam,v==null&&(v=i.endParam),C=c.timeZoneParam,C==null&&(C=i.timeZoneParam),typeof c.extraParams=="function"?E=c.extraParams():E=c.extraParams||{},Object.assign(T,E),T[m]=l.formatIso(r.start),T[v]=l.formatIso(r.end),l.timeZone!=="local"&&(T[C]=l.timeZone),T}const Rfe=Q1({name:"simple-recurring-event",recurringTypes:[{parse(c,r){if(c.daysOfWeek||c.startTime||c.endTime||c.startRecur||c.endRecur){let a={daysOfWeek:c.daysOfWeek||null,startTime:c.startTime||null,endTime:c.endTime||null,startRecur:c.startRecur?r.createMarker(c.startRecur):null,endRecur:c.endRecur?r.createMarker(c.endRecur):null},l;return c.duration&&(l=c.duration),!l&&c.startTime&&c.endTime&&(l=Qle(c.endTime,c.startTime)),{allDayGuess:!c.startTime&&!c.endTime,duration:l,typeData:a}}return null},expand(c,r,a){let l=Z2(r,{start:c.startRecur,end:c.endRecur});return l?Ofe(c.daysOfWeek,c.startTime,l,a):[]}}],eventRefiners:{daysOfWeek:Zt,startTime:ni,endTime:ni,duration:ni,startRecur:Zt,endRecur:Zt}});function Ofe(c,r,a,l){let i=c?eee(c):null,m=Oa(a.start),v=a.end,C=[];for(;m<v;){let E;(!i||i[m.getUTCDay()])&&(r?E=l.add(m,r):E=m,C.push(E)),m=nd(m,1)}return C}const Nfe=Q1({name:"change-handler",optionChangeHandlers:{events(c,r){yte([c],r)},eventSources:yte}});function yte(c,r){let a=T$(r.getCurrentData().eventSources);if(a.length===1&&c.length===1&&Array.isArray(a[0]._raw)&&Array.isArray(c[0])){r.dispatch({type:"RESET_RAW_EVENTS",sourceId:a[0].sourceId,rawEvents:c[0]});return}let l=[];for(let i of c){let m=!1;for(let v=0;v<a.length;v+=1)if(a[v]._raw===i){a.splice(v,1),m=!0;break}m||l.push(i)}for(let i of a)r.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of l)r.calendarApi.addEventSource(i)}function Ife(c,r){r.emitter.trigger("datesSet",Object.assign(Object.assign({},Oee(c.activeRange,r.dateEnv)),{view:r.viewApi}))}function Bfe(c,r){let{emitter:a}=r;a.hasHandlers("eventsSet")&&a.trigger("eventsSet",K2(c,r))}const Mfe=[xfe,Afe,Tfe,Rfe,Nfe,Q1({name:"misc",isLoadingFuncs:[c=>fte(c.eventSources)],propSetHandlers:{dateProfile:Ife,eventStore:Bfe}})];class Pfe{constructor(r,a){this.runTaskOption=r,this.drainedOption=a,this.queue=[],this.delayedRunner=new g$(this.drain.bind(this))}request(r,a){this.queue.push(r),this.delayedRunner.request(a)}pause(r){this.delayedRunner.pause(r)}resume(r,a){this.delayedRunner.resume(r,a)}drain(){let{queue:r}=this;for(;r.length;){let a=[],l;for(;l=r.shift();)this.runTask(l),a.push(l);this.drained(a)}}runTask(r){this.runTaskOption&&this.runTaskOption(r)}drained(r){this.drainedOption&&this.drainedOption(r)}}function Lfe(c,r,a){let l;return/^(year|month)$/.test(c.currentRangeUnit)?l=c.currentRange:l=c.activeRange,a.formatRange(l.start,l.end,El(r.titleFormat||Ffe(c)),{isEndExclusive:c.isRangeAllDay,defaultSeparator:r.titleRangeSeparator})}function Ffe(c){let{currentRangeUnit:r}=c;if(r==="year")return{year:"numeric"};if(r==="month")return{year:"numeric",month:"long"};let a=nO(c.currentRange.start,c.currentRange.end);return a!==null&&a>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class $fe{constructor(r){this.computeCurrentViewData=Ms(this._computeCurrentViewData),this.organizeRawLocales=Ms(Kde),this.buildLocale=Ms(ate),this.buildPluginHooks=Jde(),this.buildDateEnv=Ms(Vfe),this.buildTheme=Ms(Hfe),this.parseToolbars=Ms(Sfe),this.buildViewSpecs=Ms(rfe),this.buildDateProfileGenerator=oO(zfe),this.buildViewApi=Ms(Ufe),this.buildViewUiProps=oO(Gfe),this.buildEventUiBySource=Ms(Wfe,_p),this.buildEventUiBases=Ms(jfe),this.parseContextBusinessHours=oO(Zfe),this.buildTitle=Ms(Lfe),this.emitter=new pO,this.actionRunner=new Pfe(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=U=>{this.actionRunner.request(U)},this.props=r,this.actionRunner.pause();let a={},l=this.computeOptionsData(r.optionOverrides,a,r.calendarApi),i=l.calendarOptions.initialView||l.pluginHooks.initialView,m=this.computeCurrentViewData(i,l,r.optionOverrides,a);r.calendarApi.currentDataManager=this,this.emitter.setThisContext(r.calendarApi),this.emitter.setOptions(m.options);let v=tue(l.calendarOptions,l.dateEnv),C=m.dateProfileGenerator.build(v);Y1(C.activeRange,v)||(v=C.currentRange.start);let E={dateEnv:l.dateEnv,options:l.calendarOptions,pluginHooks:l.pluginHooks,calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let U of l.pluginHooks.contextInit)U(E);let T=dfe(l.calendarOptions,C,E),N={dynamicOptionOverrides:a,currentViewType:i,currentDate:v,dateProfile:C,businessHours:this.parseContextBusinessHours(E),eventSources:T,eventUiBases:{},eventStore:im(),renderableEventStore:im(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(E).selectionConfig},V=Object.assign(Object.assign({},E),N);for(let U of l.pluginHooks.reducers)Object.assign(N,U(null,null,V));fV(N,E)&&this.emitter.trigger("loading",!0),this.state=N,this.updateData(),this.actionRunner.resume()}resetOptions(r,a){let{props:l}=this;a===void 0?l.optionOverrides=r:(l.optionOverrides=Object.assign(Object.assign({},l.optionOverrides||{}),r),this.optionsForRefining.push(...a)),(a===void 0||a.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(r){let{props:a,state:l,emitter:i}=this,m=cfe(l.dynamicOptionOverrides,r),v=this.computeOptionsData(a.optionOverrides,m,a.calendarApi),C=lfe(l.currentViewType,r),E=this.computeCurrentViewData(C,v,a.optionOverrides,m);a.calendarApi.currentDataManager=this,i.setThisContext(a.calendarApi),i.setOptions(E.options);let T={dateEnv:v.dateEnv,options:v.calendarOptions,pluginHooks:v.pluginHooks,calendarApi:a.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:N,dateProfile:V}=l;this.data&&this.data.dateProfileGenerator!==E.dateProfileGenerator&&(V=E.dateProfileGenerator.build(N)),N=eue(N,r),V=ufe(V,r,N,E.dateProfileGenerator),(r.type==="PREV"||r.type==="NEXT"||!Y1(V.currentRange,N))&&(N=V.currentRange.start);let U=ffe(l.eventSources,r,V,T),z=hue(l.eventStore,r,U,V,T),K=fte(U)&&!E.options.progressiveEventRendering&&l.renderableEventStore||z,{eventUiSingleBase:Z,selectionConfig:ce}=this.buildViewUiProps(T),q=this.buildEventUiBySource(U),X=this.buildEventUiBases(K.defs,Z,q),Ce={dynamicOptionOverrides:m,currentViewType:C,currentDate:N,dateProfile:V,eventSources:U,eventStore:z,renderableEventStore:K,selectionConfig:ce,eventUiBases:X,businessHours:this.parseContextBusinessHours(T),dateSelection:bfe(l.dateSelection,r),eventSelection:Cfe(l.eventSelection,r),eventDrag:_fe(l.eventDrag,r),eventResize:wfe(l.eventResize,r)},st=Object.assign(Object.assign({},T),Ce);for(let xe of v.pluginHooks.reducers)Object.assign(Ce,xe(l,r,st));let Ne=fV(l,T),ee=fV(Ce,T);!Ne&&ee?i.trigger("loading",!0):Ne&&!ee&&i.trigger("loading",!1),this.state=Ce,a.onAction&&a.onAction(r)}updateData(){let{props:r,state:a}=this,l=this.data,i=this.computeOptionsData(r.optionOverrides,a.dynamicOptionOverrides,r.calendarApi),m=this.computeCurrentViewData(a.currentViewType,i,r.optionOverrides,a.dynamicOptionOverrides),v=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(a.dateProfile,m.options,i.dateEnv),calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),m),a),C=i.pluginHooks.optionChangeHandlers,E=l&&l.calendarOptions,T=i.calendarOptions;if(E&&E!==T){E.timeZone!==T.timeZone&&(a.eventSources=v.eventSources=mfe(v.eventSources,a.dateProfile,v),a.eventStore=v.eventStore=bee(v.eventStore,l.dateEnv,v.dateEnv),a.renderableEventStore=v.renderableEventStore=bee(v.renderableEventStore,l.dateEnv,v.dateEnv));for(let N in C)(this.optionsForHandling.indexOf(N)!==-1||E[N]!==T[N])&&C[N](T[N],v)}this.optionsForHandling=[],r.onData&&r.onData(v)}computeOptionsData(r,a,l){if(!this.optionsForRefining.length&&r===this.stableOptionOverrides&&a===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:m,localeDefaults:v,availableLocaleData:C,extra:E}=this.processRawCalendarOptions(r,a);bte(E);let T=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,m,C,i.defaultRangeSeparator),N=this.buildViewSpecs(m.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,v),V=this.buildTheme(i,m),U=this.parseToolbars(i,this.stableOptionOverrides,V,N,l);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:m,dateEnv:T,viewSpecs:N,theme:V,toolbarConfig:U,localeDefaults:v,availableRawLocales:C.map}}processRawCalendarOptions(r,a){let{locales:l,locale:i}=k$([lA,r,a]),m=this.organizeRawLocales(l),v=m.map,C=this.buildLocale(i||m.defaultCode,v).options,E=this.buildPluginHooks(r.plugins||[],Mfe),T=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ),QJ),JJ),E.listenerRefiners),E.optionRefiners),N={},V=k$([lA,C,r,a]),U={},z=this.currentCalendarOptionsInput,W=this.currentCalendarOptionsRefined,K=!1;for(let Z in V)this.optionsForRefining.indexOf(Z)===-1&&(V[Z]===z[Z]||U2[Z]&&Z in z&&U2[Z](z[Z],V[Z]))?U[Z]=W[Z]:T[Z]?(U[Z]=T[Z](V[Z]),K=!0):N[Z]=z[Z];return K&&(this.currentCalendarOptionsInput=V,this.currentCalendarOptionsRefined=U,this.stableOptionOverrides=r,this.stableDynamicOptionOverrides=a),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:E,availableLocaleData:m,localeDefaults:C,extra:N}}_computeCurrentViewData(r,a,l,i){let m=a.viewSpecs[r];if(!m)throw new Error(`viewType "${r}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:v,extra:C}=this.processRawViewOptions(m,a.pluginHooks,a.localeDefaults,l,i);bte(C);let E=this.buildDateProfileGenerator({dateProfileGeneratorClass:m.optionDefaults.dateProfileGeneratorClass,duration:m.duration,durationUnit:m.durationUnit,usesMinMaxTime:m.optionDefaults.usesMinMaxTime,dateEnv:a.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:v.slotMinTime,slotMaxTime:v.slotMaxTime,showNonCurrentDates:v.showNonCurrentDates,dayCount:v.dayCount,dateAlignment:v.dateAlignment,dateIncrement:v.dateIncrement,hiddenDays:v.hiddenDays,weekends:v.weekends,nowInput:v.now,validRangeInput:v.validRange,visibleRangeInput:v.visibleRange,fixedWeekCount:v.fixedWeekCount}),T=this.buildViewApi(r,this.getCurrentData,a.dateEnv);return{viewSpec:m,options:v,dateProfileGenerator:E,viewApi:T}}processRawViewOptions(r,a,l,i,m){let v=k$([lA,r.optionDefaults,l,i,r.optionOverrides,m]),C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ),QJ),JJ),Oce),a.listenerRefiners),a.optionRefiners),E={},T=this.currentViewOptionsInput,N=this.currentViewOptionsRefined,V=!1,U={};for(let z in v)v[z]===T[z]||U2[z]&&U2[z](v[z],T[z])?E[z]=N[z]:(v[z]===this.currentCalendarOptionsInput[z]||U2[z]&&U2[z](v[z],this.currentCalendarOptionsInput[z])?z in this.currentCalendarOptionsRefined&&(E[z]=this.currentCalendarOptionsRefined[z]):C[z]?E[z]=C[z](v[z]):U[z]=v[z],V=!0);return V&&(this.currentViewOptionsInput=v,this.currentViewOptionsRefined=E),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:U}}}function Vfe(c,r,a,l,i,m,v,C){let E=ate(r||v.defaultCode,v.map);return new Hce({calendarSystem:"gregory",timeZone:c,namedTimeZoneImpl:m.namedTimeZonedImpl,locale:E,weekNumberCalculation:a,firstDay:l,weekText:i,cmdFormatter:m.cmdFormatter,defaultSeparator:C})}function Hfe(c,r){let a=r.themeClasses[c.themeSystem]||sy;return new a(c)}function zfe(c){let r=c.dateProfileGeneratorClass||cee;return new r(c)}function Ufe(c,r,a){return new kfe(c,r,a)}function Wfe(c){return Z1(c,r=>r.ui)}function jfe(c,r,a){let l={"":r};for(let i in c){let m=c[i];m.sourceId&&a[m.sourceId]&&(l[i]=a[m.sourceId])}return l}function Gfe(c){let{options:r}=c;return{eventUiSingleBase:gO({display:r.eventDisplay,editable:r.editable,startEditable:r.eventStartEditable,durationEditable:r.eventDurationEditable,constraint:r.eventConstraint,overlap:typeof r.eventOverlap=="boolean"?r.eventOverlap:void 0,allow:r.eventAllow,backgroundColor:r.eventBackgroundColor,borderColor:r.eventBorderColor,textColor:r.eventTextColor,color:r.eventColor},c),selectionConfig:gO({constraint:r.selectConstraint,overlap:typeof r.selectOverlap=="boolean"?r.selectOverlap:void 0,allow:r.selectAllow},c)}}function fV(c,r){for(let a of r.pluginHooks.isLoadingFuncs)if(a(c))return!0;return!1}function Zfe(c){return Sue(c.options.businessHours,c)}function bte(c,r){for(let a in c)console.warn(`Unknown option '${a}'`+(r?` for view '${r}'`:""))}class qfe extends Li{render(){let r=this.props.widgetGroups.map(a=>this.renderWidgetGroup(a));return rt("div",{className:"fc-toolbar-chunk"},...r)}renderWidgetGroup(r){let{props:a}=this,{theme:l}=this.context,i=[],m=!0;for(let v of r){let{buttonName:C,buttonClick:E,buttonText:T,buttonIcon:N,buttonHint:V}=v;if(C==="title")m=!1,i.push(rt("h2",{className:"fc-toolbar-title",id:a.titleId},a.title));else{let U=C===a.activeButton,z=!a.isTodayEnabled&&C==="today"||!a.isPrevEnabled&&C==="prev"||!a.isNextEnabled&&C==="next",W=[`fc-${C}-button`,l.getClass("button")];U&&W.push(l.getClass("buttonActive")),i.push(rt("button",{type:"button",title:typeof V=="function"?V(a.navUnit):V,disabled:z,"aria-pressed":U,className:W.join(" "),onClick:E},T||(N?rt("span",{className:N,role:"img"}):"")))}}if(i.length>1){let v=m&&l.getClass("buttonGroup")||"";return rt("div",{className:v},...i)}return i[0]}}class Cte extends Li{render(){let{model:r,extraClassName:a}=this.props,l=!1,i,m,v=r.sectionWidgets,C=v.center;return v.left?(l=!0,i=v.left):i=v.start,v.right?(l=!0,m=v.right):m=v.end,rt("div",{className:[a||"","fc-toolbar",l?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",C||[]),this.renderSection("end",m||[]))}renderSection(r,a){let{props:l}=this;return rt(qfe,{key:r,widgetGroups:a,title:l.title,navUnit:l.navUnit,activeButton:l.activeButton,isTodayEnabled:l.isTodayEnabled,isPrevEnabled:l.isPrevEnabled,isNextEnabled:l.isNextEnabled,titleId:l.titleId})}}class Kfe extends Li{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=r=>{this.el=r,K1(this.props.elRef,r),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:r,state:a}=this,{aspectRatio:l}=r,i=["fc-view-harness",l||r.liquid||r.height?"fc-view-harness-active":"fc-view-harness-passive"],m="",v="";return l?a.availableWidth!==null?m=a.availableWidth/l:v=`${1/l*100}%`:m=r.height||"",rt("div",{"aria-labelledby":r.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:m,paddingBottom:v}},r.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class Yfe extends zS{constructor(r){super(r),this.handleSegClick=(a,l)=>{let{component:i}=this,{context:m}=i,v=HS(l);if(v&&i.isValidSegDownEl(a.target)){let C=td(a.target,".fc-event-forced-url"),E=C?C.querySelector("a[href]").href:"";m.emitter.trigger("eventClick",{el:l,event:new fl(i.context,v.eventRange.def,v.eventRange.instance),jsEvent:a,view:m.viewApi}),E&&!a.defaultPrevented&&(window.location.href=E)}},this.destroy=PJ(r.el,"click",".fc-event",this.handleSegClick)}}class Xfe extends zS{constructor(r){super(r),this.handleEventElRemove=a=>{a===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(a,l)=>{HS(l)&&(this.currentSegEl=l,this.triggerEvent("eventMouseEnter",a,l))},this.handleSegLeave=(a,l)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",a,l))},this.removeHoverListeners=Lle(r.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(r,a,l){let{component:i}=this,{context:m}=i,v=HS(l);(!a||i.isValidSegDownEl(a.target))&&m.emitter.trigger(r,{el:l,event:new fl(m,v.eventRange.def,v.eventRange.instance),jsEvent:a,view:m.viewApi})}}class Qfe extends G2{constructor(){super(...arguments),this.buildViewContext=Ms(Wce),this.buildViewPropTransformers=Ms(eme),this.buildToolbarProps=Ms(Jfe),this.headerRef=Bd(),this.footerRef=Bd(),this.interactionsStore={},this.state={viewLabelId:JR()},this.registerInteractiveComponent=(r,a)=>{let l=jue(r,a),v=[Yfe,Xfe].concat(this.props.pluginHooks.componentInteractions).map(C=>new C(l));this.interactionsStore[r.uid]=v,W$[r.uid]=l},this.unregisterInteractiveComponent=r=>{let a=this.interactionsStore[r.uid];if(a){for(let l of a)l.destroy();delete this.interactionsStore[r.uid]}delete W$[r.uid]},this.resizeRunner=new g$(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=r=>{let{options:a}=this.props;a.handleWindowResize&&r.target===window&&this.resizeRunner.request(a.windowResizeDelay)}}render(){let{props:r}=this,{toolbarConfig:a,options:l}=r,i=this.buildToolbarProps(r.viewSpec,r.dateProfile,r.dateProfileGenerator,r.currentDate,uA(r.options.now,r.dateEnv),r.viewTitle),m=!1,v="",C;r.isHeightAuto||r.forPrint?v="":l.height!=null?m=!0:l.contentHeight!=null?v=l.contentHeight:C=Math.max(l.aspectRatio,.5);let E=this.buildViewContext(r.viewSpec,r.viewApi,r.options,r.dateProfileGenerator,r.dateEnv,r.theme,r.pluginHooks,r.dispatch,r.getCurrentData,r.emitter,r.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),T=a.header&&a.header.hasTitle?this.state.viewLabelId:void 0;return rt(q1.Provider,{value:E},a.header&&rt(Cte,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:a.header,titleId:T},i)),rt(Kfe,{liquid:m,height:v,aspectRatio:C,labeledById:T},this.renderView(r),this.buildAppendContent()),a.footer&&rt(Cte,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:a.footer,titleId:""},i)))}componentDidMount(){let{props:r}=this;this.calendarInteractions=r.pluginHooks.calendarInteractions.map(l=>new l(r)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:a}=r.pluginHooks;for(let l in a)a[l](r[l],r)}componentDidUpdate(r){let{props:a}=this,{propSetHandlers:l}=a.pluginHooks;for(let i in l)a[i]!==r[i]&&l[i](a[i],a)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let r of this.calendarInteractions)r.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:r}=this,a=r.pluginHooks.viewContainerAppends.map(l=>l(r));return rt(Ya,{},...a)}renderView(r){let{pluginHooks:a}=r,{viewSpec:l}=r,i={dateProfile:r.dateProfile,businessHours:r.businessHours,eventStore:r.renderableEventStore,eventUiBases:r.eventUiBases,dateSelection:r.dateSelection,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,isHeightAuto:r.isHeightAuto,forPrint:r.forPrint},m=this.buildViewPropTransformers(a.viewPropsTransformers);for(let C of m)Object.assign(i,C.transform(i,r));let v=l.component;return rt(v,Object.assign({},i))}}function Jfe(c,r,a,l,i,m){let v=a.build(i,void 0,!1),C=a.buildPrev(r,l,!1),E=a.buildNext(r,l,!1);return{title:m,activeButton:c.type,navUnit:c.singleUnit,isTodayEnabled:v.isValid&&!Y1(r.currentRange,i),isPrevEnabled:C.isValid,isNextEnabled:E.isValid}}function eme(c){return c.map(r=>new r)}let tme=class extends Gue{constructor(r,a={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=l=>{switch(l.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=l=>{this.currentData=l,this.renderRunner.request(l.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:l}=this;cO(()=>{rA(rt(Wue,{options:l.calendarOptions,theme:l.theme,emitter:l.emitter},(i,m,v,C)=>(this.setClassNames(i),this.setHeight(m),rt(see.Provider,{value:this.customContentRenderId},rt(Qfe,Object.assign({isHeightAuto:v,forPrint:C},l))))),this.el)})}else this.isRendered&&(this.isRendered=!1,rA(null,this.el),this.setClassNames([]),this.setHeight(""))},Tle(r),this.el=r,this.renderRunner=new g$(this.handleRenderRequest),new $fe({optionOverrides:a,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let r=this.isRendering;r?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),r&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){cO(()=>{super.updateSize()})}batchRendering(r){this.renderRunner.pause("batchRendering"),r(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(r,a){this.currentDataManager.resetOptions(r,a)}setClassNames(r){if(!Jv(r,this.currentClassNames)){let{classList:a}=this.el;for(let l of this.currentClassNames)a.remove(l);for(let l of r)a.add(l);this.currentClassNames=r}}setHeight(r){IJ(this.el,"height",r)}};const nme={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},_te=f.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(c){return{...c,customRenderingMetaMap:rme(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const c=[];for(const r of this.customRenderingMap.values())c.push(f.h(ome,{key:r.id,customRendering:r}));return f.h("div",{attrs:{"data-fc-render-id":this.renderId}},f.h(f.Fragment,c))},mounted(){const c=new Zde;this.handleCustomRendering=c.handle.bind(c);const r=this.buildOptions(this.options),a=new tme(this.$el,r);this.calendar=a,a.render(),c.subscribe(l=>{this.customRenderingMap=l,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:sme()}),ome=f.defineComponent({props:{customRendering:Object},render(){const c=this.customRendering,r=typeof c.generatorMeta=="function"?c.generatorMeta(c.renderProps):c.generatorMeta;return f.h(f.Teleport,{to:c.containerEl},r)}});function eSe(c){return c}function sme(){let c={options:{deep:!0,handler(r){let a=this.getApi();a.pauseRendering();let l=this.buildOptions(r);a.resetOptions(l),this.renderId++}}};for(let r in nme)c[`options.${r}`]={deep:!0,handler(a){if(a!==void 0){let l=this.getApi();l.pauseRendering(),l.resetOptions({[r]:a},[r]),this.renderId++}}};return c}function rme(c){const r={};for(const a in c)r[ime(a)]=c[a];return r}function ime(c){return c.split("-").map((r,a)=>a?ame(r):r).join("")}function ame(c){return c.charAt(0).toUpperCase()+c.slice(1)}class lme extends wp{constructor(){super(...arguments),this.headerElRef=Bd()}renderSimpleLayout(r,a){let{props:l,context:i}=this,m=[],v=wO(i.options);return r&&m.push({type:"header",key:"header",isSticky:v,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}}),m.push({type:"body",key:"body",liquid:!0,chunk:{content:a}}),rt(uO,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},rt(sV,{liquid:!l.isHeightAuto&&!l.forPrint,collapsibleWidth:l.forPrint,cols:[],sections:m}))}renderHScrollLayout(r,a,l,i){let m=this.context.pluginHooks.scrollGridImpl;if(!m)throw new Error("No ScrollGrid implementation");let{props:v,context:C}=this,E=!v.forPrint&&wO(C.options),T=!v.forPrint&&Xee(C.options),N=[];return r&&N.push({type:"header",key:"header",isSticky:E,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}]}),N.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:a}]}),T&&N.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:oV}]}),rt(uO,{elClasses:["fc-daygrid"],viewSpec:C.viewSpec},rt(m,{liquid:!v.isHeightAuto&&!v.forPrint,forPrint:v.forPrint,collapsibleWidth:v.forPrint,colGroups:[{cols:[{span:l,minWidth:i}]}],sections:N}))}}function SO(c,r){let a=[];for(let l=0;l<r;l+=1)a[l]=[];for(let l of c)a[l.row].push(l);return a}function EO(c,r){let a=[];for(let l=0;l<r;l+=1)a[l]=[];for(let l of c)a[l.firstCol].push(l);return a}function wte(c,r){let a=[];if(c){for(let l=0;l<r;l+=1)a[l]={affectedInstances:c.affectedInstances,isEvent:c.isEvent,segs:[]};for(let l of c.segs)a[l.row].segs.push(l)}else for(let l=0;l<r;l+=1)a[l]=null;return a}const Ste=El({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ete(c){let{display:r}=c.eventRange.ui;return r==="list-item"||r==="auto"&&!c.eventRange.def.allDay&&c.firstCol===c.lastCol&&c.isStart&&c.isEnd}class kte extends Li{render(){let{props:r}=this;return rt(Qee,Object.assign({},r,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Ste,defaultDisplayEventEnd:r.defaultDisplayEventEnd,disableResizing:!r.seg.eventRange.def.allDay}))}}class xte extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{seg:i}=r,m=l.eventTimeFormat||Ste,v=Tee(i,m,a,!0,r.defaultDisplayEventEnd);return rt(rV,Object.assign({},r,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Ree(r.seg,a),defaultGenerator:cme,timeText:v,isResizing:!1,isDateSelecting:!1}))}}function cme(c){return rt(Ya,null,rt("div",{className:"fc-daygrid-event-dot",style:{borderColor:c.borderColor||c.backgroundColor}}),c.timeText&&rt("div",{className:"fc-event-time"},c.timeText),rt("div",{className:"fc-event-title"},c.event.title||rt(Ya,null," ")))}class ume extends Li{constructor(){super(...arguments),this.compileSegs=Ms(dme)}render(){let{props:r}=this,{allSegs:a,invisibleSegs:l}=this.compileSegs(r.singlePlacements);return rt(nte,{elClasses:["fc-daygrid-more-link"],dateProfile:r.dateProfile,todayRange:r.todayRange,allDayDate:r.allDayDate,moreCnt:r.moreCnt,allSegs:a,hiddenSegs:l,alignmentElRef:r.alignmentElRef,alignGridTop:r.alignGridTop,extraDateSpan:r.extraDateSpan,popoverContent:()=>{let i=(r.eventDrag?r.eventDrag.affectedInstances:null)||(r.eventResize?r.eventResize.affectedInstances:null)||{};return rt(Ya,null,a.map(m=>{let v=m.eventRange.instance.instanceId;return rt("div",{className:"fc-daygrid-event-harness",key:v,style:{visibility:i[v]?"hidden":""}},Ete(m)?rt(xte,Object.assign({seg:m,isDragging:!1,isSelected:v===r.eventSelection,defaultDisplayEventEnd:!1},oy(m,r.todayRange))):rt(kte,Object.assign({seg:m,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:v===r.eventSelection,defaultDisplayEventEnd:!1},oy(m,r.todayRange))))}))}})}}function dme(c){let r=[],a=[];for(let l of c)r.push(l.seg),l.isVisible||a.push(l.seg);return{allSegs:r,invisibleSegs:a}}const fme=El({week:"narrow"});class mme extends wp{constructor(){super(...arguments),this.rootElRef=Bd(),this.state={dayNumberId:JR()},this.handleRootEl=r=>{K1(this.rootElRef,r),K1(this.props.elRef,r)}}render(){let{context:r,props:a,state:l,rootElRef:i}=this,{options:m,dateEnv:v}=r,{date:C,dateProfile:E}=a;const T=a.showDayNumber&&gme(C,E.currentRange,v);return rt(aV,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...a.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},a.extraDataAttrs),a.showDayNumber?{"aria-labelledby":l.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:hme,date:C,dateProfile:E,todayRange:a.todayRange,showDayNumber:a.showDayNumber,isMonthStart:T,extraRenderProps:a.extraRenderProps},(N,V)=>rt("div",{ref:a.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:a.minHeight}},a.showWeekNumber&&rt(tte,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:yO(r,C,"week"),date:C,defaultFormat:fme}),!V.isDisabled&&(a.showDayNumber||lV(m)||a.forceDayTop)?rt("div",{className:"fc-daygrid-day-top"},rt(N,{elTag:"a",elClasses:["fc-daygrid-day-number",T&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},yO(r,C)),{id:l.dayNumberId})})):a.showDayNumber?rt("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},rt("a",{className:"fc-daygrid-day-number"}," ")):void 0,rt("div",{className:"fc-daygrid-day-events",ref:a.fgContentElRef},a.fgContent,rt("div",{className:"fc-daygrid-day-bottom",style:{marginTop:a.moreMarginTop}},rt(ume,{allDayDate:C,singlePlacements:a.singlePlacements,moreCnt:a.moreCnt,alignmentElRef:i,alignGridTop:!a.showDayNumber,extraDateSpan:a.extraDateSpan,dateProfile:a.dateProfile,eventSelection:a.eventSelection,eventDrag:a.eventDrag,eventResize:a.eventResize,todayRange:a.todayRange}))),rt("div",{className:"fc-daygrid-day-bg"},a.bgContent)))}}function hme(c){return c.dayNumberText||rt(Ya,null," ")}function gme(c,r,a){const{start:l,end:i}=r,m=ey(i,-1),v=a.getYear(l),C=a.getMonth(l),E=a.getYear(m),T=a.getMonth(m);return!(v===E&&C===T)&&(c.valueOf()===l.valueOf()||a.getDay(c)===1&&c.valueOf()<i.valueOf())}function Ate(c){return c.eventRange.instance.instanceId+":"+c.firstCol}function Tte(c){return Ate(c)+":"+c.lastCol}function pme(c,r,a,l,i,m,v){let C=new bme(ce=>{let q=c[ce.index].eventRange.instance.instanceId+":"+ce.span.start+":"+(ce.span.end-1);return i[q]||1});C.allowReslicing=!0,C.strictOrder=l,r===!0||a===!0?(C.maxCoord=m,C.hiddenConsumes=!0):typeof r=="number"?C.maxStackCnt=r:typeof a=="number"&&(C.maxStackCnt=a,C.hiddenConsumes=!0);let E=[],T=[];for(let ce=0;ce<c.length;ce+=1){let q=c[ce],X=Tte(q);i[X]!=null?E.push({index:ce,span:{start:q.firstCol,end:q.lastCol+1}}):T.push(q)}let N=C.addSegs(E),V=C.toRects(),{singleColPlacements:U,multiColPlacements:z,leftoverMargins:W}=vme(V,c,v),K=[],Z=[];for(let ce of T){z[ce.firstCol].push({seg:ce,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let q=ce.firstCol;q<=ce.lastCol;q+=1)U[q].push({seg:WS(ce,q,q+1,v),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let ce=0;ce<v.length;ce+=1)K.push(0);for(let ce of N){let q=c[ce.index],X=ce.span;z[X.start].push({seg:WS(q,X.start,X.end,v),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let Ce=X.start;Ce<X.end;Ce+=1)K[Ce]+=1,U[Ce].push({seg:WS(q,Ce,Ce+1,v),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let ce=0;ce<v.length;ce+=1)Z.push(W[ce]);return{singleColPlacements:U,multiColPlacements:z,moreCnts:K,moreMarginTops:Z}}function vme(c,r,a){let l=yme(c,a.length),i=[],m=[],v=[];for(let C=0;C<a.length;C+=1){let E=l[C],T=[],N=0,V=0;for(let z of E){let W=r[z.index];T.push({seg:WS(W,C,C+1,a),isVisible:!0,isAbsolute:!1,absoluteTop:z.levelCoord,marginTop:z.levelCoord-N}),N=z.levelCoord+z.thickness}let U=[];N=0,V=0;for(let z of E){let W=r[z.index],K=z.span.end-z.span.start>1,Z=z.span.start===C;V+=z.levelCoord-N,N=z.levelCoord+z.thickness,K?(V+=z.thickness,Z&&U.push({seg:WS(W,z.span.start,z.span.end,a),isVisible:!0,isAbsolute:!0,absoluteTop:z.levelCoord,marginTop:0})):Z&&(U.push({seg:WS(W,z.span.start,z.span.end,a),isVisible:!0,isAbsolute:!1,absoluteTop:z.levelCoord,marginTop:V}),V=0)}i.push(T),m.push(U),v.push(V)}return{singleColPlacements:i,multiColPlacements:m,leftoverMargins:v}}function yme(c,r){let a=[];for(let l=0;l<r;l+=1)a.push([]);for(let l of c)for(let i=l.span.start;i<l.span.end;i+=1)a[i].push(l);return a}function WS(c,r,a,l){if(c.firstCol===r&&c.lastCol===a-1)return c;let i=c.eventRange,m=i.range,v=Z2(m,{start:l[r].date,end:nd(l[a-1].date,1)});return Object.assign(Object.assign({},c),{firstCol:r,lastCol:a-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:v},isStart:c.isStart&&v.start.valueOf()===m.start.valueOf(),isEnd:c.isEnd&&v.end.valueOf()===m.end.valueOf()})}class bme extends $ee{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(r){const a=super.addSegs(r),{entriesByLevel:l}=this,i=m=>!this.forceHidden[Y2(m)];for(let m=0;m<l.length;m+=1)l[m]=l[m].filter(i);return a}handleInvalidInsertion(r,a,l){const{entriesByLevel:i,forceHidden:m}=this,{touchingEntry:v,touchingLevel:C,touchingLateral:E}=r;if(this.hiddenConsumes&&v){const T=Y2(v);if(!m[T])if(this.allowReslicing){const N=Object.assign(Object.assign({},v),{span:Q$(v.span,a.span)}),V=Y2(N);m[V]=!0,i[C][E]=N,l.push(N),this.splitEntry(v,a,l)}else m[T]=!0,l.push(v)}super.handleInvalidInsertion(r,a,l)}}class Dte extends wp{constructor(){super(...arguments),this.cellElRefs=new X1,this.frameElRefs=new X1,this.fgElRefs=new X1,this.segHarnessRefs=new X1,this.rootElRef=Bd(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=r=>{r&&this.updateSizing(!0)}}render(){let{props:r,state:a,context:l}=this,{options:i}=l,m=r.cells.length,v=EO(r.businessHourSegs,m),C=EO(r.bgEventSegs,m),E=EO(this.getHighlightSegs(),m),T=EO(this.getMirrorSegs(),m),{singleColPlacements:N,multiColPlacements:V,moreCnts:U,moreMarginTops:z}=pme(Aee(r.fgEventSegs,i.eventOrder),r.dayMaxEvents,r.dayMaxEventRows,i.eventOrderStrict,a.segHeights,a.maxContentHeight,r.cells),W=r.eventDrag&&r.eventDrag.affectedInstances||r.eventResize&&r.eventResize.affectedInstances||{};return rt("tr",{ref:this.rootElRef,role:"row"},r.renderIntro&&r.renderIntro(),r.cells.map((K,Z)=>{let ce=this.renderFgSegs(Z,r.forPrint?N[Z]:V[Z],r.todayRange,W),q=this.renderFgSegs(Z,Cme(T[Z],V),r.todayRange,{},!!r.eventDrag,!!r.eventResize,!1);return rt(mme,{key:K.key,elRef:this.cellElRefs.createRef(K.key),innerElRef:this.frameElRefs.createRef(K.key),dateProfile:r.dateProfile,date:K.date,showDayNumber:r.showDayNumbers,showWeekNumber:r.showWeekNumbers&&Z===0,forceDayTop:r.showWeekNumbers,todayRange:r.todayRange,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,extraRenderProps:K.extraRenderProps,extraDataAttrs:K.extraDataAttrs,extraClassNames:K.extraClassNames,extraDateSpan:K.extraDateSpan,moreCnt:U[Z],moreMarginTop:z[Z],singlePlacements:N[Z],fgContentElRef:this.fgElRefs.createRef(K.key),fgContent:rt(Ya,null,rt(Ya,null,ce),rt(Ya,null,q)),bgContent:rt(Ya,null,this.renderFillSegs(E[Z],"highlight"),this.renderFillSegs(v[Z],"non-business"),this.renderFillSegs(C[Z],"bg-event")),minHeight:r.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(r,a){let l=this.props;this.updateSizing(!_p(r,l))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:r}=this;return r.eventDrag&&r.eventDrag.segs.length?r.eventDrag.segs:r.eventResize&&r.eventResize.segs.length?r.eventResize.segs:r.dateSelectionSegs}getMirrorSegs(){let{props:r}=this;return r.eventResize&&r.eventResize.segs.length?r.eventResize.segs:[]}renderFgSegs(r,a,l,i,m,v,C){let{context:E}=this,{eventSelection:T}=this.props,{framePositions:N}=this.state,V=this.props.cells.length===1,U=m||v||C,z=[];if(N)for(let W of a){let{seg:K}=W,{instanceId:Z}=K.eventRange.instance,ce=W.isVisible&&!i[Z],q=W.isAbsolute,X="",Ce="";q&&(E.isRtl?(Ce=0,X=N.lefts[K.lastCol]-N.lefts[K.firstCol]):(X=0,Ce=N.rights[K.firstCol]-N.rights[K.lastCol])),z.push(rt("div",{className:"fc-daygrid-event-harness"+(q?" fc-daygrid-event-harness-abs":""),key:Ate(K),ref:U?null:this.segHarnessRefs.createRef(Tte(K)),style:{visibility:ce?"":"hidden",marginTop:q?"":W.marginTop,top:q?W.absoluteTop:"",left:X,right:Ce}},Ete(K)?rt(xte,Object.assign({seg:K,isDragging:m,isSelected:Z===T,defaultDisplayEventEnd:V},oy(K,l))):rt(kte,Object.assign({seg:K,isDragging:m,isResizing:v,isDateSelecting:C,isSelected:Z===T,defaultDisplayEventEnd:V},oy(K,l)))))}return z}renderFillSegs(r,a){let{isRtl:l}=this.context,{todayRange:i}=this.props,{framePositions:m}=this.state,v=[];if(m)for(let C of r){let E=l?{right:0,left:m.lefts[C.lastCol]-m.lefts[C.firstCol]}:{left:0,right:m.rights[C.firstCol]-m.rights[C.lastCol]};v.push(rt("div",{key:Dee(C.eventRange),className:"fc-daygrid-bg-harness",style:E},a==="bg-event"?rt(Jee,Object.assign({seg:C},oy(C,i))):ete(a)))}return rt(Ya,{},...v)}updateSizing(r){let{props:a,state:l,frameElRefs:i}=this;if(!a.forPrint&&a.clientWidth!==null){if(r){let E=a.cells.map(T=>i.currentMap[T.key]);if(E.length){let T=this.rootElRef.current,N=new US(T,E,!0,!1);(!l.framePositions||!l.framePositions.similarTo(N))&&this.setState({framePositions:new US(T,E,!0,!1)})}}const m=this.state.segHeights,v=this.querySegHeights(),C=a.dayMaxEvents===!0||a.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},m),v),maxContentHeight:C?this.computeMaxContentHeight():null})}}querySegHeights(){let r=this.segHarnessRefs.currentMap,a={};for(let l in r){let i=Math.round(r[l].getBoundingClientRect().height);a[l]=Math.max(a[l]||0,i)}return a}computeMaxContentHeight(){let r=this.props.cells[0].key,a=this.cellElRefs.currentMap[r],l=this.fgElRefs.currentMap[r];return a.getBoundingClientRect().bottom-l.getBoundingClientRect().top}getCellEls(){let r=this.cellElRefs.currentMap;return this.props.cells.map(a=>r[a.key])}}Dte.addStateEquality({segHeights:_p});function Cme(c,r){if(!c.length)return[];let a=_me(r);return c.map(l=>({seg:l,isVisible:!0,isAbsolute:!0,absoluteTop:a[l.eventRange.instance.instanceId],marginTop:0}))}function _me(c){let r={};for(let a of c)for(let l of a)r[l.seg.eventRange.instance.instanceId]=l.absoluteTop;return r}class wme extends wp{constructor(){super(...arguments),this.splitBusinessHourSegs=Ms(SO),this.splitBgEventSegs=Ms(SO),this.splitFgEventSegs=Ms(SO),this.splitDateSelectionSegs=Ms(SO),this.splitEventDrag=Ms(wte),this.splitEventResize=Ms(wte),this.rowRefs=new X1}render(){let{props:r,context:a}=this,l=r.cells.length,i=this.splitBusinessHourSegs(r.businessHourSegs,l),m=this.splitBgEventSegs(r.bgEventSegs,l),v=this.splitFgEventSegs(r.fgEventSegs,l),C=this.splitDateSelectionSegs(r.dateSelectionSegs,l),E=this.splitEventDrag(r.eventDrag,l),T=this.splitEventResize(r.eventResize,l),N=l>=7&&r.clientWidth?r.clientWidth/a.options.aspectRatio/6:null;return rt(fA,{unit:"day"},(V,U)=>rt(Ya,null,r.cells.map((z,W)=>rt(Dte,{ref:this.rowRefs.createRef(W),key:z.length?z[0].date.toISOString():W,showDayNumbers:l>1,showWeekNumbers:r.showWeekNumbers,todayRange:U,dateProfile:r.dateProfile,cells:z,renderIntro:r.renderRowIntro,businessHourSegs:i[W],eventSelection:r.eventSelection,bgEventSegs:m[W].filter(Sme),fgEventSegs:v[W],dateSelectionSegs:C[W],eventDrag:E[W],eventResize:T[W],dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,clientWidth:r.clientWidth,clientHeight:r.clientHeight,cellMinHeight:N,forPrint:r.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const r=this.rowRefs.currentMap[0].getCellEls()[0],a=r?r.closest(".fc-daygrid-body"):null;a&&(this.rootEl=a,this.context.registerInteractiveComponent(this,{el:a,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new US(this.rootEl,this.rowRefs.collect().map(r=>r.getCellEls()[0]),!1,!0),this.colPositions=new US(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(r,a){let{colPositions:l,rowPositions:i}=this,m=l.leftToIndex(r),v=i.topToIndex(a);if(v!=null&&m!=null){let C=this.props.cells[v][m];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(v,m),allDay:!0},C.extraDateSpan),dayEl:this.getCellEl(v,m),rect:{left:l.lefts[m],right:l.rights[m],top:i.tops[v],bottom:i.bottoms[v]},layer:0}}return null}getCellEl(r,a){return this.rowRefs.currentMap[r].getCellEls()[a]}getCellRange(r,a){let l=this.props.cells[r][a].date,i=nd(l,1);return{start:l,end:i}}}function Sme(c){return c.eventRange.def.allDay}class Eme extends wp{constructor(){super(...arguments),this.elRef=Bd(),this.needsScrollReset=!1}render(){let{props:r}=this,{dayMaxEventRows:a,dayMaxEvents:l,expandRows:i}=r,m=l===!0||a===!0;m&&!i&&(m=!1,a=null,l=null);let v=["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return rt("div",{ref:this.elRef,className:v.join(" "),style:{width:r.clientWidth,minWidth:r.tableMinWidth}},rt("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:r.clientWidth,minWidth:r.tableMinWidth,height:i?r.clientHeight:""}},r.colGroupNode,rt("tbody",{role:"presentation"},rt(wme,{dateProfile:r.dateProfile,cells:r.cells,renderRowIntro:r.renderRowIntro,showWeekNumbers:r.showWeekNumbers,clientWidth:r.clientWidth,clientHeight:r.clientHeight,businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,fgEventSegs:r.fgEventSegs,dateSelectionSegs:r.dateSelectionSegs,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,dayMaxEvents:l,dayMaxEventRows:a,forPrint:r.forPrint,isHitComboAllowed:r.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(r){r.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const r=kme(this.elRef.current,this.props.dateProfile);if(r){const a=r.closest(".fc-daygrid-body"),l=a.closest(".fc-scroller"),i=r.getBoundingClientRect().top-a.getBoundingClientRect().top;l.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function kme(c,r){let a;return r.currentRangeUnit.match(/year|month/)&&(a=c.querySelector(`[data-date="${hce(r.currentDate)}-01"]`)),a||(a=c.querySelector(`[data-date="${S$(r.currentDate)}"]`)),a}class xme extends Gee{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(r,a){return a.sliceRange(r)}}class Rte extends wp{constructor(){super(...arguments),this.slicer=new xme,this.tableRef=Bd()}render(){let{props:r,context:a}=this;return rt(Eme,Object.assign({ref:this.tableRef},this.slicer.sliceProps(r,r.dateProfile,r.nextDayThreshold,a,r.dayTableModel),{dateProfile:r.dateProfile,cells:r.dayTableModel.cells,colGroupNode:r.colGroupNode,tableMinWidth:r.tableMinWidth,renderRowIntro:r.renderRowIntro,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.showWeekNumbers,expandRows:r.expandRows,headerAlignElRef:r.headerAlignElRef,clientWidth:r.clientWidth,clientHeight:r.clientHeight,forPrint:r.forPrint}))}}class Ame extends lme{constructor(){super(...arguments),this.buildDayTableModel=Ms(Tme),this.headerRef=Bd(),this.tableRef=Bd()}render(){let{options:r,dateProfileGenerator:a}=this.context,{props:l}=this,i=this.buildDayTableModel(l.dateProfile,a),m=r.dayHeaders&&rt(Uee,{ref:this.headerRef,dateProfile:l.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),v=C=>rt(Rte,{ref:this.tableRef,dateProfile:l.dateProfile,dayTableModel:i,businessHours:l.businessHours,dateSelection:l.dateSelection,eventStore:l.eventStore,eventUiBases:l.eventUiBases,eventSelection:l.eventSelection,eventDrag:l.eventDrag,eventResize:l.eventResize,nextDayThreshold:r.nextDayThreshold,colGroupNode:C.tableColGroupNode,tableMinWidth:C.tableMinWidth,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.weekNumbers,expandRows:!l.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:C.clientWidth,clientHeight:C.clientHeight,forPrint:l.forPrint});return r.dayMinWidth?this.renderHScrollLayout(m,v,i.colCnt,r.dayMinWidth):this.renderSimpleLayout(m,v)}}function Tme(c,r){let a=new Wee(c.renderRange,r);return new jee(a,/year|month|week/.test(c.currentRangeUnit))}class Dme extends cee{buildRenderRange(r,a,l){let i=super.buildRenderRange(r,a,l),{props:m}=this;return Rme({currentRange:i,snapToWeek:/^(year|month)$/.test(a),fixedWeekCount:m.fixedWeekCount,dateEnv:m.dateEnv})}}function Rme(c){let{dateEnv:r,currentRange:a}=c,{start:l,end:i}=a,m;if(c.snapToWeek&&(l=r.startOfWeek(l),m=r.startOfWeek(i),m.valueOf()!==i.valueOf()&&(i=UJ(m,1))),c.fixedWeekCount){let v=r.startOfWeek(r.startOfMonth(nd(a.end,-1))),C=Math.ceil(oce(v,i));i=UJ(i,6-C)}return{start:l,end:i}}var Ome=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';m$(Ome);var Ote=Q1({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Ame,dateProfileGeneratorClass:Dme},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class Nme extends Xue{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(r){return r.allDay?["allDay"]:["timed"]}getKeysForEventDef(r){return r.allDay?Tue(r)?["timed","allDay"]:["allDay"]:["timed"]}}const Ime=El({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Nte(c){let r=["fc-timegrid-slot","fc-timegrid-slot-label",c.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return rt(q1.Consumer,null,a=>{if(!c.isLabeled)return rt("td",{className:r.join(" "),"data-time":c.isoTimeStr});let{dateEnv:l,options:i,viewApi:m}=a,v=i.slotLabelFormat==null?Ime:Array.isArray(i.slotLabelFormat)?El(i.slotLabelFormat[0]):El(i.slotLabelFormat),C={level:0,time:c.time,date:l.toDate(c.date),view:m,text:l.format(c.date,v)};return rt(rm,{elTag:"td",elClasses:r,elAttrs:{"data-time":c.isoTimeStr},renderProps:C,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Bme,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},E=>rt("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},rt(E,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function Bme(c){return c.text}class Mme extends Li{render(){return this.props.slatMetas.map(r=>rt("tr",{key:r.key},rt(Nte,Object.assign({},r))))}}const Pme=El({week:"short"}),Lme=5;class Fme extends wp{constructor(){super(...arguments),this.allDaySplitter=new Nme,this.headerElRef=Bd(),this.rootElRef=Bd(),this.scrollerElRef=Bd(),this.state={slatCoords:null},this.handleScrollTopRequest=r=>{let a=this.scrollerElRef.current;a&&(a.scrollTop=r)},this.renderHeadAxis=(r,a="")=>{let{options:l}=this.context,{dateProfile:i}=this.props,m=i.renderRange,C=z2(m.start,m.end)===1?yO(this.context,m.start,"week"):{};return l.weekNumbers&&r==="day"?rt(tte,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:m.start,defaultFormat:Pme},E=>rt("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:a}},rt(E,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:C}))):rt("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},rt("div",{className:"fc-timegrid-axis-frame",style:{height:a}}))},this.renderTableRowAxis=r=>{let{options:a,viewApi:l}=this.context,i={text:a.allDayText,view:l};return rt(rm,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:a.allDayContent,defaultGenerator:$me,classNameGenerator:a.allDayClassNames,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount},m=>rt("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",r==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:r}},rt(m,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=r=>{this.setState({slatCoords:r})}}renderSimpleLayout(r,a,l){let{context:i,props:m}=this,v=[],C=wO(i.options);return r&&v.push({type:"header",key:"header",isSticky:C,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}}),a&&(v.push({type:"body",key:"all-day",chunk:{content:a}}),v.push({type:"body",key:"all-day-divider",outerContent:rt("tr",{role:"presentation",className:"fc-scrollgrid-section"},rt("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),v.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:l}}),rt(uO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},rt(sV,{liquid:!m.isHeightAuto&&!m.forPrint,collapsibleWidth:m.forPrint,cols:[{width:"shrink"}],sections:v}))}renderHScrollLayout(r,a,l,i,m,v,C){let E=this.context.pluginHooks.scrollGridImpl;if(!E)throw new Error("No ScrollGrid implementation");let{context:T,props:N}=this,V=!N.forPrint&&wO(T.options),U=!N.forPrint&&Xee(T.options),z=[];r&&z.push({type:"header",key:"header",isSticky:V,syncRowHeights:!0,chunks:[{key:"axis",rowContent:K=>rt("tr",{role:"presentation"},this.renderHeadAxis("day",K.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:r}]}),a&&(z.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:K=>rt("tr",{role:"presentation"},this.renderTableRowAxis(K.rowSyncHeights[0]))},{key:"cols",content:a}]}),z.push({key:"all-day-divider",type:"body",outerContent:rt("tr",{role:"presentation",className:"fc-scrollgrid-section"},rt("td",{colSpan:2,className:"fc-timegrid-divider "+T.theme.getClass("tableCellShaded")}))}));let W=T.options.nowIndicator;return z.push({type:"body",key:"body",liquid:!0,expandRows:!!T.options.expandRows,chunks:[{key:"axis",content:K=>rt("div",{className:"fc-timegrid-axis-chunk"},rt("table",{"aria-hidden":!0,style:{height:K.expandRows?K.clientHeight:""}},K.tableColGroupNode,rt("tbody",null,rt(Mme,{slatMetas:v}))),rt("div",{className:"fc-timegrid-now-indicator-container"},rt(fA,{unit:W?"minute":"day"},Z=>{let ce=W&&C&&C.safeComputeTop(Z);return typeof ce=="number"?rt(iV,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:ce},isAxis:!0,date:Z}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:l}]}),U&&z.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:oV},{key:"cols",content:oV}]}),rt(uO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:T.viewSpec},rt(E,{liquid:!N.isHeightAuto&&!N.forPrint,forPrint:N.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:m}]}],sections:z}))}getAllDayMaxEventProps(){let{dayMaxEvents:r,dayMaxEventRows:a}=this.context.options;return(r===!0||a===!0)&&(r=void 0,a=Lme),{dayMaxEvents:r,dayMaxEventRows:a}}}function $me(c){return c.text}class Vme{constructor(r,a,l){this.positions=r,this.dateProfile=a,this.slotDuration=l}safeComputeTop(r){let{dateProfile:a}=this;if(Y1(a.currentRange,r)){let l=Oa(r),i=r.valueOf()-l.valueOf();if(i>=rg(a.slotMinTime)&&i<rg(a.slotMaxTime))return this.computeTimeTop(ni(i))}return null}computeDateTop(r,a){return a||(a=Oa(r)),this.computeTimeTop(ni(r.valueOf()-a.valueOf()))}computeTimeTop(r){let{positions:a,dateProfile:l}=this,i=a.els.length,m=(r.milliseconds-rg(l.slotMinTime))/rg(this.slotDuration),v,C;return m=Math.max(0,m),m=Math.min(i,m),v=Math.floor(m),v=Math.min(v,i-1),C=m-v,a.tops[v]+a.getHeight(v)*C}}class Hme extends Li{render(){let{props:r,context:a}=this,{options:l}=a,{slatElRefs:i}=r;return rt("tbody",null,r.slatMetas.map((m,v)=>{let C={time:m.time,date:a.dateEnv.toDate(m.date),view:a.viewApi};return rt("tr",{key:m.key,ref:i.createRef(m.key)},r.axis&&rt(Nte,Object.assign({},m)),rt(rm,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!m.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":m.isoTimeStr},renderProps:C,generatorName:"slotLaneContent",customGenerator:l.slotLaneContent,classNameGenerator:l.slotLaneClassNames,didMount:l.slotLaneDidMount,willUnmount:l.slotLaneWillUnmount}))}))}}class zme extends Li{constructor(){super(...arguments),this.rootElRef=Bd(),this.slatElRefs=new X1}render(){let{props:r,context:a}=this;return rt("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},rt("table",{"aria-hidden":!0,className:a.theme.getClass("table"),style:{minWidth:r.tableMinWidth,width:r.clientWidth,height:r.minHeight}},r.tableColGroupNode,rt(Hme,{slatElRefs:this.slatElRefs,axis:r.axis,slatMetas:r.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:r,props:a}=this;a.onCoords&&a.clientWidth!==null&&this.rootElRef.current.offsetHeight&&a.onCoords(new Vme(new US(this.rootElRef.current,Ume(this.slatElRefs.currentMap,a.slatMetas),!1,!0),this.props.dateProfile,r.options.slotDuration))}}function Ume(c,r){return r.map(a=>c[a.key])}function mA(c,r){let a=[],l;for(l=0;l<r;l+=1)a.push([]);if(c)for(l=0;l<c.length;l+=1)a[c[l].col].push(c[l]);return a}function Ite(c,r){let a=[];if(c){for(let l=0;l<r;l+=1)a[l]={affectedInstances:c.affectedInstances,isEvent:c.isEvent,segs:[]};for(let l of c.segs)a[l.col].segs.push(l)}else for(let l=0;l<r;l+=1)a[l]=null;return a}class Wme extends Li{render(){let{props:r}=this;return rt(nte,{elClasses:["fc-timegrid-more-link"],elStyle:{top:r.top,bottom:r.bottom},allDayDate:null,moreCnt:r.hiddenSegs.length,allSegs:r.hiddenSegs,hiddenSegs:r.hiddenSegs,extraDateSpan:r.extraDateSpan,dateProfile:r.dateProfile,todayRange:r.todayRange,popoverContent:()=>Lte(r.hiddenSegs,r),defaultGenerator:jme,forceTimed:!0},a=>rt(a,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function jme(c){return c.shortText}function Gme(c,r,a){let l=new $ee;r!=null&&(l.strictOrder=r),a!=null&&(l.maxStackCnt=a);let i=l.addSegs(c),m=ude(i),v=Zme(l);return v=Xme(v,1),{segRects:Qme(v),hiddenGroups:m}}function Zme(c){const{entriesByLevel:r}=c,a=mV((l,i)=>l+":"+i,(l,i)=>{let m=Yme(c,l,i),v=Bte(m,a),C=r[l][i];return[Object.assign(Object.assign({},C),{nextLevelNodes:v[0]}),C.thickness+v[1]]});return Bte(r.length?{level:0,lateralStart:0,lateralEnd:r[0].length}:null,a)[0]}function Bte(c,r){if(!c)return[[],0];let{level:a,lateralStart:l,lateralEnd:i}=c,m=l,v=[];for(;m<i;)v.push(r(a,m)),m+=1;return v.sort(qme),[v.map(Kme),v[0][1]]}function qme(c,r){return r[1]-c[1]}function Kme(c){return c[0]}function Yme(c,r,a){let{levelCoords:l,entriesByLevel:i}=c,m=i[r][a],v=l[r]+m.thickness,C=l.length,E=r;for(;E<C&&l[E]<v;E+=1);for(;E<C;E+=1){let T=i[E],N,V=eV(T,m.span.start,X$),U=V[0]+V[1],z=U;for(;(N=T[z])&&N.span.start<m.span.end;)z+=1;if(U<z)return{level:E,lateralStart:U,lateralEnd:z}}return null}function Xme(c,r){const a=mV((l,i,m)=>Y2(l),(l,i,m)=>{let{nextLevelNodes:v,thickness:C}=l,E=C+m,T=C/E,N,V=[];if(!v.length)N=r;else for(let z of v)if(N===void 0){let W=a(z,i,E);N=W[0],V.push(W[1])}else{let W=a(z,N,0);V.push(W[1])}let U=(N-i)*T;return[N-U,Object.assign(Object.assign({},l),{thickness:U,nextLevelNodes:V})]});return c.map(l=>a(l,0,0)[1])}function Qme(c){let r=[];const a=mV((i,m,v)=>Y2(i),(i,m,v)=>{let C=Object.assign(Object.assign({},i),{levelCoord:m,stackDepth:v,stackForward:0});return r.push(C),C.stackForward=l(i.nextLevelNodes,m+i.thickness,v+1)+1});function l(i,m,v){let C=0;for(let E of i)C=Math.max(a(E,m,v),C);return C}return l(c,0,0),r}function mV(c,r){const a={};return(...l)=>{let i=c(...l);return i in a?a[i]:a[i]=r(...l)}}function Mte(c,r,a=null,l=0){let i=[];if(a)for(let m=0;m<c.length;m+=1){let v=c[m],C=a.computeDateTop(v.start,r),E=Math.max(C+(l||0),a.computeDateTop(v.end,r));i.push({start:Math.round(C),end:Math.round(E)})}return i}function Jme(c,r,a,l){let i=[],m=[];for(let T=0;T<c.length;T+=1){let N=r[T];N?i.push({index:T,thickness:1,span:N}):m.push(c[T])}let{segRects:v,hiddenGroups:C}=Gme(i,a,l),E=[];for(let T of v)E.push({seg:c[T.index],rect:T});for(let T of m)E.push({seg:T,rect:null});return{segPlacements:E,hiddenGroups:C}}const ehe=El({hour:"numeric",minute:"2-digit",meridiem:!1});class Pte extends Li{render(){return rt(Qee,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ehe}))}}class the extends Li{constructor(){super(...arguments),this.sortEventSegs=Ms(Aee)}render(){let{props:r,context:a}=this,{options:l}=a,i=l.selectMirror,m=r.eventDrag&&r.eventDrag.segs||r.eventResize&&r.eventResize.segs||i&&r.dateSelectionSegs||[],v=r.eventDrag&&r.eventDrag.affectedInstances||r.eventResize&&r.eventResize.affectedInstances||{},C=this.sortEventSegs(r.fgEventSegs,l.eventOrder);return rt(aV,{elTag:"td",elRef:r.elRef,elClasses:["fc-timegrid-col",...r.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},r.extraDataAttrs),date:r.date,dateProfile:r.dateProfile,todayRange:r.todayRange,extraRenderProps:r.extraRenderProps},E=>rt("div",{className:"fc-timegrid-col-frame"},rt("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(r.businessHourSegs,"non-business"),this.renderFillSegs(r.bgEventSegs,"bg-event"),this.renderFillSegs(r.dateSelectionSegs,"highlight")),rt("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(C,v,!1,!1,!1)),rt("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(m,{},!!r.eventDrag,!!r.eventResize,!!i,"mirror")),rt("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(r.nowIndicatorSegs)),lV(l)&&rt(E,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(r,a,l,i,m,v){let{props:C}=this;return C.forPrint?Lte(r,C):this.renderPositionedFgSegs(r,a,l,i,m,v)}renderPositionedFgSegs(r,a,l,i,m,v){let{eventMaxStack:C,eventShortHeight:E,eventOrderStrict:T,eventMinHeight:N}=this.context.options,{date:V,slatCoords:U,eventSelection:z,todayRange:W,nowDate:K}=this.props,Z=l||i||m,ce=Mte(r,V,U,N),{segPlacements:q,hiddenGroups:X}=Jme(r,ce,T,C);return rt(Ya,null,this.renderHiddenGroups(X,r),q.map(Ce=>{let{seg:st,rect:Ne}=Ce,ee=st.eventRange.instance.instanceId,xe=Z||!!(!a[ee]&&Ne),et=hV(Ne&&Ne.span),tt=!Z&&Ne?this.computeSegHStyle(Ne):{left:0,right:0},je=!!Ne&&Ne.stackForward>0,be=!!Ne&&Ne.span.end-Ne.span.start<E;return rt("div",{className:"fc-timegrid-event-harness"+(je?" fc-timegrid-event-harness-inset":""),key:v||ee,style:Object.assign(Object.assign({visibility:xe?"":"hidden"},et),tt)},rt(Pte,Object.assign({seg:st,isDragging:l,isResizing:i,isDateSelecting:m,isSelected:ee===z,isShort:be},oy(st,W,K))))}))}renderHiddenGroups(r,a){let{extraDateSpan:l,dateProfile:i,todayRange:m,nowDate:v,eventSelection:C,eventDrag:E,eventResize:T}=this.props;return rt(Ya,null,r.map(N=>{let V=hV(N.span),U=nhe(N.entries,a);return rt(Wme,{key:ZJ(ste(U)),hiddenSegs:U,top:V.top,bottom:V.bottom,extraDateSpan:l,dateProfile:i,todayRange:m,nowDate:v,eventSelection:C,eventDrag:E,eventResize:T})}))}renderFillSegs(r,a){let{props:l,context:i}=this,v=Mte(r,l.date,l.slatCoords,i.options.eventMinHeight).map((C,E)=>{let T=r[E];return rt("div",{key:Dee(T.eventRange),className:"fc-timegrid-bg-harness",style:hV(C)},a==="bg-event"?rt(Jee,Object.assign({seg:T},oy(T,l.todayRange,l.nowDate))):ete(a))});return rt(Ya,null,v)}renderNowIndicator(r){let{slatCoords:a,date:l}=this.props;return a?r.map((i,m)=>rt(iV,{key:m,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:a.computeDateTop(i.start,l)},isAxis:!1,date:l})):null}computeSegHStyle(r){let{isRtl:a,options:l}=this.context,i=l.slotEventOverlap,m=r.levelCoord,v=r.levelCoord+r.thickness,C,E;i&&(v=Math.min(1,m+(v-m)*2)),a?(C=1-v,E=m):(C=m,E=1-v);let T={zIndex:r.stackDepth+1,left:C*100+"%",right:E*100+"%"};return i&&!r.stackForward&&(T[a?"marginLeft":"marginRight"]=10*2),T}}function Lte(c,{todayRange:r,nowDate:a,eventSelection:l,eventDrag:i,eventResize:m}){let v=(i?i.affectedInstances:null)||(m?m.affectedInstances:null)||{};return rt(Ya,null,c.map(C=>{let E=C.eventRange.instance.instanceId;return rt("div",{key:E,style:{visibility:v[E]?"hidden":""}},rt(Pte,Object.assign({seg:C,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:E===l,isShort:!1},oy(C,r,a))))}))}function hV(c){return c?{top:c.start,bottom:-c.end}:{top:"",bottom:""}}function nhe(c,r){return c.map(a=>r[a.index])}class ohe extends Li{constructor(){super(...arguments),this.splitFgEventSegs=Ms(mA),this.splitBgEventSegs=Ms(mA),this.splitBusinessHourSegs=Ms(mA),this.splitNowIndicatorSegs=Ms(mA),this.splitDateSelectionSegs=Ms(mA),this.splitEventDrag=Ms(Ite),this.splitEventResize=Ms(Ite),this.rootElRef=Bd(),this.cellElRefs=new X1}render(){let{props:r,context:a}=this,l=a.options.nowIndicator&&r.slatCoords&&r.slatCoords.safeComputeTop(r.nowDate),i=r.cells.length,m=this.splitFgEventSegs(r.fgEventSegs,i),v=this.splitBgEventSegs(r.bgEventSegs,i),C=this.splitBusinessHourSegs(r.businessHourSegs,i),E=this.splitNowIndicatorSegs(r.nowIndicatorSegs,i),T=this.splitDateSelectionSegs(r.dateSelectionSegs,i),N=this.splitEventDrag(r.eventDrag,i),V=this.splitEventResize(r.eventResize,i);return rt("div",{className:"fc-timegrid-cols",ref:this.rootElRef},rt("table",{role:"presentation",style:{minWidth:r.tableMinWidth,width:r.clientWidth}},r.tableColGroupNode,rt("tbody",{role:"presentation"},rt("tr",{role:"row"},r.axis&&rt("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},rt("div",{className:"fc-timegrid-col-frame"},rt("div",{className:"fc-timegrid-now-indicator-container"},typeof l=="number"&&rt(iV,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:l},isAxis:!0,date:r.nowDate})))),r.cells.map((U,z)=>rt(the,{key:U.key,elRef:this.cellElRefs.createRef(U.key),dateProfile:r.dateProfile,date:U.date,nowDate:r.nowDate,todayRange:r.todayRange,extraRenderProps:U.extraRenderProps,extraDataAttrs:U.extraDataAttrs,extraClassNames:U.extraClassNames,extraDateSpan:U.extraDateSpan,fgEventSegs:m[z],bgEventSegs:v[z],businessHourSegs:C[z],nowIndicatorSegs:E[z],dateSelectionSegs:T[z],eventDrag:N[z],eventResize:V[z],slatCoords:r.slatCoords,eventSelection:r.eventSelection,forPrint:r.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:r}=this;r.onColCoords&&r.clientWidth!==null&&r.onColCoords(new US(this.rootElRef.current,she(this.cellElRefs.currentMap,r.cells),!0,!1))}}function she(c,r){return r.map(a=>c[a.key])}class rhe extends wp{constructor(){super(...arguments),this.processSlotOptions=Ms(ihe),this.state={slatCoords:null},this.handleRootEl=r=>{r?this.context.registerInteractiveComponent(this,{el:r,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=r=>{let{onScrollTopRequest:a}=this.props,{slatCoords:l}=this.state;if(a&&l){if(r.time){let i=l.computeTimeTop(r.time);i=Math.ceil(i),i&&(i+=1),a(i)}return!0}return!1},this.handleColCoords=r=>{this.colCoords=r},this.handleSlatCoords=r=>{this.setState({slatCoords:r}),this.props.onSlatCoords&&this.props.onSlatCoords(r)}}render(){let{props:r,state:a}=this;return rt("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:r.clientWidth,minWidth:r.tableMinWidth}},rt(zme,{axis:r.axis,dateProfile:r.dateProfile,slatMetas:r.slatMetas,clientWidth:r.clientWidth,minHeight:r.expandRows?r.clientHeight:"",tableMinWidth:r.tableMinWidth,tableColGroupNode:r.axis?r.tableColGroupNode:null,onCoords:this.handleSlatCoords}),rt(ohe,{cells:r.cells,axis:r.axis,dateProfile:r.dateProfile,businessHourSegs:r.businessHourSegs,bgEventSegs:r.bgEventSegs,fgEventSegs:r.fgEventSegs,dateSelectionSegs:r.dateSelectionSegs,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,todayRange:r.todayRange,nowDate:r.nowDate,nowIndicatorSegs:r.nowIndicatorSegs,clientWidth:r.clientWidth,tableMinWidth:r.tableMinWidth,tableColGroupNode:r.tableColGroupNode,slatCoords:a.slatCoords,onColCoords:this.handleColCoords,forPrint:r.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(r){this.scrollResponder.update(r.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(r,a){let{dateEnv:l,options:i}=this.context,{colCoords:m}=this,{dateProfile:v}=this.props,{slatCoords:C}=this.state,{snapDuration:E,snapsPerSlot:T}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),N=m.leftToIndex(r),V=C.positions.topToIndex(a);if(N!=null&&V!=null){let U=this.props.cells[N],z=C.positions.tops[V],W=C.positions.getHeight(V),K=(a-z)/W,Z=Math.floor(K*T),ce=V*T+Z,q=this.props.cells[N].date,X=b$(v.slotMinTime,Jle(E,ce)),Ce=l.add(q,X),st=l.add(Ce,E);return{dateProfile:v,dateSpan:Object.assign({range:{start:Ce,end:st},allDay:!1},U.extraDateSpan),dayEl:m.els[N],rect:{left:m.lefts[N],right:m.rights[N],top:z,bottom:z+W},layer:0}}return null}}function ihe(c,r){let a=r||c,l=C$(c,a);return l===null&&(a=c,l=1),{snapDuration:a,snapsPerSlot:l}}class ahe extends Gee{sliceRange(r,a){let l=[];for(let i=0;i<a.length;i+=1){let m=Z2(r,a[i]);m&&l.push({start:m.start,end:m.end,isStart:m.start.valueOf()===r.start.valueOf(),isEnd:m.end.valueOf()===r.end.valueOf(),col:i})}return l}}class lhe extends wp{constructor(){super(...arguments),this.buildDayRanges=Ms(che),this.slicer=new ahe,this.timeColsRef=Bd()}render(){let{props:r,context:a}=this,{dateProfile:l,dayTableModel:i}=r,{nowIndicator:m,nextDayThreshold:v}=a.options,C=this.buildDayRanges(i,l,a.dateEnv);return rt(fA,{unit:m?"minute":"day"},(E,T)=>rt(rhe,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(r,l,null,a,C),{forPrint:r.forPrint,axis:r.axis,dateProfile:l,slatMetas:r.slatMetas,slotDuration:r.slotDuration,cells:i.cells[0],tableColGroupNode:r.tableColGroupNode,tableMinWidth:r.tableMinWidth,clientWidth:r.clientWidth,clientHeight:r.clientHeight,expandRows:r.expandRows,nowDate:E,nowIndicatorSegs:m&&this.slicer.sliceNowDate(E,l,v,a,C),todayRange:T,onScrollTopRequest:r.onScrollTopRequest,onSlatCoords:r.onSlatCoords})))}}function che(c,r,a){let l=[];for(let i of c.headerDates)l.push({start:a.add(i,r.slotMinTime),end:a.add(i,r.slotMaxTime)});return l}const Fte=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function uhe(c,r,a,l,i){let m=new Date(0),v=c,C=ni(0),E=a||dhe(l),T=[];for(;rg(v)<rg(r);){let N=i.add(m,v),V=C$(C,E)!==null;T.push({date:N,time:v,key:N.toISOString(),isoTimeStr:gce(N),isLabeled:V}),v=b$(v,l),C=b$(C,l)}return T}function dhe(c){let r,a,l;for(r=Fte.length-1;r>=0;r-=1)if(a=ni(Fte[r]),l=C$(a,c),l!==null&&l>1)return a;return c}class fhe extends Fme{constructor(){super(...arguments),this.buildTimeColsModel=Ms(mhe),this.buildSlatMetas=Ms(uhe)}render(){let{options:r,dateEnv:a,dateProfileGenerator:l}=this.context,{props:i}=this,{dateProfile:m}=i,v=this.buildTimeColsModel(m,l),C=this.allDaySplitter.splitProps(i),E=this.buildSlatMetas(m.slotMinTime,m.slotMaxTime,r.slotLabelInterval,r.slotDuration,a),{dayMinWidth:T}=r,N=!T,V=T,U=r.dayHeaders&&rt(Uee,{dates:v.headerDates,dateProfile:m,datesRepDistinctDays:!0,renderIntro:N?this.renderHeadAxis:null}),z=r.allDaySlot!==!1&&(K=>rt(Rte,Object.assign({},C.allDay,{dateProfile:m,dayTableModel:v,nextDayThreshold:r.nextDayThreshold,tableMinWidth:K.tableMinWidth,colGroupNode:K.tableColGroupNode,renderRowIntro:N?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:K.clientWidth,clientHeight:K.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),W=K=>rt(lhe,Object.assign({},C.timed,{dayTableModel:v,dateProfile:m,axis:N,slotDuration:r.slotDuration,slatMetas:E,forPrint:i.forPrint,tableColGroupNode:K.tableColGroupNode,tableMinWidth:K.tableMinWidth,clientWidth:K.clientWidth,clientHeight:K.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:K.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return V?this.renderHScrollLayout(U,z,W,v.colCnt,T,E,this.state.slatCoords):this.renderSimpleLayout(U,z,W)}}function mhe(c,r){let a=new Wee(c.renderRange,r);return new jee(a,!1)}var hhe='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';m$(hhe);var $te=Q1({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:fhe,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});tV.touchMouseIgnoreWait=500;let gV=0,kO=0,pV=!1;class Vte{constructor(r){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=a=>{if(!this.shouldIgnoreMouse()&&ghe(a)&&this.tryStart(a)){let l=this.createEventFromMouse(a,!0);this.emitter.trigger("pointerdown",l),this.initScrollWatch(l),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=a=>{let l=this.createEventFromMouse(a);this.recordCoords(l),this.emitter.trigger("pointermove",l)},this.handleMouseUp=a=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(a)),this.cleanup()},this.handleTouchStart=a=>{if(this.tryStart(a)){this.isTouchDragging=!0;let l=this.createEventFromTouch(a,!0);this.emitter.trigger("pointerdown",l),this.initScrollWatch(l);let i=a.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=a=>{let l=this.createEventFromTouch(a);this.recordCoords(l),this.emitter.trigger("pointermove",l)},this.handleTouchEnd=a=>{if(this.isDragging){let l=a.target;l.removeEventListener("touchmove",this.handleTouchMove),l.removeEventListener("touchend",this.handleTouchEnd),l.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(a)),this.cleanup(),this.isTouchDragging=!1,phe()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=a=>{if(!this.shouldIgnoreMove){let l=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:a,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:l,pageY:i,deltaX:l-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=r,this.emitter=new pO,r.addEventListener("mousedown",this.handleMouseDown),r.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),vhe()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),yhe()}tryStart(r){let a=this.querySubjectEl(r),l=r.target;return a&&(!this.handleSelector||td(l,this.handleSelector))?(this.subjectEl=a,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){pV=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(r){return this.selector?td(r.target,this.selector):this.containerEl}shouldIgnoreMouse(){return gV||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(pV=!0)}initScrollWatch(r){this.shouldWatchScroll&&(this.recordCoords(r),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(r){this.shouldWatchScroll&&(this.prevPageX=r.pageX,this.prevPageY=r.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(r,a){let l=0,i=0;return a?(this.origPageX=r.pageX,this.origPageY=r.pageY):(l=r.pageX-this.origPageX,i=r.pageY-this.origPageY),{origEvent:r,isTouch:!1,subjectEl:this.subjectEl,pageX:r.pageX,pageY:r.pageY,deltaX:l,deltaY:i}}createEventFromTouch(r,a){let l=r.touches,i,m,v=0,C=0;return l&&l.length?(i=l[0].pageX,m=l[0].pageY):(i=r.pageX,m=r.pageY),a?(this.origPageX=i,this.origPageY=m):(v=i-this.origPageX,C=m-this.origPageY),{origEvent:r,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:m,deltaX:v,deltaY:C}}}function ghe(c){return c.button===0&&!c.ctrlKey}function phe(){gV+=1,setTimeout(()=>{gV-=1},tV.touchMouseIgnoreWait)}function vhe(){kO+=1,kO===1&&window.addEventListener("touchmove",Hte,{passive:!1})}function yhe(){kO-=1,kO||window.removeEventListener("touchmove",Hte,{passive:!1})}function Hte(c){pV&&c.preventDefault()}class bhe{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(r,a,l){this.sourceEl=r,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=a-window.scrollX,this.origScreenY=l-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(r,a){this.deltaX=r-window.scrollX-this.origScreenX,this.deltaY=a-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(r){r?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=r,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=r)}stop(r,a){let l=()=>{this.cleanup(),a()};r&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(l,this.revertDuration):setTimeout(l,0)}doRevertAnimation(r,a){let l=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();l.style.transition="top "+a+"ms,left "+a+"ms",iA(l,{left:i.left,top:i.top}),Fle(l,()=>{l.style.transition="",r()})}cleanup(){this.mirrorEl&&(p$(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&iA(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let r=this.sourceElRect,a=this.mirrorEl;return a||(a=this.mirrorEl=this.sourceEl.cloneNode(!0),a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.pointerEvents="none",a.classList.add("fc-event-dragging"),iA(a,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:r.right-r.left,height:r.bottom-r.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(a)),a}}class zte extends Y${constructor(r,a){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=r,this.doesListening=a,this.scrollTop=this.origScrollTop=r.getScrollTop(),this.scrollLeft=this.origScrollLeft=r.getScrollLeft(),this.scrollWidth=r.getScrollWidth(),this.scrollHeight=r.getScrollHeight(),this.clientWidth=r.getClientWidth(),this.clientHeight=r.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(r){this.scrollController.setScrollTop(r),this.doesListening||(this.scrollTop=Math.max(Math.min(r,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(r){this.scrollController.setScrollLeft(r),this.doesListening||(this.scrollLeft=Math.max(Math.min(r,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class Ute extends zte{constructor(r,a){super(new lde(r),a)}getEventTarget(){return this.scrollController.el}computeClientRect(){return ide(this.scrollController.el)}}class Che extends zte{constructor(r){super(new cde,r)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const Wte=typeof performance=="function"?performance.now:Date.now;class _he{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let r=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(r){let a=Wte();this.handleSide(r,(a-this.msSinceRequest)/1e3),this.requestAnimation(a)}else this.isAnimating=!1}}}start(r,a,l){this.isEnabled&&(this.scrollCaches=this.buildCaches(l),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(r,a))}handleMove(r,a){if(this.isEnabled){let l=r-window.scrollX,i=a-window.scrollY,m=this.pointerScreenY===null?0:i-this.pointerScreenY,v=this.pointerScreenX===null?0:l-this.pointerScreenX;m<0?this.everMovedUp=!0:m>0&&(this.everMovedDown=!0),v<0?this.everMovedLeft=!0:v>0&&(this.everMovedRight=!0),this.pointerScreenX=l,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Wte()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let r of this.scrollCaches)r.destroy();this.scrollCaches=null}}requestAnimation(r){this.msSinceRequest=r,requestAnimationFrame(this.animate)}handleSide(r,a){let{scrollCache:l}=r,{edgeThreshold:i}=this,m=i-r.distance,v=m*m/(i*i)*this.maxVelocity*a,C=1;switch(r.name){case"left":C=-1;case"right":l.setScrollLeft(l.getScrollLeft()+v*C);break;case"top":C=-1;case"bottom":l.setScrollTop(l.getScrollTop()+v*C);break}}computeBestEdge(r,a){let{edgeThreshold:l}=this,i=null,m=this.scrollCaches||[];for(let v of m){let C=v.clientRect,E=r-C.left,T=C.right-r,N=a-C.top,V=C.bottom-a;E>=0&&T>=0&&N>=0&&V>=0&&(N<=l&&this.everMovedUp&&v.canScrollUp()&&(!i||i.distance>N)&&(i={scrollCache:v,name:"top",distance:N}),V<=l&&this.everMovedDown&&v.canScrollDown()&&(!i||i.distance>V)&&(i={scrollCache:v,name:"bottom",distance:V}),E<=l&&this.everMovedLeft&&v.canScrollLeft()&&(!i||i.distance>E)&&(i={scrollCache:v,name:"left",distance:E}),T<=l&&this.everMovedRight&&v.canScrollRight()&&(!i||i.distance>T)&&(i={scrollCache:v,name:"right",distance:T}))}return i}buildCaches(r){return this.queryScrollEls(r).map(a=>a===window?new Che(!1):new Ute(a,!1))}queryScrollEls(r){let a=[];for(let l of this.scrollQuery)typeof l=="object"?a.push(l):a.push(...Array.prototype.slice.call(r.getRootNode().querySelectorAll(l)));return a}}class hA extends fde{constructor(r,a){super(r),this.containerEl=r,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,$le(document.body),Hle(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let m=this.minDistance,v,{deltaX:C,deltaY:E}=i;v=C*C+E*E,v>=m*m&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,Vle(document.body),zle(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let l=this.pointer=new Vte(r);l.emitter.on("pointerdown",this.onPointerDown),l.emitter.on("pointermove",this.onPointerMove),l.emitter.on("pointerup",this.onPointerUp),a&&(l.selector=a),this.mirror=new bhe,this.autoScroller=new _he}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(r){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(r)},this.delay):this.handleDelayEnd(r)}handleDelayEnd(r){this.isDelayEnded=!0,this.tryStartDrag(r)}handleDistanceSurpassed(r){this.isDistanceSurpassed=!0,this.tryStartDrag(r)}tryStartDrag(r){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(r.pageX,r.pageY,this.containerEl),this.emitter.trigger("dragstart",r),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(r){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,r))}stopDrag(r){this.isDragging=!1,this.emitter.trigger("dragend",r)}setIgnoreMove(r){this.pointer.shouldIgnoreMove=r}setMirrorIsVisible(r){this.mirror.setIsVisible(r)}setMirrorNeedsRevert(r){this.mirrorNeedsRevert=r}setAutoScrollEnabled(r){this.autoScroller.isEnabled=r}}class whe{constructor(r){this.el=r,this.origRect=K$(r),this.scrollCaches=Fee(r).map(a=>new Ute(a,!0))}destroy(){for(let r of this.scrollCaches)r.destroy()}computeLeft(){let r=this.origRect.left;for(let a of this.scrollCaches)r+=a.origScrollLeft-a.getScrollLeft();return r}computeTop(){let r=this.origRect.top;for(let a of this.scrollCaches)r+=a.origScrollTop-a.getScrollTop();return r}isWithinClipping(r,a){let l={left:r,top:a};for(let i of this.scrollCaches)if(!She(i.getEventTarget())&&!Zue(l,i.clientRect))return!1;return!0}}function She(c){let r=c.tagName;return r==="HTML"||r==="BODY"}class xO{constructor(r,a){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=l=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(l),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",l)):i.setIgnoreMove(!0)},this.handleDragStart=l=>{this.emitter.trigger("dragstart",l),this.handleMove(l,!0)},this.handleDragMove=l=>{this.emitter.trigger("dragmove",l),this.handleMove(l)},this.handlePointerUp=l=>{this.releaseHits(),this.emitter.trigger("pointerup",l)},this.handleDragEnd=l=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,l),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",l)},this.droppableStore=a,r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("dragmove",this.handleDragMove),r.emitter.on("pointerup",this.handlePointerUp),r.emitter.on("dragend",this.handleDragEnd),this.dragging=r,this.emitter=new pO}processFirstCoord(r){let a={left:r.pageX,top:r.pageY},l=a,i=r.subjectEl,m;i instanceof HTMLElement&&(m=K$(i),l=que(l,m));let v=this.initialHit=this.queryHitForOffset(l.left,l.top);if(v){if(this.useSubjectCenter&&m){let C=Mee(m,v.rect);C&&(l=Kue(C))}this.coordAdjust=Yue(l,a)}else this.coordAdjust={left:0,top:0}}handleMove(r,a){let l=this.queryHitForOffset(r.pageX+this.coordAdjust.left,r.pageY+this.coordAdjust.top);(a||!AO(this.movingHit,l))&&(this.movingHit=l,this.emitter.trigger("hitupdate",l,!1,r))}prepareHits(){this.offsetTrackers=Z1(this.droppableStore,r=>(r.component.prepareHits(),new whe(r.el)))}releaseHits(){let{offsetTrackers:r}=this;for(let a in r)r[a].destroy();this.offsetTrackers={}}queryHitForOffset(r,a){let{droppableStore:l,offsetTrackers:i}=this,m=null;for(let v in l){let C=l[v].component,E=i[v];if(E&&E.isWithinClipping(r,a)){let T=E.computeLeft(),N=E.computeTop(),V=r-T,U=a-N,{origRect:z}=E,W=z.right-z.left,K=z.bottom-z.top;if(V>=0&&V<W&&U>=0&&U<K){let Z=C.queryHit(V,U,W,K);Z&&dO(Z.dateProfile.activeRange,Z.dateSpan.range)&&(this.disablePointCheck||E.el.contains(document.elementFromPoint(V+T-window.scrollX,U+N-window.scrollY)))&&(!m||Z.layer>m.layer)&&(Z.componentId=v,Z.context=C.context,Z.rect.left+=T,Z.rect.right+=T,Z.rect.top+=N,Z.rect.bottom+=N,m=Z)}}}return m}}function AO(c,r){return!c&&!r?!0:!!c!=!!r?!1:Lue(c.dateSpan,r.dateSpan)}function jte(c,r){let a={};for(let l of r.pluginHooks.datePointTransforms)Object.assign(a,l(c,r));return Object.assign(a,Ehe(c,r.dateEnv)),a}function Ehe(c,r){return{date:r.toDate(c.range.start),dateStr:r.formatIso(c.range.start,{omitTime:c.allDay}),allDay:c.allDay}}class khe extends zS{constructor(r){super(r),this.handlePointerDown=l=>{let{dragging:i}=this,m=l.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(m))},this.handleDragEnd=l=>{let{component:i}=this,{pointer:m}=this.dragging;if(!m.wasTouchScroll){let{initialHit:v,finalHit:C}=this.hitDragging;if(v&&C&&AO(v,C)){let{context:E}=i,T=Object.assign(Object.assign({},jte(v.dateSpan,E)),{dayEl:v.dayEl,jsEvent:l.origEvent,view:E.viewApi||E.calendarApi.view});E.emitter.trigger("dateClick",T)}}},this.dragging=new hA(r.el),this.dragging.autoScroller.isEnabled=!1;let a=this.hitDragging=new xO(this.dragging,U$(r));a.emitter.on("pointerdown",this.handlePointerDown),a.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class xhe extends zS{constructor(r){super(r),this.dragSelection=null,this.handlePointerDown=v=>{let{component:C,dragging:E}=this,{options:T}=C.context,N=T.selectable&&C.isValidDateDownEl(v.origEvent.target);E.setIgnoreMove(!N),E.delay=v.isTouch?Ahe(C):null},this.handleDragStart=v=>{this.component.context.calendarApi.unselect(v)},this.handleHitUpdate=(v,C)=>{let{context:E}=this.component,T=null,N=!1;if(v){let V=this.hitDragging.initialHit;v.componentId===V.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(V,v)||(T=The(V,v,E.pluginHooks.dateSelectionTransformers)),(!T||!yde(T,v.dateProfile,E))&&(N=!0,T=null)}T?E.dispatch({type:"SELECT_DATES",selection:T}):C||E.dispatch({type:"UNSELECT_DATES"}),N?v$():y$(),C||(this.dragSelection=T)},this.handlePointerUp=v=>{this.dragSelection&&(_ee(this.dragSelection,v,this.component.context),this.dragSelection=null)};let{component:a}=r,{options:l}=a.context,i=this.dragging=new hA(r.el);i.touchScrollAllowed=!1,i.minDistance=l.selectMinDistance||0,i.autoScroller.isEnabled=l.dragScroll;let m=this.hitDragging=new xO(this.dragging,U$(r));m.emitter.on("pointerdown",this.handlePointerDown),m.emitter.on("dragstart",this.handleDragStart),m.emitter.on("hitupdate",this.handleHitUpdate),m.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Ahe(c){let{options:r}=c.context,a=r.selectLongPressDelay;return a==null&&(a=r.longPressDelay),a}function The(c,r,a){let l=c.dateSpan,i=r.dateSpan,m=[l.range.start,l.range.end,i.range.start,i.range.end];m.sort(Zle);let v={};for(let C of a){let E=C(c,r);if(E===!1)return null;E&&Object.assign(v,E)}return v.range={start:m[0],end:m[3]},v.allDay=l.allDay,v}class gA extends zS{constructor(r){super(r),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=v=>{let C=v.origEvent.target,{component:E,dragging:T}=this,{mirror:N}=T,{options:V}=E.context,U=E.context;this.subjectEl=v.subjectEl;let z=this.subjectSeg=HS(v.subjectEl),K=(this.eventRange=z.eventRange).instance.instanceId;this.relevantEvents=F$(U.getCurrentData().eventStore,K),T.minDistance=v.isTouch?0:V.eventDragMinDistance,T.delay=v.isTouch&&K!==E.props.eventSelection?Rhe(E):null,V.fixedMirrorParent?N.parentNode=V.fixedMirrorParent:N.parentNode=td(C,".fc"),N.revertDuration=V.dragRevertDuration;let Z=E.isValidSegDownEl(C)&&!td(C,".fc-event-resizer");T.setIgnoreMove(!Z),this.isDragging=Z&&v.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=v=>{let C=this.component.context,E=this.eventRange,T=E.instance.instanceId;v.isTouch?T!==this.component.props.eventSelection&&C.dispatch({type:"SELECT_EVENT",eventInstanceId:T}):C.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(C.calendarApi.unselect(v),C.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new fl(C,E.def,E.instance),jsEvent:v.origEvent,view:C.viewApi}))},this.handleHitUpdate=(v,C)=>{if(!this.isDragging)return;let E=this.relevantEvents,T=this.hitDragging.initialHit,N=this.component.context,V=null,U=null,z=null,W=!1,K={affectedEvents:E,mutatedEvents:im(),isEvent:!0};if(v){V=v.context;let Z=V.options;N===V||Z.editable&&Z.droppable?(U=Dhe(T,v,this.eventRange.instance.range.start,V.getCurrentData().pluginHooks.eventDragMutationMassagers),U&&(z=H$(E,V.getCurrentData().eventUiBases,U,V),K.mutatedEvents=z,Zee(K,v.dateProfile,V)||(W=!0,U=null,z=null,K.mutatedEvents=im()))):V=null}this.displayDrag(V,K),W?v$():y$(),C||(N===V&&AO(T,v)&&(U=null),this.dragging.setMirrorNeedsRevert(!U),this.dragging.setMirrorIsVisible(!v||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=V,this.validMutation=U,this.mutatedRelevantEvents=z)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=v=>{if(this.isDragging){let C=this.component.context,E=C.viewApi,{receivingContext:T,validMutation:N}=this,V=this.eventRange.def,U=this.eventRange.instance,z=new fl(C,V,U),W=this.relevantEvents,K=this.mutatedRelevantEvents,{finalHit:Z}=this.hitDragging;if(this.clearDrag(),C.emitter.trigger("eventDragStop",{el:this.subjectEl,event:z,jsEvent:v.origEvent,view:E}),N){if(T===C){let ce=new fl(C,K.defs[V.defId],U?K.instances[U.instanceId]:null);C.dispatch({type:"MERGE_EVENTS",eventStore:K});let q={oldEvent:z,event:ce,relatedEvents:K2(K,C,U),revert(){C.dispatch({type:"MERGE_EVENTS",eventStore:W})}},X={};for(let Ce of C.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(X,Ce(N,C));C.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},q),X),{el:v.subjectEl,delta:N.datesDelta,jsEvent:v.origEvent,view:E})),C.emitter.trigger("eventChange",q)}else if(T){let ce={event:z,relatedEvents:K2(W,C,U),revert(){C.dispatch({type:"MERGE_EVENTS",eventStore:W})}};C.emitter.trigger("eventLeave",Object.assign(Object.assign({},ce),{draggedEl:v.subjectEl,view:E})),C.dispatch({type:"REMOVE_EVENTS",eventStore:W}),C.emitter.trigger("eventRemove",ce);let q=K.defs[V.defId],X=K.instances[U.instanceId],Ce=new fl(T,q,X);T.dispatch({type:"MERGE_EVENTS",eventStore:K});let st={event:Ce,relatedEvents:K2(K,T,X),revert(){T.dispatch({type:"REMOVE_EVENTS",eventStore:K})}};T.emitter.trigger("eventAdd",st),v.isTouch&&T.dispatch({type:"SELECT_EVENT",eventInstanceId:U.instanceId}),T.emitter.trigger("drop",Object.assign(Object.assign({},jte(Z.dateSpan,T)),{draggedEl:v.subjectEl,jsEvent:v.origEvent,view:Z.context.viewApi})),T.emitter.trigger("eventReceive",Object.assign(Object.assign({},st),{draggedEl:v.subjectEl,view:Z.context.viewApi}))}}else C.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:a}=this,{options:l}=a.context,i=this.dragging=new hA(r.el);i.pointer.selector=gA.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=l.dragScroll;let m=this.hitDragging=new xO(this.dragging,W$);m.useSubjectCenter=r.useEventCenter,m.emitter.on("pointerdown",this.handlePointerDown),m.emitter.on("dragstart",this.handleDragStart),m.emitter.on("hitupdate",this.handleHitUpdate),m.emitter.on("pointerup",this.handlePointerUp),m.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(r,a){let l=this.component.context,i=this.receivingContext;i&&i!==r&&(i===l?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:a.affectedEvents,mutatedEvents:im(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),r&&r.dispatch({type:"SET_EVENT_DRAG",state:a})}clearDrag(){let r=this.component.context,{receivingContext:a}=this;a&&a.dispatch({type:"UNSET_EVENT_DRAG"}),r!==a&&r.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}gA.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Dhe(c,r,a,l){let i=c.dateSpan,m=r.dateSpan,v=i.range.start,C=m.range.start,E={};i.allDay!==m.allDay&&(E.allDay=m.allDay,E.hasEnd=r.context.options.allDayMaintainDuration,m.allDay?v=Oa(a):v=a);let T=$S(v,C,c.context.dateEnv,c.componentId===r.componentId?c.largeUnit:null);T.milliseconds&&(E.allDay=!1);let N={datesDelta:T,standardProps:E};for(let V of l)V(N,c,r);return N}function Rhe(c){let{options:r}=c.context,a=r.eventLongPressDelay;return a==null&&(a=r.longPressDelay),a}class Ohe extends zS{constructor(r){super(r),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=m=>{let{component:v}=this,C=this.querySegEl(m),E=HS(C),T=this.eventRange=E.eventRange;this.dragging.minDistance=v.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(m.origEvent.target)||m.isTouch&&this.component.props.eventSelection!==T.instance.instanceId)},this.handleDragStart=m=>{let{context:v}=this.component,C=this.eventRange;this.relevantEvents=F$(v.getCurrentData().eventStore,this.eventRange.instance.instanceId);let E=this.querySegEl(m);this.draggingSegEl=E,this.draggingSeg=HS(E),v.calendarApi.unselect(),v.emitter.trigger("eventResizeStart",{el:E,event:new fl(v,C.def,C.instance),jsEvent:m.origEvent,view:v.viewApi})},this.handleHitUpdate=(m,v,C)=>{let{context:E}=this.component,T=this.relevantEvents,N=this.hitDragging.initialHit,V=this.eventRange.instance,U=null,z=null,W=!1,K={affectedEvents:T,mutatedEvents:im(),isEvent:!0};m&&(m.componentId===N.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(N,m)||(U=Nhe(N,m,C.subjectEl.classList.contains("fc-event-resizer-start"),V.range))),U&&(z=H$(T,E.getCurrentData().eventUiBases,U,E),K.mutatedEvents=z,Zee(K,m.dateProfile,E)||(W=!0,U=null,z=null,K.mutatedEvents=null)),z?E.dispatch({type:"SET_EVENT_RESIZE",state:K}):E.dispatch({type:"UNSET_EVENT_RESIZE"}),W?v$():y$(),v||(U&&AO(N,m)&&(U=null),this.validMutation=U,this.mutatedRelevantEvents=z)},this.handleDragEnd=m=>{let{context:v}=this.component,C=this.eventRange.def,E=this.eventRange.instance,T=new fl(v,C,E),N=this.relevantEvents,V=this.mutatedRelevantEvents;if(v.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:T,jsEvent:m.origEvent,view:v.viewApi}),this.validMutation){let U=new fl(v,V.defs[C.defId],E?V.instances[E.instanceId]:null);v.dispatch({type:"MERGE_EVENTS",eventStore:V});let z={oldEvent:T,event:U,relatedEvents:K2(V,v,E),revert(){v.dispatch({type:"MERGE_EVENTS",eventStore:N})}};v.emitter.trigger("eventResize",Object.assign(Object.assign({},z),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||ni(0),endDelta:this.validMutation.endDelta||ni(0),jsEvent:m.origEvent,view:v.viewApi})),v.emitter.trigger("eventChange",z)}else v.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:a}=r,l=this.dragging=new hA(r.el);l.pointer.selector=".fc-event-resizer",l.touchScrollAllowed=!1,l.autoScroller.isEnabled=a.context.options.dragScroll;let i=this.hitDragging=new xO(this.dragging,U$(r));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(r){return td(r.subjectEl,".fc-event")}}function Nhe(c,r,a,l){let i=c.context.dateEnv,m=c.dateSpan.range.start,v=r.dateSpan.range.start,C=$S(m,v,i,c.largeUnit);if(a){if(i.add(l.start,C)<l.end)return{startDelta:C}}else if(i.add(l.end,C)>l.start)return{endDelta:C};return null}class Ihe{constructor(r){this.context=r,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=l=>{l.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=l=>{let i=this.context.options.unselectCancel,m=BJ(l.origEvent);this.matchesCancel=!!td(m,i),this.matchesEvent=!!td(m,gA.SELECTOR)},this.onDocumentPointerUp=l=>{let{context:i}=this,{documentPointer:m}=this,v=i.getCurrentData();if(!m.wasTouchScroll){if(v.dateSelection&&!this.isRecentPointerDateSelect){let C=i.options.unselectAuto;C&&(!C||!this.matchesCancel)&&i.calendarApi.unselect(l)}v.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let a=this.documentPointer=new Vte(document);a.shouldIgnoreMove=!0,a.shouldWatchScroll=!1,a.emitter.on("pointerdown",this.onDocumentPointerDown),a.emitter.on("pointerup",this.onDocumentPointerUp),r.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const Bhe={fixedMirrorParent:Zt},Mhe={dateClick:Zt,eventDragStart:Zt,eventDragStop:Zt,eventDrop:Zt,eventResizeStart:Zt,eventResizeStop:Zt,eventResize:Zt,drop:Zt,eventReceive:Zt,eventLeave:Zt};tV.dataAttrPrefix="";var Gte=Q1({name:"@fullcalendar/interaction",componentInteractions:[khe,xhe,gA,Ohe],calendarInteractions:[Ihe],elementDraggingImpl:hA,optionRefiners:Bhe,listenerRefiners:Mhe});let Phe=0,Lhe=new Date().toISOString().replace(/T.*$/,"");const Fhe=[{id:$he(),title:"All-day event",start:Lhe}];function $he(){return String(Phe++)}const pA=c=>(f.pushScopeId("data-v-1fa0e0e1"),c=c(),f.popScopeId(),c),Vhe={class:"demo-app"},Hhe={class:"demo-app-main"},zhe={class:"title-line"},Uhe=["title","onClick"],Whe={key:0,style:{width:"90%"}},jhe=pA(()=>f.createElementVNode("span",{class:"to"},"至",-1)),Ghe={key:1,style:{width:"90%"}},Zhe=pA(()=>f.createElementVNode("span",{class:"to"},"至",-1)),qhe={key:2,style:{width:"90%",display:"flex","align-items":"center","justify-content":"space-between"}},Khe={key:0,style:{"margin-left":"2%"}},Yhe=pA(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),Xhe={key:1},Qhe=pA(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),Jhe={key:0,class:"placeholder"},ege={class:"info"},tge=pA(()=>f.createElementVNode("img",{src:"https://img1.baidu.com/it/u=1960110688,1786190632&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=281",alt:""},null,-1)),nge={class:"dialog-footer"},oge={name:"IkApprovalProcess"},sge=f.defineComponent({...oge,props:{dataList:{type:Array,default:()=>[]},defaultNodeType:{type:Object,default:()=>({})},defaultFieldMap:{type:Object,default:()=>({})},statusWithoutApprover:{type:Object,default:()=>({})}},emits:["delete","success"],setup(c,{emit:r}){const a=r,l=K=>{if(C.selectInfo=K,m(),K.view.type=="dayGridMonth"){let ce=K.end.getTime()-864e5;C.timeType="month",C.form.startDate=wo.ikDate.toYMD(K.start),C.form.endDate=wo.ikDate.toYMD(new Date(ce))}else K.view.type=="timeGridWeek"?(C.timeType="week",C.form.startDate=wo.ikDate.toYMDHM(K.start),C.form.endDate=wo.ikDate.toYMDHM(K.end)):K.view.type=="timeGridDay"&&(C.timeType="day",C.form.startDate=wo.ikDate.toYMD(K.start),C.form.endDate=wo.ikDate.toYMD(K.start),C.form.startTime=wo.ikDate.toDateTime(K.start),C.form.endTime=wo.ikDate.toDateTime(K.end));K.view.calendar.unselect(),f.nextTick(()=>{C.title="新建日程",C.dialogVisible=!0})},i=(K,Z)=>{C.title="修改日程",C.dialogVisible=!0},m=K=>{fetch("http://192.168.2.45:6002/component/pick/mix",{method:"POST",body:JSON.stringify({parentDepartmentId:K||"",name:""}),headers:{Authorization:"Bearer iking","Content-Type":"application/json"}}).then(q=>{q.json().then(X=>{const{success:Ce,data:st}=X;if(!Ce)return;const{departments:Ne,users:ee,roles:xe,posts:et}=st;C.depList=Ne,C.userList=ee,C.roleList=xe,C.postList=et})}).catch(q=>{console.info("error: ",q)})},v=K=>{C.currentEvents=K},C=f.reactive({allDay:!1,dialogVisible:!1,form:{title:"",type:1,startDate:"",endDate:"",startTime:"",endTime:"",personList:[],location:""},formRef:null,title:"新建日程",timeType:"month",handList:[],isShow:!1,depList:[],userList:[],roleList:[],postList:[],selectInfo:{},calendarOptions:{locale:jQ,plugins:[Ote,$te,Gte],headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},firstDay:1,initialView:"dayGridMonth",initialEvents:Fhe,editable:!0,selectable:!0,selectMirror:!0,dayMaxEvents:!0,weekends:!0,select:l,eventClick:K=>i(),eventsSet:v},currentEvents:[]}),E=()=>{var K;(K=C.formRef)==null||K.resetFields(),C.form={title:"",type:1,startDate:"",endDate:"",startTime:"",endTime:"",personList:[],location:""},C.dialogVisible=!1},T=async()=>{var ce,q,X,Ce;let K=(q=(ce=C.selectInfo)==null?void 0:ce.view)==null?void 0:q.calendar,Z={id:new Date().getTime(),title:C.form.title,start:(X=C.selectInfo)==null?void 0:X.startStr,end:(Ce=C.selectInfo)==null?void 0:Ce.endStr,allDay:C.allDay};await K.addEvent(Z),a("success",Z),E()},N=K=>{Lt.ElMessageBox.confirm(`你确定删除事件'${K.event.title}'?`,"Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(()=>{Lt.ElMessage({type:"success",message:"删除成功"}),K.event.remove(),a("delete",K.event)})},V=K=>{C.handList=K.list,C.form.personList=K.list},U=()=>{C.isShow=!0},z=K=>{m(K==null?void 0:K.elementId)},W=K=>{C.form.personList.splice(K,1),C.handList=C.form.personList};return(K,Z)=>{const ce=f.resolveComponent("el-checkbox");return f.openBlock(),f.createElementBlock("div",Vhe,[f.createElementVNode("div",Hhe,[f.createVNode(f.unref(_te),{class:"demo-app-calendar",options:C.calendarOptions},{eventContent:f.withCtx(q=>[f.createElementVNode("div",zhe,[f.createElementVNode("span",{class:"title",title:q.event.title,onClick:f.withModifiers(X=>i(),["stop"])},f.toDisplayString(q.event.title),9,Uhe),f.createVNode(f.unref(Lt.ElIcon),{size:16,onClick:f.withModifiers(X=>N(q),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(OQ))]),_:2},1032,["onClick"])])]),_:1},8,["options"])]),f.createCommentVNode(" 新建日程 "),f.createVNode(f.unref(Lt.ElDialog),{modelValue:C.dialogVisible,"onUpdate:modelValue":Z[12]||(Z[12]=q=>C.dialogVisible=q),title:C.title,width:"30%",ref:"formRef",onClose:E},{footer:f.withCtx(()=>[f.createElementVNode("span",nge,[f.createVNode(f.unref(Lt.ElButton),{onClick:E},{default:f.withCtx(()=>[f.createTextVNode("取消")]),_:1}),f.createVNode(f.unref(Lt.ElButton),{type:"primary",onClick:T},{default:f.withCtx(()=>[f.createTextVNode("确定")]),_:1})])]),default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElForm),{model:C.form},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(DQ))]),_:1}),f.createVNode(f.unref(Lt.ElInput),{modelValue:C.form.title,"onUpdate:modelValue":Z[0]||(Z[0]=q=>C.form.title=q),placeholder:`添加${C.form.type==1?"会议":"活动"}标题`,style:{width:"70%"},clearable:""},null,8,["modelValue","placeholder"]),f.createVNode(f.unref(Lt.ElSelect),{modelValue:C.form.type,"onUpdate:modelValue":Z[1]||(Z[1]=q=>C.form.type=q),style:{width:"20%"}},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElOption),{label:"会议",value:1}),f.createVNode(f.unref(Lt.ElOption),{label:"活动",value:2})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(RQ))]),_:1}),C.timeType=="month"?(f.openBlock(),f.createElementBlock("div",Whe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[2]||(Z[2]=q=>C.form.startDate=q),type:"date",placeholder:"开始日期",style:{width:"48%"}},null,8,["modelValue"]),jhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[3]||(Z[3]=q=>C.form.endDate=q),type:"date",placeholder:"结束日期",style:{width:"48%"}},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0),C.timeType=="week"?(f.openBlock(),f.createElementBlock("div",Ghe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[4]||(Z[4]=q=>C.form.startDate=q),type:"datetime",placeholder:"开始日期",style:{width:"48%"},format:"YYYY-MM-DD HH:mm"},null,8,["modelValue"]),Zhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[5]||(Z[5]=q=>C.form.endDate=q),type:"datetime",placeholder:"结束日期",style:{width:"48%"},format:"YYYY-MM-DD HH:mm"},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0),C.timeType=="day"?(f.openBlock(),f.createElementBlock("div",qhe,[f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.startDate,"onUpdate:modelValue":Z[6]||(Z[6]=q=>C.form.startDate=q),type:"date",placeholder:"开始日期",style:f.normalizeStyle({width:C.allDay?"45%":"90%"})},null,8,["modelValue","style"]),C.allDay?(f.openBlock(),f.createElementBlock("div",Xhe,[Qhe,f.createVNode(f.unref(Lt.ElDatePicker),{modelValue:C.form.endDate,"onUpdate:modelValue":Z[9]||(Z[9]=q=>C.form.endDate=q),type:"date",placeholder:"结束日期",style:{width:"90%"}},null,8,["modelValue"])])):(f.openBlock(),f.createElementBlock("div",Khe,[f.createVNode(f.unref(Lt.ElTimePicker),{modelValue:C.form.startTime,"onUpdate:modelValue":Z[7]||(Z[7]=q=>C.form.startTime=q),type:"datetime",placeholder:"开始日期",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"]),Yhe,f.createVNode(f.unref(Lt.ElTimePicker),{modelValue:C.form.endTime,"onUpdate:modelValue":Z[8]||(Z[8]=q=>C.form.endTime=q),type:"datetime",placeholder:"结束日期",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"])])),f.createVNode(ce,{modelValue:C.allDay,"onUpdate:modelValue":Z[10]||(Z[10]=q=>C.allDay=q),label:"全天",style:{"margin-left":"2%"}},null,8,["modelValue"])])):f.createCommentVNode("v-if",!0)]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(uie))]),_:1}),f.createElementVNode("div",{class:"personBlock",onClick:f.withModifiers(U,["stop"])},[C.form.personList.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(C.form.personList,(q,X)=>(f.openBlock(),f.createElementBlock("div",{key:X,class:"nameBlock"},[f.createElementVNode("div",ege,[tge,f.createElementVNode("div",null,f.toDisplayString(q.elementName),1)]),f.createVNode(f.unref(Lt.ElIcon),{class:"close",onClick:f.withModifiers(Ce=>W(X),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:2},1032,["onClick"])]))),128)):(f.openBlock(),f.createElementBlock("span",Jhe,"添加参与人"))])]),_:1}),f.createVNode(f.unref(Lt.ElFormItem),null,{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(Yre))]),_:1}),f.createVNode(f.unref(Lt.ElInput),{modelValue:C.form.location,"onUpdate:modelValue":Z[11]||(Z[11]=q=>C.form.location=q),placeholder:"添加地点",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),f.createCommentVNode(" 选人组件 "),f.createVNode(f.unref(yA),{modelValue:C.handList,"onUpdate:modelValue":Z[13]||(Z[13]=q=>C.handList=q),show:C.isShow,"onUpdate:show":Z[14]||(Z[14]=q=>C.isShow=q),onOk:V,multiple:!0,"type-option":{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},"dep-list":C.depList,"user-list":C.userList,"prop-option":{name:"elementName",id:"elementId",type:"elementType",avatar:"avatar"},chooseType:["user"],onHandChild:z},null,8,["modelValue","show","dep-list","user-list"])])}}}),nSe="",rge=Gs(Zs(sge,[["__scopeId","data-v-1fa0e0e1"]])),ige=c=>(f.pushScopeId("data-v-a26cdcaf"),c=c(),f.popScopeId(),c),age={class:"ik-hor-step-content"},lge=[ige(()=>f.createElementVNode("i",{class:"ik-hor-step_line_inner"},null,-1))],cge=["onClick"],uge={class:"ik-hor-step_main"},dge=["id","onClick"],fge=["id","onClick"],mge=f.defineComponent({__name:"IKHorizontalStepBar",props:{spaceNum:{type:String,default:"58px"},active:{type:Number,default:null},activeColor:{type:String,default:""},needClick:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},alignCenter:{type:Boolean,default:!1},propsField:{type:Object,default:()=>({title:"title",description:"description",value:"value"})}},emits:["click","update:active"],setup(c,{emit:r}){const a=c,l=r,i=f.ref(!1),m=f.ref(),v=f.ref(),C=f.ref(!1);f.watch(()=>a.active,K=>{let Z=document.getElementById("stepItemContent"),ce=document.getElementById(`stepItem${K}`),q=document.getElementById("stepItem0");const X=ce&&q?(ce==null?void 0:ce.offsetLeft)-(q==null?void 0:q.offsetLeft):0;Z&&ce&&(Z.scrollLeft=X>(Z==null?void 0:Z.clientWidth)?X-(Z==null?void 0:Z.offsetLeft):0)}),f.watch(()=>a.list,()=>{f.nextTick(()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce,window.addEventListener("resize",K,!0)});const K=()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce}},{deep:!0}),f.onMounted(()=>{f.nextTick(()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce,window.addEventListener("resize",K,!0)});const K=()=>{let Z=document.getElementById("stepItemContent"),ce=(Z==null?void 0:Z.scrollWidth)>(Z==null?void 0:Z.clientWidth);i.value=ce}});const E=(K,Z)=>{if(!a.needClick)return;l("update:active",Z),l("click",K);let ce=document.getElementById("stepItemContent"),q=document.getElementById(`stepItem${Z}`),X=document.getElementById("stepItem0");const Ce=q&&X?(q==null?void 0:q.offsetLeft)-(X==null?void 0:X.offsetLeft):0;ce&&q&&(ce.scrollLeft=Ce>(ce==null?void 0:ce.clientWidth)?Ce-(ce==null?void 0:ce.offsetLeft):0)},T=()=>{let K=document.getElementById("stepItemContent");K&&(K.scrollLeft=K.scrollLeft-20)},N=()=>{let K=document.getElementById("stepItemContent");K&&(K.scrollLeft=K.scrollLeft+20)},V=()=>{clearInterval(v.value);let K=document.getElementById("stepItemContent");C.value=!1,v.value=setInterval(()=>{C.value=!0,K&&(K.scrollLeft=K.scrollLeft-20)},100)},U=()=>{clearInterval(v.value),C.value||T()},z=()=>{clearInterval(m.value);let K=document.getElementById("stepItemContent");C.value=!1,m.value=setInterval(()=>{C.value=!0,K&&(K.scrollLeft=K.scrollLeft+20)},100)},W=()=>{clearInterval(m.value),C.value||N()};return(K,Z)=>{const ce=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",age,[i.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"icon-left",onMousedown:V,onMouseup:U,onClick:T},[f.createVNode(ce,{class:"operation-icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(n$),{size:"26px"})]),_:1})],32)):f.createCommentVNode("v-if",!0),f.createElementVNode("div",{class:"step-item-content",id:"stepItemContent",style:f.normalizeStyle({justifyContent:i.value?"flex-start":"center"})},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.list,(q,X)=>{var Ce;return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(`${c.alignCenter?"ik-hor-step-item":""} step-item ${X<=c.active?"step-item-active":""}`),style:f.normalizeStyle({width:c.alignCenter?`calc(100%/${(Ce=c.list)==null?void 0:Ce.length})`:""}),key:X},[f.createElementVNode("div",{class:f.normalizeClass(`${c.alignCenter?"ik-hor-step_head":""} `)},[X!==0?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(`ik-hor-step_line step-border ${X<=c.active?"step-border-greater-than":""}`),style:f.normalizeStyle({width:`${c.spaceNum.indexOf("px")!=-1?c.spaceNum:`${c.spaceNum}px`}`})},lge,6)):f.createCommentVNode("v-if",!0),f.createElementVNode("div",{class:f.normalizeClass(`step-num ${X===c.active?"step-num-active":X<c.active?"step-num-greater-than":""}`),onClick:st=>E(q,X),style:f.normalizeStyle({backgroundColor:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"})},[f.renderSlot(K.$slots,"icon",{data:{item:q,index:X}},()=>[f.createTextVNode(f.toDisplayString(X+1),1)],!0)],14,cge)],2),f.createElementVNode("div",uge,[f.createElementVNode("div",{id:`stepItem${X}`,class:f.normalizeClass(`step-label ${c.active===X?"step-label-active":X<c.active?"step-label-greater-than":""} step-item-${X}`),style:f.normalizeStyle({color:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"}),onClick:st=>E(q,X)},f.toDisplayString(q[c.propsField.title]),15,dge),f.createElementVNode("div",{id:`stepItemDesc${X}`,class:f.normalizeClass(`step-description step-label ${c.active===X?"step-label-active":X<c.active?"step-label-greater-than":""} step-item-${X}`),style:f.normalizeStyle({color:X===c.active&&c.activeColor?c.activeColor:"",cursor:q&&q.disabled?"not-allowed":c.needClick?"pointer":"context-menu"}),onClick:st=>E(q,X)},f.toDisplayString(q[c.propsField.description]),15,fge)])],6)}),128))],4),i.value?(f.openBlock(),f.createElementBlock("div",{key:1,class:"icon-right",onMousedown:z,onMouseup:W,onClick:N},[f.createVNode(ce,{class:"operation-icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})],32)):f.createCommentVNode("v-if",!0)])}}}),rSe="",hge=Gs(Zs(mge,[["__scopeId","data-v-a26cdcaf"]])),gge=["onClick"],pge={class:"fileName simple"},vge=["onClick"],yge={class:"text"},bge={class:"fileName"},Cge={class:"size"},_ge=f.defineComponent({__name:"IkPreviewFile",props:{list:{type:Array,default:()=>[]},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},field:{required:!0,type:Object,default:()=>({})},iconSize:{type:Number,default:40},showBg:{type:Boolean,default:!0},width:{type:Number||String,default:"100%"},iconHoverShow:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},simple:{type:Boolean,default:!1}},emits:["handPreview"],setup(c,{emit:r}){const a=c,{cLoadUrl:l,cOnlyofficeConfig:i,cOnlyofficePreviewType:m}=Xv(a),v=r,C=f.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"size",...a.field})),E=f.ref({}),T=f.ref(!1),N=W=>{var K,Z;E.value={...W,name:W.name,url:Yv(l.value,W[C.value.url]||((Z=(K=W==null?void 0:W.response)==null?void 0:K.data)==null?void 0:Z.id)||(W==null?void 0:W.id))},a.isOnlyOfficePreview&&(T.value=!0),v("handPreview",E.value)},V=W=>{wo.ikFile.downloadFile(Yv(l.value,W[C.value.url]||W.attachmentId||W.id),W[C.value.name]||W.attachmentName)},U=f.computed(()=>wo.paramType.isNumber(a.width)?`${a.width}px`:a.width),z=f.computed(()=>a.list.map(W=>{var Z;const K=W[C.value.name]||W.attachmentName;return{...W,name:K,size:W[C.value.size]||(W==null?void 0:W.fileSize)||(W==null?void 0:W.attachmentSize),suffix:W[C.value.suffix]||(W==null?void 0:W.attachmentSuffix)||((Z=K.split("."))==null?void 0:Z.at(-1))}}));return(W,K)=>{var ce,q,X;const Z=f.resolveComponent("tmplate");return f.openBlock(),f.createElementBlock(f.Fragment,null,[(ce=c.list)!=null&&ce.length?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[c.simple?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(z.value,(Ce,st)=>(f.openBlock(),f.createElementBlock("div",{class:"iking-privew-annex simple",onClick:Ne=>N(Ce),style:f.normalizeStyle({width:U.value})},[f.createElementVNode("div",pge,f.toDisplayString(Ce.name),1),f.createElementVNode("div",{class:f.normalizeClass(["flex flex-center",{"hover-show":c.iconHoverShow}])},[f.createVNode(f.unref(cr),{name:"iksvg_daochu",onClick:f.withModifiers(Ne=>V(Ce),["stop"]),size:20,active:""},null,8,["onClick"]),f.unref(m).includes(Ce.suffix)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_yulan",size:20,active:""})):f.createCommentVNode("v-if",!0),f.renderSlot(W.$slots,"operation",{data:{...Ce,findex:st}})],2)],12,gge))),256)):(f.openBlock(),f.createBlock(Z,{key:1},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(z.value,(Ce,st)=>{var Ne;return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["iking-privew-annex",{"is-bg":c.showBg}]),key:st,style:f.normalizeStyle({marginBottom:st==((Ne=c.list)==null?void 0:Ne.length)-1?"0":"10px",width:U.value})},[f.createElementVNode("div",{class:"file-card",onClick:ee=>N(Ce)},[f.createVNode(f.unref(UR),{file:Ce,style:f.normalizeStyle({height:`${c.iconSize}px`}),class:"ikui-w-auto",fields:C.value},null,8,["file","style","fields"]),f.createElementVNode("div",yge,[f.createElementVNode("div",bge,f.toDisplayString(Ce.name),1),f.createElementVNode("div",Cge,f.toDisplayString(f.unref(Bie)(Ce.size)),1)]),f.createElementVNode("div",{class:f.normalizeClass(["flex flex-center",{"hover-show":c.iconHoverShow}])},[f.createVNode(f.unref(cr),{name:"iksvg_daochu",onClick:f.withModifiers(ee=>V(Ce),["stop"]),bg:c.showBg,size:c.showBg?"default":20,title:"下载"},null,8,["onClick","bg","size"]),f.unref(m).includes(Ce.suffix)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_yulan",bg:c.showBg,size:c.showBg?"default":20,title:"预览"},null,8,["bg","size"])):f.createCommentVNode("v-if",!0),f.renderSlot(W.$slots,"operation",{data:{...Ce,findex:st}})],2)],8,vge)],6)}),128))]),_:3}))],64)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(vV),{show:T.value,"onUpdate:show":K[0]||(K[0]=Ce=>T.value=Ce),loadUrl:f.unref(l),file:E.value,onlyofficeServer:((q=f.unref(i))==null?void 0:q.serverUrl)||c.onlyofficeServer,onlyOfficeConfig:f.unref(i),onlyOfficeAccept:((X=f.unref(i))==null?void 0:X.accept)||c.onlyOfficeAccept},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig","onlyOfficeAccept"])],64)}}}),aSe="",TO=Gs(_ge),wge=f.defineComponent({__name:"IkPreviewFileDialog",props:f.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(c){const r=c,a=f.useModel(c,"show"),l=f.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...r.field})),i=f.ref(null),m=f.ref(null),v=f.reactive({image:!1,office:!1,video:!1}),C=T=>{var N,V,U,z,W,K,Z;try{const ce=((N=T==null?void 0:T.response)==null?void 0:N.data)||T,q=ce[l.value.url]||(ce==null?void 0:ce.id)||ce.attachmentId,X=(V=ce[l.value.suffix]||ce.attachmentSuffix)==null?void 0:V.toLowerCase(),Ce=ce[l.value.name]||(ce==null?void 0:ce.attachmentName)||(ce==null?void 0:ce.originName);if(m.value={...T,name:T[l.value.name],url:Yv(r.loadUrl,q)},T&&Pc(T,l.value)==="image"){v.image=!0;return}else if(T&&Pc(T,l.value)==="video"){v.video=!0;return}else if((((U=r.onlyOfficeConfig)==null?void 0:U.accept)||r.onlyOfficeAccept).includes(X)){v.office=!0,i.value={...r.onlyOfficeConfig,editorConfig:{...((z=r.onlyOfficeConfig)==null?void 0:z.editorConfig)||{},customization:{...((K=(W=r.onlyOfficeConfig)==null?void 0:W.editorConfig)==null?void 0:K.customization)||{},review:{reviewDisplay:"final"}}},document:{key:wo.buildUUID(),title:Ce,url:Yv(r.loadUrl,q),fileType:X,...((Z=r.onlyOfficeConfig)==null?void 0:Z.document)||{}},documentType:ire(X)};return}}catch(ce){console.info("预览错误: ",ce)}};f.watch([a,r.file],([T,N])=>{T&&f.nextTick(()=>{C(r.file)})});const E=()=>{a.value=!1,v.office=!1,v.image=!1,v.video=!1,m.value=null};return(T,N)=>{var V,U,z;return a.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(V=m.value)!=null&&V.url&&v.image?(f.openBlock(),f.createBlock(f.unref(OV),{key:0,onClose:N[0]||(N[0]=W=>E()),ref:"previewImgRef","url-list":[(U=m.value)==null?void 0:U.url],teleported:"","z-index":9999},null,8,["url-list"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),f.createCommentVNode(" 文档类 "),f.createVNode(f.unref(Poe),{modelValue:v.video,"onUpdate:modelValue":N[1]||(N[1]=W=>v.video=W),url:(z=m.value)==null?void 0:z.url},null,8,["modelValue","url"]),f.createVNode(f.unref(nne),{modelValue:v.office,"onUpdate:modelValue":N[2]||(N[2]=W=>v.office=W),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:E,"modal-class":"ik-only-preview-dialog"},{default:f.withCtx(()=>{var W;return[f.createVNode(f.unref(wne),{"config-options":i.value,"document-server-url":((W=c.onlyOfficeConfig)==null?void 0:W.serverUrl)||c.onlyofficeServer},null,8,["config-options","document-server-url"])]}),_:1},8,["modelValue"])],64)):f.createCommentVNode("v-if",!0)}}}),lSe="",vV=Gs(wge),Sge="data:image/webp;base64,UklGRnoEAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBImAAAAA2AYm3bsuhFm7u72wZoTrbGIcoKaKyAROJQbQmW2IVb/WkW3ZmPd3ymRMQEwJfV56QRo5pHErkUkFdQWRJpeGW6SoL9EvaWxAdbAeiVd5gyAK5NAdOtv4uNfsT21TUukBVjgFubBOQS+Ip7G/k2LpatkF2hAuBI5siAdsL2j3DHQrJ7NKDbUIyOj3bhqADBsgNPUqUlgncLVlA4IOwBAABwDQCdASowADAAPm0yk0ckIyGhJzgMkIANiWwArDM9tzexcZ3vwYZdKHIB749Ap5gP1E/YD34/QB6AH+A9F//S+w1z2/sz/5DzdDABM7ldHg1iMkeWX8LH9T1VzicAWGJgnNq4e/5P/NObJOBUhFC8dPnhmAD+9wGzP9Zfeg5ENi90xn4awZvrlCLnfwvZX//s4u6n2Pa2TF/r8wh0GtdNNJIBMRbrMaCBwyl6z86DqQgvpixbIdOVbwZFf/7KjC+uzJ5nNRyJ1Rpab8pIf2m1+SBOfX9w7EFXUErK8NSCsePMPazMXKH5y9Wl+nfiSrmsv079Fk6NkDF3Dxr+C+Rp4UdG/f3kP8PZfd/FyRupWURiDOrAjLamuF4OPo2BylwD7ulmdgDn4BEMXuvpYCACy4yCVjgsOzqToG2rSfJOtxy6Hh1/B2gu7X1MdJpHsdHdUrlRzTLKyV3wZG5a64SKKB2/QGk8IRZT0veUdDeo579/WyTU3ujQZeKNBS9ANlv1muyN9Kf5bm1f3UoPm/KnDkqf/1f2jf6aQJ7IYNod25fVfhRX+l1u9qBzs/bVezF7ZgC2LOuuJl1Tvwgeujpg9Uc/m0A9X878DzEkgxP/sPGviOfCElM1J/Kr3TTCwCkfW+K3oZuMB7HAAAA=",Ege=c=>(f.pushScopeId("data-v-6aec3725"),c=c(),f.popScopeId(),c),kge={class:"ik-flie-list"},xge={class:"name"},Age={key:1},Tge=["src"],Dge={class:"file-icon"},Rge={class:"file-name-loading"},Oge={class:"file-name"},Nge={key:0},Ige={key:0,class:"file-size"},Bge={class:"name"},Mge={class:"file-name-loading"},Pge={class:"file-name"},Lge={class:"file-size"},Fge={class:"operate-btn"},$ge={class:"card"},Vge={class:"title"},Hge=Ege(()=>f.createElementVNode("img",{src:Sge,class:"w-[48px] h-[48px]"},null,-1)),zge={class:"ik-flie-list"},Uge={class:"name"},Wge={key:1},jge=["src"],Gge={class:"file-icon"},Zge={class:"file-name-loading"},qge={class:"file-name"},Kge={key:0},Yge={key:0,class:"file-size"},Xge={key:0},Qge=f.defineComponent({__name:"index",props:f.mergeModels({showIcon:{type:Boolean,default:!0},title:{type:String,default:"上传文件"},action:{type:String,default:""},type:{type:String,default:"button"},headers:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},limit:{type:Number,default:1},size:{type:Number,default:50},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},limitText:{type:String,default:""},defaultFileds:{type:Object,default:()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize"})},preview:{type:Boolean,default:!1},customIconData:{type:Object,default:()=>({})},customIconFields:{type:Object,default:()=>({type:"type",icon:"icon"})},disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},imageMode:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},trueDelete:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:f.mergeModels(["delete","exceed","handPreview","success","error","outSize"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=r,i=f.useModel(c,"modelValue"),v={...{name:"name",url:"url",suffix:"suffix",size:"size"},...a.defaultFileds},{cLoadUrl:C,cUploadUrl:E,cOnlyofficeConfig:T,cOnlyofficePreviewType:N}=Xv(a),V=f.computed(()=>a.size),U=f.ref(null),z=f.ref([]),W=f.ref({}),K=f.ref(!1),Z=F=>{const _n=F.size/1024/1024;return _n<V.value?!0:(l("outSize"),Lt.ElMessage({message:`上传文件大小(${_n.toFixed(4)}MB)超出允许最大值(${a.size}MB),请重新选择`,type:"warning",showClose:!0,duration:5e3}),!1)},ce=f.computed(()=>{const{accept:F}=a;return F==="*"?"*":`${F.toLowerCase()},${F.toUpperCase()}`}),q=(F,_n)=>{var kt,We;if(F.size/1024/1024<V.value||f.nextTick(()=>{i.value.pop()}),a.accept!=="*"){const at=(kt=ce.value)==null?void 0:kt.split(",");!at.includes((We=F==null?void 0:F.raw)==null?void 0:We.type)&&!at.includes(`.${F.name.split(".").pop()}`)&&(Lt.ElMessage({message:`不允许的上传文件格式(${F.name}),请重新选择`,type:"warning",showClose:!0,duration:5e3}),f.nextTick(()=>{i.value.pop()}))}},X=()=>!1,Ce=(F,_n)=>{var Ge,Et;F.status="ready",_n!==void 0&&z.value.splice(_n,1),(Ge=U.value)==null||Ge.handleStart(F.raw),(Et=U.value)==null||Et.submit()},st=(F,_n)=>{var Ge;F.splice(a.limit===1?1:a.limit),F.forEach(Et=>{var kt;(kt=U.value)==null||kt.handleStart(Et)}),(Ge=U.value)==null||Ge.submit(),Lt.ElMessage({message:(a==null?void 0:a.limitText)||`最大可上传${a.limit}个文件,已忽略超出文件`,type:"warning",showClose:!0,duration:5e3}),l("exceed",F)},Ne=(F,_n,Ge)=>{F.success?l("success",F,_n,Ge):(l("error",F,_n,Ge),be(_n),z.value.push(_n))},ee=(F,_n,Ge)=>{z.value.push(_n),l("error",F,_n,Ge)},xe=F=>{var _n,Ge;W.value={...F,name:F[v.name],url:Yv(C.value,F[v.url]||((Ge=(_n=F==null?void 0:F.response)==null?void 0:_n.data)==null?void 0:Ge.id))},a.isOnlyOfficePreview&&(K.value=!0),l("handPreview",W.value)},et=F=>{wo.ikFile.downloadByOnlineUrl(F[v.url],F[v.name])},tt=(F,_n=!1)=>{var Ge;(Ge=U.value)==null||Ge.abort(F)},je={Authorization:"Bearer iking","X-Tenant":"sys","Content-Type":"application/x-www-form-urlencoded"},be=F=>{var _n,Ge,Et,kt,We;try{F.status!=="success"&&tt(F),(_n=U.value)==null||_n.handleRemove(F),i.value=i.value.filter(at=>at.uid!==F.uid),l("delete",F),a.trueDelete&&e$.post(E.value.replace("/oss/upload","/oss/delete"),{fileUrl:((Et=(Ge=F==null?void 0:F.response)==null?void 0:Ge.data)==null?void 0:Et.id)||((kt=F==null?void 0:F.data)==null?void 0:kt.id)||(F==null?void 0:F.id)||F[v.url]},{headers:je})}catch(at){(We=U.value)==null||We.handleRemove(F),i.value=i.value.filter(Sn=>Sn.uid!==F.uid),l("delete",F),console.error(at)}},An=(F,_n)=>{z.value.splice(_n,1)},fn=f.computed(()=>i.value.length>=a.limit||a.disabled),Vt=F=>{var Ge,Et,kt;const _n=((Et=(Ge=F==null?void 0:F.response)==null?void 0:Ge.data)==null?void 0:Et[v.suffix])||((kt=F==null?void 0:F.data)==null?void 0:kt[v.suffix])||(F==null?void 0:F[v.suffix]);return N.includes(_n)};return(F,_n)=>{var Ge;return f.openBlock(),f.createElementBlock(f.Fragment,null,[c.preview?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[c.type==="button"?(f.openBlock(),f.createBlock(f.unref(Lt.ElUpload),f.mergeProps({key:0,class:"ik-file-upload"},F.$attrs,{accept:c.accept,action:f.unref(E),"file-list":i.value,"onUpdate:fileList":_n[0]||(_n[0]=Et=>i.value=Et),ref_key:"refUpload",ref:U,"auto-upload":!0,"before-upload":Z,"before-remove":X,"on-exceed":st,"on-change":q,multiple:c.multiple,headers:c.headers,limit:c.limit,"on-success":Ne,"on-error":ee}),{trigger:f.withCtx(()=>[F.$slots.trigger?f.renderSlot(F.$slots,"trigger",{key:0},void 0,!0):(f.openBlock(),f.createBlock(f.unref(Lt.ElButton),{key:1,disabled:fn.value},f.createSlots({default:f.withCtx(()=>[f.createTextVNode(" "+f.toDisplayString(c.title),1)]),_:2},[c.showIcon?{name:"icon",fn:f.withCtx(()=>[f.createVNode(f.unref(cr),{name:"iksvg_daoru",disabled:fn.value},null,8,["disabled"])]),key:"0"}:void 0]),1032,["disabled"]))]),file:f.withCtx(({file:Et})=>[f.createElementVNode("div",kge,[f.createElementVNode("div",xge,[!F.$slots.fileIcon&&(!c.customIconData[f.unref(Pc)(Et,v)]||!c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon])?(f.openBlock(),f.createBlock(f.unref(UR),{key:0,type:f.unref(Pc)(Et,v)},null,8,["type"])):!F.$slots.fileIcon&&c.customIconData[f.unref(Pc)(Et,v)]&&c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon]?(f.openBlock(),f.createElementBlock("div",Age,[c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.type]==="img"?(f.openBlock(),f.createElementBlock("img",{key:0,src:c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,Tge)):(f.openBlock(),f.createElementBlock("span",{key:1,class:f.normalizeClass([c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],"file-icon-size"])},null,2))])):f.createCommentVNode("v-if",!0),f.createElementVNode("div",Dge,[f.renderSlot(F.$slots,"fileIcon",{file:Et},void 0,!0)]),f.createElementVNode("div",Rge,[f.createElementVNode("p",Oge,[f.createTextVNode(f.toDisplayString(Et[v.name]||Et.name)+" ",1),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createElementBlock("span",Nge,"("+f.toDisplayString(Et.percentage)+"%)",1)):f.createCommentVNode("v-if",!0)]),Et.status==="success"?(f.openBlock(),f.createElementBlock("p",Ige,f.toDisplayString(f.unref(s$)((Et[v.size]||Et.size)/1024/1024))+"MB ",1)):f.createCommentVNode("v-if",!0),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createBlock(f.unref(Lt.ElProgress),{key:1,"text-inside":"",percentage:Et.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):f.createCommentVNode("v-if",!0)])]),f.createElementVNode("div",null,[Et.status==="success"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[Vt(Et)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,onClick:kt=>xe(Et),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(cr),{onClick:f.withModifiers(kt=>be(Et),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(f.openBlock(),f.createBlock(f.unref(cr),{key:1,onClick:f.withModifiers(kt=>be(Et),["stop"]),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))])])]),default:f.withCtx(()=>{var Et;return[!c.preview&&c.tip?(f.openBlock(),f.createBlock(f.unref(Lt.ElTooltip),{key:0,effect:"dark",content:a.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(MQ))]),_:1})]),_:1},8,["content"])):f.createCommentVNode("v-if",!0),(Et=z.value)!=null&&Et.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(z.value,(kt,We)=>(f.openBlock(),f.createElementBlock("div",{class:"ik-error-flie-list",key:kt.uid},[f.createElementVNode("div",Bge,[f.createVNode(f.unref(Lt.ElIcon),{size:32,class:"info",style:{"vertical-align":"middle"}},{default:f.withCtx(()=>[f.createVNode(f.unref(hie))]),_:1}),f.createElementVNode("div",Mge,[f.createElementVNode("p",Pge,f.toDisplayString(kt[v.name]||kt.name),1),f.createElementVNode("p",Lge,f.toDisplayString(f.unref(s$)(kt.size/1024/1024))+"MB ",1)])]),f.createElementVNode("div",Fge,[f.createVNode(f.unref(cr),{onClick:f.withModifiers(at=>Ce(kt,We),["stop"]),name:"iksvg_zhongzhi",title:"重新上传",bg:"",size:"default"},null,8,["onClick"]),f.createVNode(f.unref(cr),{onClick:f.withModifiers(at=>An(kt,We),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])])]))),128)):f.createCommentVNode("v-if",!0)]}),_:3},16,["accept","action","file-list","multiple","headers","limit"])):(f.openBlock(),f.createBlock(f.unref(Lt.ElUpload),f.mergeProps({key:1,"file-list":i.value,"onUpdate:fileList":_n[1]||(_n[1]=Et=>i.value=Et),class:["ik-file-pload-card",{plain:c.plain}],"auto-upload":!0},F.$attrs,{accept:c.accept,action:f.unref(E),disabled:fn.value,ref_key:"refUpload",ref:U,"before-upload":Z,"before-remove":X,"on-exceed":st,multiple:c.multiple,headers:c.headers,limit:c.limit,"on-success":Ne,"on-error":ee,"on-change":q}),{file:f.withCtx(({file:Et})=>[f.createElementVNode("div",zge,[f.createElementVNode("div",Uge,[!F.$slots.fileIcon&&(!c.customIconData[f.unref(Pc)(Et,v)]||!c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon])?(f.openBlock(),f.createBlock(f.unref(UR),{key:0,type:f.unref(Pc)(Et,v)},null,8,["type"])):!F.$slots.fileIcon&&c.customIconData[f.unref(Pc)(Et,v)]&&c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon]?(f.openBlock(),f.createElementBlock("div",Wge,[c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.type]==="img"?(f.openBlock(),f.createElementBlock("img",{key:0,src:c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,jge)):(f.openBlock(),f.createElementBlock("span",{key:1,class:f.normalizeClass([c.customIconData[f.unref(Pc)(Et,v)][c.customIconFields.icon],"file-icon-size"])},null,2))])):f.createCommentVNode("v-if",!0),f.createElementVNode("div",Gge,[f.renderSlot(F.$slots,"fileIcon",{file:Et},void 0,!0)]),f.createElementVNode("div",Zge,[f.createElementVNode("p",qge,[f.createTextVNode(f.toDisplayString(Et[v.name]||Et.name)+" ",1),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createElementBlock("span",Kge,"("+f.toDisplayString(Et.percentage)+"%)",1)):f.createCommentVNode("v-if",!0)]),Et.status==="success"?(f.openBlock(),f.createElementBlock("p",Yge,f.toDisplayString(f.unref(s$)((Et[v.size]||Et.size)/1024/1024))+"MB ",1)):f.createCommentVNode("v-if",!0),Et.percentage&&Et.status==="uploading"?(f.openBlock(),f.createBlock(f.unref(Lt.ElProgress),{key:1,"text-inside":"",percentage:Et.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):f.createCommentVNode("v-if",!0)])]),c.preview?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[(c.preview||Et.percentage===100)&&Vt(Et)?(f.openBlock(),f.createBlock(f.unref(Lt.ElIcon),{key:0,title:"预览",class:"primary"},{default:f.withCtx(()=>[f.createVNode(f.unref(fie),{onClick:kt=>xe(Et)},null,8,["onClick"])]),_:2},1024)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(Lt.ElIcon),{title:"下载",class:"primary"},{default:f.withCtx(()=>[f.createVNode(f.unref(IQ),{onClick:kt=>et(Et)},null,8,["onClick"])]),_:2},1024)],64)):(f.openBlock(),f.createElementBlock("div",Xge,[Et.status==="success"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[Vt(Et)?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,onClick:kt=>xe(Et),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(cr),{onClick:kt=>be(Et),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(f.openBlock(),f.createBlock(f.unref(cr),{key:1,onClick:kt=>be(Et),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))]))])]),default:f.withCtx(()=>[f.createElementVNode("div",$ge,[f.createElementVNode("div",Vge,[c.imageMode?f.renderSlot(F.$slots,"image",{key:0},()=>[Hge],!0):c.showIcon?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,name:"iksvg_img_shangchuanhetongfujianbeifen",type:"primary",bg:"",size:40})):f.createCommentVNode("v-if",!0),f.createElementVNode("span",null,[f.createTextVNode(f.toDisplayString(c.title)+" ",1),!c.preview&&c.tip?(f.openBlock(),f.createBlock(f.unref(Lt.ElTooltip),{key:0,effect:"dark",content:a.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:f.withCtx(()=>[f.createVNode(f.unref(Lt.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(MQ))]),_:1})]),_:1},8,["content"])):f.createCommentVNode("v-if",!0)])]),f.createVNode(f.unref(cr),{name:"iksvg_daoru",bg:"",size:24,width:40,padding:"0"})])]),_:3},16,["file-list","class","accept","action","disabled","multiple","headers","limit"]))],64)),f.createVNode(f.unref(vV),{show:K.value,"onUpdate:show":_n[2]||(_n[2]=Et=>K.value=Et),loadUrl:f.unref(C),file:W.value,onlyofficeServer:((Ge=f.unref(T))==null?void 0:Ge.serverUrl)||c.onlyofficeServer,onlyOfficeConfig:f.unref(T)},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig"])],64)}}}),cSe="",uSe="",Jge=Gs(Zs(Qge,[["__scopeId","data-v-6aec3725"]])),epe={},tpe={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},npe=[f.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),f.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),f.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),f.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),f.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),f.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),f.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),f.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function ope(c,r){return f.openBlock(),f.createElementBlock("svg",tpe,npe)}const spe=Zs(epe,[["render",ope]]),Zte=c=>(f.pushScopeId("data-v-55d00ff7"),c=c(),f.popScopeId(),c),rpe={key:1,class:"upload-btn"},ipe={class:"tip"},ape={class:"loading-statu"},lpe={class:"operate-btn"},cpe={key:0},upe={class:"el-upload-list el-upload-list--picture-card"},dpe=["onClick"],fpe=Zte(()=>f.createElementVNode("span",{class:"error"},"上传错误",-1)),mpe=Zte(()=>f.createElementVNode("p",null,"点击重新上传",-1)),hpe=["src"],gpe={class:"demo-image__preview"},ppe=f.defineComponent({__name:"index",props:f.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:Number,default:106},height:{type:Number,default:106}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:f.mergeModels(["delete","success"],["update:modelValue"]),setup(c,{emit:r}){f.useCssVars(Ge=>({"94cfc708":T.value,"38c70d9e":N.value,"5f90ef5c":_n.value,d061978c:F.value}));const a=c,l=f.useModel(c,"modelValue"),{formItem:i}=Lt.useFormItem(),m=Ge=>Array.isArray(Ge)?Ge.map(Et=>{var at,Sn;const kt=((at=Et.url)==null?void 0:at.startsWith("http"))||((Sn=Et.url)==null?void 0:Sn.startsWith("blob")),We=(Et==null?void 0:Et.url)||Et;return{...Et.url?Et:{url:We},__url:kt?We:`${C.value}${We}`}}):Ge?[{url:Ge,__url:Ge!=null&&Ge.startsWith("http")||Ge!=null&&Ge.startsWith("blob")?Ge:`${C.value}${Ge}`}]:[];f.watch(()=>l.value,Ge=>{!Ge||!Ge.length?z.value=[]:z.value=wo._.cloneDeep(m(Ge)),i==null||i.validate("change")},{deep:!0});const v=r,{cLoadUrl:C,cUploadUrl:E}=Xv(a),T=f.computed(()=>`${a.width}px`),N=f.computed(()=>`${a.height}px`),V=f.computed(()=>a.size),U=f.ref(null),z=f.ref(m(l.value)),W=f.ref([]),K=f.ref(!1),Z=f.ref(0),ce=f.computed(()=>a.tipText||`最多可上传${a.limit}张图片, 每张图片不能超过${a.size}MB`),q=(Ge,Et)=>{},X=Ge=>{if(!Ge.type.includes("image")){Lt.ElMessage.warning("只允许上传图片!");try{z.value.pop()}catch{}return!1}if(!(Ge.size/1024/1024<V.value)){Lt.ElMessage.warning(`图片大小超出系统限制的${a.size}MB!`);try{z.value.pop()}catch{}return!1}return!0},Ce=()=>!1,st=(Ge,Et)=>{var kt,We;Ge.status="ready",Et!==void 0&&W.value.splice(Et,1),(kt=U.value)==null||kt.handleStart(Ge.raw),(We=U.value)==null||We.submit()},Ne=(Ge,Et)=>{var Sn,lt;const kt=l.value.length,We=a.limit-kt;let at=0;for(;at<We&&at<(Ge==null?void 0:Ge.length);)(Sn=U.value)==null||Sn.handleStart(Ge==null?void 0:Ge[at]),(lt=U.value)==null||lt.submit(),at++},ee=(Ge,Et,kt)=>{v("success",Ge,Et,kt),l.value=z.value,i==null||i.validate("change")},xe=(Ge,Et,kt)=>{W.value.push({...Et,__url:Et.url})},et=Ge=>{var Et;K.value=!0,Z.value=Array.isArray(l==null?void 0:l.value)?(Et=l==null?void 0:l.value)==null?void 0:Et.findIndex(kt=>kt.url===Ge.url):0},tt=Ge=>{wo.ikFile.downloadFile(Ge.__url||Ge.url,Ge.name||Ge.url)},je=Ge=>{var Et;(Et=U.value)==null||Et.abort(Ge)},be=Ge=>{var Et;Ge.status!=="success"&&je(Ge),l.value=(Et=z.value)==null?void 0:Et.filter(kt=>kt.uid!==Ge.uid),v("delete",Ge)},An=(Ge,Et)=>{W.value.splice(Et,1)},fn=f.computed(()=>z.value.length+W.value.length<a.limit),Vt=f.computed(()=>l.value.length>=a.limit||a.disabled),F=f.computed(()=>{var Ge;return!((Ge=l.value)!=null&&Ge.length)&&!W.value.length||a.limit===1||typeof l.value=="string"?"0":`${a.width+8}px`}),_n=f.computed(()=>{var Ge;return!((Ge=l.value)!=null&&Ge.length)&&!W.value.length&&typeof l.value!="string"||a.limit===1?"none":"absolute"});return(Ge,Et)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createVNode(f.unref(Lt.ElUpload),f.mergeProps({class:["ik-image-upload",{preview:c.preview,"hide-upload":!fn.value&&c.limit===1,disabled:Vt.value}],ref_key:"refUpload",ref:U,"list-type":"picture-card",accept:c.accept,action:f.unref(E),headers:c.headers,data:c.data,"file-list":z.value,"onUpdate:fileList":Et[0]||(Et[0]=kt=>z.value=kt),multiple:c.multiple,limit:c.limit,"on-change":q,"before-upload":X,"before-remove":Ce,"on-exceed":Ne,"on-success":ee,"on-error":xe,drag:""},Ge.$attrs,{disabled:Vt.value}),f.createSlots({trigger:f.withCtx(()=>[Ge.$slots.trigger?f.renderSlot(Ge.$slots,"trigger",{key:0},void 0,!0):(f.openBlock(),f.createElementBlock("div",rpe,[f.createVNode(f.unref(Lt.ElIcon),{size:20},{default:f.withCtx(()=>[f.createVNode(f.unref(cr),{name:"iksvg_guanbibeifen",disabled:Vt.value},null,8,["disabled"])]),_:1}),f.createElementVNode("span",null,f.toDisplayString(c.title),1)]))]),file:f.withCtx(({file:kt,index:We})=>[f.createElementVNode("div",{class:f.normalizeClass(["load-list",{loading:kt.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[f.withDirectives(f.createElementVNode("div",ape,[f.createVNode(spe),f.createTextVNode(" 上传"+f.toDisplayString(kt.percentage)+"% ",1)],512),[[f.vShow,kt.status==="uploading"]]),f.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),f.createVNode(f.unref(Lt.ElImage),{style:{width:"100%",height:"100%"},src:kt.__url||kt.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),f.createElementVNode("span",lpe,[f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>et(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(FQ))]),_:2},1032,["onClick"])]),f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>tt(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(IQ))]),_:2},1032,["onClick"])]),c.preview?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",cpe,[f.createVNode(f.unref(Lt.ElIcon),{type:"warning",onClick:at=>be(kt)},{default:f.withCtx(()=>[f.createVNode(f.unref(NQ))]),_:2},1032,["onClick"])]))])],2)]),default:f.withCtx(()=>[f.createElementVNode("ul",upe,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(kt,We)=>(f.openBlock(),f.createElementBlock("li",{class:"el-upload-list__item",key:kt.uid},[f.createElementVNode("span",null,[f.createVNode(f.unref(Lt.ElIcon),{onClick:at=>An(kt,We)},{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:2},1032,["onClick"])]),f.createElementVNode("div",{class:f.normalizeClass(["load-list",{loading:kt.status==="uploading",fail:kt.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[f.withDirectives(f.createElementVNode("div",{class:"loading-statu",onClick:at=>st(kt,We)},[f.createVNode(f.unref(Lt.ElIcon),{size:24},{default:f.withCtx(()=>[f.createVNode(f.unref(PQ))]),_:1}),fpe,mpe],8,dpe),[[f.vShow,kt.status==="fail"]]),f.createElementVNode("img",{src:kt.__url,alt:"",style:f.normalizeStyle({"object-fit":c.fit})},null,12,hpe)],2)]))),128))])]),_:2},[c.tip?{name:"tip",fn:f.withCtx(()=>[f.createElementVNode("span",ipe,f.toDisplayString(ce.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),f.createCommentVNode(" 文件预览 "),f.createElementVNode("div",gpe,[K.value?(f.openBlock(),f.createBlock(f.unref(OV),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:Et[1]||(Et[1]=()=>{K.value=!1}),"url-list":m(z.value).map(kt=>kt.__url),"initial-index":Z.value},null,8,["url-list","initial-index"])):f.createCommentVNode("v-if",!0)])],64))}}),CSe="",vpe=Gs(Zs(ppe,[["__scopeId","data-v-55d00ff7"]])),ype=["src"],bpe={name:"IkPrintConfig"},Cpe=f.defineComponent({...bpe,props:{id:{},srcPrefix:{default:""},token:{}},emits:["created"],setup(c,{emit:r}){const a=c,l=r,i=f.computed(()=>!!a.id),m=f.reactive({currentId:a.id,loading:!0,src:""}),v=async()=>{fetch(`${a.srcPrefix??""}/jmreport/save`,{method:"POST",body:JSON.stringify({}),headers:{"Content-Type":"application/json",Authorization:a.token??""}}).then(E=>E.json()).then(({code:E,result:T})=>{if(E===200){const N=T.id;m.currentId=N,m.src=`${a.srcPrefix??""}/jmreport/index/${m.currentId}?token=${a.token}&menuType=printinfo`,l("created",m.currentId)}}).catch(E=>{console.error(E)})},C=()=>{if(!i.value){v();return}m.src=`${a.srcPrefix??""}/jmreport/index/${m.currentId}?token=${a.token}`};return f.onMounted(()=>{C()}),(E,T)=>m.src?(f.openBlock(),f.createElementBlock("iframe",{key:0,width:"100%",height:"100%",src:m.src,frameborder:"0"},null,8,ype)):f.createCommentVNode("v-if",!0)}}),_pe=Gs(Cpe),wpe=["src"],Spe={name:"IkPrintView"},Epe=f.defineComponent({...Spe,props:{modelValue:{type:Boolean,default:!1},templateId:{},dataId:{},srcPrefix:{default:""},token:{},idKey:{default:"id"},width:{default:"100%"},height:{default:"calc(100vh - 186px)"}},emits:["update:modelValue"],setup(c,{emit:r}){const a=c,l=r,i=f.computed({get:()=>a.modelValue,set:C=>{l("update:modelValue",C)}}),m=f.reactive({src:"",showIframe:!1}),v=()=>{m.showIframe=!1,m.src=`${a.srcPrefix}/jmreport/view/${a.templateId}?token=${a.token??""}&${a.idKey}=${a.dataId}`,setTimeout(()=>{m.showIframe=!0},300)};return f.watch(()=>i.value,C=>{C&&v()}),f.onMounted(()=>{i.value&&v()}),(C,E)=>{const T=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(T,{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=N=>i.value=N),fullscreen:"",title:"预览"},{default:f.withCtx(()=>[f.createElementVNode("div",{style:f.normalizeStyle({width:a.width,height:a.height})},[m.showIframe?(f.openBlock(),f.createElementBlock("iframe",{key:0,width:"100%",height:"100%",src:m.src,frameborder:"0"},null,8,wpe)):f.createCommentVNode("v-if",!0)],4)]),_:1},8,["modelValue"])}}}),kpe=Gs(Epe),xpe={class:"ik-full-calendar"},Ape=["onClick"],Tpe={key:0,class:"event-title allday"},Dpe={key:0,class:"event-title-time"},Rpe={key:1,class:"event-title no-allday"},Ope={class:"event-title-time"},Npe={class:"event-title-text"},Ipe={name:"IkFullCalendar"},Bpe=f.defineComponent({...Ipe,props:{options:{default:{}},removable:{type:Boolean,default:!0},modelValue:{default:[]},tooltipFieldName:{default:"remark"}},emits:["added","deleted","update:modelValue","eventClick","deleteClick","dateSelect"],setup(c,{expose:r,emit:a}){const l=c,i=f.computed({get:()=>l.modelValue,set:q=>m("update:modelValue",q)}),m=a,v=f.ref(null),C=q=>{},E=f.ref("dayGridMonth"),T=q=>{m("dateSelect",q)},N=q=>{m("eventClick",q)},V=q=>{m("deleteClick",q)},U=()=>({locale:jQ,plugins:[Ote,Gte,$te],headerToolbar:{left:"dayGridMonth,timeGridWeek,timeGridDay prev,today,next",center:"title",right:""},firstDay:1,initialView:"dayGridMonth",weekends:!0,editable:!0,selectable:!0,selectMirror:!0,dateClick:C,select:T,...l.options,events:i.value}),z=f.reactive({timeType:"month",options:U()}),W=f.ref(null),K=()=>{var q;z.options=U(),(q=v.value)==null||q.buildOptions(z.options)};r({...{prev:()=>{var q;(q=W.value)==null||q.prev()},next:()=>{var q;(q=W.value)==null||q.next()},today:()=>{var q;(q=W.value)==null||q.today()},changeView:q=>{var X;(X=W.value)==null||X.changeView(q),E.value=q},getDate:()=>{var q;return(q=W.value)==null?void 0:q.getDate()},getView:()=>{var q;return(q=W.value)==null?void 0:q.view},unselect:()=>{var q;return(q=W.value)==null?void 0:q.unselect()}}}),f.watch(()=>i.value,()=>{K()});const ce=()=>{var q;W.value=(q=v.value)==null?void 0:q.getApi()};return f.onMounted(()=>{ce()}),(q,X)=>{const Ce=f.resolveComponent("el-tooltip"),st=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",xpe,[f.createVNode(f.unref(_te),{ref_key:"_ref",ref:v,options:z.options,style:{height:"100%"}},{eventContent:f.withCtx(Ne=>[f.createElementVNode("div",{class:"title-line",onClick:ee=>N(Ne)},[f.createVNode(Ce,null,{content:f.withCtx(()=>{var ee,xe;return[f.createCommentVNode(" {{arg}} "),f.createTextVNode(" "+f.toDisplayString((xe=(ee=Ne.event)==null?void 0:ee.extendedProps)==null?void 0:xe[l.tooltipFieldName]),1)]}),default:f.withCtx(()=>[Ne.event.allDay?(f.openBlock(),f.createElementBlock("span",Tpe,[E.value==="dayGridMonth"?(f.openBlock(),f.createElementBlock("span",Dpe,f.toDisplayString("(全天)"))):f.createCommentVNode("v-if",!0),f.createElementVNode("span",null,f.toDisplayString(Ne.event.title),1)])):(f.openBlock(),f.createElementBlock("span",Rpe,[f.createElementVNode("span",Ope,f.toDisplayString(f.unref(wo.ikDate).toDateTime(Ne.event.startStr,"HH:mm")),1),f.createElementVNode("span",Npe,f.toDisplayString(Ne.event.title),1)]))]),_:2},1024),l.removable?(f.openBlock(),f.createBlock(st,{key:0,size:16,onClick:f.withModifiers(ee=>V(Ne),["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(OQ))]),_:2},1032,["onClick"])):f.createCommentVNode("v-if",!0)],8,Ape)]),_:1},8,["options"])])}}}),wSe="",Mpe=Zs(Bpe,[["__scopeId","data-v-f0925ff8"]]);let Ppe=class{constructor(){MS(this,"id",new Date().getTime());MS(this,"title","");MS(this,"start","");MS(this,"end","");MS(this,"allDay",!1);MS(this,"extendedProps",{})}};const qte=Gs(Mpe),Lpe={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},Fpe={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$pe=["xlink:href"],Vpe=["src"],Hpe={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},zpe=["xlink:href"],Upe=["src"],Wpe=f.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},setup(c){const r=c,a=f.computed(()=>r),l=f.computed(()=>{const{name:m}=a.value;return/^http?:\/\//.test(m)?"img":/i-[^:]+:[^:]+/.test(m)?"unocss":m!=null&&m.startsWith("iksig")?"iksig":m!=null&&m.includes(":")?"iconify":m!=null&&m.startsWith("iksvg")?"svg":"i"}),i=f.computed(()=>{const m=[];if(a.value.flip)switch(a.value.flip){case"horizontal":m.push("rotateY(180deg)");break;case"vertical":m.push("rotateX(180deg)");break;case"both":m.push("rotateX(180deg)"),m.push("rotateY(180deg)");break}a.value.rotate&&m.push(`rotate(${a.value.rotate%360}deg)`);const v={pointerEvents:a.value.disabled?"none":"auto",...a.value.color&&{color:a.value.color},...a.value.size&&{fontSize:typeof a.value.size=="number"?`${a.value.size}px`:a.value.size},...m.length&&{transform:m.join(" ")},padding:a.value.showBg||a.value.bg?a.value.padding:0,...a.value.color&&l.value!=="iksig"?{"--ik-color-icon-dark":a.value.color,"--ik-color-icon-light":a.value.colorLight||wo.ikColor.setOpacity(a.value.color,a.value.opacity)}:{}};return a.value.width&&(v.width=v.height=typeof a.value.width=="number"?`${a.value.width}px`:a.value.width),v});return(m,v)=>{const C=f.resolveComponent("el-tooltip"),E=f.resolveComponent("el-button");return a.value.tableIconType==="icon"||!a.value.tableIconType?(f.openBlock(),f.createElementBlock("span",Lpe,[a.value.notip||!a.value.title?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[m.name]:l.value==="unocss","show-bg":a.value.showBg||a.value.bg,default:a.value.size==="default",small:a.value.size==="small",big:a.value.size==="big",warning:a.value.warning||a.value.type==="warning",primary:a.value.primary||a.value.type==="primary",success:m.success||a.value.type==="success",error:a.value.error||a.value.type==="error",active:a.value.active,disabled:a.value.disabled}]),style:f.normalizeStyle(i.value)},[f.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),l.value==="iksig"?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(`iksig ${a.value.name}`),style:f.normalizeStyle(i.value)},null,6)):l.value==="svg"?(f.openBlock(),f.createElementBlock("svg",Fpe,[f.createElementVNode("use",{"xlink:href":`#${a.value.name}`},null,8,$pe)])):l.value==="img"?(f.openBlock(),f.createElementBlock("img",{key:2,src:a.value.name,class:"h-[1em] w-[1em]"},null,8,Vpe)):(f.openBlock(),f.createElementBlock("i",{key:3,class:f.normalizeClass(a.value.name),style:f.normalizeStyle(i.value)},null,6))],6)):(f.openBlock(),f.createBlock(C,{key:1,content:a.value.title,placement:"top"},{default:f.withCtx(()=>[f.createElementVNode("i",{class:f.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[m.name]:l.value==="unocss","show-bg":a.value.showBg||a.value.bg,default:a.value.size==="default",small:a.value.size==="small",big:a.value.size==="big",warning:a.value.warning||a.value.type==="warning",primary:m.primary||a.value.type==="primary",success:m.success||a.value.type==="success",error:a.value.error||a.value.type==="error",active:a.value.active}]),style:f.normalizeStyle(i.value)},[l.value==="iksig"?(f.openBlock(),f.createElementBlock("i",{key:0,class:f.normalizeClass(`iksig ${a.value.name}`),style:f.normalizeStyle(i.value)},null,6)):l.value==="svg"?(f.openBlock(),f.createElementBlock("svg",Hpe,[f.createElementVNode("use",{"xlink:href":`#${a.value.name}`},null,8,zpe)])):l.value==="img"?(f.openBlock(),f.createElementBlock("img",{key:2,src:a.value.name,class:"h-[1em] w-[1em]"},null,8,Upe)):(f.openBlock(),f.createElementBlock("i",{key:3,class:f.normalizeClass(a.value.name),style:f.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(f.openBlock(),f.createBlock(E,{key:1,type:["warning","error"].includes(a.value.type)?"danger":""},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a.value.title),1)]),_:1},8,["type"]))}}}),SSe="",cr=Gs(Zs(Wpe,[["__scopeId","data-v-52806adf"]])),yV=c=>(f.pushScopeId("data-v-e308f501"),c=c(),f.popScopeId(),c),jpe={class:"ik-schedule"},Gpe={class:"ik-schedule__left"},Zpe={class:"ik-schedule__header"},qpe={class:"ik-schedule__title"},Kpe=yV(()=>f.createElementVNode("div",{class:"ik-schedule__header-right"},null,-1)),Ype={class:"ik-schedule__body"},Xpe={style:{"font-size":"18px"}},Qpe={key:0},Jpe={style:{width:"90%",display:"flex","align-items":"center","justify-content":"space-between"}},e1e={key:0,style:{"margin-left":"2%"}},t1e=yV(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),n1e={key:1},o1e=yV(()=>f.createElementVNode("span",{class:"to",style:{width:"10% !important"}},"至",-1)),s1e={class:"dialog-footer"},r1e={name:"IkSchedule"},i1e=f.defineComponent({...r1e,props:{modelValue:{default:[]},options:{default:{initialView:"dayGridMonth"}},editVisible:{type:Boolean},removable:{type:Boolean,default:!0}},emits:["update:modelValue","added","updated","deleted","editOpen","submit","update:editVisible","submitAdd","submitUpdate","submitDelete"],setup(c,{expose:r,emit:a}){var ee;const l=c,i=a,m=!!f.useSlots().form,v=f.computed({get:()=>l.modelValue,set:xe=>{i("update:modelValue",xe)}}),C=f.computed(()=>({...l.options,headerToolbar:!1})),E=f.reactive({currentView:(ee=l.options)==null?void 0:ee.initialView,viewTitle:"",rightLabel:"今日",timeType:"month",currentDate:null}),T=f.ref(null),N=xe=>{var et;(et=T.value)==null||et.changeView(xe),E.currentView=xe,V()},V=()=>{var et;const xe=(et=T.value)==null?void 0:et.getView();E.viewTitle=xe==null?void 0:xe.title},U=()=>{var xe;(xe=T.value)==null||xe.prev(),V()},z=()=>{var xe;(xe=T.value)==null||xe.next(),V()},W=()=>{var xe;(xe=T.value)==null||xe.today(),V()},K=xe=>E.currentView===xe,Z=f.ref(null),ce={createDefaultForm:()=>({title:"",allDay:!1,type:1,startDate:"",endDate:"",startTime:"",endTime:"",location:"",remark:""}),close:()=>{X.value=!1},customSubmit:xe=>{var tt,je;let et={...xe,id:void 0,allDay:q.form.allDay,start:(tt=q.selectInfo)==null?void 0:tt.startStr,end:(je=q.selectInfo)==null?void 0:je.endStr};ce.operation(et),ce.close()},operation:xe=>{var et;q.operation==="add"?i("submitAdd",xe):(xe.id=(et=q.editEvent)==null?void 0:et.id,i("submitUpdate",xe))},submit:async()=>{var et,tt;if(m){i("submit");return}if(!q.form.title){Lt.ElMessage.info("标题不能为空");return}if(!q.form.allDay&&(!q.form.startTime||!q.form.endTime)){Lt.ElMessage.info("时间不能为空");return}let xe={id:void 0,title:q.form.title,allDay:q.form.allDay,start:(et=q.selectInfo)==null?void 0:et.startStr,end:(tt=q.selectInfo)==null?void 0:tt.endStr,extendedProps:{...q.form}};if(xe.allDay)xe.start=wo.ikDate.toDate(q.form.startDate),xe.end=wo.ikDate.toDate(q.form.endDate);else{const je=wo.ikDate.toDate(q.form.startDate),be=wo.ikDate.toDateTime(q.form.startTime).substring(10),An=wo.ikDate.toDateTime(q.form.endTime).substring(10);xe.start=`${je}${be}`,xe.end=`${je}${An}`,xe.extendedProps.startTime=xe.start,xe.extendedProps.endTime=xe.end}ce.operation(xe),ce.close()},reset:()=>{var xe;q.form=ce.createDefaultForm(),(xe=Z.value)==null||xe.clearValidate()},edit:()=>{q.editable=!0,q.title="编辑日程"},cancelEdit:()=>{q.editable=!1,q.title="日程信息"},del:()=>{Ne(q.clickInfo)}},q=f.reactive({operation:"update",selectInfo:{},editEvent:void 0,title:"",visible:!1,allDay:!1,form:ce.createDefaultForm(),editable:!1,clickInfo:null}),X=f.computed({get:()=>q.visible,set:xe=>{q.visible=xe}}),Ce=xe=>{var et;if(q.form.allDay=xe.allDay,q.selectInfo=xe,ce.reset(),xe.view.type=="dayGridMonth"){let tt=xe.end.getTime()-864e5;E.timeType="month",q.form.startDate=wo.ikDate.toYMD(xe.start),q.form.endDate=wo.ikDate.toYMD(new Date(tt)),q.form.allDay=!0}else xe.view.type=="timeGridWeek"?E.timeType="week":xe.view.type=="timeGridDay"&&(E.timeType="day"),q.form.startDate=wo.ikDate.toYMD(xe.start),q.form.endDate=wo.ikDate.toYMD(xe.start),q.form.startTime=wo.ikDate.toDateTime(xe.start),q.form.endTime=wo.ikDate.toDateTime(xe.end);(et=T.value)==null||et.unselect(),f.nextTick(()=>{q.title="新建日程",q.operation="add",q.editable=!0,X.value=!0,i("editOpen",JSON.parse(JSON.stringify(q)))})},st=xe=>{q.title="日程信息",q.operation="update",q.clickInfo=xe,q.editEvent=xe.event;debugger;q.editEvent.allDay?(q.form.startDate=q.editEvent.startStr,q.form.endDate=q.editEvent.startStr):(q.form.startDate=q.editEvent.startStr,q.form.startTime=q.editEvent.start,q.form.endTime=q.editEvent.end),q.form.title=q.editEvent.title,q.form.allDay=q.editEvent.allDay,sre.copyValue(q.form,q.editEvent.extendedProps),ce.cancelEdit(),X.value=!0,i("editOpen",JSON.parse(JSON.stringify(q)))},Ne=xe=>{Lt.ElMessageBox.confirm(`你确定删除事件 ${xe.event.title} ?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ce.close(),i("submitDelete",xe.event.id)})};return r({customSubmit:xe=>ce.customSubmit(xe)}),f.onMounted(()=>{V()}),(xe,et)=>{const tt=f.resolveComponent("el-button"),je=f.resolveComponent("el-button-group"),be=f.resolveComponent("el-icon"),An=f.resolveComponent("el-space"),fn=f.resolveComponent("el-input"),Vt=f.resolveComponent("el-form-item"),F=f.resolveComponent("el-date-picker"),_n=f.resolveComponent("el-time-picker"),Ge=f.resolveComponent("el-checkbox"),Et=f.resolveComponent("el-form"),kt=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock("div",jpe,[f.createElementVNode("div",Gpe,[f.createElementVNode("div",Zpe,[f.createVNode(An,{style:{"flex-shrink":"0"},size:24},{default:f.withCtx(()=>[f.createVNode(je,null,{default:f.withCtx(()=>[f.createVNode(tt,{onClick:et[0]||(et[0]=We=>N("dayGridMonth")),type:K("dayGridMonth")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("月")]),_:1},8,["type"]),f.createVNode(tt,{onClick:et[1]||(et[1]=We=>N("timeGridWeek")),type:K("timeGridWeek")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("周")]),_:1},8,["type"]),f.createVNode(tt,{onClick:et[2]||(et[2]=We=>N("timeGridDay")),type:K("timeGridDay")?"primary":""},{default:f.withCtx(()=>[f.createTextVNode("日")]),_:1},8,["type"])]),_:1}),f.createElementVNode("span",qpe,f.toDisplayString(E.viewTitle),1),f.createVNode(je,{style:{"flex-shrink":"0"}},{default:f.withCtx(()=>[f.createVNode(tt,{onClick:U},{default:f.withCtx(()=>[f.createVNode(be,null,{default:f.withCtx(()=>[f.createVNode(f.unref(n$))]),_:1})]),_:1}),f.createVNode(tt,{onClick:W},{default:f.withCtx(()=>[f.createTextVNode("今天")]),_:1}),f.createVNode(tt,{onClick:z},{default:f.withCtx(()=>[f.createVNode(be,null,{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})]),_:1})]),_:1})]),_:1}),Kpe]),f.createElementVNode("div",Ype,[f.createVNode(f.unref(qte),{removable:xe.removable,onDateSelect:Ce,onDeleteClick:Ne,onEventClick:st,ref_key:"_refCalendar",ref:T,options:C.value,modelValue:v.value,"onUpdate:modelValue":et[3]||(et[3]=We=>v.value=We)},null,8,["removable","options","modelValue"])])]),f.createCommentVNode(" 新建/修改对话框 "),f.createVNode(kt,{width:"700px",modelValue:X.value,"onUpdate:modelValue":et[11]||(et[11]=We=>X.value=We)},{header:f.withCtx(()=>[f.createElementVNode("div",null,[f.createElementVNode("span",Xpe,f.toDisplayString(q.title),1),q.operation==="update"?(f.openBlock(),f.createElementBlock("span",Qpe,[q.editable?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,style:{"margin-left":"4px"},name:"iksvg_qiehuan-daohang",onClick:ce.cancelEdit},null,8,["onClick"])):(f.openBlock(),f.createBlock(f.unref(cr),{key:0,style:{"margin-left":"4px"},name:"iksvg_xiugai",onClick:ce.edit},null,8,["onClick"]))])):f.createCommentVNode("v-if",!0)])]),footer:f.withCtx(()=>[f.createElementVNode("span",s1e,[f.renderSlot(xe.$slots,"form-footer",{},()=>[f.createElementVNode("span",null,[f.createVNode(tt,{onClick:ce.close},{default:f.withCtx(()=>[f.createTextVNode("取消")]),_:1},8,["onClick"]),f.createVNode(tt,{onClick:ce.del},{default:f.withCtx(()=>[f.createTextVNode("删除")]),_:1},8,["onClick"]),f.createVNode(tt,{type:"primary",onClick:ce.submit},{default:f.withCtx(()=>[f.createTextVNode("确定")]),_:1},8,["onClick"])])],!0)])]),default:f.withCtx(()=>[f.renderSlot(xe.$slots,"form",{},()=>[f.createVNode(Et,{ref_key:"_editFormRef",ref:Z,model:q.form,disabled:!q.editable},{default:f.withCtx(()=>[f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(DQ))]),_:1}),f.createVNode(fn,{modelValue:q.form.title,"onUpdate:modelValue":et[4]||(et[4]=We=>q.form.title=We),placeholder:"请输入标题",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(RQ))]),_:1}),f.createElementVNode("div",Jpe,[f.createVNode(F,{disabled:"",modelValue:q.form.startDate,"onUpdate:modelValue":et[5]||(et[5]=We=>q.form.startDate=We),type:"date",placeholder:"开始日期",style:f.normalizeStyle({width:q.form.allDay?"45%":"90%"})},null,8,["modelValue","style"]),q.form.allDay?(f.openBlock(),f.createElementBlock("div",n1e,[o1e,f.createVNode(F,{disabled:"",modelValue:q.form.endDate,"onUpdate:modelValue":et[8]||(et[8]=We=>q.form.endDate=We),type:"date",placeholder:"结束日期",style:{width:"90%"}},null,8,["modelValue"])])):(f.openBlock(),f.createElementBlock("div",e1e,[f.createVNode(_n,{modelValue:q.form.startTime,"onUpdate:modelValue":et[6]||(et[6]=We=>q.form.startTime=We),type:"datetime",placeholder:"开始时间",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"]),t1e,f.createVNode(_n,{modelValue:q.form.endTime,"onUpdate:modelValue":et[7]||(et[7]=We=>q.form.endTime=We),type:"datetime",placeholder:"结束时间",style:{width:"45%"},format:"HH:mm"},null,8,["modelValue"])])),f.createVNode(Ge,{modelValue:q.form.allDay,"onUpdate:modelValue":et[9]||(et[9]=We=>q.form.allDay=We),label:"全天",style:{"margin-left":"2%"}},null,8,["modelValue"])])]),_:1}),f.createVNode(Vt,null,{default:f.withCtx(()=>[f.createVNode(be,{class:"icon"},{default:f.withCtx(()=>[f.createVNode(f.unref(jre))]),_:1}),f.createVNode(fn,{type:"textarea",modelValue:q.form.remark,"onUpdate:modelValue":et[10]||(et[10]=We=>q.form.remark=We),placeholder:"描述",style:{width:"90%"},clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","disabled"])],!0)]),_:3},8,["modelValue"])])}}}),kSe="",a1e=Gs(Zs(i1e,[["__scopeId","data-v-e308f501"]])),l1e={key:0,class:"ik-tabs-split overflow-overlay gl-padding"},c1e=f.defineComponent({__name:"IkPageTabs",props:f.mergeModels({tabs:{type:Array,default:()=>[]},defaultSlot:{type:Boolean,default:!0},lazyTab:{type:Boolean,default:!1},split:{type:Boolean,default:!1}},{modelValue:{type:String||Number,default:""},modelModifiers:{}}),emits:f.mergeModels(["tabClick","search"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=r,i=f.useModel(c,"modelValue"),m=f.ref(new Map);for(const C of a.tabs)m.value.set(C.id,a.lazyTab?C.id!==i.value:!1);const v=C=>{i.value=C.paneName,m.value.get(C.paneName)||l("tabClick",C.paneName,C),m.value.set(C.paneName,!1)};return(C,E)=>{const T=f.resolveComponent("el-tab-pane"),N=f.resolveComponent("el-tabs");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createCommentVNode(' <div class="flex-1 contents"> '),f.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=V=>i.value=V),class:f.normalizeClass(["ik-tabs",{"is-default":C.$slots.default,"split gl-padding gl-container":c.split}]),onTabClick:v},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.tabs,V=>(f.openBlock(),f.createBlock(T,{key:V.id,disabled:V==null?void 0:V.disabled,name:V.id},{label:f.withCtx(()=>[f.createElementVNode("span",null,f.toDisplayString(V.label),1)]),default:f.withCtx(()=>[!C.$slots.default&&!m.value.get(V.id)&&!c.split?f.renderSlot(C.$slots,V.id,{key:0},void 0,!0):f.createCommentVNode("v-if",!0)]),_:2},1032,["disabled","name"]))),128)),f.createCommentVNode(" 当存在默认slot且需要展示默认slot时 "),C.$slots.default&&c.defaultSlot&&!c.split?f.renderSlot(C.$slots,"default",{key:0},void 0,!0):f.createCommentVNode("v-if",!0)]),_:3},8,["modelValue","class"]),c.split?(f.openBlock(),f.createElementBlock("div",l1e,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.tabs,V=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[!C.$slots.default&&!m.value.get(V.id)?f.renderSlot(C.$slots,V.id,{key:0},void 0,!0):f.createCommentVNode("v-if",!0)],64))),256)),C.$slots.default&&c.defaultSlot?f.renderSlot(C.$slots,"default",{key:0},void 0,!0):f.createCommentVNode("v-if",!0)])):f.createCommentVNode("v-if",!0),f.createCommentVNode(" </div> ")],64)}}}),ASe="",u1e=Gs(Zs(c1e,[["__scopeId","data-v-e282a7f2"]]));var J1=(c=>(c.input="input",c.area="area",c.number="number",c.select="select",c.date="date",c.datetime="datetime",c.checkbox="checkbox",c.radio="radio",c.treeselect="treeselect",c.choosePerson="choosePerson",c))(J1||{}),X2=(c=>(c.year="year",c.month="month",c.date="date",c.dates="dates",c.datetime="datetime",c.week="week",c.datetimerange="datetimerange",c.daterange="daterange",c.monthrange="monthrange",c))(X2||{});function Kte(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!f.isVNode(c)}const d1e=f.defineComponent({name:"IkSearchAuto",props:{list:{required:!0,type:Array,default:()=>[]},shadow:{type:String,default:"never"},immediate:{type:Boolean,default:!0},tab:{type:String,default:""},search:{type:Function,default:null},loading:{type:Boolean,default:!1}},emits:["search","pickerChange"],setup(c,{emit:r,expose:a}){const l=f.ref(),i={},m=f.ref({}),v=f.ref([]),C=f.ref({...m.value});f.watch(v,(at,Sn)=>{const lt=Sn.filter($t=>!at.includes($t));if(lt.length){let $t=!1;lt.forEach(Ze=>{C.value[Ze]!==void 0&&($t=!0),C.value[Ze]=void 0}),$t&&r("search",C.value)}});const E=()=>{v.value=[],c.list.forEach(at=>{var Sn,lt;m.value[at.key]=m.value[at.value],i[at.key]=i[at.value],v.value.push(at.key),(Sn=C.value)[lt=at.key]??(Sn[lt]=at.value||null)})};E(),f.watch(()=>c.list,()=>{E()});const T=f.computed(()=>v.value.map(at=>c.list.find(Sn=>Sn.key===at))),N=()=>{var at;C.value.page=1,(at=c.search)==null||at.call(c,C.value),r("search",C.value)};a({resetForm:()=>{var at,Sn;(Sn=(at=l.value)==null?void 0:at.resetFields)==null||Sn.call(at),N()},reRequest:()=>{N()}});const z=()=>{var at;r("search",C.value),(at=c.search)==null||at.call(c,C.value)},W=at=>{at.key==="Enter"&&N()},K=()=>{var at;(at=l.value)==null||at.resetFields(),N()};c.immediate&&N();const Z=({maxlength:at,minlength:Sn,key:lt,disabled:$t,placeholder:Ze,formProp:ct={},value:oe,label:po})=>f.createVNode(Lt.ElInput,f.mergeProps({modelValue:C.value[lt],"onUpdate:modelValue":[Nn=>C.value[lt]=Nn,Nn=>C.value[lt]=Nn],clearable:!0,maxlength:at,minlength:Sn,disabled:$t,onBlur:()=>z()},ct,{placeholder:(ct==null?void 0:ct.placeholder)||Ze||`请输入${po||""}`}),null),ce=({key:at,placeholder:Sn,max:lt,min:$t,disabled:Ze,precision:ct,step:oe=1,label:po,formProp:Nn={}})=>f.createVNode(Lt.ElInputNumber,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":yo=>C.value[at]=yo,clearable:!0,max:lt,min:$t,disabled:Ze,precision:ct,step:oe,onChange:()=>z()},Nn,{placeholder:(Nn==null?void 0:Nn.placeholder)||Sn||`请输入${po||""}`}),null),q=({key:at,placeholder:Sn,disabled:lt,options:$t,label:Ze,multiple:ct=!1,filterable:oe=!0,formProp:po={}})=>f.createVNode(Lt.ElSelect,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,clearable:!0,disabled:lt,multiple:ct,filterable:oe,onChange:()=>z()},po,{placeholder:(po==null?void 0:po.placeholder)||Sn||`请选择${Ze||""}`}),{default:()=>[$t==null?void 0:$t.map(Nn=>f.createVNode(Lt.ElOption,{key:Nn.value,label:Nn.label,value:Nn.value},null))]}),X=({key:at,disabled:Sn,options:lt,formProp:$t={}})=>f.createVNode(Lt.ElRadioGroup,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ze=>C.value[at]=Ze,disabled:Sn,onChange:()=>z()},$t),{default:()=>[lt==null?void 0:lt.map(Ze=>($t==null?void 0:$t.radioType)==="button"?f.createVNode(Lt.ElRadioButton,{key:Ze.value,label:Ze.value,name:Ze.label},null):f.createVNode(Lt.ElRadio,{key:Ze.value,label:Ze.value,name:Ze.label},null))]}),Ce=({key:at,disabled:Sn,options:lt,min:$t,max:Ze,formProp:ct={}})=>f.createVNode(Lt.ElCheckboxGroup,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":oe=>C.value[at]=oe,disabled:Sn,max:Ze,min:$t,onChange:()=>z()},ct),{default:()=>[lt==null?void 0:lt.map(oe=>f.createVNode(Lt.ElCheckbox,{key:oe.value,label:oe.label,value:oe.value},null))]}),st=({key:at,label:Sn,formProp:lt={},placeholder:$t})=>f.createVNode(Lt.ElDatePicker,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ze=>C.value[at]=Ze,onChange:()=>z()},lt,{placeholder:(lt==null?void 0:lt.placeholder)||$t||`请选择${Sn}时间`}),null),Ne=({key:at,disabled:Sn,editable:lt=!0,startPlaceholder:$t="开始日期",endplaceholder:Ze="结束日期",dateType:ct=X2.date,format:oe,placeholder:po="请选择日期",popperclass:Nn,rangeSeparator:yo="-",defaultValue:Fo,defaultTime:gi,valueFormat:vt,disabledDate:Wt=()=>!1,formProp:St={}})=>{let Ue=oe;if(Ue)switch(ct){case X2.date:case X2.dates:Ue="YYYY-MM-DD";break;case X2.year:Ue="YYYY";break;case X2.month:Ue="YYYY-MM";break;case X2.week:Ue="YYYY-MM-DD";break;default:Ue=""}return f.createVNode(Lt.ElDatePicker,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":In=>C.value[at]=In,onChange:()=>z(),disabled:Sn,type:ct,editable:lt,startPlaceholder:$t,endPlaceholder:Ze,rangeSeparator:yo,format:Ue,popperClass:Nn,defaultValue:Fo,defaultTime:gi,valueFormat:vt,disabledDate:Wt},St,{placeholder:(St==null?void 0:St.placeholder)||po||"请选择日期"}),null)},ee=({key:at,options:Sn,multiple:lt=!1,filterable:$t=!0,nodeKey:Ze="id",props:ct,highlightCurrent:oe=!0,defaultExpandAll:po=!1,expandOnClickNode:Nn=!1,placeholder:yo="全部",checkOnClickNode:Fo=!1,showCheckbox:gi=!1,checkStrictly:vt=!0,defaultCheckedKeys:Wt=[],currentNodeKey:St="",accordion:Ue=!1,formProp:In={},label:xt})=>f.createVNode(Lt.ElTreeSelect,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Ct=>C.value[at]=Ct,data:Sn,onChange:()=>z(),clearable:!0,multiple:lt,props:ct,placeholder:yo,filterable:$t,nodeKey:Ze,highlightCurrent:oe,defaultExpandAll:po,expandOnClickNode:Nn,checkOnClickNode:Fo,showCheckbox:gi,checkStrictly:vt,defaultCheckedKeys:Wt,currentNodeKey:St,accordion:Ue},In,{placeholder:(In==null?void 0:In.placeholder)||yo||`请选择${xt||""}`}),null),xe=({key:at,selectKey:Sn,placeholder:lt,disabled:$t,options:Ze,multiple:ct=!1,filterable:oe=!0,formProp:po={}})=>f.createVNode(Lt.ElInput,f.mergeProps({disabled:$t,modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,onBlur:()=>z()},po,{placeholder:(po==null?void 0:po.placeholder)||lt||"全部"}),{prepend:()=>f.createVNode(Lt.ElSelect,f.mergeProps({disabled:$t,multiple:ct,filterable:oe,modelValue:C.value[Sn],"onUpdate:modelValue":Nn=>C.value[Sn]=Nn,onChange:()=>z()},po),{default:()=>[Ze==null?void 0:Ze.map(Nn=>f.createVNode(Lt.ElOption,{key:Nn.value,label:Nn.label,value:Nn.value},null))]})}),et="",tt="iking",je=f.ref(null),be=f.ref([]),An=f.ref(!1),fn=f.ref(""),Vt=new Map,F=at=>{An.value=!0,be.value=Vt.has(at)?Vt.get(at):C.value[at],fn.value=at},_n=()=>{Vt.set(fn.value,[]),fn.value="",z()},Ge=at=>{var Sn,lt;C.value[fn.value]=(Sn=at.list.map($t=>$t.elementName))==null?void 0:Sn.join(","),Vt.set(fn.value,at.list),r("search",C.value),r("pickerChange",at),(lt=c.search)==null||lt.call(c,C.value)},Et=({key:at,placeholder:Sn,typeOption:lt,_list:$t,maxlength:Ze,minlength:ct,disabled:oe,formProp:po})=>f.createVNode(Lt.ElInput,f.mergeProps({modelValue:C.value[at],"onUpdate:modelValue":Nn=>C.value[at]=Nn,clearable:!0,maxlength:Ze,minlength:ct,disabled:oe},po,{onClick:()=>F(at),onClear:()=>_n(),placeholder:(po==null?void 0:po.placeholder)||Sn||`点击选择${label||"人员"}`}),null),kt=at=>{switch(at.type){case"":case void 0:case J1.input:case"el-input":return Z(at);case J1.number:case"el-input-number":return ce(at);case J1.select:case"el-select":return q(at);case J1.checkbox:case"el-checkbox":return Ce(at);case J1.radio:case"el-radio-group":case"el-radio":return X(at);case J1.date:case"el-date-picker":return Ne(at);case"el-time-select":return st(at);case J1.treeselect:case"el-tree-select":return ee(at);case J1.choosePerson:return Et(at);case"select-input":return xe(at);default:return f.createVNode(f.Fragment,null,null)}},We=f.computed(()=>{var lt;const at=[],Sn=T.value.length-1;return(lt=T.value)==null||lt.forEach(($t,Ze)=>{let ct,oe;if(!$t)return[];const po=$t.col||1;at.push(f.createVNode(Lt.ElCol,{xl:{span:po*6},lg:{span:po*6},md:{span:po*12},sm:{span:po*24}},{default:()=>[Ze===Sn?f.createVNode("div",{class:"last-form"},[f.createVNode(Lt.ElFormItem,{label:$t.type==="select-input"?"":$t.label,prop:$t.key},Kte(ct=kt($t))?ct:{default:()=>[ct]}),f.createVNode(cr,{name:"icon-sousuo1",pop:!0,title:"搜索",size:"big","show-bg":!0,width:40,onClick:()=>z()},null),f.createVNode(cr,{name:"icon-zhongzhi",pop:!0,title:"重置并搜索",size:"big","show-bg":!0,width:40,onClick:()=>K()},null)]):f.createVNode(Lt.ElFormItem,{label:$t.type==="select-input"?"":$t.label,prop:$t.key},Kte(oe=kt($t))?oe:{default:()=>[oe]})]}))}),at});return()=>f.createVNode(f.Fragment,null,[f.createVNode(Lt.ElCard,{class:"gl-search-card",shadow:c.shadow},{default:()=>[f.createVNode(Lt.ElForm,{class:"auto-search-form",onKeyup:W,ref:l,model:C.value},{default:()=>[f.createVNode(Lt.ElRow,{gutter:16},{default:()=>[We.value]})]})]}),f.createVNode(yA,{ref:je.value,modelValue:be.value,"onUpdate:modelValue":at=>be.value=at,show:An.value,"onUpdate:show":at=>An.value=at,"append-to-body":!0,api:{methods:"post",url:`${et}/server/component/pick/mix`,headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:tt}},tabs:["group","role","post"],chooseType:["user"],typeOption:{dep:"DEPT",user:"USER",role:"ROLE",post:"POST"},propOption:{name:"elementName",id:"elementId",type:"elementType"},onOk:at=>Ge(at)},null)])}}),f1e={class:"header-left"},m1e={class:"title"},h1e={class:"flex items-center"},g1e=f.defineComponent({__name:"IkPageHead",props:f.mergeModels({headerTitle:{type:String,default:""},headerBorder:{type:Boolean,default:!1},fields:{required:!0,type:Array,default:()=>[]},search:{type:Function,default:null},loading:{type:Boolean,default:!1},tabId:{type:Number||String,default:0},exportBtn:{type:Boolean,default:!1},refreshBtn:{type:Boolean,default:!1},settingBtn:{type:Boolean,default:!0},defaultShow:{type:Boolean,default:!1},headerHeight:{type:Number,default:66}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(c){f.useCssVars(T=>({"59e2b6b4":E}));const r=c,a=f.useModel(c,"modelValue"),l=f.ref(r.defaultShow),i=()=>{l.value=!l.value},m=f.computed(()=>r.fields.filter(T=>!T.onlyForm)),v=f.computed(()=>{var T;return(T=r.fields)==null?void 0:T.filter(N=>N.search)}),C=f.computed(()=>v.value.length),E=`${r.headerHeight}px`;return(T,N)=>{const V=f.resolveComponent("el-card");return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["ik-page-header",{"show-search":l.value}])},[f.createElementVNode("div",{class:"header",style:f.normalizeStyle({borderColor:c.headerBorder?"var(--ik-border-color)":"transparent",marginBottom:c.headerBorder?"8px":"0"})},[f.createElementVNode("div",f1e,[f.createCommentVNode(' 左侧标题、tab页或自定义内容 v-if="!$slots.headerLeft" '),f.createElementVNode("span",m1e,f.toDisplayString(c.headerTitle),1),f.renderSlot(T.$slots,"headerLeft",{},void 0,!0)]),f.createCommentVNode(" 默认按钮 "),f.createElementVNode("div",h1e,[f.createCommentVNode(" 右侧操作或自定义内容 "),f.renderSlot(T.$slots,"headerRight",{},void 0,!0),c.exportBtn?(f.openBlock(),f.createBlock(f.unref(cr),{key:0,name:"iksvg_xiazai",type:"primary",title:"导出","show-bg":"",size:"default"})):f.createCommentVNode("v-if",!0),C.value?(f.openBlock(),f.createBlock(f.unref(cr),{key:1,name:"iksvg_shaixuan1",size:"default",title:l.value?"收起筛选条件":"展开筛选条件","show-bg":"",onClick:i},null,8,["title"])):f.createCommentVNode("v-if",!0),c.refreshBtn?(f.openBlock(),f.createBlock(f.unref(cr),{key:2,name:"iksvg_zhongzhi1",title:"保留搜索条件刷新","show-bg":"",size:"default",onClick:c.search},null,8,["onClick"])):f.createCommentVNode("v-if",!0),f.createCommentVNode(` <IkSvgIcon\r
|
|
35
35
|
name="icon-shezhi"\r
|
|
36
36
|
show-bg\r
|
|
37
37
|
:width="40"\r
|
|
@@ -146,7 +146,7 @@ Cannot use it for: `+Xc(H.element)+`
|
|
|
146
146
|
The conflicting element is`+(ts(ne.element)?" ":" not ")+"already in the DOM")},b=H=>{const j=d(H);Kr(s,j)&&g(H,j);const ne=[H];t.registerId(ne,j,H.events),s[j]=H},S=H=>{T0(H.element).each(j=>{delete s[j],t.unregisterId(j)})};return{find:(H,j,ne)=>t.find(H,j,ne),filter:H=>t.filterByType(H),register:b,unregister:S,getById:H=>Yt(s,H)}},Hm=Ic({name:"Container",factory:t=>{const{attributes:s,...d}=t.dom;return{uid:t.uid,dom:{tag:"div",attributes:{role:"presentation",...s},...d},components:t.components,behaviours:Z0(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Qe("components",[]),Ga("containerBehaviours",[]),Qe("events",{}),Qe("domModification",{}),Qe("eventOrder",{})]}),uD=t=>{const s=Ie=>Qi(t.element).fold(Vt,Je=>ws(Ie,Je)),d=HW(),g=(Ie,Je)=>d.find(s,Ie,Je),b=LW(t.element,{triggerEvent:(Ie,Je)=>Qd(Ie,Je.target,Ye=>FW(g,Ie,Je,Ye))}),S={debugInfo:ee("real"),triggerEvent:(Ie,Je,Ye)=>{Qd(Ie,Je,It=>a2(g,Ie,Ye,Je,It))},triggerFocus:(Ie,Je)=>{T0(Ie).fold(()=>{hu(Ie)},Ye=>{Qd(jd(),Ie,It=>(FB(g,jd(),{originator:Je,kill:X,prevent:X,target:Ie},Ie,It),!1))})},triggerEscape:(Ie,Je)=>{S.triggerEvent("keydown",Ie.element,Je.event)},getByUid:Ie=>ke(Ie),getByDom:Ie=>ot(Ie),build:Ml,buildOrPatch:Vy,addToGui:Ie=>{I(Ie)},removeFromGui:Ie=>{H(Ie)},addToWorld:Ie=>{k(Ie)},removeFromWorld:Ie=>{R(Ie)},broadcast:Ie=>{ae(Ie)},broadcastOn:(Ie,Je)=>{ue(Ie,Je)},broadcastEvent:(Ie,Je)=>{he(Ie,Je)},isConnected:Vt},k=Ie=>{Ie.connect(S),$o(Ie.element)||(d.register(Ie),ct(Ie.components(),k),S.triggerEvent(g0(),Ie.element,{target:Ie.element}))},R=Ie=>{$o(Ie.element)||(ct(Ie.components(),R),d.unregister(Ie)),Ie.disconnect()},I=Ie=>{$f(t,Ie)},H=Ie=>{Om(Ie)},j=()=>{b.unbind(),xc(t.element)},ne=Ie=>{const Je=d.filter(Fu());ct(Je,Ye=>{const It=Ye.descHandler;Ch(It)(Ie)})},ae=Ie=>{ne({universal:!0,data:Ie})},ue=(Ie,Je)=>{ne({universal:!1,channels:Ie,data:Je})},he=(Ie,Je)=>{const Ye=d.filter(Ie);return dx(Ye,Je)},ke=Ie=>d.getById(Ie).fold(()=>Ro.error(new Error('Could not find component with uid: "'+Ie+'" in system.')),Ro.value),ot=Ie=>{const Je=T0(Ie).getOr("not found");return ke(Je)};return k(t),{root:t,element:t.element,destroy:j,add:I,remove:H,getByUid:ke,getByDom:ot,addToWorld:k,removeFromWorld:R,broadcast:ae,broadcastOn:ue,broadcastEvent:he}},fx=(t,s)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:Ze(t.items,s.interpreter)}),zW=ee([Qe("prefix","form-field"),Ga("fieldBehaviours",[gs,xn])]),dD=ee([Cu({schema:[Rt("dom")],name:"label"}),Cu({factory:{sketch:t=>({uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}})},schema:[Rt("text")],name:"aria-descriptor"}),bl({factory:{sketch:t=>{const s=jo(t,["factory"]);return t.factory.sketch(s)}},schema:[Rt("factory")],name:"field"})]),UW=(t,s,d,g)=>{const b=Za(t.fieldBehaviours,[gs.config({find:R=>Xt(R,t,"field")}),xn.config({store:{mode:"manual",getValue:R=>gs.getCurrent(R).bind(xn.getValue),setValue:(R,I)=>{gs.getCurrent(R).each(H=>{xn.setValue(H,I)})}}})]),S=$r([Zr((R,I)=>{const H=VE(R,t,["label","field","aria-descriptor"]);H.field().each(j=>{const ne=kn(t.prefix);H.label().each(ae=>{tn(ae.element,"for",ne),tn(j.element,"id",ne)}),H["aria-descriptor"]().each(ae=>{const ue=kn(t.prefix);tn(ae.element,"id",ue),tn(j.element,"aria-describedby",ue)})})})]),k={getField:R=>Xt(R,t,"field"),getLabel:R=>Xt(R,t,"label")};return{uid:t.uid,dom:t.dom,components:s,behaviours:b,events:S,apis:k}},ar=ql({name:"FormField",configFields:zW(),partFields:dD(),factory:UW,apis:{getField:(t,s)=>t.getField(s),getLabel:(t,s)=>t.getLabel(s)}});var WW=tinymce.util.Tools.resolve("tinymce.html.Entities");const l2=(t,s,d,g)=>{const b=GW(t,s,d,g);return ar.sketch(b)},jW=(t,s)=>l2(t,s,[],[]),GW=(t,s,d,g)=>({dom:fD(d),components:t.toArray().concat([s]),fieldBehaviours:Qt(g)}),ZW=()=>fD([]),fD=t=>({tag:"div",classes:["tox-form__group"].concat(t)}),M1=(t,s)=>ar.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[xi(s.translate(t))]}),wu=kn("form-component-change"),Vw=kn("form-close"),P1=kn("form-cancel"),Zh=kn("form-action"),c2=kn("form-submit"),mx=kn("form-block"),mD=kn("form-unblock"),$B=kn("form-tabchange"),VB=kn("form-resize"),qW=(t,s,d)=>{const g=t.label.map(ue=>M1(ue,s)),b=s.icons(),S=ue=>{var he;return(he=b[ue])!==null&&he!==void 0?he:ue},k=ue=>(he,ke)=>{ef(ke.event.target,"[data-collection-item-value]").each(ot=>{ue(he,ke,ot,Ys(ot,"data-collection-item-value"))})},R=(ue,he)=>{const ke=Ze(he,Je=>{const Ye=kd.translate(Je.text),It=t.columns===1?`<div class="tox-collection__item-label">${Ye}</div>`:"",gt=`<div class="tox-collection__item-icon">${S(Je.icon)}</div>`,Jt={_:" "," - ":" ","-":" "},dn=Ye.replace(/\_| \- |\-/g,Hn=>Jt[Hn]),Ot=s.isDisabled()?" tox-collection__item--state-disabled":"";return`<div data-mce-tooltip="${dn}" class="tox-collection__item${Ot}" tabindex="-1" data-collection-item-value="${WW.encodeAllRaw(Je.value)}" aria-label="${dn}">${gt}${It}</div>`}),ot=t.columns!=="auto"&&t.columns>1?$t(ke,t.columns):[ke],Ie=Ze(ot,Je=>`<div class="tox-collection__group">${Je.join("")}</div>`);Qp(ue.element,Ie.join(""))},I=k((ue,he,ke,ot)=>{he.stop(),s.isDisabled()||oo(ue,Zh,{name:t.name,value:ot})}),H=[Nt(Df(),k((ue,he,ke)=>{hu(ke)})),Nt(wg(),I),Nt(Gd(),I),Nt(Ud(),k((ue,he,ke)=>{Qs(ue.element,"."+hv).each(ot=>{mi(ot,hv)}),Vr(ke,hv)})),Nt(Rf(),k(ue=>{Qs(ue.element,"."+hv).each(he=>{mi(he,hv),B0(he)})})),bd(k((ue,he,ke,ot)=>{oo(ue,Zh,{name:t.name,value:ot})}))],j=(ue,he)=>Ze(Ll(ue.element,".tox-collection__item"),he),ne=ar.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(t.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:xe},behaviours:Qt([ho.config({disabled:s.isDisabled,onDisabled:ue=>{j(ue,he=>{Vr(he,"tox-collection__item--state-disabled"),tn(he,"aria-disabled",!0)})},onEnabled:ue=>{j(ue,he=>{mi(he,"tox-collection__item--state-disabled"),Te(he,"aria-disabled")})}}),Da(),_o.config({}),Cl.config({...s.tooltips.getConfig({tooltipText:"",onShow:ue=>{Qs(ue.element,"."+hv+"[data-mce-tooltip]").each(he=>{se(he,"data-mce-tooltip").each(ke=>{Cl.setComponents(ue,s.tooltips.getComponents({tooltipText:ke}))})})}}),mode:"children-keyboard-focus",anchor:ue=>({type:"node",node:Qs(ue.element,"."+hv).orThunk(()=>Hy(".tox-collection__item")),root:ue.element,layouts:{onLtr:ee([aa,Ta,va,ya,ia,hr]),onRtl:ee([aa,Ta,va,ya,ia,hr])},bubble:_d(0,-2,{})})}),xn.config({store:{mode:"memory",initialValue:d.getOr([])},onSetValue:(ue,he)=>{R(ue,he),t.columns==="auto"&&Gk(ue,5,"tox-collection__item").each(({numRows:ke,numColumns:ot})=>{qn.setGridSize(ue,ke,ot)}),zo(ue,VB)}}),zr.config({}),qn.config(qU(t.columns,"normal")),Po("collection-events",H)]),eventOrder:{[$u()]:["disabling","alloy.base.behaviour","collection-events"],[Ud()]:["collection-events","tooltipping"]}});return l2(g,ne,["tox-form__group--collection"],[])},KW=["input","textarea"],hD=t=>{const s=Ls(t);return at(KW,s)},kv=(t,s)=>{const d=s.getRoot(t).getOr(t.element);mi(d,s.invalidClass),s.notify.each(g=>{hD(t.element)&&tn(t.element,"aria-invalid",!1),g.getContainer(t).each(b=>{Qp(b,g.validHtml)}),g.onValid(t)})},HB=(t,s,d,g)=>{const b=s.getRoot(t).getOr(t.element);Vr(b,s.invalidClass),s.notify.each(S=>{hD(t.element)&&tn(t.element,"aria-invalid",!0),S.getContainer(t).each(k=>{Qp(k,g)}),S.onInvalid(t,g)})},zB=(t,s,d)=>s.validator.fold(()=>Kl.pure(Ro.value(!0)),g=>g.validate(t)),gD=(t,s,d)=>(s.notify.each(g=>{g.onValidate(t)}),zB(t,s).map(g=>t.getSystem().isConnected()?g.fold(b=>(HB(t,s,d,b),Ro.error(b)),b=>(kv(t,s),Ro.value(b))):Ro.error("No longer in system")));var cf=Object.freeze({__proto__:null,markValid:kv,markInvalid:HB,query:zB,run:gD,isInvalid:(t,s)=>{const d=s.getRoot(t).getOr(t.element);return Kc(d,s.invalidClass)}}),WB=Object.freeze({__proto__:null,events:(t,s)=>t.validator.map(d=>$r([Nt(d.onEvent,g=>{gD(g,t,s).get(xe)})].concat(d.validateOnLoad?[Zr(g=>{gD(g,t,s).get(X)})]:[]))).getOr({})}),YW=[Rt("invalidClass"),Qe("getRoot",F.none),Cr("notify",[Qe("aria","alert"),Qe("getContainer",F.none),Qe("validHtml",""),hs("onValid"),hs("onInvalid"),hs("onValidate")]),Cr("validator",[Rt("validate"),Qe("onEvent","input"),Qe("validateOnLoad",!0)])];const qh=sl({fields:YW,name:"invalidating",active:WB,apis:cf,extra:{validation:t=>s=>{const d=xn.getValue(s);return Kl.pure(t(d))}}});var jB=Object.freeze({__proto__:null,events:()=>$r([r3(aC(),Vt)]),exhibit:()=>Zc({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})});const u2=sl({fields:[],name:"unselecting",active:jB}),XW=(t,s)=>lf.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:Qt([Yf.button(s.providers.isDisabled),Da(),u2.config({}),zr.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:s.getSink,fetch:d=>Kl.nu(g=>t.fetch(g)).map(g=>F.from(s2(Dr(tD(kn("menu-value"),g,b=>{t.onItemAction(d,b)},t.columns,t.presets,Gf.CLOSE_ON_EXECUTE,fn,s.providers),{movement:ix(t.columns,t.presets)})))),parts:{menu:Sw(!1,1,t.presets)}}),GB=kn("color-input-change"),vD=kn("color-swatch-change"),ZB=kn("color-picker-cancel"),qB=(t,s,d,g)=>{const b=ar.parts.field({factory:gv,inputClasses:["tox-textfield"],data:g,onSetValue:H=>qh.run(H).get(X),inputBehaviours:Qt([ho.config({disabled:s.providers.isDisabled}),Da(),zr.config({}),qh.config({invalidClass:"tox-textbox-field-invalid",getRoot:H=>Xa(H.element),notify:{onValid:H=>{const j=xn.getValue(H);oo(H,GB,{color:j})}},validator:{validateOnLoad:!1,validate:H=>{const j=xn.getValue(H);if(j.length===0)return Kl.pure(Ro.value(!0));{const ne=He.fromTag("span");Rn(ne,"background-color",j);const ae=vr(ne,"background-color").fold(()=>Ro.error("blah"),ue=>Ro.value(j));return Kl.pure(ae)}}}})]),selectOnFocus:!1}),S=t.label.map(H=>M1(H,s.providers)),k=(H,j)=>{oo(H,vD,{value:j})},R=(H,j)=>{I.getOpt(H).each(ne=>{j==="custom"?d.colorPicker(ae=>{ae.fold(()=>zo(ne,ZB),ue=>{k(ne,ue),ox(t.storageKey,ue)})},"#ffffff"):j==="remove"?k(ne,""):k(ne,j)})},I=er(XW({dom:{tag:"span",attributes:{"aria-label":s.providers.translate("Color swatch")}},layouts:{onRtl:()=>[ia,va,aa],onLtr:()=>[va,ia,aa]},components:[],fetch:mB(d.getColors(t.storageKey),t.storageKey,d.hasCustomColors()),columns:d.getColorCols(t.storageKey),presets:"color",onItemAction:R},s));return ar.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:S.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[b,I.asSpec()]}]),fieldBehaviours:Qt([Po("form-field-events",[Nt(GB,(H,j)=>{I.getOpt(H).each(ne=>{Rn(ne.element,"background-color",j.event.color)}),oo(H,wu,{name:t.name})}),Nt(vD,(H,j)=>{ar.getField(H).each(ne=>{xn.setValue(ne,j.event.value),gs.getCurrent(H).each(vo.focus)})}),Nt(ZB,(H,j)=>{ar.getField(H).each(ne=>{gs.getCurrent(H).each(vo.focus)})})])])})},KB=Cu({schema:[Rt("dom")],name:"label"}),up=t=>Cu({name:""+t+"-edge",overrides:s=>s.model.manager.edgeActions[t].fold(()=>({}),g=>({events:$r([xg(os(),(b,S,k)=>g(b,k),[s]),xg(ic(),(b,S,k)=>g(b,k),[s]),xg(Vp(),(b,S,k)=>{k.mouseIsDown.get()&&g(b,k)},[s])])}))}),QW=up("top-left"),JW=up("top"),ej=up("top-right"),tj=up("right"),nj=up("bottom-right"),oj=up("bottom"),yD=up("bottom-left"),sj=up("left"),rj=bl({name:"thumb",defaults:ee({dom:{styles:{position:"absolute"}}}),overrides:t=>({events:$r([Ag(os(),t,"spectrum"),Ag(Gr(),t,"spectrum"),Ag(ra(),t,"spectrum"),Ag(ic(),t,"spectrum"),Ag(Vp(),t,"spectrum"),Ag(Cm(),t,"spectrum")])})}),Hw=t=>Wf(t.event),ij=bl({schema:[Ns("mouseIsDown",()=>Zn(!1))],name:"spectrum",overrides:t=>{const d=t.model.manager,g=(b,S)=>d.getValueFromEvent(S).map(k=>d.setValueFrom(b,t,k));return{behaviours:Qt([qn.config({mode:"special",onLeft:(b,S)=>d.onLeft(b,t,Hw(S)),onRight:(b,S)=>d.onRight(b,t,Hw(S)),onUp:(b,S)=>d.onUp(b,t,Hw(S)),onDown:(b,S)=>d.onDown(b,t,Hw(S))}),zr.config({}),vo.config({})]),events:$r([Nt(os(),g),Nt(Gr(),g),Nt(ic(),g),Nt(Vp(),(b,S)=>{t.mouseIsDown.get()&&g(b,S)})])}}});var aj=[KB,sj,tj,JW,oj,QW,ej,yD,nj,rj,ij];const zw=ee("slider.change.value"),lj=t=>t.type.indexOf("touch")!==-1,bD=t=>{const s=t.event.raw;if(lj(s)){const d=s;return d.touches!==void 0&&d.touches.length===1?F.some(d.touches[0]).map(g=>Lr(g.clientX,g.clientY)):F.none()}else{const d=s;return d.clientX!==void 0?F.some(d).map(g=>Lr(g.clientX,g.clientY)):F.none()}},YB="top",cj="right",XB="bottom",QB="left",xv=t=>t.model.minX,Av=t=>t.model.minY,hx=t=>t.model.minX-1,gx=t=>t.model.minY-1,Tv=t=>t.model.maxX,Dv=t=>t.model.maxY,Uw=t=>t.model.maxX+1,Rv=t=>t.model.maxY+1,CD=(t,s,d)=>s(t)-d(t),Ww=t=>CD(t,Tv,xv),_D=t=>CD(t,Dv,Av),wD=t=>Ww(t)/2,JB=t=>_D(t)/2,d2=(t,s)=>s?t.stepSize*t.speedMultiplier:t.stepSize,eM=t=>t.snapToGrid,tM=t=>t.snapStart,px=t=>t.rounded,Xf=(t,s)=>t[s+"-edge"]!==void 0,nM=t=>Xf(t,QB),f2=t=>Xf(t,cj),oM=t=>Xf(t,YB),vx=t=>Xf(t,XB),dp=t=>t.model.value.get(),L1=(t,s)=>({x:t,y:s}),Qf=(t,s)=>{oo(t,zw(),{value:s})},sM=(t,s)=>{Qf(t,L1(hx(s),gx(s)))},uj=(t,s)=>{Qf(t,gx(s))},SD=(t,s)=>{Qf(t,L1(wD(s),gx(s)))},ED=(t,s)=>{Qf(t,L1(Uw(s),gx(s)))},kD=(t,s)=>{Qf(t,Uw(s))},dj=(t,s)=>{Qf(t,L1(Uw(s),JB(s)))},xd=(t,s)=>{Qf(t,L1(Uw(s),Rv(s)))},fj=(t,s)=>{Qf(t,Rv(s))},mj=(t,s)=>{Qf(t,L1(wD(s),Rv(s)))},rM=(t,s)=>{Qf(t,L1(hx(s),Rv(s)))},iM=(t,s)=>{Qf(t,hx(s))},hj=(t,s)=>{Qf(t,L1(hx(s),JB(s)))},xD=(t,s,d,g)=>t<s?t:t>d?d:t===s?s-1:Math.max(s,t-g),AD=(t,s,d,g)=>t>d?t:t<s?s:t===d?d+1:Math.min(d,t+g),aM=(t,s,d)=>Math.max(s,Math.min(d,t)),gj=(t,s,d,g,b)=>b.fold(()=>{const S=t-s,k=Math.round(S/g)*g;return aM(s+k,s-1,d+1)},S=>{const k=(t-S)%g,R=Math.round(k/g),I=Math.floor((t-S)/g),H=Math.floor((d-S)/g),j=Math.min(H,I+R),ne=S+j*g;return Math.max(S,ne)}),pj=(t,s,d)=>Math.min(d,Math.max(t,s))-s,lM=t=>{const{min:s,max:d,range:g,value:b,step:S,snap:k,snapStart:R,rounded:I,hasMinEdge:H,hasMaxEdge:j,minBound:ne,maxBound:ae,screenRange:ue}=t,he=H?s-1:s,ke=j?d+1:d;if(b<ne)return he;if(b>ae)return ke;{const ot=pj(b,ne,ae),Ie=aM(ot/ue*g+s,he,ke);return k&&Ie>=s&&Ie<=d?gj(Ie,s,d,S,R):I?Math.round(Ie):Ie}},TD=t=>{const{min:s,max:d,range:g,value:b,hasMinEdge:S,hasMaxEdge:k,maxBound:R,maxOffset:I,centerMinEdge:H,centerMaxEdge:j}=t;return b<s?S?0:H:b>d?k?R:j:(b-s)/g*I},DD="top",cM="right",uM="bottom",yx="left",RD="width",dM="height",zm=t=>t.element.dom.getBoundingClientRect(),uf=(t,s)=>t[s],jw=t=>{const s=zm(t);return uf(s,yx)},bx=t=>{const s=zm(t);return uf(s,cM)},Cx=t=>{const s=zm(t);return uf(s,DD)},_x=t=>{const s=zm(t);return uf(s,uM)},Ov=t=>{const s=zm(t);return uf(s,RD)},OD=t=>{const s=zm(t);return uf(s,dM)},ND=(t,s,d)=>(t+s)/2-d,ID=(t,s)=>{const d=zm(t),g=zm(s),b=uf(d,yx),S=uf(d,cM),k=uf(g,yx);return ND(b,S,k)},fM=(t,s)=>{const d=zm(t),g=zm(s),b=uf(d,DD),S=uf(d,uM),k=uf(g,DD);return ND(b,S,k)},wx=(t,s)=>{oo(t,zw(),{value:s})},m2=(t,s,d)=>{const g={min:xv(s),max:Tv(s),range:Ww(s),value:d,step:d2(s),snap:eM(s),snapStart:tM(s),rounded:px(s),hasMinEdge:nM(s),hasMaxEdge:f2(s),minBound:jw(t),maxBound:bx(t),screenRange:Ov(t)};return lM(g)},vj=(t,s,d)=>{const g=m2(t,s,d);return wx(t,g),g},yj=(t,s)=>{const d=xv(s);wx(t,d)},mM=(t,s)=>{const d=Tv(s);wx(t,d)},hM=(t,s,d,g)=>{const S=(t>0?AD:xD)(dp(d),xv(d),Tv(d),d2(d,g));return wx(s,S),F.some(S)},Sx=t=>(s,d,g)=>hM(t,s,d,g).map(Vt),gM=t=>bD(t).map(d=>d.left),su=(t,s,d,g,b)=>{const k=Ov(t),R=g.bind(j=>F.some(ID(j,t))).getOr(0),I=b.bind(j=>F.some(ID(j,t))).getOr(k),H={min:xv(s),max:Tv(s),range:Ww(s),value:d,hasMinEdge:nM(s),hasMaxEdge:f2(s),minBound:jw(t),minOffset:0,maxBound:bx(t),maxOffset:k,centerMinEdge:R,centerMaxEdge:I};return TD(H)},Ex=(t,s,d,g,b,S)=>{const k=su(s,S,d,g,b);return jw(s)-jw(t)+k},bj=(t,s,d,g)=>{const b=dp(d),S=Ex(t,g.getSpectrum(t),b,g.getLeftEdge(t),g.getRightEdge(t),d),k=Fa(s.element)/2;Rn(s.element,"left",S-k+"px")},Cj=Sx(-1),pM=Sx(1),_j=F.none,wj=F.none,Sj={"top-left":F.none(),top:F.none(),"top-right":F.none(),right:F.some(kD),"bottom-right":F.none(),bottom:F.none(),"bottom-left":F.none(),left:F.some(iM)};var vM=Object.freeze({__proto__:null,setValueFrom:vj,setToMin:yj,setToMax:mM,findValueOfOffset:m2,getValueFromEvent:gM,findPositionOfValue:Ex,setPositionFromValue:bj,onLeft:Cj,onRight:pM,onUp:_j,onDown:wj,edgeActions:Sj});const df=(t,s)=>{oo(t,zw(),{value:s})},Gw=(t,s,d)=>{const g={min:Av(s),max:Dv(s),range:_D(s),value:d,step:d2(s),snap:eM(s),snapStart:tM(s),rounded:px(s),hasMinEdge:oM(s),hasMaxEdge:vx(s),minBound:Cx(t),maxBound:_x(t),screenRange:OD(t)};return lM(g)},yM=(t,s,d)=>{const g=Gw(t,s,d);return df(t,g),g},kx=(t,s)=>{const d=Av(s);df(t,d)},BD=(t,s)=>{const d=Dv(s);df(t,d)},Ej=(t,s,d,g)=>{const S=(t>0?AD:xD)(dp(d),Av(d),Dv(d),d2(d,g));return df(s,S),F.some(S)},bM=t=>(s,d,g)=>Ej(t,s,d,g).map(Vt),kj=t=>bD(t).map(d=>d.top),xj=(t,s,d,g,b)=>{const k=OD(t),R=g.bind(j=>F.some(fM(j,t))).getOr(0),I=b.bind(j=>F.some(fM(j,t))).getOr(k),H={min:Av(s),max:Dv(s),range:_D(s),value:d,hasMinEdge:oM(s),hasMaxEdge:vx(s),minBound:Cx(t),minOffset:0,maxBound:_x(t),maxOffset:k,centerMinEdge:R,centerMaxEdge:I};return TD(H)},MD=(t,s,d,g,b,S)=>{const k=xj(s,S,d,g,b);return Cx(s)-Cx(t)+k},Aj=(t,s,d,g)=>{const b=dp(d),S=MD(t,g.getSpectrum(t),b,g.getTopEdge(t),g.getBottomEdge(t),d),k=Nr(s.element)/2;Rn(s.element,"top",S-k+"px")},Tj=F.none,CM=F.none,Dj=bM(-1),Kh=bM(1),xx={"top-left":F.none(),top:F.some(uj),"top-right":F.none(),right:F.none(),"bottom-right":F.none(),bottom:F.some(fj),"bottom-left":F.none(),left:F.none()};var Rj=Object.freeze({__proto__:null,setValueFrom:yM,setToMin:kx,setToMax:BD,findValueOfOffset:Gw,getValueFromEvent:kj,findPositionOfValue:MD,setPositionFromValue:Aj,onLeft:Tj,onRight:CM,onUp:Dj,onDown:Kh,edgeActions:xx});const Ax=(t,s)=>{oo(t,zw(),{value:s})},Zw=(t,s)=>({x:t,y:s}),_M=(t,s,d)=>{const g=m2(t,s,d.left),b=Gw(t,s,d.top),S=Zw(g,b);return Ax(t,S),S},PD=(t,s,d,g,b)=>{const S=t>0?AD:xD,k=s?dp(g).x:S(dp(g).x,xv(g),Tv(g),d2(g,b)),R=s?S(dp(g).y,Av(g),Dv(g),d2(g,b)):dp(g).y;return Ax(d,Zw(k,R)),F.some(k)},Nv=(t,s)=>(d,g,b)=>PD(t,s,d,g,b).map(Vt),qw=(t,s)=>{const d=xv(s),g=Av(s);Ax(t,Zw(d,g))},Kw=(t,s)=>{const d=Tv(s),g=Dv(s);Ax(t,Zw(d,g))},wM=t=>bD(t),SM=(t,s,d,g)=>{const b=dp(d),S=Ex(t,g.getSpectrum(t),b.x,g.getLeftEdge(t),g.getRightEdge(t),d),k=MD(t,g.getSpectrum(t),b.y,g.getTopEdge(t),g.getBottomEdge(t),d),R=Fa(s.element)/2,I=Nr(s.element)/2;Rn(s.element,"left",S-R+"px"),Rn(s.element,"top",k-I+"px")},EM=Nv(-1,!1),kM=Nv(1,!1),Oj=Nv(-1,!0),Nj=Nv(1,!0),Ij={"top-left":F.some(sM),top:F.some(SD),"top-right":F.some(ED),right:F.some(dj),"bottom-right":F.some(xd),bottom:F.some(mj),"bottom-left":F.some(rM),left:F.some(hj)};var Bj=Object.freeze({__proto__:null,setValueFrom:_M,setToMin:qw,setToMax:Kw,getValueFromEvent:wM,setPositionFromValue:SM,onLeft:EM,onRight:kM,onUp:Oj,onDown:Nj,edgeActions:Ij});const Mj=[Qe("stepSize",1),Qe("speedMultiplier",10),Qe("onChange",X),Qe("onChoose",X),Qe("onInit",X),Qe("onDragStart",X),Qe("onDragEnd",X),Qe("snapToGrid",!1),Qe("rounded",!0),Ds("snapStart"),Ts("model",ga("mode",{x:[Qe("minX",0),Qe("maxX",100),Ns("value",t=>Zn(t.mode.minX)),Rt("getInitialValue"),Hr("manager",vM)],y:[Qe("minY",0),Qe("maxY",100),Ns("value",t=>Zn(t.mode.minY)),Rt("getInitialValue"),Hr("manager",Rj)],xy:[Qe("minX",0),Qe("maxX",100),Qe("minY",0),Qe("maxY",100),Ns("value",t=>Zn({x:t.mode.minX,y:t.mode.minY})),Rt("getInitialValue"),Hr("manager",Bj)]})),Ga("sliderBehaviours",[qn,xn]),Ns("mouseIsDown",()=>Zn(!1))],ff=ql({name:"Slider",configFields:Mj,partFields:aj,factory:(t,s,d,g)=>{const b=gt=>hc(gt,t,"thumb"),S=gt=>hc(gt,t,"spectrum"),k=gt=>Xt(gt,t,"left-edge"),R=gt=>Xt(gt,t,"right-edge"),I=gt=>Xt(gt,t,"top-edge"),H=gt=>Xt(gt,t,"bottom-edge"),j=t.model,ne=j.manager,ae=(gt,Jt)=>{ne.setPositionFromValue(gt,Jt,t,{getLeftEdge:k,getRightEdge:R,getTopEdge:I,getBottomEdge:H,getSpectrum:S})},ue=(gt,Jt)=>{j.value.set(Jt);const dn=b(gt);ae(gt,dn)},he=(gt,Jt)=>{ue(gt,Jt);const dn=b(gt);return t.onChange(gt,dn,Jt),F.some(!0)},ke=gt=>{ne.setToMin(gt,t)},ot=gt=>{ne.setToMax(gt,t)},Ie=gt=>{const Jt=()=>{Xt(gt,t,"thumb").each(Ot=>{const Hn=j.value.get();t.onChoose(gt,Ot,Hn)})},dn=t.mouseIsDown.get();t.mouseIsDown.set(!1),dn&&Jt()},Je=(gt,Jt)=>{Jt.stop(),t.mouseIsDown.set(!0),t.onDragStart(gt,b(gt))},Ye=(gt,Jt)=>{Jt.stop(),t.onDragEnd(gt,b(gt)),Ie(gt)},It=gt=>{Xt(gt,t,"spectrum").map(qn.focusIn)};return{uid:t.uid,dom:t.dom,components:s,behaviours:Za(t.sliderBehaviours,[qn.config({mode:"special",focusIn:It}),xn.config({store:{mode:"manual",getValue:gt=>j.value.get(),setValue:ue}}),Nc.config({channels:{[W0()]:{onReceive:Ie}}})]),events:$r([Nt(zw(),(gt,Jt)=>{he(gt,Jt.event.value)}),Zr((gt,Jt)=>{const dn=j.getInitialValue();j.value.set(dn);const Ot=b(gt);ae(gt,Ot);const Hn=S(gt);t.onInit(gt,Ot,Hn,j.value.get())}),Nt(os(),Je),Nt(ra(),Ye),Nt(ic(),(gt,Jt)=>{It(gt),Je(gt,Jt)}),Nt(Cm(),Ye)]),apis:{resetToMin:ke,resetToMax:ot,setValue:ue,refresh:ae},domModification:{styles:{position:"relative"}}}},apis:{setValue:(t,s,d)=>{t.setValue(s,d)},resetToMin:(t,s)=>{t.resetToMin(s)},resetToMax:(t,s)=>{t.resetToMax(s)},refresh:(t,s)=>{t.refresh(s)}}}),LD=kn("rgb-hex-update"),FD=kn("slider-update"),xM=kn("palette-update"),AM=(t,s)=>{const d=ff.parts.spectrum({dom:{tag:"div",classes:[s("hue-slider-spectrum")],attributes:{role:"presentation"}}}),g=ff.parts.thumb({dom:{tag:"div",classes:[s("hue-slider-thumb")],attributes:{role:"presentation"}}});return ff.sketch({dom:{tag:"div",classes:[s("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:ee(0)},components:[d,g],sliderBehaviours:Qt([vo.config({})]),onChange:(b,S,k)=>{tn(b.element,"aria-valuenow",Math.floor(360-k*3.6)),oo(b,FD,{value:k})}})},h2="form",Lj=[Ga("formBehaviours",[xn])],$D=t=>"<alloy.field."+t+">",Fj=t=>{const s=(()=>{const S=[];return{field:(R,I)=>(S.push(R),$E(h2,$D(R),I)),record:ee(S)}})(),d=t(s),g=s.record(),b=Ze(g,S=>bl({name:S,pname:$D(S)}));return Bm(h2,Lj,b,Vj,d)},$j=(t,s)=>t.fold(()=>Ro.error(s),Ro.value),Vj=(t,s)=>({uid:t.uid,dom:t.dom,components:s,behaviours:Za(t.formBehaviours,[xn.config({store:{mode:"manual",getValue:d=>{const g=G_(d,t);return Cs(g,(b,S)=>b().bind(k=>{const R=gs.getCurrent(k);return $j(R,new Error(`Cannot find a current component to extract the value from for form part '${S}': `+Xc(k.element)))}).map(xn.getValue))},setValue:(d,g)=>{ks(g,(b,S)=>{Xt(d,t,S).each(k=>{gs.getCurrent(k).each(R=>{xn.setValue(R,b)})})})}}})]),apis:{getField:(d,g)=>Xt(d,t,g).bind(gs.getCurrent)}}),g2={getField:n1((t,s,d)=>t.getField(s,d)),sketch:Fj},VD=kn("valid-input"),TM=kn("invalid-input"),HD=kn("validating-input"),Yw="colorcustom.rgb.",fp=(t,s,d,g)=>{const b=(ae,ue)=>qh.config({invalidClass:s("invalid"),notify:{onValidate:he=>{oo(he,HD,{type:ae})},onValid:he=>{oo(he,VD,{type:ae,value:xn.getValue(he)})},onInvalid:he=>{oo(he,TM,{type:ae,value:xn.getValue(he)})}},validator:{validate:he=>{const ke=xn.getValue(he),ot=ue(ke)?Ro.value(!0):Ro.error(t("aria.input.invalid"));return Kl.pure(ot)},validateOnLoad:!1}}),S=(ae,ue,he,ke,ot)=>{const Ie=t(Yw+"range"),Je=ar.parts.label({dom:{tag:"label",attributes:{"aria-label":ke}},components:[xi(he)]}),Ye=ar.parts.field({data:ot,factory:gv,inputAttributes:{type:"text",...ue==="hex"?{"aria-live":"polite"}:{}},inputClasses:[s("textfield")],inputBehaviours:Qt([b(ue,ae),zr.config({})]),onSetValue:dn=>{qh.isInvalid(dn)&&qh.run(dn).get(X)}}),It=[Je,Ye],gt=ue!=="hex"?[ar.parts["aria-descriptor"]({text:Ie})]:[],Jt=It.concat(gt);return{dom:{tag:"div",attributes:{role:"presentation"}},components:Jt}},k=(ae,ue)=>{const he=Iw(ue);return g2.getField(ae,"hex").each(ke=>{vo.isFocused(ke)||xn.setValue(ae,{hex:he.value})}),he},R=(ae,ue)=>{const he=ue.red,ke=ue.green,ot=ue.blue;xn.setValue(ae,{red:he,green:ke,blue:ot})},I=er({dom:{tag:"div",classes:[s("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),H=(ae,ue)=>{I.getOpt(ae).each(he=>{Rn(he.element,"background-color","#"+ue.value)})};return Ic({factory:()=>{const ae={red:Zn(F.some(255)),green:Zn(F.some(255)),blue:Zn(F.some(255)),hex:Zn(F.some("ffffff"))},ue=(to,Bs)=>{const Ss=Bw(Bs);R(to,Ss),Ie(Ss)},he=to=>ae[to].get(),ke=(to,Bs)=>{ae[to].set(Bs)},ot=()=>he("red").bind(to=>he("green").bind(Bs=>he("blue").map(Ss=>_v(to,Bs,Ss,1)))),Ie=to=>{const Bs=to.red,Ss=to.green,es=to.blue;ke("red",F.some(Bs)),ke("green",F.some(Ss)),ke("blue",F.some(es))},Je=(to,Bs)=>{const Ss=Bs.event;Ss.type!=="hex"?ke(Ss.type,F.none()):g(to)},Ye=(to,Bs)=>{d(to);const Ss=G5(Bs);ke("hex",F.some(Ss.value));const es=Bw(Ss);R(to,es),Ie(es),oo(to,LD,{hex:Ss}),H(to,Ss)},It=(to,Bs,Ss)=>{const es=parseInt(Ss,10);ke(Bs,F.some(es)),ot().each(rn=>{const Mn=k(to,rn);oo(to,LD,{hex:Mn}),H(to,Mn)})},gt=to=>to.type==="hex",Jt=(to,Bs)=>{const Ss=Bs.event;gt(Ss)?Ye(to,Ss.value):It(to,Ss.type,Ss.value)},dn=to=>({label:t(Yw+to+".label"),description:t(Yw+to+".description")}),Ot=dn("red"),Hn=dn("green"),Tn=dn("blue"),lo=dn("hex");return Dr(g2.sketch(to=>({dom:{tag:"form",classes:[s("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[to.field("red",ar.sketch(S(q5,"red",Ot.label,Ot.description,255))),to.field("green",ar.sketch(S(q5,"green",Hn.label,Hn.description,255))),to.field("blue",ar.sketch(S(q5,"blue",Tn.label,Tn.description,255))),to.field("hex",ar.sketch(S(zI,"hex",lo.label,lo.description,"ffffff"))),I.asSpec()],formBehaviours:Qt([qh.config({invalidClass:s("form-invalid")}),Po("rgb-form-events",[Nt(VD,Jt),Nt(TM,Je),Nt(HD,Je)])])})),{apis:{updateHex:(to,Bs)=>{xn.setValue(to,{hex:Bs.value}),ue(to,Bs),H(to,Bs)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(ae,ue,he)=>{ae.updateHex(ue,he)}},extraApis:{}})},zD=(t,s)=>{const d=ff.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[s("sv-palette-spectrum")]}}),g=ff.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[s("sv-palette-thumb")],innerHtml:`<div class=${s("sv-palette-inner-thumb")} role="presentation"></div>`}}),b=(H,j)=>{const{width:ne,height:ae}=H,ue=H.getContext("2d");if(ue===null)return;ue.fillStyle=j,ue.fillRect(0,0,ne,ae);const he=ue.createLinearGradient(0,0,ne,0);he.addColorStop(0,"rgba(255,255,255,1)"),he.addColorStop(1,"rgba(255,255,255,0)"),ue.fillStyle=he,ue.fillRect(0,0,ne,ae);const ke=ue.createLinearGradient(0,0,0,ae);ke.addColorStop(0,"rgba(0,0,0,0)"),ke.addColorStop(1,"rgba(0,0,0,1)"),ue.fillStyle=ke,ue.fillRect(0,0,ne,ae)},S=(H,j)=>{const ne=H.components()[0].element.dom,ae=Ev(j,100,100),ue=qI(ae);b(ne,YI(ue))},k=(H,j)=>{const ne=sx(Bw(j));ff.setValue(H,{x:ne.saturation,y:100-ne.value}),tn(H.element,"aria-valuetext",t(["Saturation {0}%, Brightness {1}%",ne.saturation,ne.value]))};return Ic({factory:H=>{const j=ee({x:0,y:0}),ne=(he,ke,ot)=>{ce(ot)||tn(he.element,"aria-valuetext",t(["Saturation {0}%, Brightness {1}%",Math.floor(ot.x),Math.floor(100-ot.y)])),oo(he,xM,{value:ot})},ae=(he,ke,ot,Ie)=>{b(ot.element.dom,YI(XI))},ue=Qt([gs.config({find:F.some}),vo.config({})]);return ff.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":t(["Saturation {0}%, Brightness {1}%",0,0])},classes:[s("sv-palette")]},model:{mode:"xy",getInitialValue:j},rounded:!1,components:[d,g],onChange:ne,onInit:ae,sliderBehaviours:ue})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(H,j,ne)=>{S(j,ne)},setThumb:(H,j,ne)=>{k(j,ne)}},extraApis:{}})},DM=(t,s)=>{const d=b=>{const S=fp(t,s,b.onValidHex,b.onInvalidHex),k=zD(t,s),R=Jt=>(100-Jt)/100*360,I=Jt=>100-Jt/360*100,H={paletteRgba:Zn(XI),paletteHue:Zn(0)},j=er(AM(t,s)),ne=er(k.sketch({})),ae=er(S.sketch({})),ue=(Jt,dn,Ot)=>{ne.getOpt(Jt).each(Hn=>{k.setHue(Hn,Ot)})},he=(Jt,dn)=>{ae.getOpt(Jt).each(Ot=>{S.updateHex(Ot,dn)})},ke=(Jt,dn,Ot)=>{j.getOpt(Jt).each(Hn=>{ff.setValue(Hn,I(Ot))})},ot=(Jt,dn)=>{ne.getOpt(Jt).each(Ot=>{k.setThumb(Ot,dn)})},Ie=(Jt,dn)=>{const Ot=Bw(Jt);H.paletteRgba.set(Ot),H.paletteHue.set(dn)},Je=(Jt,dn,Ot,Hn)=>{Ie(dn,Ot),ct(Hn,Tn=>{Tn(Jt,dn,Ot)})},Ye=()=>{const Jt=[he];return(dn,Ot)=>{const Hn=Ot.event.value,Tn=H.paletteHue.get(),lo=Ev(Tn,Hn.x,100-Hn.y),to=rB(lo);Je(dn,to,Tn,Jt)}},It=()=>{const Jt=[ue,he];return(dn,Ot)=>{const Hn=R(Ot.event.value),Tn=H.paletteRgba.get(),lo=sx(Tn),to=Ev(Hn,lo.saturation,lo.value),Bs=rB(to);Je(dn,Bs,Hn,Jt)}},gt=()=>{const Jt=[ue,ke,ot];return(dn,Ot)=>{const Hn=Ot.event.hex,Tn=LU(Hn);Je(dn,Hn,Tn.hue,Jt)}};return{uid:b.uid,dom:b.dom,components:[ne.asSpec(),j.asSpec(),ae.asSpec()],behaviours:Qt([Po("colour-picker-events",[Nt(LD,gt()),Nt(xM,Ye()),Nt(FD,It())]),gs.config({find:Jt=>ae.getOpt(Jt)}),qn.config({mode:"acyclic"})])}};return Ic({name:"ColourPicker",configFields:[Rt("dom"),Qe("onValidHex",X),Qe("onInvalidHex",X)],factory:d})},Qu={self:()=>gs.config({find:F.some}),memento:t=>gs.config({find:t.getOpt}),childAt:t=>gs.config({find:s=>Qa(s.element,t).bind(d=>s.getSystem().getByDom(d).toOptional())})},OM=co([Qe("preprocess",xe),Qe("postprocess",xe)]),NM=(t,s)=>{const d=Nl("RepresentingConfigs.memento processors",OM,s);return xn.config({store:{mode:"manual",getValue:g=>{const b=t.get(g),S=xn.getValue(b);return d.postprocess(S)},setValue:(g,b)=>{const S=d.preprocess(b),k=t.get(g);xn.setValue(k,S)}}})},Iv=(t,s,d)=>xn.config({store:{mode:"manual",...t.map(g=>({initialValue:g})).getOr({}),getValue:s,setValue:d}}),IM=(t,s,d)=>Iv(t,g=>s(g.element),(g,b)=>d(g.element,b)),Uj=t=>IM(t,Oc,Qp),Tx=t=>xn.config({store:{mode:"memory",initialValue:t}}),Wj={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},BM=t=>s=>C(s)?t.translate(Wj[s]):t.translate(s),MM=(t,s,d)=>{const g=I=>"tox-"+I,b=DM(BM(s),g),S=I=>{oo(I,Zh,{name:"hex-valid",value:!0})},k=I=>{oo(I,Zh,{name:"hex-valid",value:!1})},R=er(b.sketch({dom:{tag:"div",classes:[g("color-picker-container")],attributes:{role:"presentation"}},onValidHex:S,onInvalidHex:k}));return{dom:{tag:"div"},components:[R.asSpec()],behaviours:Qt([Iv(d,I=>{const H=R.get(I);return gs.getCurrent(H).bind(ae=>xn.getValue(ae).hex).map(ae=>"#"+xl(ae,"#")).getOr("")},(I,H)=>{const j=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,ne=F.from(j.exec(H)).bind(he=>Bo(he,1)),ae=R.get(I);gs.getCurrent(ae).fold(()=>{console.log("Can not find form")},he=>{xn.setValue(he,{hex:ne.getOr("")}),g2.getField(he,"hex").each(ke=>{zo(ke,Of())})})}),Qu.self()])}};var jj=tinymce.util.Tools.resolve("tinymce.Resource");const PM=t=>Qo(t,"init"),Gj=t=>{const s=sr(),d=er({dom:{tag:t.tag}}),g=sr(),b=!PM(t)&&t.onFocus.isSome()?[vo.config({onFocus:S=>{t.onFocus.each(k=>{k(S.element.dom)})}}),zr.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Qt([Po("custom-editor-events",[Zr(S=>{d.getOpt(S).each(k=>{(PM(t)?t.init(k.element.dom):jj.load(t.scriptId,t.scriptUrl).then(R=>R(k.element.dom,t.settings))).then(R=>{g.on(I=>{R.setValue(I)}),g.clear(),s.set(R)})})})]),Iv(F.none(),()=>s.get().fold(()=>g.get().getOr(""),S=>S.getValue()),(S,k)=>{s.get().fold(()=>g.set(k),R=>R.setValue(k))}),Qu.self()].concat(b)),components:[d.asSpec()]}};var Jf=tinymce.util.Tools.resolve("tinymce.util.Tools");const Zj=(t,s)=>{const d=Jf.explode(s.getOption("images_file_types")),g=b=>Sn(d,S=>Vi(b.name.toLowerCase(),`.${S.toLowerCase()}`));return Nn(is(t),g)},qj=(t,s,d)=>{const g=(ae,ue)=>{ue.stop()},b=ae=>(ue,he)=>{ct(ae,ke=>{ke(ue,he)})},S=(ae,ue)=>{var he;if(!ho.isDisabled(ae)){const ke=ue.event.raw;R(ae,(he=ke.dataTransfer)===null||he===void 0?void 0:he.files)}},k=(ae,ue)=>{const he=ue.event.raw.target;R(ae,he.files)},R=(ae,ue)=>{ue&&(xn.setValue(ae,Zj(ue,s)),oo(ae,wu,{name:t.name}))},I=er({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Qt([Po("input-file-events",[qd(wg()),qd(Gd())])])}),H=ae=>({uid:ae.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Qt([Tx(d.getOr([])),Qu.self(),ho.config({}),Go.config({toggleClass:"dragenter",toggleOnExecute:!1}),Po("dropzone-events",[Nt("dragenter",b([g,Go.toggle])),Nt("dragleave",b([g,Go.toggle])),Nt("dragover",g),Nt("drop",b([g,S])),Nt(Hp(),k)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[xi(s.translate("Drop an image here"))]},Fl.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[xi(s.translate("Browse for an image")),I.asSpec()],action:ue=>{I.get(ue).element.dom.click()},buttonBehaviours:Qt([zr.config({}),Yf.button(s.isDisabled),Da()])})]}]}),j=t.label.map(ae=>M1(ae,s)),ne=ar.parts.field({factory:{sketch:H}});return l2(j,ne,["tox-form__group--stretched"],[])},LM=(t,s)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${t.columns}col`]},components:Ze(t.items,s.interpreter)}),FM=(t,s)=>{let d=null,g=null;return{cancel:()=>{V(d)||(clearTimeout(d),d=null,g=null)},throttle:(...k)=>{g=k,V(d)&&(d=setTimeout(()=>{const R=g;d=null,g=null,t.apply(null,R)},s))}}},Kj=(t,s)=>{let d=null;return{cancel:()=>{V(d)||(clearTimeout(d),d=null)},throttle:(...S)=>{V(d)&&(d=setTimeout(()=>{d=null,t.apply(null,S)},s))}}},UD=(t,s)=>{let d=null;const g=()=>{V(d)||(clearTimeout(d),d=null)};return{cancel:g,throttle:(...S)=>{g(),d=setTimeout(()=>{d=null,t.apply(null,S)},s)}}},Xw=kn("alloy-fake-before-tabstop"),WD=kn("alloy-fake-after-tabstop"),jD=t=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:Qt([vo.config({ignore:!0}),zr.config({})])}),$M=(t,s)=>({dom:{tag:"div",classes:["tox-navobj",...t.getOr([])]},components:[jD([Xw]),s,jD([WD])],behaviours:Qt([Qu.childAt(1)])}),VM=(t,s)=>{oo(t,yd(),{raw:{which:9,shiftKey:s}})},Yj=(t,s)=>{const d=s.element;Kc(d,Xw)?VM(t,!0):Kc(d,WD)&&VM(t,!1)},p2=t=>Fw(t,["."+Xw,"."+WD].join(","),fn),Qw=kn("update-dialog"),HM=kn("update-title"),zM=kn("update-body"),UM=kn("update-footer"),WM=kn("body-send-message"),Jw=kn("dialog-focus-shifted"),GD=zl().browser,v2=GD.isSafari(),Xj=GD.isFirefox(),jM=v2||Xj,Qj=GD.isChromium(),Jj=({scrollTop:t,scrollHeight:s,clientHeight:d})=>Math.ceil(t)+d>=s,GM=(t,s)=>t.scrollTo(0,s==="bottom"?99999999:s),eG=(t,s)=>{const d=t.body;return F.from(!/^<!DOCTYPE (html|HTML)/.test(s)&&(!Qj&&!v2||K(d)&&(d.scrollTop!==0||Math.abs(d.scrollHeight-d.clientHeight)>1))?d:t.documentElement)},ZM=(t,s,d)=>{const g=t.dom;F.from(g.contentDocument).fold(d,b=>{let S=0;const k=eG(b,s).map(I=>(S=I.scrollTop,I)).forall(Jj),R=()=>{const I=g.contentWindow;K(I)&&(k?GM(I,"bottom"):!k&&jM&&S!==0&&GM(I,S))};v2&&g.addEventListener("load",R,{once:!0}),b.open(),b.write(s),b.close(),v2||R()})},tG=Wn(jM,v2?500:200).map(t=>FM(ZM,t)),ZD=(t,s)=>{const d=Zn(t.getOr(""));return{getValue:g=>d.get(),setValue:(g,b)=>{if(d.get()!==b){const S=g.element,k=()=>tn(S,"srcdoc",b);s?tG.fold(ee(ZM),R=>R.throttle)(S,b,k):k()}d.set(b)}}},nG=(t,s,d)=>{const g="tox-dialog__iframe",b=t.transparent?[]:[`${g}--opaque`],S=t.border?["tox-navobj-bordered"]:[],k={...t.label.map(ne=>({title:ne})).getOr({}),...d.map(ne=>({srcdoc:ne})).getOr({}),...t.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},R=ZD(d,t.streamContent),I=t.label.map(ne=>M1(ne,s)),H=ne=>$M(F.from(S),{uid:ne.uid,dom:{tag:"iframe",attributes:k,classes:[g,...b]},behaviours:Qt([zr.config({}),vo.config({}),Iv(d,R.getValue,R.setValue),Nc.config({channels:{[Jw]:{onReceive:(ae,ue)=>{ue.newFocus.each(he=>{Xa(ae.element).each(ke=>{(ws(ae.element,he)?Vr:mi)(ke,"tox-navobj-bordered-focus")})})}}}})])}),j=ar.parts.field({factory:{sketch:H}});return l2(I,j,["tox-form__group--stretched"],[])},oG=t=>new Promise((s,d)=>{const g=()=>{S(),s(t)},b=[fc(t,"load",g),fc(t,"error",()=>{S(),d("Unable to load data from image: "+t.dom.src)})],S=()=>ct(b,k=>k.unbind());t.dom.complete&&g()}),sG=(t,s,d,g,b)=>{const S=d*b,k=g*b,R=Math.max(0,t/2-S/2),I=Math.max(0,s/2-k/2);return{left:R.toString()+"px",top:I.toString()+"px",width:S.toString()+"px",height:k.toString()+"px"}},eS=(t,s,d)=>{const g=Fa(t),b=Nr(t);return Math.min(g/s,b/d,1)},qD=(t,s)=>{const d=Zn(s.getOr({url:""})),g=er({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:s.map(I=>({src:I.url})).getOr({})}}),b=er({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[g.asSpec()]}),S=(I,H)=>{const j={url:H.url};H.zoom.each(ae=>j.zoom=ae),H.cachedWidth.each(ae=>j.cachedWidth=ae),H.cachedHeight.each(ae=>j.cachedHeight=ae),d.set(j);const ne=()=>{const{cachedWidth:ae,cachedHeight:ue,zoom:he}=j;if(!z(ae)&&!z(ue)){if(z(he)){const ot=eS(I.element,ae,ue);j.zoom=ot}const ke=sG(Fa(I.element),Nr(I.element),ae,ue,j.zoom);b.getOpt(I).each(ot=>{kr(ot.element,ke)})}};g.getOpt(I).each(ae=>{const ue=ae.element;H.url!==Ys(ue,"src")&&(tn(ue,"src",H.url),mi(I.element,"tox-imagepreview__loaded")),ne(),oG(ue).then(he=>{I.getSystem().isConnected()&&(Vr(I.element,"tox-imagepreview__loaded"),j.cachedWidth=he.dom.naturalWidth,j.cachedHeight=he.dom.naturalHeight,ne())})})},k={};t.height.each(I=>k.height=I);const R=s.map(I=>({url:I.url,zoom:F.from(I.zoom),cachedWidth:F.from(I.cachedWidth),cachedHeight:F.from(I.cachedHeight)}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:k,attributes:{role:"presentation"}},components:[b.asSpec()],behaviours:Qt([Qu.self(),Iv(R,()=>d.get(),S)])}},rG=(t,s,d)=>{const g="tox-label",b=t.align==="center"?[`${g}--center`]:[],S=t.align==="end"?[`${g}--end`]:[],k=er({dom:{tag:"label",classes:[g,...b,...S]},components:[xi(s.providers.translate(t.label))]}),R=Ze(t.items,s.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[k.asSpec(),...R],behaviours:Qt([Qu.self(),_o.config({}),Uj(F.none()),qn.config({mode:"acyclic"}),Po("label",[Zr(I=>{t.for.each(H=>{d(H).each(j=>{k.getOpt(I).each(ne=>{var ae;const ue=(ae=Ys(j.element,"id"))!==null&&ae!==void 0?ae:kn("form-field");tn(j.element,"id",ue),tn(ne.element,"for",ue)})})})})])])}},qM=kn("toolbar.button.execute"),KD=t=>bd((s,d)=>{qk(t,s)(g=>{oo(s,qM,{buttonApi:g}),t.onAction(g)})}),Bv=kn("common-button-display-events"),Dx={[$u()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[ac()]:["toolbar-button-events",Bv],[Vu()]:["toolbar-button-events","dropdown-events","tooltipping"],[ic()]:["focusing","alloy.base.behaviour",Bv]},Rx=t=>Rn(t.element,"width",or(t.element,"width")),KM=(t,s,d)=>_u(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:d},s),YD=(t,s)=>KM(t,s,[]),mp=(t,s)=>KM(t,s,[_o.config({})]),XD=(t,s,d)=>({dom:{tag:"span",classes:[`${s}__select-label`]},components:[xi(d.translate(t))],behaviours:Qt([_o.config({})])}),mf=kn("update-menu-text"),F1=kn("update-menu-icon"),Ox=(t,s,d,g)=>{const b=Zn(X),S=t.text.map(ke=>er(XD(ke,s,d.providers))),k=t.icon.map(ke=>er(mp(ke,d.providers.icons))),R=(ke,ot)=>{const Ie=xn.getValue(ke);return vo.focus(Ie),oo(Ie,"keydown",{raw:ot.event.raw}),lf.close(Ie),F.some(!0)},I=t.role.fold(()=>({}),ke=>({role:ke})),H=F.from(t.listRole).map(ke=>({listRole:ke})).getOr({}),j=t.ariaLabel.fold(()=>({}),ke=>({"aria-label":d.providers.translate(ke)})),ne=_u("chevron-down",{tag:"div",classes:[`${s}__select-chevron`]},d.providers.icons),ae=kn("common-button-display-events"),ue="dropdown-events";return er(lf.sketch({...t.uid?{uid:t.uid}:{},...I,...H,dom:{tag:"button",classes:[s,`${s}--select`].concat(Ze(t.classes,ke=>`${s}--${ke}`)),attributes:{...j,...K(g)?{"data-mce-name":g}:{}}},components:bv([k.map(ke=>ke.asSpec()),S.map(ke=>ke.asSpec()),F.some(ne)]),matchWidth:!0,useMinWidth:!0,onOpen:(ke,ot,Ie)=>{t.searchable&&cx(Ie)},dropdownBehaviours:Qt([...t.dropdownBehaviours,Yf.button(()=>t.disabled||d.providers.isDisabled()),Da(),u2.config({}),_o.config({}),...t.tooltip.map(ke=>Cl.config(d.providers.tooltips.getConfig({tooltipText:d.providers.translate(ke)}))).toArray(),Po(ue,[cp(t,b),vc(t,b)]),Po(ae,[Zr((ke,ot)=>Rx(ke))]),Po("menubutton-update-display-text",[Nt(mf,(ke,ot)=>{S.bind(Ie=>Ie.getOpt(ke)).each(Ie=>{_o.set(Ie,[xi(d.providers.translate(ot.event.text))])})}),Nt(F1,(ke,ot)=>{k.bind(Ie=>Ie.getOpt(ke)).each(Ie=>{_o.set(Ie,[mp(ot.event.icon,d.providers.icons)])})})])]),eventOrder:Dr(Dx,{[ic()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[ac()]:["toolbar-button-events",Cl.name(),ue,ae]}),sandboxBehaviours:Qt([qn.config({mode:"special",onLeft:R,onRight:R}),Po("dropdown-sandbox-events",[Nt(cI,(ke,ot)=>{wW(ke),ot.stop()}),Nt(uI,(ke,ot)=>{SW(ke,ot),ot.stop()})])]),lazySink:d.getSink,toggleClass:`${s}--active`,parts:{menu:{...Sw(!1,t.columns,t.presets),fakeFocus:t.searchable,...t.listRole==="listbox"?{}:{onHighlightItem:Lw,onCollapseMenu:(ke,ot,Ie)=>{mn.getHighlighted(Ie).each(Je=>{Lw(ke,Ie,Je)})},onDehighlightItem:xW}}},getAnchorOverrides:()=>({maxHeightFunction:(ke,ot)=>{Qy()(ke,ot-10)}}),fetch:ke=>Kl.nu(tt(t.fetch,ke))})).asSpec()},iG=t=>C(t),QD=t=>t.type==="separator",YM=t=>Qo(t,"getSubmenuItems"),XM={type:"separator"},aG=(t,s)=>{const d=Fo(t,(g,b)=>iG(b)?b===""?g:b==="|"?g.length>0&&!QD(g[g.length-1])?g.concat([XM]):g:Qo(s,b.toLowerCase())?g.concat([s[b.toLowerCase()]]):g:g.concat([b]),[]);return d.length>0&&QD(d[d.length-1])&&d.pop(),d},lG=(t,s)=>{const d=t.getSubmenuItems(),g=JD(d,s),b=Dr(g.menus,{[t.value]:g.items}),S=Dr(g.expansions,{[t.value]:t.value});return{item:t,menus:b,expansions:S}},cG=t=>{const s=Yt(t,"value").getOrThunk(()=>kn("generated-menu-item"));return Dr({value:s},t)},JD=(t,s)=>{const d=aG(C(t)?t.split(" "):t,s);return yo(d,(g,b)=>{if(YM(b)){const S=cG(b),k=lG(S,s);return{menus:Dr(g.menus,k.menus),items:[k.item,...g.items],expansions:Dr(g.expansions,k.expansions)}}else return{...g,items:[b,...g.items]}},{menus:{},expansions:{},items:[]})},uG=t=>t.search.fold(()=>({searchMode:"no-search"}),s=>({searchMode:"search-with-field",placeholder:s.placeholder})),QM=t=>t.search.fold(()=>({searchMode:"no-search"}),s=>({searchMode:"search-with-results"})),y2=(t,s,d,g)=>{const b=kn("primary-menu"),S=JD(t,d.shared.providers.menuItems());if(S.items.length===0)return F.none();const k=uG(g),R=RW(b,S.items,s,d,g.isHorizontalMenu,k),I=QM(g),H=Cs(S.menus,(ne,ae)=>RW(ae,ne,s,d,!1,I)),j=Dr(H,Xs(b,R));return F.from(lv.tieredData(b,j,S.expansions))},Nx=t=>!Qo(t,"items"),Ix="data-value",JM=(t,s,d,g,b)=>Ze(d,S=>Nx(S)?{type:"togglemenuitem",...b?{}:{role:"option"},text:S.text,value:S.value,active:S.value===g,onAction:()=>{xn.setValue(t,S.value),oo(t,wu,{name:s}),vo.focus(t)}}:{type:"nestedmenuitem",text:S.text,getSubmenuItems:()=>JM(t,s,S.items,g,b)}),e8=(t,s)=>ms(t,d=>Nx(d)?Wn(d.value===s,d):e8(d.items,s)),dG=(t,s,d)=>{const g=Sn(t.items,H=>!Nx(H)),b=s.shared.providers,S=d.bind(H=>e8(t.items,H)).orThunk(()=>Os(t.items).filter(Nx)),k=t.label.map(H=>M1(H,b)),R=ar.parts.field({dom:{},factory:{sketch:H=>Ox({uid:H.uid,text:S.map(j=>j.text),icon:F.none(),tooltip:F.none(),role:Wn(!g,"combobox"),...g?{}:{listRole:"listbox"},ariaLabel:t.label,fetch:(j,ne)=>{const ae=JM(j,t.name,t.items,xn.getValue(j),g);ne(y2(ae,Gf.CLOSE_ON_EXECUTE,s,{isHorizontalMenu:!1,search:F.none()}))},onSetup:ee(X),getApi:ee({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[zr.config({}),Iv(S.map(j=>j.value),j=>Ys(j.element,Ix),(j,ne)=>{e8(t.items,ne).each(ae=>{tn(j.element,Ix,ae.value),oo(j,mf,{text:ae.text})})})]},"tox-listbox",s.shared)}}),I={dom:{tag:"div",classes:["tox-listboxfield"]},components:[R]};return ar.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:St([k.toArray(),[I]]),fieldBehaviours:Qt([ho.config({disabled:ee(!t.enabled),onDisabled:H=>{ar.getField(H).each(ho.disable)},onEnabled:H=>{ar.getField(H).each(ho.enable)}})])})},t8=(t,s)=>({dom:{tag:"div",classes:t.classes},components:Ze(t.items,s.shared.interpreter)}),fG=(t,s)=>{const d=Ze(t.options,b=>({dom:{tag:"option",value:b.value,innerHtml:b.text}})),g=t.data.map(b=>Xs("initialValue",b)).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:d,behaviours:Za(t.selectBehaviours,[vo.config({}),xn.config({store:{mode:"manual",getValue:b=>pt(b.element),setValue:(b,S)=>{const k=Os(t.options);vt(t.options,I=>I.value===S).isSome()?Ff(b.element,S):b.element.dom.selectedIndex===-1&&S===""&&k.each(I=>Ff(b.element,I.value))},...g}})])}},eP=Ic({name:"HtmlSelect",configFields:[Rt("options"),Ga("selectBehaviours",[vo,xn]),Qe("selectClasses",[]),Qe("selectAttributes",{}),Ds("data")],factory:fG}),mG=(t,s,d)=>{const g=Ze(t.items,I=>({text:s.translate(I.text),value:I.value})),b=t.label.map(I=>M1(I,s)),S=ar.parts.field({dom:{},...d.map(I=>({data:I})).getOr({}),selectAttributes:{size:t.size},options:g,factory:eP,selectBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled()}),zr.config({}),Po("selectbox-change",[Nt(Hp(),(I,H)=>{oo(I,wu,{name:t.name})})])])}),k=t.size>1?F.none():F.some(_u("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},s.icons)),R={dom:{tag:"div",classes:["tox-selectfield"]},components:St([[S],k.toArray()])};return ar.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:St([b.toArray(),[R]]),fieldBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled(),onDisabled:I=>{ar.getField(I).each(ho.disable)},onEnabled:I=>{ar.getField(I).each(ho.enable)}}),Da()])})},tP=ee([Qe("field1Name","field1"),Qe("field2Name","field2"),Hu("onLockedChange"),Pf(["lockClass"]),Qe("locked",!1),Wu.field("coupledFieldBehaviours",[gs,xn])]),hG=(t,s,d)=>Xt(t,s,d).bind(gs.getCurrent),nP=(t,s)=>bl({factory:ar,name:t,overrides:d=>({fieldBehaviours:Qt([Po("coupled-input-behaviour",[Nt(Of(),g=>{hG(g,d,s).each(b=>{Xt(g,d,"lock").each(S=>{Go.isOn(S)&&d.onLockedChange(g,b,S)})})})])])})}),gG=ee([nP("field1","field2"),nP("field2","field1"),bl({factory:Fl,schema:[Rt("dom")],name:"lock",overrides:t=>({buttonBehaviours:Qt([Go.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])})})]),pG=(t,s,d,g)=>({uid:t.uid,dom:t.dom,components:s,behaviours:Wu.augment(t.coupledFieldBehaviours,[gs.config({find:F.some}),xn.config({store:{mode:"manual",getValue:b=>{const S=Q0(b,t,["field1","field2"]);return{[t.field1Name]:xn.getValue(S.field1()),[t.field2Name]:xn.getValue(S.field2())}},setValue:(b,S)=>{const k=Q0(b,t,["field1","field2"]);Kr(S,t.field1Name)&&xn.setValue(k.field1(),S[t.field1Name]),Kr(S,t.field2Name)&&xn.setValue(k.field2(),S[t.field2Name])}}})]),apis:{getField1:b=>Xt(b,t,"field1"),getField2:b=>Xt(b,t,"field2"),getLock:b=>Xt(b,t,"lock")}}),Ad=ql({name:"FormCoupledInputs",configFields:tP(),partFields:gG(),factory:pG,apis:{getField1:(t,s)=>t.getField1(s),getField2:(t,s)=>t.getField2(s),getLock:(t,s)=>t.getLock(s)}}),oP=t=>{const s={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},d=b=>b in s?s[b]:1;let g=t.value.toFixed(d(t.unit));return g.indexOf(".")!==-1&&(g=g.replace(/\.?0*$/,"")),g+t.unit},n8=t=>{const d=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(d!==null){const g=parseFloat(d[1]),b=d[2];return Ro.value({value:g,unit:b})}else return Ro.error(t)},sP=(t,s)=>{const d={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},g=b=>Qo(d,b);return t.unit===s?F.some(t.value):g(t.unit)&&g(s)?d[t.unit]===d[s]?F.some(t.value):F.some(t.value/d[t.unit]*d[s]):F.none()},Bx=t=>F.none(),vG=(t,s)=>d=>sP(d,s).map(g=>({value:g*t,unit:s})),yG=(t,s)=>{const d=n8(t).toOptional(),g=n8(s).toOptional();return Ri(d,g,(b,S)=>sP(b,S.unit).map(k=>S.value/k).map(k=>vG(k,S.unit)).getOr(Bx)).getOr(Bx)},bG=(t,s)=>{let d=Bx;const g=kn("ratio-event"),b=ue=>_u(ue,{tag:"span",classes:["tox-icon","tox-lock-icon__"+ue]},s.icons),S=t.label.getOr("Constrain proportions"),k=s.translate(S),R=Ad.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":k,"data-mce-name":S}},components:[b("lock"),b("unlock")],buttonBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled()}),Da(),zr.config({}),Cl.config(s.tooltips.getConfig({tooltipText:k}))])}),I=ue=>({dom:{tag:"div",classes:["tox-form__group"]},components:ue}),H=ue=>ar.parts.field({factory:gv,inputClasses:["tox-textfield"],inputBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled()}),Da(),zr.config({}),Po("size-input-events",[Nt(Ud(),(he,ke)=>{oo(he,g,{isField1:ue})}),Nt(Hp(),(he,ke)=>{oo(he,wu,{name:t.name})})])]),selectOnFocus:!1}),j=ue=>({dom:{tag:"label",classes:["tox-label"]},components:[xi(s.translate(ue))]}),ne=Ad.parts.field1(I([ar.parts.label(j("Width")),H(!0)])),ae=Ad.parts.field2(I([ar.parts.label(j("Height")),H(!1)]));return Ad.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[ne,ae,I([j(Oh),R])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(ue,he,ke)=>{n8(xn.getValue(ue)).each(ot=>{d(ot).each(Ie=>{xn.setValue(he,oP(Ie))})})},coupledFieldBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled(),onDisabled:ue=>{Ad.getField1(ue).bind(ar.getField).each(ho.disable),Ad.getField2(ue).bind(ar.getField).each(ho.disable),Ad.getLock(ue).each(ho.disable)},onEnabled:ue=>{Ad.getField1(ue).bind(ar.getField).each(ho.enable),Ad.getField2(ue).bind(ar.getField).each(ho.enable),Ad.getLock(ue).each(ho.enable)}}),Da(),Po("size-input-events2",[Nt(g,(ue,he)=>{const ke=he.event.isField1,ot=ke?Ad.getField1(ue):Ad.getField2(ue),Ie=ke?Ad.getField2(ue):Ad.getField1(ue),Je=ot.map(xn.getValue).getOr(""),Ye=Ie.map(xn.getValue).getOr("");d=yG(Je,Ye)})])])})},rP=(t,s,d)=>{const g=ff.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[xi(s.translate(t.label))]}),b=ff.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),S=ff.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return ff.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:t.min,maxX:t.max,getInitialValue:ee(d.getOrThunk(()=>(Math.abs(t.max)-Math.abs(t.min))/2))},components:[g,b,S],sliderBehaviours:Qt([Qu.self(),vo.config({})]),onChoose:(k,R,I)=>{oo(k,wu,{name:t.name,value:I})},onChange:(k,R,I)=>{oo(k,wu,{name:t.name,value:I})}})},CG=(t,s)=>{const d=R=>({dom:{tag:"th",innerHtml:s.translate(R)}}),g=R=>({dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:Ze(R,d)}]}),b=R=>({dom:{tag:"td",innerHtml:s.translate(R)}}),S=R=>({dom:{tag:"tr"},components:Ze(R,b)}),k=R=>({dom:{tag:"tbody"},components:Ze(R,S)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[g(t.header),k(t.cells)],behaviours:Qt([zr.config({}),vo.config({})])}},iP=(t,s)=>{const d=t.label.map(ue=>M1(ue,s)),g=[ho.config({disabled:()=>t.disabled||s.isDisabled()}),Da(),qn.config({mode:"execution",useEnter:t.multiline!==!0,useControlEnter:t.multiline===!0,execute:ue=>(zo(ue,c2),F.some(!0))}),Po("textfield-change",[Nt(Of(),(ue,he)=>{oo(ue,wu,{name:t.name})}),Nt(_m(),(ue,he)=>{oo(ue,wu,{name:t.name})})]),zr.config({})],b=t.validation.map(ue=>qh.config({getRoot:he=>Xa(he.element),invalidClass:"tox-invalid",validator:{validate:he=>{const ke=xn.getValue(he),ot=ue.validator(ke);return Kl.pure(ot===!0?Ro.value(ke):Ro.error(ot))},validateOnLoad:ue.validateOnLoad}})).toArray(),S=t.placeholder.fold(ee({}),ue=>({placeholder:s.translate(ue)})),k=t.inputMode.fold(ee({}),ue=>({inputmode:ue})),R={...S,...k},I=ar.parts.field({tag:t.multiline===!0?"textarea":"input",...t.data.map(ue=>({data:ue})).getOr({}),inputAttributes:R,inputClasses:[t.classname],inputBehaviours:Qt(St([g,b])),selectOnFocus:!1,factory:gv}),H=t.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[I]}:I,ne=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),ae=[ho.config({disabled:()=>t.disabled||s.isDisabled(),onDisabled:ue=>{ar.getField(ue).each(ho.disable)},onEnabled:ue=>{ar.getField(ue).each(ho.enable)}}),Da()];return l2(d,H,ne,ae)},_G=(t,s,d)=>iP({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:!t.enabled,classname:"tox-textfield",validation:F.none(),maximized:t.maximized,data:d},s),aP=(t,s,d)=>iP({name:t.name,multiline:!0,label:t.label,inputMode:F.none(),placeholder:t.placeholder,flex:!0,disabled:!t.enabled,classname:"tox-textarea",validation:F.none(),maximized:t.maximized,data:d},s),b2=(t,s)=>s.getAnimationRoot.fold(()=>t.element,d=>d(t)),Yh=t=>t.dimension.property,Xh=(t,s)=>t.dimension.getDimension(s),Mx=(t,s)=>{const d=b2(t,s);Yc(d,[s.shrinkingClass,s.growingClass])},o8=(t,s)=>{mi(t.element,s.openClass),Vr(t.element,s.closedClass),Rn(t.element,Yh(s),"0px"),ka(t.element)},s8=(t,s)=>{mi(t.element,s.closedClass),Vr(t.element,s.openClass),ns(t.element,Yh(s))},lP=(t,s,d,g)=>{d.setCollapsed(),Rn(t.element,Yh(s),Xh(s,t.element)),Mx(t,s),o8(t,s),s.onStartShrink(t),s.onShrunk(t)},cP=(t,s,d,g)=>{const b=g.getOrThunk(()=>Xh(s,t.element));d.setCollapsed(),Rn(t.element,Yh(s),b),ka(t.element);const S=b2(t,s);mi(S,s.growingClass),Vr(S,s.shrinkingClass),o8(t,s),s.onStartShrink(t)},uP=(t,s,d)=>{const g=Xh(s,t.element);(g==="0px"?lP:cP)(t,s,d,F.some(g))},dP=(t,s,d)=>{const g=b2(t,s),b=Kc(g,s.shrinkingClass),S=Xh(s,t.element);s8(t,s);const k=Xh(s,t.element);(b?()=>{Rn(t.element,Yh(s),S),ka(t.element)}:()=>{o8(t,s)})(),mi(g,s.shrinkingClass),Vr(g,s.growingClass),s8(t,s),Rn(t.element,Yh(s),k),d.setExpanded(),s.onStartGrow(t)},wG=(t,s,d)=>{if(d.isExpanded()){ns(t.element,Yh(s));const g=Xh(s,t.element);Rn(t.element,Yh(s),g)}},fP=(t,s,d)=>{d.isExpanded()||dP(t,s,d)},mP=(t,s,d)=>{d.isExpanded()&&uP(t,s,d)},SG=(t,s,d)=>{d.isExpanded()&&lP(t,s,d)},EG=(t,s,d)=>d.isExpanded(),hP=(t,s,d)=>d.isCollapsed(),gP=(t,s,d)=>{const g=b2(t,s);return Kc(g,s.growingClass)===!0},pP=(t,s,d)=>{const g=b2(t,s);return Kc(g,s.shrinkingClass)===!0};var vP=Object.freeze({__proto__:null,refresh:wG,grow:fP,shrink:mP,immediateShrink:SG,hasGrown:EG,hasShrunk:hP,isGrowing:gP,isShrinking:pP,isTransitioning:(t,s,d)=>gP(t,s)||pP(t,s),toggleGrow:(t,s,d)=>{(d.isExpanded()?uP:dP)(t,s,d)},disableTransitions:Mx,immediateGrow:(t,s,d)=>{d.isExpanded()||(s8(t,s),Rn(t.element,Yh(s),Xh(s,t.element)),Mx(t,s),d.setExpanded(),s.onStartGrow(t),s.onGrown(t))}}),yP=Object.freeze({__proto__:null,exhibit:(t,s,d)=>{const g=s.expanded;return Zc(g?{classes:[s.openClass],styles:{}}:{classes:[s.closedClass],styles:Xs(s.dimension.property,"0px")})},events:(t,s)=>$r([zp(Wd(),(d,g)=>{g.event.raw.propertyName===t.dimension.property&&(Mx(d,t),s.isExpanded()&&ns(d.element,t.dimension.property),(s.isExpanded()?t.onGrown:t.onShrunk)(d))})])}),cse=[Rt("closedClass"),Rt("openClass"),Rt("shrinkingClass"),Rt("growingClass"),Ds("getAnimationRoot"),hs("onShrunk"),hs("onStartShrink"),hs("onGrown"),hs("onStartGrow"),Qe("expanded",!1),Ts("dimension",ga("property",{width:[Hr("property","width"),Hr("getDimension",t=>Fa(t)+"px")],height:[Hr("property","height"),Hr("getDimension",t=>Nr(t)+"px")]}))],TG=Object.freeze({__proto__:null,init:t=>{const s=Zn(t.expanded),d=()=>"expanded: "+s.get();return qc({isExpanded:()=>s.get()===!0,isCollapsed:()=>s.get()===!1,setCollapsed:tt(s.set,!1),setExpanded:tt(s.set,!0),readState:d})}});const ru=sl({fields:cse,name:"sliding",active:yP,apis:vP,state:TG}),bP=t=>({isEnabled:()=>!ho.isDisabled(t),setEnabled:s=>ho.set(t,!s),setActive:s=>{const d=t.element;s?(Vr(d,"tox-tbtn--enabled"),tn(d,"aria-pressed",!0)):(mi(d,"tox-tbtn--enabled"),Te(d,"aria-pressed"))},isActive:()=>Kc(t.element,"tox-tbtn--enabled"),setText:s=>{oo(t,mf,{text:s})},setIcon:s=>oo(t,F1,{icon:s})}),tS=(t,s,d,g,b=!0,S)=>Ox({text:t.text,icon:t.icon,tooltip:t.tooltip,ariaLabel:t.tooltip,searchable:t.search.isSome(),role:g,fetch:(k,R)=>{const I={pattern:t.search.isSome()?AW(k):""};t.fetch(H=>{R(y2(H,Gf.CLOSE_ON_EXECUTE,d,{isHorizontalMenu:!1,search:t.search}))},I,bP(k))},onSetup:t.onSetup,getApi:bP,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...b?[zr.config({})]:[]]},s,d.shared,S),DG=(t,s,d)=>{const g=S=>k=>{const R=!k.isActive();k.setActive(R),S.storage.set(R),d.shared.getSink().each(I=>{s().getOpt(I).each(H=>{hu(H.element),oo(H,Zh,{name:S.name,value:S.storage.get()})})})},b=S=>k=>{k.setActive(S.storage.get())};return S=>{S(Ze(t,k=>{const R=k.text.fold(()=>({}),I=>({text:I}));return{type:k.type,active:!1,...R,onAction:g(k),onSetup:b(k)}}))}},r8=t=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":t}},components:[xi(t)]}),Fx=kn("leaf-label-event-id"),$x=({leaf:t,onLeafAction:s,visible:d,treeId:g,selectedId:b,backstage:S})=>{const k=t.menu.map(I=>tS(I,"tox-mbtn",S,F.none(),d)),R=[r8(t.title)];return k.each(I=>R.push(I)),Fl.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(d?["tox-tree--leaf__label--visible"]:[])},components:R,role:"treeitem",action:I=>{s(t.id),I.getSystem().broadcastOn([`update-active-item-${g}`],{value:t.id})},eventOrder:{[yd()]:[Fx,"keying"]},buttonBehaviours:Qt([...d?[zr.config({})]:[],Go.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),Nc.config({channels:{[`update-active-item-${g}`]:{onReceive:(I,H)=>{(H.value===t.id?Go.on:Go.off)(I)}}}}),Po(Fx,[Zr((I,H)=>{b.each(j=>{(j===t.id?Go.on:Go.off)(I)})}),Nt(yd(),(I,H)=>{const j=H.event.raw.code==="ArrowLeft",ne=H.event.raw.code==="ArrowRight";j?(xm(I.element,".tox-tree--directory").each(ae=>{I.getSystem().getByDom(ae).each(ue=>{WC(ae,".tox-tree--directory__label").each(he=>{ue.getSystem().getByDom(he).each(vo.focus)})})}),H.stop()):ne&&H.stop()})])])})},RG=(t,s,d)=>_u(t,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:d},s),OG=(t,s)=>RG(t,s,[]),CP=kn("directory-label-event-id"),NG=({directory:t,visible:s,noChildren:d,backstage:g})=>{const b=t.menu.map(R=>tS(R,"tox-mbtn",g,F.none())),S=[{dom:{tag:"div",classes:["tox-chevron"]},components:[OG("chevron-right",g.shared.providers.icons)]},r8(t.title)];b.each(R=>{S.push(R)});const k=R=>{xm(R.element,".tox-tree--directory").each(I=>{R.getSystem().getByDom(I).each(H=>{const j=!Go.isOn(H);Go.toggle(H),oo(R,"expand-tree-node",{expanded:j,node:t.id})})})};return Fl.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(s?["tox-tree--directory__label--visible"]:[])},components:S,action:k,eventOrder:{[yd()]:[CP,"keying"]},buttonBehaviours:Qt([...s?[zr.config({})]:[],Po(CP,[Nt(yd(),(R,I)=>{const H=I.event.raw.code==="ArrowRight",j=I.event.raw.code==="ArrowLeft";H&&d&&I.stop(),(H||j)&&xm(R.element,".tox-tree--directory").each(ne=>{R.getSystem().getByDom(ne).each(ae=>{!Go.isOn(ae)&&H||Go.isOn(ae)&&j?(k(R),I.stop()):j&&!Go.isOn(ae)&&(xm(ae.element,".tox-tree--directory").each(ue=>{WC(ue,".tox-tree--directory__label").each(he=>{ae.getSystem().getByDom(he).each(vo.focus)})}),I.stop())})})})])])})},IG=({children:t,onLeafAction:s,visible:d,treeId:g,expandedIds:b,selectedId:S,backstage:k})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:t.map(R=>R.type==="leaf"?$x({leaf:R,selectedId:S,onLeafAction:s,visible:d,treeId:g,backstage:k}):i8({directory:R,expandedIds:b,selectedId:S,onLeafAction:s,labelTabstopping:d,treeId:g,backstage:k})),behaviours:Qt([ru.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking",expanded:d}),_o.config({})])}),BG=kn("directory-event-id"),i8=({directory:t,onLeafAction:s,labelTabstopping:d,treeId:g,backstage:b,expandedIds:S,selectedId:k})=>{const{children:R}=t,I=Zn(S),H=ne=>R.map(ae=>ae.type==="leaf"?$x({leaf:ae,selectedId:k,onLeafAction:s,visible:ne,treeId:g,backstage:b}):i8({directory:ae,expandedIds:I.get(),selectedId:k,onLeafAction:s,labelTabstopping:ne,treeId:g,backstage:b})),j=S.includes(t.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[NG({directory:t,visible:d,noChildren:t.children.length===0,backstage:b}),IG({children:R,expandedIds:S,selectedId:k,onLeafAction:s,visible:j,treeId:g,backstage:b})],behaviours:Qt([Po(BG,[Zr((ne,ae)=>{Go.set(ne,j)}),Nt("expand-tree-node",(ne,ae)=>{const{expanded:ue,node:he}=ae.event;I.set(ue?[...I.get(),he]:I.get().filter(ke=>ke!==he))})]),Go.config({...t.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(ne,ae)=>{const ue=ne.components()[1],he=H(ae);ae?ru.grow(ue):ru.shrink(ue),_o.set(ue,he)}})])}},MG=kn("tree-event-id"),PG=(t,s)=>{const d=t.onLeafAction.getOr(X),g=t.onToggleExpand.getOr(X),b=t.defaultExpandedIds,S=Zn(b),k=Zn(t.defaultSelectedId),R=kn("tree-id"),I=(H,j)=>t.items.map(ne=>ne.type==="leaf"?$x({leaf:ne,selectedId:H,onLeafAction:d,visible:!0,treeId:R,backstage:s}):i8({directory:ne,selectedId:H,onLeafAction:d,expandedIds:j,labelTabstopping:!0,treeId:R,backstage:s}));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:I(k.get(),S.get()),behaviours:Qt([qn.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),Po(MG,[Nt("expand-tree-node",(H,j)=>{const{expanded:ne,node:ae}=j.event;S.set(ne?[...S.get(),ae]:S.get().filter(ue=>ue!==ae)),g(S.get(),{expanded:ne,node:ae})})]),Nc.config({channels:{[`update-active-item-${R}`]:{onReceive:(H,j)=>{k.set(F.some(j.value)),_o.set(H,I(F.some(j.value),S.get()))}}}}),_o.config({})])}};var _P=Object.freeze({__proto__:null,events:(t,s)=>{const g=t.stream.streams.setup(t,s);return $r([Nt(t.event,g),If(()=>s.cancel())].concat(t.cancelEvent.map(b=>[Nt(b,()=>s.cancel())]).getOr([])))}});const wP=t=>{const s=Zn(null);return qc({readState:()=>({timer:s.get()!==null?"set":"unset"}),setTimer:S=>{s.set(S)},cancel:()=>{const S=s.get();S!==null&&S.cancel()}})};var LG=Object.freeze({__proto__:null,throttle:wP,init:t=>t.stream.streams.state(t)});const FG=(t,s)=>{const d=t.stream,g=UD(t.onStream,d.delay);return s.setTimer(g),(b,S)=>{g.throttle(b,S),d.stopEvent&&S.stop()}};var $G=[Ts("stream",ga("mode",{throttle:[Rt("delay"),Qe("stopEvent",!0),Hr("streams",{setup:FG,state:wP})]})),Qe("event","input"),Ds("cancelEvent"),Hu("onStream")];const a8=sl({fields:$G,name:"streaming",active:_P,state:LG}),Vx=(t,s,d)=>{const g=xn.getValue(d);xn.setValue(s,g),EP(s)},SP=(t,s)=>{const d=t.element,g=pt(d),b=d.dom;Ys(d,"type")!=="number"&&s(b,g)},EP=t=>{SP(t,(s,d)=>s.setSelectionRange(d.length,d.length))},VG=(t,s)=>{SP(t,(d,g)=>d.setSelectionRange(s,g.length))},HG=(t,s,d)=>{if(t.selectsOver){const g=xn.getValue(s),b=t.getDisplayText(g),S=xn.getValue(d);return t.getDisplayText(S).indexOf(b)===0?F.some(()=>{Vx(t,s,d),VG(s,b.length)}):F.none()}else return F.none()},Hx=ee("alloy.typeahead.itemexecute"),zG=(t,s,d,g)=>{const b=(ne,ae,ue)=>{t.previewing.set(!1);const he=Mi.getCoupled(ne,"sandbox");if(ys.isOpen(he))gs.getCurrent(he).each(ke=>{mn.getHighlighted(ke).fold(()=>{ue(ke)},()=>{Nf(he,ke.element,"keydown",ae)})});else{const ke=ot=>{gs.getCurrent(ot).each(ue)};ax(t,k(ne),ne,he,g,ke,Bc.HighlightMenuAndItem).get(X)}},S=w5(t),k=ne=>ae=>ae.map(ue=>{const he=Or(ue.menus),ke=Ue(he,Ie=>Nn(Ie.items,Je=>Je.type==="item"));return xn.getState(ne).update(Ze(ke,Ie=>Ie.data)),ue}),R=ne=>gs.getCurrent(ne),I="typeaheadevents",H=[vo.config({}),xn.config({onSetValue:t.onSetValue,store:{mode:"dataset",getDataKey:ne=>pt(ne.element),getFallbackEntry:ne=>({value:ne,meta:{}}),setValue:(ne,ae)=>{Ff(ne.element,t.model.getDisplayText(ae))},...t.initialData.map(ne=>Xs("initialValue",ne)).getOr({})}}),a8.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:(ne,ae)=>{const ue=Mi.getCoupled(ne,"sandbox");if(vo.isFocused(ne)&&pt(ne.element).length>=t.minChars){const ke=R(ue).bind(Ie=>mn.getHighlighted(Ie).map(xn.getValue));t.previewing.set(!0);const ot=Ie=>{R(ue).each(Je=>{ke.fold(()=>{t.model.selectsOver&&mn.highlightFirst(Je)},Ye=>{mn.highlightBy(Je,It=>xn.getValue(It).value===Ye.value),mn.getHighlighted(Je).orThunk(()=>(mn.highlightFirst(Je),F.none()))})})};ax(t,k(ne),ne,ue,g,ot,Bc.HighlightJustMenu).get(X)}},cancelEvent:lC()}),qn.config({mode:"special",onDown:(ne,ae)=>(b(ne,ae,mn.highlightFirst),F.some(!0)),onEscape:ne=>{const ae=Mi.getCoupled(ne,"sandbox");return ys.isOpen(ae)?(ys.close(ae),F.some(!0)):F.none()},onUp:(ne,ae)=>(b(ne,ae,mn.highlightLast),F.some(!0)),onEnter:ne=>{const ae=Mi.getCoupled(ne,"sandbox"),ue=ys.isOpen(ae);if(ue&&!t.previewing.get())return R(ae).bind(he=>mn.getHighlighted(he)).map(he=>(oo(ne,Hx(),{item:he}),!0));{const he=xn.getValue(ne);return zo(ne,lC()),t.onExecute(ae,ne,he),ue&&ys.close(ae),F.some(!0)}}}),Go.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),Mi.config({others:{sandbox:ne=>aD(t,ne,{onOpen:()=>Go.on(ne),onClose:()=>{t.lazyTypeaheadComp.get().each(ae=>Te(ae.element,"aria-activedescendant")),Go.off(ne)}})}}),Po(I,[Zr(ne=>{t.lazyTypeaheadComp.set(F.some(ne))}),If(ne=>{t.lazyTypeaheadComp.set(F.none())}),bd(ne=>{const ae=X;rD(t,k(ne),ne,g,ae,Bc.HighlightMenuAndItem).get(X)}),Nt(Hx(),(ne,ae)=>{const ue=Mi.getCoupled(ne,"sandbox");Vx(t.model,ne,ae.event.item),zo(ne,lC()),t.onItemExecute(ne,ue,ae.event.item,xn.getValue(ne)),ys.close(ue),EP(ne)})].concat(t.dismissOnBlur?[Nt(dh(),ne=>{const ae=Mi.getCoupled(ne,"sandbox");dc(ae.element).isNone()&&ys.close(ae)})]:[]))],j={[Vu()]:[xn.name(),a8.name(),I],...t.eventOrder};return{uid:t.uid,dom:S5(Dr(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...S,...Za(t.typeaheadBehaviours,H)},eventOrder:j}},UG=ee([Ds("lazySink"),Rt("fetch"),Qe("minChars",5),Qe("responseTime",1e3),hs("onOpen"),Qe("getHotspot",F.some),Qe("getAnchorOverrides",ee({})),Qe("layouts",F.none()),Qe("eventOrder",{}),ie("model",{},[Qe("getDisplayText",t=>t.meta!==void 0&&t.meta.text!==void 0?t.meta.text:t.value),Qe("selectsOver",!0),Qe("populateFromBrowse",!0)]),hs("onSetValue"),cc("onExecute"),hs("onItemExecute"),Qe("inputClasses",[]),Qe("inputAttributes",{}),Qe("inputStyles",{}),Qe("matchWidth",!0),Qe("useMinWidth",!1),Qe("dismissOnBlur",!0),Pf(["openClass"]),Ds("initialData"),Ds("listRole"),Ga("typeaheadBehaviours",[vo,xn,a8,qn,Go,Mi]),Ns("lazyTypeaheadComp",()=>Zn(F.none)),Ns("previewing",()=>Zn(!0))].concat(_5()).concat(lx())),WG=ee([ju({schema:[Mg()],name:"menu",overrides:t=>({fakeFocus:!0,onHighlightItem:(s,d,g)=>{t.previewing.get()?t.lazyTypeaheadComp.get().each(b=>{HG(t.model,b,g).fold(()=>{t.model.selectsOver?(mn.dehighlight(d,g),t.previewing.set(!0)):t.previewing.set(!1)},S=>{S(),t.previewing.set(!1)})}):t.lazyTypeaheadComp.get().each(b=>{t.model.populateFromBrowse&&Vx(t.model,b,g),se(g.element,"id").each(S=>tn(b.element,"aria-activedescendant",S))})},onExecute:(s,d)=>t.lazyTypeaheadComp.get().map(g=>(oo(g,Hx(),{item:d}),!0)),onHover:(s,d)=>{t.previewing.set(!1),t.lazyTypeaheadComp.get().each(g=>{t.model.populateFromBrowse&&Vx(t.model,g,d)})}})})]),jG=ql({name:"Typeahead",configFields:UG(),partFields:WG(),factory:zG}),em=t=>({...t,toCached:()=>em(t.toCached()),bindFuture:I=>em(t.bind(H=>H.fold(j=>Kl.pure(Ro.error(j)),j=>I(j)))),bindResult:I=>em(t.map(H=>H.bind(I))),mapResult:I=>em(t.map(H=>H.map(I))),mapError:I=>em(t.map(H=>H.mapError(I))),foldResult:(I,H)=>t.map(j=>j.fold(I,H)),withTimeout:(I,H)=>em(Kl.nu(j=>{let ne=!1;const ae=setTimeout(()=>{ne=!0,j(Ro.error(H()))},I);t.get(ue=>{ne||(clearTimeout(ae),j(ue))})}))}),kP=t=>em(Kl.nu(t)),l8=t=>em(Kl.pure(Ro.value(t))),xP={nu:kP,wrap:em,pure:l8,value:l8,error:t=>em(Kl.pure(Ro.error(t))),fromResult:t=>em(Kl.pure(t)),fromFuture:t=>em(t.map(Ro.value)),fromPromise:t=>kP(s=>{t.then(d=>{s(Ro.value(d))},d=>{s(Ro.error(d))})})},C2=(t,s,d=[],g,b,S,k)=>{const R=s.fold(()=>({}),j=>({action:j})),I={buttonBehaviours:Qt([Yf.button(()=>!t.enabled||k.isDisabled()),Da(),zr.config({}),...S.map(j=>Cl.config(k.tooltips.getConfig({tooltipText:k.translate(j)}))).toArray(),Po("button press",[by("click"),by("mousedown")])].concat(d)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...R},H=Dr(I,{dom:g});return Dr(H,{components:b})},qG=(t,s,d,g=[],b)=>{const S=t.tooltip.map(H=>({"aria-label":d.translate(H)})).getOr({}),k={tag:"button",classes:["tox-tbtn"],attributes:{...S,"data-mce-name":b}},R=t.icon.map(H=>YD(H,d.icons)),I=bv([R]);return C2(t,s,g,k,I,t.tooltip,d)},zx=t=>{switch(t){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];case"secondary":default:return["tox-button","tox-button--secondary"]}},c8=(t,s,d,g=[],b=[])=>{const S=d.translate(t.text),k=t.icon.map(ue=>YD(ue,d.icons)),R=[k.getOrThunk(()=>xi(S))],I=t.buttonType.getOr(!t.primary&&!t.borderless?"secondary":"primary"),ne={tag:"button",classes:[...zx(I),...k.isSome()?["tox-button--icon"]:[],...t.borderless?["tox-button--naked"]:[],...b],attributes:{"aria-label":S,"data-mce-name":t.text}},ae=t.icon.map(ee(S));return C2(t,s,g,ne,R,ae,d)},AP=(t,s,d,g=[],b=[])=>{const S=c8(t,F.some(s),d,g,b);return Fl.sketch(S)},u8=(t,s)=>d=>{s==="custom"?oo(d,Zh,{name:t,value:{}}):s==="submit"?zo(d,c2):s==="cancel"?zo(d,P1):console.error("Unknown button type: ",s)},KG=(t,s)=>s==="menu",YG=(t,s)=>s==="custom"||s==="cancel"||s==="submit",Um=(t,s)=>s==="togglebutton",Ux=(t,s,d)=>{var g,b;const S=t.icon.map(Ye=>mp(Ye,s.icons)).map(er),k=Ye=>{oo(Ye,Zh,{name:t.name,value:{setIcon:It=>{S.map(gt=>gt.getOpt(Ye).each(Jt=>{_o.set(Jt,[mp(It,s.icons)])}))}}})},R=t.buttonType.getOr(t.primary?"primary":"secondary"),I={...t,name:(g=t.name)!==null&&g!==void 0?g:"",primary:R==="primary",tooltip:t.tooltip,enabled:(b=t.enabled)!==null&&b!==void 0?b:!1,borderless:!1},H=I.tooltip.or(t.text).map(Ye=>({"aria-label":s.translate(Ye)})).getOr({}),j=zx(R??"secondary"),ne=t.icon.isSome()&&t.text.isSome(),ae={tag:"button",classes:[...j.concat(t.icon.isSome()?["tox-button--icon"]:[]),...t.active?["tox-button--enabled"]:[],...ne?["tox-button--icon-and-text"]:[]],attributes:{...H,...K(d)?{"data-mce-name":d}:{}}},ue=[],he=s.translate(t.text.getOr("")),ke=xi(he),Ie=[...bv([S.map(Ye=>Ye.asSpec())]),...t.text.isSome()?[ke]:[]],Je=C2(I,F.some(k),ue,ae,Ie,t.tooltip,s);return Fl.sketch(Je)},Mv=(t,s,d)=>{if(KG(t,s)){const g=()=>k,b=t,S={...t,type:"menubutton",search:F.none(),onSetup:R=>(R.setEnabled(t.enabled),X),fetch:DG(b.items,g,d)},k=er(tS(S,"tox-tbtn",d,F.none(),!0,t.text.or(t.tooltip).getOrUndefined()));return k.asSpec()}else if(YG(t,s)){const g=u8(t.name,s),b={...t,borderless:!1};return AP(b,g,d.shared.providers,[])}else{if(Um(t,s))return Ux(t,d.shared.providers,t.text.or(t.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",s),new Error("Unknown footer button type")}},XG=(t,s)=>{const d=u8(t.name,"custom");return jW(F.none(),ar.parts.field({factory:Fl,...c8(t,F.some(d),s,[Tx(""),Qu.self()])}))},d8={type:"separator"},QG=t=>({type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:X}),nS=(t,s)=>({type:"menuitem",value:s,text:t,meta:{attach:void 0},onAction:X}),TP=t=>Ze(t,QG),f8=(t,s)=>Nn(s,d=>d.type===t),DP=(t,s)=>TP(f8(t,s)),JG=t=>DP("header",t.targets),RP=t=>DP("anchor",t.targets),eZ=t=>F.from(t.anchorTop).map(s=>nS("<top>",s)).toArray(),tZ=t=>F.from(t.anchorBottom).map(s=>nS("<bottom>",s)).toArray(),m8=t=>Ze(t,s=>nS(s,s)),nZ=t=>Fo(t,(s,d)=>s.length===0||d.length===0?s.concat(d):s.concat(d8,d),[]),h8=(t,s)=>{const d=t.toLowerCase();return Nn(s,g=>{var b;const S=g.meta!==void 0&&g.meta.text!==void 0?g.meta.text:g.text,k=(b=g.value)!==null&&b!==void 0?b:"";return dr(S.toLowerCase(),d)||dr(k.toLowerCase(),d)})},OP=(t,s,d)=>{var g,b;const S=xn.getValue(s),k=(b=(g=S==null?void 0:S.meta)===null||g===void 0?void 0:g.text)!==null&&b!==void 0?b:S.value;return d.getLinkInformation().fold(()=>[],I=>{const H=h8(k,m8(d.getHistory(t)));return t==="file"?nZ([H,h8(k,JG(I)),h8(k,St([eZ(I),RP(I),tZ(I)]))]):H})},g8=kn("aria-invalid"),oZ=(t,s,d,g)=>{const b=s.shared.providers,S=Je=>{const Ye=xn.getValue(Je);d.addToHistory(Ye.value,t.filetype)},k={...g.map(Je=>({initialData:Je})).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":g8,type:"url"},minChars:0,responseTime:0,fetch:Je=>{const Ye=OP(t.filetype,Je,d),It=y2(Ye,Gf.BUBBLE_TO_SANDBOX,s,{isHorizontalMenu:!1,search:F.none()});return Kl.pure(It)},getHotspot:Je=>he.getOpt(Je),onSetValue:(Je,Ye)=>{Je.hasConfigured(qh)&&qh.run(Je).get(X)},typeaheadBehaviours:Qt([...d.getValidationHandler().map(Je=>qh.config({getRoot:Ye=>Xa(Ye.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(Ye,It)=>{j.getOpt(Ye).each(gt=>{tn(gt.element,"title",b.translate(It))})}},validator:{validate:Ye=>{const It=xn.getValue(Ye);return xP.nu(gt=>{Je({type:t.filetype,url:It.value},Jt=>{if(Jt.status==="invalid"){const dn=Ro.error(Jt.message);gt(dn)}else{const dn=Ro.value(Jt.message);gt(dn)}})})},validateOnLoad:!1}})).toArray(),ho.config({disabled:()=>!t.enabled||b.isDisabled()}),zr.config({}),Po("urlinput-events",[Nt(Of(),Je=>{const Ye=pt(Je.element),It=Ye.trim();It!==Ye&&Ff(Je.element,It),t.filetype==="file"&&oo(Je,wu,{name:t.name})}),Nt(Hp(),Je=>{oo(Je,wu,{name:t.name}),S(Je)}),Nt(_m(),Je=>{oo(Je,wu,{name:t.name}),S(Je)})])]),eventOrder:{[Of()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:Je=>Je.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:s.shared.getSink,parts:{menu:Sw(!1,1,"normal")},onExecute:(Je,Ye,It)=>{oo(Ye,c2,{})},onItemExecute:(Je,Ye,It,gt)=>{S(Je),oo(Je,wu,{name:t.name})}},R=ar.parts.field({...k,factory:jG}),I=t.label.map(Je=>M1(Je,b)),j=er(((Je,Ye,It=Je,gt=Je)=>_u(It,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+Je],attributes:{title:b.translate(gt),"aria-live":"polite",...Ye.fold(()=>({}),Jt=>({id:Jt}))}},b.icons))("invalid",F.some(g8),"warning")),ne=er({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[j.asSpec()]}),ae=d.getUrlPicker(t.filetype),ue=kn("browser.url.event"),he=er({dom:{tag:"div",classes:["tox-control-wrap"]},components:[R,ne.asSpec()],behaviours:Qt([ho.config({disabled:()=>!t.enabled||b.isDisabled()})])}),ke=er(AP({name:t.name,icon:F.some("browse"),text:t.picker_text.or(t.label).getOr(""),enabled:t.enabled,primary:!1,buttonType:F.none(),borderless:!0},Je=>zo(Je,ue),b,[],["tox-browse-url"])),ot=()=>({dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:St([[he.asSpec()],ae.map(()=>ke.asSpec()).toArray()])}),Ie=Je=>{gs.getCurrent(Je).each(Ye=>{const It=xn.getValue(Ye),gt={fieldname:t.name,...It};ae.each(Jt=>{Jt(gt).get(dn=>{xn.setValue(Ye,dn),oo(Je,wu,{name:t.name})})})})};return ar.sketch({dom:ZW(),components:I.toArray().concat([ot()]),fieldBehaviours:Qt([ho.config({disabled:()=>!t.enabled||b.isDisabled(),onDisabled:Je=>{ar.getField(Je).each(ho.disable),ke.getOpt(Je).each(ho.disable)},onEnabled:Je=>{ar.getField(Je).each(ho.enable),ke.getOpt(Je).each(ho.enable)}}),Da(),Po("url-input-events",[Nt(ue,Ie)])])})},sZ=(t,s)=>{const d=XN(t.icon,s.icons);return Hm.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${t.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:t.url?void 0:d},components:t.url?[Fl.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:d,attributes:{title:s.translate(t.iconTooltip)}},action:g=>oo(g,Zh,{name:"alert-banner",value:t.url}),buttonBehaviours:Qt([f5()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:s.translate(t.text)}}]})},rZ=(t,s)=>{t.dom.checked=s},iZ=t=>t.dom.checked,NP=(t,s,d)=>{const g=I=>(I.element.dom.click(),F.some(!0)),b=ar.parts.field({factory:{sketch:xe},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Qt([Qu.self(),ho.config({disabled:()=>!t.enabled||s.isDisabled(),onDisabled:I=>{Xa(I.element).each(H=>Vr(H,"tox-checkbox--disabled"))},onEnabled:I=>{Xa(I.element).each(H=>mi(H,"tox-checkbox--disabled"))}}),zr.config({}),vo.config({}),IM(d,iZ,rZ),qn.config({mode:"special",onEnter:g,onSpace:g,stopSpaceKeyup:!0}),Po("checkbox-events",[Nt(Hp(),(I,H)=>{oo(I,wu,{name:t.name})})])])}),S=ar.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[xi(s.translate(t.label))],behaviours:Qt([u2.config({})])}),k=I=>_u(I==="checked"?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+I]},s.icons),R=er({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[k("checked"),k("unchecked")]});return ar.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[b,R.asSpec(),S],fieldBehaviours:Qt([ho.config({disabled:()=>!t.enabled||s.isDisabled()}),Da()])})},Wm=(t,s)=>{const d=["tox-form__group",...t.stretched?["tox-form__group--stretched"]:[]],g=Po("htmlpanel",[Zr(b=>{t.onInit(b.element.dom)})]);return t.presets==="presentation"?Hm.sketch({dom:{tag:"div",classes:d,innerHtml:t.html},containerBehaviours:Qt([Cl.config({...s.tooltips.getConfig({tooltipText:"",onShow:b=>{Qs(b.element,"[data-mce-tooltip]:hover").orThunk(()=>dc(b.element)).each(S=>{se(S,"data-mce-tooltip").each(k=>{Cl.setComponents(b,s.tooltips.getComponents({tooltipText:k}))})})}}),mode:"children-normal",anchor:b=>({type:"node",node:Qs(b.element,"[data-mce-tooltip]:hover").orThunk(()=>dc(b.element).filter(S=>se(S,"data-mce-tooltip").isSome())),root:b.element,layouts:{onLtr:ee([aa,Ta,va,ya,ia,hr]),onRtl:ee([aa,Ta,va,ya,ia,hr])},bubble:_d(0,-2,{})})}),g])}):Hm.sketch({dom:{tag:"div",classes:d,innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:Qt([zr.config({}),vo.config({}),g])})},ba=t=>(s,d,g,b,S)=>Yt(d,"name").fold(()=>t(d,b,F.none(),S),k=>s.field(k,t(d,b,Yt(g,k),S))),aZ=t=>(s,d,g,b,S)=>{const k=Dr(d,{source:"dynamic"});return ba(t)(s,k,g,b,S)},lZ={bar:ba((t,s)=>fx(t,s.shared)),collection:ba((t,s,d)=>qW(t,s.shared.providers,d)),alertbanner:ba((t,s)=>sZ(t,s.shared.providers)),input:ba((t,s,d)=>_G(t,s.shared.providers,d)),textarea:ba((t,s,d)=>aP(t,s.shared.providers,d)),label:ba((t,s,d,g)=>rG(t,s.shared,g)),iframe:aZ((t,s,d)=>nG(t,s.shared.providers,d)),button:ba((t,s)=>XG(t,s.shared.providers)),checkbox:ba((t,s,d)=>NP(t,s.shared.providers,d)),colorinput:ba((t,s,d)=>qB(t,s.shared,s.colorinput,d)),colorpicker:ba((t,s,d)=>MM(t,s.shared.providers,d)),dropzone:ba((t,s,d)=>qj(t,s.shared.providers,d)),grid:ba((t,s)=>LM(t,s.shared)),listbox:ba((t,s,d)=>dG(t,s,d)),selectbox:ba((t,s,d)=>mG(t,s.shared.providers,d)),sizeinput:ba((t,s)=>bG(t,s.shared.providers)),slider:ba((t,s,d)=>rP(t,s.shared.providers,d)),urlinput:ba((t,s,d)=>oZ(t,s,s.urlinput,d)),customeditor:ba(Gj),htmlpanel:ba((t,s)=>Wm(t,s.shared.providers)),imagepreview:ba((t,s,d)=>qD(t,d)),table:ba((t,s)=>CG(t,s.shared.providers)),tree:ba((t,s)=>PG(t,s)),panel:ba((t,s)=>t8(t,s))},cZ={field:(t,s)=>s,record:ee([])},IP=(t,s,d,g,b)=>{const S=Dr(g,{shared:{interpreter:k=>p8(t,k,d,S,b)}});return p8(t,s,d,S,b)},p8=(t,s,d,g,b)=>Yt(lZ,s.type).fold(()=>(console.error(`Unknown factory type "${s.type}", defaulting to container: `,s),s),S=>S(t,s,d,g,b)),v8=(t,s,d,g)=>p8(cZ,t,s,d,g),hp="layout-inset",BP=t=>t.x,uZ=(t,s)=>t.x+t.width/2-s.width/2,_l=(t,s)=>t.x+t.width-s.width,oS=t=>t.y,y8=(t,s)=>t.y+t.height-s.height,sS=(t,s)=>t.y+t.height/2-s.height/2,Wx=(t,s,d)=>il(_l(t,s),y8(t,s),d.insetSouthwest(),qC(),"southwest",al(t,{right:0,bottom:3}),hp),jx=(t,s,d)=>il(BP(t),y8(t,s),d.insetSoutheast(),ZC(),"southeast",al(t,{left:1,bottom:3}),hp),rS=(t,s,d)=>il(_l(t,s),oS(t),d.insetNorthwest(),GC(),"northwest",al(t,{right:0,top:2}),hp),iS=(t,s,d)=>il(BP(t),oS(t),d.insetNortheast(),r1(),"northeast",al(t,{left:1,top:2}),hp),tm=(t,s,d)=>il(uZ(t,s),oS(t),d.insetNorth(),KC(),"north",al(t,{top:2}),hp),aS=(t,s,d)=>il(uZ(t,s),y8(t,s),d.insetSouth(),Dn(),"south",al(t,{bottom:3}),hp),MP=(t,s,d)=>il(_l(t,s),sS(t,s),d.insetEast(),YC(),"east",al(t,{right:0}),hp),PP=(t,s,d)=>il(BP(t),sS(t,s),d.insetWest(),I0(),"west",al(t,{left:1}),hp),LP=t=>{switch(t){case"north":return tm;case"northeast":return iS;case"northwest":return rS;case"south":return aS;case"southeast":return jx;case"southwest":return Wx;case"east":return MP;case"west":return PP}},lS=(t,s,d,g,b)=>K3(g).map(LP).getOr(tm)(t,s,d,g,b),FP=t=>{switch(t){case"north":return aS;case"northeast":return jx;case"northwest":return Wx;case"south":return tm;case"southeast":return iS;case"southwest":return rS;case"east":return PP;case"west":return MP}},$P=(t,s,d,g,b)=>K3(g).map(FP).getOr(tm)(t,s,d,g,b),cS={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},VP=(t,s,d)=>{const b={maxHeightFunction:a1()},S=()=>({type:"node",root:Re(de(t())),node:F.from(t()),bubble:_d(12,12,cS),layouts:{onRtl:()=>[iS],onLtr:()=>[rS]},overrides:b}),k=()=>({type:"hotspot",hotspot:s(),bubble:_d(-12,12,cS),layouts:{onRtl:()=>[va,ia,aa],onLtr:()=>[ia,va,aa]},overrides:b});return()=>d()?S():k()},dZ=(t,s,d,g)=>{const S={maxHeightFunction:a1()},k=()=>({type:"node",root:Re(de(s())),node:F.from(s()),bubble:_d(12,12,cS),layouts:{onRtl:()=>[tm],onLtr:()=>[tm]},overrides:S}),R=()=>t?{type:"node",root:Re(de(s())),node:F.from(s()),bubble:_d(0,-id(s()),cS),layouts:{onRtl:()=>[Ta],onLtr:()=>[Ta]},overrides:S}:{type:"hotspot",hotspot:d(),bubble:_d(0,0,cS),layouts:{onRtl:()=>[Ta],onLtr:()=>[Ta]},overrides:S};return()=>g()?k():R()},fZ=(t,s,d)=>{const g=()=>({type:"node",root:Re(de(t())),node:F.from(t()),layouts:{onRtl:()=>[tm],onLtr:()=>[tm]}}),b=()=>({type:"hotspot",hotspot:s(),layouts:{onRtl:()=>[aa],onLtr:()=>[aa]}});return()=>d()?g():b()},HP=(t,s)=>()=>({type:"selection",root:s(),getSelection:()=>{const d=t.selection.getRng(),g=t.model.table.getSelectedCells();if(g.length>1){const b=g[0],S=g[g.length-1],k={firstCell:He.fromDom(b),lastCell:He.fromDom(S)};return F.some(k)}return F.some(d1.range(He.fromDom(d.startContainer),d.startOffset,He.fromDom(d.endContainer),d.endOffset))}}),hse=t=>s=>({type:"node",root:t(),node:s}),gse=(t,s,d,g)=>{const b=Zb(t),S=()=>He.fromDom(t.getBody()),k=()=>He.fromDom(t.getContentAreaContainer()),R=()=>b||!g();return{inlineDialog:VP(k,s,R),inlineBottomDialog:dZ(t.inline,k,d,R),banner:fZ(k,s,R),cursor:HP(t,S),node:hse(S)}},mZ=t=>(s,d)=>{yB(t)(s,d)},hZ=t=>()=>cB(t),gZ=t=>s=>rx(t,s),zP=t=>s=>lB(t,s),b8=t=>({colorPicker:mZ(t),hasCustomColors:hZ(t),getColors:gZ(t),getColorCols:zP(t)}),pZ=t=>()=>NN(t),vZ=t=>({isDraggableModal:pZ(t)}),UP=t=>{const s=Zn(rp(t)?"bottom":"top");return{isPositionedAtTop:()=>s.get()==="top",getDockingMode:s.get,setDockingMode:s.set}},WP=t=>Kr(t,"items"),jP=t=>Kr(t,"format"),GP=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],yZ=t=>Qo(t,"items"),C8=t=>Qo(t,"block"),ZP=t=>Qo(t,"inline"),bZ=t=>Qo(t,"selector"),qP=t=>Fo(t,(s,d)=>{if(yZ(d)){const g=qP(d.items);return{customFormats:s.customFormats.concat(g.customFormats),formats:s.formats.concat([{title:d.title,items:g.formats}])}}else if(ZP(d)||C8(d)||bZ(d)){const b=`custom-${C(d.name)?d.name:d.title.toLowerCase()}`;return{customFormats:s.customFormats.concat([{name:b,format:d}]),formats:s.formats.concat([{title:d.title,format:b,icon:d.icon}])}}else return{...s,formats:s.formats.concat(d)}},{customFormats:[],formats:[]}),CZ=(t,s)=>{const d=qP(s),g=b=>{ct(b,S=>{t.formatter.has(S.name)||t.formatter.register(S.name,S.format)})};return t.formatter?g(d.customFormats):t.on("init",()=>{g(d.customFormats)}),d.formats},KP=t=>SN(t).map(s=>{const d=CZ(t,s);return EN(t)?GP.concat(d):d}).getOr(GP),YP=t=>{const s=Ps(t);return s.length===1&&at(s,"title")},XP=(t,s,d)=>({...t,type:"formatter",isSelected:s(t.format),getStylePreview:d(t.format)}),uS=(t,s,d,g)=>{const b=I=>XP(I,d,g),S=I=>{const H=R(I.items);return{...I,type:"submenu",getStyleItems:ee(H)}},k=I=>{const H=C(I.name)?I.name:kn(I.title),j=`custom-${H}`,ne={...I,type:"formatter",format:j,isSelected:d(j),getStylePreview:g(j)};return t.formatter.register(H,ne),ne},R=I=>Ze(I,H=>WP(H)?S(H):jP(H)?b(H):YP(H)?{...H,type:"separator"}:k(H));return R(s)},_Z=t=>{const s=R=>()=>t.formatter.match(R),d=R=>()=>{const I=t.formatter.get(R);return I!==void 0?F.some({tag:I.length>0&&(I[0].inline||I[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(R))}):F.none()},g=Zn([]),b=Zn([]),S=Zn(!1);return t.on("PreInit",R=>{const I=KP(t),H=uS(t,I,s,d);g.set(H)}),t.on("addStyleModifications",R=>{const I=uS(t,R.items,s,d);b.set(I),S.set(R.replace)}),{getData:()=>{const R=S.get()?[]:g.get(),I=b.get();return R.concat(I)}}},Gx=t=>{let g=0;const b=()=>g>0,S=R=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[xi(R.tooltipText)]}];return{getConfig:R=>({delayForShow:()=>b()?60:300,delayForHide:ee(300),exclusive:!0,lazySink:t,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:S(R),onShow:(I,H)=>{g++,R.onShow&&R.onShow(I,H)},onHide:(I,H)=>{g--,R.onHide&&R.onHide(I,H)}}),getComponents:S}},wZ=t=>K(t)&&t.nodeType===1,_8=Jf.trim,_2=t=>s=>!!(wZ(s)&&(s.contentEditable===t||s.getAttribute("data-mce-contenteditable")===t)),QP=_2("true"),SZ=_2("false"),w8=(t,s,d,g,b)=>({type:t,title:s,url:d,level:g,attach:b}),JP=t=>{let s=t;for(;s=s.parentNode;){const d=s.contentEditable;if(d&&d!=="inherit")return QP(s)}return!1},e9=(t,s)=>Ze(Ll(He.fromDom(s),t),d=>d.dom),t9=t=>t.innerText||t.textContent,S8=t=>t.id?t.id:kn("h"),Zx=t=>t&&t.nodeName==="A"&&(t.id||t.name)!==void 0,EZ=t=>Zx(t)&&Pv(t),n9=t=>t&&/^(H[1-6])$/.test(t.nodeName),Pv=t=>JP(t)&&!SZ(t),o9=t=>n9(t)&&Pv(t),kZ=t=>n9(t)?parseInt(t.nodeName.substr(1),10):0,s9=t=>{var s;const d=S8(t),g=()=>{t.id=d};return w8("header",(s=t9(t))!==null&&s!==void 0?s:"","#"+d,kZ(t),g)},E8=t=>{const s=t.id||t.name,d=t9(t);return w8("anchor",d||"#"+s,"#"+s,0,X)},k8=t=>Ze(Nn(t,o9),s9),xZ=t=>Ze(Nn(t,EZ),E8),AZ=t=>e9("h1,h2,h3,h4,h5,h6,a:not([href])",t),TZ=t=>_8(t.title).length>0,DZ={find:t=>{const s=AZ(t);return Nn(k8(s).concat(xZ(s)),TZ)}},qx="tinymce-url-history",i9=5,a9=t=>C(t)&&/^https?/.test(t),RZ=t=>N(t)&&t.length<=i9&&In(t,a9),l9=t=>E(t)&&Hs(t,s=>!RZ(s)).isNone(),c9=()=>{const t=Sv.getItem(qx);if(t===null)return{};let s;try{s=JSON.parse(t)}catch(d){if(d instanceof SyntaxError)return console.log("Local storage "+qx+" was not valid JSON",d),{};throw d}return l9(s)?s:(console.log("Local storage "+qx+" was not valid format",s),{})},u9=t=>{if(!l9(t))throw new Error(`Bad format for history:
|
|
147
147
|
`+JSON.stringify(t));Sv.setItem(qx,JSON.stringify(t))},OZ=t=>{const s=c9();return Yt(s,t).getOr([])},dS=(t,s)=>{if(!a9(t))return;const d=c9(),g=Yt(d,s).getOr([]),b=Nn(g,S=>S!==t);d[s]=[t].concat(b).slice(0,i9),u9(d)},d9=t=>!!t,NZ=t=>Cs(Jf.makeMap(t,/[, ]/),d9),fS=t=>F.from(DN(t)),f9=t=>{const s=F.from(z4(t)).filter(d9).map(NZ);return fS(t).fold(fn,d=>s.fold(Vt,g=>Ps(g).length>0?g:!1))},IZ=(t,s)=>{const d=f9(t);return U(d)?d?fS(t):F.none():d[s]?fS(t):F.none()},BZ=(t,s)=>IZ(t,s).map(d=>g=>Kl.nu(b=>{const S=(R,I)=>{if(!C(R))throw new Error("Expected value to be string");if(I!==void 0&&!E(I))throw new Error("Expected meta to be a object");b({value:R,meta:I})},k={filetype:s,fieldname:g.fieldname,...F.from(g.meta).getOr({})};d.call(t,S,g.value,k)})),m9=t=>F.from(t).filter(C).getOrUndefined(),MZ=t=>RN(t)?F.some({targets:DZ.find(t.getBody()),anchorTop:m9(mk(t)),anchorBottom:m9(ON(t))}):F.none(),PZ=t=>F.from(fk(t)),LZ=t=>({getHistory:OZ,addToHistory:dS,getLinkInformation:()=>MZ(t),getValidationHandler:()=>PZ(t),getUrlPicker:s=>BZ(t,s)}),FZ=(t,s,d,g)=>{const b=Zn(!1),S=UP(s),k={icons:()=>s.ui.registry.getAll().icons,menuItems:()=>s.ui.registry.getAll().menuItems,translate:kd.translate,isDisabled:()=>s.mode.isReadOnly()||!s.ui.isEnabled(),getOption:s.options.get,tooltips:Gx(t.dialog)},R=LZ(s),I=_Z(s),H=b8(s),j=vZ(s),ne=()=>b.get(),ae=Ie=>b.set(Ie),ue={shared:{providers:k,anchors:gse(s,d,g,S.isPositionedAtTop),header:S},urlinput:R,styles:I,colorinput:H,dialog:j,isContextMenuOpen:ne,setContextMenuState:ae},he=Ie=>F.none(),ke={...ue,shared:{...ue.shared,interpreter:Ie=>v8(Ie,{},ke,he),getSink:t.popup}},ot={...ue,shared:{...ue.shared,interpreter:Ie=>v8(Ie,{},ot,he),getSink:t.dialog}};return{popup:ke,dialog:ot}},$Z=(t,s,d)=>{const g=(Ot,Hn)=>{ct([s,...d],Tn=>{Tn.broadcastEvent(Ot,Hn)})},b=(Ot,Hn)=>{ct([s,...d],Tn=>{Tn.broadcastOn([Ot],Hn)})},S=Ot=>b(Hf(),{target:Ot.target}),k=nc(),R=fc(k,"touchstart",S),I=fc(k,"touchmove",Ot=>g(p0(),Ot)),H=fc(k,"touchend",Ot=>g(cC(),Ot)),j=fc(k,"mousedown",S),ne=fc(k,"mouseup",Ot=>{Ot.raw.button===0&&b(W0(),{target:Ot.target})}),ae=Ot=>b(Hf(),{target:He.fromDom(Ot.target)}),ue=Ot=>{Ot.button===0&&b(W0(),{target:He.fromDom(Ot.target)})},he=()=>{ct(t.editorManager.get(),Ot=>{t!==Ot&&Ot.dispatch("DismissPopups",{relatedTarget:t})})},ke=Ot=>g(Sg(),a_(Ot)),ot=Ot=>{b(Xg(),{}),g(Zd(),a_(Ot))},Ie=de(He.fromDom(t.getElement())),Je=i_(Ie,"scroll",Ot=>{requestAnimationFrame(()=>{const Hn=t.getContainer();if(Hn!=null){const lo=ip(t,s.element).map(to=>[to.element,...to.others]).getOr([]);Sn(lo,to=>ws(to,Ot.target))&&(t.dispatch("ElementScroll",{target:Ot.target.dom}),g(n3(),Ot))}})}),Ye=()=>b(Xg(),{}),It=Ot=>{Ot.state&&b(Hf(),{target:He.fromDom(t.getContainer())})},gt=Ot=>{b(Hf(),{target:He.fromDom(Ot.relatedTarget.getContainer())})},Jt=Ot=>t.dispatch("focusin",Ot),dn=Ot=>t.dispatch("focusout",Ot);t.on("PostRender",()=>{t.on("click",ae),t.on("tap",ae),t.on("mouseup",ue),t.on("mousedown",he),t.on("ScrollWindow",ke),t.on("ResizeWindow",ot),t.on("ResizeEditor",Ye),t.on("AfterProgressState",It),t.on("DismissPopups",gt),ct([s,...d],Ot=>{Ot.element.dom.addEventListener("focusin",Jt),Ot.element.dom.addEventListener("focusout",dn)})}),t.on("remove",()=>{t.off("click",ae),t.off("tap",ae),t.off("mouseup",ue),t.off("mousedown",he),t.off("ScrollWindow",ke),t.off("ResizeWindow",ot),t.off("ResizeEditor",Ye),t.off("AfterProgressState",It),t.off("DismissPopups",gt),ct([s,...d],Ot=>{Ot.element.dom.removeEventListener("focusin",Jt),Ot.element.dom.removeEventListener("focusout",dn)}),j.unbind(),R.unbind(),I.unbind(),H.unbind(),ne.unbind(),Je.unbind()}),t.on("detach",()=>{ct([s,...d],N_),ct([s,...d],Ot=>Ot.destroy())})},ul=HE,gp=PE,VZ=ee([Qe("shell",!1),Rt("makeItem"),Qe("setupItem",X),Wu.field("listBehaviours",[_o])]),h9=Cu({name:"items",overrides:()=>({behaviours:Qt([_o.config({})])})}),Kx=ee([h9]),g9=ee("CustomList"),zZ=(t,s,d,g)=>{const b=(R,I)=>{k(R).fold(()=>{throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},H=>{const j=_o.contents(H),ne=I.length,ae=ne-j.length,ue=ae>0?lt(ae,()=>t.makeItem()):[],he=j.slice(ne);ct(he,ot=>_o.remove(H,ot)),ct(ue,ot=>_o.append(H,ot));const ke=_o.contents(H);ct(ke,(ot,Ie)=>{t.setupItem(R,ot,I[Ie],Ie)})})},S=t.shell?{behaviours:[_o.config({})],components:[]}:{behaviours:[],components:s},k=R=>t.shell?F.some(R):Xt(R,t,"items");return{uid:t.uid,dom:t.dom,components:S.components,behaviours:Za(t.listBehaviours,S.behaviours),apis:{setItems:b}}},p9=ql({name:g9(),configFields:VZ(),partFields:Kx(),factory:zZ,apis:{setItems:(t,s,d)=>{t.setItems(s,d)}}}),w2=ee([Rt("dom"),Qe("shell",!0),Ga("toolbarBehaviours",[_o])]),UZ=ee([Cu({name:"groups",overrides:()=>({behaviours:Qt([_o.config({})])})})]),WZ=(t,s,d,g)=>{const b=(R,I)=>{S(R).fold(()=>{throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},H=>{_o.set(H,I)})},S=R=>t.shell?F.some(R):Xt(R,t,"groups"),k=t.shell?{behaviours:[_o.config({})],components:[]}:{behaviours:[],components:s};return{uid:t.uid,dom:t.dom,components:k.components,behaviours:Za(t.toolbarBehaviours,k.behaviours),apis:{setGroups:b,refresh:X},domModification:{attributes:{role:"group"}}}},jm=ql({name:"Toolbar",configFields:w2(),partFields:UZ(),factory:WZ,apis:{setGroups:(t,s,d)=>{t.setGroups(s,d)}}}),v9=X,y9=fn,b9=ee([]);var C9=Object.freeze({__proto__:null,setup:v9,isDocked:y9,getBehaviours:b9});const x8=ee(kn("toolbar-height-change")),Qh={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},_9="tox-tinymce--toolbar-sticky-on",$1="tox-tinymce--toolbar-sticky-off",w9=(t,s)=>{const d=ma(s),b=ml(s).dom.innerHeight,S=Aa(d),k=He.fromDom(t.elm),R=Tl(k),I=Nr(k),H=R.y,j=H+I,ne=Ji(s),ae=Nr(s),ue=ne.top,he=ue+ae,ke=Math.abs(ue-S.top)<2,ot=Math.abs(he-(S.top+b))<2;if(ke&&H<he)Ym(S.left,H-ae,d);else if(ot&&j>ue){const Ie=H-b+I+ae;Ym(S.left,Ie,d)}},V1=(t,s)=>at(ai.getModes(t),s),S2=t=>{const s=g=>id(g)+(parseInt(or(g,"margin-top"),10)||0)+(parseInt(or(g,"margin-bottom"),10)||0),d=t.element;Xa(d).each(g=>{const b="padding-"+ai.getModes(t)[0];if(ai.isDocked(t)){const S=Fa(g);Rn(d,"width",S+"px"),Rn(g,b,s(d)+"px")}else ns(d,"width"),ns(g,b)})},A8=(t,s)=>{s?(mi(t,Qh.fadeOutClass),jp(t,[Qh.transitionClass,Qh.fadeInClass])):(mi(t,Qh.fadeInClass),jp(t,[Qh.fadeOutClass,Qh.transitionClass]))},T8=(t,s)=>{const d=He.fromDom(t.getContainer());s?(Vr(d,_9),mi(d,$1)):(Vr(d,$1),mi(d,_9))},S9=(t,s)=>{const d=ma(s);tf(d).filter(g=>!ws(s,g)).filter(g=>ws(g,He.fromDom(d.dom.body))||wi(t,g)).each(()=>hu(s))},vse=(t,s)=>dc(t).orThunk(()=>s().toOptional().bind(d=>dc(d.element))),jZ=(t,s,d)=>{t.inline||(s.header.isPositionedAtTop()||t.on("ResizeEditor",()=>{d().each(ai.reset)}),t.on("ResizeWindow ResizeEditor",()=>{d().each(S2)}),t.on("SkinLoaded",()=>{d().each(g=>{ai.isDocked(g)?ai.reset(g):ai.refresh(g)})}),t.on("FullscreenStateChanged",()=>{d().each(ai.reset)})),t.on("AfterScrollIntoView",g=>{d().each(b=>{ai.refresh(b);const S=b.element;y7(S)&&w9(g,S)})}),t.on("PostRender",()=>{T8(t,!1)})},GZ=t=>t().map(ai.isDocked).getOr(!1),ZZ=()=>[Nc.config({channels:{[x8()]:{onReceive:S2}}})],E9=(t,s)=>{const d=sr(),g=s.getSink,b=R=>{g().each(I=>R(I.element))},S=R=>{t.inline||S2(R),T8(t,ai.isDocked(R)),R.getSystem().broadcastOn([Xg()],{}),g().each(I=>I.getSystem().broadcastOn([Xg()],{}))},k=t.inline?[]:ZZ();return[vo.config({}),ai.config({contextual:{lazyContext:R=>{const I=id(R.element),H=t.inline?t.getContentAreaContainer():t.getContainer();return F.from(H).map(j=>{const ne=Jr(He.fromDom(j));return ip(t,R.element).fold(()=>{const ue=ne.height-I,he=ne.y+(V1(R,"top")?0:I);return Tr(ne.x,he,ne.width,ue)},ue=>{const he=gg(ne,mv(ue)),ke=V1(R,"top")?he.y:he.y+I;return Tr(he.x,ke,he.width,he.height-I)})})},onShow:()=>{b(R=>A8(R,!0))},onShown:R=>{b(I=>Yc(I,[Qh.transitionClass,Qh.fadeInClass])),d.get().each(I=>{S9(R.element,I),d.clear()})},onHide:R=>{vse(R.element,g).fold(d.clear,d.set),b(I=>A8(I,!1))},onHidden:()=>{b(R=>Yc(R,[Qh.transitionClass]))},...Qh},lazyViewport:R=>ip(t,R.element).fold(()=>{const H=Ni(),j=TN(t),ne=H.y+(V1(R,"top")?j:0),ae=H.height-(V1(R,"bottom")?j:0);return{bounds:Tr(H.x,ne,H.width,ae),optScrollEnv:F.none()}},H=>({bounds:mv(H),optScrollEnv:F.some({currentScrollTop:H.element.dom.scrollTop,scrollElmTop:Ji(H.element).top})})),modes:[s.header.getDockingMode()],onDocked:S,onUndocked:S}),...k]};var qZ=Object.freeze({__proto__:null,setup:jZ,isDocked:GZ,getBehaviours:E9});const E2=t=>{const s=t.editor,d=t.sticky?E9:b9;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:Qt(d(s,t.sharedBackstage))}},mS=co([ca,Ts("items",rh([c0([Pk,Dc("items",Cn)]),Cn]))].concat(Dw)),D8=t=>ei("GroupToolbarButton",mS,t),KZ=[Zi("text"),Zi("tooltip"),Zi("icon"),jc("search",!1,rh([Ac,co([Zi("placeholder")])],t=>U(t)?t?F.some({placeholder:F.none()}):F.none():F.some(t))),Tc("fetch"),bi("onSetup",()=>X)],k9=co([ca,...KZ]),Yx=t=>ei("menubutton",k9,t),YZ=co([ca,Aw,rf,B1,CI,Qz,I1,mu("presets","normal",["normal","color","listpreview"]),Hk(1),Xb,D5]),hS=t=>ei("SplitButton",YZ,t);var R8=Ic({factory:(t,s)=>{const d=(b,S)=>{const k=Ze(S,R=>{const I={type:"menubutton",text:R.text,fetch:j=>{j(R.getItems())}},H=Yx(I).mapError(j=>Mu(j)).getOrDie();return tS(H,"tox-mbtn",s.backstage,F.some("menuitem"))});_o.set(b,k)},g={focus:qn.focusIn,setMenus:d};return{uid:t.uid,dom:t.dom,components:[],behaviours:Qt([_o.config({}),Po("menubar-events",[Zr(b=>{t.onSetup(b)}),Nt(Df(),(b,S)=>{Qs(b.element,".tox-mbtn--active").each(k=>{ef(S.event.target,".tox-mbtn").each(R=>{ws(k,R)||b.getSystem().getByDom(k).each(I=>{b.getSystem().getByDom(R).each(H=>{lf.expand(H),lf.close(I),vo.focus(H)})})})})}),Nt(Eg(),(b,S)=>{S.event.prevFocus.bind(k=>b.getSystem().getByDom(k).toOptional()).each(k=>{S.event.newFocus.bind(R=>b.getSystem().getByDom(R).toOptional()).each(R=>{lf.isOpen(k)&&(lf.expand(R),lf.close(k))})})})]),qn.config({mode:"flow",selector:".tox-mbtn",onEscape:b=>(t.onEscape(b),F.some(!0))}),zr.config({})]),apis:g,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Rt("dom"),Rt("uid"),Rt("onEscape"),Rt("backstage"),Qe("onSetup",X)],apis:{focus:(t,s)=>{t.focus(s)},setMenus:(t,s,d)=>{t.setMenus(s,d)}}});const QZ="⚡️Upgrade",JZ="https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",eq=t=>({uid:t.uid,dom:t.dom,components:[{dom:{tag:"a",attributes:{href:JZ,rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:QZ}}]}),x9="container",tq=[Ga("slotBehaviours",[])],O8=t=>"<alloy.field."+t+">",A9=t=>{const s=(()=>{const S=[];return{slot:(R,I)=>(S.push(R),$E(x9,O8(R),I)),record:ee(S)}})(),d=t(s),g=s.record(),b=Ze(g,S=>bl({name:S,pname:O8(S)}));return Bm(x9,tq,b,N8,d)},N8=(t,s)=>{const d=ke=>X0(t),g=(ke,ot)=>Xt(ke,t,ot),b=(ke,ot)=>(Ie,Je)=>Xt(Ie,t,Je).map(Ye=>ke(Ye,Je)).getOr(ot),S=ke=>(ot,Ie)=>{ct(Ie,Je=>ke(ot,Je))},k=(ke,ot)=>Ys(ke.element,"aria-hidden")!=="true",R=(ke,ot)=>{if(!k(ke)){const Ie=ke.element;ns(Ie,"display"),Te(Ie,"aria-hidden"),oo(ke,dC(),{name:ot,visible:!0})}},I=(ke,ot)=>{if(k(ke)){const Ie=ke.element;Rn(Ie,"display","none"),tn(Ie,"aria-hidden","true"),oo(ke,dC(),{name:ot,visible:!1})}},H=b(k,!1),j=b(I),ne=S(j),ae=ke=>ne(ke,d()),ue=b(R),he={getSlotNames:d,getSlot:g,isShowing:H,hideSlot:j,hideAllSlots:ae,showSlot:ue};return{uid:t.uid,dom:t.dom,components:s,behaviours:Z0(t.slotBehaviours),apis:he}},wl={...Cs({getSlotNames:(t,s)=>t.getSlotNames(s),getSlot:(t,s,d)=>t.getSlot(s,d),isShowing:(t,s,d)=>t.isShowing(s,d),hideSlot:(t,s,d)=>t.hideSlot(s,d),hideAllSlots:(t,s)=>t.hideAllSlots(s),showSlot:(t,s,d)=>t.showSlot(s,d)},t=>n1(t)),sketch:A9},Xx=co([rf,Aw,bi("onShow",X),bi("onHide",X),I1]),T9=t=>ei("sidebar",Xx,t),nq=t=>{const{sidebars:s}=t.ui.registry.getAll();ct(Ps(s),d=>{const g=s[d],b=()=>_i(F.from(t.queryCommandValue("ToggleSidebar")),d);t.ui.registry.addToggleButton(d,{icon:g.icon,tooltip:g.tooltip,onAction:S=>{t.execCommand("ToggleSidebar",!1,d),S.setActive(b())},onSetup:S=>{S.setActive(b());const k=()=>S.setActive(b());return t.on("ToggleSidebar",k),()=>{t.off("ToggleSidebar",k)}}})})},oq=t=>({element:()=>t.element.dom}),sq=(t,s)=>{const d=Ze(Ps(s),g=>{const b=s[g],S=Ut(T9(b));return{name:g,getApi:oq,onSetup:S.onSetup,onShow:S.onShow,onHide:S.onHide}});return Ze(d,g=>{const b=Zn(X);return t.slot(g.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Qb.unnamedEvents([cp(g,b),vc(g,b),Nt(dC(),(S,k)=>{const R=k.event;vt(d,H=>H.name===R.name).each(H=>{(R.visible?H.onShow:H.onHide)(H.getApi(S))})})])})})},rq=t=>wl.sketch(s=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:sq(s,t),slotBehaviours:Qb.unnamedEvents([Zr(d=>wl.hideAllSlots(d))])})),I8=(t,s,d)=>{gs.getCurrent(t).each(b=>{_o.set(b,[rq(s)]);const S=d==null?void 0:d.toLowerCase();C(S)&&Qo(s,S)&&gs.getCurrent(b).each(k=>{wl.showSlot(k,S),ru.immediateGrow(b),ns(b.element,"width"),k2(t.element,"region")})})},k2=(t,s)=>{tn(t,"role",s)},iq=(t,s)=>{gs.getCurrent(t).each(g=>{gs.getCurrent(g).each(S=>{ru.hasGrown(g)?wl.isShowing(S,s)?(ru.shrink(g),k2(t.element,"presentation")):(wl.hideAllSlots(S),wl.showSlot(S,s),k2(t.element,"region")):(wl.hideAllSlots(S),wl.showSlot(S,s),ru.grow(g),k2(t.element,"region"))})})},B8=t=>gs.getCurrent(t).bind(d=>ru.isGrowing(d)||ru.hasGrown(d)?gs.getCurrent(d).bind(S=>vt(wl.getSlotNames(S),k=>wl.isShowing(S,k))):F.none()),M8=kn("FixSizeEvent"),P8=kn("AutoSizeEvent"),aq=t=>({uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Qt([zr.config({}),vo.config({}),ru.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:s=>{gs.getCurrent(s).each(wl.hideAllSlots),zo(s,P8)},onGrown:s=>{zo(s,P8)},onStartGrow:s=>{oo(s,M8,{width:vr(s.element,"width").getOr("")})},onStartShrink:s=>{oo(s,M8,{width:Fa(s.element)+"px"})}}),_o.config({}),gs.config({find:s=>{const d=_o.contents(s);return Os(d)}})])}],behaviours:Qt([Qu.childAt(0),Po("sidebar-sliding-events",[Nt(M8,(s,d)=>{Rn(s.element,"width",d.event.width)}),Nt(P8,(s,d)=>{ns(s.element,"width")})])])});var _se=Object.freeze({__proto__:null,block:(t,s,d,g)=>{tn(t.element,"aria-busy",!0);const b=s.getRoot(t).getOr(t),S=Qt([qn.config({mode:"special",onTab:()=>F.some(!0),onShiftTab:()=>F.some(!0)}),vo.config({})]),k=g(b,S),R=b.getSystem().build(k);_o.append(b,jl(R)),R.hasConfigured(qn)&&s.focus&&qn.focusIn(R),d.isBlocked()||s.onBlock(t),d.blockWith(()=>_o.remove(b,R))},unblock:(t,s,d)=>{Te(t.element,"aria-busy"),d.isBlocked()&&s.onUnblock(t),d.clear()},isBlocked:(t,s,d)=>d.isBlocked()}),D9=[bi("getRoot",F.none),Ei("focus",!0),hs("onBlock"),hs("onUnblock")],R9=Object.freeze({__proto__:null,init:()=>{const t=Rp(),s=d=>{t.set({destroy:d})};return qc({readState:t.isSet,blockWith:s,clear:t.clear,isBlocked:t.isSet})}});const Gm=sl({fields:D9,name:"blocking",apis:_se,state:R9}),lq=t=>(s,d)=>({dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:Pm('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),O9=t=>gs.getCurrent(t).each(s=>hu(s.element,!0)),cq=(t,s)=>{const d="tabindex",g=`data-mce-${d}`;F.from(t.iframeElement).map(He.fromDom).each(b=>{s?(se(b,d).each(S=>tn(b,g,S)),tn(b,d,-1)):(Te(b,d),se(b,g).each(S=>{tn(b,d,S),Te(b,g)}))})},uq=(t,s,d,g)=>{const b=s.element;if(cq(t,d),d)Gm.block(s,lq(g)),ns(b,"display"),Te(b,"aria-hidden"),t.hasFocus()&&O9(s);else{const S=gs.getCurrent(s).exists(k=>M0(k.element));Gm.unblock(s),Rn(b,"display","none"),tn(b,"aria-hidden","true"),S&&t.focus()}},N9=t=>({uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Qt([_o.config({}),Gm.config({focus:!1}),gs.config({find:s=>Os(s.components())})]),components:[]}),dq=t=>t.type==="focusin",fq=t=>dq(t)?(t.composed?Os(t.composedPath()):F.from(t.target)).map(He.fromDom).filter(mo).exists(d=>Kc(d,"mce-pastebin")):!1,mq=(t,s,d)=>{const g=Zn(!1),b=sr(),S=R=>{g.get()&&!fq(R)&&(R.preventDefault(),O9(s()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",()=>{t.dom.bind(t.getWin(),"focusin",S),t.on("BeforeExecCommand",R=>{R.command.toLowerCase()==="mcefocus"&&R.value!==!0&&S(R)})});const k=R=>{R!==g.get()&&(g.set(R),uq(t,s(),R,d.providers),DU(t,R))};t.on("ProgressState",R=>{if(b.on(clearTimeout),ce(R.time)){const I=lw.setEditorTimeout(t,()=>k(R.state),R.time);b.set(I)}else k(R.state),b.clear()})},Sse=(t,s)=>Fo(t,(b,S)=>s(S,b.len).fold(ee(b),R=>({len:R.finish,list:b.list.concat([R])})),{len:0,list:[]}).list,I9=(t,s,d)=>({within:t,extra:s,withinWidth:d}),L8=(t,s,d)=>{const g=Sse(t,(R,I)=>{const H=d(R);return F.some({element:R,start:I,finish:I+H,width:H})}),b=Nn(g,R=>R.finish<=s),S=yo(b,(R,I)=>R+I.width,0),k=g.slice(b.length);return{within:b,extra:k,withinWidth:S}},gS=t=>Ze(t,s=>s.element),hq=(t,s,d)=>{const g=gS(t.concat(s));return I9(g,[],d)},gq=(t,s,d,g)=>{const b=gS(t).concat([d]);return I9(b,gS(s),g)},Td=(t,s,d)=>I9(gS(t),[],d),pq=(t,s,d)=>{const g=L8(s,t,d);return g.extra.length===0?F.some(g):F.none()},B9=(t,s,d,g)=>{const b=pq(t,s,d).getOrThunk(()=>L8(s,t-d(g),d)),S=b.within,k=b.extra,R=b.withinWidth;return k.length===1&&k[0].width<=d(g)?hq(S,k,R):k.length>=1?gq(S,k,g,R):Td(S,k,R)},F8=(t,s)=>{const d=Ze(s,g=>jl(g));jm.setGroups(t,d)},vq=t=>ms(t,s=>dc(s.element).bind(d=>s.getSystem().getByDom(d).toOptional())),x2=(t,s,d)=>{const g=s.builtGroups.get();if(g.length===0)return;const b=hc(t,s,"primary"),S=Mi.getCoupled(t,"overflowGroup");Rn(b.element,"visibility","hidden");const k=g.concat([S]),R=vq(k);d([]),F8(b,k);const I=Fa(b.element),H=B9(I,s.builtGroups.get(),j=>Math.ceil(j.element.dom.getBoundingClientRect().width),S);H.extra.length===0?(_o.remove(b,S),d([])):(F8(b,H.within),d(H.extra)),ns(b.element,"visibility"),ka(b.element),R.each(vo.focus)},M9=ee([Ga("splitToolbarBehaviours",[Mi]),Ns("builtGroups",()=>Zn([]))]),Qx=ee([Pf(["overflowToggledClass"]),hd("getOverflowBounds"),Rt("lazySink"),Ns("overflowGroups",()=>Zn([])),hs("onOpened"),hs("onClosed")].concat(M9())),yq=ee([bl({factory:jm,schema:w2(),name:"primary"}),ju({schema:w2(),name:"overflow"}),ju({name:"overflow-button"}),ju({name:"overflow-group"})]),A2=ee((t,s)=>{pe(t,Math.floor(s))}),bq=ee([Pf(["toggledClass"]),Rt("lazySink"),Tc("fetch"),hd("getBounds"),Cr("fireDismissalEventInstead",[Qe("event",fh())]),Rh(),hs("onToggled")]),Cq=ee([ju({name:"button",overrides:t=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Qt([Go.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:t.onToggled})])})}),ju({factory:jm,schema:w2(),name:"toolbar",overrides:t=>({toolbarBehaviours:Qt([qn.config({mode:"cyclic",onEscape:s=>(Xt(s,t,"button").each(vo.focus),F.none())})])})})]),Su=sr(),_q=(t,s)=>{Su.set(!0),T2(t,s),Su.clear()},T2=(t,s)=>{const d=Mi.getCoupled(t,"toolbarSandbox");ys.isOpen(d)?ys.close(d):ys.open(d,s.toolbar())},Jx=(t,s,d,g)=>{const b=d.getBounds.map(k=>k()),S=d.lazySink(t).getOrDie();ll.positionWithinBounds(S,s,{anchor:{type:"hotspot",hotspot:t,layouts:g,overrides:{maxWidthFunction:A2()}}},b)},$8=(t,s,d,g,b)=>{jm.setGroups(s,b),Jx(t,s,d,g),Go.on(t)},wq=(t,s,d)=>{const g=zy(),b=(k,R)=>{const I=Su.get().getOr(!1);d.fetch().get(H=>{$8(t,R,d,s.layouts,H),g.link(t.element),I||qn.focusIn(R)})},S=()=>{Go.off(t),Su.get().getOr(!1)||vo.focus(t),g.unlink(t.element)};return{dom:{tag:"div",attributes:{id:g.id}},behaviours:Qt([qn.config({mode:"special",onEscape:k=>(ys.close(k),F.some(!0))}),ys.config({onOpen:b,onClose:S,isPartOf:(k,R,I)=>wh(R,I)||wh(t,I),getAttachPoint:()=>d.lazySink(t).getOrDie()}),Nc.config({channels:{...Nm({isExtraPart:fn,...d.fireDismissalEventInstead.map(k=>({fireEventInstead:{event:k.event}})).getOr({})}),..._b({doReposition:()=>{ys.getState(Mi.getCoupled(t,"toolbarSandbox")).each(k=>{Jx(t,k,d,s.layouts)})}})}})])}},H1=ql({name:"FloatingToolbarButton",factory:(t,s,d,g)=>({...Fl.sketch({...g.button(),action:b=>{T2(b,g)},buttonBehaviours:Wu.augment({dump:g.button().buttonBehaviours},[Mi.config({others:{toolbarSandbox:b=>wq(b,d,t)}})])}),apis:{setGroups:(b,S)=>{ys.getState(Mi.getCoupled(b,"toolbarSandbox")).each(k=>{$8(b,k,t,d.layouts,S)})},reposition:b=>{ys.getState(Mi.getCoupled(b,"toolbarSandbox")).each(S=>{Jx(b,S,t,d.layouts)})},toggle:b=>{T2(b,g)},toggleWithoutFocusing:b=>{_q(b,g)},getToolbar:b=>ys.getState(Mi.getCoupled(b,"toolbarSandbox")),isOpen:b=>ys.isOpen(Mi.getCoupled(b,"toolbarSandbox"))}}),configFields:bq(),partFields:Cq(),apis:{setGroups:(t,s,d)=>{t.setGroups(s,d)},reposition:(t,s)=>{t.reposition(s)},toggle:(t,s)=>{t.toggle(s)},toggleWithoutFocusing:(t,s)=>{t.toggleWithoutFocusing(s)},getToolbar:(t,s)=>t.getToolbar(s),isOpen:(t,s)=>t.isOpen(s)}}),Eq=ee([Rt("items"),Pf(["itemSelector"]),Ga("tgroupBehaviours",[qn])]),kq=ee([Nb({name:"items",unit:"item"})]),xq=(t,s,d,g)=>({uid:t.uid,dom:t.dom,components:s,behaviours:Za(t.tgroupBehaviours,[qn.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}),e6=ql({name:"ToolbarGroup",configFields:Eq(),partFields:kq(),factory:xq}),P9=t=>Ze(t,s=>jl(s)),L9=(t,s,d)=>{x2(t,d,g=>{d.overflowGroups.set(g),s.getOpt(t).each(b=>{H1.setGroups(b,P9(g))})})},F9=(t,s,d,g)=>{const b=er(H1.sketch({fetch:()=>Kl.nu(S=>{S(P9(t.overflowGroups.get()))}),layouts:{onLtr:()=>[ia,va],onRtl:()=>[va,ia],onBottomLtr:()=>[hr,ya],onBottomRtl:()=>[ya,hr]},getBounds:d.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:g["overflow-button"](),toolbar:g.overflow()},onToggled:(S,k)=>t[k?"onOpened":"onClosed"](S)}));return{uid:t.uid,dom:t.dom,components:s,behaviours:Za(t.splitToolbarBehaviours,[Mi.config({others:{overflowGroup:()=>e6.sketch({...g["overflow-group"](),items:[b.asSpec()]})}})]),apis:{setGroups:(S,k)=>{t.builtGroups.set(Ze(k,S.getSystem().build)),L9(S,b,t)},refresh:S=>L9(S,b,t),toggle:S=>{b.getOpt(S).each(k=>{H1.toggle(k)})},toggleWithoutFocusing:S=>{b.getOpt(S).each(H1.toggleWithoutFocusing)},isOpen:S=>b.getOpt(S).map(H1.isOpen).getOr(!1),reposition:S=>{b.getOpt(S).each(k=>{H1.reposition(k)})},getOverflow:S=>b.getOpt(S).bind(H1.getToolbar)},domModification:{attributes:{role:"group"}}}},V8=ql({name:"SplitFloatingToolbar",configFields:Qx(),partFields:yq(),factory:F9,apis:{setGroups:(t,s,d)=>{t.setGroups(s,d)},refresh:(t,s)=>{t.refresh(s)},reposition:(t,s)=>{t.reposition(s)},toggle:(t,s)=>{t.toggle(s)},toggleWithoutFocusing:(t,s)=>{t.toggle(s)},isOpen:(t,s)=>t.isOpen(s),getOverflow:(t,s)=>t.getOverflow(s)}}),$9=ee([Pf(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),hs("onOpened"),hs("onClosed")].concat(M9())),Aq=ee([bl({factory:jm,schema:w2(),name:"primary"}),bl({factory:jm,schema:w2(),name:"overflow",overrides:t=>({toolbarBehaviours:Qt([ru.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:s=>{Xt(s,t,"overflow-button").each(d=>{Go.off(d)}),t.onClosed(s)},onGrown:s=>{t.onOpened(s)},onStartGrow:s=>{Xt(s,t,"overflow-button").each(Go.on)}}),qn.config({mode:"acyclic",onEscape:s=>(Xt(s,t,"overflow-button").each(vo.focus),F.some(!0))})])})}),ju({name:"overflow-button",overrides:t=>({buttonBehaviours:Qt([Go.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),ju({name:"overflow-group"})]),Tq=(t,s)=>Xt(t,s,"overflow").map(ru.hasGrown).getOr(!1),t6=(t,s,d)=>{Xt(t,s,"overflow-button").each(g=>{Xt(t,s,"overflow").each(b=>{if(n6(t,s),ru.hasShrunk(b)){const S=s.onOpened;s.onOpened=k=>{d||qn.focusIn(b),S(k),s.onOpened=S}}else{const S=s.onClosed;s.onClosed=k=>{d||vo.focus(g),S(k),s.onClosed=S}}ru.toggleGrow(b)})})},n6=(t,s)=>{Xt(t,s,"overflow").each(d=>{x2(t,s,g=>{const b=Ze(g,S=>jl(S));jm.setGroups(d,b)}),Xt(t,s,"overflow-button").each(g=>{ru.hasGrown(d)&&Go.on(g)}),ru.refresh(d)})},V9=(t,s,d,g)=>{const b="alloy.toolbar.toggle",S=(k,R)=>{const I=Ze(R,k.getSystem().build);t.builtGroups.set(I)};return{uid:t.uid,dom:t.dom,components:s,behaviours:Za(t.splitToolbarBehaviours,[Mi.config({others:{overflowGroup:k=>e6.sketch({...g["overflow-group"](),items:[Fl.sketch({...g["overflow-button"](),action:R=>{zo(k,b)}})]})}}),Po("toolbar-toggle-events",[Nt(b,k=>{t6(k,t,!1)})])]),apis:{setGroups:(k,R)=>{S(k,R),n6(k,t)},refresh:k=>n6(k,t),toggle:k=>{t6(k,t,!1)},toggleWithoutFocusing:k=>{t6(k,t,!0)},isOpen:k=>Tq(k,t)},domModification:{attributes:{role:"group"}}}},H8=ql({name:"SplitSlidingToolbar",configFields:$9(),partFields:Aq(),factory:V9,apis:{setGroups:(t,s,d)=>{t.setGroups(s,d)},refresh:(t,s)=>{t.refresh(s)},toggle:(t,s)=>{t.toggle(s)},isOpen:(t,s)=>t.isOpen(s)}}),H9=t=>{const s=t.title.fold(()=>({}),d=>({attributes:{title:d}}));return{dom:{tag:"div",classes:["tox-toolbar__group"],...s},components:[e6.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:Qt([zr.config({}),vo.config({})])}},o6=t=>e6.sketch(H9(t)),z8=(t,s)=>{const d=Zr(g=>{const b=Ze(t.initGroups,o6);jm.setGroups(g,b)});return Qt([Yf.toolbarButton(t.providers.isDisabled),Da(),qn.config({mode:s,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Po("toolbar-events",[d])])},z9=t=>{const s=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":H9({title:F.none(),items:[]}),"overflow-button":qG({name:"more",icon:F.some("more-drawer"),enabled:!0,tooltip:F.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:F.none(),borderless:!1},F.none(),t.providers,[],"overflow-button")},splitToolbarBehaviours:z8(t,s)}},Dq=t=>{const s=z9(t),d=4,g=V8.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return V8.sketch({...s,lazySink:t.getSink,getOverflowBounds:()=>{const b=t.moreDrawerData.lazyHeader().element,S=Tl(b),k=Pa(b),R=Tl(k),I=Math.max(k.dom.scrollHeight,R.height);return Tr(S.x+d,R.y,S.width-d*2,I)},parts:{...s.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}},components:[g],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:b=>t.onToggled(b,!0),onClosed:b=>t.onToggled(b,!1)})},Rq=t=>{const s=H8.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),d=H8.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),g=z9(t);return H8.sketch({...g,components:[s,d],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:b=>{b.getSystem().broadcastOn([x8()],{type:"opened"}),t.onToggled(b,!0)},onClosed:b=>{b.getSystem().broadcastOn([x8()],{type:"closed"}),t.onToggled(b,!1)}})},s6=t=>{const s=t.cyclicKeying?"cyclic":"acyclic";return jm.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===qu.scrolling?["tox-toolbar--scrolling"]:[])},components:[jm.parts.groups({})],toolbarBehaviours:z8(t,s)})},U9=[B1,rf,Zi("tooltip"),mu("buttonType","secondary",["primary","secondary"]),Ei("borderless",!1),Tc("onAction")],Oq=[...U9,lp,ol("type",["button"])],Nq=[...U9,Ei("active",!1),ol("type",["togglebutton"])],W9={button:Oq,togglebutton:Nq},Iq=[ol("type",["group"]),$("buttons",[],ga("type",W9))],Bq=ga("type",{...W9,group:Iq}),j9=co([$("buttons",[],Bq),Tc("onShow"),Tc("onHide")]),Mq=t=>ei("view",j9,t),Pq=(t,s)=>{var d,g;const b=t.type==="togglebutton",S=t.icon.map(Ye=>mp(Ye,s.icons)).map(er),R=(()=>Ye=>{const It=dn=>{S.map(Ot=>Ot.getOpt(Ye).each(Hn=>{_o.set(Hn,[mp(dn,s.icons)])}))},gt=dn=>{const Ot=Ye.element;dn?(Vr(Ot,"tox-button--enabled"),tn(Ot,"aria-pressed",!0)):(mi(Ot,"tox-button--enabled"),Te(Ot,"aria-pressed"))},Jt=()=>Kc(Ye.element,"tox-button--enabled");if(b)return t.onAction({setIcon:It,setActive:gt,isActive:Jt});if(t.type==="button")return t.onAction({setIcon:It})})(),I={...t,name:b?t.text.getOr(t.icon.getOr("")):(d=t.text)!==null&&d!==void 0?d:t.icon.getOr(""),primary:t.buttonType==="primary",buttonType:F.from(t.buttonType),tooltip:t.tooltip,icon:t.icon,enabled:!0,borderless:t.borderless},H=zx((g=t.buttonType)!==null&&g!==void 0?g:"secondary"),j=b?t.text.map(s.translate):F.some(s.translate(t.text)),ne=j.map(xi),ae=I.tooltip.or(j).map(Ye=>({"aria-label":s.translate(Ye)})).getOr({}),ue=S.map(Ye=>Ye.asSpec()),he=bv([ue,ne]),ke=t.icon.isSome()&&ne.isSome(),ot={tag:"button",classes:H.concat(...t.icon.isSome()&&!ke?["tox-button--icon"]:[]).concat(...ke?["tox-button--icon-and-text"]:[]).concat(...t.borderless?["tox-button--naked"]:[]).concat(...t.type==="togglebutton"&&t.active?["tox-button--enabled"]:[]),attributes:ae},Ie=[],Je=C2(I,F.some(R),Ie,ot,he,t.tooltip,s);return Fl.sketch(Je)},r6=(t,s)=>Pq(t,s),Lq=(t,s)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:Ze(t.buttons,d=>r6(d,s))}),pS=zl().deviceType,Fq=pS.isPhone(),G9=pS.isTablet(),$q=t=>{let s=!1;const d=Ze(t.buttons,g=>g.type==="group"?(s=!0,Lq(g,t.providers)):r6(g,t.providers));return{uid:t.uid,dom:{tag:"div",classes:[s?"tox-view__toolbar":"tox-view__header",...Fq||G9?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:Qt([vo.config({}),qn.config({mode:"flow",selector:"button, .tox-button",focusInside:tp.OnEnterOrSpaceMode})]),components:s?d:[Hm.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Hm.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:d})]}},Vq=t=>({uid:t.uid,behaviours:Qt([vo.config({}),zr.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}}),Ese=(t,s,d,g)=>{const b={getPane:S=>ul.getPart(S,t,"pane"),getOnShow:S=>t.viewConfig.onShow,getOnHide:S=>t.viewConfig.onHide};return{uid:t.uid,dom:t.dom,components:s,behaviours:Qt([vo.config({}),qn.config({mode:"cyclic",focusInside:tp.OnEnterOrSpaceMode})]),apis:b}};var D2=ql({name:"silver.View",configFields:[Rt("viewConfig")],partFields:[Cu({factory:{sketch:$q},schema:[Rt("buttons"),Rt("providers")],name:"header"}),Cu({factory:{sketch:Vq},schema:[],name:"pane"})],factory:Ese,apis:{getPane:(t,s)=>t.getPane(s),getOnShow:(t,s)=>t.getOnShow(s),getOnHide:(t,s)=>t.getOnHide(s)}});const Hq=(t,s,d)=>$i(s,(g,b)=>{const S=Ut(Mq(g));return t.slot(b,D2.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:S,components:[...S.buttons.length>0?[D2.parts.header({buttons:S.buttons,providers:d})]:[],D2.parts.pane({})]}))}),U8=(t,s)=>wl.sketch(d=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:Hq(d,t,s),slotBehaviours:Qb.unnamedEvents([Zr(g=>wl.hideAllSlots(g))])})),Z9=t=>vt(wl.getSlotNames(t),s=>wl.isShowing(t,s)),i6=t=>{const s=t.element;Rn(s,"display","none"),tn(s,"aria-hidden","true")},q9=t=>{const s=t.element;ns(s,"display"),Te(s,"aria-hidden")},K9=t=>({getContainer:ee(t)}),a6=(t,s,d)=>{wl.getSlot(t,s).each(g=>{D2.getPane(g).each(b=>{d(g)(K9(b.element.dom))})})},zq=(t,s)=>a6(t,s,D2.getOnShow),Y9=(t,s)=>a6(t,s,D2.getOnHide);var yS=Ic({factory:(t,s)=>{const S={setViews:(k,R)=>{_o.set(k,[U8(R,s.backstage.shared.providers)])},whichView:k=>gs.getCurrent(k).bind(Z9),toggleView:(k,R,I,H)=>gs.getCurrent(k).exists(j=>{const ne=Z9(j),ae=ne.exists(he=>H===he),ue=wl.getSlot(j,H).isSome();return ue&&(wl.hideAllSlots(j),ae?(i6(k),R()):(I(),q9(k),wl.showSlot(j,H),zq(j,H)),ne.each(he=>Y9(j,he))),ue})};return{uid:t.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:Qt([_o.config({}),gs.config({find:k=>{const R=_o.contents(k);return Os(R)}})]),apis:S}},name:"silver.ViewWrapper",configFields:[Rt("backstage")],apis:{setViews:(t,s,d)=>t.setViews(s,d),toggleView:(t,s,d,g,b)=>t.toggleView(s,d,g,b),whichView:(t,s)=>t.whichView(s)}});const Uq=(t,s,d)=>{let g=!1;const b=k=>{uc(k,".tox-statusbar").each(R=>{or(R,"display")==="none"&&Ys(R,"aria-hidden")==="true"?(ns(R,"display"),Te(R,"aria-hidden")):(Rn(R,"display","none"),tn(R,"aria-hidden","true"))})},S={getSocket:k=>ul.getPart(k,t,"socket"),setSidebar:(k,R,I)=>{ul.getPart(k,t,"sidebar").each(H=>I8(H,R,I))},toggleSidebar:(k,R)=>{ul.getPart(k,t,"sidebar").each(I=>iq(I,R))},whichSidebar:k=>ul.getPart(k,t,"sidebar").bind(B8).getOrNull(),getHeader:k=>ul.getPart(k,t,"header"),getToolbar:k=>ul.getPart(k,t,"toolbar"),setToolbar:(k,R)=>{ul.getPart(k,t,"toolbar").each(I=>{const H=Ze(R,o6);I.getApis().setGroups(I,H)})},setToolbars:(k,R)=>{ul.getPart(k,t,"multiple-toolbar").each(I=>{const H=Ze(R,j=>Ze(j,o6));p9.setItems(I,H)})},refreshToolbar:k=>{ul.getPart(k,t,"toolbar").each(I=>I.getApis().refresh(I))},toggleToolbarDrawer:k=>{ul.getPart(k,t,"toolbar").each(R=>{_s(R.getApis().toggle,I=>I(R))})},toggleToolbarDrawerWithoutFocusing:k=>{ul.getPart(k,t,"toolbar").each(R=>{_s(R.getApis().toggleWithoutFocusing,I=>I(R))})},isToolbarDrawerToggled:k=>ul.getPart(k,t,"toolbar").bind(R=>F.from(R.getApis().isOpen).map(I=>I(R))).getOr(!1),getThrobber:k=>ul.getPart(k,t,"throbber"),focusToolbar:k=>{ul.getPart(k,t,"toolbar").orThunk(()=>ul.getPart(k,t,"multiple-toolbar")).each(I=>{qn.focusIn(I)})},setMenubar:(k,R)=>{ul.getPart(k,t,"menubar").each(I=>{R8.setMenus(I,R)})},focusMenubar:k=>{ul.getPart(k,t,"menubar").each(R=>{R8.focus(R)})},setViews:(k,R)=>{ul.getPart(k,t,"viewWrapper").each(I=>{yS.setViews(I,R)})},toggleView:(k,R)=>ul.getPart(k,t,"viewWrapper").exists(I=>yS.toggleView(I,()=>S.showMainView(k),()=>S.hideMainView(k),R)),whichView:k=>ul.getPart(k,t,"viewWrapper").bind(yS.whichView).getOrNull(),hideMainView:k=>{g=S.isToolbarDrawerToggled(k),g&&S.toggleToolbarDrawer(k),ul.getPart(k,t,"editorContainer").each(R=>{const I=R.element;b(I),Rn(I,"display","none"),tn(I,"aria-hidden","true")})},showMainView:k=>{g&&S.toggleToolbarDrawer(k),ul.getPart(k,t,"editorContainer").each(R=>{const I=R.element;b(I),ns(I,"display"),Te(I,"aria-hidden")})}};return{uid:t.uid,dom:t.dom,components:s,apis:S,behaviours:t.behaviours}},Wq=gp.optional({factory:R8,name:"menubar",schema:[Rt("backstage")]}),jq=t=>t.type===qu.sliding?Rq:t.type===qu.floating?Dq:s6,W8=gp.optional({factory:{sketch:t=>p9.sketch({uid:t.uid,dom:t.dom,listBehaviours:Qt([qn.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>s6({type:t.type,uid:kn("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:()=>(t.onEscape(),F.some(!0))}),setupItem:(s,d,g,b)=>{jm.setGroups(d,g)},shell:!0})},name:"multiple-toolbar",schema:[Rt("dom"),Rt("onEscape")]}),Gq=gp.optional({factory:{sketch:t=>{const s=jq(t),d={type:t.type,uid:t.uid,onEscape:()=>(t.onEscape(),F.some(!0)),onToggled:(g,b)=>t.onToolbarToggled(b),cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes};return s(d)}},name:"toolbar",schema:[Rt("dom"),Rt("onEscape"),Rt("getSink")]}),Zq=gp.optional({factory:{sketch:E2},name:"header",schema:[Rt("dom")]}),X9=gp.optional({factory:{sketch:eq},name:"promotion",schema:[Rt("dom")]}),Q9=gp.optional({name:"socket",schema:[Rt("dom")]}),l6=gp.optional({factory:{sketch:aq},name:"sidebar",schema:[Rt("dom")]}),j8=gp.optional({factory:{sketch:N9},name:"throbber",schema:[Rt("dom")]}),qq=gp.optional({factory:yS,name:"viewWrapper",schema:[Rt("backstage")]}),Kq=t=>({uid:t.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:t.components}),J9=gp.optional({factory:{sketch:Kq},name:"editorContainer",schema:[]});var Ur=ql({name:"OuterContainer",factory:Uq,configFields:[Rt("dom"),Rt("behaviours")],partFields:[Zq,Wq,Gq,W8,Q9,l6,X9,j8,qq,J9],apis:{getSocket:(t,s)=>t.getSocket(s),setSidebar:(t,s,d,g)=>{t.setSidebar(s,d,g)},toggleSidebar:(t,s,d)=>{t.toggleSidebar(s,d)},whichSidebar:(t,s)=>t.whichSidebar(s),getHeader:(t,s)=>t.getHeader(s),getToolbar:(t,s)=>t.getToolbar(s),setToolbar:(t,s,d)=>{t.setToolbar(s,d)},setToolbars:(t,s,d)=>{t.setToolbars(s,d)},refreshToolbar:(t,s)=>t.refreshToolbar(s),toggleToolbarDrawer:(t,s)=>{t.toggleToolbarDrawer(s)},toggleToolbarDrawerWithoutFocusing:(t,s)=>{t.toggleToolbarDrawerWithoutFocusing(s)},isToolbarDrawerToggled:(t,s)=>t.isToolbarDrawerToggled(s),getThrobber:(t,s)=>t.getThrobber(s),setMenubar:(t,s,d)=>{t.setMenubar(s,d)},focusMenubar:(t,s)=>{t.focusMenubar(s)},focusToolbar:(t,s)=>{t.focusToolbar(s)},setViews:(t,s,d)=>{t.setViews(s,d)},toggleView:(t,s,d)=>t.toggleView(s,d),whichView:(t,s)=>t.whichView(s)}});const Yq="file edit view insert format tools table help",eL={file:{title:"File",items:"newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},tL=(t,s,d)=>{const g=F4(d).split(/[ ,]/);return{text:t.title,getItems:()=>Ue(t.items,b=>{const S=b.toLowerCase();return S.trim().length===0?[]:Sn(g,k=>k===S)?[]:S==="separator"||S==="|"?[{type:"separator"}]:s.menuItems[S]?[s.menuItems[S]]:[]})}},G8=t=>t.split(" "),nL=(t,s)=>{const d={...eL,...s.menus},g=Ps(s.menus).length>0,b=s.menubar===void 0||s.menubar===!0?G8(Yq):G8(s.menubar===!1?"":s.menubar),S=Nn(b,R=>{const I=Qo(eL,R);return g?I||Yt(s.menus,R).exists(H=>Qo(H,"items")):I}),k=Ze(S,R=>{const I=d[R];return tL({title:I.title,items:G8(I.items)},s,t)});return Nn(k,R=>{const I=H=>C(H)||H.type!=="separator";return R.getItems().length>0&&Sn(R.getItems(),I)})},Z8=t=>{const s=()=>{t._skinLoaded=!0,xU(t)};return()=>{t.initialized?s():t.on("init",s)}},Xq=(t,s)=>()=>AU(t,{message:s}),oL=(t,s,d)=>(t.on("remove",()=>d.unload(s)),d.load(s)),c6=(t,s,d,g)=>(t.on("remove",()=>g.unloadRawCss(s)),g.loadRawCss(s,d)),Qq=async(t,s)=>{const g="ui/"+pk(t).getOr("default")+"/skin.css",b=tinymce.Resource.get(g);if(C(b))c6(t,g,b,t.ui.styleSheetLoader);else{const S=t.editorManager.suffix,k=s+`/skin${S}.css`;return oL(t,k,t.ui.styleSheetLoader)}},sL=async(t,s)=>{if(Ke(He.fromDom(t.getElement()))){const b="ui/"+pk(t).getOr("default")+"/skin.shadowdom.css",S=tinymce.Resource.get(b);if(C(S))c6(t,b,S,cv.DOM.styleSheetLoader);else{const k=t.editorManager.suffix,R=s+`/skin.shadowdom${k}.css`;return oL(t,R,cv.DOM.styleSheetLoader)}}},Jq=async(t,s)=>{const d=()=>{const b=G4(s),S=s.editorManager.suffix;b&&s.contentCSS.push(b+(t?"/content.inline":"/content")+`${S}.css`)};pk(s).fold(d,b=>{const S="ui/"+b+(t?"/content.inline":"/content")+".css",k=tinymce.Resource.get(S);C(k)?c6(s,S,k,s.ui.styleSheetLoader):d()});const g=G4(s);if(!j4(s)&&C(g))return Promise.all([Qq(s,g),sL(s,g)]).then()},q8=(t,s)=>Jq(t,s).then(Z8(s),Xq(s,"Skin could not be loaded")),eK=tt(q8,!1),tK=tt(q8,!0),R2=(t,s,d)=>De(d)?t.translate(s):t.translate([s,t.translate(d)]),rL=(t,s)=>{const d=(k,R,I,H)=>{const j=t.shared.providers.translate(k.title);if(k.type==="separator")return F.some({type:"separator",text:j});if(k.type==="submenu"){const ne=Ue(k.getStyleItems(),ae=>g(ae,R,H));return R===0&&ne.length<=0?F.none():F.some({type:"nestedmenuitem",text:j,enabled:ne.length>0,getSubmenuItems:()=>Ue(k.getStyleItems(),ae=>g(ae,R,H))})}else return F.some({type:"togglemenuitem",text:j,icon:k.icon,active:k.isSelected(H),enabled:!I,onAction:s.onAction(k),...k.getStylePreview().fold(()=>({}),ne=>({meta:{style:ne}}))})},g=(k,R,I)=>{const H=k.type==="formatter"&&s.isInvalid(k);return R===0?H?[]:d(k,R,!1,I).toArray():d(k,R,H,I).toArray()},b=k=>{const R=s.getCurrentValue(),I=s.shouldHide?0:1;return Ue(k,H=>g(H,I,R))};return{validateItems:b,getFetch:(k,R)=>(I,H)=>{const j=R(),ne=b(j),ae=y2(ne,Gf.CLOSE_ON_EXECUTE,k,{isHorizontalMenu:!1,search:F.none()});H(ae)}}},O2=(t,s)=>{const d=s.dataset,g=d.type==="basic"?()=>Ze(d.data,b=>XP(b,s.isSelectedFor,s.getPreviewFor)):d.getData;return{items:rL(t,s),getStyleItems:g}},bS=(t,s,d,g,b,S)=>{const{items:k,getStyleItems:R}=O2(s,d),I=Zn(d.tooltip),H=ne=>({getComponent:ee(ne),setTooltip:ae=>{const ue=s.shared.providers.translate(ae);tn(ne.element,"aria-label",ue),I.set(ae)}}),j=ne=>{const ae=ue=>ne.setTooltip(R2(t,g(ue.value),ue.value));return t.on(b,ae),t2(wv(t,"NodeChange",ue=>{const he=ue.getComponent();d.updateText(he),ho.set(ue.getComponent(),!t.selection.isEditable())})(ne),()=>t.off(b,ae))};return Ox({text:d.icon.isSome()?F.none():d.text,icon:d.icon,ariaLabel:F.some(d.tooltip),tooltip:F.none(),role:F.none(),fetch:k.getFetch(s,R),onSetup:j,getApi:H,columns:1,presets:"normal",classes:d.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[Cl.config({...s.shared.providers.tooltips.getConfig({tooltipText:s.shared.providers.translate(d.tooltip),onShow:ne=>{if(d.tooltip!==I.get()){const ae=s.shared.providers.translate(I.get());Cl.setComponents(ne,s.shared.providers.tooltips.getComponents({tooltipText:ae}))}}})})]},"tox-tbtn",s.shared,S)},nK=t=>Ze(t,s=>{let d=s,g=s;const b=s.split("=");return b.length>1&&(d=b[0],g=b[1]),{title:d,format:g}}),K8=t=>({type:"basic",data:t});var z1;(function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"})(z1||(z1={}));const oK=(t,s)=>s===z1.SemiColon?t.replace(/;$/,"").split(";"):t.split(" "),Y8=(t,s,d)=>{const g=t.options.get(s);return{type:"basic",data:nK(oK(g,d))}},sK="Align",iL=ee("Alignment {0}"),aL="left",X8=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],lL=t=>{const s=()=>vt(X8,R=>t.formatter.match(R.format)),d=R=>()=>t.formatter.match(R),g=R=>F.none,b=R=>{const H=s().fold(ee(aL),j=>j.title.toLowerCase());oo(R,F1,{icon:`align-${H}`}),IU(t,{value:H})},S=K8(X8),k=R=>()=>vt(X8,I=>I.format===R.format).each(I=>t.execCommand(I.command));return{tooltip:R2(t,iL(),aL),text:F.none(),icon:F.some("align-left"),isSelectedFor:d,getCurrentValue:F.none,getPreviewFor:g,onAction:k,updateText:b,dataset:S,shouldHide:!1,isInvalid:R=>!t.formatter.canApply(R.format)}},rK=(t,s)=>bS(t,s,lL(t),iL,"AlignTextUpdate","align"),iK=(t,s)=>{const d=O2(s,lL(t));t.ui.registry.addNestedMenuItem("align",{text:s.shared.providers.translate(sK),onSetup:Mc(t),getSubmenuItems:()=>d.items.validateItems(d.getStyleItems())})},Q8=(t,s)=>{const d=s(),g=Ze(d,b=>b.format);return F.from(t.formatter.closest(g)).bind(b=>vt(d,S=>S.format===b))},u6="Blocks",d6=ee("Block {0}"),f6="Paragraph",pp=t=>{const s=S=>()=>t.formatter.match(S),d=S=>()=>{const k=t.formatter.get(S);return k?F.some({tag:k.length>0&&(k[0].inline||k[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(S))}):F.none()},g=S=>{const R=Q8(t,()=>b.data).fold(ee(f6),I=>I.title);oo(S,mf,{text:R}),tB(t,{value:R})},b=Y8(t,"block_formats",z1.SemiColon);return{tooltip:R2(t,d6(),f6),text:F.some(f6),icon:F.none(),isSelectedFor:s,getCurrentValue:F.none,getPreviewFor:d,onAction:nB(t),updateText:g,dataset:b,shouldHide:!1,isInvalid:S=>!t.formatter.canApply(S.format)}},cL=(t,s)=>bS(t,s,pp(t),d6,"BlocksTextUpdate","blocks"),aK=(t,s)=>{const d=O2(s,pp(t));t.ui.registry.addNestedMenuItem("blocks",{text:u6,onSetup:Mc(t),getSubmenuItems:()=>d.items.validateItems(d.getStyleItems())})},lK="Fonts",uL=ee("Font {0}"),J8="System Font",cK=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],dL=t=>{const s=t.split(/\s*,\s*/);return Ze(s,d=>d.replace(/^['"]+|['"]+$/g,""))},fL=(t,s)=>s.length>0&&In(s,d=>t.indexOf(d.toLowerCase())>-1),mL=(t,s)=>{if(t.indexOf("-apple-system")===0||s.length>0){const d=dL(t.toLowerCase());return fL(d,cK)||fL(d,s)}else return!1},hL=t=>{const s=()=>{const I=he=>he?dL(he)[0]:"",H=t.queryCommandValue("FontName"),j=R.data,ne=H?H.toLowerCase():"",ae=LN(t);return{matchOpt:vt(j,he=>{const ke=he.format;return ke.toLowerCase()===ne||I(ke).toLowerCase()===I(ne).toLowerCase()}).orThunk(()=>Wn(mL(ne,ae),{title:J8,format:ne})),font:H}},d=I=>H=>H.exists(j=>j.format===I),g=()=>{const{matchOpt:I}=s();return I},b=I=>()=>F.some({tag:"div",styles:I.indexOf("dings")===-1?{"font-family":I}:{}}),S=I=>()=>{t.undoManager.transact(()=>{t.focus(),t.execCommand("FontName",!1,I.format)})},k=I=>{const{matchOpt:H,font:j}=s(),ne=H.fold(ee(j),ae=>ae.title);oo(I,mf,{text:ne}),BU(t,{value:ne})},R=Y8(t,"font_family_formats",z1.SemiColon);return{tooltip:R2(t,uL(),J8),text:F.some(J8),icon:F.none(),isSelectedFor:d,getCurrentValue:g,getPreviewFor:b,onAction:S,updateText:k,dataset:R,shouldHide:!1,isInvalid:fn}},uK=(t,s)=>bS(t,s,hL(t),uL,"FontFamilyTextUpdate","fontfamily"),eR=(t,s)=>{const d=O2(s,hL(t));t.ui.registry.addNestedMenuItem("fontfamily",{text:s.shared.providers.translate(lK),onSetup:Mc(t),getSubmenuItems:()=>d.items.validateItems(d.getStyleItems())})},dK={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},fK=(()=>{const t="[0-9]+",d="[eE]"+("[+-]?"+t),g="\\.",b=R=>`(?:${R})?`,k=`[+-]?(?:${["Infinity",t+g+b(t)+b(d),g+t+b(d),t+b(d)].join("|")})`;return new RegExp(`^(${k})(.*)$`)})(),mK=(t,s)=>Sn(s,d=>Sn(dK[d],g=>t===g)),m6=(t,s)=>F.from(fK.exec(t)).bind(g=>{const b=Number(g[1]),S=g[2];return mK(S,s)?F.some({value:b,unit:S}):F.none()}),hK=(t,s)=>m6(t,s).map(({value:d,unit:g})=>d+g),gL={tab:ee(9),escape:ee(27),enter:ee(13),backspace:ee(8),delete:ee(46),left:ee(37),up:ee(38),right:ee(39),down:ee(40),space:ee(32),home:ee(36),end:ee(35),pageUp:ee(33),pageDown:ee(34)},pL=(t,s,d,g)=>{let b=F.none();const S=Ye=>Ye.map(It=>xn.getValue(It)).getOr(""),k=wv(t,"NodeChange SwitchMode",Ye=>{const It=Ye.getComponent();b=F.some(It),d.updateInputValue(It),ho.set(It,!t.selection.isEditable())}),R=Ye=>({getComponent:ee(Ye)}),I=Zn(X),H=kn("custom-number-input-events"),j=(Ye,It,gt)=>{const Jt=S(b),dn=d.getNewValue(Jt,Ye),Ot=Jt.length-`${dn}`.length,Hn=b.map(lo=>lo.element.dom.selectionStart-Ot),Tn=b.map(lo=>lo.element.dom.selectionEnd-Ot);d.onAction(dn,gt),b.each(lo=>{xn.setValue(lo,dn),It&&(Hn.each(to=>lo.element.dom.selectionStart=to),Tn.each(to=>lo.element.dom.selectionEnd=to))})},ne=(Ye,It)=>j((gt,Jt)=>gt-Jt,Ye,It),ae=(Ye,It)=>j((gt,Jt)=>gt+Jt,Ye,It),ue=Ye=>Xa(Ye.element).fold(F.none,It=>(hu(It),F.some(!0))),he=Ye=>M0(Ye.element)?(Jl(Ye.element).each(It=>hu(It)),F.some(!0)):F.none(),ke=(Ye,It,gt,Jt)=>{const dn=Zn(X),Ot=s.shared.providers.translate(gt),Hn=kn("altExecuting"),Tn=wv(t,"NodeChange SwitchMode",to=>{ho.set(to.getComponent(),!t.selection.isEditable())}),lo=to=>{ho.isDisabled(to)||Ye(!0)};return Fl.sketch({dom:{tag:"button",attributes:{"aria-label":Ot,"data-mce-name":It},classes:Jt.concat(It)},components:[YD(It,s.shared.providers.icons)],buttonBehaviours:Qt([ho.config({}),Cl.config(s.shared.providers.tooltips.getConfig({tooltipText:Ot})),Po(Hn,[cp({onSetup:Tn,getApi:R},dn),vc({getApi:R},dn),Nt(yd(),(to,Bs)=>{(Bs.event.raw.keyCode===gL.space()||Bs.event.raw.keyCode===gL.enter())&&(ho.isDisabled(to)||Ye(!1))}),Nt(wg(),lo),Nt(ra(),lo)])]),eventOrder:{[yd()]:[Hn,"keying"],[wg()]:[Hn,"alloy.base.behaviour"],[ra()]:[Hn,"alloy.base.behaviour"],[ac()]:["alloy.base.behaviour",Hn,"tooltipping"],[Vu()]:[Hn,"tooltipping"]}})},ot=er(ke(Ye=>ne(!1,Ye),"minus","Decrease font size",[])),Ie=er(ke(Ye=>ae(!1,Ye),"plus","Increase font size",[])),Je=er({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[gv.sketch({inputBehaviours:Qt([ho.config({}),Po(H,[cp({onSetup:k,getApi:R},I),vc({getApi:R},I)]),Po("input-update-display-text",[Nt(mf,(Ye,It)=>{xn.setValue(Ye,It.event.text)}),Nt(Rf(),Ye=>{d.onAction(xn.getValue(Ye))}),Nt(Hp(),Ye=>{d.onAction(xn.getValue(Ye))})]),qn.config({mode:"special",onEnter:Ye=>(j(xe,!0,!0),F.some(!0)),onEscape:ue,onUp:Ye=>(ae(!0,!1),F.some(!0)),onDown:Ye=>(ne(!0,!1),F.some(!0)),onLeft:(Ye,It)=>(It.cut(),F.none()),onRight:(Ye,It)=>(It.cut(),F.none())})])})],behaviours:Qt([vo.config({}),qn.config({mode:"special",onEnter:he,onSpace:he,onEscape:ue}),Po("input-wrapper-events",[Nt(Df(),Ye=>{ct([ot,Ie],It=>{const gt=He.fromDom(It.get(Ye).element.dom);M0(gt)&&B0(gt)})})])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...K(g)?{"data-mce-name":g}:{}}},components:[ot.asSpec(),Je.asSpec(),Ie.asSpec()],behaviours:Qt([vo.config({}),qn.config({mode:"flow",focusInside:tp.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:Ye=>M0(Ye.element)?F.none():(hu(Ye.element),F.some(!0))})])}},vL="Font sizes",tR=ee("Font size {0}"),yL="12pt",bL={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},gK={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},pK=(t,s)=>{const d=Math.pow(10,s);return Math.round(t*d)/d},vK=(t,s)=>/[0-9.]+px$/.test(t)?pK(parseInt(t,10)*72/96,s||0)+"pt":Yt(gK,t).getOr(t),CL=t=>Yt(bL,t).getOr(""),_L=t=>{const s=()=>{let I=F.none();const H=R.data,j=t.queryCommandValue("FontSize");if(j)for(let ne=3;I.isNone()&&ne>=0;ne--){const ae=vK(j,ne),ue=CL(ae);I=vt(H,he=>he.format===j||he.format===ae||he.format===ue)}return{matchOpt:I,size:j}},d=I=>H=>H.exists(j=>j.format===I),g=()=>{const{matchOpt:I}=s();return I},b=ee(F.none),S=I=>()=>{t.undoManager.transact(()=>{t.focus(),t.execCommand("FontSize",!1,I.format)})},k=I=>{const{matchOpt:H,size:j}=s(),ne=H.fold(ee(j),ae=>ae.title);oo(I,mf,{text:ne}),K5(t,{value:ne})},R=Y8(t,"font_size_formats",z1.Space);return{tooltip:R2(t,tR(),yL),text:F.some(yL),icon:F.none(),isSelectedFor:d,getPreviewFor:b,getCurrentValue:g,onAction:S,updateText:k,dataset:R,shouldHide:!1,isInvalid:fn}},wL=(t,s)=>bS(t,s,_L(t),tR,"FontSizeTextUpdate","fontsize"),yK=t=>{var s;const d={step:1};return(s={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[t])!==null&&s!==void 0?s:d},bK=16,CK=t=>t>=0,_K=t=>{const s=()=>t.queryCommandValue("FontSize");return{updateInputValue:g=>oo(g,mf,{text:s()}),onAction:(g,b)=>t.execCommand("FontSize",!1,g,{skip_focus:!b}),getNewValue:(g,b)=>{m6(g,["unsupportedLength","empty"]);const S=s(),k=m6(g,["unsupportedLength","empty"]).or(m6(S,["unsupportedLength","empty"])),R=k.map(ae=>ae.value).getOr(bK),I=H4(t),H=k.map(ae=>ae.unit).filter(ae=>ae!=="").getOr(I),j=b(R,yK(H).step),ne=`${CK(j)?j:R}${H}`;return ne!==S&&eB(t,{value:ne}),ne}}},wK=(t,s)=>pL(t,s,_K(t),"fontsizeinput"),SK=(t,s)=>{const d=O2(s,_L(t));t.ui.registry.addNestedMenuItem("fontsize",{text:vL,onSetup:Mc(t),getSubmenuItems:()=>d.items.validateItems(d.getStyleItems())})},EK="Formats",nR=t=>De(t)?"Formats":"Format {0}",SL=(t,s)=>{const d="Formats",g=k=>()=>t.formatter.match(k),b=k=>()=>{const R=t.formatter.get(k);return R!==void 0?F.some({tag:R.length>0&&(R[0].inline||R[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(k))}):F.none()},S=k=>{const R=ne=>WP(ne)?Ue(ne.items,R):jP(ne)?[{title:ne.title,format:ne.format}]:[],I=Ue(KP(t),R),j=Q8(t,ee(I)).fold(ee({title:d,tooltipLabel:""}),ne=>({title:ne.title,tooltipLabel:ne.title}));oo(k,mf,{text:j.title}),NU(t,{value:j.tooltipLabel})};return{tooltip:R2(t,nR(""),""),text:F.some(d),icon:F.none(),isSelectedFor:g,getCurrentValue:F.none,getPreviewFor:b,onAction:nB(t),updateText:S,shouldHide:kN(t),isInvalid:k=>!t.formatter.canApply(k.format),dataset:s}},kK=(t,s)=>{const d={type:"advanced",...s.styles};return bS(t,s,SL(t,d),nR,"StylesTextUpdate","styles")},xK=(t,s)=>{const d={type:"advanced",...s.styles},g=O2(s,SL(t,d));t.ui.registry.addNestedMenuItem("styles",{text:EK,onSetup:Mc(t),getSubmenuItems:()=>g.items.validateItems(g.getStyleItems())})},AK=ee([Rt("toggleClass"),Rt("fetch"),Hu("onExecute"),Qe("getHotspot",F.some),Qe("getAnchorOverrides",ee({})),Rh(),Hu("onItemExecute"),Ds("lazySink"),Rt("dom"),hs("onOpen"),Ga("splitDropdownBehaviours",[Mi,qn,vo]),Qe("matchWidth",!1),Qe("useMinWidth",!1),Qe("eventOrder",{}),Ds("role"),Ds("listRole")].concat(lx())),TK=bl({factory:Fl,schema:[Rt("dom")],name:"arrow",defaults:()=>({buttonBehaviours:Qt([vo.revoke()])}),overrides:t=>({dom:{tag:"span",attributes:{role:"presentation"}},action:s=>{s.getSystem().getByUid(t.uid).each(hh)},buttonBehaviours:Qt([Go.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])})}),DK=bl({factory:Fl,schema:[Rt("dom")],name:"button",defaults:()=>({buttonBehaviours:Qt([vo.revoke()])}),overrides:t=>({dom:{tag:"span",attributes:{role:"presentation"}},action:s=>{s.getSystem().getByUid(t.uid).each(d=>{t.onExecute(d,s)})}})}),RK=ee([TK,DK,Cu({factory:{sketch:t=>({uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}})},schema:[Rt("text")],name:"aria-descriptor"}),ju({schema:[Mg()],name:"menu",defaults:t=>({onExecute:(s,d)=>{s.getSystem().getByUid(t.uid).each(g=>{t.onItemExecute(g,s,d)})}})}),AB()]),EL=(t,s,d,g)=>{const b=j=>{gs.getCurrent(j).each(ne=>{mn.highlightFirst(ne),qn.focusIn(ne)})},S=j=>{rD(t,xe,j,g,b,Bc.HighlightMenuAndItem).get(X)},k=j=>(S(j),F.some(!0)),R=j=>{const ne=hc(j,t,"button");return hh(ne),F.some(!0)},I={...$r([Zr((j,ne)=>{Xt(j,t,"aria-descriptor").each(ue=>{const he=kn("aria");tn(ue.element,"id",he),tn(j.element,"aria-describedby",he)})})]),...sk(F.some(S))},H={repositionMenus:j=>{Go.isOn(j)&&lD(j)}};return{uid:t.uid,dom:t.dom,components:s,apis:H,eventOrder:{...t.eventOrder,[$u()]:["disabling","toggling","alloy.base.behaviour"]},events:I,behaviours:Za(t.splitDropdownBehaviours,[Mi.config({others:{sandbox:j=>{const ne=hc(j,t,"arrow");return aD(t,j,{onOpen:()=>{Go.on(ne),Go.on(j)},onClose:()=>{Go.off(ne),Go.off(j)}})}}}),qn.config({mode:"special",onSpace:R,onEnter:R,onDown:k}),vo.config({}),Go.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},h6=ql({name:"SplitDropdown",configFields:AK(),partFields:RK(),factory:EL,apis:{repositionMenus:(t,s)=>t.repositionMenus(s)}}),kL=t=>({isEnabled:()=>!ho.isDisabled(t),setEnabled:s=>ho.set(t,!s),setText:s=>oo(t,mf,{text:s}),setIcon:s=>oo(t,F1,{icon:s})}),xL=t=>({setActive:s=>{Go.set(t,s)},isActive:()=>Go.isOn(t),isEnabled:()=>!ho.isDisabled(t),setEnabled:s=>ho.set(t,!s),setText:s=>oo(t,mf,{text:s}),setIcon:s=>oo(t,F1,{icon:s})}),AL=(t,s)=>t.map(d=>({"aria-label":s.translate(d)})).getOr({}),oR=kn("focus-button"),g6=(t,s,d,g,b,S)=>{const k=s.map(I=>er(XD(I,"tox-tbtn",b))),R=t.map(I=>er(mp(I,b.icons)));return{dom:{tag:"button",classes:["tox-tbtn"].concat(s.isSome()?["tox-tbtn--select"]:[]),attributes:{...AL(d,b),...K(S)?{"data-mce-name":S}:{}}},components:bv([R.map(I=>I.asSpec()),k.map(I=>I.asSpec())]),eventOrder:{[ic()]:["focusing","alloy.base.behaviour",Bv],[ac()]:[Bv,"toolbar-group-button-events"]},buttonBehaviours:Qt([Yf.toolbarButton(b.isDisabled),Da(),Po(Bv,[Zr((I,H)=>Rx(I)),Nt(mf,(I,H)=>{k.bind(j=>j.getOpt(I)).each(j=>{_o.set(j,[xi(b.translate(H.event.text))])})}),Nt(F1,(I,H)=>{R.bind(j=>j.getOpt(I)).each(j=>{_o.set(j,[mp(H.event.icon,b.icons)])})}),Nt(ic(),(I,H)=>{H.event.prevent(),zo(I,oR)})])].concat(g.getOr([])))}},OK=(t,s,d,g,b)=>{const S=s.shared,k=Zn(X),R={toolbarButtonBehaviours:[],getApi:kL,onSetup:t.onSetup},I=[Po("toolbar-group-button-events",[cp(R,k),vc(R,k)])];return H1.sketch({lazySink:S.getSink,fetch:()=>Kl.nu(H=>{H(Ze(d(t.items),o6))}),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:g6(t.icon,t.text,t.tooltip,F.some(I),S.providers,b),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:g}}}})},TL=(t,s,d,g)=>{var b;const S=Zn(X),k=g6(t.icon,t.text,t.tooltip,F.none(),d,g);return Fl.sketch({dom:k.dom,components:k.components,eventOrder:Dx,buttonBehaviours:{...Qt([Po("toolbar-button-events",[KD({onAction:t.onAction,getApi:s.getApi}),cp(s,S),vc(s,S)]),...t.tooltip.map(R=>Cl.config(d.tooltips.getConfig({tooltipText:d.translate(R)+t.shortcut.map(I=>` (${Kk(I)})`).getOr("")}))).toArray(),Yf.toolbarButton(()=>!t.enabled||d.isDisabled()),Da()].concat(s.toolbarButtonBehaviours)),[Bv]:(b=k.buttonBehaviours)===null||b===void 0?void 0:b[Bv]}})},NK=(t,s,d)=>Lv(t,s,[],d),Lv=(t,s,d,g)=>TL(t,{toolbarButtonBehaviours:d.length>0?[Po("toolbarButtonWith",d)]:[],getApi:kL,onSetup:t.onSetup},s,g),IK=(t,s,d)=>DL(t,s,[],d),DL=(t,s,d,g)=>TL(t,{toolbarButtonBehaviours:[_o.config({}),Go.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(d.length>0?[Po("toolbarToggleButtonWith",d)]:[]),getApi:xL,onSetup:t.onSetup},s,g),BK=(t,s,d)=>g=>Kl.nu(b=>s.fetch(b)).map(b=>F.from(s2(Dr(tD(kn("menu-value"),b,S=>{s.onItemAction(t(g),S)},s.columns,s.presets,Gf.CLOSE_ON_EXECUTE,s.select.getOr(fn),d),{movement:ix(s.columns,s.presets),menuBehaviours:Qb.unnamedEvents(s.columns!=="auto"?[]:[Zr((S,k)=>{Gk(S,4,C5(s.presets)).each(({numRows:R,numColumns:I})=>{qn.setGridSize(S,R,I)})})])})))),MK=(t,s,d)=>{const g=Zn(t.tooltip.getOr("")),b=R=>({isEnabled:()=>!ho.isDisabled(R),setEnabled:I=>ho.set(R,!I),setIconFill:(I,H)=>{Qs(R.element,`svg path[class="${I}"], rect[class="${I}"]`).each(j=>{tn(j,"fill",H)})},setActive:I=>{tn(R.element,"aria-pressed",I),Qs(R.element,"span").each(H=>{R.getSystem().getByDom(H).each(j=>Go.set(j,I))})},isActive:()=>Qs(R.element,"span").exists(I=>R.getSystem().getByDom(I).exists(Go.isOn)),setText:I=>Qs(R.element,"span").each(H=>R.getSystem().getByDom(H).each(j=>oo(j,mf,{text:I}))),setIcon:I=>Qs(R.element,"span").each(H=>R.getSystem().getByDom(H).each(j=>oo(j,F1,{icon:I}))),setTooltip:I=>{const H=s.providers.translate(I);tn(R.element,"aria-label",H),g.set(I)}}),S=Zn(X),k={getApi:b,onSetup:t.onSetup};return h6.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...AL(t.tooltip,s.providers),...K(d)?{"data-mce-name":d}:{}}},onExecute:R=>{const I=b(R);I.isEnabled()&&t.onAction(I)},onItemExecute:(R,I,H)=>{},splitDropdownBehaviours:Qt([Yf.splitButton(s.providers.isDisabled),Da(),Po("split-dropdown-events",[Zr((R,I)=>Rx(R)),Nt(oR,vo.focus),cp(k,S),vc(k,S)]),u2.config({}),...t.tooltip.map(R=>Cl.config({...s.providers.tooltips.getConfig({tooltipText:s.providers.translate(R),onShow:I=>{if(g.get()!==R){const H=s.providers.translate(g.get());Cl.setComponents(I,s.providers.tooltips.getComponents({tooltipText:H}))}}})})).toArray()]),eventOrder:{[ac()]:["alloy.base.behaviour","split-dropdown-events","tooltipping"],[Vu()]:["split-dropdown-events","tooltipping"]},toggleClass:"tox-tbtn--enabled",lazySink:s.getSink,fetch:BK(b,t,s.providers),parts:{menu:Sw(!1,t.columns,t.presets)},components:[h6.parts.button(g6(t.icon,t.text,F.none(),F.some([Go.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),s.providers)),h6.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:XN("chevron-down",s.providers.icons)},buttonBehaviours:Qt([Yf.splitButton(s.providers.isDisabled),Da(),f5()])}),h6.parts["aria-descriptor"]({text:s.providers.translate("To open the popup, press Shift+Enter")})]})},PK=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],CS=(t,s)=>(d,g,b,S)=>{const k=t(d).mapError(R=>Mu(R)).getOrDie();return s(k,g,b,S)},LK={button:CS(qf,(t,s,d,g)=>NK(t,s.shared.providers,g)),togglebutton:CS(zk,(t,s,d,g)=>IK(t,s.shared.providers,g)),menubutton:CS(Yx,(t,s,d,g)=>tS(t,"tox-tbtn",s,F.none(),!1,g)),splitbutton:CS(hS,(t,s,d,g)=>MK(t,s.shared,g)),grouptoolbarbutton:CS(D8,(t,s,d,g)=>{const b=d.ui.registry.getAll().buttons,S=R=>v6(d,{buttons:b,toolbar:R,allowToolbarGroups:!1},s,F.none()),k={[Dh]:s.shared.header.isPositionedAtTop()?Th.TopToBottom:Th.BottomToTop};switch(dv(d)){case qu.floating:return OK(t,s,S,k,g);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})},FK=(t,s,d,g)=>Yt(LK,t.type).fold(()=>(console.error("skipping button defined by",t),F.none()),b=>F.some(b(t,s,d,g))),p6={styles:kK,fontsize:wL,fontsizeinput:wK,fontfamily:uK,blocks:cL,align:rK},$K=t=>{const s=Ze(PK,d=>{const g=Nn(d.items,b=>Qo(t,b)||Qo(p6,b));return{name:d.name,items:g}});return Nn(s,d=>d.items.length>0)},VK=t=>{const s=t.split("|");return Ze(s,d=>({items:d.trim().split(" ")}))},RL=t=>q(t,s=>Qo(s,"name")&&Qo(s,"items")),OL=t=>{const s=t.toolbar,d=t.buttons;return s===!1?[]:s===void 0||s===!0?$K(d):C(s)?VK(s):RL(s)?s:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},HK=(t,s,d,g,b,S)=>Yt(s,d.toLowerCase()).orThunk(()=>S.bind(k=>ms(k,R=>Yt(s,R+d.toLowerCase())))).fold(()=>Yt(p6,d.toLowerCase()).map(k=>k(t,b)),k=>k.type==="grouptoolbarbutton"&&!g?(console.warn(`Ignoring the '${d}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),F.none()):FK(k,b,t,d.toLowerCase())),v6=(t,s,d,g)=>{const b=OL(s),S=Ze(b,k=>{const R=Ue(k.items,I=>I.trim().length===0?[]:HK(t,s.buttons,I,s.allowToolbarGroups,d,g).toArray());return{title:F.from(t.translate(k.name)),items:R}});return Nn(S,k=>k.items.length>0)},NL=(t,s,d,g)=>{const b=s.mainUi.outerContainer,S=d.toolbar,k=d.buttons;if(q(S,C)){const R=S.map(I=>{const H={toolbar:I,buttons:k,allowToolbarGroups:d.allowToolbarGroups};return v6(t,H,g,F.none())});Ur.setToolbars(b,R)}else Ur.setToolbar(b,v6(t,d,g,F.none()))},IL=zl(),zK=IL.os.isiOS()&&IL.os.version.major<=12,UK=(t,s)=>{const{uiMotherships:d}=s,g=t.dom;let b=t.getWin();const S=t.getDoc().documentElement,k=Zn(Lr(b.innerWidth,b.innerHeight)),R=Zn(Lr(S.offsetWidth,S.offsetHeight)),I=()=>{const ae=k.get();(ae.left!==b.innerWidth||ae.top!==b.innerHeight)&&(k.set(Lr(b.innerWidth,b.innerHeight)),e2(t))},H=()=>{const ae=t.getDoc().documentElement,ue=R.get();(ue.left!==ae.offsetWidth||ue.top!==ae.offsetHeight)&&(R.set(Lr(ae.offsetWidth,ae.offsetHeight)),e2(t))},j=ae=>{QI(t,ae)};g.bind(b,"resize",I),g.bind(b,"scroll",j);const ne=i_(He.fromDom(t.getBody()),"load",H);t.on("hide",()=>{ct(d,ae=>{Rn(ae.element,"display","none")})}),t.on("show",()=>{ct(d,ae=>{ns(ae.element,"display")})}),t.on("NodeChange",H),t.on("remove",()=>{ne.unbind(),g.unbind(b,"resize",I),g.unbind(b,"scroll",j),b=null})},BL=(t,s,d)=>{D1(t)&&Vf(d.mainUi.mothership.element,d.popupUi.mothership),kE(s,d.dialogUi.mothership)};var WK=Object.freeze({__proto__:null,render:(t,s,d,g,b)=>{const{mainUi:S,uiMotherships:k}=s,R=Zn(0),I=S.outerContainer;eK(t);const H=He.fromDom(b.targetNode),j=Re(de(H));Vf(H,S.mothership),BL(t,j,s),t.on("SkinLoaded",()=>{Ur.setSidebar(I,d.sidebar,MN(t)),NL(t,s,d,g),R.set(t.getWin().innerWidth),Ur.setMenubar(I,nL(t,d)),Ur.setViews(I,d.views),UK(t,s)});const ne=Ur.getSocket(I).getOrDie("Could not find expected socket element");if(zK){kr(ne.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const ke=Kj(()=>{t.dispatch("ScrollContent")},20),ot=fc(ne.element,"scroll",ke.throttle);t.on("remove",ot.unbind)}Zk(t,s),t.addCommand("ToggleSidebar",(ke,ot)=>{Ur.toggleSidebar(I,ot),t.dispatch("ToggleSidebar")}),t.addQueryValueHandler("ToggleSidebar",()=>{var ke;return(ke=Ur.whichSidebar(I))!==null&&ke!==void 0?ke:""}),t.addCommand("ToggleView",(ke,ot)=>{if(Ur.toggleView(I,ot)){const Ie=I.element;S.mothership.broadcastOn([Hf()],{target:Ie}),ct(k,Je=>{Je.broadcastOn([Hf()],{target:Ie})}),V(Ur.whichView(I))&&(t.focus(),t.nodeChanged(),Ur.refreshToolbar(I))}}),t.addQueryValueHandler("ToggleView",()=>{var ke;return(ke=Ur.whichView(I))!==null&&ke!==void 0?ke:""});const ae=dv(t),ue=()=>{Ur.refreshToolbar(s.mainUi.outerContainer)};(ae===qu.sliding||ae===qu.floating)&&t.on("ResizeWindow ResizeEditor ResizeContent",()=>{const ke=t.getWin().innerWidth;ke!==R.get()&&(ue(),R.set(ke))});const he={setEnabled:ke=>{Nw(s,!ke)},isEnabled:()=>!ho.isDisabled(I)};return{iframeContainer:ne.element.dom,editorContainer:I.element.dom,api:he}}});const ML=t=>/^[0-9\.]+(|px)$/i.test(""+t)?F.some(parseInt(""+t,10)):F.none(),sR=t=>ce(t)?t+"px":t,Fv=(t,s,d)=>{const g=s.filter(S=>t<S),b=d.filter(S=>t>S);return g.or(b).getOr(t)},jK=t=>{const s=P4(t),d=lk(t),g=L4(t);return ML(s).map(b=>Fv(b,d,g))},y6=t=>jK(t).getOr(P4(t)),_S=t=>{const s=uv(t),d=Gb(t),g=uw(t);return ML(s).map(b=>Fv(b,d,g))},PL=t=>_S(t).getOr(uv(t)),{ToolbarLocation:rR,ToolbarMode:LL}=pz,GK=40,ZK=(t,s,d,g,b)=>{const{mainUi:S,uiMotherships:k}=d,R=cv.DOM,I=Zb(t),H=qb(t),j=uw(t).or(_S(t)),ne=g.shared.header,ae=ne.isPositionedAtTop,ue=150,he=dv(t),ke=he===LL.sliding||he===LL.floating,ot=Zn(!1),Ie=()=>ot.get()&&!t.removed,Je=es=>ke?es.fold(ee(0),rn=>rn.components().length>1?Nr(rn.components()[1].element):0):0,Ye=es=>{switch($4(t)){case rR.auto:const rn=Ur.getToolbar(S.outerContainer),Mn=Je(rn),No=Nr(es.element)-Mn,fo=Jr(s);if(fo.y>No)return"top";{const To=Pa(s),wr=Math.max(To.dom.scrollHeight,Nr(To));return fo.bottom<wr-No||Ni().bottom<fo.bottom-No?"bottom":"top"}case rR.bottom:return"bottom";case rR.top:default:return"top"}},It=es=>{b.on(rn=>{ai.setModes(rn,[es]),ne.setDockingMode(es);const Mn=ae()?Th.TopToBottom:Th.BottomToTop;tn(rn.element,Dh,Mn)})},gt=()=>{b.on(es=>{const rn=j.getOrThunk(()=>mm().width-xa(s).left-10);Rn(es.element,"max-width",rn+"px")})},Jt=(es,rn)=>{b.on(Mn=>{const No=Ur.getToolbar(S.outerContainer),fo=Je(No),so=Jr(s),To=dn(t,S.outerContainer.element),wr=()=>To.fold(()=>so.x,Xl=>{const Id=Jr(Xl);return ws(Xl,Io())?so.x:so.x-Id.x}),zs=()=>To.fold(()=>ae()?Math.max(so.y-Nr(Mn.element)+fo,0):so.bottom,Xl=>{var Id;const vf=Jr(Xl),Au=(Id=Xl.dom.scrollTop)!==null&&Id!==void 0?Id:0,Gv=ws(Xl,Io())?Math.max(so.y-Nr(Mn.element)+fo,0):so.y-vf.y+Au-Nr(Mn.element)+fo;return ae()?Gv:so.bottom}),Cc=wr(),Nd=Wn(es,Math.ceil(S.outerContainer.element.dom.getBoundingClientRect().width)).filter(Xl=>Xl>ue).map(Xl=>{const Id=rn.getOr(Aa()),vf=window.innerWidth-(Cc-Id.left),Au=Math.max(Math.min(Xl,vf),ue);return vf<Xl&&Rn(S.outerContainer.element,"width",Au+"px"),{width:Au+"px"}}).getOr({width:"max-content"}),Zm={position:"absolute",left:Math.round(Cc)+"px",top:zs()+"px"};kr(S.outerContainer.element,{...Zm,...Nd})})},dn=(es,rn)=>D1(es)?vh(rn):F.none(),Ot=()=>{ct(k,es=>{es.broadcastOn([Xg()],{})})},Hn=()=>!I&&(Ji(S.outerContainer.element).left+ha(S.outerContainer.element)>=window.innerWidth-GK||vr(S.outerContainer.element,"width").isSome())?(Rn(S.outerContainer.element,"position","absolute"),Rn(S.outerContainer.element,"left","0px"),ns(S.outerContainer.element,"width"),!0):!1,Tn=es=>{if(!Ie())return;I||gt();const rn=Aa(),Mn=I?!1:Hn();if(ke&&Ur.refreshToolbar(S.outerContainer),!I){const No=Aa(),fo=Wn(rn.left!==No.left,rn);Jt(Mn,fo),fo.each(so=>{Ym(so.left,No.top)})}H&&b.on(es),Ot()},lo=()=>I||!H||!Ie()?!1:b.get().exists(es=>{const rn=ne.getDockingMode(),Mn=Ye(es);return Mn!==rn?(It(Mn),!0):!1});return{isVisible:Ie,isPositionedAtTop:ae,show:()=>{ot.set(!0),Rn(S.outerContainer.element,"display","flex"),R.addClass(t.getBody(),"mce-edit-focus"),ct(k,es=>{ns(es.element,"display")}),lo(),D1(t)?Tn(es=>ai.isDocked(es)?ai.reset(es):ai.refresh(es)):Tn(ai.refresh)},hide:()=>{ot.set(!1),Rn(S.outerContainer.element,"display","none"),R.removeClass(t.getBody(),"mce-edit-focus"),ct(k,es=>{Rn(es.element,"display","none")})},update:Tn,updateMode:()=>{lo()&&Tn(ai.reset)},repositionPopups:Ot}},FL=(t,s)=>{const d=Jr(t);return{pos:s?d.y:d.bottom,bounds:d}},b6=(t,s,d,g)=>{const b=Zn(FL(s,d.isPositionedAtTop())),S=H=>{const{pos:j,bounds:ne}=FL(s,d.isPositionedAtTop()),{pos:ae,bounds:ue}=b.get(),he=ne.height!==ue.height||ne.width!==ue.width;b.set({pos:j,bounds:ne}),he&&e2(t,H),d.isVisible()&&(ae!==j?d.update(ai.reset):he&&(d.updateMode(),d.repositionPopups()))};g||(t.on("activate",d.show),t.on("deactivate",d.hide)),t.on("SkinLoaded ResizeWindow",()=>d.update(ai.reset)),t.on("NodeChange keydown",H=>{requestAnimationFrame(()=>S(H))});let k=0;const R=UD(()=>d.update(ai.refresh),33);t.on("ScrollWindow",()=>{const H=Aa().left;H!==k&&(k=H,R.throttle()),d.updateMode()}),D1(t)&&t.on("ElementScroll",H=>{d.update(ai.refresh)});const I=ji();I.set(i_(He.fromDom(t.getBody()),"load",H=>S(H.raw))),t.on("remove",()=>{I.clear()})};var $L=Object.freeze({__proto__:null,render:(t,s,d,g,b)=>{const{mainUi:S}=s,k=sr(),R=He.fromDom(b.targetNode),I=ZK(t,R,s,g,k),H=AN(t);tK(t);const j=()=>{if(k.isSet()){I.show();return}k.set(Ur.getHeader(S.outerContainer).getOrDie());const ae=fw(t);D1(t)?(Vf(R,S.mothership),Vf(R,s.popupUi.mothership)):kE(ae,S.mothership),kE(ae,s.dialogUi.mothership);const ue=()=>{NL(t,s,d,g),Ur.setMenubar(S.outerContainer,nL(t,d)),I.show(),b6(t,R,I,H),t.nodeChanged()};H?t.once("SkinLoaded",ue):ue()};t.on("show",j),t.on("hide",I.hide),H||(t.on("focus",j),t.on("blur",I.hide)),t.on("init",()=>{(t.hasFocus()||H)&&j()}),Zk(t,s);const ne={show:j,hide:I.hide,setEnabled:ae=>{Nw(s,!ae)},isEnabled:()=>!ho.isDisabled(S.outerContainer)};return{editorContainer:S.outerContainer.element.dom,api:ne}}});const VL=()=>{const t=sr(),s=sr(),d=sr();return{dialogUi:t,popupUi:s,mainUi:d,getUiMotherships:()=>{const S=t.get().map(R=>R.mothership),k=s.get().map(R=>R.mothership);return S.fold(()=>k.toArray(),R=>k.fold(()=>[R],I=>ws(R.element,I.element)?[R]:[R,I]))},lazyGetInOuterOrDie:(S,k)=>()=>d.get().bind(R=>k(R.outerContainer)).getOrDie(`Could not find ${S} element in OuterContainer`)}},HL="contexttoolbar-show",zL="contexttoolbar-hide",UL=t=>({hide:()=>zo(t,h0()),getValue:()=>xn.getValue(t)}),WL=(t,s)=>Nt(qM,(d,g)=>{const b=t.get(d),S=UL(b);s.onAction(S,g.event.buttonApi)}),KK=(t,s,d)=>{const{primary:g,...b}=s.original,S=Ut(qf({...b,type:"button",onAction:X}));return Lv(S,d,[WL(t,s)])},YK=(t,s,d)=>{const{primary:g,...b}=s.original,S=Ut(zk({...b,type:"togglebutton",onAction:X}));return DL(S,d,[WL(t,s)])},XK=t=>t.type==="contextformtogglebutton",QK=(t,s,d)=>XK(s)?YK(t,s,d):KK(t,s,d),wS=(t,s,d)=>{const g=Ze(s,k=>er(QK(t,k,d)));return{asSpecs:()=>Ze(g,k=>k.asSpec()),findPrimary:k=>ms(s,(R,I)=>R.primary?F.from(g[I]).bind(H=>H.getOpt(k)).filter(je(ho.isDisabled)):F.none())}},jL=(t,s)=>{const d=t.label.fold(()=>({}),S=>({"aria-label":S})),g=er(gv.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:d,selectOnFocus:!0,inputBehaviours:Qt([qn.config({mode:"special",onEnter:S=>b.findPrimary(S).map(k=>(hh(k),!0)),onLeft:(S,k)=>(k.cut(),F.none()),onRight:(S,k)=>(k.cut(),F.none())})])})),b=wS(g,t.commands,s);return[{title:F.none(),items:[g.asSpec()]},{title:F.none(),items:b.asSpecs()}]},JK={renderContextForm:(t,s,d)=>s6({type:t,uid:kn("context-toolbar"),initGroups:jL(s,d),onEscape:F.none,cyclicKeying:!0,providers:d}),buildInitGroups:jL},iR=(t,s,d)=>s.bottom-t.y>=d&&t.bottom-s.y>=d,eY=t=>{const s=t.getBoundingClientRect();if(s.height<=0&&s.width<=0){const d=sd(He.fromDom(t.startContainer),t.startOffset).element;return($o(d)?Qi(d):F.some(d)).filter(mo).map(b=>b.dom.getBoundingClientRect()).getOr(s)}else return s},C6=t=>{const s=t.selection.getRng(),d=eY(s);if(t.inline){const g=Aa();return Tr(g.left+d.left,g.top+d.top,d.width,d.height)}else{const g=Tl(He.fromDom(t.getBody()));return Tr(g.x+d.left,g.y+d.top,d.width,d.height)}},tY=(t,s)=>s.filter(d=>ts(d)&&Ma(d)).map(Tl).getOrThunk(()=>C6(t)),nY=(t,s,d)=>{const g=Math.max(t.x+d,s.x),b=Math.min(t.right-d,s.right);return{x:g,width:b-g}},oY=(t,s,d,g,b,S)=>{const k=He.fromDom(t.getContainer()),R=Qs(k,".tox-editor-header").getOr(k),I=Jr(R),H=I.y>=s.bottom,j=g&&!H;if(t.inline&&j)return{y:Math.max(I.bottom+S,d.y),bottom:d.bottom};if(t.inline&&!j)return{y:d.y,bottom:Math.min(I.y-S,d.bottom)};const ne=b==="line"?Jr(k):s;return j?{y:Math.max(I.bottom+S,d.y),bottom:Math.min(ne.bottom-S,d.bottom)}:{y:Math.max(ne.y+S,d.y),bottom:Math.min(I.y-S,d.bottom)}},GL=(t,s,d,g=0)=>{const b=mm(window),S=Jr(He.fromDom(t.getContentAreaContainer())),k=gk(t)||vk(t)||fv(t),{x:R,width:I}=nY(S,b,g);if(t.inline&&!k)return Tr(R,b.y,I,b.height);{const H=s.header.isPositionedAtTop(),{y:j,bottom:ne}=oY(t,S,b,H,d,g);return Tr(R,j,I,ne-j)}},_6=12,N2={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},aR={maxHeightFunction:a1(),maxWidthFunction:A2()},sY=(t,s)=>{const d=t.selection.getRng(),g=sd(He.fromDom(d.startContainer),d.startOffset);return d.startContainer===d.endContainer&&d.startOffset===d.endOffset-1&&ws(g.element,s)},rY=(t,s,d)=>{const g=vr(t,"position");Rn(t,"position",s);const b=d(t);return g.each(S=>Rn(t,"position",S)),b},lR=t=>t==="node",cR=(t,s,d,g,b)=>{const S=C6(t),k=g.lastElement().exists(R=>ws(d,R));if(sY(t,d))return k?lS:tm;if(k)return rY(s,g.getMode(),()=>iR(S,Jr(s),-20)&&!g.isReposition()?$P:lS);{const R=g.getMode()==="fixed"?b.y+Aa().top:b.y,I=Nr(s)+_6;return R+I<=S.y?tm:aS}},ZL=(t,s,d,g)=>{const b=I=>(H,j,ne,ae,ue)=>{const he=cR(t,ae,I,d,ue),ke={...H,y:ue.y,height:ue.height};return{...he(ke,j,ne,ae,ue),alwaysFit:!0}},S=I=>lR(g)?[b(I)]:[];return s?{onLtr:I=>[aa,va,ia,ya,hr,Ta].concat(S(I)),onRtl:I=>[aa,ia,va,hr,ya,Ta].concat(S(I))}:{onLtr:I=>[Ta,aa,ya,va,hr,ia].concat(S(I)),onRtl:I=>[Ta,aa,hr,ia,ya,va].concat(S(I))}},qL=(t,s,d,g)=>s==="line"?{bubble:_d(_6,0,N2),layouts:{onLtr:()=>[QC],onRtl:()=>[jy]},overrides:aR}:{bubble:_d(0,_6,N2,1/_6),layouts:ZL(t,d,g,s),overrides:aR},uR=(t,s)=>{const d=Nn(s,S=>S.predicate(t.dom)),{pass:g,fail:b}=po(d,S=>S.type==="contexttoolbar");return{contextToolbars:g,contextForms:b}},I2=t=>{if(t.length<=1)return t;{const s=S=>Sn(t,k=>k.position===S),d=S=>Nn(t,k=>k.position===S),g=s("selection"),b=s("node");if(g||b)if(b&&g){const S=d("node"),k=Ze(d("selection"),R=>({...R,position:"node"}));return S.concat(k)}else return d(g?"selection":"node");else return d("line")}},w6=t=>{if(t.length<=1)return t;{const s=g=>vt(t,b=>b.position===g);return s("selection").orThunk(()=>s("node")).orThunk(()=>s("line")).map(g=>g.position).fold(()=>[],g=>Nn(t,b=>b.position===g))}},S6=(t,s,d)=>{const g=uR(t,s);if(g.contextForms.length>0)return F.some({elem:t,toolbars:[g.contextForms[0]]});{const b=uR(t,d);if(b.contextForms.length>0)return F.some({elem:t,toolbars:[b.contextForms[0]]});if(g.contextToolbars.length>0||b.contextToolbars.length>0){const S=I2(g.contextToolbars.concat(b.contextToolbars));return F.some({elem:t,toolbars:S})}else return F.none()}},dR=(t,s,d)=>t(s)?F.none():pd(s,g=>{if(mo(g)){const{contextToolbars:b,contextForms:S}=uR(g,d.inNodeScope),k=S.length>0?S:w6(b);return k.length>0?F.some({elem:g,toolbars:k}):F.none()}else return F.none()},t),fR=(t,s)=>{const d=He.fromDom(s.getBody()),g=k=>ws(k,d),b=k=>!g(k)&&!wi(d,k),S=He.fromDom(s.selection.getNode());return b(S)?F.none():S6(S,t.inNodeScope,t.inEditorScope).orThunk(()=>dR(g,S,t))},KL=(t,s)=>{const d={},g=[],b=[],S={},k={},R=(j,ne)=>{const ae=Ut(aU(ne));d[j]=ae,ae.launch.map(ue=>{S["form:"+j]={...ne.launch,type:ue.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{s(ae)}}}),ae.scope==="editor"?b.push(ae):g.push(ae),k[j]=ae},I=(j,ne)=>{af(ne).each(ae=>{ne.scope==="editor"?b.push(ae):g.push(ae),k[j]=ae})},H=Ps(t);return ct(H,j=>{const ne=t[j];ne.type==="contextform"?R(j,ne):ne.type==="contexttoolbar"&&I(j,ne)}),{forms:d,inNodeScope:g,inEditorScope:b,lookupTable:k,formNavigators:S}},SS=kn("forward-slide"),mR=kn("backward-slide"),E6=kn("change-slide-event"),ES="tox-pop--resizing",iY=t=>{const s=Zn([]);return ti.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:d=>{s.set([]),ti.getContent(d).each(g=>{ns(g.element,"visibility")}),mi(d.element,ES),ns(d.element,"width")},inlineBehaviours:Qt([Po("context-toolbar-events",[zp(Wd(),(d,g)=>{g.event.raw.propertyName==="width"&&(mi(d.element,ES),ns(d.element,"width"))}),Nt(E6,(d,g)=>{const b=d.element;ns(b,"width");const S=Fa(b);ti.setContent(d,g.event.contents),Vr(b,ES);const k=Fa(b);Rn(b,"width",S+"px"),ti.getContent(d).each(R=>{g.event.focus.bind(I=>(hu(I),dc(b))).orThunk(()=>(qn.focusIn(R),tf(de(b))))}),setTimeout(()=>{Rn(d.element,"width",k+"px")},0)}),Nt(SS,(d,g)=>{ti.getContent(d).each(b=>{s.set(s.get().concat([{bar:b,focus:tf(de(d.element))}]))}),oo(d,E6,{contents:g.event.forwardContents,focus:F.none()})}),Nt(mR,(d,g)=>{Ki(s.get()).each(b=>{s.set(s.get().slice(0,s.get().length-1)),oo(d,E6,{contents:jl(b.bar),focus:b.focus})})})]),qn.config({mode:"special",onEscape:d=>Ki(s.get()).fold(()=>t.onEscape(),g=>(zo(d,mR),F.some(!0)))})]),lazySink:()=>Ro.value(t.sink)})},k6="tox-pop--transition",aY=(t,s,d,g)=>{const b=g.backstage,S=b.shared,k=zl().deviceType.isTouch,R=sr(),I=sr(),H=sr(),j=Ml(iY({sink:d,onEscape:()=>(t.focus(),F.some(!0))})),ne=()=>{const Tn=H.get().getOr("node"),lo=lR(Tn)?1:0;return GL(t,S,Tn,lo)},ae=()=>!t.removed&&!(k()&&b.isContextMenuOpen()),ue=Tn=>_i(Ri(Tn,R.get(),ws),!0),he=()=>{if(ae()){const Tn=ne(),lo=_i(H.get(),"node")?tY(t,R.get()):C6(t);return Tn.height<=0||!iR(lo,Tn,.01)}else return!0},ke=()=>{R.clear(),I.clear(),H.clear(),ti.hide(j)},ot=()=>{if(ti.isOpen(j)){const Tn=j.element;ns(Tn,"display"),he()?Rn(Tn,"display","none"):(I.set(0),ti.reposition(j))}},Ie=Tn=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[Tn],behaviours:Qt([qn.config({mode:"acyclic"}),Po("pop-dialog-wrap-events",[Zr(lo=>{t.shortcuts.add("ctrl+F9","focus statusbar",()=>qn.focusIn(lo))}),If(lo=>{t.shortcuts.remove("ctrl+F9")})])])}),Je=Ae(()=>KL(s,Tn=>{const lo=gt([Tn]);oo(j,SS,{forwardContents:Ie(lo)})})),Ye=(Tn,lo)=>v6(t,{buttons:Tn,toolbar:lo.items,allowToolbarGroups:!1},g.backstage,F.some(["form:"])),It=(Tn,lo)=>JK.buildInitGroups(Tn,lo),gt=Tn=>{const{buttons:lo}=t.ui.registry.getAll(),to=Je(),Bs={...lo,...to.formNavigators},Ss=dv(t)===qu.scrolling?qu.scrolling:qu.default,es=St(Ze(Tn,rn=>rn.type==="contexttoolbar"?Ye(Bs,rn):It(rn,S.providers)));return s6({type:Ss,uid:kn("context-toolbar"),initGroups:es,onEscape:F.none,cyclicKeying:!0,providers:S.providers})},Jt=(Tn,lo)=>{const to=Tn==="node"?S.anchors.node(lo):S.anchors.cursor(),Bs=qL(t,Tn,k(),{lastElement:R.get,isReposition:()=>_i(I.get(),0),getMode:()=>ll.getMode(d)});return Dr(to,Bs)},dn=(Tn,lo)=>{if(Hn.cancel(),!ae())return;const to=gt(Tn),Bs=Tn[0].position,Ss=Jt(Bs,lo);H.set(Bs),I.set(1);const es=j.element;ns(es,"display"),ue(lo)||(mi(es,k6),ll.reset(d,j)),ti.showWithinBounds(j,Ie(to),{anchor:Ss,transition:{classes:[k6],mode:"placement"}},()=>F.some(ne())),lo.fold(R.clear,R.set),he()&&Rn(es,"display","none")};let Ot=!1;const Hn=UD(()=>{if(!(!t.hasFocus()||t.removed||Ot))if(Kc(j.element,k6))Hn.throttle();else{const Tn=Je();fR(Tn,t).fold(ke,lo=>{dn(lo.toolbars,F.some(lo.elem))})}},17);t.on("init",()=>{t.on("remove",ke),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",ot),t.on("click keyup focus SetContent",Hn.throttle),t.on(zL,ke),t.on(HL,Tn=>{const lo=Je();Yt(lo.lookupTable,Tn.toolbarKey).each(to=>{dn([to],Wn(Tn.target!==t,Tn.target)),ti.getContent(j).each(qn.focusIn)})}),t.on("focusout",Tn=>{lw.setEditorTimeout(t,()=>{dc(d.element).isNone()&&dc(j.element).isNone()&&ke()},0)}),t.on("SwitchMode",()=>{t.mode.isReadOnly()&&ke()}),t.on("ExecCommand",({command:Tn})=>{Tn.toLowerCase()==="toggleview"&&ke()}),t.on("AfterProgressState",Tn=>{Tn.state?ke():t.hasFocus()&&Hn.throttle()}),t.on("dragstart",()=>{Ot=!0}),t.on("dragend drop",()=>{Ot=!1}),t.on("NodeChange",Tn=>{dc(j.element).fold(Hn.throttle,X)})})},lY=t=>{ct([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],d=>{t.ui.registry.addToggleButton(d.name,{tooltip:d.text,icon:d.icon,onAction:Xu(t,d.cmd),onSetup:tx(t,d.name)})}),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:Mc(t),onAction:Xu(t,"JustifyNone")})},kS=(t,s)=>{const d=()=>{const g=s.getOptions(t),b=s.getCurrent(t).map(s.hash),S=sr();return Ze(g,k=>({type:"togglemenuitem",text:s.display(k),onSetup:R=>{const I=j=>{j&&(S.on(ne=>ne.setActive(!1)),S.set(R)),R.setActive(j)};I(_i(b,s.hash(k)));const H=s.watcher(t,k,I);return()=>{S.clear(),H()}},onAction:()=>s.setCurrent(t,k)}))};t.ui.registry.addMenuButton(s.name,{tooltip:s.text,icon:s.icon,fetch:g=>g(d()),onSetup:s.onToolbarSetup}),t.ui.registry.addNestedMenuItem(s.name,{type:"nestedmenuitem",text:s.text,getSubmenuItems:d,onSetup:s.onMenuSetup})},YL=t=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:Z4,hash:s=>hK(s,["fixed","relative","empty"]).getOr(s),display:xe,watcher:(s,d,g)=>s.formatter.formatChanged("lineheight",g,!1,{value:d}).unbind,getCurrent:s=>F.from(s.queryCommandValue("LineHeight")),setCurrent:(s,d)=>s.execCommand("LineHeight",!1,d),onToolbarSetup:Mc(t),onMenuSetup:Mc(t)}),cY=t=>F.from(ck(t)).map(d=>({name:"language",text:"Language",icon:"language",getOptions:ee(d),hash:g=>z(g.customCode)?g.code:`${g.code}/${g.customCode}`,display:g=>g.title,watcher:(g,b,S)=>{var k;return g.formatter.formatChanged("lang",S,!1,{value:b.code,customValue:(k=b.customCode)!==null&&k!==void 0?k:null}).unbind},getCurrent:g=>{const b=He.fromDom(g.selection.getNode());return Tf(b,S=>F.some(S).filter(mo).bind(k=>se(k,"lang").map(I=>{const H=se(k,"data-mce-lang").getOrUndefined();return{code:I,customCode:H,title:""}})))},setCurrent:(g,b)=>g.execCommand("Lang",!1,b),onToolbarSetup:g=>{const b=ji();return g.setActive(t.formatter.match("lang",{},void 0,!0)),b.set(t.formatter.formatChanged("lang",g.setActive,!0)),t2(b.clear,Mc(t)(g))},onMenuSetup:Mc(t)})),uY=t=>{kS(t,YL(t)),cY(t).each(s=>kS(t,s))},dY=(t,s)=>{iK(t,s),eR(t,s),xK(t,s),aK(t,s),SK(t,s)},fY=t=>wv(t,"NodeChange",s=>{s.setEnabled(t.queryCommandState("outdent")&&t.selection.isEditable())}),mY=t=>{t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:fY(t),onAction:Xu(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:Mc(t),onAction:Xu(t,"indent")})},XL=t=>{mY(t)},hR=(t,s)=>d=>{d.setActive(s.get());const g=b=>{s.set(b.state),d.setActive(b.state)};return t.on("PastePlainTextToggle",g),t2(()=>t.off("PastePlainTextToggle",g),Mc(t)(d))},QL=t=>{const s=Zn(hk(t)),d=()=>t.execCommand("mceTogglePlainTextPaste");t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:d,onSetup:hR(t,s)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:d,onSetup:hR(t,s)})},x6=(t,s)=>()=>{t.execCommand("mceToggleFormat",!1,s)},hY=t=>{Jf.each([{name:"bold",text:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(s,d)=>{t.ui.registry.addToggleButton(s.name,{tooltip:s.text,icon:s.icon,onSetup:tx(t,s.name),onAction:x6(t,s.name),shortcut:s.shortcut})});for(let s=1;s<=6;s++){const d="h"+s,g=`Access+${s}`;t.ui.registry.addToggleButton(d,{text:d.toUpperCase(),tooltip:"Heading "+s,onSetup:tx(t,d),onAction:x6(t,d),shortcut:g})}},JL=t=>{Jf.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],s=>{t.ui.registry.addButton(s.name,{tooltip:s.text,icon:s.icon,onAction:Xu(t,s.action),shortcut:s.shortcut})}),Jf.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],s=>{t.ui.registry.addButton(s.name,{tooltip:s.text,icon:s.icon,onSetup:Mc(t),onAction:Xu(t,s.action)})})},eF=t=>{Jf.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],s=>{t.ui.registry.addToggleButton(s.name,{tooltip:s.text,icon:s.icon,onAction:Xu(t,s.action),onSetup:tx(t,s.name)})})},gY=t=>{hY(t),JL(t),eF(t)},Ase=t=>{Jf.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],s=>{t.ui.registry.addMenuItem(s.name,{text:s.text,icon:s.icon,shortcut:s.shortcut,onAction:Xu(t,s.action)})}),Jf.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],s=>{t.ui.registry.addMenuItem(s.name,{text:s.text,icon:s.icon,shortcut:s.shortcut,onSetup:Mc(t),onAction:Xu(t,s.action)})}),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:Mc(t),onAction:x6(t,"code")})},pY=t=>{gY(t),Ase(t)},A6=(t,s)=>wv(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",d=>{d.setEnabled(!t.mode.isReadOnly()&&t.undoManager[s]())}),vY=t=>{t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:A6(t,"hasUndo"),onAction:Xu(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:A6(t,"hasRedo"),onAction:Xu(t,"redo")})},yY=t=>{t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:A6(t,"hasUndo"),onAction:Xu(t,"undo"),shortcut:"Meta+Z"}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:A6(t,"hasRedo"),onAction:Xu(t,"redo"),shortcut:"Meta+Y"})},bY=t=>{vY(t),yY(t)},CY=t=>wv(t,"VisualAid",s=>{s.setActive(t.hasVisual)}),_Y=t=>{t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:CY(t),onAction:Xu(t,"mceToggleVisualAid")})},wY=t=>{t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:Xu(t,"mceToggleVisualAid")})},SY=t=>{wY(t),_Y(t)},EY=(t,s)=>{lY(t),pY(t),dY(t,s),bY(t),GU(t),SY(t),XL(t),uY(t),QL(t)},kY=t=>C(t)?t.split(/[ ,]/):t,tF=t=>s=>s.options.get(t),xY=t=>{const s=t.options.register;s("contextmenu_avoid_overlap",{processor:"string",default:""}),s("contextmenu_never_use_native",{processor:"boolean",default:!1}),s("contextmenu",{processor:d=>d===!1?{value:[],valid:!0}:C(d)||q(d,C)?{value:kY(d),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})},gR=tF("contextmenu_never_use_native"),AY=tF("contextmenu_avoid_overlap"),TY=t=>nF(t).length===0,nF=t=>{const s=t.ui.registry.getAll().contextMenus,d=t.options.get("contextmenu");return t.options.isSet("contextmenu")?d:Nn(d,g=>Qo(s,g))},xS=(t,s)=>({type:"makeshift",x:t,y:s}),DY=(t,s,d)=>xS(t.x+s,t.y+d),oF=t=>t.type==="longpress"||t.type.indexOf("touch")===0,RY=t=>{if(oF(t)){const s=t.touches[0];return xS(s.pageX,s.pageY)}else return xS(t.pageX,t.pageY)},OY=t=>{if(oF(t)){const s=t.touches[0];return xS(s.clientX,s.clientY)}else return xS(t.clientX,t.clientY)},NY=(t,s)=>{const d=cv.DOM.getPos(t);return DY(s,d.x,d.y)},pR=(t,s)=>s.type==="contextmenu"||s.type==="longpress"?t.inline?RY(s):NY(t.getContentAreaContainer(),OY(s)):sF(t),sF=t=>({type:"selection",root:He.fromDom(t.selection.getNode())}),IY=t=>({type:"node",node:F.some(He.fromDom(t.selection.getNode())),root:He.fromDom(t.getBody())}),T6=(t,s,d)=>{switch(d){case"node":return IY(t);case"point":return pR(t,s);case"selection":return sF(t)}},rF=(t,s,d,g,b,S)=>{const k=d(),R=T6(t,s,S);y2(k,Gf.CLOSE_ON_EXECUTE,g,{isHorizontalMenu:!1,search:F.none()}).map(I=>{s.preventDefault(),ti.showMenuAt(b,{anchor:R},{menu:{markers:O1("normal")},data:I})})},iF={onLtr:()=>[aa,va,ia,ya,hr,Ta,tm,aS,iS,jx,rS,Wx],onRtl:()=>[aa,ia,va,hr,ya,Ta,tm,aS,rS,Wx,iS,jx]},BY=12,MY={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},PY=(t,s)=>{const d=t.selection;if(d.isCollapsed()||s.touches.length<1)return!1;{const g=s.touches[0],b=d.getRng();return Wa(t.getWin(),d1.domRange(b)).exists(k=>k.left<=g.clientX&&k.right>=g.clientX&&k.top<=g.clientY&&k.bottom>=g.clientY)}},LY=t=>{const s=t.selection.getRng(),d=()=>{lw.setEditorTimeout(t,()=>{t.selection.setRng(s)},10),S()};t.once("touchend",d);const g=k=>{k.preventDefault(),k.stopImmediatePropagation()};t.on("mousedown",g,!0);const b=()=>S();t.once("longpresscancel",b);const S=()=>{t.off("touchend",d),t.off("longpresscancel",b),t.off("mousedown",g)}},FY=(t,s,d)=>{const g=T6(t,s,d);return{bubble:_d(0,d==="point"?BY:0,MY),layouts:iF,overrides:{maxWidthFunction:A2(),maxHeightFunction:a1()},...g}},vR=(t,s,d,g,b,S,k)=>{const R=FY(t,s,S);y2(d,Gf.CLOSE_ON_EXECUTE,g,{isHorizontalMenu:!0,search:F.none()}).map(I=>{s.preventDefault();const H=k?Bc.HighlightMenuAndItem:Bc.HighlightNone;ti.showMenuWithinBounds(b,{anchor:R},{menu:{markers:O1("normal"),highlightOnOpen:H},data:I,type:"horizontal"},()=>F.some(GL(t,g.shared,S==="node"?"node":"selection"))),t.dispatch(zL)})},$Y=(t,s,d,g,b,S)=>{const k=zl(),R=k.os.isiOS(),I=k.os.isMacOS(),H=k.os.isAndroid(),j=k.deviceType.isTouch(),ne=()=>!(H||R||I&&j),ae=()=>{const ue=d();vR(t,s,ue,g,b,S,ne())};if((I||R)&&S!=="node"){const ue=()=>{LY(t),ae()};PY(t,s)?ue():(t.once("selectionchange",ue),t.once("touchend",()=>t.off("selectionchange",ue)))}else ae()},yR=t=>C(t)?t==="|":t.type==="separator",bR={type:"separator"},aF=t=>{const s=d=>({text:d.text,icon:d.icon,enabled:d.enabled,shortcut:d.shortcut});if(C(t))return t;switch(t.type){case"separator":return bR;case"submenu":return{type:"nestedmenuitem",...s(t),getSubmenuItems:()=>{const g=t.getSubmenuItems();return C(g)?g:Ze(g,aF)}};default:const d=t;return{type:"menuitem",...s(d),onAction:Ce(d.onAction)}}},D6=(t,s)=>{if(s.length===0)return t;const g=Ki(t).filter(b=>!yR(b)).fold(()=>[],b=>[bR]);return t.concat(g).concat(s).concat([bR])},VY=(t,s,d)=>{const g=Fo(s,(b,S)=>Yt(t,S.toLowerCase()).map(k=>{const R=k.update(d);if(C(R)&&Me(Pr(R)))return D6(b,R.split(" "));if(N(R)&&R.length>0){const I=Ze(R,aF);return D6(b,I)}else return b}).getOrThunk(()=>b.concat([S])),[]);return g.length>0&&yR(g[g.length-1])&&g.pop(),g},lF=(t,s)=>s.ctrlKey&&!gR(t),HY=t=>t.type==="longpress"||Qo(t,"touches"),cF=(t,s)=>!HY(s)&&(s.button!==2||s.target===t.getBody()&&s.pointerType===""),R6=(t,s)=>cF(t,s)?t.selection.getStart(!0):s.target,zY=(t,s)=>{const d=AY(t),g=cF(t,s)?"selection":"point";if(Me(d)){const b=R6(t,s);return Fw(He.fromDom(b),d)?"node":g}else return g},UY=(t,s,d)=>{const b=zl().deviceType.isTouch,S=Ml(ti.sketch({dom:{tag:"div"},lazySink:s,onEscape:()=>t.focus(),onShow:()=>d.setContextMenuState(!0),onHide:()=>d.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:Qt([Po("dismissContextMenu",[Nt(fh(),(I,H)=>{ys.close(I),t.focus()})])])})),k=()=>ti.hide(S),R=I=>{if(gR(t)&&I.preventDefault(),lF(t,I)||TY(t))return;const H=zY(t,I),j=()=>{const ae=R6(t,I),ue=t.ui.registry.getAll(),he=nF(t);return VY(ue.contextMenus,he,ae)};(b()?$Y:rF)(t,I,j,d,S,H)};t.on("init",()=>{const I="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(b()?"":" ResizeWindow");t.on(I,k),t.on("longpress contextmenu",R)})},CR=$e.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),O6=t=>s=>s.translate(-t.left,-t.top),N6=t=>s=>s.translate(t.left,t.top),Jh=t=>(s,d)=>Fo(t,(g,b)=>b(g),Lr(s,d)),I6=(t,s,d)=>t.fold(Jh([N6(d),O6(s)]),Jh([O6(s)]),Jh([])),B2=(t,s,d)=>t.fold(Jh([N6(d)]),Jh([]),Jh([N6(s)])),uF=(t,s,d)=>t.fold(Jh([]),Jh([O6(d)]),Jh([N6(s),O6(d)])),WY=(t,s,d,g,b,S)=>{const k=B2(t,b,S),R=B2(s,b,S);return Math.abs(k.left-R.left)<=d&&Math.abs(k.top-R.top)<=g},jY=(t,s,d,g,b,S)=>{const k=B2(t,b,S),R=B2(s,b,S),I=Math.abs(k.left-R.left),H=Math.abs(k.top-R.top);return Lr(I,H)},dF=(t,s,d)=>{const g=t.fold((b,S)=>({position:F.some("absolute"),left:F.some(b+"px"),top:F.some(S+"px")}),(b,S)=>({position:F.some("absolute"),left:F.some(b-d.left+"px"),top:F.some(S-d.top+"px")}),(b,S)=>({position:F.some("fixed"),left:F.some(b+"px"),top:F.some(S+"px")}));return{right:F.none(),bottom:F.none(),...g}},GY=(t,s,d)=>t.fold((g,b)=>AS(g+s,b+d),(g,b)=>U1(g+s,b+d),(g,b)=>W1(g+s,b+d)),_R=(t,s,d,g)=>{const b=(S,k)=>(R,I)=>{const H=S(s,d,g);return k(R.getOr(H.left),I.getOr(H.top))};return t.fold(b(uF,AS),b(B2,U1),b(I6,W1))},AS=CR.offset,U1=CR.absolute,W1=CR.fixed,fF=(t,s)=>{const d=Ys(t,s);return z(d)?NaN:parseInt(d,10)},ZY=(t,s)=>{const d=t.element,g=fF(d,s.leftAttr),b=fF(d,s.topAttr);return isNaN(g)||isNaN(b)?F.none():F.some(Lr(g,b))},qY=(t,s,d)=>{const g=t.element;tn(g,s.leftAttr,d.left+"px"),tn(g,s.topAttr,d.top+"px")},$v=(t,s)=>{const d=t.element;Te(d,s.leftAttr),Te(d,s.topAttr)},mF=(t,s,d,g)=>ZY(t,s).fold(()=>d,b=>W1(b.left+g.left,b.top+g.top)),KY=(t,s,d,g,b,S)=>{const k=mF(t,s,d,g),R=s.mustSnap?XY(t,s,k,b,S):gF(t,s,k,b,S),I=I6(k,b,S);return qY(t,s,I),R.fold(()=>({coord:W1(I.left,I.top),extra:F.none()}),H=>({coord:H.output,extra:H.extra}))},YY=(t,s)=>{$v(t,s)},hF=(t,s,d,g)=>ms(t,b=>{const S=b.sensor;return WY(s,S,b.range.left,b.range.top,d,g)?F.some({output:_R(b.output,s,d,g),extra:b.extra}):F.none()}),XY=(t,s,d,g,b)=>{const S=s.getSnapPoints(t);return hF(S,d,g,b).orThunk(()=>Fo(S,(I,H)=>{const j=H.sensor,ne=jY(d,j,H.range.left,H.range.top,g,b);return I.deltas.fold(()=>({deltas:F.some(ne),snap:F.some(H)}),ae=>{const ue=(ne.left+ne.top)/2,he=(ae.left+ae.top)/2;return ue<=he?{deltas:F.some(ne),snap:F.some(H)}:I})},{deltas:F.none(),snap:F.none()}).snap.map(I=>({output:_R(I.output,d,g,b),extra:I.extra})))},gF=(t,s,d,g,b)=>{const S=s.getSnapPoints(t);return hF(S,d,g,b)},QY=(t,s,d)=>({coord:_R(t.output,t.output,s,d),extra:t.extra});var JY=Object.freeze({__proto__:null,snapTo:(t,s,d,g)=>{const b=s.getTarget(t.element);if(s.repositionTarget){const S=ma(t.element),k=Aa(S),R=_C(b),I=QY(g,k,R),H=dF(I.coord,k,R);jt(b,H)}}});const wR="data-initial-z-index",eX=t=>{Qi(t.element).filter(mo).each(s=>{se(s,wR).fold(()=>ns(s,"z-index"),d=>Rn(s,"z-index",d)),Te(s,wR)})},tX=t=>{Qi(t.element).filter(mo).each(s=>{vr(s,"z-index").each(d=>{tn(s,wR,d)}),Rn(s,"z-index",or(t.element,"z-index"))})},pF=(t,s)=>{t.getSystem().addToGui(s),tX(s)},nX=t=>{eX(t),t.getSystem().removeFromGui(t)},vF=(t,s,d)=>t.getSystem().build(Hm.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[s]},events:d}));var oX=Cr("snaps",[Rt("getSnapPoints"),hs("onSensor"),Rt("leftAttr"),Rt("topAttr"),Qe("lazyViewport",Ni),Qe("mustSnap",!1)]);const B6=[Qe("useFixed",fn),Rt("blockerClass"),Qe("getTarget",xe),Qe("onDrag",X),Qe("repositionTarget",!0),Qe("onDrop",X),bi("getBounds",Ni),oX],yF=t=>vi(vr(t,"left"),vr(t,"top"),vr(t,"position"),(s,d,g)=>(g==="fixed"?W1:AS)(parseInt(s,10),parseInt(d,10))).getOrThunk(()=>{const s=Ji(t);return U1(s.left,s.top)}),sX=(t,s,d,g,b)=>{const S=b.bounds,k=B2(s,d,g),R=Cd(k.left,S.x,S.x+S.width-b.width),I=Cd(k.top,S.y,S.y+S.height-b.height),H=U1(R,I);return s.fold(()=>{const j=uF(H,d,g);return AS(j.left,j.top)},ee(H),()=>{const j=I6(H,d,g);return W1(j.left,j.top)})},TS=(t,s,d,g,b,S,k)=>{const R=s.fold(()=>{const I=GY(d,S.left,S.top),H=I6(I,g,b);return W1(H.left,H.top)},I=>{const H=KY(t,I,d,S,g,b);return H.extra.each(j=>{I.onSensor(t,j)}),H.coord});return sX(t,R,g,b,k)},rX=(t,s,d,g)=>{const b=s.getTarget(t.element);if(s.repositionTarget){const S=ma(t.element),k=Aa(S),R=_C(b),I=yF(b),H=TS(t,s.snaps,I,k,R,g,d),j=dF(H,k,R);jt(b,j)}s.onDrag(t,b,g)},bF=(t,s)=>({bounds:t.getBounds(),height:id(s.element),width:ha(s.element)}),DS=(t,s,d,g,b)=>{const S=d.update(g,b),k=d.getStartData().getOrThunk(()=>bF(s,t));S.each(R=>{rX(t,s,k,R)})},CF=(t,s,d,g)=>{s.each(nX),d.snaps.each(S=>{YY(t,S)});const b=d.getTarget(t.element);g.reset(),d.onDrop(t,b)},SR=t=>(s,d)=>{const g=b=>{d.setStartData(bF(s,b))};return $r([Nt(Sg(),b=>{d.getStartData().each(()=>g(b))}),...t(s,d,g)])},iX=t=>$r([Nt(ic(),t.forceDrop),Nt(Cm(),t.drop),Nt(Vp(),(s,d)=>{t.move(d.event)}),Nt(vd(),t.delayDrop)]);var aX=Object.freeze({__proto__:null,getData:t=>F.from(Lr(t.x,t.y)),getDelta:(t,s)=>Lr(s.left-t.left,s.top-t.top)});const _F=(t,s,d)=>[Nt(ic(),(g,b)=>{if(b.event.raw.button!==0)return;b.stop();const k=()=>CF(g,F.some(H),t,s),R=NB(k,200),I={drop:k,delayDrop:R.schedule,forceDrop:k,move:ne=>{R.cancel(),DS(g,t,s,aX,ne)}},H=vF(g,t.blockerClass,iX(I));(()=>{d(g),pF(g,H)})()})],lX=[...B6,Hr("dragger",{handlers:SR(_F)})],cX=t=>$r([Nt(os(),t.forceDrop),Nt(ra(),t.drop),Nt(Rc(),t.drop),Nt(Gr(),(s,d)=>{t.move(d.event)})]),uX=t=>{const s=t[0];return F.some(Lr(s.clientX,s.clientY))};var wF=Object.freeze({__proto__:null,getData:t=>{const d=t.raw.touches;return d.length===1?uX(d):F.none()},getDelta:(t,s)=>Lr(s.left-t.left,s.top-t.top)});const SF=(t,s,d)=>{const g=sr(),b=S=>{CF(S,g.get(),t,s),g.clear()};return[Nt(os(),(S,k)=>{k.stop();const R=()=>b(S),I={drop:R,delayDrop:X,forceDrop:R,move:ne=>{DS(S,t,s,wF,ne)}},H=vF(S,t.blockerClass,cX(I));g.set(H),(()=>{d(S),pF(S,H)})()}),Nt(Gr(),(S,k)=>{k.stop(),DS(S,t,s,wF,k.event)}),Nt(ra(),(S,k)=>{k.stop(),b(S)}),Nt(Rc(),b)]},dX=[...B6,Hr("dragger",{handlers:SR(SF)})],fX=(t,s,d)=>[..._F(t,s,d),...SF(t,s,d)],mX=[...B6,Hr("dragger",{handlers:SR(fX)})];var hX=Object.freeze({__proto__:null,mouse:lX,touch:dX,mouseOrTouch:mX}),gX=Object.freeze({__proto__:null,init:()=>{let t=F.none(),s=F.none();const d=()=>{t=F.none(),s=F.none()},g=(I,H)=>{const j=t.map(ne=>I.getDelta(ne,H));return t=F.some(H),j},b=(I,H)=>I.getData(H).bind(j=>g(I,j)),S=I=>{s=F.some(I)},k=()=>s,R=ee({});return qc({readState:R,reset:d,update:b,getStartData:k,setStartData:S})}});const Vv=u3({branchKey:"mode",branches:hX,name:"dragging",active:{events:(t,s)=>t.dragger.handlers(t,s)},extra:{snap:t=>({sensor:t.sensor,range:t.range,output:t.output,extra:F.from(t.extra)})},state:gX,apis:JY}),M6=40,P6=M6/2,EF=(t,s,d,g,b,S)=>t.fold(()=>Vv.snap({sensor:U1(d-P6,g-P6),range:Lr(b,S),output:U1(F.some(d),F.some(g)),extra:{td:s}}),k=>{const R=d-P6,I=g-P6,H=M6,j=M6,ne=k.element.dom.getBoundingClientRect();return Vv.snap({sensor:U1(R,I),range:Lr(H,j),output:U1(F.some(d-ne.width/2),F.some(g-ne.height/2)),extra:{td:s}})}),kF=(t,s,d)=>{const g=(b,S)=>b.exists(k=>ws(k,S));return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(b,S)=>{const k=S.td;g(s.get(),k)||(s.set(k),d(k))},mustSnap:!0}},xF=t=>er(Fl.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Qt([Vv.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),u2.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),pX=(t,s)=>{const d=Zn([]),g=Zn([]),b=Zn(!1),S=sr(),k=sr(),R=dn=>{const Ot=Tl(dn);return EF(ue.getOpt(s),dn,Ot.x,Ot.y,Ot.width,Ot.height)},I=()=>Ze(d.get(),dn=>R(dn)),H=dn=>{const Ot=Tl(dn);return EF(he.getOpt(s),dn,Ot.right,Ot.bottom,Ot.width,Ot.height)},j=()=>Ze(g.get(),dn=>H(dn)),ne=kF(I,S,dn=>{k.get().each(Ot=>{t.dispatch("TableSelectorChange",{start:dn,finish:Ot})})}),ae=kF(j,k,dn=>{S.get().each(Ot=>{t.dispatch("TableSelectorChange",{start:Ot,finish:dn})})}),ue=xF(ne),he=xF(ae),ke=Ml(ue.asSpec()),ot=Ml(he.asSpec()),Ie=(dn,Ot,Hn,Tn)=>{const lo=Ot.dom.getBoundingClientRect();ns(dn.element,"display");const to=ml(He.fromDom(t.getBody())).dom.innerHeight,Bs=Hn(lo),Ss=Tn(lo,to);(Bs||Ss)&&Rn(dn.element,"display","none")},Je=(dn,Ot,Hn,Tn)=>{const lo=Hn(Ot);Vv.snapTo(dn,lo),Ie(dn,Ot,Ss=>Ss[Tn]<0,(Ss,es)=>Ss[Tn]>es)},Ye=dn=>Je(ke,dn,R,"top"),It=()=>S.get().each(Ye),gt=dn=>Je(ot,dn,H,"bottom"),Jt=()=>k.get().each(gt);if(zl().deviceType.isTouch()){const dn=Ot=>Ze(Ot,He.fromDom);t.on("TableSelectionChange",Ot=>{b.get()||($f(s,ke),$f(s,ot),b.set(!0));const Hn=He.fromDom(Ot.start),Tn=He.fromDom(Ot.finish);S.set(Hn),k.set(Tn),F.from(Ot.otherCells).each(lo=>{d.set(dn(lo.upOrLeftCells)),g.set(dn(lo.downOrRightCells)),Ye(Hn),gt(Tn)})}),t.on("ResizeEditor ResizeWindow ScrollContent",()=>{It(),Jt()}),t.on("TableSelectionClear",()=>{b.get()&&(Om(ke),Om(ot),b.set(!1)),S.clear(),k.clear()})}};var kR=`<svg height="16" viewBox="0 0 80 16" width="80" xmlns="http://www.w3.org/2000/svg"><g opacity=".8"><path d="m80 3.537v-2.202h-7.976v11.585h7.976v-2.25h-5.474v-2.621h4.812v-2.069h-4.812v-2.443zm-10.647 6.929c-.493.217-1.13.337-1.864.337s-1.276-.156-1.805-.47a3.732 3.732 0 0 1 -1.3-1.298c-.324-.554-.48-1.191-.48-1.877s.156-1.335.48-1.877a3.635 3.635 0 0 1 1.3-1.299 3.466 3.466 0 0 1 1.805-.481c.65 0 .914.06 1.263.18.36.12.698.277.986.47.289.192.578.384.842.6l.12.085v-2.586l-.023-.024c-.385-.35-.855-.614-1.384-.818-.53-.205-1.155-.313-1.877-.313-.721 0-1.6.144-2.333.445a5.773 5.773 0 0 0 -1.937 1.251 5.929 5.929 0 0 0 -1.324 1.9c-.324.735-.48 1.565-.48 2.455s.156 1.72.48 2.454c.325.734.758 1.383 1.324 1.913.553.53 1.215.938 1.937 1.25a6.286 6.286 0 0 0 2.333.434c.819 0 1.384-.108 1.961-.313.59-.216 1.083-.505 1.468-.866l.024-.024v-2.49l-.12.096c-.41.337-.878.626-1.396.866zm-14.869-4.15-4.8-5.04-.024-.025h-.902v11.67h2.502v-6.847l2.827 3.08.385.409.397-.41 2.791-3.067v6.845h2.502v-11.679h-.902l-4.788 5.052z"/><path clip-rule="evenodd" d="m15.543 5.137c0-3.032-2.466-5.113-4.957-5.137-.36 0-.745.024-1.094.096-.157.024-3.85.758-3.85.758-3.032.602-4.62 2.466-4.704 4.788-.024.89-.024 4.27-.024 4.27.036 3.165 2.406 5.138 5.017 5.126.337 0 1.119-.109 1.287-.145.144-.024.385-.084.746-.144.661-.12 1.684-.325 3.067-.602 2.37-.409 4.103-2.009 4.44-4.33.156-1.023.084-4.692.084-4.692zm-3.213 3.308-2.346.457v2.31l-5.859 1.143v-5.75l2.346-.458v3.441l3.513-.686v-3.44l-3.513.685v-2.297l5.859-1.143v5.75zm20.09-3.296-.083-1.023h-2.13v8.794h2.346v-4.884c0-1.107.95-1.985 2.057-1.997 1.095 0 1.901.89 1.901 1.997v4.884h2.346v-5.245c-.012-2.105-1.588-3.777-3.67-3.765a3.764 3.764 0 0 0 -2.778 1.25l.012-.011zm-6.014-4.102 2.346-.458v2.298l-2.346.457z" fill-rule="evenodd"/><path d="m28.752 4.126h-2.346v8.794h2.346z"/><path clip-rule="evenodd" d="m43.777 15.483 4.043-11.357h-2.418l-1.54 4.355-.445 1.324-.36-1.324-1.54-4.355h-2.418l3.151 8.794-1.083 3.08zm-21.028-5.51c0 .722.541 1.034.878 1.034s.638-.048.95-.144l.518 1.708c-.217.145-.879.518-2.13.518a2.565 2.565 0 0 1 -2.562-2.587c-.024-1.082-.024-2.49 0-4.21h-1.54v-2.142h1.54v-1.912l2.346-.458v2.37h2.201v2.142h-2.2v3.693-.012z" fill-rule="evenodd"/></g></svg>
|
|
148
148
|
`;const AF=(t,s)=>{const d=F.from(Ys(t,"id")).getOrThunk(()=>{const g=kn("aria");return tn(s,"id",g),g});tn(t,"aria-describedby",d)},vX=t=>{Te(t,"aria-describedby")},yX=t=>t.nodeName==="BR"||!!t.getAttribute("data-mce-bogus")||t.getAttribute("data-mce-type")==="bookmark",bX=(t,s,d)=>{var g;const b=(g=s.delimiter)!==null&&g!==void 0?g:"›",S=(H,j,ne)=>Fl.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":ne}},components:[xi(H)],action:ae=>{t.focus(),t.selection.select(j),t.nodeChanged()},buttonBehaviours:Qt([Cl.config({...d.tooltips.getConfig({tooltipText:d.translate(["Select the {0} element",j.nodeName.toLowerCase()]),onShow:(ae,ue)=>{AF(ae.element,ue.element)},onHide:ae=>{vX(ae.element)}})}),Yf.button(d.isDisabled),Da()])}),k=()=>({dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[xi(` ${b} `)]}),R=H=>Fo(H,(j,ne,ae)=>{const ue=S(ne.name,ne.element,ae);return ae===0?j.concat([ue]):j.concat([k(),ue])},[]),I=H=>{const j=[];let ne=H.length;for(;ne-- >0;){const ae=H[ne];if(ae.nodeType===1&&!yX(ae)){const ue=RU(t,ae);if(ue.isDefaultPrevented()||j.push({name:ue.name,element:ae}),ue.isPropagationStopped())break}}return j};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Qt([qn.config({mode:"flow",selector:"div[role=button]"}),ho.config({disabled:d.isDisabled}),Da(),zr.config({}),_o.config({}),Po("elementPathEvents",[Zr((H,j)=>{t.shortcuts.add("alt+F11","focus statusbar elementpath",()=>qn.focusIn(H)),t.on("NodeChange",ne=>{const ae=I(ne.parents),ue=ae.length>0?R(ae):[];_o.set(H,ue)})})])]),components:[]}};var j1;(function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"})(j1||(j1={}));const CX=(t,s,d,g,b)=>{const S={height:Fv(g+s.top,lk(t),L4(t))};return d===j1.Both&&(S.width=Fv(b+s.left,Gb(t),uw(t))),S},TF=(t,s,d)=>{const g=He.fromDom(t.getContainer()),b=CX(t,s,d,Nr(g),Fa(g));ks(b,(S,k)=>{ce(S)&&Rn(g,k,sR(S))}),TU(t)},_X=t=>{const s=W4(t);return s===!1?j1.None:s==="both"?j1.Both:j1.Vertical},L6=(t,s,d,g)=>{const S=Lr(d*20,g*20);return TF(t,S,s),F.some(!0)},wX=(t,s)=>{const d=_X(t);if(d===j1.None)return F.none();const g=d===j1.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return F.some(_u("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{"aria-label":s.translate(g),"data-mce-name":"resize-handle"},behaviours:[Vv.config({mode:"mouse",repositionTarget:!1,onDrag:(b,S,k)=>TF(t,k,d),blockerClass:"tox-blocker"}),qn.config({mode:"special",onLeft:()=>L6(t,d,-1,0),onRight:()=>L6(t,d,1,0),onUp:()=>L6(t,d,0,-1),onDown:()=>L6(t,d,0,1)}),zr.config({}),vo.config({}),Cl.config(s.tooltips.getConfig({tooltipText:s.translate("Resize")}))]},s.icons))},SX=(t,s)=>{const d=(g,b,S)=>_o.set(g,[xi(s.translate(["{0} "+S,b[S]]))]);return Fl.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Qt([Yf.button(s.isDisabled),Da(),zr.config({}),_o.config({}),xn.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Po("wordcount-events",[bd(g=>{const b=xn.getValue(g),S=b.mode==="words"?"characters":"words";xn.setValue(g,{mode:S,count:b.count}),d(g,b.count,S)}),Zr(g=>{t.on("wordCountUpdate",b=>{const{mode:S}=xn.getValue(g);xn.setValue(g,{mode:S,count:b.wordCount}),d(g,b.wordCount,S)})})])]),eventOrder:{[$u()]:["disabling","alloy.base.behaviour","wordcount-events"]}})},EX=(t,s)=>{const d=()=>({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7",rel:"noopener",target:"_blank","aria-label":t.translate(["Build with {0}","TinyMCE"])},innerHtml:t.translate(["Build with {0}",kR.trim()])},behaviours:Qt([vo.config({})])}]}),g=()=>{const R=Kk("Alt+0"),I="Press {0} for help";return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[xi(kd.translate([I,R]))]}},b=()=>{const R=[];return t.hasPlugin("wordcount")&&R.push(SX(t,s)),U4(t)&&R.push(d()),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:R}},S=()=>{const R=[],I=PN(t),H=BN(t),j=U4(t)||t.hasPlugin("wordcount"),ne=()=>{const ae="tox-statusbar__text-container--flex-start",ue="tox-statusbar__text-container--flex-end",he="tox-statusbar__text-container--space-around";if(I){const ke="tox-statusbar__text-container-3-cols";return!j&&!H?[ke,he]:j&&!H?[ke,ue]:[ke,ae]}return[j&&!H?ue:ae]};return H&&R.push(bX(t,{},s)),I&&R.push(g()),j&&R.push(b()),R.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...ne()]},components:R}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const R=S(),I=wX(t,s);return R.concat(I.toArray())})()}},DF=(t,s)=>s.get().getOrDie(`UI for ${t} has not been rendered`),kX=(t,s)=>{const d=t.inline,g=d?$L:WK,b=qb(t)?qZ:C9,S=VL(),k=sr(),R=sr(),I=sr(),ae=zl().deviceType.isTouch()?["tox-platform-touch"]:[],ue=rp(t),he=dv(t),ke=er({dom:{tag:"div",classes:["tox-anchorbar"]}}),ot=er({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),Ie=()=>S.mainUi.get().map(so=>so.outerContainer).bind(Ur.getHeader),Je=()=>Ro.fromOption(S.dialogUi.get().map(so=>so.sink),"UI has not been rendered"),Ye=()=>Ro.fromOption(S.popupUi.get().map(so=>so.sink),"(popup) UI has not been rendered"),It=S.lazyGetInOuterOrDie("anchor bar",ke.getOpt),gt=S.lazyGetInOuterOrDie("bottom anchor bar",ot.getOpt),Jt=S.lazyGetInOuterOrDie("toolbar",Ur.getToolbar),dn=S.lazyGetInOuterOrDie("throbber",Ur.getThrobber),Ot=FZ({popup:Ye,dialog:Je},t,It,gt),Hn=()=>{const so={attributes:{[Dh]:ue?Th.BottomToTop:Th.TopToBottom}},To=Ur.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:Ot.popup,onEscape:()=>{t.focus()}}),wr=Ur.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:Ot.popup.shared.getSink,providers:Ot.popup.shared.providers,onEscape:()=>{t.focus()},onToolbarToggled:Gv=>{OU(t,Gv)},type:he,lazyToolbar:Jt,lazyHeader:()=>Ie().getOrDie("Could not find header element"),...so}),zs=Ur.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:Ot.popup.shared.providers,onEscape:()=>{t.focus()},type:he}),Cc=fv(t),Nd=vk(t),Zm=gk(t),Xl=dw(t),Id=Tn(),vf=Cc||Nd||Zm,Au=()=>Cc?[zs]:Nd?[wr]:[],ng=Xl?[Id,To]:[To];return Ur.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(vf?[]:["tox-editor-header--empty"]),...so},components:St([Zm?ng:[],Au(),Zb(t)?[]:[ke.asSpec()]]),sticky:qb(t),editor:t,sharedBackstage:Ot.popup.shared})},Tn=()=>Ur.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),lo=()=>{const so=Ur.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),To=Ur.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}});return{dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[so,To]}},to=()=>{const so=fw(t),To=ws(Io(),so)&&or(so,"display")==="grid",wr={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(ae),attributes:{...kd.isRtl()?{dir:"rtl"}:{}}},behaviours:Qt([ll.config({useFixed:()=>b.isDocked(Ie)})])},zs={dom:{styles:{width:document.body.clientWidth+"px"}},events:$r([Nt(Zd(),Zm=>{Rn(Zm.element,"width",document.body.clientWidth+"px")})])},Cc=Ml(Dr(wr,To?zs:{})),Nd=uD(Cc);return R.set(Nd),{sink:Cc,mothership:Nd}},Bs=()=>{const so={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(ae),attributes:{...kd.isRtl()?{dir:"rtl"}:{}}},behaviours:Qt([ll.config({useFixed:()=>b.isDocked(Ie),getBounds:()=>s.getPopupSinkBounds()})])},To=Ml(so),wr=uD(To);return I.set(wr),{sink:To,mothership:wr}},Ss=()=>{const so=Hn(),To=lo(),wr=Ur.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:Ot.popup}),zs=Ur.parts.viewWrapper({backstage:Ot.popup}),Cc=IN(t)&&!d?F.some(EX(t,Ot.popup.shared.providers)):F.none(),Nd=St([ue?[]:[so],d?[]:[To],ue?[so]:[]]),Zm=Ur.parts.editorContainer({components:St([Nd,d?[]:[ot.asSpec()]])}),Xl=yk(t),Id={role:"application",...kd.isRtl()?{dir:"rtl"}:{},...Xl?{"aria-hidden":"true"}:{}},vf=Ml(Ur.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(d?["tox-tinymce-inline"]:[]).concat(ue?["tox-tinymce--toolbar-bottom"]:[]).concat(ae),styles:{visibility:"hidden",...Xl?{opacity:"0",border:"0"}:{}},attributes:Id},components:[Zm,...d?[]:[zs,...Cc.toArray()],wr],behaviours:Qt([Da(),ho.config({disableClass:"tox-tinymce--disabled"}),qn.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])})),Au=uD(vf);return k.set(Au),{mothership:Au,outerContainer:vf}},es=so=>{const To=sR(y6(t)),wr=sR(PL(t));return t.inline||(Hl("div","width",wr)&&Rn(so.element,"width",wr),Hl("div","height",To)?Rn(so.element,"height",To):Rn(so.element,"height","400px")),To},rn=so=>{t.addShortcut("alt+F9","focus menubar",()=>{Ur.focusMenubar(so)}),t.addShortcut("alt+F10","focus toolbar",()=>{Ur.focusToolbar(so)}),t.addCommand("ToggleToolbarDrawer",(To,wr)=>{wr!=null&&wr.skipFocus?Ur.toggleToolbarDrawerWithoutFocusing(so):Ur.toggleToolbarDrawer(so)}),t.addQueryStateHandler("ToggleToolbarDrawer",()=>Ur.isToolbarDrawerToggled(so))},Mn=so=>{const{mainUi:To,popupUi:wr,uiMotherships:zs}=so;Cs(uk(t),($2,J6)=>{t.ui.registry.addGroupToolbarButton(J6,$2)});const{buttons:Cc,menuItems:Nd,contextToolbars:Zm,sidebars:Xl,views:Id}=t.ui.registry.getAll(),vf=q4(t),Au={menuItems:Nd,menus:K4(t),menubar:V4(t),toolbar:vf.getOrThunk(()=>dk(t)),allowToolbarGroups:he===qu.floating,buttons:Cc,sidebar:Xl,views:Id};rn(To.outerContainer),$Z(t,To.mothership,zs),b.setup(t,Ot.popup.shared,Ie),EY(t,Ot.popup),UY(t,Ot.popup.shared.getSink,Ot.popup),nq(t),mq(t,dn,Ot.popup.shared),aY(t,Zm,wr.sink,{backstage:Ot.popup}),pX(t,wr.sink);const ng=t.getElement(),Gv=es(To.outerContainer),VR={targetNode:ng,height:Gv};return g.render(t,so,Au,Ot.popup,VR)},No=so=>(I.set(so.mothership),so),fo=()=>{const so=Ss(),To=to(),wr=D1(t)?Bs():No(To);S.dialogUi.set(To),S.popupUi.set(wr),S.mainUi.set(so);const zs={popupUi:wr,dialogUi:To,mainUi:so,uiMotherships:S.getUiMotherships()};return Mn(zs)};return{popups:{backstage:Ot.popup,getMothership:()=>DF("popups",I)},dialogs:{backstage:Ot.dialog,getMothership:()=>DF("dialogs",R)},renderUI:fo}},xX=t=>t.dom.textContent,RF=(t,s)=>{const d=se(t,"id").fold(()=>{const g=kn("dialog-label");return tn(s,"id",g),g},xe);tn(t,"aria-labelledby",d)},AX=ee([Rt("lazySink"),Ds("dragBlockClass"),bi("getBounds",Ni),Qe("useTabstopAt",Vt),Qe("firstTabstop",0),Qe("eventOrder",{}),Ga("modalBehaviours",[qn]),cc("onExecute"),Em("onEscape")]),xR={sketch:xe},TX=ee([Cu({name:"draghandle",overrides:(t,s)=>({behaviours:Qt([Vv.config({mode:"mouse",getTarget:d=>xm(d,'[role="dialog"]').getOr(d),blockerClass:t.dragBlockClass.getOrDie(new Error(`The drag blocker class was not specified for a dialog with a drag handle:
|
|
149
|
-
`+JSON.stringify(s,null,2)).message),getBounds:t.getDragBounds})])})}),bl({schema:[Rt("dom")],name:"title"}),bl({factory:xR,schema:[Rt("dom")],name:"close"}),bl({factory:xR,schema:[Rt("dom")],name:"body"}),Cu({factory:xR,schema:[Rt("dom")],name:"footer"}),ju({factory:{sketch:(t,s)=>({...t,dom:s.dom,components:s.components})},schema:[Qe("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Qe("components",[])],name:"blocker"})]),DX=(t,s,d,g)=>{const b=sr(),S=he=>{b.set(he);const ke=t.lazySink(he).getOrDie(),ot=g.blocker(),Ie=ke.getSystem().build({...ot,components:ot.components.concat([jl(he)]),behaviours:Qt([vo.config({}),Po("dialog-blocker-events",[zp(Ud(),()=>{Gm.isBlocked(he)?X():qn.focusIn(he)})])])});$f(ke,Ie),qn.focusIn(he)},k=he=>{b.clear(),Qi(he.element).each(ke=>{he.getSystem().getByDom(ke).each(ot=>{Om(ot)})})},R=he=>hc(he,t,"body"),I=he=>Xt(he,t,"footer"),H=(he,ke)=>{Gm.block(he,ke)},j=he=>{Gm.unblock(he)},ne=kn("modal-events"),ae={...t.eventOrder,[ac()]:[ne].concat(t.eventOrder["alloy.system.attached"]||[])},ue=zl();return{uid:t.uid,dom:t.dom,components:s,apis:{show:S,hide:k,getBody:R,getFooter:I,setIdle:j,setBusy:H},eventOrder:ae,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Za(t.modalBehaviours,[_o.config({}),qn.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt,firstTabstop:t.firstTabstop}),Gm.config({getRoot:b.get}),Po(ne,[Zr(he=>{const ke=hc(he,t,"title").element,ot=xX(ke);ue.os.isMacOS()&&K(ot)?tn(he.element,"aria-label",ot):RF(he.element,ke)})])])}},qa=ql({name:"ModalDialog",configFields:AX(),partFields:TX(),factory:DX,apis:{show:(t,s)=>{t.show(s)},hide:(t,s)=>{t.hide(s)},getBody:(t,s)=>t.getBody(s),getFooter:(t,s)=>t.getFooter(s),setBusy:(t,s,d)=>{t.setBusy(s,d)},setIdle:(t,s)=>{t.setIdle(s)}}}),RX=co([ca,Pk].concat(yv)),OX=Ac,AR=[N5("button"),rf,mu("align","end",["start","end"]),Tw,Zf,d0("buttonType",["primary","secondary"])],TR=[...AR,lp],F6=[ol("type",["submit","cancel","custom"]),...TR],Hv=[ol("type",["menu"]),B1,Aw,rf,Dc("items",RX),...AR],NX=[...AR,ol("type",["togglebutton"]),Aw,rf,B1,Ei("active",!1)],DR=ga("type",{submit:F6,cancel:F6,custom:F6,menu:Hv,togglebutton:NX}),$6=[ca,lp,ol("level",["info","warn","error","success"]),yI,Qe("url","")],IX=co($6),BX=t=>[ca,t],MX=[ca,lp,Zf,N5("button"),rf,tU,d0("buttonType",["primary","secondary","toolbar"]),Tw],PX=co(MX),M2=[ca,Pk],iu=M2.concat([Fk]),OF=M2.concat([Lk,Zf]),LX=co(OF),FX=Ac,$X=iu.concat([Hk("auto")]),VX=co($X),HX=c0([xw,lp,yI]),zX=iu.concat([za("storageKey","default")]),UX=co(zX),WX=Cn,RS=co(iu),RR=Cn,V6=M2.concat([za("tag","textarea"),Gi("scriptId"),Gi("scriptUrl"),hd("onFocus"),B("settings",void 0)]),zv=M2.concat([za("tag","textarea"),Tc("init")]),H6=Cg(t=>ei("customeditor.old",Ha(zv),t).orThunk(()=>ei("customeditor.new",Ha(V6),t))),jX=Cn,IF=co(iu),BF=ym(),ZX=t=>[ca,Pp("columns"),t],qX=[ca,Gi("html"),mu("presets","presentation",["presentation","document"]),bi("onInit",X),Ei("stretched",!1)],KX=co(qX),MF=iu.concat([Ei("border",!1),Ei("sandboxed",!0),Ei("streamContent",!1),Ei("transparent",!0)]),PF=co(MF),OR=Cn,YX=co(M2.concat([Zi("height")])),XX=co([Gi("url"),bm("zoom"),bm("cachedWidth"),bm("cachedHeight")]),QX=iu.concat([Zi("inputMode"),Zi("placeholder"),Ei("maximized",!1),Zf]),LF=co(QX),JX=Cn,eQ=t=>[ca,Lk,t,mu("align","start",["start","center","end"]),Zi("for")],tQ=[lp,xw],NR=[lp,Dc("items",ah("items",()=>z6))],z6=rh([co(tQ),co(NR)]),nQ=iu.concat([Dc("items",z6),Zf]),FF=co(nQ),oQ=Cn,sQ=iu.concat([py("items",[lp,xw]),ch("size",1),Zf]),$F=co(sQ),rQ=Cn,iQ=iu.concat([Ei("constrain",!0),Zf]),Uv=co(iQ),IR=co([Gi("width"),Gi("height")]),aQ=M2.concat([Lk,ch("min",0),ch("max",0)]),U6=co(aQ),P2=xf,W6=[ca,Dc("header",Cn),Dc("cells",Wc(Cn))],VF=co(W6),j6=iu.concat([Zi("placeholder"),Ei("maximized",!1),Zf]),Eu=co(j6),G6=Cn,BR=[ol("type",["directory","leaf"]),vI,Gi("id"),md("menu",k9)],HF=co(BR),cQ=BR.concat([Dc("children",ah("children",()=>Af("type",{directory:vp,leaf:HF})))]),vp=co(cQ),Pse=Af("type",{directory:vp,leaf:HF}),uQ=[ca,Dc("items",Pse),hd("onLeafAction"),hd("onToggleExpand"),$("defaultExpandedIds",[],Cn),Zi("defaultSelectedId")],zF=co(uQ),L2=iu.concat([mu("filetype","file",["image","media","file"]),Zf,Zi("picker_text")]),Z6=co(L2),UF=co([xw,R5]),MR=t=>sa("items","items",sc(),Wc(Cg(s=>ei(`Checking item of ${t}`,PR,s).fold(d=>Ro.error(Mu(d)),d=>Ro.value(d))))),PR=oa(()=>Af("type",{alertbanner:IX,bar:co(BX(MR("bar"))),button:PX,checkbox:LX,colorinput:UX,colorpicker:RS,dropzone:IF,grid:co(ZX(MR("grid"))),iframe:PF,input:LF,listbox:FF,selectbox:$F,sizeinput:Uv,slider:U6,textarea:Eu,urlinput:Z6,customeditor:H6,htmlpanel:KX,imagepreview:YX,collection:VX,label:co(eQ(MR("label"))),table:VF,tree:zF,panel:WF})),dQ=[ca,Qe("classes",[]),Dc("items",PR)],WF=co(dQ),F2=[N5("tab"),vI,Dc("items",PR)],Lse=[ca,py("tabs",F2)],fQ=co(Lse),mQ=TR,Fse=DR,hQ=co([Gi("title"),Ts("body",Af("type",{panel:WF,tabpanel:fQ})),za("size","normal"),$("buttons",[],Fse),Qe("initialData",{}),bi("onAction",X),bi("onChange",X),bi("onSubmit",X),bi("onClose",X),bi("onCancel",X),bi("onTabChange",X)]),gQ=t=>ei("dialog",hQ,t),OS=co([ol("type",["cancel","custom"]),...mQ]),pQ=co([Gi("title"),Gi("url"),bm("height"),bm("width"),Pu("buttons",OS),bi("onAction",X),bi("onCancel",X),bi("onClose",X),bi("onMessage",X)]),vQ=t=>ei("dialog",pQ,t),q6=t=>E(t)?[t].concat(Ue(Or(t),q6)):N(t)?Ue(t,q6):[],yQ=t=>C(t.type)&&C(t.name),$se={checkbox:FX,colorinput:WX,colorpicker:RR,dropzone:BF,input:JX,iframe:OR,imagepreview:XX,selectbox:rQ,sizeinput:IR,slider:P2,listbox:oQ,size:IR,textarea:G6,urlinput:UF,customeditor:jX,collection:HX,togglemenuitem:OX},e=t=>F.from($se[t.type]),n=t=>Nn(q6(t),yQ),o=t=>{const s=n(t),d=Ue(s,g=>e(g).fold(()=>[],b=>[Ts(g.name,b)]));return co(d)},u=t=>{var s;const d=Ut(gQ(t)),g=o(t),b=(s=t.initialData)!==null&&s!==void 0?s:{};return{internalDialog:d,dataValidator:g,initialData:b}},h={open:(t,s)=>{const d=u(s);return t(d.internalDialog,d.initialData,d.dataValidator)},openUrl:(t,s)=>{const d=Ut(vQ(s));return t(d)},redial:t=>u(t)};var w=Object.freeze({__proto__:null,events:(t,s)=>{const d=(g,b)=>{t.updateState.each(S=>{const k=S(g,b);s.set(k)}),t.renderComponents.each(S=>{const k=S(b,s.get());(t.reuseDom?x4:zb)(g,k)})};return $r([Nt(Fu(),(g,b)=>{const S=b;if(!S.universal){const k=t.channel;at(S.channels,k)&&d(g,S.data)}}),Zr((g,b)=>{t.initialData.each(S=>{d(g,S)})})])}}),O=Object.freeze({__proto__:null,getState:(t,s,d)=>d}),L=[Rt("channel"),Ds("renderComponents"),Ds("updateState"),Ds("initialData"),Ei("reuseDom",!0)],J=Object.freeze({__proto__:null,init:()=>{const t=Zn(F.none()),s=()=>t.set(F.none());return{readState:()=>t.get().getOr("none"),get:t.get,set:t.set,clear:s}}});const te=sl({fields:L,name:"reflecting",active:w,apis:O,state:J}),me=t=>{const s=[],d={};return ks(t,(g,b)=>{g.fold(()=>{s.push(b)},S=>{d[b]=S})}),s.length>0?Ro.error(s):Ro.value(d)},Se=(t,s,d,g)=>{const b=er(g2.sketch(S=>({dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:Ze(t.items,k=>IP(S,k,s,d,g))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[b.asSpec()]}],behaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)}),Qu.memento(b),NM(b,{postprocess:S=>me(S).fold(k=>(console.error(k),{}),xe)}),Po("dialog-body-panel",[Nt(Ud(),(S,k)=>{S.getSystem().broadcastOn([Jw],{newFocus:F.some(k.event.target)})})])])}},ge=(t,s)=>({uid:t.uid,dom:t.dom,components:t.components,events:sk(t.action),behaviours:Za(t.tabButtonBehaviours,[vo.config({}),qn.config({mode:"execution",useSpace:!0,useEnter:!0}),xn.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}),Ee=Ic({name:"TabButton",configFields:[Qe("uid",void 0),Rt("value"),sa("dom","dom",oh(()=>({attributes:{role:"tab",id:kn("aria"),"aria-selected":"false"}})),du()),Ds("action"),Qe("domModification",{}),Ga("tabButtonBehaviours",[vo,qn,xn]),Rt("view")],factory:ge}),ze=ee([Rt("tabs"),Rt("dom"),Qe("clickToDismiss",!1),Ga("tabbarBehaviours",[mn,qn]),Pf(["tabClass","selectedClass"])]),Xe=Nb({factory:Ee,name:"tabs",unit:"tab",overrides:t=>{const s=(g,b)=>{mn.dehighlight(g,b),oo(g,s3(),{tabbar:g,button:b})},d=(g,b)=>{mn.highlight(g,b),oo(g,o3(),{tabbar:g,button:b})};return{action:g=>{const b=g.getSystem().getByUid(t.uid).getOrDie(),S=mn.isHighlighted(b,g);(()=>S&&t.clickToDismiss?s:S?X:d)()(b,g)},domModification:{classes:[t.markers.tabClass]}}}}),qe=ee([Xe]),dt=(t,s,d,g)=>({uid:t.uid,dom:t.dom,components:s,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Za(t.tabbarBehaviours,[mn.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:(b,S)=>{tn(S.element,"aria-selected","true")},onDehighlight:(b,S)=>{tn(S.element,"aria-selected","false")}}),qn.config({mode:"flow",getInitial:b=>mn.getHighlighted(b).map(S=>S.element),selector:"."+t.markers.tabClass,executeOnMove:!0})])}),Ft=ql({name:"Tabbar",configFields:ze(),partFields:qe(),factory:dt}),on=(t,s)=>({uid:t.uid,dom:t.dom,behaviours:Za(t.tabviewBehaviours,[_o.config({})]),domModification:{attributes:{role:"tabpanel"}}}),En=Ic({name:"Tabview",configFields:[Ga("tabviewBehaviours",[_o])],factory:on}),At=ee([Qe("selectFirst",!0),hs("onChangeTab"),hs("onDismissTab"),Qe("tabs",[]),Ga("tabSectionBehaviours",[])]),yt=bl({factory:Ft,schema:[Rt("dom"),zd("markers",[Rt("tabClass"),Rt("selectedClass")])],name:"tabbar",defaults:t=>({tabs:t.tabs})}),Pt=bl({factory:En,name:"tabview"}),Bn=ee([yt,Pt]),Jn=(t,s,d,g)=>{const b=k=>{const R=xn.getValue(k);Xt(k,t,"tabview").each(I=>{vt(t.tabs,j=>j.value===R).each(j=>{const ne=j.view();se(k.element,"id").each(ae=>{tn(I.element,"aria-labelledby",ae)}),_o.set(I,ne),t.onChangeTab(I,k,ne)})})},S=(k,R)=>{Xt(k,t,"tabbar").each(I=>{R(I).each(hh)})};return{uid:t.uid,dom:t.dom,components:s,behaviours:Z0(t.tabSectionBehaviours),events:$r(St([t.selectFirst?[Zr((k,R)=>{S(k,mn.getFirst)})]:[],[Nt(o3(),(k,R)=>{const I=R.event.button;b(I)}),Nt(s3(),(k,R)=>{const I=R.event.button;t.onDismissTab(k,I)})]])),apis:{getViewItems:k=>Xt(k,t,"tabview").map(R=>_o.contents(R)).getOr([]),showTab:(k,R)=>{S(k,H=>{const j=mn.getCandidates(H);return vt(j,ae=>xn.getValue(ae)===R).filter(ae=>!mn.isHighlighted(H,ae))})}}}},Vo=ql({name:"TabSection",configFields:At(),partFields:Bn(),factory:Jn,apis:{getViewItems:(t,s)=>t.getViewItems(s),showTab:(t,s,d)=>{t.showTab(s,d)}}}),rs=(t,s,d)=>Ze(t,(g,b)=>{_o.set(d,t[b].view());const S=s.dom.getBoundingClientRect();return _o.set(d,[]),S.height}),js=t=>Os(Do(t,(s,d)=>s>d?-1:s<d?1:0)),pr=(t,s,d)=>{const g=Pa(t).dom,b=xm(t,".tox-dialog-wrap").getOr(t),S=or(b,"position")==="fixed";let k;S?k=Math.max(g.clientHeight,window.innerHeight):k=Math.max(g.offsetHeight,g.scrollHeight);const R=Nr(s),H=s.dom.offsetLeft>=d.dom.offsetLeft+Fa(d)?Math.max(Nr(d),R):R,j=parseInt(or(t,"margin-top"),10)||0,ne=parseInt(or(t,"margin-bottom"),10)||0,ue=Nr(t)+j+ne-H;return k-ue},Ti=(t,s)=>{Os(t).each(d=>Vo.showTab(s,d.value))},Sl=(t,s)=>{Rn(t,"height",s+"px"),Rn(t,"flex-basis",s+"px")},lr=(t,s,d)=>{xm(t,'[role="dialog"]').each(g=>{Qs(g,'[role="tablist"]').each(b=>{d.get().map(S=>(Rn(s,"height","0"),Rn(s,"flex-basis","0"),Math.min(S,pr(g,s,b)))).each(S=>{Sl(s,S)})})})},cn=t=>Qs(t,'[role="tabpanel"]'),Kn=t=>{const s=sr();return{extraEvents:[Zr(b=>{const S=b.element;cn(S).each(k=>{Rn(k,"visibility","hidden"),b.getSystem().getByDom(k).toOptional().each(R=>{const I=rs(t,k,R);js(I).fold(s.clear,s.set)}),lr(S,k,s),ns(k,"visibility"),Ti(t,b),requestAnimationFrame(()=>{lr(S,k,s)})})}),Nt(Zd(),b=>{const S=b.element;cn(S).each(k=>{lr(S,k,s)})}),Nt(VB,(b,S)=>{const k=b.element;cn(k).each(R=>{const I=tf(de(R));Rn(R,"visibility","hidden");const H=vr(R,"height").map(ae=>parseInt(ae,10));ns(R,"height"),ns(R,"flex-basis");const j=R.dom.getBoundingClientRect().height;H.forall(ae=>j>ae)?(s.set(j),lr(k,R,s)):H.each(ae=>{Sl(R,ae)}),ns(R,"visibility"),I.each(hu)})})],selectFirst:!1}},Rs="send-data-to-section",gn="send-data-to-view",ao=(t,s,d,g)=>{const b=Zn({}),S=j=>{const ne=xn.getValue(j),ae=me(ne).getOr({}),ue=b.get(),he=Dr(ue,ae);b.set(he)},k=j=>{const ne=b.get();xn.setValue(j,ne)},R=Zn(null),I=Ze(t.tabs,j=>({value:j.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[xi(d.shared.providers.translate(j.title))],view:()=>[g2.sketch(ne=>({dom:{tag:"div",classes:["tox-form"]},components:Ze(j.items,ae=>IP(ne,ae,s,d,g)),formBehaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)}),Po("TabView.form.events",[Zr(k),If(S)]),Nc.config({channels:Is([{key:Rs,value:{onReceive:S}},{key:gn,value:{onReceive:k}}])})])}))]})),H=Kn(I);return Vo.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(j,ne,ae)=>{const ue=xn.getValue(ne);oo(j,$B,{name:ue,oldName:R.get()}),R.set(ue)},tabs:I,components:[Vo.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Ft.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Qt([zr.config({})])}),Vo.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:H.selectFirst,tabSectionBehaviours:Qt([Po("tabpanel",H.extraEvents),qn.config({mode:"acyclic"}),gs.config({find:j=>Os(Vo.getViewItems(j))}),Iv(F.none(),j=>(j.getSystem().broadcastOn([Rs],{}),b.get()),(j,ne)=>{b.set(ne),j.getSystem().broadcastOn([gn],{})})])})},Yo=(t,s,d,g,b,S)=>{const k=H=>{const j=H.body;switch(j.type){case"tabpanel":return[ao(j,H.initialData,g,S)];default:return[Se(j,H.initialData,g,S)]}},R=(H,j)=>F.some({isTabPanel:()=>j.body.type==="tabpanel"}),I={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...d.map(H=>({id:H})).getOr({}),...b?I:{}}},components:[],behaviours:Qt([Qu.childAt(0),te.config({channel:`${zM}-${s}`,updateState:R,renderComponents:k,initialData:t})])}},wn=(t,s,d,g,b,S)=>Yo(t,s,F.some(d),g,b,S),Xo=(t,s,d,g)=>{const b=Yo(t,s,F.none(),d,!1,g);return qa.parts.body(b)},as=t=>{const s={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[$M(F.none(),{dom:{tag:"iframe",attributes:{src:t.url}},behaviours:Qt([zr.config({}),vo.config({})])})]}],behaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)})])};return qa.parts.body(s)},Ka=Wb.deviceType.isTouch(),tr=(t,s)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,s]}),Ca=(t,s)=>qa.parts.close(Fl.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":s.translate("Close")}},action:t,buttonBehaviours:Qt([zr.config({})])})),Dd=()=>qa.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),nm=(t,s)=>qa.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Pm(`<p>${c5(s.translate(t))}</p>`)}]}]}),yc=t=>qa.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t}),ku=(t,s)=>[Hm.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Hm.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:s})],Ju=t=>{const s="tox-dialog",d=s+"-wrap",g=d+"__backdrop",b=s+"__disable-scroll";return qa.sketch({lazySink:t.lazySink,onEscape:S=>(t.onEscape(S),F.some(!0)),useTabstopAt:S=>!p2(S),firstTabstop:t.firstTabstop,dom:{tag:"div",classes:[s].concat(t.extraClasses),styles:{position:"relative",...t.extraStyles}},components:[t.header,t.body,...t.footer.toArray()],parts:{blocker:{dom:Pm(`<div class="${d}"></div>`),components:[{dom:{tag:"div",classes:Ka?[g,g+"--opaque"]:[g]}}]}},dragBlockClass:d,modalBehaviours:Qt([vo.config({}),Po("dialog-events",t.dialogEvents.concat([zp(Ud(),(S,k)=>{Gm.isBlocked(S)?X():qn.focusIn(S)}),Nt(Eg(),(S,k)=>{S.getSystem().broadcastOn([Jw],{newFocus:k.event.newFocus})})])),Po("scroll-lock",[Zr(()=>{Vr(Io(),b)}),If(()=>{mi(Io(),b)})]),...t.extraBehaviours]),eventOrder:{[$u()]:["dialog-events"],[ac()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Vu()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...t.eventOrder}})},xu=t=>Fl.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:Qt([zr.config({}),Cl.config(t.tooltips.getConfig({tooltipText:t.translate("Close")}))]),components:[_u("close",{tag:"span",classes:["tox-icon"]},t.icons)],action:s=>{zo(s,P1)}}),Rd=(t,s,d,g)=>{const b=S=>[xi(g.translate(S.title))];return{dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...d.map(S=>({id:S})).getOr({})}},components:[],behaviours:Qt([te.config({channel:`${HM}-${s}`,initialData:t,renderComponents:b})])}},eo=()=>({dom:Pm('<div class="tox-dialog__draghandle"></div>')}),bs=(t,s,d,g)=>Hm.sketch({dom:Pm('<div class="tox-dialog__header"></div>'),components:[Rd(t,s,F.some(d),g),eo(),xu(g)],containerBehaviours:Qt([Vv.config({mode:"mouse",blockerClass:"blocker",getTarget:b=>ef(b,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}),hi=(t,s,d)=>{const g=qa.parts.title(Rd(t,s,F.none(),d)),b=qa.parts.draghandle(eo()),S=qa.parts.close(xu(d)),k=[g].concat(t.draggable?[b]:[]).concat([S]);return Hm.sketch({dom:Pm('<div class="tox-dialog__header"></div>'),components:k})},Di=(t,s,d)=>hi({title:d.shared.providers.translate(t),draggable:d.dialog.isDraggableModal()},s,d.shared.providers),ua=(t,s,d,g)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":d.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${g.getOr(0)}px`,position:"absolute"}},behaviours:s,components:[{dom:Pm('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),dl=(t,s,d)=>({onClose:()=>d.closeWindow(),onBlock:g=>{const b=Qs(t().element,".tox-dialog__header").map(S=>Nr(S));qa.setBusy(t(),(S,k)=>ua(g.message,k,s,b))},onUnblock:()=>{qa.setIdle(t())}}),qi="tox-dialog--fullscreen",Pi="tox-dialog--width-lg",Yl="tox-dialog--width-md",ed=t=>{switch(t){case"large":return F.some(Pi);case"medium":return F.some(Yl);default:return F.none()}},hf=(t,s)=>{const d=He.fromDom(s.element.dom);Kc(d,qi)||(Yc(d,[Pi,Yl]),ed(t).each(g=>Vr(d,g)))},gf=(t,s)=>{const d=He.fromDom(t.element.dom),g=IA(d),b=vt(g,S=>S===Pi||S===Yl).or(ed(s));RA(d,[qi,...b.toArray()])},Od=(t,s,d)=>Ml(Ju({...t,firstTabstop:1,lazySink:d.shared.getSink,extraBehaviours:[Tx({}),...t.extraBehaviours],onEscape:g=>{zo(g,P1)},dialogEvents:s,eventOrder:{[Fu()]:[te.name(),Nc.name()],[ac()]:["scroll-lock",te.name(),"messages","dialog-events","alloy.base.behaviour"],[Vu()]:["alloy.base.behaviour","dialog-events","messages",te.name(),"scroll-lock"]}})),eg=(t,s={})=>{const d=g=>{const b=Ze(g.items,S=>{const k=Yt(s,S.name).getOr(Zn(!1));return{...S,storage:k}});return{...g,items:b}};return Ze(t,g=>g.type==="menu"?d(g):g)},Wv=t=>Fo(t,(s,d)=>d.type==="menu"?Fo(d.items,(b,S)=>(b[S.name]=S.storage,b),s):s,{}),jv=(t,s)=>[hC(Ud(),Yj),t(Vw,(d,g,b,S)=>{tf(de(S.element)).fold(X,B0),s.onClose(),g.onClose()}),t(P1,(d,g,b,S)=>{g.onCancel(d),zo(S,Vw)}),Nt(mD,(d,g)=>s.onUnblock()),Nt(mx,(d,g)=>s.onBlock(g.event))],LR=(t,s)=>{const d=(b,S)=>Nt(b,(k,R)=>{g(k,(I,H)=>{S(t(),I,R.event,k)})}),g=(b,S)=>{te.getState(b).get().each(k=>{S(k,b)})};return[...jv(d,s),d(Zh,(b,S,k)=>{S.onAction(b,{name:k.name})})]},tg=(t,s,d)=>{const g=(S,k)=>Nt(S,(R,I)=>{b(R,(H,j)=>{k(t(),H,I.event,R)})}),b=(S,k)=>{te.getState(S).get().each(R=>{k(R.internalDialog,S)})};return[...jv(g,s),g(c2,(S,k)=>k.onSubmit(S)),g(wu,(S,k,R)=>{k.onChange(S,{name:R.name})}),g(Zh,(S,k,R,I)=>{const H=()=>I.getSystem().isConnected()?qn.focusIn(I):void 0,j=ue=>ye(ue,"disabled")||se(ue,"aria-disabled").exists(he=>he==="true"),ne=de(I.element),ae=tf(ne);k.onAction(S,{name:R.name,value:R.value}),tf(ne).fold(H,ue=>{j(ue)||ae.exists(he=>wi(ue,he)&&j(he))?H():d().toOptional().filter(he=>!wi(he.element,ue)).each(H)})}),g($B,(S,k,R)=>{k.onTabChange(S,{newTabName:R.name,oldTabName:R.oldName})}),If(S=>{const k=t();xn.setValue(S,k.getData())})]},K6=(t,s)=>Mv(t,t.type,s),jF=(t,s,d)=>vt(s,g=>g.name===d).bind(g=>g.memento.getOpt(t)),bc=(t,s)=>{const d=s.map(R=>R.footerButtons).getOr([]),g=po(d,R=>R.align==="start"),b=(R,I)=>Hm.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${R}`]},components:Ze(I,H=>H.memento.asSpec())}),S=b("start",g.pass),k=b("end",g.fail);return[S,k]},G1=(t,s,d)=>{const g=(b,S)=>{const k=Ze(S.buttons,I=>{const H=er(K6(I,d));return{name:I.name,align:I.align,memento:H}}),R=I=>jF(b,k,I);return F.some({lookupByName:R,footerButtons:k})};return{dom:Pm('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Qt([te.config({channel:`${UM}-${s}`,initialData:t,updateState:g,renderComponents:bc})])}},GF=(t,s,d)=>G1(t,s,d),Y6=(t,s,d)=>qa.parts.footer(G1(t,s,d)),pf=(t,s)=>{if(t.getRoot().getSystem().isConnected()){const g=gs.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return g2.getField(g,s).orThunk(()=>t.getFooter().bind(k=>te.getState(k).get()).bind(k=>k.lookupByName(s)))}else return F.none()},NS=(t,s)=>{const d=t.getRoot();return te.getState(d).get().map(g=>Ut(ei("data",g.dataValidator,s))).getOr(s)},ht=(t,s,d)=>{const g=he=>{const ke=t.getRoot();ke.getSystem().isConnected()&&he(ke)},ue={getData:()=>{const he=t.getRoot(),ke=he.getSystem().isConnected()?t.getFormWrapper():he,ot=xn.getValue(ke),Ie=Cs(d,Je=>Je.get());return{...ot,...Ie}},setData:he=>{g(ke=>{const ot=ue.getData(),Ie=Dr(ot,he),Je=NS(t,Ie),Ye=t.getFormWrapper();xn.setValue(Ye,Je),ks(d,(It,gt)=>{Qo(Ie,gt)&&It.set(Ie[gt])})})},setEnabled:(he,ke)=>{pf(t,he).each(ke?ho.enable:ho.disable)},focus:he=>{pf(t,he).each(vo.focus)},block:he=>{if(!C(he))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");g(ke=>{oo(ke,mx,{message:he})})},unblock:()=>{g(he=>{zo(he,mD)})},showTab:he=>{g(ke=>{const ot=t.getBody();te.getState(ot).get().exists(Je=>Je.isTabPanel())&&gs.getCurrent(ot).each(Je=>{Vo.showTab(Je,he)})})},redial:he=>{g(ke=>{const ot=t.getId(),Ie=s(he),Je=eg(Ie.internalDialog.buttons,d);ke.getSystem().broadcastOn([`${Qw}-${ot}`],Ie),ke.getSystem().broadcastOn([`${HM}-${ot}`],Ie.internalDialog),ke.getSystem().broadcastOn([`${zM}-${ot}`],Ie.internalDialog),ke.getSystem().broadcastOn([`${UM}-${ot}`],{...Ie.internalDialog,buttons:Je}),ue.setData(Ie.initialData)})},close:()=>{g(he=>{zo(he,Vw)})},toggleFullscreen:t.toggleFullscreen};return ue},bt=(t,s,d)=>{const g=kn("dialog"),b=t.internalDialog,S=Di(b.title,g,d),k=Zn(b.size),R=Ye=>pf(Ie,Ye),I=ed(k.get()).toArray(),H=(Ye,It)=>(k.set(It.internalDialog.size),hf(It.internalDialog.size,Ye),F.some(It)),j=Xo({body:b.body,initialData:b.initialData},g,d,R),ne=eg(b.buttons),ae=Wv(ne),ue=Wn(ne.length!==0,Y6({buttons:ne},g,d)),he=tg(()=>Je,dl(()=>ot,d.shared.providers,s),d.shared.getSink),ke={id:g,header:S,body:j,footer:ue,extraClasses:I,extraBehaviours:[te.config({channel:`${Qw}-${g}`,updateState:H,initialData:t})],extraStyles:{}},ot=Od(ke,he,d),Ie=(()=>{const Ye=()=>{const gt=qa.getBody(ot);return gs.getCurrent(gt).getOr(gt)},It=()=>{gf(ot,k.get())};return{getId:ee(g),getRoot:ee(ot),getBody:()=>qa.getBody(ot),getFooter:()=>qa.getFooter(ot),getFormWrapper:Ye,toggleFullscreen:It}})(),Je=ht(Ie,s.redial,ae);return{dialog:ot,instanceApi:Je}},ln=(t,s,d,g=!1,b)=>{const S=kn("dialog"),k=kn("dialog-label"),R=kn("dialog-content"),I=t.internalDialog,H=Hn=>pf(dn,Hn),j=Zn(I.size),ne=ed(j.get()).toArray(),ae=(Hn,Tn)=>(j.set(Tn.internalDialog.size),hf(Tn.internalDialog.size,Hn),b(),F.some(Tn)),ue=er(bs({title:I.title,draggable:!0},S,k,d.shared.providers)),he=er(wn({body:I.body,initialData:I.initialData},S,R,d,g,H)),ke=eg(I.buttons),ot=Wv(ke),Ie=Wn(ke.length!==0,er(GF({buttons:ke},S,d))),Je=tg(()=>Ot,{onBlock:Hn=>{Gm.block(gt,(Tn,lo)=>{const to=ue.getOpt(gt).map(Bs=>Nr(Bs.element));return ua(Hn.message,lo,d.shared.providers,to)})},onUnblock:()=>{Gm.unblock(gt)},onClose:()=>s.closeWindow()},d.shared.getSink),Ye="tox-dialog-inline",It=zl().os,gt=Ml({dom:{tag:"div",classes:["tox-dialog",Ye,...ne],attributes:{role:"dialog",...It.isMacOS()?{"aria-label":I.title}:{"aria-labelledby":k}}},eventOrder:{[Fu()]:[te.name(),Nc.name()],[$u()]:["execute-on-form"],[ac()]:["reflecting","execute-on-form"]},behaviours:Qt([qn.config({mode:"cyclic",onEscape:Hn=>(zo(Hn,Vw),F.some(!0)),useTabstopAt:Hn=>!p2(Hn)&&(Ls(Hn)!=="button"||Ys(Hn,"disabled")!=="disabled"),firstTabstop:1}),te.config({channel:`${Qw}-${S}`,updateState:ae,initialData:t}),vo.config({}),Po("execute-on-form",Je.concat([zp(Ud(),(Hn,Tn)=>{qn.focusIn(Hn)}),Nt(Eg(),(Hn,Tn)=>{Hn.getSystem().broadcastOn([Jw],{newFocus:Tn.event.newFocus})})])),Gm.config({getRoot:()=>F.some(gt)}),_o.config({}),Tx({})]),components:[ue.asSpec(),he.asSpec(),...Ie.map(Hn=>Hn.asSpec()).toArray()]}),Jt=()=>{gf(gt,j.get())},dn={getId:ee(S),getRoot:ee(gt),getFooter:()=>Ie.map(Hn=>Hn.get(gt)),getBody:()=>he.get(gt),getFormWrapper:()=>{const Hn=he.get(gt);return gs.getCurrent(Hn).getOr(Hn)},toggleFullscreen:Jt},Ot=ht(dn,s.redial,ot);return{dialog:gt,instanceApi:Ot}};var en=tinymce.util.Tools.resolve("tinymce.util.URI");const go=t=>{const s=k=>{t.getSystem().isConnected()&&k(t)};return{block:k=>{if(!C(k))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s(R=>{oo(R,mx,{message:k})})},unblock:()=>{s(k=>{zo(k,mD)})},close:()=>{s(k=>{zo(k,Vw)})},sendMessage:k=>{s(R=>{R.getSystem().broadcastOn([WM],k)})}}},cs=["insertContent","setContent","execCommand","close","block","unblock"],li=t=>E(t)&&cs.indexOf(t.mceAction)!==-1,om=t=>!li(t)&&E(t)&&Qo(t,"mceAction"),X6=(t,s,d)=>{switch(d.mceAction){case"insertContent":t.insertContent(d.content);break;case"setContent":t.setContent(d.content);break;case"execCommand":const g=U(d.ui)?d.ui:!1;t.execCommand(d.cmd,g,d.value);break;case"close":s.close();break;case"block":s.block(d.message);break;case"unblock":s.unblock();break}},bQ=(t,s,d,g)=>{const b=kn("dialog"),S=Di(t.title,b,g),k=as(t),R=t.buttons.bind(Ye=>Ye.length===0?F.none():F.some(Y6({buttons:Ye},b,g))),I=LR(()=>Je,dl(()=>Ie,g.shared.providers,s)),H={...t.height.fold(()=>({}),Ye=>({height:Ye+"px","max-height":Ye+"px"})),...t.width.fold(()=>({}),Ye=>({width:Ye+"px","max-width":Ye+"px"}))},j=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],ne=new en(t.url,{base_uri:new en(window.location.href)}),ae=`${ne.protocol}://${ne.host}${ne.port?":"+ne.port:""}`,ue=ji(),he=(Ye,It)=>F.some(It),ke=[te.config({channel:`${Qw}-${b}`,updateState:he,initialData:t}),Po("messages",[Zr(()=>{const Ye=fc(He.fromDom(window),"message",It=>{if(ne.isSameOrigin(new en(It.raw.origin))){const gt=It.raw.data;li(gt)?X6(d,Je,gt):om(gt)&&t.onMessage(Je,gt)}});ue.set(Ye)}),If(ue.clear)]),Nc.config({channels:{[WM]:{onReceive:(Ye,It)=>{Qs(Ye.element,"iframe").each(gt=>{const Jt=gt.dom.contentWindow;K(Jt)&&Jt.postMessage(It,ae)})}}}})],Ie=Od({id:b,header:S,body:k,footer:R,extraClasses:j,extraBehaviours:ke,extraStyles:H},I,g),Je=go(Ie);return{dialog:Ie,instanceApi:Je}},Q6=t=>{const s=t.shared;return{open:(g,b)=>{const S=()=>{qa.hide(H),b()},k=er(Mv({name:"close-alert",text:"OK",primary:!0,buttonType:F.some("primary"),align:"end",enabled:!0,icon:F.none()},"cancel",t)),R=Dd(),I=Ca(S,s.providers),H=Ml(Ju({lazySink:()=>s.getSink(),header:tr(R,I),body:nm(g,s.providers),footer:F.some(yc(ku([],[k.asSpec()]))),onEscape:S,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nt(P1,S)],eventOrder:{}}));qa.show(H);const j=k.get(H);vo.focus(j)}}},yp=t=>{const s=t.shared;return{open:(g,b)=>{const S=ae=>{qa.hide(j),b(ae)},k=er(Mv({name:"yes",text:"Yes",primary:!0,buttonType:F.some("primary"),align:"end",enabled:!0,icon:F.none()},"submit",t)),R=Mv({name:"no",text:"No",primary:!1,buttonType:F.some("secondary"),align:"end",enabled:!0,icon:F.none()},"cancel",t),I=Dd(),H=Ca(()=>S(!1),s.providers),j=Ml(Ju({lazySink:()=>s.getSink(),header:tr(I,H),body:nm(g,s.providers),footer:F.some(yc(ku([],[R,k.asSpec()]))),onEscape:()=>S(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nt(P1,()=>S(!1)),Nt(c2,()=>S(!0))],eventOrder:{}}));qa.show(j);const ne=k.get(j);vo.focus(ne)}}},FR=(t,s)=>Ut(ei("data",s,t)),$R=t=>Fw(t,".tox-alert-dialog")||Fw(t,".tox-confirm-dialog"),ZF=(t,s,d)=>s&&d?[]:[ai.config({contextual:{lazyContext:()=>F.some(Jr(He.fromDom(t.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:g=>ip(t,g.element).map(S=>({bounds:mv(S),optScrollEnv:F.some({currentScrollTop:S.element.dom.scrollTop,scrollElmTop:Ji(S.element).top})})).getOrThunk(()=>({bounds:Ni(),optScrollEnv:F.none()}))})],qF=t=>{const s=t.editor,d=qb(s),g=Q6(t.backstages.dialog),b=yp(t.backstages.dialog),S=(he,ke,ot)=>{if(!z(ke)){if(ke.inline==="toolbar")return H(he,t.backstages.popup.shared.anchors.inlineDialog(),ot,ke);if(ke.inline==="bottom")return j(he,t.backstages.popup.shared.anchors.inlineBottomDialog(),ot,ke);if(ke.inline==="cursor")return H(he,t.backstages.popup.shared.anchors.cursor(),ot,ke)}return I(he,ot)},k=(he,ke)=>R(he,ke),R=(he,ke)=>{const ot=Ie=>{const Je=bQ(Ie,{closeWindow:()=>{qa.hide(Je.dialog),ke(Je.instanceApi)}},s,t.backstages.dialog);return qa.show(Je.dialog),Je.instanceApi};return h.openUrl(ot,he)},I=(he,ke)=>{const ot=(Ie,Je,Ye)=>{const It=Je,Jt=bt({dataValidator:Ye,initialData:It,internalDialog:Ie},{redial:h.redial,closeWindow:()=>{qa.hide(Jt.dialog),ke(Jt.instanceApi)}},t.backstages.dialog);return qa.show(Jt.dialog),Jt.instanceApi.setData(It),Jt.instanceApi};return h.open(ot,he)},H=(he,ke,ot,Ie)=>{const Je=(Ye,It,gt)=>{const Jt=FR(It,gt),dn=sr(),Ot=t.backstages.popup.shared.header.isPositionedAtTop(),Hn={dataValidator:gt,initialData:Jt,internalDialog:Ye},Tn=()=>dn.on(Ss=>{ti.reposition(Ss),(!d||!Ot)&&ai.refresh(Ss)}),lo=ln(Hn,{redial:h.redial,closeWindow:()=>{dn.on(ti.hide),s.off("ResizeEditor",Tn),dn.clear(),ot(lo.instanceApi)}},t.backstages.popup,Ie.ariaAttrs,Tn),to=Ml(ti.sketch({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:Ie.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Qt([Po("window-manager-inline-events",[Nt(fh(),(Ss,es)=>{zo(lo.dialog,P1)})]),...ZF(s,d,Ot)]),isExtraPart:(Ss,es)=>$R(es)}));dn.set(to);const Bs=()=>{const Ss=s.inline?Io():He.fromDom(s.getContainer()),es=Jr(Ss);return F.some(es)};return ti.showWithinBounds(to,jl(lo.dialog),{anchor:ke},Bs),(!d||!Ot)&&(ai.refresh(to),s.on("ResizeEditor",Tn)),lo.instanceApi.setData(Jt),qn.focusIn(lo.dialog),lo.instanceApi};return h.open(Je,he)},j=(he,ke,ot,Ie)=>{const Je=(Ye,It,gt)=>{const Jt=FR(It,gt),dn=sr(),Ot=t.backstages.popup.shared.header.isPositionedAtTop(),Hn={dataValidator:gt,initialData:Jt,internalDialog:Ye},Tn=()=>dn.on(Ss=>{ti.reposition(Ss),ai.refresh(Ss)}),lo=ln(Hn,{redial:h.redial,closeWindow:()=>{dn.on(ti.hide),s.off("ResizeEditor ScrollWindow ElementScroll",Tn),dn.clear(),ot(lo.instanceApi)}},t.backstages.popup,Ie.ariaAttrs,Tn),to=Ml(ti.sketch({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:Ie.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Qt([Po("window-manager-inline-events",[Nt(fh(),(Ss,es)=>{zo(lo.dialog,P1)})]),ai.config({contextual:{lazyContext:()=>F.some(Jr(He.fromDom(s.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:Ss=>ip(s,Ss.element).map(rn=>({bounds:mv(rn),optScrollEnv:F.some({currentScrollTop:rn.element.dom.scrollTop,scrollElmTop:Ji(rn.element).top})})).getOrThunk(()=>({bounds:Ni(),optScrollEnv:F.none()}))})]),isExtraPart:(Ss,es)=>$R(es)}));dn.set(to);const Bs=()=>t.backstages.popup.shared.getSink().toOptional().bind(Ss=>{const es=ip(s,Ss.element),rn=15,Mn=es.map(so=>mv(so)).getOr(Ni()),No=Jr(He.fromDom(s.getContentAreaContainer())),fo=gg(No,Mn);return F.some(Tr(fo.x,fo.y,fo.width,fo.height-rn))});return ti.showWithinBounds(to,jl(lo.dialog),{anchor:ke},Bs),ai.refresh(to),s.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",Tn),lo.instanceApi.setData(Jt),qn.focusIn(lo.dialog),lo.instanceApi};return h.open(Je,he)};return{open:S,openUrl:k,alert:(he,ke)=>{g.open(he,ke)},close:he=>{he.close()},confirm:(he,ke)=>{b.open(he,ke)}}},CQ=t=>{wN(t),$U(t),xY(t)};var ls=()=>{Vd.add("silver",t=>{CQ(t);let s=()=>Ni();const{dialogs:d,popups:g,renderUI:b}=kX(t,{getPopupSinkBounds:()=>s()}),S=()=>{const H=b();return ip(t,g.getMothership().element).each(ne=>{s=()=>mv(ne)}),H};NW.register(t,g.backstage.shared);const k=qF({editor:t,backstages:{popup:g.backstage,dialog:d.backstage}}),R=sr(),I=()=>Hz(t,{backstage:g.backstage},g.getMothership(),R);return{renderUI:S,getWindowManagerImpl:ee(k),getNotificationManagerImpl:I}})};ls()}();const jbe={class:"ik__tinymce__editor"},Gbe=f.defineComponent({__name:"index",props:{modelValue:{type:String,default:""},setting:{type:Object,default:()=>{}},disabled:{type:Boolean,default:!1},minHeight:{type:Number,default:250},maxHeight:{type:Number,default:null},collapse:{type:Boolean,default:!1},plugins:{type:String,default:"autolink autoresize fullscreen image insertdatetime link lists media preview table wordcount code searchreplace"},toolbar:{type:String,default:"undo redo | blocks | fontfamily fontsize | bold italic underline strikethrough | image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor removeformat | link table insertdatetime searchreplace | preview code fullscreen"},branding:{type:Boolean,default:!1},menubar:{type:Boolean,default:!1},selector:{type:String||null,default:null},callback:{type:Function,default:null},size:{type:Number,default:5},uploadUrl:{type:String,default:""},loadUrl:{type:String,default:""},header:{type:Object,default:()=>{}}},emits:["update:modelValue"],setup(c,{emit:r}){f.useCssVars(V=>({"79d0ee68":N.value}));const a=c,l=r,i=wo.ikDom.getDomDataset(null,"theme")==="light",{cLoadUrl:m,cUploadUrl:v}=Xv(a);console.log("cLoadUrl",m,v);const C=f.ref({license_key:"gpl",font_size_input_default_unit:"px",font_size_formats:"8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 36px 48px 72px",language_url:"tinymce/langs/zh-Hans.js",font_family_formats:"系统字体=Source Han Sans CN Medium;宋体=SimSun;sans-serif;微软雅黑=Microsoft YaHei; Helvetica; Tahoma; Arial",language:"zh-Hans",skin_url:i?"tinymce/skins/ui/oxide":"tinymce/skins/ui/oxide-dark",content_css:i?"tinymce/skins/content/default/content.min.css":"tinymce/skins/content/dark/content.min.css",min_height:a.minHeight,max_height:a.maxHeight,selector:a.selector,plugins:a.plugins,toolbar:a.toolbar,branding:a.branding,menubar:a.menubar,toolbar_mode:"sliding",insertdatetime_formats:["%Y年%m月%d日","%H点%M分%S秒","%Y-%m-%d","%H:%M:%S"],images_upload_handler:(V,U,z,W)=>new Promise((K,Z)=>{if(a.callback){a.callback(V,W).then(ce=>{K(ce)});return}if(V.blob().size/1024/1024>a.size)Z(new Error(`上传错误,图片大小请控制在 ${a.size}M 以内`));else{if(!v.value){Z(new Error("请传入uploadUrl"));return}const ce=new FormData;ce.append("file",V.blob());const q={headers:{"Content-Type":"multipart/form-data",...a.header}};e$.post(v.value,ce,q).then(X=>{X.data.code===0?K(m.value+X.data.data.id):Z(new Error(`HTTP Error: 上传失败${X.data.code}`))}).catch(()=>{Z(new Error("上传出错,服务器开小差了呢"))})}})}),E=f.ref(a.modelValue),T=f.computed(()=>Object.assign(C.value,a.setting));f.watch(()=>E.value,V=>{l("update:modelValue",V)}),f.watch(()=>a.modelValue,V=>{E.value=V});const N=f.computed(()=>`${a.collapse?50:a.maxHeight}px`);return f.onMounted(()=>{Dbe.init({})}),(V,U)=>(f.openBlock(),f.createElementBlock("div",jbe,[f.createVNode(f.unref(Wbe),{modelValue:E.value,"onUpdate:modelValue":U[0]||(U[0]=z=>E.value=z),init:T.value,disabled:c.disabled},null,8,["modelValue","init","disabled"])]))}}),U3e="",W3e="",Zbe=Gs(Gbe),qbe={class:"align-center flex justify-between"},Kbe={class:"align-center flex"},Ybe={style:{overflow:"hidden"}},Xbe=f.defineComponent({__name:"index",props:f.mergeModels({showToggle:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const r=f.useModel(c,"modelValue"),a=()=>{r.value=!r.value};return(l,i)=>{const m=f.resolveComponent("el-button"),v=f.resolveComponent("el-card");return f.openBlock(),f.createBlock(v,{class:f.normalizeClass(["ik-collapse-box-card",r.value?"hiddened":""]),shadow:"hover"},{header:f.withCtx(()=>[f.createElementVNode("div",qbe,[f.createCommentVNode(" card header左侧内容 "),f.renderSlot(l.$slots,"header-leaft",{},void 0,!0),f.createElementVNode("div",Kbe,[f.createCommentVNode(" card header右侧内容 "),f.renderSlot(l.$slots,"header-right",{},void 0,!0),f.createCommentVNode(" 展开、收起按钮 "),c.showToggle?(f.openBlock(),f.createBlock(m,{key:0,link:"",class:"ml-[8px]",onClick:i[0]||(i[0]=C=>a())},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(r.value?"展开":"收起")+" ",1),f.createVNode(f.unref(cr),{name:"iksvg_shouqi",size:16,class:f.normalizeClass(r.value?"toogle":null)},null,8,["class"])]),_:1})):f.createCommentVNode("v-if",!0)])])]),default:f.withCtx(()=>[f.createElementVNode("div",Ybe,[f.renderSlot(l.$slots,"default",{},void 0,!0)])]),_:3},8,["class"])}}}),j3e="",Qbe=Gs(Zs(Xbe,[["__scopeId","data-v-eab56bfd"]])),Jbe="data:image/webp;base64,UklGRsQNAABXRUJQVlA4WAoAAAAwAAAAxwAAxwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBItgcAAA3wh+3/2cj//133toP17HZn1rZt27aNp7F42rZt27afs/buPNc2R9vZnbb3P5p02jTJ8+VXREwA//f///3/vw/6G6cnW+zsgayA+/DPn1gZyxevWnvVy+8WugrfogtIzJRuM9tc+VWRmt/Qq/jmp15SJyr/Dglc59EtV4WjG3Ij0OQC30x1nvIfkNCyqPEcjcb/CIbTkl50HN+7JPqM6rdFMwnTC55ynCUk/o1froqiiVnjLU6TPt8GvPcuiiKvpEk+TrsQO+weWGn2fV+T7xxnki0w6S2zb719DPIfcJpKafbQ+0czHT9nIHBkLk7bBHtsuD1kwunJ+b2Kb1qG42bYREpqthn89tNZHDjVJih7Ohp3n1rwd+G/rs64qvq6a377GzCrB7S8eela93cNQMqFD7m/6hFU3+f+1rWMWIf7X3prKhx8/W/Ar0sXVFv/Fn8H1z+yn//7/x+bFbsmZ61TF9GkxbmV+xJi4KKN2TXP357rGq5tsz7ceNlzar1mC3cGoFmfh93C7ORtigzjU8v5HjoUEKBVcKM7qDljP5Gjv8m32ozTh0QBxr7vDm49mQ+IFu/5pcVKXHEaBIW6xTe4gXbVTooCQr/MXGtdUXAaUAFGfKou4O6ziihASs9vLJU+8xwKAkqNMhucb7CexVR6rMmx0vWcU8F08FfqWOXnZWS9nYPnDgUQFEju8Z2FavcHAQVEqZy+3qnSnv9rV7W2N+ZPQ0Ux77Ql2zq3E6mCcb8fwg51+4GdUKnL59diKgokdfvRMq3rGwgKCJpebY3dlcyLTZsGB0C0b0cAUQBRoO2eE1a5B1NRDId5Pw/a27j3YnPnGUWUEhdEIIqpd+7aFdboDyBK1A2r/GBvM988H4sBwTOIQmOMRQFBwdf1aJYVqtwRgSggCohCg4N5tuZv9HsMPHcGEYWMNBNEMW+7ygq3E7UoIKiUO2lrdPkjBpMIAkgTIkUBUUAUSMsLxs87wEQUcxUKsff624qWfAOIQkkMVTAXhZAQ/6EUURQQNO2MvZU9XbQLMK5kJCggKCCKp0Ru/C6JQlBAlMimm+ytkCKnXWQgHr+JEqkeBRWk8eb4tY3CVBSQtIKArW01aHxX3V+vOWPwOiAKxTD2hEUBCQsISqXD8dvcpEjGqtj6sojSH0H3blMi6tUnUrQg2WMAiAKiAKJK/K+5OSVCUBAUEAV2E9uQ1yZCv0f0BhiUeQaYRKQooUPVjERBFAQFyLLAr9curl+qdEmvCsC5/LAqhI+djFFOaZvIJDKnNHBeAVlgELnvdOVkX1IynjASlrxzGhYltB0rrrpjW25OwTsjd9YS+PlV4rurtk38ZfCz9IB7ATxlzUQPbTuVfVqnZ2yvi/D4OqwenPSn/CbEf3P1UvYwt9MF5yE8uGa9X4kMvT7DSBQE5cxzP7S8G1RIwDwECwa/G2QPzJ416QAUvLId44vK9StdukoKwLF8ROR4YUdA0AQAROPHMwtsgvZPLvqFaAvv+S4np/aiwmHw/DYMPSSuqKBx+9HT0yao8Manj0Zj+OcjXaYhiqlowsTTk16pUsWMjIzyfn8+tul7wD8vUIRIUaIUTRRR8IaiK1OrRo2aVatWrYA9T7n4np2784ogirkoop5wIggKvqBB8Yb1G9SvUycJm29xc51agR3bt2/P2lZgIAqiRp4wiDeYCB6NCNdv3qJZkwycM71uvXr1GtU5vGnjhnU7JQzekJE3BPgSI5xUMm3A3Tizt1bTZs1blt+Um5Lc13/myKEDB8OeMFAsYL16vbuGUnH6MtVISu7RLK1i5ar+PX+eCgZCViveZ+gA3GZq7TRKlZMGp346b5nUYeN74lpLdL+s5efPL7NE0wtH4XLLjp6bdPsnGq/u11fCDbe53n/hprjUebg0brnrg0++HIdZl+Oiiz2x7NmY3VALVy2PPr05RsPb4rKTL3w4RtfjulutjVEz95VNjHfXcl3vx+r+xW5r+cZYvRie667W30DM51e5weOiXnmO2Ost3z/Rwi2tWUp8My9ufF1DFxT++vFjxDv01l21LhjodTWhPz9+D0uGv3pqw/gJbcWdBNYt+/V3LHzorXeODRvcs5i7yPvpz21bDmD9fZ9+uax17x7tkt1BYMXPP20kcQv++PGXjc07tW9Xw+F++WTZFhK/YFXmipX5rVs0b9qgmGO9eRTbPLFm/YZN2ys2blyvbt3K4jy+oH0Yhndv2bJ9x44ztWpVr1GjRrUKXufYhj2f3bV73969e/ef8FeuXLlCekZ6etU0mzuzyabMQ8cOHTp09Pix48eTliXb2xM45u43rre1He85B3c2H2pjObNw0NCkOQNsK3sSjhoYP3SBTe2cjsMWXpL9RDk7evVhnPftmxfN8djN1stw5OPXrbl+hNjJgTt+x6nX3rrnivGpdrH+0Z9x8vUP/jhxejMbyP7whTyc/sTLr+rEkU0SKvuLdzNxh5ve/jhvSL9u/oQIrf3mmyzc5N4vvvu9Yvd2bRr5rHR0TWbmKlyobv515eo9jRo1ali/RvE4hQ7s3JW1YSOuNrAxK+uvbXtL1KiWnpGRXqp0qZIpST6fp7AwWBjIyc7JOX7kyOHDB3DPx/fuP37s2PHcnNy8c4XBYJj/+//vIFZQOCAYBAAAcCYAnQEqyADIAD5tNJRHJCMiISvyiPiADYlpbuDBAGYRXF+rX9t+hjqM7pIF9eBTlH6gv8R/mvWA9AD9ayAhs9OaDQjqaDQjqaDQjqaDQjqaDQjnP7ghXsfVmkhVaupg587B4DccaMinvHlXs9LP9KH3nnDi9oABanfiqh1umgGgkUwrXUdjnXbGhvW+Or3LG4UiAKEc6ccAENgIFux0hK5ezNEx0l5gmBUUZIApUdbRkem/lbVMq/YwMWzgoLsd1nro72478RI19rqxwJDqSR4/IuWm58kb3nxL3aEustTkr/M3yjM0oJDDlh4GKURv+BdLYZoXz4WxryXoLIqKXpktQmuHWwzRe47whdrmzHswyjo53CAmsgk4Iic1ygOEP/RwmXouxtW7QXI3+i/C9cjbFkQdhPTmg0I5sAD+1OAAAAAAAAUtUJO41caEFL7eA7m9QvuxTmHlxuLyEB7E6KE4ychfGIZ6BTAkAyk8yQo+tLs6/u012dqarpn9L3T1dRlBmTp7tgDPBHMGe/I1Zc+/FDvZ9n7fp73ZJH/xAHyRiiRh9HAT16gKcaESmXKfJfLPBUa/ugHHOyCVvintjUq0eGOhYHrInsysNlAVVC3ddkAdR2TXu4Sc+fd0ER64kiqk6i9KkIKvpGpQmPjIX+c6M7if+oL1oWzcE7tPiUqs46C0MYDZi5R1OCIlSDIvpTv2q7ZZm0IFLKBlQ3h8yDNYlMTlezYHV5C3So4+TcKw8uos3oqUCjTCJJe+Tpxfy2A6y02pSvGcSbd1l1d6iC4jpWUi8oqc5SYvCbyA3UUGr2jqkGliOWL/P+PrB4Glkfp3Ui9D77WUraYifMpM6CrtFwM77XK3TJ6fIaN5nZheupcjT3IezOg8yVFR+QFbkhzlx+XM4vb/LD4sU24lkBVDGe8ZLsjEvoWuvRKL8r+WkJU9HzBJTqi1+tbZwGTJnJTf2KdYhiLWgvT/AAwIYvVXRfelyFaupawB8XyeZHb21XVxmvWiVznZT4poJpD2Vyb+s7FjJ/CxHndJFnAAb7i12LhviVfbR43sCGpndxAbd4cAsHjAnxPN12PD/3pHX3i4SsEZ7M05B1zCInaJoANxXncuc3+uM/ca4G/6WEEI8UtBvIFTzcKccHP7xoKHp6/VK1h1bT4/+RrbkB58p1j1rIdBqu4fDr8gmFjQOt0HOFew45WoqfuOIfQdL0gD4voJyeEhdYyCiTN1O46roB4DpWuQcWUgoFfvz1dDE8uGtKEHyi7jc0q48zOHkzH/vTySe7LfzxiOADn5rr2wQldr2VyidLqrCj4eYGZiRCWG4XBZUyfmqoPGv3/QPKd1t3sUFKUVmamcHPi7PRmd+w5vBb/8GJFf/9Z07s/a1fhmEKYAAAAAAA==",e2e={class:"ik-empty-content flex flex-col items-center"},t2e=["src"],n2e=f.defineComponent({__name:"index",props:{tip:{type:String,default:"暂无数据"},showSvg:{type:Boolean,default:!0},size:{type:Number,default:250}},setup(c){return(r,a)=>f.renderSlot(r.$slots,"default",{},()=>[f.createElementVNode("div",e2e,[f.createElementVNode("img",{src:f.unref(Jbe)},null,8,t2e),f.createElementVNode("span",null,f.toDisplayString(c.tip),1)])],!0)}}),Z3e="",o2e=Gs(Zs(n2e,[["__scopeId","data-v-8b1ddbf0"]])),s2e=f.defineComponent({__name:"IkDescription",props:{showIcon:{type:Boolean,default:!1},listData:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})},titleProps:{type:Object,default:()=>({})},fileField:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},labelWidth:{type:String||Number,default:"150px"},onlyOfficeConfig:{type:Object,default:()=>({})}},setup(c){f.useCssVars(i=>({"78351cba":l.value}));const r=c,a={id:"id",value:"value",props:"props",label:"label",tag:"tag",fileList:"fileList",...r.fileField},l=f.computed(()=>typeof r.labelWidth=="number"?`${r.labelWidth}px`:r.labelWidth);return(i,m)=>{const v=f.resolveComponent("el-descriptions-item"),C=f.resolveComponent("el-descriptions");return f.openBlock(),f.createBlock(C,f.mergeProps({class:"margin-top"},{...c.titleProps,...r}),{extra:f.withCtx(()=>[f.renderSlot(i.$slots,"extra",{},void 0,!0)]),default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.listData,E=>(f.openBlock(),f.createBlock(v,f.mergeProps({key:E[a.id],ref_for:!0},E[a.props]),{label:f.withCtx(()=>[f.renderSlot(i.$slots,E[a.label],{},()=>[f.createTextVNode(f.toDisplayString(E[a.label]),1)],!0)]),default:f.withCtx(()=>[f.renderSlot(i.$slots,`${E[a.label]}_value`,{},()=>[f.createTextVNode(f.toDisplayString(E[a.value])+" ",1),E[a.tag]?(f.openBlock(),f.createBlock(f.unref(Lt.ElTag),{key:0,size:"small"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(E[a.value].value),1)]),_:2},1024)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(TO),{list:E[a.fileList],field:c.fileField,"load-url":c.loadUrl,"show-bg":!1},null,8,["list","field","load-url"])],!0)]),_:2},1040))),128))]),_:3},16)}}}),K3e="",r2e=Gs(Zs(s2e,[["__scopeId","data-v-8171d392"]])),i2e=f.defineComponent({__name:"IkAutoCard",props:{line:{default:2}},setup(c){const r=f.ref(null);return(a,l)=>(f.openBlock(),f.createElementBlock("div",{class:"ik-auto-card",ref_key:"ikAutoCard",ref:r,style:f.normalizeStyle({"-webkit-line-clamp":a.line||2})},[f.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),X3e="",a2e=Gs(Zs(i2e,[["__scopeId","data-v-8d64f23f"]])),l2e=Gs(f.defineComponent({__name:"IkCurrencyInput",props:f.mergeModels({isShowDecimal:{type:Boolean,default:!1},maxLength:{type:Number,default:20}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const r=f.useModel(c,"modelValue"),a=c,l=m=>{let v=m;v=v.replace(/[^\d\.]/g,""),v=v.replace(/^\./g,""),v=v.replace(/\.{2,}/g,"."),v=v.replace(".","$#$").replace(/\./g,"").replace("$#$",".");let C=a.maxLength,E=new RegExp(`^(\\d{${C}})\\d+|((\\.\\d{2})\\d+)$`,"g");v=v.replace(E,"$1$3");const T=/\d{1,3}(?=(\d{3})+$)/g;if(v=v.replace(/^(\d+)((\.\d+)?)$/,function(N,V,U){return V.replace(T,"$&,")+U}),v[v.length-1]==="."){let N=v.substring(0,v.length-1);const V=/\d{1,3}(?=(\d{3})+$)/g;N=N.replace(/^(\d+)((\.\d+)?)$/,function(U,z,W){return z.replace(V,"$&,")+W}),v=N+"."}return v.length>=2&&v[0]==="0"&&v[1]!=="."&&(v=v.slice(1)),r.value=v.replace(/\$\s?|(,*)/g,""),v},i=()=>{a.isShowDecimal&&(r.value=parseFloat(r.value).toFixed(2))};return(m,v)=>{const C=f.resolveComponent("el-input");return f.openBlock(),f.createBlock(C,f.mergeProps({modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=E=>r.value=E)},m.$attrs,{placeholder:"请输入金额",formatter:E=>l(E),onBlur:i}),null,16,["modelValue","formatter"])}}}));function c2e(c,r,a,l){function i(m){return m instanceof a?m:new a(function(v){v(m)})}return new(a||(a=Promise))(function(m,v){function C(N){try{T(l.next(N))}catch(V){v(V)}}function E(N){try{T(l.throw(N))}catch(V){v(V)}}function T(N){N.done?m(N.value):i(N.value).then(C,E)}T((l=l.apply(c,r||[])).next())})}function u2e(c,r){var a={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},l,i,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(T){return function(N){return E([T,N])}}function E(T){if(l)throw new TypeError("Generator is already executing.");for(;v&&(v=0,T[0]&&(a=0)),a;)try{if(l=1,i&&(m=T[0]&2?i.return:T[0]?i.throw||((m=i.return)&&m.call(i),0):i.next)&&!(m=m.call(i,T[1])).done)return m;switch(i=0,m&&(T=[T[0]&2,m.value]),T[0]){case 0:case 1:m=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,i=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(m=a.trys,!(m=m.length>0&&m[m.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!m||T[1]>m[0]&&T[1]<m[3])){a.label=T[1];break}if(T[0]===6&&a.label<m[1]){a.label=m[1],m=T;break}if(m&&a.label<m[2]){a.label=m[2],a.ops.push(T);break}m[2]&&a.ops.pop(),a.trys.pop();continue}T=r.call(c,a)}catch(N){T=[6,N],i=0}finally{l=m=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var d2e=function(c,r){return c2e(void 0,void 0,void 0,function(){return u2e(this,function(a){return[2,new Promise(function(l,i){try{if(window.DocsAPI)return l(null);var m=document.getElementById(r);if(m)var v=setInterval(function(){var E=m.getAttribute("loading");if(!E){if(clearInterval(v),window.DocsAPI)return l(null);var T=_ne(r,c,l,i);m.remove(),document.body.appendChild(T)}},500);else{var C=_ne(r,c,l,i);document.body.appendChild(C)}}catch(E){console.error(E)}})]})})},_ne=function(c,r,a,l){var i=document.createElement("script");return i.id=c,i.type="text/javascript",i.src=r,i.async=!0,i.onload=function(){i.removeAttribute("loading"),a(null)},i.onerror=function(m){i.removeAttribute("loading"),l(m)},i.setAttribute("loading",""),i},RV=f.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var c=this,r=this.documentServerUrl;r.endsWith("/")||(r+="/");var a="".concat(r,"web-apps/apps/api/documents/api.js");d2e(a,"onlyoffice-api-script").then(function(){return c.onLoad()}).catch(function(){c.onError(-2)})},unmounted:function(){var c,r=this.id||"";!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[r]&&(window.DocEditor.instances[r].destroyEditor(),window.DocEditor.instances[r]=void 0)},watch:{config:{handler:function(c,r){this.onChangeProps()},deep:!0},document_fileType:function(c,r){this.onChangeProps()},document_title:function(c,r){this.onChangeProps()},documentType:function(c,r){this.onChangeProps()},editorConfig_lang:function(c,r){this.onChangeProps()},height:function(c,r){this.onChangeProps()},type:function(c,r){this.onChangeProps()},width:function(c,r){this.onChangeProps()}},methods:{onLoad:function(){var c,r;try{var a=this.id||"";if(window.DocsAPI||this.onError(-3),!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[a]){console.log("Skip loading. Instance already exists",a);return}!((r=window==null?void 0:window.DocEditor)===null||r===void 0)&&r.instances||(window.DocEditor={instances:{}});var l=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),i=window.DocsAPI.DocEditor(a,l);window.DocEditor.instances[a]=i}catch(m){console.error(m),this.onError(-1)}},onError:function(c){var r;switch(c){case-2:r="Error load DocsAPI from "+this.documentServerUrl;break;case-3:r="DocsAPI is not defined";break;default:r="Unknown error loading component",c=-1}typeof this.onLoadComponentError>"u"?console.error(r):this.onLoadComponentError(c,r)},onAppReady:function(){var c=this.id||"";this.events_onAppReady(window.DocEditor.instances[c])},onChangeProps:function(){var c,r=this.id||"";!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[r]&&(window.DocEditor.instances[r].destroyEditor(),window.DocEditor.instances[r]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const f2e=["id"];function m2e(c,r,a,l,i,m){return f.openBlock(),f.createElementBlock("div",{id:c.id},null,8,f2e)}RV.render=m2e,RV.__file="src/components/DocumentEditor.vue";const wne=Gs(f.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(c){const r=c,a=f.ref({width:"100%",height:"100%",...r.configOptions||{},...r.configOptions}),l=()=>{console.info("文档加载完成",r.configOptions)};return(i,m)=>(f.openBlock(),f.createElementBlock("div",{style:f.normalizeStyle({height:r.officeHeight})},[f.createVNode(f.unref(RV),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":c.documentServerUrl,config:a.value,events_onDocumentReady:l},null,8,["id","document-server-url","config"])],4))}})),h2e=Gs(f.defineComponent({__name:"index",props:f.mergeModels({prop:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})}},{modelValue:{type:[Array,String],default:""},modelModifiers:{}}),emits:f.mergeModels(["close"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=f.getCurrentInstance(),i=f.computed(()=>({label:"label",value:"value",...a.prop})),m=f.useModel(c,"modelValue"),v=f.computed(()=>{let T=[];const N=l==null?void 0:l.attrs.options;return Array.isArray(m.value)?T=m.value.map(V=>N.find(U=>U[i.value.value]===V)):m.value&&(T=[N.find(V=>V[i.value.value]===m.value)]),{list:T.map(V=>V[i.value.label]).join(","),data:T}}),C=r,E=T=>{m.value=m.value.filter(N=>N!==T[i.value.value]),C("close",T,m.value)};return(T,N)=>{const V=f.resolveComponent("el-option"),U=f.resolveComponent("el-select");return f.openBlock(),f.createBlock(U,f.mergeProps(T.$attrs,{"collapse-tags":!1,modelValue:m.value,"onUpdate:modelValue":N[0]||(N[0]=z=>m.value=z),"no-data-text":"暂无数据","no-match-text":"无匹配项"}),{tag:f.withCtx(()=>[f.withDirectives(f.createVNode(f.unref(Qte),f.mergeProps({list:v.value.list,data:v.value.data},c.tagProps,{onClose:E}),null,16,["list","data"]),[[f.vShow,v.value]])]),default:f.withCtx(()=>[f.renderSlot(T.$slots,"default",{},()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(T.$attrs.options,z=>(f.openBlock(),f.createBlock(V,{key:z[i.value.value],label:z[i.value.label],value:z[i.value.value],disabled:z.disabled},null,8,["label","value","disabled"]))),128))])]),_:3},16,["modelValue"])}}}));var Sne;const Ene=typeof window<"u",g2e=c=>typeof c=="string",p2e=()=>{};Ene&&((Sne=window==null?void 0:window.navigator)!=null&&Sne.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kne(c){return typeof c=="function"?c():f.unref(c)}function v2e(c){return c}function y2e(c){return f.getCurrentScope()?(f.onScopeDispose(c),!0):!1}function b2e(c){var r;const a=kne(c);return(r=a==null?void 0:a.$el)!=null?r:a}const C2e=Ene?window:void 0;function IO(...c){let r,a,l,i;if(g2e(c[0])||Array.isArray(c[0])?([a,l,i]=c,r=C2e):[r,a,l,i]=c,!r)return p2e;Array.isArray(a)||(a=[a]),Array.isArray(l)||(l=[l]);const m=[],v=()=>{m.forEach(N=>N()),m.length=0},C=(N,V,U,z)=>(N.addEventListener(V,U,z),()=>N.removeEventListener(V,U,z)),E=f.watch(()=>[b2e(r),kne(i)],([N,V])=>{v(),N&&m.push(...a.flatMap(U=>l.map(z=>C(N,U,z,V))))},{immediate:!0,flush:"post"}),T=()=>{E(),v()};return y2e(T),T}const xne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ane="__vueuse_ssr_handlers__";xne[Ane]=xne[Ane]||{};var Tne;(function(c){c.UP="UP",c.RIGHT="RIGHT",c.DOWN="DOWN",c.LEFT="LEFT",c.NONE="NONE"})(Tne||(Tne={}));var _2e=Object.defineProperty,Dne=Object.getOwnPropertySymbols,w2e=Object.prototype.hasOwnProperty,S2e=Object.prototype.propertyIsEnumerable,Rne=(c,r,a)=>r in c?_2e(c,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[r]=a,E2e=(c,r)=>{for(var a in r||(r={}))w2e.call(r,a)&&Rne(c,a,r[a]);if(Dne)for(var a of Dne(r))S2e.call(r,a)&&Rne(c,a,r[a]);return c};E2e({linear:v2e},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const k2e={urlList:{type:Array,default:()=>[]},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:["anonymous","use-credentials",""]}},x2e={close:()=>!0,switch:c=>wo.paramType.isNumber(c),rotate:c=>wo.paramType.isNumber(c)},A2e=["src","crossorigin"],OV=Gs(f.defineComponent({name:"ElImageViewer",__name:"IkImageViewer",props:k2e,emits:x2e,setup(c,{expose:r,emit:a}){const l=We=>Object.keys(We),i={CONTAIN:{name:"contain",icon:f.markRaw(qre)},ORIGINAL:{name:"original",icon:f.markRaw(rie)}},m=c,v=a,{t:C}=Lt.useLocale(),E=Lt.useNamespace("image-viewer"),{nextZIndex:T}=Lt.useZIndex(),N=f.ref(),V=f.ref([]),U=f.effectScope(),z=f.ref(!0),W=f.ref(m.initialIndex),K=f.shallowRef(i.CONTAIN),Z=f.ref({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),ce=f.ref(m.zIndex??T()),q=f.computed(()=>{const{urlList:We}=m;return We.length<=1}),X=f.computed(()=>W.value===0),Ce=f.computed(()=>W.value===m.urlList.length-1),st=f.computed(()=>m.urlList[W.value]),Ne=f.computed(()=>[E.e("btn"),E.e("prev"),E.is("disabled",!m.infinite&&X.value)]),ee=f.computed(()=>[E.e("btn"),E.e("next"),E.is("disabled",!m.infinite&&Ce.value)]),xe=f.computed(()=>{const{scale:We,deg:at,offsetX:Sn,offsetY:lt,enableTransition:$t}=Z.value;let Ze=Sn/We,ct=lt/We;const oe=at*Math.PI/180,po=Math.cos(oe),Nn=Math.sin(oe);Ze=Ze*po+ct*Nn,ct=ct*po-Sn/We*Nn;const yo={transform:`scale(${We}) rotate(${at}deg) translate(${Ze}px, ${ct}px)`,transition:$t?"transform .3s":""};return K.value.name===i.CONTAIN.name&&(yo.maxWidth=yo.maxHeight="100%"),yo});function et(){je(),v("close")}function tt(){const We=wo._.throttle(Sn=>{switch(Sn.code){case Lt.EVENT_CODE.esc:m.closeOnPressEscape&&et();break;case Lt.EVENT_CODE.space:F();break;case Lt.EVENT_CODE.left:Ge();break;case Lt.EVENT_CODE.up:kt("zoomIn");break;case Lt.EVENT_CODE.right:Et();break;case Lt.EVENT_CODE.down:kt("zoomOut");break}}),at=wo._.throttle(Sn=>{const lt=Sn.deltaY||Sn.deltaX;kt(lt<0?"zoomIn":"zoomOut",{zoomRate:m.zoomRate,enableTransition:!1})});U.run(()=>{IO(document,"keydown",We),IO(document,"wheel",at)})}function je(){U.stop()}function be(){z.value=!1}function An(We){z.value=!1,We.target.alt=C("el.image.error")}function fn(We){if(z.value||We.button!==0||!N.value)return;Z.value.enableTransition=!1;const{offsetX:at,offsetY:Sn}=Z.value,lt=We.pageX,$t=We.pageY,Ze=wo._.throttle(oe=>{Z.value={...Z.value,offsetX:at+oe.pageX-lt,offsetY:Sn+oe.pageY-$t}}),ct=IO(document,"mousemove",Ze);IO(document,"mouseup",()=>{ct()}),We.preventDefault()}function Vt(){Z.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function F(){if(z.value)return;const We=l(i),at=Object.values(i),Sn=K.value.name,$t=((at==null?void 0:at.findIndex(Ze=>Ze.name===Sn))+1)%We.length;K.value=i[We[$t]],Vt()}function _n(We){const at=m.urlList.length;W.value=(We+at)%at}function Ge(){X.value&&!m.infinite||_n(W.value-1)}function Et(){Ce.value&&!m.infinite||_n(W.value+1)}function kt(We,at={}){if(z.value)return;const{minScale:Sn,maxScale:lt}=m,{zoomRate:$t,rotateDeg:Ze,enableTransition:ct}={zoomRate:m.zoomRate,rotateDeg:90,enableTransition:!0,...at};switch(We){case"zoomOut":Z.value.scale>Sn&&(Z.value.scale=Number.parseFloat((Z.value.scale/$t).toFixed(3)));break;case"zoomIn":Z.value.scale<lt&&(Z.value.scale=Number.parseFloat((Z.value.scale*$t).toFixed(3)));break;case"clockwise":Z.value.deg+=Ze,v("rotate",Z.value.deg);break;case"anticlockwise":Z.value.deg-=Ze,v("rotate",Z.value.deg);break}Z.value.enableTransition=ct}return f.watch(st,()=>{f.nextTick(()=>{const We=V.value[0];We!=null&&We.complete||(z.value=!0)})}),f.watch(W,We=>{Vt(),v("switch",We)}),f.onMounted(()=>{var We,at;tt(),(at=(We=N.value)==null?void 0:We.focus)==null||at.call(We)}),r({setActiveItem:_n}),(We,at)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"viewer-fade",appear:""},{default:f.withCtx(()=>[f.createElementVNode("div",{ref_key:"wrapper",ref:N,tabindex:-1,class:f.normalizeClass(f.unref(E).e("wrapper")),style:f.normalizeStyle({zIndex:ce.value})},[f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("mask")),onClick:at[0]||(at[0]=f.withModifiers(Sn=>We.hideOnClickModal&&et(),["self"]))},null,2),f.createCommentVNode(" CLOSE "),f.createElementVNode("span",{class:f.normalizeClass([f.unref(E).e("btn"),f.unref(E).e("close")]),onClick:et},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:1})],2),f.createCommentVNode(" ARROW "),q.value?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("span",{class:f.normalizeClass(Ne.value),onClick:Ge},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(n$))]),_:1})],2),f.createElementVNode("span",{class:f.normalizeClass(ee.value),onClick:Et},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})],2)],64)),f.createCommentVNode(" ACTIONS "),f.createElementVNode("div",{class:f.normalizeClass([f.unref(E).e("btn"),f.unref(E).e("actions")])},[f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("actions__inner"))},[f.createVNode(f.unref(Lt.ElIcon),{onClick:at[1]||(at[1]=Sn=>kt("zoomOut"))},{default:f.withCtx(()=>[f.createVNode(f.unref(vie))]),_:1}),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[2]||(at[2]=Sn=>kt("zoomIn"))},{default:f.withCtx(()=>[f.createVNode(f.unref(FQ))]),_:1}),f.createElementVNode("i",{class:f.normalizeClass(f.unref(E).e("actions__divider"))},null,2),f.createVNode(f.unref(Lt.ElIcon),{onClick:F},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(K.value.icon)))]),_:1}),f.createElementVNode("i",{class:f.normalizeClass(f.unref(E).e("actions__divider"))},null,2),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[3]||(at[3]=Sn=>kt("anticlockwise"))},{default:f.withCtx(()=>[f.createVNode(f.unref(eie))]),_:1}),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[4]||(at[4]=Sn=>kt("clockwise"))},{default:f.withCtx(()=>[f.createVNode(f.unref(nie))]),_:1})],2)],2),f.createCommentVNode(" CANVAS "),f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("canvas"))},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(We.urlList,(Sn,lt)=>f.withDirectives((f.openBlock(),f.createElementBlock("img",{ref_for:!0,ref:$t=>V.value[lt]=$t,key:Sn,src:Sn,style:f.normalizeStyle(xe.value),class:f.normalizeClass(f.unref(E).e("img")),crossorigin:We.crossorigin,onLoad:be,onError:An,onMousedown:fn},null,46,A2e)),[[f.vShow,lt===W.value]])),128))],2),f.renderSlot(We.$slots,"default")],6)]),_:3})]))}})),T2e=Gs(f.defineComponent({__name:"ProviderConfig",props:{onlyofficeConfig:{type:Object,default:()=>null},token:{type:String,default:""},userInfo:{type:Object,default:()=>null},loadUrl:{type:String,default:""},uploadUrl:{type:String,default:""}},setup(c){const r=c;return f.provide("onlyofficeConfig",f.computed(()=>r.onlyofficeConfig)),f.provide("token",f.computed(()=>r.token)),f.provide("userInfo",f.computed(()=>r.userInfo)),f.provide("loadUrl",f.computed(()=>r.loadUrl)),f.provide("uploadUrl",f.computed(()=>r.uploadUrl)),(a,l)=>f.renderSlot(a.$slots,"default")}}));function One(c,r){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(c);r&&(l=l.filter(function(i){return Object.getOwnPropertyDescriptor(c,i).enumerable})),a.push.apply(a,l)}return a}function Ql(c){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?One(Object(a),!0).forEach(function(l){yn(c,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(a)):One(Object(a)).forEach(function(l){Object.defineProperty(c,l,Object.getOwnPropertyDescriptor(a,l))})}return c}function Md(c){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Md(c)}function ds(c,r){if(!(c instanceof r))throw new TypeError("Cannot call a class as a function")}function Nne(c,r){for(var a=0;a<r.length;a++){var l=r[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(c,Ine(l.key),l)}}function fs(c,r,a){return r&&Nne(c.prototype,r),a&&Nne(c,a),Object.defineProperty(c,"prototype",{writable:!1}),c}function yn(c,r,a){return r=Ine(r),r in c?Object.defineProperty(c,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[r]=a,c}function qs(c,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(r&&r.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),r&&NV(c,r)}function ur(c){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},ur(c)}function NV(c,r){return NV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,i){return l.__proto__=i,l},NV(c,r)}function D2e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qt(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function IV(c,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qt(c)}function Ks(c){var r=D2e();return function(){var l=ur(c),i;if(r){var m=ur(this).constructor;i=Reflect.construct(l,arguments,m)}else i=l.apply(this,arguments);return IV(this,i)}}function R2e(c,r){for(;!Object.prototype.hasOwnProperty.call(c,r)&&(c=ur(c),c!==null););return c}function yr(){return typeof Reflect<"u"&&Reflect.get?yr=Reflect.get.bind():yr=function(r,a,l){var i=R2e(r,a);if(i){var m=Object.getOwnPropertyDescriptor(i,a);return m.get?m.get.call(arguments.length<3?r:l):m.value}},yr.apply(this,arguments)}function ig(c){return O2e(c)||N2e(c)||I2e(c)||B2e()}function O2e(c){if(Array.isArray(c))return BV(c)}function N2e(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)}function I2e(c,r){if(c){if(typeof c=="string")return BV(c,r);var a=Object.prototype.toString.call(c).slice(8,-1);if(a==="Object"&&c.constructor&&(a=c.constructor.name),a==="Map"||a==="Set")return Array.from(c);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return BV(c,r)}}function BV(c,r){(r==null||r>c.length)&&(r=c.length);for(var a=0,l=new Array(r);a<r;a++)l[a]=c[a];return l}function B2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
149
|
+
`+JSON.stringify(s,null,2)).message),getBounds:t.getDragBounds})])})}),bl({schema:[Rt("dom")],name:"title"}),bl({factory:xR,schema:[Rt("dom")],name:"close"}),bl({factory:xR,schema:[Rt("dom")],name:"body"}),Cu({factory:xR,schema:[Rt("dom")],name:"footer"}),ju({factory:{sketch:(t,s)=>({...t,dom:s.dom,components:s.components})},schema:[Qe("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Qe("components",[])],name:"blocker"})]),DX=(t,s,d,g)=>{const b=sr(),S=he=>{b.set(he);const ke=t.lazySink(he).getOrDie(),ot=g.blocker(),Ie=ke.getSystem().build({...ot,components:ot.components.concat([jl(he)]),behaviours:Qt([vo.config({}),Po("dialog-blocker-events",[zp(Ud(),()=>{Gm.isBlocked(he)?X():qn.focusIn(he)})])])});$f(ke,Ie),qn.focusIn(he)},k=he=>{b.clear(),Qi(he.element).each(ke=>{he.getSystem().getByDom(ke).each(ot=>{Om(ot)})})},R=he=>hc(he,t,"body"),I=he=>Xt(he,t,"footer"),H=(he,ke)=>{Gm.block(he,ke)},j=he=>{Gm.unblock(he)},ne=kn("modal-events"),ae={...t.eventOrder,[ac()]:[ne].concat(t.eventOrder["alloy.system.attached"]||[])},ue=zl();return{uid:t.uid,dom:t.dom,components:s,apis:{show:S,hide:k,getBody:R,getFooter:I,setIdle:j,setBusy:H},eventOrder:ae,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Za(t.modalBehaviours,[_o.config({}),qn.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt,firstTabstop:t.firstTabstop}),Gm.config({getRoot:b.get}),Po(ne,[Zr(he=>{const ke=hc(he,t,"title").element,ot=xX(ke);ue.os.isMacOS()&&K(ot)?tn(he.element,"aria-label",ot):RF(he.element,ke)})])])}},qa=ql({name:"ModalDialog",configFields:AX(),partFields:TX(),factory:DX,apis:{show:(t,s)=>{t.show(s)},hide:(t,s)=>{t.hide(s)},getBody:(t,s)=>t.getBody(s),getFooter:(t,s)=>t.getFooter(s),setBusy:(t,s,d)=>{t.setBusy(s,d)},setIdle:(t,s)=>{t.setIdle(s)}}}),RX=co([ca,Pk].concat(yv)),OX=Ac,AR=[N5("button"),rf,mu("align","end",["start","end"]),Tw,Zf,d0("buttonType",["primary","secondary"])],TR=[...AR,lp],F6=[ol("type",["submit","cancel","custom"]),...TR],Hv=[ol("type",["menu"]),B1,Aw,rf,Dc("items",RX),...AR],NX=[...AR,ol("type",["togglebutton"]),Aw,rf,B1,Ei("active",!1)],DR=ga("type",{submit:F6,cancel:F6,custom:F6,menu:Hv,togglebutton:NX}),$6=[ca,lp,ol("level",["info","warn","error","success"]),yI,Qe("url","")],IX=co($6),BX=t=>[ca,t],MX=[ca,lp,Zf,N5("button"),rf,tU,d0("buttonType",["primary","secondary","toolbar"]),Tw],PX=co(MX),M2=[ca,Pk],iu=M2.concat([Fk]),OF=M2.concat([Lk,Zf]),LX=co(OF),FX=Ac,$X=iu.concat([Hk("auto")]),VX=co($X),HX=c0([xw,lp,yI]),zX=iu.concat([za("storageKey","default")]),UX=co(zX),WX=Cn,RS=co(iu),RR=Cn,V6=M2.concat([za("tag","textarea"),Gi("scriptId"),Gi("scriptUrl"),hd("onFocus"),B("settings",void 0)]),zv=M2.concat([za("tag","textarea"),Tc("init")]),H6=Cg(t=>ei("customeditor.old",Ha(zv),t).orThunk(()=>ei("customeditor.new",Ha(V6),t))),jX=Cn,IF=co(iu),BF=ym(),ZX=t=>[ca,Pp("columns"),t],qX=[ca,Gi("html"),mu("presets","presentation",["presentation","document"]),bi("onInit",X),Ei("stretched",!1)],KX=co(qX),MF=iu.concat([Ei("border",!1),Ei("sandboxed",!0),Ei("streamContent",!1),Ei("transparent",!0)]),PF=co(MF),OR=Cn,YX=co(M2.concat([Zi("height")])),XX=co([Gi("url"),bm("zoom"),bm("cachedWidth"),bm("cachedHeight")]),QX=iu.concat([Zi("inputMode"),Zi("placeholder"),Ei("maximized",!1),Zf]),LF=co(QX),JX=Cn,eQ=t=>[ca,Lk,t,mu("align","start",["start","center","end"]),Zi("for")],tQ=[lp,xw],NR=[lp,Dc("items",ah("items",()=>z6))],z6=rh([co(tQ),co(NR)]),nQ=iu.concat([Dc("items",z6),Zf]),FF=co(nQ),oQ=Cn,sQ=iu.concat([py("items",[lp,xw]),ch("size",1),Zf]),$F=co(sQ),rQ=Cn,iQ=iu.concat([Ei("constrain",!0),Zf]),Uv=co(iQ),IR=co([Gi("width"),Gi("height")]),aQ=M2.concat([Lk,ch("min",0),ch("max",0)]),U6=co(aQ),P2=xf,W6=[ca,Dc("header",Cn),Dc("cells",Wc(Cn))],VF=co(W6),j6=iu.concat([Zi("placeholder"),Ei("maximized",!1),Zf]),Eu=co(j6),G6=Cn,BR=[ol("type",["directory","leaf"]),vI,Gi("id"),md("menu",k9)],HF=co(BR),cQ=BR.concat([Dc("children",ah("children",()=>Af("type",{directory:vp,leaf:HF})))]),vp=co(cQ),Pse=Af("type",{directory:vp,leaf:HF}),uQ=[ca,Dc("items",Pse),hd("onLeafAction"),hd("onToggleExpand"),$("defaultExpandedIds",[],Cn),Zi("defaultSelectedId")],zF=co(uQ),L2=iu.concat([mu("filetype","file",["image","media","file"]),Zf,Zi("picker_text")]),Z6=co(L2),UF=co([xw,R5]),MR=t=>sa("items","items",sc(),Wc(Cg(s=>ei(`Checking item of ${t}`,PR,s).fold(d=>Ro.error(Mu(d)),d=>Ro.value(d))))),PR=oa(()=>Af("type",{alertbanner:IX,bar:co(BX(MR("bar"))),button:PX,checkbox:LX,colorinput:UX,colorpicker:RS,dropzone:IF,grid:co(ZX(MR("grid"))),iframe:PF,input:LF,listbox:FF,selectbox:$F,sizeinput:Uv,slider:U6,textarea:Eu,urlinput:Z6,customeditor:H6,htmlpanel:KX,imagepreview:YX,collection:VX,label:co(eQ(MR("label"))),table:VF,tree:zF,panel:WF})),dQ=[ca,Qe("classes",[]),Dc("items",PR)],WF=co(dQ),F2=[N5("tab"),vI,Dc("items",PR)],Lse=[ca,py("tabs",F2)],fQ=co(Lse),mQ=TR,Fse=DR,hQ=co([Gi("title"),Ts("body",Af("type",{panel:WF,tabpanel:fQ})),za("size","normal"),$("buttons",[],Fse),Qe("initialData",{}),bi("onAction",X),bi("onChange",X),bi("onSubmit",X),bi("onClose",X),bi("onCancel",X),bi("onTabChange",X)]),gQ=t=>ei("dialog",hQ,t),OS=co([ol("type",["cancel","custom"]),...mQ]),pQ=co([Gi("title"),Gi("url"),bm("height"),bm("width"),Pu("buttons",OS),bi("onAction",X),bi("onCancel",X),bi("onClose",X),bi("onMessage",X)]),vQ=t=>ei("dialog",pQ,t),q6=t=>E(t)?[t].concat(Ue(Or(t),q6)):N(t)?Ue(t,q6):[],yQ=t=>C(t.type)&&C(t.name),$se={checkbox:FX,colorinput:WX,colorpicker:RR,dropzone:BF,input:JX,iframe:OR,imagepreview:XX,selectbox:rQ,sizeinput:IR,slider:P2,listbox:oQ,size:IR,textarea:G6,urlinput:UF,customeditor:jX,collection:HX,togglemenuitem:OX},e=t=>F.from($se[t.type]),n=t=>Nn(q6(t),yQ),o=t=>{const s=n(t),d=Ue(s,g=>e(g).fold(()=>[],b=>[Ts(g.name,b)]));return co(d)},u=t=>{var s;const d=Ut(gQ(t)),g=o(t),b=(s=t.initialData)!==null&&s!==void 0?s:{};return{internalDialog:d,dataValidator:g,initialData:b}},h={open:(t,s)=>{const d=u(s);return t(d.internalDialog,d.initialData,d.dataValidator)},openUrl:(t,s)=>{const d=Ut(vQ(s));return t(d)},redial:t=>u(t)};var w=Object.freeze({__proto__:null,events:(t,s)=>{const d=(g,b)=>{t.updateState.each(S=>{const k=S(g,b);s.set(k)}),t.renderComponents.each(S=>{const k=S(b,s.get());(t.reuseDom?x4:zb)(g,k)})};return $r([Nt(Fu(),(g,b)=>{const S=b;if(!S.universal){const k=t.channel;at(S.channels,k)&&d(g,S.data)}}),Zr((g,b)=>{t.initialData.each(S=>{d(g,S)})})])}}),O=Object.freeze({__proto__:null,getState:(t,s,d)=>d}),L=[Rt("channel"),Ds("renderComponents"),Ds("updateState"),Ds("initialData"),Ei("reuseDom",!0)],J=Object.freeze({__proto__:null,init:()=>{const t=Zn(F.none()),s=()=>t.set(F.none());return{readState:()=>t.get().getOr("none"),get:t.get,set:t.set,clear:s}}});const te=sl({fields:L,name:"reflecting",active:w,apis:O,state:J}),me=t=>{const s=[],d={};return ks(t,(g,b)=>{g.fold(()=>{s.push(b)},S=>{d[b]=S})}),s.length>0?Ro.error(s):Ro.value(d)},Se=(t,s,d,g)=>{const b=er(g2.sketch(S=>({dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:Ze(t.items,k=>IP(S,k,s,d,g))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[b.asSpec()]}],behaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)}),Qu.memento(b),NM(b,{postprocess:S=>me(S).fold(k=>(console.error(k),{}),xe)}),Po("dialog-body-panel",[Nt(Ud(),(S,k)=>{S.getSystem().broadcastOn([Jw],{newFocus:F.some(k.event.target)})})])])}},ge=(t,s)=>({uid:t.uid,dom:t.dom,components:t.components,events:sk(t.action),behaviours:Za(t.tabButtonBehaviours,[vo.config({}),qn.config({mode:"execution",useSpace:!0,useEnter:!0}),xn.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}),Ee=Ic({name:"TabButton",configFields:[Qe("uid",void 0),Rt("value"),sa("dom","dom",oh(()=>({attributes:{role:"tab",id:kn("aria"),"aria-selected":"false"}})),du()),Ds("action"),Qe("domModification",{}),Ga("tabButtonBehaviours",[vo,qn,xn]),Rt("view")],factory:ge}),ze=ee([Rt("tabs"),Rt("dom"),Qe("clickToDismiss",!1),Ga("tabbarBehaviours",[mn,qn]),Pf(["tabClass","selectedClass"])]),Xe=Nb({factory:Ee,name:"tabs",unit:"tab",overrides:t=>{const s=(g,b)=>{mn.dehighlight(g,b),oo(g,s3(),{tabbar:g,button:b})},d=(g,b)=>{mn.highlight(g,b),oo(g,o3(),{tabbar:g,button:b})};return{action:g=>{const b=g.getSystem().getByUid(t.uid).getOrDie(),S=mn.isHighlighted(b,g);(()=>S&&t.clickToDismiss?s:S?X:d)()(b,g)},domModification:{classes:[t.markers.tabClass]}}}}),qe=ee([Xe]),dt=(t,s,d,g)=>({uid:t.uid,dom:t.dom,components:s,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Za(t.tabbarBehaviours,[mn.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:(b,S)=>{tn(S.element,"aria-selected","true")},onDehighlight:(b,S)=>{tn(S.element,"aria-selected","false")}}),qn.config({mode:"flow",getInitial:b=>mn.getHighlighted(b).map(S=>S.element),selector:"."+t.markers.tabClass,executeOnMove:!0})])}),Ft=ql({name:"Tabbar",configFields:ze(),partFields:qe(),factory:dt}),on=(t,s)=>({uid:t.uid,dom:t.dom,behaviours:Za(t.tabviewBehaviours,[_o.config({})]),domModification:{attributes:{role:"tabpanel"}}}),En=Ic({name:"Tabview",configFields:[Ga("tabviewBehaviours",[_o])],factory:on}),At=ee([Qe("selectFirst",!0),hs("onChangeTab"),hs("onDismissTab"),Qe("tabs",[]),Ga("tabSectionBehaviours",[])]),yt=bl({factory:Ft,schema:[Rt("dom"),zd("markers",[Rt("tabClass"),Rt("selectedClass")])],name:"tabbar",defaults:t=>({tabs:t.tabs})}),Pt=bl({factory:En,name:"tabview"}),Bn=ee([yt,Pt]),Jn=(t,s,d,g)=>{const b=k=>{const R=xn.getValue(k);Xt(k,t,"tabview").each(I=>{vt(t.tabs,j=>j.value===R).each(j=>{const ne=j.view();se(k.element,"id").each(ae=>{tn(I.element,"aria-labelledby",ae)}),_o.set(I,ne),t.onChangeTab(I,k,ne)})})},S=(k,R)=>{Xt(k,t,"tabbar").each(I=>{R(I).each(hh)})};return{uid:t.uid,dom:t.dom,components:s,behaviours:Z0(t.tabSectionBehaviours),events:$r(St([t.selectFirst?[Zr((k,R)=>{S(k,mn.getFirst)})]:[],[Nt(o3(),(k,R)=>{const I=R.event.button;b(I)}),Nt(s3(),(k,R)=>{const I=R.event.button;t.onDismissTab(k,I)})]])),apis:{getViewItems:k=>Xt(k,t,"tabview").map(R=>_o.contents(R)).getOr([]),showTab:(k,R)=>{S(k,H=>{const j=mn.getCandidates(H);return vt(j,ae=>xn.getValue(ae)===R).filter(ae=>!mn.isHighlighted(H,ae))})}}}},Vo=ql({name:"TabSection",configFields:At(),partFields:Bn(),factory:Jn,apis:{getViewItems:(t,s)=>t.getViewItems(s),showTab:(t,s,d)=>{t.showTab(s,d)}}}),rs=(t,s,d)=>Ze(t,(g,b)=>{_o.set(d,t[b].view());const S=s.dom.getBoundingClientRect();return _o.set(d,[]),S.height}),js=t=>Os(Do(t,(s,d)=>s>d?-1:s<d?1:0)),pr=(t,s,d)=>{const g=Pa(t).dom,b=xm(t,".tox-dialog-wrap").getOr(t),S=or(b,"position")==="fixed";let k;S?k=Math.max(g.clientHeight,window.innerHeight):k=Math.max(g.offsetHeight,g.scrollHeight);const R=Nr(s),H=s.dom.offsetLeft>=d.dom.offsetLeft+Fa(d)?Math.max(Nr(d),R):R,j=parseInt(or(t,"margin-top"),10)||0,ne=parseInt(or(t,"margin-bottom"),10)||0,ue=Nr(t)+j+ne-H;return k-ue},Ti=(t,s)=>{Os(t).each(d=>Vo.showTab(s,d.value))},Sl=(t,s)=>{Rn(t,"height",s+"px"),Rn(t,"flex-basis",s+"px")},lr=(t,s,d)=>{xm(t,'[role="dialog"]').each(g=>{Qs(g,'[role="tablist"]').each(b=>{d.get().map(S=>(Rn(s,"height","0"),Rn(s,"flex-basis","0"),Math.min(S,pr(g,s,b)))).each(S=>{Sl(s,S)})})})},cn=t=>Qs(t,'[role="tabpanel"]'),Kn=t=>{const s=sr();return{extraEvents:[Zr(b=>{const S=b.element;cn(S).each(k=>{Rn(k,"visibility","hidden"),b.getSystem().getByDom(k).toOptional().each(R=>{const I=rs(t,k,R);js(I).fold(s.clear,s.set)}),lr(S,k,s),ns(k,"visibility"),Ti(t,b),requestAnimationFrame(()=>{lr(S,k,s)})})}),Nt(Zd(),b=>{const S=b.element;cn(S).each(k=>{lr(S,k,s)})}),Nt(VB,(b,S)=>{const k=b.element;cn(k).each(R=>{const I=tf(de(R));Rn(R,"visibility","hidden");const H=vr(R,"height").map(ae=>parseInt(ae,10));ns(R,"height"),ns(R,"flex-basis");const j=R.dom.getBoundingClientRect().height;H.forall(ae=>j>ae)?(s.set(j),lr(k,R,s)):H.each(ae=>{Sl(R,ae)}),ns(R,"visibility"),I.each(hu)})})],selectFirst:!1}},Rs="send-data-to-section",gn="send-data-to-view",ao=(t,s,d,g)=>{const b=Zn({}),S=j=>{const ne=xn.getValue(j),ae=me(ne).getOr({}),ue=b.get(),he=Dr(ue,ae);b.set(he)},k=j=>{const ne=b.get();xn.setValue(j,ne)},R=Zn(null),I=Ze(t.tabs,j=>({value:j.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[xi(d.shared.providers.translate(j.title))],view:()=>[g2.sketch(ne=>({dom:{tag:"div",classes:["tox-form"]},components:Ze(j.items,ae=>IP(ne,ae,s,d,g)),formBehaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)}),Po("TabView.form.events",[Zr(k),If(S)]),Nc.config({channels:Is([{key:Rs,value:{onReceive:S}},{key:gn,value:{onReceive:k}}])})])}))]})),H=Kn(I);return Vo.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(j,ne,ae)=>{const ue=xn.getValue(ne);oo(j,$B,{name:ue,oldName:R.get()}),R.set(ue)},tabs:I,components:[Vo.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Ft.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Qt([zr.config({})])}),Vo.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:H.selectFirst,tabSectionBehaviours:Qt([Po("tabpanel",H.extraEvents),qn.config({mode:"acyclic"}),gs.config({find:j=>Os(Vo.getViewItems(j))}),Iv(F.none(),j=>(j.getSystem().broadcastOn([Rs],{}),b.get()),(j,ne)=>{b.set(ne),j.getSystem().broadcastOn([gn],{})})])})},Yo=(t,s,d,g,b,S)=>{const k=H=>{const j=H.body;switch(j.type){case"tabpanel":return[ao(j,H.initialData,g,S)];default:return[Se(j,H.initialData,g,S)]}},R=(H,j)=>F.some({isTabPanel:()=>j.body.type==="tabpanel"}),I={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...d.map(H=>({id:H})).getOr({}),...b?I:{}}},components:[],behaviours:Qt([Qu.childAt(0),te.config({channel:`${zM}-${s}`,updateState:R,renderComponents:k,initialData:t})])}},wn=(t,s,d,g,b,S)=>Yo(t,s,F.some(d),g,b,S),Xo=(t,s,d,g)=>{const b=Yo(t,s,F.none(),d,!1,g);return qa.parts.body(b)},as=t=>{const s={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[$M(F.none(),{dom:{tag:"iframe",attributes:{src:t.url}},behaviours:Qt([zr.config({}),vo.config({})])})]}],behaviours:Qt([qn.config({mode:"acyclic",useTabstopAt:je(p2)})])};return qa.parts.body(s)},Ka=Wb.deviceType.isTouch(),tr=(t,s)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,s]}),Ca=(t,s)=>qa.parts.close(Fl.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":s.translate("Close")}},action:t,buttonBehaviours:Qt([zr.config({})])})),Dd=()=>qa.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),nm=(t,s)=>qa.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Pm(`<p>${c5(s.translate(t))}</p>`)}]}]}),yc=t=>qa.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t}),ku=(t,s)=>[Hm.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Hm.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:s})],Ju=t=>{const s="tox-dialog",d=s+"-wrap",g=d+"__backdrop",b=s+"__disable-scroll";return qa.sketch({lazySink:t.lazySink,onEscape:S=>(t.onEscape(S),F.some(!0)),useTabstopAt:S=>!p2(S),firstTabstop:t.firstTabstop,dom:{tag:"div",classes:[s].concat(t.extraClasses),styles:{position:"relative",...t.extraStyles}},components:[t.header,t.body,...t.footer.toArray()],parts:{blocker:{dom:Pm(`<div class="${d}"></div>`),components:[{dom:{tag:"div",classes:Ka?[g,g+"--opaque"]:[g]}}]}},dragBlockClass:d,modalBehaviours:Qt([vo.config({}),Po("dialog-events",t.dialogEvents.concat([zp(Ud(),(S,k)=>{Gm.isBlocked(S)?X():qn.focusIn(S)}),Nt(Eg(),(S,k)=>{S.getSystem().broadcastOn([Jw],{newFocus:k.event.newFocus})})])),Po("scroll-lock",[Zr(()=>{Vr(Io(),b)}),If(()=>{mi(Io(),b)})]),...t.extraBehaviours]),eventOrder:{[$u()]:["dialog-events"],[ac()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Vu()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...t.eventOrder}})},xu=t=>Fl.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:Qt([zr.config({}),Cl.config(t.tooltips.getConfig({tooltipText:t.translate("Close")}))]),components:[_u("close",{tag:"span",classes:["tox-icon"]},t.icons)],action:s=>{zo(s,P1)}}),Rd=(t,s,d,g)=>{const b=S=>[xi(g.translate(S.title))];return{dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...d.map(S=>({id:S})).getOr({})}},components:[],behaviours:Qt([te.config({channel:`${HM}-${s}`,initialData:t,renderComponents:b})])}},eo=()=>({dom:Pm('<div class="tox-dialog__draghandle"></div>')}),bs=(t,s,d,g)=>Hm.sketch({dom:Pm('<div class="tox-dialog__header"></div>'),components:[Rd(t,s,F.some(d),g),eo(),xu(g)],containerBehaviours:Qt([Vv.config({mode:"mouse",blockerClass:"blocker",getTarget:b=>ef(b,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}),hi=(t,s,d)=>{const g=qa.parts.title(Rd(t,s,F.none(),d)),b=qa.parts.draghandle(eo()),S=qa.parts.close(xu(d)),k=[g].concat(t.draggable?[b]:[]).concat([S]);return Hm.sketch({dom:Pm('<div class="tox-dialog__header"></div>'),components:k})},Di=(t,s,d)=>hi({title:d.shared.providers.translate(t),draggable:d.dialog.isDraggableModal()},s,d.shared.providers),ua=(t,s,d,g)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":d.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${g.getOr(0)}px`,position:"absolute"}},behaviours:s,components:[{dom:Pm('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),dl=(t,s,d)=>({onClose:()=>d.closeWindow(),onBlock:g=>{const b=Qs(t().element,".tox-dialog__header").map(S=>Nr(S));qa.setBusy(t(),(S,k)=>ua(g.message,k,s,b))},onUnblock:()=>{qa.setIdle(t())}}),qi="tox-dialog--fullscreen",Pi="tox-dialog--width-lg",Yl="tox-dialog--width-md",ed=t=>{switch(t){case"large":return F.some(Pi);case"medium":return F.some(Yl);default:return F.none()}},hf=(t,s)=>{const d=He.fromDom(s.element.dom);Kc(d,qi)||(Yc(d,[Pi,Yl]),ed(t).each(g=>Vr(d,g)))},gf=(t,s)=>{const d=He.fromDom(t.element.dom),g=IA(d),b=vt(g,S=>S===Pi||S===Yl).or(ed(s));RA(d,[qi,...b.toArray()])},Od=(t,s,d)=>Ml(Ju({...t,firstTabstop:1,lazySink:d.shared.getSink,extraBehaviours:[Tx({}),...t.extraBehaviours],onEscape:g=>{zo(g,P1)},dialogEvents:s,eventOrder:{[Fu()]:[te.name(),Nc.name()],[ac()]:["scroll-lock",te.name(),"messages","dialog-events","alloy.base.behaviour"],[Vu()]:["alloy.base.behaviour","dialog-events","messages",te.name(),"scroll-lock"]}})),eg=(t,s={})=>{const d=g=>{const b=Ze(g.items,S=>{const k=Yt(s,S.name).getOr(Zn(!1));return{...S,storage:k}});return{...g,items:b}};return Ze(t,g=>g.type==="menu"?d(g):g)},Wv=t=>Fo(t,(s,d)=>d.type==="menu"?Fo(d.items,(b,S)=>(b[S.name]=S.storage,b),s):s,{}),jv=(t,s)=>[hC(Ud(),Yj),t(Vw,(d,g,b,S)=>{tf(de(S.element)).fold(X,B0),s.onClose(),g.onClose()}),t(P1,(d,g,b,S)=>{g.onCancel(d),zo(S,Vw)}),Nt(mD,(d,g)=>s.onUnblock()),Nt(mx,(d,g)=>s.onBlock(g.event))],LR=(t,s)=>{const d=(b,S)=>Nt(b,(k,R)=>{g(k,(I,H)=>{S(t(),I,R.event,k)})}),g=(b,S)=>{te.getState(b).get().each(k=>{S(k,b)})};return[...jv(d,s),d(Zh,(b,S,k)=>{S.onAction(b,{name:k.name})})]},tg=(t,s,d)=>{const g=(S,k)=>Nt(S,(R,I)=>{b(R,(H,j)=>{k(t(),H,I.event,R)})}),b=(S,k)=>{te.getState(S).get().each(R=>{k(R.internalDialog,S)})};return[...jv(g,s),g(c2,(S,k)=>k.onSubmit(S)),g(wu,(S,k,R)=>{k.onChange(S,{name:R.name})}),g(Zh,(S,k,R,I)=>{const H=()=>I.getSystem().isConnected()?qn.focusIn(I):void 0,j=ue=>ye(ue,"disabled")||se(ue,"aria-disabled").exists(he=>he==="true"),ne=de(I.element),ae=tf(ne);k.onAction(S,{name:R.name,value:R.value}),tf(ne).fold(H,ue=>{j(ue)||ae.exists(he=>wi(ue,he)&&j(he))?H():d().toOptional().filter(he=>!wi(he.element,ue)).each(H)})}),g($B,(S,k,R)=>{k.onTabChange(S,{newTabName:R.name,oldTabName:R.oldName})}),If(S=>{const k=t();xn.setValue(S,k.getData())})]},K6=(t,s)=>Mv(t,t.type,s),jF=(t,s,d)=>vt(s,g=>g.name===d).bind(g=>g.memento.getOpt(t)),bc=(t,s)=>{const d=s.map(R=>R.footerButtons).getOr([]),g=po(d,R=>R.align==="start"),b=(R,I)=>Hm.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${R}`]},components:Ze(I,H=>H.memento.asSpec())}),S=b("start",g.pass),k=b("end",g.fail);return[S,k]},G1=(t,s,d)=>{const g=(b,S)=>{const k=Ze(S.buttons,I=>{const H=er(K6(I,d));return{name:I.name,align:I.align,memento:H}}),R=I=>jF(b,k,I);return F.some({lookupByName:R,footerButtons:k})};return{dom:Pm('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Qt([te.config({channel:`${UM}-${s}`,initialData:t,updateState:g,renderComponents:bc})])}},GF=(t,s,d)=>G1(t,s,d),Y6=(t,s,d)=>qa.parts.footer(G1(t,s,d)),pf=(t,s)=>{if(t.getRoot().getSystem().isConnected()){const g=gs.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return g2.getField(g,s).orThunk(()=>t.getFooter().bind(k=>te.getState(k).get()).bind(k=>k.lookupByName(s)))}else return F.none()},NS=(t,s)=>{const d=t.getRoot();return te.getState(d).get().map(g=>Ut(ei("data",g.dataValidator,s))).getOr(s)},ht=(t,s,d)=>{const g=he=>{const ke=t.getRoot();ke.getSystem().isConnected()&&he(ke)},ue={getData:()=>{const he=t.getRoot(),ke=he.getSystem().isConnected()?t.getFormWrapper():he,ot=xn.getValue(ke),Ie=Cs(d,Je=>Je.get());return{...ot,...Ie}},setData:he=>{g(ke=>{const ot=ue.getData(),Ie=Dr(ot,he),Je=NS(t,Ie),Ye=t.getFormWrapper();xn.setValue(Ye,Je),ks(d,(It,gt)=>{Qo(Ie,gt)&&It.set(Ie[gt])})})},setEnabled:(he,ke)=>{pf(t,he).each(ke?ho.enable:ho.disable)},focus:he=>{pf(t,he).each(vo.focus)},block:he=>{if(!C(he))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");g(ke=>{oo(ke,mx,{message:he})})},unblock:()=>{g(he=>{zo(he,mD)})},showTab:he=>{g(ke=>{const ot=t.getBody();te.getState(ot).get().exists(Je=>Je.isTabPanel())&&gs.getCurrent(ot).each(Je=>{Vo.showTab(Je,he)})})},redial:he=>{g(ke=>{const ot=t.getId(),Ie=s(he),Je=eg(Ie.internalDialog.buttons,d);ke.getSystem().broadcastOn([`${Qw}-${ot}`],Ie),ke.getSystem().broadcastOn([`${HM}-${ot}`],Ie.internalDialog),ke.getSystem().broadcastOn([`${zM}-${ot}`],Ie.internalDialog),ke.getSystem().broadcastOn([`${UM}-${ot}`],{...Ie.internalDialog,buttons:Je}),ue.setData(Ie.initialData)})},close:()=>{g(he=>{zo(he,Vw)})},toggleFullscreen:t.toggleFullscreen};return ue},bt=(t,s,d)=>{const g=kn("dialog"),b=t.internalDialog,S=Di(b.title,g,d),k=Zn(b.size),R=Ye=>pf(Ie,Ye),I=ed(k.get()).toArray(),H=(Ye,It)=>(k.set(It.internalDialog.size),hf(It.internalDialog.size,Ye),F.some(It)),j=Xo({body:b.body,initialData:b.initialData},g,d,R),ne=eg(b.buttons),ae=Wv(ne),ue=Wn(ne.length!==0,Y6({buttons:ne},g,d)),he=tg(()=>Je,dl(()=>ot,d.shared.providers,s),d.shared.getSink),ke={id:g,header:S,body:j,footer:ue,extraClasses:I,extraBehaviours:[te.config({channel:`${Qw}-${g}`,updateState:H,initialData:t})],extraStyles:{}},ot=Od(ke,he,d),Ie=(()=>{const Ye=()=>{const gt=qa.getBody(ot);return gs.getCurrent(gt).getOr(gt)},It=()=>{gf(ot,k.get())};return{getId:ee(g),getRoot:ee(ot),getBody:()=>qa.getBody(ot),getFooter:()=>qa.getFooter(ot),getFormWrapper:Ye,toggleFullscreen:It}})(),Je=ht(Ie,s.redial,ae);return{dialog:ot,instanceApi:Je}},ln=(t,s,d,g=!1,b)=>{const S=kn("dialog"),k=kn("dialog-label"),R=kn("dialog-content"),I=t.internalDialog,H=Hn=>pf(dn,Hn),j=Zn(I.size),ne=ed(j.get()).toArray(),ae=(Hn,Tn)=>(j.set(Tn.internalDialog.size),hf(Tn.internalDialog.size,Hn),b(),F.some(Tn)),ue=er(bs({title:I.title,draggable:!0},S,k,d.shared.providers)),he=er(wn({body:I.body,initialData:I.initialData},S,R,d,g,H)),ke=eg(I.buttons),ot=Wv(ke),Ie=Wn(ke.length!==0,er(GF({buttons:ke},S,d))),Je=tg(()=>Ot,{onBlock:Hn=>{Gm.block(gt,(Tn,lo)=>{const to=ue.getOpt(gt).map(Bs=>Nr(Bs.element));return ua(Hn.message,lo,d.shared.providers,to)})},onUnblock:()=>{Gm.unblock(gt)},onClose:()=>s.closeWindow()},d.shared.getSink),Ye="tox-dialog-inline",It=zl().os,gt=Ml({dom:{tag:"div",classes:["tox-dialog",Ye,...ne],attributes:{role:"dialog",...It.isMacOS()?{"aria-label":I.title}:{"aria-labelledby":k}}},eventOrder:{[Fu()]:[te.name(),Nc.name()],[$u()]:["execute-on-form"],[ac()]:["reflecting","execute-on-form"]},behaviours:Qt([qn.config({mode:"cyclic",onEscape:Hn=>(zo(Hn,Vw),F.some(!0)),useTabstopAt:Hn=>!p2(Hn)&&(Ls(Hn)!=="button"||Ys(Hn,"disabled")!=="disabled"),firstTabstop:1}),te.config({channel:`${Qw}-${S}`,updateState:ae,initialData:t}),vo.config({}),Po("execute-on-form",Je.concat([zp(Ud(),(Hn,Tn)=>{qn.focusIn(Hn)}),Nt(Eg(),(Hn,Tn)=>{Hn.getSystem().broadcastOn([Jw],{newFocus:Tn.event.newFocus})})])),Gm.config({getRoot:()=>F.some(gt)}),_o.config({}),Tx({})]),components:[ue.asSpec(),he.asSpec(),...Ie.map(Hn=>Hn.asSpec()).toArray()]}),Jt=()=>{gf(gt,j.get())},dn={getId:ee(S),getRoot:ee(gt),getFooter:()=>Ie.map(Hn=>Hn.get(gt)),getBody:()=>he.get(gt),getFormWrapper:()=>{const Hn=he.get(gt);return gs.getCurrent(Hn).getOr(Hn)},toggleFullscreen:Jt},Ot=ht(dn,s.redial,ot);return{dialog:gt,instanceApi:Ot}};var en=tinymce.util.Tools.resolve("tinymce.util.URI");const go=t=>{const s=k=>{t.getSystem().isConnected()&&k(t)};return{block:k=>{if(!C(k))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s(R=>{oo(R,mx,{message:k})})},unblock:()=>{s(k=>{zo(k,mD)})},close:()=>{s(k=>{zo(k,Vw)})},sendMessage:k=>{s(R=>{R.getSystem().broadcastOn([WM],k)})}}},cs=["insertContent","setContent","execCommand","close","block","unblock"],li=t=>E(t)&&cs.indexOf(t.mceAction)!==-1,om=t=>!li(t)&&E(t)&&Qo(t,"mceAction"),X6=(t,s,d)=>{switch(d.mceAction){case"insertContent":t.insertContent(d.content);break;case"setContent":t.setContent(d.content);break;case"execCommand":const g=U(d.ui)?d.ui:!1;t.execCommand(d.cmd,g,d.value);break;case"close":s.close();break;case"block":s.block(d.message);break;case"unblock":s.unblock();break}},bQ=(t,s,d,g)=>{const b=kn("dialog"),S=Di(t.title,b,g),k=as(t),R=t.buttons.bind(Ye=>Ye.length===0?F.none():F.some(Y6({buttons:Ye},b,g))),I=LR(()=>Je,dl(()=>Ie,g.shared.providers,s)),H={...t.height.fold(()=>({}),Ye=>({height:Ye+"px","max-height":Ye+"px"})),...t.width.fold(()=>({}),Ye=>({width:Ye+"px","max-width":Ye+"px"}))},j=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],ne=new en(t.url,{base_uri:new en(window.location.href)}),ae=`${ne.protocol}://${ne.host}${ne.port?":"+ne.port:""}`,ue=ji(),he=(Ye,It)=>F.some(It),ke=[te.config({channel:`${Qw}-${b}`,updateState:he,initialData:t}),Po("messages",[Zr(()=>{const Ye=fc(He.fromDom(window),"message",It=>{if(ne.isSameOrigin(new en(It.raw.origin))){const gt=It.raw.data;li(gt)?X6(d,Je,gt):om(gt)&&t.onMessage(Je,gt)}});ue.set(Ye)}),If(ue.clear)]),Nc.config({channels:{[WM]:{onReceive:(Ye,It)=>{Qs(Ye.element,"iframe").each(gt=>{const Jt=gt.dom.contentWindow;K(Jt)&&Jt.postMessage(It,ae)})}}}})],Ie=Od({id:b,header:S,body:k,footer:R,extraClasses:j,extraBehaviours:ke,extraStyles:H},I,g),Je=go(Ie);return{dialog:Ie,instanceApi:Je}},Q6=t=>{const s=t.shared;return{open:(g,b)=>{const S=()=>{qa.hide(H),b()},k=er(Mv({name:"close-alert",text:"OK",primary:!0,buttonType:F.some("primary"),align:"end",enabled:!0,icon:F.none()},"cancel",t)),R=Dd(),I=Ca(S,s.providers),H=Ml(Ju({lazySink:()=>s.getSink(),header:tr(R,I),body:nm(g,s.providers),footer:F.some(yc(ku([],[k.asSpec()]))),onEscape:S,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nt(P1,S)],eventOrder:{}}));qa.show(H);const j=k.get(H);vo.focus(j)}}},yp=t=>{const s=t.shared;return{open:(g,b)=>{const S=ae=>{qa.hide(j),b(ae)},k=er(Mv({name:"yes",text:"Yes",primary:!0,buttonType:F.some("primary"),align:"end",enabled:!0,icon:F.none()},"submit",t)),R=Mv({name:"no",text:"No",primary:!1,buttonType:F.some("secondary"),align:"end",enabled:!0,icon:F.none()},"cancel",t),I=Dd(),H=Ca(()=>S(!1),s.providers),j=Ml(Ju({lazySink:()=>s.getSink(),header:tr(I,H),body:nm(g,s.providers),footer:F.some(yc(ku([],[R,k.asSpec()]))),onEscape:()=>S(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Nt(P1,()=>S(!1)),Nt(c2,()=>S(!0))],eventOrder:{}}));qa.show(j);const ne=k.get(j);vo.focus(ne)}}},FR=(t,s)=>Ut(ei("data",s,t)),$R=t=>Fw(t,".tox-alert-dialog")||Fw(t,".tox-confirm-dialog"),ZF=(t,s,d)=>s&&d?[]:[ai.config({contextual:{lazyContext:()=>F.some(Jr(He.fromDom(t.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:g=>ip(t,g.element).map(S=>({bounds:mv(S),optScrollEnv:F.some({currentScrollTop:S.element.dom.scrollTop,scrollElmTop:Ji(S.element).top})})).getOrThunk(()=>({bounds:Ni(),optScrollEnv:F.none()}))})],qF=t=>{const s=t.editor,d=qb(s),g=Q6(t.backstages.dialog),b=yp(t.backstages.dialog),S=(he,ke,ot)=>{if(!z(ke)){if(ke.inline==="toolbar")return H(he,t.backstages.popup.shared.anchors.inlineDialog(),ot,ke);if(ke.inline==="bottom")return j(he,t.backstages.popup.shared.anchors.inlineBottomDialog(),ot,ke);if(ke.inline==="cursor")return H(he,t.backstages.popup.shared.anchors.cursor(),ot,ke)}return I(he,ot)},k=(he,ke)=>R(he,ke),R=(he,ke)=>{const ot=Ie=>{const Je=bQ(Ie,{closeWindow:()=>{qa.hide(Je.dialog),ke(Je.instanceApi)}},s,t.backstages.dialog);return qa.show(Je.dialog),Je.instanceApi};return h.openUrl(ot,he)},I=(he,ke)=>{const ot=(Ie,Je,Ye)=>{const It=Je,Jt=bt({dataValidator:Ye,initialData:It,internalDialog:Ie},{redial:h.redial,closeWindow:()=>{qa.hide(Jt.dialog),ke(Jt.instanceApi)}},t.backstages.dialog);return qa.show(Jt.dialog),Jt.instanceApi.setData(It),Jt.instanceApi};return h.open(ot,he)},H=(he,ke,ot,Ie)=>{const Je=(Ye,It,gt)=>{const Jt=FR(It,gt),dn=sr(),Ot=t.backstages.popup.shared.header.isPositionedAtTop(),Hn={dataValidator:gt,initialData:Jt,internalDialog:Ye},Tn=()=>dn.on(Ss=>{ti.reposition(Ss),(!d||!Ot)&&ai.refresh(Ss)}),lo=ln(Hn,{redial:h.redial,closeWindow:()=>{dn.on(ti.hide),s.off("ResizeEditor",Tn),dn.clear(),ot(lo.instanceApi)}},t.backstages.popup,Ie.ariaAttrs,Tn),to=Ml(ti.sketch({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:Ie.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Qt([Po("window-manager-inline-events",[Nt(fh(),(Ss,es)=>{zo(lo.dialog,P1)})]),...ZF(s,d,Ot)]),isExtraPart:(Ss,es)=>$R(es)}));dn.set(to);const Bs=()=>{const Ss=s.inline?Io():He.fromDom(s.getContainer()),es=Jr(Ss);return F.some(es)};return ti.showWithinBounds(to,jl(lo.dialog),{anchor:ke},Bs),(!d||!Ot)&&(ai.refresh(to),s.on("ResizeEditor",Tn)),lo.instanceApi.setData(Jt),qn.focusIn(lo.dialog),lo.instanceApi};return h.open(Je,he)},j=(he,ke,ot,Ie)=>{const Je=(Ye,It,gt)=>{const Jt=FR(It,gt),dn=sr(),Ot=t.backstages.popup.shared.header.isPositionedAtTop(),Hn={dataValidator:gt,initialData:Jt,internalDialog:Ye},Tn=()=>dn.on(Ss=>{ti.reposition(Ss),ai.refresh(Ss)}),lo=ln(Hn,{redial:h.redial,closeWindow:()=>{dn.on(ti.hide),s.off("ResizeEditor ScrollWindow ElementScroll",Tn),dn.clear(),ot(lo.instanceApi)}},t.backstages.popup,Ie.ariaAttrs,Tn),to=Ml(ti.sketch({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:Ie.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Qt([Po("window-manager-inline-events",[Nt(fh(),(Ss,es)=>{zo(lo.dialog,P1)})]),ai.config({contextual:{lazyContext:()=>F.some(Jr(He.fromDom(s.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:Ss=>ip(s,Ss.element).map(rn=>({bounds:mv(rn),optScrollEnv:F.some({currentScrollTop:rn.element.dom.scrollTop,scrollElmTop:Ji(rn.element).top})})).getOrThunk(()=>({bounds:Ni(),optScrollEnv:F.none()}))})]),isExtraPart:(Ss,es)=>$R(es)}));dn.set(to);const Bs=()=>t.backstages.popup.shared.getSink().toOptional().bind(Ss=>{const es=ip(s,Ss.element),rn=15,Mn=es.map(so=>mv(so)).getOr(Ni()),No=Jr(He.fromDom(s.getContentAreaContainer())),fo=gg(No,Mn);return F.some(Tr(fo.x,fo.y,fo.width,fo.height-rn))});return ti.showWithinBounds(to,jl(lo.dialog),{anchor:ke},Bs),ai.refresh(to),s.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",Tn),lo.instanceApi.setData(Jt),qn.focusIn(lo.dialog),lo.instanceApi};return h.open(Je,he)};return{open:S,openUrl:k,alert:(he,ke)=>{g.open(he,ke)},close:he=>{he.close()},confirm:(he,ke)=>{b.open(he,ke)}}},CQ=t=>{wN(t),$U(t),xY(t)};var ls=()=>{Vd.add("silver",t=>{CQ(t);let s=()=>Ni();const{dialogs:d,popups:g,renderUI:b}=kX(t,{getPopupSinkBounds:()=>s()}),S=()=>{const H=b();return ip(t,g.getMothership().element).each(ne=>{s=()=>mv(ne)}),H};NW.register(t,g.backstage.shared);const k=qF({editor:t,backstages:{popup:g.backstage,dialog:d.backstage}}),R=sr(),I=()=>Hz(t,{backstage:g.backstage},g.getMothership(),R);return{renderUI:S,getWindowManagerImpl:ee(k),getNotificationManagerImpl:I}})};ls()}();const jbe={class:"ik__tinymce__editor"},Gbe=f.defineComponent({__name:"index",props:{modelValue:{type:String,default:""},setting:{type:Object,default:()=>{}},disabled:{type:Boolean,default:!1},minHeight:{type:Number,default:250},maxHeight:{type:Number,default:null},collapse:{type:Boolean,default:!1},plugins:{type:String,default:"autolink autoresize fullscreen image insertdatetime link lists media preview table wordcount code searchreplace"},toolbar:{type:String,default:"undo redo | blocks | fontfamily fontsize | bold italic underline strikethrough image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor removeformat | link table insertdatetime searchreplace | preview code fullscreen"},branding:{type:Boolean,default:!1},menubar:{type:Boolean,default:!1},selector:{type:String||null,default:null},callback:{type:Function,default:null},size:{type:Number,default:5},uploadUrl:{type:String,default:""},loadUrl:{type:String,default:""},header:{type:Object,default:()=>{}}},emits:["update:modelValue"],setup(c,{emit:r}){f.useCssVars(V=>({"01c39de6":N.value}));const a=c,l=r,i=wo.ikDom.getDomDataset(null,"theme")==="light",{cLoadUrl:m,cUploadUrl:v}=Xv(a);console.log("cLoadUrl",m,v);const C=f.ref({license_key:"gpl",font_size_input_default_unit:"px",font_size_formats:"8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 36px 48px 72px",language_url:"tinymce/langs/zh-Hans.js",font_family_formats:"系统字体=Source Han Sans CN Medium;宋体=SimSun;sans-serif;微软雅黑=Microsoft YaHei; Helvetica; Tahoma; Arial",language:"zh-Hans",skin_url:i?"tinymce/skins/ui/oxide":"tinymce/skins/ui/oxide-dark",content_css:i?"tinymce/skins/content/default/content.min.css":"tinymce/skins/content/dark/content.min.css",min_height:a.minHeight,max_height:a.maxHeight,selector:a.selector,plugins:a.plugins,toolbar:a.toolbar,branding:a.branding,menubar:a.menubar,toolbar_mode:"sliding",insertdatetime_formats:["%Y年%m月%d日","%H点%M分%S秒","%Y-%m-%d","%H:%M:%S"],images_upload_handler:(V,U,z,W)=>new Promise((K,Z)=>{if(a.callback){a.callback(V,W).then(ce=>{K(ce)});return}if(V.blob().size/1024/1024>a.size)Z(new Error(`上传错误,图片大小请控制在 ${a.size}M 以内`));else{if(!v.value){Z(new Error("请传入uploadUrl"));return}const ce=new FormData;ce.append("file",V.blob());const q={headers:{"Content-Type":"multipart/form-data",...a.header}};e$.post(v.value,ce,q).then(X=>{X.data.code===0?K(m.value+X.data.data.id):Z(new Error(`HTTP Error: 上传失败${X.data.code}`))}).catch(()=>{Z(new Error("上传出错,服务器开小差了呢"))})}})}),E=f.ref(a.modelValue),T=f.computed(()=>Object.assign(C.value,a.setting));f.watch(()=>E.value,V=>{l("update:modelValue",V)}),f.watch(()=>a.modelValue,V=>{E.value=V});const N=f.computed(()=>`${a.collapse?50:a.maxHeight}px`);return f.onMounted(()=>{Dbe.init({})}),(V,U)=>(f.openBlock(),f.createElementBlock("div",jbe,[f.createVNode(f.unref(Wbe),{modelValue:E.value,"onUpdate:modelValue":U[0]||(U[0]=z=>E.value=z),init:T.value,disabled:c.disabled},null,8,["modelValue","init","disabled"])]))}}),U3e="",W3e="",Zbe=Gs(Gbe),qbe={class:"align-center flex justify-between"},Kbe={class:"align-center flex"},Ybe={style:{overflow:"hidden"}},Xbe=f.defineComponent({__name:"index",props:f.mergeModels({showToggle:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const r=f.useModel(c,"modelValue"),a=()=>{r.value=!r.value};return(l,i)=>{const m=f.resolveComponent("el-button"),v=f.resolveComponent("el-card");return f.openBlock(),f.createBlock(v,{class:f.normalizeClass(["ik-collapse-box-card",r.value?"hiddened":""]),shadow:"hover"},{header:f.withCtx(()=>[f.createElementVNode("div",qbe,[f.createCommentVNode(" card header左侧内容 "),f.renderSlot(l.$slots,"header-leaft",{},void 0,!0),f.createElementVNode("div",Kbe,[f.createCommentVNode(" card header右侧内容 "),f.renderSlot(l.$slots,"header-right",{},void 0,!0),f.createCommentVNode(" 展开、收起按钮 "),c.showToggle?(f.openBlock(),f.createBlock(m,{key:0,link:"",class:"ml-[8px]",onClick:i[0]||(i[0]=C=>a())},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(r.value?"展开":"收起")+" ",1),f.createVNode(f.unref(cr),{name:"iksvg_shouqi",size:16,class:f.normalizeClass(r.value?"toogle":null)},null,8,["class"])]),_:1})):f.createCommentVNode("v-if",!0)])])]),default:f.withCtx(()=>[f.createElementVNode("div",Ybe,[f.renderSlot(l.$slots,"default",{},void 0,!0)])]),_:3},8,["class"])}}}),j3e="",Qbe=Gs(Zs(Xbe,[["__scopeId","data-v-eab56bfd"]])),Jbe="data:image/webp;base64,UklGRsQNAABXRUJQVlA4WAoAAAAwAAAAxwAAxwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBItgcAAA3wh+3/2cj//133toP17HZn1rZt27aNp7F42rZt27afs/buPNc2R9vZnbb3P5p02jTJ8+VXREwA//f///3/vw/6G6cnW+zsgayA+/DPn1gZyxevWnvVy+8WugrfogtIzJRuM9tc+VWRmt/Qq/jmp15SJyr/Dglc59EtV4WjG3Ij0OQC30x1nvIfkNCyqPEcjcb/CIbTkl50HN+7JPqM6rdFMwnTC55ynCUk/o1froqiiVnjLU6TPt8GvPcuiiKvpEk+TrsQO+weWGn2fV+T7xxnki0w6S2zb719DPIfcJpKafbQ+0czHT9nIHBkLk7bBHtsuD1kwunJ+b2Kb1qG42bYREpqthn89tNZHDjVJih7Ohp3n1rwd+G/rs64qvq6a377GzCrB7S8eela93cNQMqFD7m/6hFU3+f+1rWMWIf7X3prKhx8/W/Ar0sXVFv/Fn8H1z+yn//7/x+bFbsmZ61TF9GkxbmV+xJi4KKN2TXP357rGq5tsz7ceNlzar1mC3cGoFmfh93C7ORtigzjU8v5HjoUEKBVcKM7qDljP5Gjv8m32ozTh0QBxr7vDm49mQ+IFu/5pcVKXHEaBIW6xTe4gXbVTooCQr/MXGtdUXAaUAFGfKou4O6ziihASs9vLJU+8xwKAkqNMhucb7CexVR6rMmx0vWcU8F08FfqWOXnZWS9nYPnDgUQFEju8Z2FavcHAQVEqZy+3qnSnv9rV7W2N+ZPQ0Ux77Ql2zq3E6mCcb8fwg51+4GdUKnL59diKgokdfvRMq3rGwgKCJpebY3dlcyLTZsGB0C0b0cAUQBRoO2eE1a5B1NRDId5Pw/a27j3YnPnGUWUEhdEIIqpd+7aFdboDyBK1A2r/GBvM988H4sBwTOIQmOMRQFBwdf1aJYVqtwRgSggCohCg4N5tuZv9HsMPHcGEYWMNBNEMW+7ygq3E7UoIKiUO2lrdPkjBpMIAkgTIkUBUUAUSMsLxs87wEQUcxUKsff624qWfAOIQkkMVTAXhZAQ/6EUURQQNO2MvZU9XbQLMK5kJCggKCCKp0Ru/C6JQlBAlMimm+ytkCKnXWQgHr+JEqkeBRWk8eb4tY3CVBSQtIKArW01aHxX3V+vOWPwOiAKxTD2hEUBCQsISqXD8dvcpEjGqtj6sojSH0H3blMi6tUnUrQg2WMAiAKiAKJK/K+5OSVCUBAUEAV2E9uQ1yZCv0f0BhiUeQaYRKQooUPVjERBFAQFyLLAr9curl+qdEmvCsC5/LAqhI+djFFOaZvIJDKnNHBeAVlgELnvdOVkX1IynjASlrxzGhYltB0rrrpjW25OwTsjd9YS+PlV4rurtk38ZfCz9IB7ATxlzUQPbTuVfVqnZ2yvi/D4OqwenPSn/CbEf3P1UvYwt9MF5yE8uGa9X4kMvT7DSBQE5cxzP7S8G1RIwDwECwa/G2QPzJ416QAUvLId44vK9StdukoKwLF8ROR4YUdA0AQAROPHMwtsgvZPLvqFaAvv+S4np/aiwmHw/DYMPSSuqKBx+9HT0yao8Manj0Zj+OcjXaYhiqlowsTTk16pUsWMjIzyfn8+tul7wD8vUIRIUaIUTRRR8IaiK1OrRo2aVatWrYA9T7n4np2784ogirkoop5wIggKvqBB8Yb1G9SvUycJm29xc51agR3bt2/P2lZgIAqiRp4wiDeYCB6NCNdv3qJZkwycM71uvXr1GtU5vGnjhnU7JQzekJE3BPgSI5xUMm3A3Tizt1bTZs1blt+Um5Lc13/myKEDB8OeMFAsYL16vbuGUnH6MtVISu7RLK1i5ar+PX+eCgZCViveZ+gA3GZq7TRKlZMGp346b5nUYeN74lpLdL+s5efPL7NE0wtH4XLLjp6bdPsnGq/u11fCDbe53n/hprjUebg0brnrg0++HIdZl+Oiiz2x7NmY3VALVy2PPr05RsPb4rKTL3w4RtfjulutjVEz95VNjHfXcl3vx+r+xW5r+cZYvRie667W30DM51e5weOiXnmO2Ost3z/Rwi2tWUp8My9ufF1DFxT++vFjxDv01l21LhjodTWhPz9+D0uGv3pqw/gJbcWdBNYt+/V3LHzorXeODRvcs5i7yPvpz21bDmD9fZ9+uax17x7tkt1BYMXPP20kcQv++PGXjc07tW9Xw+F++WTZFhK/YFXmipX5rVs0b9qgmGO9eRTbPLFm/YZN2ys2blyvbt3K4jy+oH0Yhndv2bJ9x44ztWpVr1GjRrUKXufYhj2f3bV73969e/ef8FeuXLlCekZ6etU0mzuzyabMQ8cOHTp09Pix48eTliXb2xM45u43rre1He85B3c2H2pjObNw0NCkOQNsK3sSjhoYP3SBTe2cjsMWXpL9RDk7evVhnPftmxfN8djN1stw5OPXrbl+hNjJgTt+x6nX3rrnivGpdrH+0Z9x8vUP/jhxejMbyP7whTyc/sTLr+rEkU0SKvuLdzNxh5ve/jhvSL9u/oQIrf3mmyzc5N4vvvu9Yvd2bRr5rHR0TWbmKlyobv515eo9jRo1ali/RvE4hQ7s3JW1YSOuNrAxK+uvbXtL1KiWnpGRXqp0qZIpST6fp7AwWBjIyc7JOX7kyOHDB3DPx/fuP37s2PHcnNy8c4XBYJj/+//vIFZQOCAYBAAAcCYAnQEqyADIAD5tNJRHJCMiISvyiPiADYlpbuDBAGYRXF+rX9t+hjqM7pIF9eBTlH6gv8R/mvWA9AD9ayAhs9OaDQjqaDQjqaDQjqaDQjqaDQjnP7ghXsfVmkhVaupg587B4DccaMinvHlXs9LP9KH3nnDi9oABanfiqh1umgGgkUwrXUdjnXbGhvW+Or3LG4UiAKEc6ccAENgIFux0hK5ezNEx0l5gmBUUZIApUdbRkem/lbVMq/YwMWzgoLsd1nro72478RI19rqxwJDqSR4/IuWm58kb3nxL3aEustTkr/M3yjM0oJDDlh4GKURv+BdLYZoXz4WxryXoLIqKXpktQmuHWwzRe47whdrmzHswyjo53CAmsgk4Iic1ygOEP/RwmXouxtW7QXI3+i/C9cjbFkQdhPTmg0I5sAD+1OAAAAAAAAUtUJO41caEFL7eA7m9QvuxTmHlxuLyEB7E6KE4ychfGIZ6BTAkAyk8yQo+tLs6/u012dqarpn9L3T1dRlBmTp7tgDPBHMGe/I1Zc+/FDvZ9n7fp73ZJH/xAHyRiiRh9HAT16gKcaESmXKfJfLPBUa/ugHHOyCVvintjUq0eGOhYHrInsysNlAVVC3ddkAdR2TXu4Sc+fd0ER64kiqk6i9KkIKvpGpQmPjIX+c6M7if+oL1oWzcE7tPiUqs46C0MYDZi5R1OCIlSDIvpTv2q7ZZm0IFLKBlQ3h8yDNYlMTlezYHV5C3So4+TcKw8uos3oqUCjTCJJe+Tpxfy2A6y02pSvGcSbd1l1d6iC4jpWUi8oqc5SYvCbyA3UUGr2jqkGliOWL/P+PrB4Glkfp3Ui9D77WUraYifMpM6CrtFwM77XK3TJ6fIaN5nZheupcjT3IezOg8yVFR+QFbkhzlx+XM4vb/LD4sU24lkBVDGe8ZLsjEvoWuvRKL8r+WkJU9HzBJTqi1+tbZwGTJnJTf2KdYhiLWgvT/AAwIYvVXRfelyFaupawB8XyeZHb21XVxmvWiVznZT4poJpD2Vyb+s7FjJ/CxHndJFnAAb7i12LhviVfbR43sCGpndxAbd4cAsHjAnxPN12PD/3pHX3i4SsEZ7M05B1zCInaJoANxXncuc3+uM/ca4G/6WEEI8UtBvIFTzcKccHP7xoKHp6/VK1h1bT4/+RrbkB58p1j1rIdBqu4fDr8gmFjQOt0HOFew45WoqfuOIfQdL0gD4voJyeEhdYyCiTN1O46roB4DpWuQcWUgoFfvz1dDE8uGtKEHyi7jc0q48zOHkzH/vTySe7LfzxiOADn5rr2wQldr2VyidLqrCj4eYGZiRCWG4XBZUyfmqoPGv3/QPKd1t3sUFKUVmamcHPi7PRmd+w5vBb/8GJFf/9Z07s/a1fhmEKYAAAAAAA==",e2e={class:"ik-empty-content flex flex-col items-center"},t2e=["src"],n2e=f.defineComponent({__name:"index",props:{tip:{type:String,default:"暂无数据"},showSvg:{type:Boolean,default:!0},size:{type:Number,default:250}},setup(c){return(r,a)=>f.renderSlot(r.$slots,"default",{},()=>[f.createElementVNode("div",e2e,[f.createElementVNode("img",{src:f.unref(Jbe)},null,8,t2e),f.createElementVNode("span",null,f.toDisplayString(c.tip),1)])],!0)}}),Z3e="",o2e=Gs(Zs(n2e,[["__scopeId","data-v-8b1ddbf0"]])),s2e=f.defineComponent({__name:"IkDescription",props:{showIcon:{type:Boolean,default:!1},listData:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})},titleProps:{type:Object,default:()=>({})},fileField:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},labelWidth:{type:String||Number,default:"150px"},onlyOfficeConfig:{type:Object,default:()=>({})}},setup(c){f.useCssVars(i=>({"78351cba":l.value}));const r=c,a={id:"id",value:"value",props:"props",label:"label",tag:"tag",fileList:"fileList",...r.fileField},l=f.computed(()=>typeof r.labelWidth=="number"?`${r.labelWidth}px`:r.labelWidth);return(i,m)=>{const v=f.resolveComponent("el-descriptions-item"),C=f.resolveComponent("el-descriptions");return f.openBlock(),f.createBlock(C,f.mergeProps({class:"margin-top"},{...c.titleProps,...r}),{extra:f.withCtx(()=>[f.renderSlot(i.$slots,"extra",{},void 0,!0)]),default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.listData,E=>(f.openBlock(),f.createBlock(v,f.mergeProps({key:E[a.id],ref_for:!0},E[a.props]),{label:f.withCtx(()=>[f.renderSlot(i.$slots,E[a.label],{},()=>[f.createTextVNode(f.toDisplayString(E[a.label]),1)],!0)]),default:f.withCtx(()=>[f.renderSlot(i.$slots,`${E[a.label]}_value`,{},()=>[f.createTextVNode(f.toDisplayString(E[a.value])+" ",1),E[a.tag]?(f.openBlock(),f.createBlock(f.unref(Lt.ElTag),{key:0,size:"small"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(E[a.value].value),1)]),_:2},1024)):f.createCommentVNode("v-if",!0),f.createVNode(f.unref(TO),{list:E[a.fileList],field:c.fileField,"load-url":c.loadUrl,"show-bg":!1},null,8,["list","field","load-url"])],!0)]),_:2},1040))),128))]),_:3},16)}}}),K3e="",r2e=Gs(Zs(s2e,[["__scopeId","data-v-8171d392"]])),i2e=f.defineComponent({__name:"IkAutoCard",props:{line:{default:2}},setup(c){const r=f.ref(null);return(a,l)=>(f.openBlock(),f.createElementBlock("div",{class:"ik-auto-card",ref_key:"ikAutoCard",ref:r,style:f.normalizeStyle({"-webkit-line-clamp":a.line||2})},[f.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),X3e="",a2e=Gs(Zs(i2e,[["__scopeId","data-v-8d64f23f"]])),l2e=Gs(f.defineComponent({__name:"IkCurrencyInput",props:f.mergeModels({isShowDecimal:{type:Boolean,default:!1},maxLength:{type:Number,default:20}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const r=f.useModel(c,"modelValue"),a=c,l=m=>{let v=m;v=v.replace(/[^\d\.]/g,""),v=v.replace(/^\./g,""),v=v.replace(/\.{2,}/g,"."),v=v.replace(".","$#$").replace(/\./g,"").replace("$#$",".");let C=a.maxLength,E=new RegExp(`^(\\d{${C}})\\d+|((\\.\\d{2})\\d+)$`,"g");v=v.replace(E,"$1$3");const T=/\d{1,3}(?=(\d{3})+$)/g;if(v=v.replace(/^(\d+)((\.\d+)?)$/,function(N,V,U){return V.replace(T,"$&,")+U}),v[v.length-1]==="."){let N=v.substring(0,v.length-1);const V=/\d{1,3}(?=(\d{3})+$)/g;N=N.replace(/^(\d+)((\.\d+)?)$/,function(U,z,W){return z.replace(V,"$&,")+W}),v=N+"."}return v.length>=2&&v[0]==="0"&&v[1]!=="."&&(v=v.slice(1)),r.value=v.replace(/\$\s?|(,*)/g,""),v},i=()=>{a.isShowDecimal&&(r.value=parseFloat(r.value).toFixed(2))};return(m,v)=>{const C=f.resolveComponent("el-input");return f.openBlock(),f.createBlock(C,f.mergeProps({modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=E=>r.value=E)},m.$attrs,{placeholder:"请输入金额",formatter:E=>l(E),onBlur:i}),null,16,["modelValue","formatter"])}}}));function c2e(c,r,a,l){function i(m){return m instanceof a?m:new a(function(v){v(m)})}return new(a||(a=Promise))(function(m,v){function C(N){try{T(l.next(N))}catch(V){v(V)}}function E(N){try{T(l.throw(N))}catch(V){v(V)}}function T(N){N.done?m(N.value):i(N.value).then(C,E)}T((l=l.apply(c,r||[])).next())})}function u2e(c,r){var a={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},l,i,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(T){return function(N){return E([T,N])}}function E(T){if(l)throw new TypeError("Generator is already executing.");for(;v&&(v=0,T[0]&&(a=0)),a;)try{if(l=1,i&&(m=T[0]&2?i.return:T[0]?i.throw||((m=i.return)&&m.call(i),0):i.next)&&!(m=m.call(i,T[1])).done)return m;switch(i=0,m&&(T=[T[0]&2,m.value]),T[0]){case 0:case 1:m=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,i=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(m=a.trys,!(m=m.length>0&&m[m.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!m||T[1]>m[0]&&T[1]<m[3])){a.label=T[1];break}if(T[0]===6&&a.label<m[1]){a.label=m[1],m=T;break}if(m&&a.label<m[2]){a.label=m[2],a.ops.push(T);break}m[2]&&a.ops.pop(),a.trys.pop();continue}T=r.call(c,a)}catch(N){T=[6,N],i=0}finally{l=m=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var d2e=function(c,r){return c2e(void 0,void 0,void 0,function(){return u2e(this,function(a){return[2,new Promise(function(l,i){try{if(window.DocsAPI)return l(null);var m=document.getElementById(r);if(m)var v=setInterval(function(){var E=m.getAttribute("loading");if(!E){if(clearInterval(v),window.DocsAPI)return l(null);var T=_ne(r,c,l,i);m.remove(),document.body.appendChild(T)}},500);else{var C=_ne(r,c,l,i);document.body.appendChild(C)}}catch(E){console.error(E)}})]})})},_ne=function(c,r,a,l){var i=document.createElement("script");return i.id=c,i.type="text/javascript",i.src=r,i.async=!0,i.onload=function(){i.removeAttribute("loading"),a(null)},i.onerror=function(m){i.removeAttribute("loading"),l(m)},i.setAttribute("loading",""),i},RV=f.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var c=this,r=this.documentServerUrl;r.endsWith("/")||(r+="/");var a="".concat(r,"web-apps/apps/api/documents/api.js");d2e(a,"onlyoffice-api-script").then(function(){return c.onLoad()}).catch(function(){c.onError(-2)})},unmounted:function(){var c,r=this.id||"";!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[r]&&(window.DocEditor.instances[r].destroyEditor(),window.DocEditor.instances[r]=void 0)},watch:{config:{handler:function(c,r){this.onChangeProps()},deep:!0},document_fileType:function(c,r){this.onChangeProps()},document_title:function(c,r){this.onChangeProps()},documentType:function(c,r){this.onChangeProps()},editorConfig_lang:function(c,r){this.onChangeProps()},height:function(c,r){this.onChangeProps()},type:function(c,r){this.onChangeProps()},width:function(c,r){this.onChangeProps()}},methods:{onLoad:function(){var c,r;try{var a=this.id||"";if(window.DocsAPI||this.onError(-3),!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[a]){console.log("Skip loading. Instance already exists",a);return}!((r=window==null?void 0:window.DocEditor)===null||r===void 0)&&r.instances||(window.DocEditor={instances:{}});var l=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),i=window.DocsAPI.DocEditor(a,l);window.DocEditor.instances[a]=i}catch(m){console.error(m),this.onError(-1)}},onError:function(c){var r;switch(c){case-2:r="Error load DocsAPI from "+this.documentServerUrl;break;case-3:r="DocsAPI is not defined";break;default:r="Unknown error loading component",c=-1}typeof this.onLoadComponentError>"u"?console.error(r):this.onLoadComponentError(c,r)},onAppReady:function(){var c=this.id||"";this.events_onAppReady(window.DocEditor.instances[c])},onChangeProps:function(){var c,r=this.id||"";!((c=window==null?void 0:window.DocEditor)===null||c===void 0)&&c.instances[r]&&(window.DocEditor.instances[r].destroyEditor(),window.DocEditor.instances[r]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const f2e=["id"];function m2e(c,r,a,l,i,m){return f.openBlock(),f.createElementBlock("div",{id:c.id},null,8,f2e)}RV.render=m2e,RV.__file="src/components/DocumentEditor.vue";const wne=Gs(f.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(c){const r=c,a=f.ref({width:"100%",height:"100%",...r.configOptions||{},...r.configOptions}),l=()=>{console.info("文档加载完成",r.configOptions)};return(i,m)=>(f.openBlock(),f.createElementBlock("div",{style:f.normalizeStyle({height:r.officeHeight})},[f.createVNode(f.unref(RV),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":c.documentServerUrl,config:a.value,events_onDocumentReady:l},null,8,["id","document-server-url","config"])],4))}})),h2e=Gs(f.defineComponent({__name:"index",props:f.mergeModels({prop:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})}},{modelValue:{type:[Array,String],default:""},modelModifiers:{}}),emits:f.mergeModels(["close"],["update:modelValue"]),setup(c,{emit:r}){const a=c,l=f.getCurrentInstance(),i=f.computed(()=>({label:"label",value:"value",...a.prop})),m=f.useModel(c,"modelValue"),v=f.computed(()=>{let T=[];const N=l==null?void 0:l.attrs.options;return Array.isArray(m.value)?T=m.value.map(V=>N.find(U=>U[i.value.value]===V)):m.value&&(T=[N.find(V=>V[i.value.value]===m.value)]),{list:T.map(V=>V[i.value.label]).join(","),data:T}}),C=r,E=T=>{m.value=m.value.filter(N=>N!==T[i.value.value]),C("close",T,m.value)};return(T,N)=>{const V=f.resolveComponent("el-option"),U=f.resolveComponent("el-select");return f.openBlock(),f.createBlock(U,f.mergeProps(T.$attrs,{"collapse-tags":!1,modelValue:m.value,"onUpdate:modelValue":N[0]||(N[0]=z=>m.value=z),"no-data-text":"暂无数据","no-match-text":"无匹配项"}),{tag:f.withCtx(()=>[f.withDirectives(f.createVNode(f.unref(Qte),f.mergeProps({list:v.value.list,data:v.value.data},c.tagProps,{onClose:E}),null,16,["list","data"]),[[f.vShow,v.value]])]),default:f.withCtx(()=>[f.renderSlot(T.$slots,"default",{},()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(T.$attrs.options,z=>(f.openBlock(),f.createBlock(V,{key:z[i.value.value],label:z[i.value.label],value:z[i.value.value],disabled:z.disabled},null,8,["label","value","disabled"]))),128))])]),_:3},16,["modelValue"])}}}));var Sne;const Ene=typeof window<"u",g2e=c=>typeof c=="string",p2e=()=>{};Ene&&((Sne=window==null?void 0:window.navigator)!=null&&Sne.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kne(c){return typeof c=="function"?c():f.unref(c)}function v2e(c){return c}function y2e(c){return f.getCurrentScope()?(f.onScopeDispose(c),!0):!1}function b2e(c){var r;const a=kne(c);return(r=a==null?void 0:a.$el)!=null?r:a}const C2e=Ene?window:void 0;function IO(...c){let r,a,l,i;if(g2e(c[0])||Array.isArray(c[0])?([a,l,i]=c,r=C2e):[r,a,l,i]=c,!r)return p2e;Array.isArray(a)||(a=[a]),Array.isArray(l)||(l=[l]);const m=[],v=()=>{m.forEach(N=>N()),m.length=0},C=(N,V,U,z)=>(N.addEventListener(V,U,z),()=>N.removeEventListener(V,U,z)),E=f.watch(()=>[b2e(r),kne(i)],([N,V])=>{v(),N&&m.push(...a.flatMap(U=>l.map(z=>C(N,U,z,V))))},{immediate:!0,flush:"post"}),T=()=>{E(),v()};return y2e(T),T}const xne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ane="__vueuse_ssr_handlers__";xne[Ane]=xne[Ane]||{};var Tne;(function(c){c.UP="UP",c.RIGHT="RIGHT",c.DOWN="DOWN",c.LEFT="LEFT",c.NONE="NONE"})(Tne||(Tne={}));var _2e=Object.defineProperty,Dne=Object.getOwnPropertySymbols,w2e=Object.prototype.hasOwnProperty,S2e=Object.prototype.propertyIsEnumerable,Rne=(c,r,a)=>r in c?_2e(c,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[r]=a,E2e=(c,r)=>{for(var a in r||(r={}))w2e.call(r,a)&&Rne(c,a,r[a]);if(Dne)for(var a of Dne(r))S2e.call(r,a)&&Rne(c,a,r[a]);return c};E2e({linear:v2e},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const k2e={urlList:{type:Array,default:()=>[]},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:["anonymous","use-credentials",""]}},x2e={close:()=>!0,switch:c=>wo.paramType.isNumber(c),rotate:c=>wo.paramType.isNumber(c)},A2e=["src","crossorigin"],OV=Gs(f.defineComponent({name:"ElImageViewer",__name:"IkImageViewer",props:k2e,emits:x2e,setup(c,{expose:r,emit:a}){const l=We=>Object.keys(We),i={CONTAIN:{name:"contain",icon:f.markRaw(qre)},ORIGINAL:{name:"original",icon:f.markRaw(rie)}},m=c,v=a,{t:C}=Lt.useLocale(),E=Lt.useNamespace("image-viewer"),{nextZIndex:T}=Lt.useZIndex(),N=f.ref(),V=f.ref([]),U=f.effectScope(),z=f.ref(!0),W=f.ref(m.initialIndex),K=f.shallowRef(i.CONTAIN),Z=f.ref({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),ce=f.ref(m.zIndex??T()),q=f.computed(()=>{const{urlList:We}=m;return We.length<=1}),X=f.computed(()=>W.value===0),Ce=f.computed(()=>W.value===m.urlList.length-1),st=f.computed(()=>m.urlList[W.value]),Ne=f.computed(()=>[E.e("btn"),E.e("prev"),E.is("disabled",!m.infinite&&X.value)]),ee=f.computed(()=>[E.e("btn"),E.e("next"),E.is("disabled",!m.infinite&&Ce.value)]),xe=f.computed(()=>{const{scale:We,deg:at,offsetX:Sn,offsetY:lt,enableTransition:$t}=Z.value;let Ze=Sn/We,ct=lt/We;const oe=at*Math.PI/180,po=Math.cos(oe),Nn=Math.sin(oe);Ze=Ze*po+ct*Nn,ct=ct*po-Sn/We*Nn;const yo={transform:`scale(${We}) rotate(${at}deg) translate(${Ze}px, ${ct}px)`,transition:$t?"transform .3s":""};return K.value.name===i.CONTAIN.name&&(yo.maxWidth=yo.maxHeight="100%"),yo});function et(){je(),v("close")}function tt(){const We=wo._.throttle(Sn=>{switch(Sn.code){case Lt.EVENT_CODE.esc:m.closeOnPressEscape&&et();break;case Lt.EVENT_CODE.space:F();break;case Lt.EVENT_CODE.left:Ge();break;case Lt.EVENT_CODE.up:kt("zoomIn");break;case Lt.EVENT_CODE.right:Et();break;case Lt.EVENT_CODE.down:kt("zoomOut");break}}),at=wo._.throttle(Sn=>{const lt=Sn.deltaY||Sn.deltaX;kt(lt<0?"zoomIn":"zoomOut",{zoomRate:m.zoomRate,enableTransition:!1})});U.run(()=>{IO(document,"keydown",We),IO(document,"wheel",at)})}function je(){U.stop()}function be(){z.value=!1}function An(We){z.value=!1,We.target.alt=C("el.image.error")}function fn(We){if(z.value||We.button!==0||!N.value)return;Z.value.enableTransition=!1;const{offsetX:at,offsetY:Sn}=Z.value,lt=We.pageX,$t=We.pageY,Ze=wo._.throttle(oe=>{Z.value={...Z.value,offsetX:at+oe.pageX-lt,offsetY:Sn+oe.pageY-$t}}),ct=IO(document,"mousemove",Ze);IO(document,"mouseup",()=>{ct()}),We.preventDefault()}function Vt(){Z.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function F(){if(z.value)return;const We=l(i),at=Object.values(i),Sn=K.value.name,$t=((at==null?void 0:at.findIndex(Ze=>Ze.name===Sn))+1)%We.length;K.value=i[We[$t]],Vt()}function _n(We){const at=m.urlList.length;W.value=(We+at)%at}function Ge(){X.value&&!m.infinite||_n(W.value-1)}function Et(){Ce.value&&!m.infinite||_n(W.value+1)}function kt(We,at={}){if(z.value)return;const{minScale:Sn,maxScale:lt}=m,{zoomRate:$t,rotateDeg:Ze,enableTransition:ct}={zoomRate:m.zoomRate,rotateDeg:90,enableTransition:!0,...at};switch(We){case"zoomOut":Z.value.scale>Sn&&(Z.value.scale=Number.parseFloat((Z.value.scale/$t).toFixed(3)));break;case"zoomIn":Z.value.scale<lt&&(Z.value.scale=Number.parseFloat((Z.value.scale*$t).toFixed(3)));break;case"clockwise":Z.value.deg+=Ze,v("rotate",Z.value.deg);break;case"anticlockwise":Z.value.deg-=Ze,v("rotate",Z.value.deg);break}Z.value.enableTransition=ct}return f.watch(st,()=>{f.nextTick(()=>{const We=V.value[0];We!=null&&We.complete||(z.value=!0)})}),f.watch(W,We=>{Vt(),v("switch",We)}),f.onMounted(()=>{var We,at;tt(),(at=(We=N.value)==null?void 0:We.focus)==null||at.call(We)}),r({setActiveItem:_n}),(We,at)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"viewer-fade",appear:""},{default:f.withCtx(()=>[f.createElementVNode("div",{ref_key:"wrapper",ref:N,tabindex:-1,class:f.normalizeClass(f.unref(E).e("wrapper")),style:f.normalizeStyle({zIndex:ce.value})},[f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("mask")),onClick:at[0]||(at[0]=f.withModifiers(Sn=>We.hideOnClickModal&&et(),["self"]))},null,2),f.createCommentVNode(" CLOSE "),f.createElementVNode("span",{class:f.normalizeClass([f.unref(E).e("btn"),f.unref(E).e("close")]),onClick:et},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(WR))]),_:1})],2),f.createCommentVNode(" ARROW "),q.value?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("span",{class:f.normalizeClass(Ne.value),onClick:Ge},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(n$))]),_:1})],2),f.createElementVNode("span",{class:f.normalizeClass(ee.value),onClick:Et},[f.createVNode(f.unref(Lt.ElIcon),null,{default:f.withCtx(()=>[f.createVNode(f.unref(o$))]),_:1})],2)],64)),f.createCommentVNode(" ACTIONS "),f.createElementVNode("div",{class:f.normalizeClass([f.unref(E).e("btn"),f.unref(E).e("actions")])},[f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("actions__inner"))},[f.createVNode(f.unref(Lt.ElIcon),{onClick:at[1]||(at[1]=Sn=>kt("zoomOut"))},{default:f.withCtx(()=>[f.createVNode(f.unref(vie))]),_:1}),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[2]||(at[2]=Sn=>kt("zoomIn"))},{default:f.withCtx(()=>[f.createVNode(f.unref(FQ))]),_:1}),f.createElementVNode("i",{class:f.normalizeClass(f.unref(E).e("actions__divider"))},null,2),f.createVNode(f.unref(Lt.ElIcon),{onClick:F},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(K.value.icon)))]),_:1}),f.createElementVNode("i",{class:f.normalizeClass(f.unref(E).e("actions__divider"))},null,2),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[3]||(at[3]=Sn=>kt("anticlockwise"))},{default:f.withCtx(()=>[f.createVNode(f.unref(eie))]),_:1}),f.createVNode(f.unref(Lt.ElIcon),{onClick:at[4]||(at[4]=Sn=>kt("clockwise"))},{default:f.withCtx(()=>[f.createVNode(f.unref(nie))]),_:1})],2)],2),f.createCommentVNode(" CANVAS "),f.createElementVNode("div",{class:f.normalizeClass(f.unref(E).e("canvas"))},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(We.urlList,(Sn,lt)=>f.withDirectives((f.openBlock(),f.createElementBlock("img",{ref_for:!0,ref:$t=>V.value[lt]=$t,key:Sn,src:Sn,style:f.normalizeStyle(xe.value),class:f.normalizeClass(f.unref(E).e("img")),crossorigin:We.crossorigin,onLoad:be,onError:An,onMousedown:fn},null,46,A2e)),[[f.vShow,lt===W.value]])),128))],2),f.renderSlot(We.$slots,"default")],6)]),_:3})]))}})),T2e=Gs(f.defineComponent({__name:"ProviderConfig",props:{onlyofficeConfig:{type:Object,default:()=>null},token:{type:String,default:""},userInfo:{type:Object,default:()=>null},loadUrl:{type:String,default:""},uploadUrl:{type:String,default:""}},setup(c){const r=c;return f.provide("onlyofficeConfig",f.computed(()=>r.onlyofficeConfig)),f.provide("token",f.computed(()=>r.token)),f.provide("userInfo",f.computed(()=>r.userInfo)),f.provide("loadUrl",f.computed(()=>r.loadUrl)),f.provide("uploadUrl",f.computed(()=>r.uploadUrl)),(a,l)=>f.renderSlot(a.$slots,"default")}}));function One(c,r){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(c);r&&(l=l.filter(function(i){return Object.getOwnPropertyDescriptor(c,i).enumerable})),a.push.apply(a,l)}return a}function Ql(c){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?One(Object(a),!0).forEach(function(l){yn(c,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(a)):One(Object(a)).forEach(function(l){Object.defineProperty(c,l,Object.getOwnPropertyDescriptor(a,l))})}return c}function Md(c){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Md(c)}function ds(c,r){if(!(c instanceof r))throw new TypeError("Cannot call a class as a function")}function Nne(c,r){for(var a=0;a<r.length;a++){var l=r[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(c,Ine(l.key),l)}}function fs(c,r,a){return r&&Nne(c.prototype,r),a&&Nne(c,a),Object.defineProperty(c,"prototype",{writable:!1}),c}function yn(c,r,a){return r=Ine(r),r in c?Object.defineProperty(c,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[r]=a,c}function qs(c,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(r&&r.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),r&&NV(c,r)}function ur(c){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},ur(c)}function NV(c,r){return NV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,i){return l.__proto__=i,l},NV(c,r)}function D2e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qt(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function IV(c,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qt(c)}function Ks(c){var r=D2e();return function(){var l=ur(c),i;if(r){var m=ur(this).constructor;i=Reflect.construct(l,arguments,m)}else i=l.apply(this,arguments);return IV(this,i)}}function R2e(c,r){for(;!Object.prototype.hasOwnProperty.call(c,r)&&(c=ur(c),c!==null););return c}function yr(){return typeof Reflect<"u"&&Reflect.get?yr=Reflect.get.bind():yr=function(r,a,l){var i=R2e(r,a);if(i){var m=Object.getOwnPropertyDescriptor(i,a);return m.get?m.get.call(arguments.length<3?r:l):m.value}},yr.apply(this,arguments)}function ig(c){return O2e(c)||N2e(c)||I2e(c)||B2e()}function O2e(c){if(Array.isArray(c))return BV(c)}function N2e(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)}function I2e(c,r){if(c){if(typeof c=="string")return BV(c,r);var a=Object.prototype.toString.call(c).slice(8,-1);if(a==="Object"&&c.constructor&&(a=c.constructor.name),a==="Map"||a==="Set")return Array.from(c);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return BV(c,r)}}function BV(c,r){(r==null||r>c.length)&&(r=c.length);for(var a=0,l=new Array(r);a<r;a++)l[a]=c[a];return l}function B2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
150
150
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M2e(c,r){if(typeof c!="object"||c===null)return c;var a=c[Symbol.toPrimitive];if(a!==void 0){var l=a.call(c,r||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(c)}function Ine(c){var r=M2e(c,"string");return typeof r=="symbol"?r:String(r)}var Bne={exports:{}};(function(c){var r=Object.prototype.hasOwnProperty,a="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(a=!1));function i(E,T,N){this.fn=E,this.context=T,this.once=N||!1}function m(E,T,N,V,U){if(typeof N!="function")throw new TypeError("The listener must be a function");var z=new i(N,V||E,U),W=a?a+T:T;return E._events[W]?E._events[W].fn?E._events[W]=[E._events[W],z]:E._events[W].push(z):(E._events[W]=z,E._eventsCount++),E}function v(E,T){--E._eventsCount===0?E._events=new l:delete E._events[T]}function C(){this._events=new l,this._eventsCount=0}C.prototype.eventNames=function(){var T=[],N,V;if(this._eventsCount===0)return T;for(V in N=this._events)r.call(N,V)&&T.push(a?V.slice(1):V);return Object.getOwnPropertySymbols?T.concat(Object.getOwnPropertySymbols(N)):T},C.prototype.listeners=function(T){var N=a?a+T:T,V=this._events[N];if(!V)return[];if(V.fn)return[V.fn];for(var U=0,z=V.length,W=new Array(z);U<z;U++)W[U]=V[U].fn;return W},C.prototype.listenerCount=function(T){var N=a?a+T:T,V=this._events[N];return V?V.fn?1:V.length:0},C.prototype.emit=function(T,N,V,U,z,W){var K=a?a+T:T;if(!this._events[K])return!1;var Z=this._events[K],ce=arguments.length,q,X;if(Z.fn){switch(Z.once&&this.removeListener(T,Z.fn,void 0,!0),ce){case 1:return Z.fn.call(Z.context),!0;case 2:return Z.fn.call(Z.context,N),!0;case 3:return Z.fn.call(Z.context,N,V),!0;case 4:return Z.fn.call(Z.context,N,V,U),!0;case 5:return Z.fn.call(Z.context,N,V,U,z),!0;case 6:return Z.fn.call(Z.context,N,V,U,z,W),!0}for(X=1,q=new Array(ce-1);X<ce;X++)q[X-1]=arguments[X];Z.fn.apply(Z.context,q)}else{var Ce=Z.length,st;for(X=0;X<Ce;X++)switch(Z[X].once&&this.removeListener(T,Z[X].fn,void 0,!0),ce){case 1:Z[X].fn.call(Z[X].context);break;case 2:Z[X].fn.call(Z[X].context,N);break;case 3:Z[X].fn.call(Z[X].context,N,V);break;case 4:Z[X].fn.call(Z[X].context,N,V,U);break;default:if(!q)for(st=1,q=new Array(ce-1);st<ce;st++)q[st-1]=arguments[st];Z[X].fn.apply(Z[X].context,q)}}return!0},C.prototype.on=function(T,N,V){return m(this,T,N,V,!1)},C.prototype.once=function(T,N,V){return m(this,T,N,V,!0)},C.prototype.removeListener=function(T,N,V,U){var z=a?a+T:T;if(!this._events[z])return this;if(!N)return v(this,z),this;var W=this._events[z];if(W.fn)W.fn===N&&(!U||W.once)&&(!V||W.context===V)&&v(this,z);else{for(var K=0,Z=[],ce=W.length;K<ce;K++)(W[K].fn!==N||U&&!W[K].once||V&&W[K].context!==V)&&Z.push(W[K]);Z.length?this._events[z]=Z.length===1?Z[0]:Z:v(this,z)}return this},C.prototype.removeAllListeners=function(T){var N;return T?(N=a?a+T:T,this._events[N]&&v(this,N)):(this._events=new l,this._eventsCount=0),this},C.prototype.off=C.prototype.removeListener,C.prototype.addListener=C.prototype.on,C.prefixed=a,C.EventEmitter=C,c.exports=C})(Bne);var Mne=Bne.exports;const Pne=NO(Mne);var P2e=typeof window<"u"&&window.location&&window.location.href.indexOf("xgplayerdebugger=1")>-1,MV={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},PV="%c[xgplayer]",ci={config:{debug:P2e?3:0},logInfo:function(r){for(var a,l=arguments.length,i=new Array(l>1?l-1:0),m=1;m<l;m++)i[m-1]=arguments[m];this.config.debug>=3&&(a=console).log.apply(a,[PV,MV.info,r].concat(i))},logWarn:function(r){for(var a,l=arguments.length,i=new Array(l>1?l-1:0),m=1;m<l;m++)i[m-1]=arguments[m];this.config.debug>=1&&(a=console).warn.apply(a,[PV,MV.warn,r].concat(i))},logError:function(r){var a;if(!(this.config.debug<1)){for(var l=this.config.debug>=2?"trace":"error",i=arguments.length,m=new Array(i>1?i-1:0),v=1;v<i;v++)m[v-1]=arguments[v];(a=console)[l].apply(a,[PV,MV.error,r].concat(m))}}};function L2e(c){c.logInfo=ci.logInfo.bind(c),c.logWarn=ci.logWarn.bind(c),c.logError=ci.logError.bind(c)}var F2e=function(){function c(r){ds(this,c),this.bufferedList=r}return fs(c,[{key:"start",value:function(a){return this.bufferedList[a].start}},{key:"end",value:function(a){return this.bufferedList[a].end}},{key:"length",get:function(){return this.bufferedList.length}}]),c}(),_e={};_e.createDom=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"div",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",i=document.createElement(c);return i.className=l,i.innerHTML=r,Object.keys(a).forEach(function(m){var v=m,C=a[m];c==="video"||c==="audio"||c==="live-video"?C&&i.setAttribute(v,C):i.setAttribute(v,C)}),i},_e.createDomFromHtml=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";try{var l=document.createElement("div");l.innerHTML=c;var i=l.children;return l=null,i.length>0?(i=i[0],a&&_e.addClass(i,a),r&&Object.keys(r).forEach(function(m){i.setAttribute(m,r[m])}),i):null}catch(m){return ci.logError("util.createDomFromHtml",m),null}},_e.hasClass=function(c,r){if(!c||!r)return!1;try{return Array.prototype.some.call(c.classList,function(l){return l===r})}catch{var a=c.className&&Md(c.className)==="object"?c.getAttribute("class"):c.className;return a&&!!a.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}},_e.addClass=function(c,r){if(!(!c||!r))try{r.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(a){a&&c.classList.add(a)})}catch{_e.hasClass(c,r)||(c.className&&Md(c.className)==="object"?c.setAttribute("class",c.getAttribute("class")+" "+r):c.className+=" "+r)}},_e.removeClass=function(c,r){if(!(!c||!r))try{r.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(a){a&&c.classList.remove(a)})}catch{_e.hasClass(c,r)&&r.split(/\s+/g).forEach(function(l){var i=new RegExp("(\\s|^)"+l+"(\\s|$)");c.className&&Md(c.className)==="object"?c.setAttribute("class",c.getAttribute("class").replace(i," ")):c.className=c.className.replace(i," ")})}},_e.toggleClass=function(c,r){c&&r.split(/\s+/g).forEach(function(a){_e.hasClass(c,a)?_e.removeClass(c,a):_e.addClass(c,a)})},_e.classNames=function(){for(var c=arguments,r=[],a=function(m){_e.typeOf(c[m])==="String"?r.push(c[m]):_e.typeOf(c[m])==="Object"&&Object.keys(c[m]).map(function(v){c[m][v]&&r.push(v)})},l=0;l<arguments.length;l++)a(l);return r.join(" ")},_e.findDom=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0,a;try{a=c.querySelector(r)}catch(l){ci.logError("util.findDom",l),r.indexOf("#")===0&&(a=c.getElementById(r.slice(1)))}return a},_e.getCss=function(c,r){return c.currentStyle?c.currentStyle[r]:document.defaultView.getComputedStyle(c,!1)[r]},_e.padStart=function(c,r,a){for(var l=String(a),i=r>>0,m=Math.ceil(i/l.length),v=[],C=String(c);m--;)v.push(l);return v.join("").substring(0,i-C.length)+C},_e.format=function(c){if(window.isNaN(c))return"";c=Math.round(c);var r=_e.padStart(Math.floor(c/3600),2,0),a=_e.padStart(Math.floor((c-r*3600)/60),2,0),l=_e.padStart(Math.floor(c-r*3600-a*60),2,0);return(r==="00"?[a,l]:[r,a,l]).join(":")},_e.event=function(c){if(c.touches){var r=c.touches[0]||c.changedTouches[0];c.clientX=r.clientX||0,c.clientY=r.clientY||0,c.offsetX=r.pageX-r.target.offsetLeft,c.offsetY=r.pageY-r.target.offsetTop}c._target=c.target||c.srcElement},_e.typeOf=function(c){return Object.prototype.toString.call(c).match(/([^\s.*]+)(?=]$)/g)[0]},_e.deepCopy=function(c,r){if(_e.typeOf(r)==="Object"&&_e.typeOf(c)==="Object")return Object.keys(r).forEach(function(a){_e.typeOf(r[a])==="Object"&&!(r[a]instanceof Node)?c[a]===void 0||c[a]===void 0?c[a]=r[a]:_e.deepCopy(c[a],r[a]):_e.typeOf(r[a])==="Array"?c[a]=_e.typeOf(c[a])==="Array"?c[a].concat(r[a]):r[a]:c[a]=r[a]}),c},_e.deepMerge=function(c,r){return Object.keys(r).map(function(a){if(_e.typeOf(r[a])==="Array"&&_e.typeOf(c[a])==="Array"){if(_e.typeOf(c[a])==="Array"){var l;(l=c[a]).push.apply(l,ig(r[a]))}}else _e.typeOf(c[a])===_e.typeOf(r[a])&&c[a]!==null&&_e.typeOf(c[a])==="Object"&&!(r[a]instanceof window.Node)?_e.deepMerge(c[a],r[a]):r[a]!==null&&(c[a]=r[a])}),c},_e.getBgImage=function(c){var r=(c.currentStyle||window.getComputedStyle(c,null)).backgroundImage;if(!r||r==="none")return"";var a=document.createElement("a");return a.href=r.replace(/url\("|"\)/g,""),a.href},_e.copyDom=function(c){if(c&&c.nodeType===1){var r=document.createElement(c.tagName);return Array.prototype.forEach.call(c.attributes,function(a){r.setAttribute(a.name,a.value)}),c.innerHTML&&(r.innerHTML=c.innerHTML),r}else return""},_e.setInterval=function(c,r,a,l){c._interval[r]||(c._interval[r]=window.setInterval(a.bind(c),l))},_e.clearInterval=function(c,r){clearInterval(c._interval[r]),c._interval[r]=null},_e.setTimeout=function(c,r,a){c._timers||(c._timers=[]);var l=setTimeout(function(){r(),_e.clearTimeout(c,l)},a);return c._timers.push(l),l},_e.clearTimeout=function(c,r){var a=c._timers;if(_e.typeOf(a)==="Array"){for(var l=0;l<a.length;l++)if(a[l]===r){a.splice(l,1),clearTimeout(r);break}}else clearTimeout(r)},_e.clearAllTimers=function(c){var r=c._timers;_e.typeOf(r)==="Array"&&(r.map(function(a){clearTimeout(a)}),c._timerIds=[])},_e.createImgBtn=function(c,r,a,l){var i=_e.createDom("xg-".concat(c),"",{},"xgplayer-".concat(c,"-img"));if(i.style.backgroundImage='url("'.concat(r,'")'),a&&l){var m,v,C;["px","rem","em","pt","dp","vw","vh","vm","%"].every(function(E){return a.indexOf(E)>-1&&l.indexOf(E)>-1?(m=parseFloat(a.slice(0,a.indexOf(E)).trim()),v=parseFloat(l.slice(0,l.indexOf(E)).trim()),C=E,!1):!0}),i.style.width="".concat(m).concat(C),i.style.height="".concat(v).concat(C),i.style.backgroundSize="".concat(m).concat(C," ").concat(v).concat(C),c==="start"?i.style.margin="-".concat(v/2).concat(C," auto auto -").concat(m/2).concat(C):i.style.margin="auto 5px auto 5px"}return i},_e.Hex2RGBA=function(c,r){var a=[];if(/^\#[0-9A-F]{3}$/i.test(c)){var l="#";c.replace(/[0-9A-F]/ig,function(i){l+=i+i}),c=l}return/^#[0-9A-F]{6}$/i.test(c)?(c.replace(/[0-9A-F]{2}/ig,function(i){a.push(parseInt(i,16))}),"rgba(".concat(a.join(","),", ").concat(r,")")):"rgba(255, 255, 255, 0.1)"},_e.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},_e.checkIsFunction=function(c){return c&&typeof c=="function"},_e.checkIsObject=function(c){return c!==null&&Md(c)==="object"},_e.hide=function(c){c.style.display="none"},_e.show=function(c,r){c.style.display=r||"block"},_e.isUndefined=function(c){if(typeof c>"u"||c===null)return!0},_e.isNotNull=function(c){return c!=null},_e.setStyleFromCsstext=function(c,r){if(r)if(_e.typeOf(r)==="String"){var a=r.replace(/\s+/g,"").split(";");a.map(function(l){if(l){var i=l.split(":");i.length>1&&(c.style[i[0]]=i[1])}})}else Object.keys(r).map(function(l){c.style[l]=r[l]})};function $2e(c,r){for(var a=0,l=r.length;a<l;a++)if(c.indexOf(r[a])>-1)return!0;return!1}_e.filterStyleFromText=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],a=c.style.cssText;if(!a)return{};var l=a.replace(/\s+/g,"").split(";"),i={},m={};return l.map(function(v){if(v){var C=v.split(":");C.length>1&&($2e(C[0],r)?i[C[0]]=C[1]:m[C[0]]=C[1])}}),c.setAttribute("style",""),Object.keys(m).map(function(v){c.style[v]=m[v]}),i},_e.getStyleFromCsstext=function(c){var r=c.style.cssText;if(!r)return{};var a=r.replace(/\s+/g,"").split(";"),l={};return a.map(function(i){if(i){var m=i.split(":");m.length>1&&(l[m[0]]=m[1])}}),l},_e.preloadImg=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};if(c){var l=new window.Image;l.onload=function(i){l=null,r&&r(i)},l.onerror=function(i){l=null,a&&a(i)},l.src=c}},_e.stopPropagation=function(c){c&&c.stopPropagation()},_e.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},_e.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},_e.checkTouchSupport=function(){return"ontouchstart"in window},_e.getBuffered2=function(c){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5,a=[],l=0;l<c.length;l++)a.push({start:c.start(l)<.5?0:c.start(l),end:c.end(l)});a.sort(function(E,T){var N=E.start-T.start;return N||T.end-E.end});var i=[];if(r)for(var m=0;m<a.length;m++){var v=i.length;if(v){var C=i[v-1].end;a[m].start-C<r?a[m].end>C&&(i[v-1].end=a[m].end):i.push(a[m])}else i.push(a[m])}else i=a;return new F2e(i)},_e.getEventPos=function(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return c.touches&&c.touches.length>0&&(c=c.touches[0]),{x:c.x/r,y:c.y/r,clientX:c.clientX/r,clientY:c.clientY/r,offsetX:c.offsetX/r,offsetY:c.offsetY/r,pageX:c.pageX/r,pageY:c.pageY/r}},_e.requestAnimationFrame=function(c){var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(r)return r(c)},_e.getHostFromUrl=function(c){if(_e.typeOf(c)!=="String")return"";var r=c.split("/"),a="";return r.length>3&&r[2]&&(a=r[2]),a},_e.cancelAnimationFrame=function(c){var r=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;r&&r(c)},_e.isMSE=function(c){return c.media&&(c=c.media),!c||!(c instanceof HTMLMediaElement)?!1:/^blob/.test(c.currentSrc)||/^blob/.test(c.src)},_e.isBlob=function(c){return typeof c=="string"&&/^blob/.test(c)},_e.generateSessionId=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=new Date().getTime();try{c=parseInt(c)}catch{c=0}r+=c,window.performance&&typeof window.performance.now=="function"&&(r+=parseInt(window.performance.now()));var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var i=(r+Math.random()*16)%16|0;return r=Math.floor(r/16),(l==="x"?i:i&3|8).toString(16)});return a},_e.createEvent=function(c){var r;return typeof window.Event=="function"?r=new Event(c):(r=document.createEvent("Event"),r.initEvent(c,!0,!0)),r},_e.adjustTimeByDuration=function(c,r,a){return!r||!c?c:c>r||a&&c<r?r:c},_e.createPositionBar=function(c,r){var a=_e.createDom("xg-bar","",{"data-index":-1},c);return r.appendChild(a),a},_e.getTransformStyle=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a={scale:"".concat(c.scale||1),translate:"".concat(c.x||0,"%, ").concat(c.y||0,"%"),rotate:"".concat(c.rotate||0,"deg")},l=Object.keys(a);return l.forEach(function(i){var m=new RegExp("".concat(i,"\\([^\\(]+\\)"),"g"),v="".concat(i,"(").concat(a[i],")");m.test(r)?(m.lastIndex=-1,r=r.replace(m,v)):r+="".concat(v," ")}),r},_e.convertDeg=function(c){return Math.abs(c)<=1?c*360:c%360},_e.getIndexByTime=function(c,r){var a=r.length,l=-1;if(a<1)return l;if(c<=r[0].end||a<2)l=0;else if(c>r[a-1].end)l=a-1;else for(var i=1;i<a;i++)if(c>r[i-1].end&&c<=r[i].end){l=i;break}return l},_e.getOffsetCurrentTime=function(c,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,l=-1;if(a>=0&&a<r.length?l=a:l=_e.getIndexByTime(c,r),l<0)return-1;var i=r.length,m=r[l],v=m.start,C=m.end,E=m.cTime,T=m.offset;return c<v?E:c>=v&&c<=C?c-T:c>C&&l>=i-1?C:-1},_e.getCurrentTimeByOffset=function(c,r){var a=-1;if(!r||r.length<0)return c;for(var l=0;l<r.length;l++)if(c<=r[l].duration){a=l;break}if(a!==-1){var i=r[a].start;return a-1<0?i+c:i+(c-r[a-1].duration)}return c};function Lne(c){var r=Md(c);return c!==null&&(r==="object"||r==="function")}function V2e(c,r,a){var l,i,m,v,C,E,T=0,N=!1,V=!1,U=!0,z=!r&&r!==0&&typeof window.requestAnimationFrame=="function";if(typeof c!="function")throw new TypeError("Expected a function");r=+r||0,Lne(a)&&(N=!!a.leading,V="maxWait"in a,m=V?Math.max(+a.maxWait||0,r):m,U="trailing"in a?!!a.trailing:U);function W(tt){var je=l,be=i;return l=i=void 0,T=tt,v=c.apply(be,je),v}function K(tt,je){return z?(window.cancelAnimationFrame(C),window.requestAnimationFrame(tt)):setTimeout(tt,je)}function Z(tt){if(z)return window.cancelAnimationFrame(tt);clearTimeout(tt)}function ce(tt){return T=tt,C=K(Ce,r),N?W(tt):v}function q(tt){var je=tt-E,be=tt-T,An=r-je;return V?Math.min(An,m-be):An}function X(tt){var je=tt-E,be=tt-T;return E===void 0||je>=r||je<0||V&&be>=m}function Ce(){var tt=Date.now();if(X(tt))return st(tt);C=K(Ce,q(tt))}function st(tt){return C=void 0,U&&l?W(tt):(l=i=void 0,v)}function Ne(){C!==void 0&&Z(C),T=0,l=E=i=C=void 0}function ee(){return C===void 0?v:st(Date.now())}function xe(){return C!==void 0}function et(){for(var tt=Date.now(),je=X(tt),be=arguments.length,An=new Array(be),fn=0;fn<be;fn++)An[fn]=arguments[fn];if(l=An,i=this,E=tt,je){if(C===void 0)return ce(E);if(V)return C=K(Ce,r),W(E)}return C===void 0&&(C=K(Ce,r)),v}return et.cancel=Ne,et.flush=ee,et.pending=xe,et}function H2e(c,r,a){var l=!0,i=!0;if(typeof c!="function")throw new TypeError("Expected a function");return Lne(a)&&(l="leading"in a?!!a.leading:l,i="trailing"in a?!!a.trailing:i),V2e(c,r,{leading:l,trailing:i,maxWait:r})}function z2e(){var c=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return c==="zh-cn"&&(c="zh"),c}function U2e(c,r,a){if(c){var l=c.getAttribute(a);return!!(l&&l===r&&(c.tagName==="VIDEO"||c.tagName==="AUDIO"))}}var Fne={android:/(Android)\s([\d.]+)/,ios:/(Version)\/([\d.]+)/},W2e=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],Wr={get device(){var c=Wr.os;return c.isPc?"pc":"mobile"},get browser(){if(typeof navigator>"u")return"";var c=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(r).filter(function(a){return r[a].test(c)}))[0]},get os(){if(typeof navigator>"u")return{};var c=navigator.userAgent,r=/(?:Windows Phone)/.test(c),a=/(?:SymbianOS)/.test(c)||r,l=/(?:Android)/.test(c),i=/(?:Firefox)/.test(c),m=/(?:iPad|PlayBook)/.test(c)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=m||l&&!/(?:Mobile)/.test(c)||i&&/(?:Tablet)/.test(c),C=/(?:iPhone)/.test(c)&&!v,E=!C&&!l&&!a&&!v;return{isTablet:v,isPhone:C,isIpad:m,isIos:C||m,isAndroid:l,isPc:E,isSymbian:a,isWindowsPhone:r,isFireFox:i}},get osVersion(){if(typeof navigator>"u")return 0;var c=navigator.userAgent,r="";/(?:iPhone)|(?:iPad|PlayBook)/.test(c)?r=Fne.ios:r=Fne.android;var a=r?r.exec(c):[];if(a&&a.length>=3){var l=a[2].split(".");return l.length>0?parseInt(l[0]):0}return 0},get isWeixin(){if(typeof navigator>"u")return!1;var c=/(micromessenger)\/([\d.]+)/,r=c.exec(navigator.userAgent.toLocaleLowerCase());return!!r},isSupportMP4:function(){var r={isSupport:!1,mime:""};if(typeof document>"u")return r;if(this.supportResult)return this.supportResult;var a=document.createElement("video");return typeof a.canPlayType=="function"&&W2e.map(function(l){a.canPlayType('video/mp4; codecs="'.concat(l,'"'))==="probably"&&(r.isSupport=!0,r.mime+="||".concat(l))}),this.supportResult=r,a=null,r},isMSESupport:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(typeof MediaSource>"u"||!MediaSource)return!1;try{return MediaSource.isTypeSupported(r)}catch(a){return this._logger.error(r,a),!1}},isHevcSupported:function(){return typeof MediaSource>"u"||!MediaSource.isTypeSupported?!1:MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"')},probeConfigSupported:function(r){var a={supported:!1,smooth:!1,powerEfficient:!1};if(!r||typeof navigator>"u")return Promise.resolve(a);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(r);var l=r.video||{},i=r.audio||{};try{var m=MediaSource.isTypeSupported(l.contentType),v=MediaSource.isTypeSupported(i.contentType);return Promise.resolve({supported:m&&v,smooth:!1,powerEfficient:!1})}catch{return Promise.resolve(a)}}},LV="3.0.18",$ne={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},Vne={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},BO=fs(function c(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};ds(this,c);var l=r&&r.i18n?r.i18n.ERROR_TYPES:null;if(r.media){var i=a.mediaError?a.mediaError:r.media.error||{},m=r.duration,v=r.currentTime,C=r.ended,E=r.src,T=r.currentSrc,N=r.media,V=N.readyState,U=N.networkState,z=a.errorCode||i.code;Vne[z]&&(z=Vne[z]);var W={playerVersion:LV,currentTime:v,duration:m,ended:C,readyState:V,networkState:U,src:E||T,errorType:a.errorType,errorCode:z,message:a.errorMessage||i.message,mediaError:i,originError:a.originError?a.originError.stack:"",host:_e.getHostFromUrl(E||T)};return a.ext&&Object.keys(a.ext).map(function(q){W[q]=a.ext[q]}),W}else if(arguments.length>1){for(var K={playerVersion:LV,domain:document.domain},Z=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],ce=0;ce<arguments.length;ce++)K[Z[ce]]=arguments[ce];return K.ex=l?(l[arguments[0]]||{}).msg:"",K}}),lm="play",FV="playing",J2="ended",jS="pause",wA="error",MO="seeking",e0="seeked",cm="timeupdate",SA="waiting",t0="canplay",j2e="canplaythrough",iy="durationchange",Hne="volumechange",n0="loadeddata",G2e="loadedmetadata",zne="ratechange",Une="progress",$V="loadstart",eC="emptied",Z2e="stalled",q2e="suspend",K2e="abort",Y2e="bufferedChange",VV="focus",Wne="blur",HV="ready",jne="urlNull",tC="autoplay_started",zV="autoplay_was_prevented",PO="complete",LO="replay",UV="destroy",FO="urlchange",WV="download_speed_change",Gne="leaveplayer",Zne="enterplayer",qne="loading",o0="fullscreen_change",$O="cssFullscreen_change",VO="mini_state_change",jV="definition_change",X2e="before_definition_change",GV="after_definition_change",Q2e="SEI_PARSED",J2e="retry",ay="video_resize",ZV="pip_change",Kne="rotate",Yne="screenShot",HO="playnext",Xne="shortcut",Qne="xglog",zO="user_action",UO="reset",Jne="source_error",eoe="source_success",eCe="switch_subtitle",toe=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],noe={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},ooe="fps_stuck";const tCe=Object.freeze(Object.defineProperty({__proto__:null,ABORT:K2e,AFTER_DEFINITION_CHANGE:GV,AUTOPLAY_PREVENTED:zV,AUTOPLAY_STARTED:tC,BEFORE_DEFINITION_CHANGE:X2e,BUFFER_CHANGE:Y2e,CANPLAY:t0,CANPLAY_THROUGH:j2e,COMPLETE:PO,CSS_FULLSCREEN_CHANGE:$O,DEFINITION_CHANGE:jV,DESTROY:UV,DOWNLOAD_SPEED_CHANGE:WV,DURATION_CHANGE:iy,EMPTIED:eC,ENDED:J2,ENTER_PLAYER:Zne,ERROR:wA,FPS_STUCK:ooe,FULLSCREEN_CHANGE:o0,LEAVE_PLAYER:Gne,LOADED_DATA:n0,LOADED_METADATA:G2e,LOADING:qne,LOAD_START:$V,MINI_STATE_CHANGE:VO,PAUSE:jS,PIP_CHANGE:ZV,PLAY:lm,PLAYER_BLUR:Wne,PLAYER_FOCUS:VV,PLAYING:FV,PLAYNEXT:HO,PROGRESS:Une,RATE_CHANGE:zne,READY:HV,REPLAY:LO,RESET:UO,RETRY:J2e,ROTATE:Kne,SCREEN_SHOT:Yne,SEEKED:e0,SEEKING:MO,SEI_PARSED:Q2e,SHORTCUT:Xne,SOURCE_ERROR:Jne,SOURCE_SUCCESS:eoe,STALLED:Z2e,STATS_EVENTS:noe,SUSPEND:q2e,SWITCH_SUBTITLE:eCe,TIME_UPDATE:cm,URL_CHANGE:FO,URL_NULL:jne,USER_ACTION:zO,VIDEO_EVENTS:toe,VIDEO_RESIZE:ay,VOLUME_CHANGE:Hne,WAITING:SA,XGLOG:Qne},Symbol.toStringTag,{value:"Module"}));function qV(c,r){!this||!this.emit||(c==="error"?this.errorHandler(c,r.error):this.emit(c,r))}function nCe(c,r){return function(a,l){var i={player:r,eventName:c,originalEvent:a,detail:a.detail||{},timeStamp:a.timeStamp,currentTime:r.currentTime,duration:r.duration,paused:r.paused,ended:r.ended,isInternalOp:!!r._internalOp[a.type],muted:r.muted,volume:r.volume,host:_e.getHostFromUrl(r.currentSrc),vtype:r.vtype};if(r.removeInnerOP(a.type),c==="timeupdate"&&(r._currentTime=r.media&&r.media.currentTime),c==="ratechange"){var m=r.media?r.media.playbackRate:0;if(m&&r._rate===m)return;r._rate=r.media&&r.media.playbackRate}if(c==="durationchange"&&(r._duration=r.media.duration),c==="volumechange"&&(i.isMutedChange=r._lastMuted!==r.muted,r._lastMuted=r.muted),c==="error"&&(i.error=l||r.video.error),r.mediaEventMiddleware[c]){var v=qV.bind(r,c,i);try{r.mediaEventMiddleware[c].call(r,i,v)}catch(C){throw qV.call(r,c,i),C}}else qV.call(r,c,i)}}var oCe=function(c){qs(a,c);var r=Ks(a);function a(l){var i;ds(this,a),i=r.call(this,l),i._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=Object.assign({},{controls:!1,autoplay:l.autoplay,playsinline:l.playsinline,"x5-playsinline":l.playsinline,"webkit-playsinline":l.playsinline,"x5-video-player-fullscreen":l["x5-video-player-fullscreen"]||l.x5VideoPlayerFullscreen,"x5-video-orientation":l["x5-video-orientation"]||l.x5VideoOrientation,airplay:l.airplay,"webkit-airplay":l.airplay,tabindex:l.tabindex|0,mediaType:l.mediaType||"video","data-index":-1},l.videoConfig,l.videoAttributes);var m=l["x5-video-player-type"]||l.x5VideoPlayerType;return Wr.isWeixin&&Wr.os.isAndroid&&m&&(i.mediaConfig["x5-video-player-type"]=m,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),l.loop&&(i.mediaConfig.loop="loop"),l.autoplayMuted&&!Object.prototype.hasOwnProperty.call(i.mediaConfig,"muted")&&(i.mediaConfig.muted=!0),i.media=_e.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),l.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=l.defaultPlaybackRate),_e.typeOf(l.volume)==="Number"&&(i.volume=l.volume),l.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),l.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return fs(a,[{key:"setEventsMiddleware",value:function(i){var m=this;Object.keys(i).map(function(v){m.mediaEventMiddleware[v]=i[v]})}},{key:"removeEventsMiddleware",value:function(i){var m=this;Object.keys(i).map(function(v){delete m.mediaEventMiddleware[v]})}},{key:"attachVideoEvents",value:function(){var i=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.media;this._evHandlers||(this._evHandlers=toe.map(function(v){var C="on".concat(v.charAt(0).toUpperCase()).concat(v.slice(1));return typeof i[C]=="function"&&i.on(v,i[C]),yn({},v,nCe(v,i))})),this._evHandlers.forEach(function(v){var C=Object.keys(v)[0];m.addEventListener(C,v[C],!1)})}},{key:"detachVideoEvents",value:function(){var i=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.media;this._evHandlers.forEach(function(v){var C=Object.keys(v)[0];m.removeEventListener(C,v[C],!1)}),this._evHandlers.forEach(function(v){var C=Object.keys(v)[0],E="on".concat(C.charAt(0).toUpperCase()).concat(C.slice(1));typeof i[E]=="function"&&i.off(C,i[E])}),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(i,m){var v=this;i.removeAttribute("src"),i.load(),m.forEach(function(V,U){v.media.appendChild(_e.createDom("source","",{src:"".concat(V.src),type:"".concat(V.type||""),"data-index":U+1}))});var C=i.children;if(C){this._videoSourceCount=C.length,this._videoSourceIndex=C.length,this._vLoadeddata=function(V){v.emit(eoe,{src:V.target.currentSrc,host:_e.getHostFromUrl(V.target.currentSrc)})};for(var E=null,T=0;T<this._evHandlers.length;T++)if(Object.keys(this._evHandlers[T])[0]==="error"){E=this._evHandlers[T];break}!this._sourceError&&(this._sourceError=function(V){var U=parseInt(V.target.getAttribute("data-index"),10);if(v._videoSourceIndex--,v._videoSourceIndex===0||U>=v._videoSourceCount){var z={code:4,message:"sources_load_error"};E?E.error(V,z):v.errorHandler("error",z)}var W=$ne[4];v.emit(Jne,new BO(v,{errorType:W,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:V.target.src}))});for(var N=0;N<C.length;N++)C[N].addEventListener("error",this._sourceError);i.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(i){var m=i.children;if(!(!m||m.length===0||!this._sourceError)){for(var v=0;v<m.length;v++)m[v].removeEventListener("error",this._sourceError);for(;m.length>0;)i.removeChild(m[0]);this._vLoadeddata&&i.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(i){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.media&&(this.media.error||m)){var v=this.media.error||m,C=v.code?$ne[v.code]:"other",E=v.message;this.media.currentSrc||(E="empty_src",v={code:6,message:E}),this.emit(i,new BO(this,{errorType:C,errorCode:v.code,errorMessage:v.message||"",mediaError:v}))}}},{key:"destroy",value:function(){this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null;for(var i in this._interval)Object.prototype.hasOwnProperty.call(this._interval,i)&&(clearInterval(this._interval[i]),this._interval[i]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(i){this.media=i}},{key:"play",value:function(){var i=this.media?this.media.play():null;return i}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(i){return this.media?this.media.canPlayType(i):!1}},{key:"getBufferedRange",value:function(i){var m=[0,0];if(!this.media)return m;i||(i=this.media.buffered);var v=this.media.currentTime;if(i)for(var C=0,E=i.length;C<E&&(m[0]=i.start(C),m[1]=i.end(C),!(m[0]<=v&&v<=m[1]));C++);return m[0]-v<=0&&v-m[1]<=0?m:[0,0]}},{key:"autoplay",get:function(){return this.media?this.media.autoplay:!1},set:function(i){this.media&&(this.media.autoplay=i)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?_e.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var i={start:0,end:0};if(!this.media)return i;var m=this.media.buffered;if(!m||m.length===0)return i;for(var v=0;v<m.length;v++)if((m.start(v)<=this.currentTime||m.start(v)<.1)&&m.end(v)>=this.currentTime)return{start:m.start(v),end:m.end(v)};return i}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(i){this.media&&(this.media.crossOrigin=i)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(i){this.media&&(this.media.currentSrc=i)}},{key:"currentTime",get:function(){return this.media?this.media.currentTime!==void 0?this.media.currentTime:this._currentTime:0},set:function(i){this.media&&(this.media.currentTime=i)}},{key:"defaultMuted",get:function(){return this.media?this.media.defaultMuted:!1},set:function(i){this.media&&(this.media.defaultMuted=i)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return this.media?this.media.ended:!1}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){var i=this.media.error;if(!i)return"";var m=["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"];return m[this.media.error.code-1]}},{key:"loop",get:function(){return this.media?this.media.loop:!1},set:function(i){this.media&&(this.media.loop=i)}},{key:"muted",get:function(){return this.media?this.media.muted:!1},set:function(i){!this.media||this.media.muted===i||(this._lastMuted=this.media.muted,this.media.muted=i)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return this.media?this.media.paused:!0}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(i){!this.media||i===1/0||(this.media.defaultPlaybackRate=i,this.media.playbackRate=i)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return this.media?this.media.preload:!1},set:function(i){this.media&&(this.media.preload=i)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return this.media?this.media.seekable:!1}},{key:"seeking",get:function(){return this.media?this.media.seeking:!1}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(i){if(this.media){if(this.emit(FO,i),this.emit(SA),this._currentTime=0,this._duration=0,_e.isMSE(this.media)){this.onWaiting();return}this._detachSourceEvents(this.media),_e.typeOf(i)==="Array"?this._attachSourceEvents(this.media,i):i?this.media.src=i:this.media.removeAttribute("src"),this.load()}}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(i){i===1/0||!this.media||(this.media.volume=i)}},{key:"aspectRatio",get:function(){return this.media?this.media.videoWidth/this.media.videoHeight:0}},{key:"addInnerOP",value:function(i){this._internalOp[i]=!0}},{key:"removeInnerOP",value:function(i){delete this._internalOp[i]}},{key:"emit",value:function(i,m){for(var v,C=arguments.length,E=new Array(C>2?C-2:0),T=2;T<C;T++)E[T-2]=arguments[T];(v=yr(ur(a.prototype),"emit",this)).call.apply(v,[this,i,m].concat(E))}},{key:"on",value:function(i,m){for(var v,C=arguments.length,E=new Array(C>2?C-2:0),T=2;T<C;T++)E[T-2]=arguments[T];(v=yr(ur(a.prototype),"on",this)).call.apply(v,[this,i,m].concat(E))}},{key:"once",value:function(i,m){for(var v,C=arguments.length,E=new Array(C>2?C-2:0),T=2;T<C;T++)E[T-2]=arguments[T];(v=yr(ur(a.prototype),"once",this)).call.apply(v,[this,i,m].concat(E))}},{key:"off",value:function(i,m){for(var v,C=arguments.length,E=new Array(C>2?C-2:0),T=2;T<C;T++)E[T-2]=arguments[T];(v=yr(ur(a.prototype),"off",this)).call.apply(v,[this,i,m].concat(E))}},{key:"offAll",value:function(){yr(ur(a.prototype),"removeAllListeners",this).call(this)}}]),a}(Pne),sCe=function(){function c(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};ds(this,c),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=r}return fs(c,[{key:"openDB",value:function(a){var l=this,i=this,m=this.myDB.version||1,v=i.indexedDB.open(i.myDB.name,m);v.onerror=function(C){},v.onsuccess=function(C){l.myDB.db=C.target.result,a.call(i)},v.onupgradeneeded=function(C){var E=C.target.result;C.target.transaction,E.objectStoreNames.contains(i.myDB.ojstore.name)||E.createObjectStore(i.myDB.ojstore.name,{keyPath:i.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){var a=this;a.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(a,l){for(var i=this.myDB.db.transaction(a,"readwrite").objectStore(a),m,v=0;v<l.length;v++)m=i.add(l[v]),m.onerror=function(){},m.onsuccess=function(){}}},{key:"putData",value:function(a,l){for(var i=this.myDB.db.transaction(a,"readwrite").objectStore(a),m,v=0;v<l.length;v++)m=i.put(l[v]),m.onerror=function(){},m.onsuccess=function(){}}},{key:"getDataByKey",value:function(a,l,i){var m=this,v=this.myDB.db.transaction(a,"readwrite").objectStore(a),C=v.get(l);C.onerror=function(){i.call(m,null)},C.onsuccess=function(E){var T=E.target.result;i.call(m,T)}}},{key:"deleteData",value:function(a,l){var i=this.myDB.db.transaction(a,"readwrite").objectStore(a);i.delete(l)}},{key:"clearData",value:function(a){var l=this.myDB.db.transaction(a,"readwrite").objectStore(a);l.clear()}}]),c}(),soe=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],roe=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],ioe=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],nC="data-xgplayerid";function WO(c,r,a){for(var l=arguments.length,i=new Array(l>3?l-3:0),m=3;m<l;m++)i[m-3]=arguments[m];var v=r.call.apply(r,[c].concat(i));!a||typeof a!="function"||(v&&v.then?v.then(function(){for(var C=arguments.length,E=new Array(C),T=0;T<C;T++)E[T]=arguments[T];a.call.apply(a,[c].concat(E))}):a.call.apply(a,[c].concat(i)))}function jO(c,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[c]&&(this.__hooks[c]=null),(function(){var l=arguments,i=this;if(a.pre)try{var m;(m=a.pre).call.apply(m,[this].concat(Array.prototype.slice.call(arguments)))}catch(E){throw E.message="[pluginName: ".concat(this.pluginName,":").concat(c,":pre error] >> ").concat(E.message),E}if(this.__hooks&&this.__hooks[c])try{var v,C=(v=this.__hooks[c]).call.apply(v,[this,this].concat(Array.prototype.slice.call(arguments)));C?C.then?C.then(function(E){E!==!1&&WO.apply(void 0,[i,r,a.next].concat(ig(l)))}).catch(function(E){throw E}):WO.apply(void 0,[this,r,a.next].concat(Array.prototype.slice.call(arguments))):C===void 0&&WO.apply(void 0,[this,r,a.next].concat(Array.prototype.slice.call(arguments)))}catch(E){throw E.message="[pluginName: ".concat(this.pluginName,":").concat(c,"] >> ").concat(E.message),E}else WO.apply(void 0,[this,r,a.next].concat(Array.prototype.slice.call(arguments)))}).bind(this)}function GO(c,r){var a=this.__hooks;if(a)return a.hasOwnProperty(c)?(a&&(a[c]=r),!0):(console.warn("has no supported hook which name [".concat(c,"]")),!1)}function ZO(c,r){var a=this.__hooks;a&&delete a[c]}function aoe(c){if(!(!this.plugins||!this.plugins[c.toLowerCase()])){for(var r=this.plugins[c.toLowerCase()],a=arguments.length,l=new Array(a>1?a-1:0),i=1;i<a;i++)l[i-1]=arguments[i];return r.useHooks&&r.useHooks.apply(r,l)}}function loe(c){if(!(!this.plugins||!this.plugins[c.toLowerCase()])){var r=this.plugins[c.toLowerCase()];if(r){for(var a=arguments.length,l=new Array(a>1?a-1:0),i=1;i<a;i++)l[i-1]=arguments[i];return r.removeHooks&&r.removeHooks.apply(r,l)}}}function coe(c){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];c.__hooks={},r&&r.map(function(a){c.__hooks[a]=null}),Object.defineProperty(c,"hooks",{get:function(){return c.__hooks&&Object.keys(c.__hooks).map(function(l){if(c.__hooks[l])return l})}})}function uoe(c){c.__hooks=null}function s0(c,r,a){for(var l=arguments.length,i=new Array(l>3?l-3:0),m=3;m<l;m++)i[m-3]=arguments[m];if(c.__hooks&&c.__hooks[r]){var v,C=(v=c.__hooks[r]).call.apply(v,[c,c].concat(i));if(C&&C.then)C.then(function(E){return E===!1?null:a.call.apply(a,[c,c].concat(i))}).catch(function(E){console.warn("[runHooks]".concat(r," reject"),E.message)});else if(C!==!1)return a.call.apply(a,[c,c].concat(i))}else return a.call.apply(a,[c,c].concat(i))}function KV(c,r){ci.logError("[".concat(c,"] event or callback cant be undefined or null when call ").concat(r))}var ly=function(){function c(r){ds(this,c),_e.checkIsFunction(this.beforeCreate)&&this.beforeCreate(r),coe(this),this.__args=r,this.__events={},this.__onceEvents={},this.config=r.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(r)}return fs(c,[{key:"beforeCreate",value:function(a){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(a){this.player=a.player,this.playerConfig=a.player&&a.player.config,this.pluginName=a.pluginName?a.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=a.player&&a.player.logger}},{key:"updateLang",value:function(a){a||(a=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var a=_e.checkTouchSupport()?"touch":"mouse";return this.playerConfig&&(this.playerConfig.domEventType==="touch"||this.playerConfig.domEventType==="mouse")&&(a=this.playerConfig.domEventType),a}},{key:"on",value:function(a,l){var i=this;if(!a||!l||!this.player){KV(this.pluginName,"plugin.on(event, callback)");return}typeof a=="string"?(this.__events[a]=l,this.player.on(a,l)):Array.isArray(a)&&a.forEach(function(m){i.__events[m]=l,i.player.on(m,l)})}},{key:"once",value:function(a,l){var i=this;if(!a||!l||!this.player){KV(this.pluginName,"plugin.once(event, callback)");return}typeof a=="string"?(this.__onceEvents[a]=l,this.player.once(a,l)):Array.isArray(a)&&a.forEach(function(m){i.__onceEvents[m]=l,i.player.once(a,l)})}},{key:"off",value:function(a,l){var i=this;if(!a||!l||!this.player){KV(this.pluginName,"plugin.off(event, callback)");return}typeof a=="string"?(delete this.__events[a],this.player.off(a,l)):Array.isArray(a)&&a.forEach(function(m){delete i.__events[a],i.player.off(m,l)})}},{key:"offAll",value:function(){var a=this;["__events","__onceEvents"].forEach(function(l){Object.keys(a[l]).forEach(function(i){a[l][i]&&a.off(i,a[l][i]),i&&delete a[l][i]})}),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(a){var l;if(this.player){for(var i=arguments.length,m=new Array(i>1?i-1:0),v=1;v<i;v++)m[v-1]=arguments[v];(l=this.player).emit.apply(l,[a].concat(m))}}},{key:"emitUserAction",value:function(a,l){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.player){var m=Ql(Ql({},i),{},{pluginName:this.pluginName});this.player.emitUserAction(a,l,m)}}},{key:"hook",value:function(a,l){return jO.call.apply(jO,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(a,l){for(var i=arguments.length,m=new Array(i>2?i-2:0),v=2;v<i;v++)m[v-2]=arguments[v];return GO.call.apply(GO,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(a,l){for(var i=arguments.length,m=new Array(i>2?i-2:0),v=2;v<i;v++)m[v-2]=arguments[v];return ZO.call.apply(ZO,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"registerPlugin",value:function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";if(this.player)return i&&(l.pluginName=i),this.player.registerPlugin({plugin:a,options:l})}},{key:"getPlugin",value:function(a){return this.player?this.player.getPlugin(a):null}},{key:"__destroy",value:function(){var a=this,l=this.player,i=this.pluginName;this.offAll(),_e.clearAllTimers(this),_e.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger","__args","__hooks"].map(function(m){a[m]=null}),l.unRegisterPlugin(i),uoe(this)}}],[{key:"defineGetterOrSetter",value:function(a,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&Object.defineProperty(a,i,l[i])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),c}(),rCe=9;if(typeof Element<"u"&&!Element.prototype.matches){var GS=Element.prototype;GS.matches=GS.matchesSelector||GS.mozMatchesSelector||GS.msMatchesSelector||GS.oMatchesSelector||GS.webkitMatchesSelector}function iCe(c,r){for(;c&&c.nodeType!==rCe;){if(typeof c.matches=="function"&&c.matches(r))return c;c=c.parentNode}}var aCe=iCe,lCe=aCe;function YV(c,r,a,l,i){var m=uCe.apply(this,arguments);return c.addEventListener(a,m,i),{destroy:function(){c.removeEventListener(a,m,i)}}}function cCe(c,r,a,l,i){return typeof c.addEventListener=="function"?YV.apply(null,arguments):typeof a=="function"?YV.bind(null,document).apply(null,arguments):(typeof c=="string"&&(c=document.querySelectorAll(c)),Array.prototype.map.call(c,function(m){return YV(m,r,a,l,i)}))}function uCe(c,r,a,l){return function(i){i.delegateTarget=lCe(i.target,r),i.delegateTarget&&l.call(c,i)}}var dCe=cCe;const doe=NO(dCe);var fCe={CONTROLS:"controls",ROOT:"root"},Na={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},foe={ICON_DISABLE:"xg-icon-disable",ICON_HIDE:"xg-icon-hide"};function XV(c){return c?c.indexOf&&/^(?:http|data:|\/)/.test(c):!1}function mCe(c,r){return Md(c)==="object"&&c.class&&typeof c.class=="string"?"".concat(r," ").concat(c.class):r}function hCe(c,r){return Md(c)==="object"&&c.attr&&Md(c.attr)==="object"&&Object.keys(c.attr).map(function(a){r[a]=c.attr[a]}),r}function moe(c,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"",m=null;if(c instanceof window.Element)return _e.addClass(c,a),Object.keys(l).map(function(v){c.setAttribute(v,l[v])}),c;if(XV(c)||XV(c.url))return l.src=XV(c)?c:c.url||"",m=_e.createDom(c.tag||"img","",l,"xg-img ".concat(a)),m;if(typeof c=="function")try{return m=c(),m instanceof window.Element?(_e.addClass(m,a),Object.keys(l).map(function(v){m.setAttribute(v,l[v])}),m):(ci.logWarn("warn>>icons.".concat(r," in config of plugin named [").concat(i,"] is a function mast return an Element Object")),null)}catch(v){return ci.logError("Plugin named [".concat(i,"]:createIcon"),v),null}return typeof c=="string"?_e.createDomFromHtml(c,l,a):(ci.logWarn("warn>>icons.".concat(r," in config of plugin named [").concat(i,"] is invalid")),null)}function gCe(c,r){var a=r.config.icons||r.playerConfig.icons;Object.keys(c).map(function(l){var i=c[l],m=i&&i.class?i.class:"",v=i&&i.attr?i.attr:{},C=null;a&&a[l]&&(m=mCe(a[l],m),v=hCe(a[l],v),C=moe(a[l],l,m,v,r.pluginName)),!C&&i&&(C=moe(i.icon?i.icon:i,v,m,{},r.pluginName)),r.icons[l]=C})}function pCe(c,r){Object.keys(c).map(function(a){Object.defineProperty(r.langText,a,{get:function(){var i=r.lang,m=r.i18n;return m[a]?m[a]:c[a]&&c[a][i]||""}})})}var Fi=function(c){qs(a,c);var r=Ks(a);function a(){var l,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ds(this,a),l=r.call(this,i),l.__delegates=[],l}return fs(a,[{key:"__init",value:function(i){if(yr(ur(a.prototype),"__init",this).call(this,i),!!i.root){var m=i.root,v=null;this.icons={},this.root=null,this.parent=null;var C=this.registerIcons()||{};gCe(C,this),this.langText={};var E=this.registerLanguageTexts()||{};pCe(E,this);var T="";try{T=this.render()}catch(U){throw ci.logError("Plugin:".concat(this.pluginName,":render"),U),new Error("Plugin:".concat(this.pluginName,":render:").concat(U.message))}if(T)v=a.insert(T,m,i.index),v.setAttribute("data-index",i.index);else if(i.tag)v=_e.createDom(i.tag,"",i.attr,i.name),v.setAttribute("data-index",i.index),m.appendChild(v);else return;this.root=v,this.parent=m;var N=this.config.attr||{},V=this.config.style||{};this.setAttr(N),this.setStyle(V),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var i=this;if(this.root){this._children=[];var m=this.children();m&&Md(m)==="object"&&Object.keys(m).length>0&&Object.keys(m).map(function(v){var C=v,E=m[C],T={root:i.root},N,V;typeof E=="function"?(N=i.config[C]||{},V=E):Md(E)==="object"&&typeof E.plugin=="function"&&(N=E.options?_e.deepCopy(i.config[C]||{},E.options):i.config[C]||{},V=E.plugin),T.config=N,N.index!==void 0&&(T.index=N.index),N.root&&(T.root=N.root),i.registerPlugin(V,T,C)})}}},{key:"updateLang",value:function(i){i||(i=this.lang);function m(T,N){for(var V=0;V<T.children.length;V++)T.children[V].children.length>0?m(T.children[V],N):N(T.children[V])}var v=this.root,C=this.i18n,E=this.langText;v&&m(v,function(T){var N=T.getAttribute&&T.getAttribute("lang-key");if(N){var V=C[N.toUpperCase()]||E[N];V&&(T.innerHTML=typeof V=="function"?V(i):V)}})}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(i){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",v=this.i18n||{},C=this.langText;i.setAttribute&&i.setAttribute("lang-key",m);var E=v[m]||C[m]||"";E&&(i.innerHTML=E)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,_e.addClass(this.find(".xgplayer-icon"),foe.ICON_DISABLE)}},{key:"enable",value:function(){this.config.disable=!1,_e.removeClass(this.find(".xgplayer-icon"),foe.ICON_DISABLE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(i){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";m.root=m.root||this.root;var C=yr(ur(a.prototype),"registerPlugin",this).call(this,i,m,v);return this._children.push(C),C}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(i){if(this.root)return this.root.querySelector(i)}},{key:"bind",value:function(i,m,v){var C=this;if(arguments.length<3&&typeof m=="function")Array.isArray(i)?i.forEach(function(T){C.bindEL(T,m)}):this.bindEL(i,m);else{var E=a.delegate.call(this,this.root,i,m,v);this.__delegates=this.__delegates.concat(E)}}},{key:"unbind",value:function(i,m){var v=this;if(arguments.length<3&&typeof m=="function")Array.isArray(i)?i.forEach(function(T){v.unbindEL(T,m)}):this.unbindEL(i,m);else for(var C="".concat(i,"_").concat(m),E=0;E<this.__delegates.length;E++)if(this.__delegates[E].key===C){this.__delegates[E].destroy(),this.__delegates.splice(E,1);break}}},{key:"setStyle",value:function(i,m){var v=this;if(this.root){if(_e.typeOf(i)==="String")return this.root.style[i]=m;_e.typeOf(i)==="Object"&&Object.keys(i).map(function(C){v.root.style[C]=i[C]})}}},{key:"setAttr",value:function(i,m){var v=this;if(this.root){if(_e.typeOf(i)==="String")return this.root.setAttribute(i,m);_e.typeOf(i)==="Object"&&Object.keys(i).map(function(C){v.root.setAttribute(C,i[C])})}}},{key:"setHtml",value:function(i,m){this.root&&(this.root.innerHTML=i,typeof m=="function"&&m())}},{key:"bindEL",value:function(i,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.root&&"on".concat(i)in this.root&&typeof m=="function"&&this.root.addEventListener(i,m,v)}},{key:"unbindEL",value:function(i,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.root&&"on".concat(i)in this.root&&typeof m=="function"&&this.root.removeEventListener(i,m,v)}},{key:"show",value:function(i){if(this.root){this.root.style.display=i!==void 0?i:"block";var m=window.getComputedStyle(this.root,null),v=m.getPropertyValue("display");if(v==="none")return this.root.style.display="block"}}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(i,m){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!m||!(m instanceof window.Element))return null;try{return typeof i=="string"?this.find(i).appendChild(m):i.appendChild(m)}catch(v){return ci.logError("Plugin:appendChild",v),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var i=this,m=this.player;this.__delegates.map(function(v){v.destroy()}),this.__delegates=[],this._children instanceof Array&&(this._children.map(function(v){m.unRegisterPlugin(v.pluginName)}),this._children=null),this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),yr(ur(a.prototype),"__destroy",this).call(this),this.icons={},["root","parent"].map(function(v){i[v]=null})}}],[{key:"insert",value:function(i,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=m.children.length,E=Number(v),T=i instanceof window.Node;if(C){for(var N=0,V=null,U="";N<C;N++){V=m.children[N];var z=Number(V.getAttribute("data-index"));if(z>=E){U="beforebegin";break}else z<E&&(U="afterend")}return T?U==="afterend"?m.appendChild(i):m.insertBefore(i,V):V.insertAdjacentHTML(U,i),U==="afterend"?m.children[m.children.length-1]:m.children[N]}else return T?m.appendChild(i):m.insertAdjacentHTML("beforeend",i),m.children[m.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(i,m,v,C){var E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,T=[];if(i instanceof window.Node&&typeof C=="function")if(Array.isArray(v))v.forEach(function(V){var U=doe(i,m,V,C,E);U.key="".concat(m,"_").concat(V),T.push(U)});else{var N=doe(i,m,v,C,E);N.key="".concat(m,"_").concat(v),T.push(N)}return T}},{key:"ROOT_TYPES",get:function(){return fCe}},{key:"POSITIONS",get:function(){return Na}}]),a}(ly),vCe=function(){function c(){var r=this;if(ds(this,c),yn(this,"__trigger",function(a){var l=new Date().getTime();r.timeStamp=l;for(var i=0;i<a.length;i++)r.__runHandler(a[i].target)}),this.__handlers=[],this.timeStamp=0,this.observer=null,!!window.ResizeObserver)try{this.observer=new window.ResizeObserver(H2e(this.__trigger,100,{trailing:!0})),this.timeStamp=new Date().getTime()}catch(a){console.error(a)}}return fs(c,[{key:"addObserver",value:function(a,l){if(this.observer){this.observer&&this.observer.observe(a);for(var i=a.getAttribute(nC),m=this.__handlers,v=-1,C=0;C<m.length;C++)m[C]&&a===m[C].target&&(v=C);v>-1?this.__handlers[v].handler=l:this.__handlers.push({target:a,handler:l,playerId:i})}}},{key:"unObserver",value:function(a){var l=-1;this.__handlers.map(function(i,m){a===i.target&&(l=m)});try{this.observer&&this.observer.unobserve(a)}catch{}this.observer&&this.observer.unobserve(a),l>-1&&this.__handlers.splice(l,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(a){for(var l=this.__handlers,i=0;i<l.length;i++)if(l[i]&&a===l[i].target){try{l[i].handler(a)}catch(m){console.error(m)}return!0}return!1}}]),c}(),EA=null;function yCe(c,r){return EA||(EA=new vCe),EA.addObserver(c,r),EA}function bCe(c,r){EA.unObserver(c,r)}var od={pluginGroup:{},init:function(r){var a=r._pluginInfoId;a||(a=new Date().getTime(),r._pluginInfoId=a),!r.config.closeResizeObserver&&yCe(r.root,function(){r.resize()}),this.pluginGroup[a]={_originalOptions:r.config||{},_plugins:{}}},formatPluginInfo:function(r,a){var l=null,i=null;return r.plugin&&typeof r.plugin=="function"?(l=r.plugin,i=r.options):(l=r,i={}),a&&(i.config=a||{}),{PLUFGIN:l,options:i}},checkPluginIfExits:function(r,a){for(var l=0;l<a.length;l++)if(r.toLowerCase()===a[l].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(r,a){for(var l=Object.keys(a),i=null,m=0;m<l.length;m++)if(r.toLowerCase()===l[m].toLowerCase()){i=a[l[m]];break}return _e.typeOf(i)==="Object"?{root:i.root,position:i.position}:{}},lazyRegister:function(r,a){var l=this,i=a.timeout||1500;return Promise.race([a.loader().then(function(m){var v;m&&m.__esModule?v=m.default:v=m,l.register(r,v,m.options)}),new Promise(function(m,v){setTimeout(function(){v(new Error("timeout"))},i)})])},register:function(r,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!(!r||!a||typeof a!="function"||a.prototype===void 0)){var i=r._pluginInfoId;if(!(!i||!this.pluginGroup[i])){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var m=this.pluginGroup[i]._plugins,v=this.pluginGroup[i]._originalOptions;l.player=r;var C=l.pluginName||a.pluginName;if(!C)throw new Error("The property pluginName is necessary");if(a.isSupported&&!a.isSupported(r.config.mediaType,r.config.codecType)){console.warn("not supported plugin [".concat(C,"]"));return}l.config||(l.config={});for(var E=Object.keys(v),T=0;T<E.length;T++)if(C.toLowerCase()===E[T].toLowerCase()){var N=v[E[T]];_e.typeOf(N)==="Object"?l.config=Object.assign({},l.config,v[E[T]]):_e.typeOf(N)==="Boolean"&&(l.config.disable=!N);break}a.defaultConfig&&Object.keys(a.defaultConfig).forEach(function(U){typeof l.config[U]>"u"&&(l.config[U]=a.defaultConfig[U])}),l.root?typeof l.root=="string"&&(l.root=r[l.root]):l.root=r.root,l.index=l.config.index||0;try{m[C.toLowerCase()]&&(this.unRegister(i,C.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(C,"] exist, destroy the old instance")));var V=new a(l);return m[C.toLowerCase()]=V,m[C.toLowerCase()].func=a,V&&typeof V.afterCreate=="function"&&V.afterCreate(),V}catch(U){throw console.error(U),U}}}},unRegister:function(r,a){r._pluginInfoId&&(r=r._pluginInfoId),a=a.toLowerCase();try{var l=this.pluginGroup[r]._plugins[a];l&&(l.pluginName&&l.__destroy(),delete this.pluginGroup[r]._plugins[a])}catch(i){console.error("[unRegister:".concat(a,"] cgid:[").concat(r,"] error"),i)}},deletePlugin:function(r,a){var l=r._pluginInfoId;l&&this.pluginGroup[l]&&this.pluginGroup[l]._plugins&&delete this.pluginGroup[l]._plugins[a]},getPlugins:function(r){var a=r._pluginInfoId;return a&&this.pluginGroup[a]?this.pluginGroup[a]._plugins:{}},findPlugin:function(r,a){var l=r._pluginInfoId;if(!l||!this.pluginGroup[l])return null;var i=a.toLowerCase();return this.pluginGroup[l]._plugins[i]},beforeInit:function(r){var a=this;function l(i){return!i||!i.then?new Promise(function(m){m()}):i}return new Promise(function(i){if(a.pluginGroup){var m;return r._loadingPlugins&&r._loadingPlugins.length?m=Promise.all(r._loadingPlugins):m=Promise.resolve(),m.then(function(){var v=r._pluginInfoId;if(!a.pluginGroup[v]){i();return}var C=a.pluginGroup[v]._plugins,E=[];Object.keys(C).forEach(function(T){if(C[T]&&C[T].beforePlayerInit)try{var N=C[T].beforePlayerInit();E.push(l(N))}catch(V){throw E.push(l(null)),V}}),Promise.all([].concat(E)).then(function(){i()}).catch(function(T){console.error(T),i()})})}})},afterInit:function(r){var a=r._pluginInfoId;if(!(!a||!this.pluginGroup[a])){var l=this.pluginGroup[a]._plugins;Object.keys(l).forEach(function(i){l[i]&&l[i].afterPlayerInit&&l[i].afterPlayerInit()})}},setLang:function(r,a){var l=a._pluginInfoId;if(!(!l||!this.pluginGroup[l])){var i=this.pluginGroup[l]._plugins;Object.keys(i).forEach(function(m){if(i[m].updateLang)i[m].updateLang(r);else try{i[m].lang=r}catch{console.warn("".concat(m," setLang"))}})}},reRender:function(r){var a=this,l=r._pluginInfoId;if(!(!l||!this.pluginGroup[l])){var i=[],m=this.pluginGroup[l]._plugins;Object.keys(m).forEach(function(v){v!=="controls"&&m[v]&&(i.push({plugin:m[v].func,options:m[v].__args}),a.unRegister(l,v))}),i.forEach(function(v){a.register(r,v.plugin,v.options)})}},onPluginsReady:function(r){var a=r._pluginInfoId;if(!(!a||!this.pluginGroup[a])){var l=this.pluginGroup[a]._plugins||{};Object.keys(l).forEach(function(i){l[i].onPluginsReady&&typeof l[i].onPluginsReady=="function"&&l[i].onPluginsReady()})}},destroy:function(r){var a=r._pluginInfoId;if(this.pluginGroup[a]){bCe(r.root);for(var l=this.pluginGroup[a]._plugins,i=0,m=Object.keys(l);i<m.length;i++){var v=m[i];this.unRegister(a,v)}delete this.pluginGroup[a],delete r._pluginInfoId}}},no={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function hoe(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:z2e(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var CCe=function(r,a){var l,i,m;a.preset&&a.options?m=new a.preset(a.options,r.config):m=new a({},r.config);var v=m,C=v.plugins,E=C===void 0?[]:C,T=v.ignores,N=T===void 0?[]:T,V=v.icons,U=V===void 0?{}:V,z=v.i18n,W=z===void 0?[]:z;r.config.plugins||(r.config.plugins=[]),r.config.ignores||(r.config.ignores=[]),(l=r.config.plugins).push.apply(l,ig(E)),(i=r.config.ignores).push.apply(i,ig(N)),Object.keys(U).map(function(Z){r.config.icons[Z]||(r.config.icons[Z]=U[Z])});var K=r.config.i18n||[];W.push.apply(W,ig(K)),r.config.i18n=W},_Ce=function(c){qs(a,c);var r=Ks(a);function a(){var l;ds(this,a);for(var i=arguments.length,m=new Array(i),v=0;v<i;v++)m[v]=arguments[v];return l=r.call.apply(r,[this].concat(m)),yn(qt(l),"onMouseEnter",function(C){var E=qt(l),T=E.player,N=E.playerConfig;N.closeControlsBlur&&T.focus({autoHide:!1})}),yn(qt(l),"onMouseLeave",function(C){var E=qt(l),T=E.player;T.focus()}),l}return fs(a,[{key:"beforeCreate",value:function(i){!i.config.mode&&Wr.device==="mobile"&&(i.config.mode="flex"),i.player.config.marginControls&&(i.config.autoHide=!1)}},{key:"afterCreate",value:function(){var i=this,m=this.config,v=m.disable,C=m.height,E=m.mode;if(!v){E==="flex"&&this.player.addClass(no.FLEX_CONTROLS);var T={height:"".concat(C,"px")};Object.keys(T).map(function(V){i.root.style[V]=T[V]}),this.left=this.find("xg-left-grid"),this.center=this.find("xg-center-grid"),this.right=this.find("xg-right-grid"),this.innerRoot=this.find("xg-inner-controls"),this.on(VO,function(V){V?_e.addClass(i.root,"mini-controls"):_e.removeClass(i.root,"mini-controls")});var N=this.playerConfig.isMobileSimulateMode;Wr.device!=="mobile"&&N!=="mobile"&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&_e.addClass(this.root,no.CONTROLS_AUTOHIDE)}},{key:"pauseAutoHide",value:function(){_e.removeClass(this.root,no.CONTROLS_AUTOHIDE)}},{key:"show",value:function(i){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(i){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0;if(this.root){var C=i.defaultConfig||{};if(!m.root){var E=m.position?m.position:m.config&&m.config.position?m.config.position:C.position;switch(E){case Na.CONTROLS_LEFT:m.root=this.left;break;case Na.CONTROLS_RIGHT:m.root=this.right;break;case Na.CONTROLS_CENTER:m.root=this.center;break;case Na.CONTROLS:m.root=this.root;break;default:m.root=this.left}return yr(ur(a.prototype),"registerPlugin",this).call(this,i,m,v)}}}},{key:"destroy",value:function(){Wr.device!=="mobile"&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var i=this.config,m=i.mode,v=i.autoHide,C=i.initShow,E=i.disable;if(!E){var T=_e.classNames({"xgplayer-controls":!0},{"flex-controls":m==="flex"},{"bottom-controls":m==="bottom"},yn({},no.CONTROLS_AUTOHIDE,v),{"xgplayer-controls-initshow":C||!v});return'<xg-controls class="'.concat(T,`" unselectable="on">
|
|
151
151
|
<xg-inner-controls class="xg-inner-controls xg-pos">
|
|
152
152
|
<xg-left-grid class="xg-left-grid">
|