@pristy/pristy-libvue 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-DYatiWG2.js → index-BbVzbEij.js} +11 -3
- package/dist/{index-DYatiWG2.js.map → index-BbVzbEij.js.map} +1 -1
- package/dist/{jszip.min-BrgORSfj.js → jszip.min-8PfeYdht.js} +2 -2
- package/dist/{jszip.min-BrgORSfj.js.map → jszip.min-8PfeYdht.js.map} +1 -1
- package/dist/pristy-libvue.es.js +1 -1
- package/dist/pristy-libvue.umd.js +1 -1
- package/dist/pristy-libvue.umd.js.map +1 -1
- package/dist/src/components/search/AdvancedViewPanel.vue.d.ts +17 -0
- package/dist/src/components/search/AdvancedViewPanel.vue.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -150,7 +150,7 @@ ${yg}`}</style>
|
|
|
150
150
|
<body>
|
|
151
151
|
${a}
|
|
152
152
|
</body>
|
|
153
|
-
</html>`}function hc(a={}){const{content:t,mimeType:n,customStyles:i=""}=a,o=e.computed(()=>{const c=n?.value;return c==="text/markdown"||c==="text/x-markdown"||c==="text/x-web-markdown"}),r=e.computed(()=>n?.value==="text/html"),l=e.computed(()=>o.value||r.value),s=e.computed(()=>{if(!t?.value)return Ni("");let c="";return o.value?c=gc(t.value):r.value&&(c=_c(t.value)),Ni(c,i)});return{isMarkdown:o,isHtml:r,shouldRenderPreview:l,iframeContent:s,renderMarkdown:gc,sanitizeHtml:_c,generatePreviewDocument:Ni}}const zn={aura:E_,material:T_,lara:A_,nora:O_},Gn={soho:{0:"#ffffff",50:"#f8f8f9",100:"#f0f1f2",200:"#e1e2e4",300:"#c4c5c8",400:"#9fa1a5",500:"#7f8084",600:"#65666a",700:"#4f5053",800:"#3a3b3d",900:"#27282a",950:"#131315"},viva:{0:"#ffffff",50:"#f9f9fa",100:"#f3f3f4",200:"#e6e7e8",300:"#cacacd",400:"#a5a6a9",500:"#87898a",600:"#6c6e6f",700:"#555658",800:"#3f4041",900:"#2a2b2c",950:"#151516"},ocean:{0:"#ffffff",50:"#f8f9f9",100:"#f1f2f2",200:"#e3e4e4",300:"#c7c8c8",400:"#a2a4a4",500:"#828787",600:"#686c6c",700:"#525555",800:"#3c3e3e",900:"#282a2a",950:"#141515"}},PO=[{name:"slate",label:"Slate",value:"#64748b"},{name:"emerald",label:"Emerald",value:"#10b981"},{name:"green",label:"Green",value:"#22c55e"},{name:"lime",label:"Lime",value:"#84cc16"},{name:"orange",label:"Orange",value:"#f97316"},{name:"amber",label:"Amber",value:"#f59e0b"},{name:"yellow",label:"Yellow",value:"#eab308"},{name:"teal",label:"Teal",value:"#14b8a6"},{name:"cyan",label:"Cyan",value:"#06b6d4"},{name:"sky",label:"Sky",value:"#0ea5e9"},{name:"blue",label:"Blue",value:"#3b82f6"},{name:"indigo",label:"Indigo",value:"#6366f1"},{name:"violet",label:"Violet",value:"#8b5cf6"},{name:"purple",label:"Purple",value:"#a855f7"},{name:"fuchsia",label:"Fuchsia",value:"#d946ef"},{name:"pink",label:"Pink",value:"#ec4899"},{name:"rose",label:"Rose",value:"#f43f5e"},{name:"red",label:"Red",value:"#ef4444"}],VO=[{name:"slate",label:"Slate",value:"#64748b"},{name:"gray",label:"Gray",value:"#6b7280"},{name:"zinc",label:"Zinc",value:"#71717a"},{name:"neutral",label:"Neutral",value:"#737373"},{name:"stone",label:"Stone",value:"#78716c"},{name:"soho",label:"Soho",value:"#7f8084"},{name:"viva",label:"Viva",value:"#87898a"},{name:"ocean",label:"Ocean",value:"#828787"}],Si=[12,13,14,15,16,17,18],UO=["85%","90%","95%","100%","105%","110%","115%"],Oa={darkMode:!1,preset:"aura",primaryColor:"emerald",surfaceColor:"slate",scale:3},Ot={darkMode:"user-dark-mode",preset:"user-preset",primaryColor:"user-primary-color",surfaceColor:"user-surface-color",scale:"user-scale"};function Ei(){const a=()=>{const h=localStorage.getItem(Ot.darkMode)==="true";return h?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark"),h},t=h=>{localStorage.setItem(Ot.darkMode,h.toString()),h?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark")},n=()=>localStorage.getItem(Ot.darkMode)==="true",i=()=>{const h=localStorage.getItem(Ot.preset)||Oa.preset;return h&&zn[h]&&za.usePreset(zn[h]),h},o=h=>{zn[h]&&(localStorage.setItem(Ot.preset,h),za.usePreset(zn[h]),l(),d())},r=()=>localStorage.getItem(Ot.preset)||Oa.preset,l=()=>{const h=localStorage.getItem(Ot.primaryColor)||Oa.primaryColor;return za.updatePrimaryPalette({50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`}),h},s=h=>{localStorage.setItem(Ot.primaryColor,h),za.updatePrimaryPalette({50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`})},c=()=>localStorage.getItem(Ot.primaryColor)||Oa.primaryColor,d=()=>{const h=localStorage.getItem(Ot.surfaceColor)||Oa.surfaceColor;return Gn[h]?za.updateSurfacePalette(Gn[h]):za.updateSurfacePalette({0:"#ffffff",50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`}),h},u=h=>{localStorage.setItem(Ot.surfaceColor,h),Gn[h]?za.updateSurfacePalette(Gn[h]):za.updateSurfacePalette({0:"#ffffff",50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`})},b=()=>localStorage.getItem(Ot.surfaceColor)||Oa.surfaceColor,m=()=>{const h=localStorage.getItem(Ot.scale)||Oa.scale.toString(),S=parseInt(h),y=Si[S]||Si[Oa.scale];return document.documentElement.style.fontSize=`${y}px`,S},p=h=>{const S=Si[h];S&&(document.documentElement.style.fontSize=`${S}px`,localStorage.setItem(Ot.scale,h.toString()))},g=()=>parseInt(localStorage.getItem(Ot.scale)||Oa.scale.toString()),_=()=>{a(),i(),l(),d(),m()};return{applyDarkMode:a,applyPreset:i,applyPrimaryColor:l,applySurfaceColor:d,applyScale:m,applyAllThemeSettings:_,setDarkMode:t,setPreset:o,setPrimaryColor:s,setSurfaceColor:u,setScale:p,isDarkMode:n,getPreset:r,getPrimaryColor:c,getSurfaceColor:b,getScale:g,resetToDefaults:()=>{localStorage.removeItem(Ot.darkMode),localStorage.removeItem(Ot.preset),localStorage.removeItem(Ot.primaryColor),localStorage.removeItem(Ot.surfaceColor),localStorage.removeItem(Ot.scale),_()},themePresets:zn,primaryColors:PO,surfaceColors:VO,customSurfacePalettes:Gn,scaleValues:Si,scalePercentages:UO,defaults:Oa,storageKeys:Ot}}const jO={class:"code-viewer-wrapper"},BO={key:0,class:"loading-container"},HO={key:1,class:"error-container"},JO={key:2},QO=["srcdoc"],KO={name:"PreviewPanel",components:{VideoPlayer:vo,ImageViewer:Mo,AudioPlayer:Zo,PDFComponent:co,CodeMirrorViewer:Se({__name:"CodeMirrorViewer",props:{contentNode:{type:Object,required:!0},isSharedLink:{type:Boolean,default:!1}},setup(a){const{t}=ta.useI18n(),{isDarkMode:n}=Ei(),i=a,o=e.ref(""),r=e.ref(null),l=e.ref(null),s=e.shallowRef(null),c=e.ref(!1),d=e.ref(null),{isMarkdown:u,isHtml:b,iframeContent:m}=hc({content:o,mimeType:r}),p=()=>{if(!l.value)return;const f=Nn(r.value),S=[...Sn({editable:!1,showLineNumbers:!0,enableHistory:!1,dark:n()})];f&&(!Array.isArray(f)||f.length>0)&&S.push(f);const y=xa.EditorState.create({doc:o.value,extensions:S});s.value=new Dt.EditorView({state:y,parent:l.value})},g=()=>{s.value&&(s.value.destroy(),s.value=null)},_=async f=>{if(!(!f.id&&!f.shareId)){c.value=!0,d.value=null;try{let h;i.isSharedLink&&f.shareId?h=await Re.getSharedLinkContent(f.shareId):h=await Re.getNodeContent(f.id,!1);let S=await h.text();if(f.content?.mimeType==="application/json")try{S=JSON.stringify(JSON.parse(S),null,2)}catch(y){console.warn("Failed to format JSON, displaying raw content:",y.message)}o.value=S,r.value=f.content?.mimeType||"text/plain",c.value=!1,await e.nextTick(),!u.value&&!b.value&&p()}catch(h){console.error("Failed to load content:",h),d.value=t("editor.loadError"),c.value=!1}}};return e.watch(()=>i.contentNode,f=>{f&&(g(),_(f))},{immediate:!0}),e.onBeforeUnmount(()=>{g()}),(f,h)=>(e.openBlock(),e.createElementBlock("div",jO,[c.value?(e.openBlock(),e.createElementBlock("div",BO,[e.createVNode(e.unref(ea))])):d.value?(e.openBlock(),e.createElementBlock("div",HO,[h[0]||(h[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(d.value),1)])):(e.openBlock(),e.createElementBlock("div",JO,[e.unref(u)||e.unref(b)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(m),class:"preview-iframe w-full h-screen",sandbox:"allow-scripts allow-popups"},null,8,QO)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:l,class:"h-full w-full"},null,512))]))]))}},[["__scopeId","data-v-5063b880"]]),PrimeButton:ce},directives:{tooltip:Mt},inject:["collaboraService","isCurrentNodeDisplayed"],props:{isPreviewPanelVisible:{type:Boolean,default:!1},currentNodeDisplayed:{type:Object,default:()=>({})},hasOnlyOneFile:{type:Boolean,default:!1}},emits:["closeContentPanel","showPreviousFile","showNextFile"],data(){return{url:null}},computed:{...Fe.mapState(Rt,["children"])},watch:{currentNodeDisplayed(a){a!=null?this.computeUrl(a):this.closeContentPanel()}},methods:{getPDFRef(){return this.$refs.pdfComponent},getImagePreviewRef(){return this.$refs.imageViewer},closeContentPanel(){this.$emit("closeContentPanel")},showPreviousFile(a){this.$emit("showPreviousFile",a)},showNextFile(a){this.$emit("showNextFile",a)},computeUrl(a){this.mimeType=a.content.mimeType,this.currentFileName=a.name,this.currentFileId=a.id,this.mimeType&&(this.mimeType==="application/pdf"||this.mimeType.includes("image/")||this.mimeType.includes("video/")||this.mimeType.includes("audio/"))?this.url=It.getContentUrl(a.id):It.getRenditionUrl(a.id).then(t=>{this.url=t}).catch(t=>{if(t.message==="NOT_CREATED")return console.warn("Fail loading content : NOT_CREATED"),null;console.error("Fail loading content",t)})}}},qO={class:"preview-card"},$O={key:0,class:"panel-header"},eC={class:"file-name"},tC={class:"nav-actions"},aC={class:"preview-content"};function nC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("router-link"),c=e.resolveComponent("ImageViewer"),d=e.resolveComponent("VideoPlayer"),u=e.resolveComponent("AudioPlayer"),b=e.resolveComponent("CodeMirrorViewer"),m=e.resolveComponent("PDFComponent"),p=e.resolveDirective("tooltip");return n.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["preview-panel-container",{hidden:!n.isPreviewPanelVisible}])},[e.createElementVNode("div",qO,[n.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",$O,[e.createVNode(l,{class:"close-btn",type:"button",icon:"ri-close-line",severity:"danger",rounded:"",text:"",onClick:r.closeContentPanel},null,8,["onClick"]),e.withDirectives((e.openBlock(),e.createElementBlock("div",eC,[e.createTextVNode(e.toDisplayString(n.currentNodeDisplayed.name),1)])),[[p,n.currentNodeDisplayed.name,void 0,{top:!0}]]),e.createElementVNode("div",tC,[e.withDirectives(e.createVNode(l,{type:"button",class:"nav-btn",icon:"ri-skip-left-line",severity:"secondary",disabled:n.hasOnlyOneFile,onClick:t[0]||(t[0]=g=>r.showPreviousFile(a.children))},null,8,["disabled"]),[[p,a.$t("previousFile"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(l,{type:"button",class:"nav-btn",icon:"ri-skip-right-line",severity:"secondary","icon-pos":"right",disabled:n.hasOnlyOneFile,onClick:t[1]||(t[1]=g=>r.showNextFile(a.children))},null,8,["disabled"]),[[p,a.$t("nextFile"),void 0,{bottom:!0}]]),e.createVNode(s,{to:r.collaboraService.getRoute(n.currentNodeDisplayed)},{default:e.withCtx(()=>[e.createVNode(l,{class:"open-btn",label:"Ouvrir",type:"button",severity:"secondary",raised:""})]),_:1},8,["to"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",aC,[n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("image/")?(e.openBlock(),e.createBlock(c,{key:0,ref:"imageViewer","content-node":n.currentNodeDisplayed,"show-title":!1},null,8,["content-node"])):n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("video/")?(e.openBlock(),e.createBlock(d,{key:1,"content-url":o.url,"content-node":n.currentNodeDisplayed},null,8,["content-url","content-node"])):n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("audio/")?(e.openBlock(),e.createBlock(u,{key:2,"content-url":o.url,"content-node":n.currentNodeDisplayed},null,8,["content-url","content-node"])):n.currentNodeDisplayed&&a.mimeType&&(a.mimeType.startsWith("text/")||a.mimeType==="application/json"||a.mimeType==="application/xml"||a.mimeType==="application/x-yaml"||a.mimeType==="application/x-sh")?(e.openBlock(),e.createBlock(b,{key:3,"content-node":n.currentNodeDisplayed},null,8,["content-node"])):o.url?(e.openBlock(),e.createBlock(m,{key:o.url,ref:"pdfComponent",url:o.url,class:"pdf-viewer"},null,8,["url"])):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)}const Ng=Se(KO,[["render",nC],["__scopeId","data-v-defea78c"]]),iC={name:"SelectionStatus",components:{PrimeProgressSpinner:ea},inject:["actionsService"],emits:["resetPageSelection"],computed:{useSelectionStore(){return Tt},...Fe.mapState(Tt,["isSelectionRemovalVisible","isCurrentPageFullySelected"]),...Fe.mapState(Rt,["currentNode","loading","pagination","totalRecordNodes"]),hasMoreElements(){return this.totalRecordNodes>=500},hasSelectedNodes(){return Tt().nodes.length!==0&&this.pagination&&!this.loading}},methods:{deleteSelection(){Tt().resetSelection(),Tt().setIsCurrentPageFullySelected(!1),Tt().setIsSelectionRemovalVisible(!1),this.$emit("resetPageSelection")},selectAllNodes(){let a=this.currentNode.guid||this.currentNode.id;this.actionsService.selectAllNodes(a,!0).then(t=>{let n=t.children;n.length>0&&Tt().selectNodes(n),Tt().setIsCurrentPageFullySelected(!1),Tt().setIsSelectionRemovalVisible(!0)})}}},oC={class:"selection-status-container"},rC={key:1,class:"nbrOfSearchResult"},lC={key:2,class:"nbrOfSearchResult"},sC={key:3,class:"selectOrDeleteDiv"},cC={class:"selection-info"},dC={key:4,class:"selectOrDeleteDiv"},mC={class:"selection-info"};function pC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeProgressSpinner");return e.openBlock(),e.createElementBlock("div",oC,[a.loading?(e.openBlock(),e.createBlock(l,{key:0,class:"spinner",strokeWidth:"8",fill:"var(--surface-ground)",animationDuration:".5s","aria-label":"Custom ProgressSpinner"})):e.createCommentVNode("",!0),!a.loading&&a.pagination&&!r.hasSelectedNodes?(e.openBlock(),e.createElementBlock("div",rC,e.toDisplayString(a.$t("howMuchResult",{nbrEntries:a.pagination.count,totalEntries:a.pagination.totalItems})),1)):r.hasSelectedNodes&&!a.isCurrentPageFullySelected&&!a.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",lC,e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems})),1)):r.hasSelectedNodes&&a.isCurrentPageFullySelected?(e.openBlock(),e.createElementBlock("div",sC,[e.createElementVNode("span",cC,[e.createTextVNode(e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems}))+" ",1),r.hasMoreElements?(e.openBlock(),e.createElementBlock("span",{key:0,class:"action-link",onClick:t[0]||(t[0]=s=>r.selectAllNodes())},e.toDisplayString(a.$t("selectAllElementMoreThan",{totalEntries:a.pagination.totalItems})),1)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"action-link",onClick:t[1]||(t[1]=s=>r.selectAllNodes())},e.toDisplayString(a.$t("selectAllElement",{totalEntries:a.pagination.totalItems})),1))])])):r.hasSelectedNodes&&a.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",dC,[e.createElementVNode("span",mC,[e.createTextVNode(e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems}))+" ",1),e.createElementVNode("span",{class:"action-link",onClick:t[2]||(t[2]=s=>r.deleteSelection())},e.toDisplayString(a.$t("deleteSelection")),1)])])):e.createCommentVNode("",!0)])}const Sg=Se(iC,[["render",pC],["__scopeId","data-v-e4e3c767"]]),uC={name:"LayoutSelector",components:{PrimeSelectButton:Ka},emits:["update-layout"],data(){return{layout:localStorage.getItem("contentViewLayout")||"datatable",options:["list","grid","datatable"]}},methods:{onLayoutChange(){this.$emit("update-layout",this.layout)}}},bC={class:"listView flex-grow-0"};function gC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelectButton");return e.openBlock(),e.createElementBlock("div",bC,[e.createVNode(l,{modelValue:o.layout,"onUpdate:modelValue":t[0]||(t[0]=s=>o.layout=s),options:o.options,"allow-empty":!1,onChange:r.onLayoutChange},{option:e.withCtx(({option:s})=>[e.createElementVNode("i",{class:e.normalizeClass([s==="list"?"ri-list-check":s==="grid"?"ri-grid-line":"ri-table-line"])},null,2)]),_:1},8,["modelValue","options","onChange"])])}const Eg=Se(uC,[["render",gC]]),_C={name:"HelpKeyMessage",components:{PrimeMessage:da},props:{helpKey:{type:Boolean,default:!1}},emits:["set-help-hey"],methods:{changeHelpKey(){this.$emit("set-help-hey",!1)}}};function hC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeMessage");return n.helpKey?(e.openBlock(),e.createBlock(l,{key:0,closable:!1,severity:"secondary",class:"text-lg font-semibold p-0",size:"large",onClick:r.changeHelpKey},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createElementVNode("p",{class:"ml-1 font-bold"},"Liste des Raccourcies Claviers",-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-left-line"})]),e.createTextVNode("Page Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-right-line"})]),e.createTextVNode("Page Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-up-line"})]),e.createTextVNode("Document Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-down-line"})]),e.createTextVNode("Document Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"+"),e.createTextVNode("Zoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"-"),e.createTextVNode("Dézoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"0"),e.createTextVNode("Zoom adapté à la hauteur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"5"),e.createTextVNode("Zoom adapté à la largeur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ECHAP"),e.createTextVNode("Fermer la prévisualisation")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ENTER"),e.createTextVNode("Ouvre le document")],-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)}const Tg=Se(_C,[["render",hC],["__scopeId","data-v-d3a64f2d"]]),yC={name:"CustomToastContent",props:{severity:{type:String,default:"info"},summary:{type:String,default:"Info"},link:{type:String,default:""},linkText:{type:String,default:"Cliquez ici"},messageBeforeLink:{type:String,default:""},messageAfterLink:{type:String,default:""},message:{type:String,default:"Voici un message sans lien."}},computed:{iconClass(){switch(this.severity){case"success":return"ri-check-line text-success";case"info":return"ri-information-line text-info";case"warn":return"ri-alert-line text-warning";case"error":return"ri-close-circle-line text-danger";default:return"ri-information-line text-info"}}}},fC={class:"flex w-full gap-1"},NC={class:"flex flex-column flex-grow-1 gap-1"},SC={class:"text-base font-bold"},EC={class:"text-base"},TC=["href"],AC={key:1};function OC(a,t,n,i,o,r){return e.openBlock(),e.createElementBlock("div",fC,[e.createElementVNode("i",{class:e.normalizeClass([r.iconClass,"mr-2 text-2xl"])},null,2),e.createElementVNode("div",NC,[e.createElementVNode("div",SC,e.toDisplayString(n.summary),1),e.createElementVNode("div",EC,[n.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.messageBeforeLink)+" ",1),e.createElementVNode("a",{href:n.link,class:"underline",target:"_blank",rel:"noopener"},e.toDisplayString(n.linkText),9,TC),e.createTextVNode(" "+e.toDisplayString(n.messageAfterLink),1)],64)):(e.openBlock(),e.createElementBlock("div",AC,e.toDisplayString(n.message),1))])])])}const Ag=Se(yC,[["render",OC]]),CC={name:"UploadStatus",components:{PrimeKnob:Bc},emits:["openFile"],data(){return{isReduced:!1}},computed:{...Fe.mapState(Da,["files","isUploading","overallMessage","activeRequests"])},methods:{...Fe.mapActions(Da,["clearCompleted","cancelUpload"]),changeReducedState(){this.isReduced=!this.isReduced},cancelFileUpload(a){this.cancelUpload(a)},getIconColor(a){switch(a){case"success":return"color: green";case"error":return"color: red";default:return""}},iconForStatus(a){switch(a){case"success":return"ri-checkbox-circle-fill text-2xl";case"error":return"ri-close-circle-fill text-2xl";default:return""}},openFile(a){this.$emit("openFile",a)}}},RC={key:0,class:"fixed bottom-0 right-0 w-full sm:w-30rem surface-0 border-round shadow-5 m-0 sm:m-3 z-5 p-3 surface-border surface-ground border-1"},IC={class:"flex justify-content-between align-items-center"},MC={key:0,class:"file-list"},vC={class:"flex flex-column pr-1"},ZC=["onClick"],DC={key:1,class:"file-name"},wC={key:2,class:"error-message text-xs"},WC={class:"status-container"},LC={key:1};function YC(a,t,n,i,o,r){const l=e.resolveComponent("Button"),s=e.resolveComponent("PrimeKnob");return a.files.length>0?(e.openBlock(),e.createElementBlock("div",RC,[e.createElementVNode("div",IC,[e.createElementVNode("strong",null,e.toDisplayString(a.overallMessage),1),e.createElementVNode("div",null,[e.createVNode(l,{icon:o.isReduced?"ri-arrow-up-line":"ri-arrow-down-line",onClick:r.changeReducedState,text:"",rounded:"",severity:"secondary","aria-label":"Réduire"},null,8,["icon","onClick"]),a.isUploading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:0,icon:"ri-close-line",onClick:a.clearCompleted,text:"",rounded:"",severity:"secondary","aria-label":"Fermer"},null,8,["onClick"]))])]),o.isReduced?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",MC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.files,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:"file-item"},[e.createElementVNode("div",vC,[c.status==="success"?(e.openBlock(),e.createElementBlock("a",{key:0,class:"file-name cursor-pointer",onClick:d=>r.openFile(c)},e.toDisplayString(c.name),9,ZC)):(e.openBlock(),e.createElementBlock("span",DC,e.toDisplayString(c.name),1)),c.status==="error"?(e.openBlock(),e.createElementBlock("p",wC,e.toDisplayString(c.message),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",WC,[c.status==="uploading"?(e.openBlock(),e.createBlock(s,{key:0,modelValue:c.percent,"onUpdate:modelValue":d=>c.percent=d,size:50,strokeWidth:5,readonly:"",valueTemplate:"{value}%",class:"upload-knob"},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),c.status==="rejected"?(e.openBlock(),e.createElementBlock("div",LC,e.toDisplayString(a.$t("canceledImport")),1)):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`${r.iconForStatus(c.status)}`),style:e.normalizeStyle(r.getIconColor(c.status))},null,6)),c.status==="uploading"&&c.percent!==100?(e.openBlock(),e.createBlock(l,{key:3,icon:"ri-close-line",text:"",rounded:"",severity:"danger",onClick:d=>r.cancelFileUpload(c.name),"aria-label":"Annuler",class:"cancel-btn"},null,8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]))])):e.createCommentVNode("",!0)}const Og=Se(CC,[["render",YC],["__scopeId","data-v-a3067d5a"]]),kC={name:"UploadTargetInfo",computed:{...Fe.mapState(Rt,["currentNode","workspace"])}},xC={class:"overlay-content"},zC={class:"text-xl font-bold"},GC={class:"mt-2 text-color-secondary"};function FC(a,t,n,i,o,r){return e.openBlock(),e.createElementBlock("div",xC,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-upload-cloud-line text-8xl"},null,-1)),e.createElementVNode("span",zC,e.toDisplayString(a.$t("dropFileFolders")),1),e.createElementVNode("div",GC,e.toDisplayString(a.currentNode?.name==="documentLibrary"?a.workspace?.title||a.workspace?.id:a.currentNode?.name||a.$t("currentFolder")),1)])}const Cg=Se(kC,[["render",FC],["__scopeId","data-v-489463cc"]]),XC={name:"FolderUpload",components:{PrimeButton:ce},data(){return{isDraggingOver:!1}},emits:["close"],methods:{...Fe.mapActions(Da,["startUpload"]),closePopup(){this.$emit("close",!1)},handleFolderSelect(a){const n=Array.from(a.target.files).map(i=>({file:i,relativePath:i.webkitRelativePath}));this.processFiles(n)},processFiles(a){const t=Rt().currentNode.id;this.startUpload(a,t),this.closePopup()},async handleDrop(a){this.isDraggingOver=!1;const t=a.dataTransfer.items,n=[],i=[],o=async r=>{if(r.isFile)return new Promise(l=>r.file(s=>{const c=r.fullPath.startsWith("/")?r.fullPath.substring(1):r.fullPath;n.push({file:s,relativePath:c}),l()}));if(r.isDirectory){const l=r.createReader();return new Promise(s=>{const c=async()=>{const d=await new Promise(u=>l.readEntries(u));if(d.length>0){for(const u of d)await o(u);await c()}s()};c()})}};for(const r of t){const l=r.webkitGetAsEntry();l&&i.push(o(l))}await Promise.all(i),n.length>0&&this.processFiles(n)},triggerFileInput(){this.$refs.fileInput.click()},handleDragOver(){this.isDraggingOver=!0},handleDragLeave(){this.isDraggingOver=!1}}},PC={class:"folder-upload-container"},VC={class:"folder-upload-buttonbar"};function UC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton");return e.openBlock(),e.createElementBlock("div",PC,[e.createElementVNode("div",VC,[e.createVNode(l,{class:"select-folder-btn",label:a.$t("selectFolder"),onClick:r.triggerFileInput},null,8,["label","onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["folder-upload-dropzone",{"is-dragging":o.isDraggingOver}]),onDragover:t[0]||(t[0]=e.withModifiers((...s)=>r.handleDragOver&&r.handleDragOver(...s),["prevent"])),onDragleave:t[1]||(t[1]=e.withModifiers((...s)=>r.handleDragLeave&&r.handleDragLeave(...s),["prevent"])),onDrop:t[2]||(t[2]=e.withModifiers(s=>r.handleDrop(s),["prevent"]))},[e.createElementVNode("p",null,e.toDisplayString(a.$t("dropFolder")),1)],34),e.createElementVNode("input",{type:"file",webkitdirectory:"",onChange:t[3]||(t[3]=s=>r.handleFolderSelect(s)),ref:"fileInput",class:"file-input-hidden"},null,544)])}const yc=Se(XC,[["render",UC],["__scopeId","data-v-042839bf"]]),jC={name:"ImportPopupWithWorker",components:{PrimeButton:ce,PrimeDialog:_t,FileUpload:un,FolderUpload:yc},props:{node:{type:Object,required:!0},importType:{type:String,default:"file"},forcedPlanName:{type:String,default:null},accept:{type:String,default:null}},emits:["close","upload-with-plan"],computed:{...Fe.mapState(Da,["isUploading"])},methods:{...Fe.mapActions(Da,["startUpload"]),closePopup(){this.$emit("close",!1)},handleUpload(a){const t=a.files;if(!t||t.length===0)return;if(this.forcedPlanName){const i=t.map(o=>new File([o],o.name,{type:o.type}));this.$emit("upload-with-plan",{files:i,planName:this.forcedPlanName}),this.closePopup();return}const n=t.map(i=>({file:new File([i],i.name,{type:i.type}),relativePath:""}));this.startUpload(n,this.node.id),this.closePopup()}}},BC={key:0},HC={key:1};function JC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("FileUpload"),c=e.resolveComponent("FolderUpload"),d=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(d,{header:a.$t("importElement"),visible:"",modal:"",onKeyup:e.withKeys(r.closePopup,["esc"]),class:"popup"},{closeicon:e.withCtx(()=>[e.createVNode(l,{icon:"ri-close-line",onClick:r.closePopup,outlined:"",text:"",severity:"secondary"},null,8,["onClick"])]),footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("close"),onClick:r.closePopup,severity:"secondary"},null,8,["label","onClick"])]),default:e.withCtx(()=>[n.importType==="file"?(e.openBlock(),e.createElementBlock("div",BC,[e.createVNode(s,{name:"upload_files",chooseLabel:a.$t("imports.selectFiles"),uploadLabel:a.$t("send"),cancelLabel:a.$t("cancel"),onUploader:r.handleUpload,customUpload:"",multiple:"",maxFileSize:2147483648,disabled:a.isUploading,accept:n.accept},{empty:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(a.$t("dragAndDrop")),1)]),_:1},8,["chooseLabel","uploadLabel","cancelLabel","onUploader","disabled","accept"])])):n.importType==="folder"?(e.openBlock(),e.createElementBlock("div",HC,[e.createVNode(c,{onClose:r.closePopup},null,8,["onClose"])])):e.createCommentVNode("",!0)]),_:1},8,["header","onKeyup"])}const Rg=Se(jC,[["render",JC]]),QC={name:"AddPairInConfigDialog",components:{PrimeDialog:_t,PrimeButton:ce,PrimeInputText:at,PrimeSelect:$t},props:{visible:{type:Boolean,default:!1},existingKeys:{type:Array,default:()=>[]}},emits:["update:visible","add-pair"],data(){return{newKey:"",newValue:"",newType:"string",availableTypes:["string","number","boolean","array","object"],errors:{key:null,value:null}}},watch:{visible(a){a&&this.resetForm()}},methods:{resetForm(){this.newKey="",this.newValue="",this.newType="string",this.errors={key:null,value:null}},submit(){this.errors={key:null,value:null};let a=!0;this.newKey.trim()?this.existingKeys.includes(this.newKey.trim())&&(this.errors.key=this.$t("config.errors.keyDuplicate"),a=!1):(this.errors.key=this.$t("config.errors.keyRequired"),a=!1);const t=Qt.validateValueByType(this.newValue,this.newType);t&&(this.errors.value=t,a=!1),a&&(this.$emit("add-pair",{key:this.newKey,value:this.newValue,type:this.newType}),this.$emit("update:visible",!1))}}},KC={class:"field"},qC={for:"newKey"},$C={key:0,class:"p-error"},eR={class:"field"},tR={for:"newType"},aR={class:"field"},nR={for:"newValue"},iR={key:0,class:"p-error"};function oR(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeSelect"),c=e.resolveComponent("PrimeButton"),d=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(d,{header:a.$t("config.dialog.addTitle"),visible:n.visible,"onUpdate:visible":t[4]||(t[4]=u=>a.$emit("update:visible",u)),modal:"",class:"dialog-add-pair"},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("config.buttons.cancel"),icon:"ri-close-line",class:"p-button-text",onClick:t[3]||(t[3]=u=>a.$emit("update:visible",!1))},null,8,["label"]),e.createVNode(c,{label:a.$t("config.buttons.add"),icon:"ri-check-line",onClick:r.submit,autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",KC,[e.createElementVNode("label",qC,e.toDisplayString(a.$t("config.dialog.keyLabel")),1),e.createVNode(l,{id:"newKey",modelValue:o.newKey,"onUpdate:modelValue":t[0]||(t[0]=u=>o.newKey=u),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.key}])},null,8,["modelValue","class"]),o.errors.key?(e.openBlock(),e.createElementBlock("small",$C,e.toDisplayString(o.errors.key),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",eR,[e.createElementVNode("label",tR,e.toDisplayString(a.$t("config.dialog.typeLabel")),1),e.createVNode(s,{id:"newType",modelValue:o.newType,"onUpdate:modelValue":t[1]||(t[1]=u=>o.newType=u),options:o.availableTypes,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",aR,[e.createElementVNode("label",nR,e.toDisplayString(a.$t("config.dialog.valueLabel")),1),e.createVNode(l,{id:"newValue",modelValue:o.newValue,"onUpdate:modelValue":t[2]||(t[2]=u=>o.newValue=u),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.value}])},null,8,["modelValue","class"]),o.errors.value?(e.openBlock(),e.createElementBlock("small",iR,e.toDisplayString(o.errors.value),1)):e.createCommentVNode("",!0)])]),_:1},8,["header","visible"])}const Ig=Se(QC,[["render",oR]]),rR={class:"array-editor"},lR={key:1,class:"object-item"},sR={key:0},cR={key:0},dR={key:1,class:"object-summary"},mR={class:"summary-item"},pR={key:0,class:"summary-item"},uR={key:1,class:"summary-item"},bR={class:"summary-item"},gR={key:1},_R={class:"action-buttons"},Ti=Se({__name:"ArrayEditor",props:{modelValue:{type:Array,required:!0},isMetadata:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const n=a,i=t,o=e.ref(JSON.parse(JSON.stringify(n.modelValue))),r=["text","datetime","boolean","double","int","date"],l=["popup","details","advancedSearch","view"],s=e.ref(null),c={id:"",title:"",labelId:"",display:[],input:"text",readOnly:!1,modelAspect:"",modelType:""};e.watch(()=>n.modelValue,T=>{o.value=JSON.parse(JSON.stringify(T))},{deep:!0});const d=T=>{const O=typeof T;return O==="string"||O==="number"||O==="boolean"},u=T=>typeof T=="object"&&T!==null,b=(T,O)=>{o.value[T]=O,i("update:modelValue",o.value)},m=(T,O,D)=>{o.value[T][O]=D,i("update:modelValue",o.value)},p=T=>{o.value.splice(T,1),i("update:modelValue",o.value)},g=()=>{if(n.isMetadata){const T={...c,order:o.value.length+1};o.value.push(T)}else if(o.value.length>0){const T=o.value[0],O=typeof T;O==="string"?o.value.push(""):O==="number"?o.value.push(0):O==="object"&&T!==null?o.value.push(JSON.parse(JSON.stringify(T))):o.value.push("")}else o.value.push("");i("update:modelValue",o.value)},_=T=>{const O=o.value[T];o.value[T]={...c,...O},s.value=T},f=()=>{s.value=null,i("update:modelValue",o.value)},h=T=>{const O=JSON.parse(JSON.stringify(o.value[T]));o.value.splice(T+1,0,O),o.value.forEach((D,I)=>{u(D)&&Object.prototype.hasOwnProperty.call(D,"order")&&(D.order=I+1)}),i("update:modelValue",o.value)},S=(T,O)=>{const D=T+O;if(D<0||D>=o.value.length)return;const I=o.value.splice(T,1)[0];o.value.splice(D,0,I),o.value.forEach((C,A)=>{u(C)&&Object.prototype.hasOwnProperty.call(C,"order")&&(C.order=A+1)}),i("update:modelValue",o.value)},y=T=>{if(!n.isMetadata)return"transparent";const O=T.modelAspect||T.modelType;if(!O)return"transparent";let D=0;for(let C=0;C<O.length;C++)D=O.charCodeAt(C)+((D<<5)-D);return`hsla(${D%360}, 50%, 50%, 0.15)`};return(T,O)=>(e.openBlock(),e.createElementBlock("div",rR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(D,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"array-item",style:e.normalizeStyle({backgroundColor:y(D)})},[d(D)?(e.openBlock(),e.createBlock(e.unref(at),{key:0,"model-value":D,"onUpdate:modelValue":C=>b(I,C),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("div",lR,[a.isMetadata?(e.openBlock(),e.createElementBlock("div",sR,[s.value===I?(e.openBlock(),e.createElementBlock("div",cR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(c),C=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(C),1),C==="input"?(e.openBlock(),e.createBlock(e.unref($t),{key:0,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),options:r,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):C==="display"?(e.openBlock(),e.createBlock(e.unref(Dn),{key:1,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),options:l,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):C==="readOnly"?(e.openBlock(),e.createBlock(e.unref(vn),{key:2,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A)},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(e.unref(at),{key:3,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"]))]))),128))])):(e.openBlock(),e.createElementBlock("div",dR,[e.createElementVNode("div",mR,[O[1]||(O[1]=e.createElementVNode("strong",null,"ID:",-1)),e.createTextVNode(" "+e.toDisplayString(D.id),1)]),D.title?(e.openBlock(),e.createElementBlock("div",pR,[O[2]||(O[2]=e.createElementVNode("strong",null,"Title:",-1)),e.createTextVNode(" "+e.toDisplayString(D.title),1)])):e.createCommentVNode("",!0),D.labelId?(e.openBlock(),e.createElementBlock("div",uR,[O[3]||(O[3]=e.createElementVNode("strong",null,"Label ID:",-1)),e.createTextVNode(" "+e.toDisplayString(D.labelId),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",bR,[O[4]||(O[4]=e.createElementVNode("strong",null,"Input:",-1)),e.createTextVNode(" "+e.toDisplayString(D.input),1)])]))])):(e.openBlock(),e.createElementBlock("div",gR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D,(C,A)=>(e.openBlock(),e.createElementBlock("div",{key:A,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(A),1),e.createVNode(e.unref(at),{"model-value":C,"onUpdate:modelValue":w=>m(I,A,w),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])]))),128))]))])),e.createElementVNode("div",_R,[a.isMetadata&&s.value!==I?(e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-pencil-line",class:"p-button-secondary p-button-sm",onClick:C=>_(I)},null,8,["onClick"])):e.createCommentVNode("",!0),a.isMetadata&&s.value===I?(e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:"ri-check-line",class:"p-button-success p-button-sm",onClick:O[0]||(O[0]=C=>f())})):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:2,icon:"ri-arrow-up-line",class:"p-button-secondary p-button-sm",onClick:C=>S(I,-1),disabled:I===0},null,8,["onClick","disabled"])):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:3,icon:"ri-arrow-down-line",class:"p-button-secondary p-button-sm",onClick:C=>S(I,1),disabled:I===o.value.length-1},null,8,["onClick","disabled"])):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:4,icon:"ri-file-copy-line",class:"p-button-secondary p-button-sm",onClick:C=>h(I)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(ce),{icon:"ri-delete-bin-line",class:"p-button-danger p-button-sm",onClick:C=>p(I)},null,8,["onClick"])])],4))),128)),e.createVNode(e.unref(ce),{label:T.$t("config.arrayEditor.addItem"),icon:"ri-add-line",class:"p-button-sm p-button-secondary mt-2",onClick:g},null,8,["label"])]))}},[["__scopeId","data-v-df66456b"]]),hR={class:"config-cards-container"},yR={class:"card-title-wrapper"},fR={class:"type-badge ml-2"},NR={class:"title-buttons"},SR={key:0,class:"description"},ER={key:1,class:"undefined-container"},TR={class:"help-text"},AR={key:2,class:"editor-container"},OR={key:3},Mg=Se({__name:"ConfigDatatable",props:{configData:{type:Array,required:!0},loading:{type:Boolean,default:!1},descriptions:{type:Object,default:()=>({})}},emits:["update:config"],setup(a,{emit:t}){const n=a,i=t,o=e.ref(n.configData.reduce((u,b)=>(b.type==="array"&&(u[b.key]=!1),u),{})),r=u=>{o.value[u]=!o.value[u]},l=(u,b)=>{const m=n.configData.map(p=>p.key===u?{...p,value:b}:p);i("update:config",m)},s=u=>{const b=n.configData.map(m=>m.key===u?{...m,isDefined:!0}:m);i("update:config",b)},c=u=>{const b=n.configData.map(m=>{if(m.key===u){const p=n.descriptions[u]?.default;return{...m,isDefined:!1,value:p}}return m});i("update:config",b)},d=e.computed(()=>[...n.configData].sort((u,b)=>u.key.localeCompare(b.key)));return(u,b)=>(e.openBlock(),e.createElementBlock("div",hR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(e.unref(oi),{key:m.key,class:"config-card"},{title:e.withCtx(()=>[e.createElementVNode("div",yR,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(m.key)+" ",1),e.createElementVNode("small",fR,e.toDisplayString(u.$t(`config.types.${m.type}`)),1)]),e.createElementVNode("div",NR,[m.type==="array"&&m.isDefined?(e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:o.value[m.key]?"ri-close-large-line":"ri-add-large-line",class:"p-button-text p-button","aria-label":o.value[m.key]?u.$t("config.buttons.collapse"):u.$t("config.buttons.expand"),onClick:p=>r(m.key)},null,8,["icon","aria-label","onClick"])):e.createCommentVNode("",!0),m.isDefined?(e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:"ri-delete-bin-line",severity:"danger","aria-label":u.$t("config.buttons.undefine"),class:"p-button-sm",onClick:p=>c(m.key)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0)])])]),content:e.withCtx(()=>[a.descriptions[m.key]?.descriptionKey?(e.openBlock(),e.createElementBlock("p",SR,e.toDisplayString(u.$t(a.descriptions[m.key].descriptionKey)),1)):e.createCommentVNode("",!0),m.isDefined?e.withDirectives((e.openBlock(),e.createElementBlock("div",AR,[m.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(vn),{key:0,"model-value":m.value,"onUpdate:modelValue":p=>l(m.key,p)},null,8,["model-value","onUpdate:modelValue"])):m.type==="array"?(e.openBlock(),e.createBlock(Ti,{key:1,"is-metadata":m.key==="METADATA","model-value":m.value,"onUpdate:modelValue":p=>l(m.key,p)},null,8,["is-metadata","model-value","onUpdate:modelValue"])):m.type==="string"||m.type==="number"?(e.openBlock(),e.createBlock(e.unref(at),{key:2,"model-value":m.value,class:"w-full","onUpdate:modelValue":p=>l(m.key,p)},null,8,["model-value","onUpdate:modelValue"])):m.type==="object"?(e.openBlock(),e.createElementBlock("pre",OR,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)],512)),[[e.vShow,m.type!=="array"||o.value[m.key]]]):(e.openBlock(),e.createElementBlock("div",ER,[e.createVNode(e.unref(ce),{label:u.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:p=>s(m.key)},null,8,["label","onClick"]),e.createElementVNode("small",TR,e.toDisplayString(u.$t("config.notDefined")),1)]))]),_:2},1024))),128))]))}},[["__scopeId","data-v-0394ea8e"]]),CR={class:"config-item-editor"},RR={class:"editor-header"},IR={class:"config-key"},MR={class:"type-badge"},vR={key:0,class:"config-description"},ZR={class:"definition-actions"},DR={key:0,class:"undefined-container"},wR={class:"help-text"},WR={key:1,class:"defined-actions"},LR={key:1,class:"editor-content"},YR={key:0,class:"editor-field"},kR={key:1,class:"editor-field"},xR={key:2,class:"editor-field"},zR={key:3,class:"editor-field editor-field-array"},GR={key:4,class:"editor-field"},FR={class:"object-display"},XR={key:2,class:"default-hint"},fc=Se({__name:"ConfigItemEditor",props:{item:{type:Object,required:!0},description:{type:Object,default:()=>({})}},emits:["update:value","define","undefine"],setup(a,{emit:t}){const n=t,i=s=>{n("update:value",s)},o=()=>{n("define")},r=()=>{n("undefine")},l=s=>typeof s=="object"?JSON.stringify(s):String(s);return(s,c)=>(e.openBlock(),e.createElementBlock("div",CR,[e.createElementVNode("div",RR,[e.createElementVNode("h3",IR,e.toDisplayString(a.item.key),1),e.createElementVNode("span",MR,e.toDisplayString(s.$t(`config.types.${a.item.type}`)),1)]),a.description?.descriptionKey?(e.openBlock(),e.createElementBlock("p",vR,e.toDisplayString(s.$t(a.description.descriptionKey)),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ZR,[a.item.isDefined?(e.openBlock(),e.createElementBlock("div",WR,[e.createVNode(e.unref(ce),{label:s.$t("config.buttons.undefine"),icon:"ri-delete-bin-line",severity:"danger",class:"p-button-outlined p-button-sm",onClick:r},null,8,["label"])])):(e.openBlock(),e.createElementBlock("div",DR,[e.createVNode(e.unref(ce),{label:s.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:o},null,8,["label"]),e.createElementVNode("small",wR,e.toDisplayString(s.$t("config.notDefined")),1)]))]),a.item.isDefined?(e.openBlock(),e.createElementBlock("div",LR,[a.item.type==="boolean"?(e.openBlock(),e.createElementBlock("div",YR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(vn),{"model-value":a.item.value,"onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="string"?(e.openBlock(),e.createElementBlock("div",kR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(at),{"model-value":a.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="number"?(e.openBlock(),e.createElementBlock("div",xR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(ka),{"model-value":a.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="array"?(e.openBlock(),e.createElementBlock("div",zR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(Ti,{"is-metadata":a.item.key==="METADATA","model-value":a.item.value,"onUpdate:modelValue":i},null,8,["is-metadata","model-value"])])):a.item.type==="object"?(e.openBlock(),e.createElementBlock("div",GR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createElementVNode("pre",FR,e.toDisplayString(JSON.stringify(a.item.value,null,2)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a.description?.default!==void 0?(e.openBlock(),e.createElementBlock("div",XR,[c[0]||(c[0]=e.createElementVNode("i",{class:"ri-information-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(s.$t("config.splitView.defaultValue"))+": ",1),e.createElementVNode("code",null,e.toDisplayString(l(a.description.default)),1)])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-2de0c6b0"]]),PR={class:"config-split-view"},VR={class:"config-list-panel"},UR={class:"filter-container"},jR={class:"filter-input-wrapper"},BR={class:"config-groups"},HR=["onClick"],JR={class:"group-label"},QR={class:"group-count"},KR={class:"group-items"},qR=["onClick"],$R={class:"item-key"},eI=["title"],tI={key:0,class:"empty-state"},aI={class:"config-editor-panel"},nI={key:0,class:"editor-wrapper"},iI={key:1,class:"empty-editor"},vg=Se({__name:"ConfigSplitView",props:{configData:{type:Array,required:!0},descriptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},emits:["update:config"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=a,o=t,r=e.ref(""),l=e.ref(null),s=e.ref({}),c={display:{id:"display",label:"config.groups.display",prefixes:["THEME","APP_ROOT","SHOW_","PRIMEVUE","BREADCRUMB","EDIT_","OPEN_"]},matomo:{id:"matomo",label:"config.groups.matomo",prefixes:["MATOMO_"]},sentry:{id:"sentry",label:"config.groups.sentry",prefixes:["SENTRY_"]},chat:{id:"chat",label:"config.groups.chat",prefixes:["CHAT_","ROCKETCHAT_"]},search:{id:"search",label:"config.groups.search",prefixes:["SEARCH_"]},pagination:{id:"pagination",label:"config.groups.pagination",prefixes:["DEFAULT_ELEMENT","ROW_PER_PAGE"]},metadata:{id:"metadata",label:"config.groups.metadata",keys:["METADATA","ASPECTS","CONSTRAINTS","ALLOWED_FILE_EXTENSIONS"]},security:{id:"security",label:"config.groups.security",keys:["NEW_PASSWORD_RULES"]},other:{id:"other",label:"config.groups.other"}},d=h=>{for(const[S,y]of Object.entries(c))if(S!=="other"){if(y.keys&&y.keys.includes(h))return S;if(y.prefixes){for(const T of y.prefixes)if(h.startsWith(T))return S}}return"other"},u=e.computed(()=>{const h=r.value.toLowerCase().trim(),S={};for(const T of Object.keys(c))S[T]=[];for(const T of i.configData){if(h){const D=T.key.toLowerCase().includes(h),I=i.descriptions[T.key]?.descriptionKey,C=I?n(I).toLowerCase().includes(h):!1;if(!D&&!C)continue}const O=d(T.key);S[O].push(T)}for(const T of Object.keys(S))S[T].sort((O,D)=>O.key.localeCompare(D.key));const y=[];for(const[T,O]of Object.entries(c))S[T].length>0&&y.push({id:T,label:O.label,items:S[T]});return y}),b=e.computed(()=>l.value?i.configData.find(h=>h.key===l.value):null),m=h=>{s.value[h]=!s.value[h]},p=h=>{l.value=h},g=h=>{if(!l.value)return;const S=i.configData.map(y=>y.key===l.value?{...y,value:h}:y);o("update:config",S)},_=()=>{if(!l.value)return;const h=i.configData.map(S=>S.key===l.value?{...S,isDefined:!0}:S);o("update:config",h)},f=()=>{if(!l.value)return;const h=i.configData.map(S=>{if(S.key===l.value){const y=i.descriptions[S.key]?.default;return{...S,isDefined:!1,value:y}}return S});o("update:config",h)};return e.watch(()=>i.configData,()=>{!l.value&&i.configData.length>0&&u.value.length>0&&u.value[0].items.length>0&&(l.value=u.value[0].items[0].key)},{immediate:!0}),(h,S)=>(e.openBlock(),e.createElementBlock("div",PR,[e.createElementVNode("div",VR,[e.createElementVNode("div",UR,[e.createElementVNode("span",jR,[S[1]||(S[1]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createVNode(e.unref(at),{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=y=>r.value=y),placeholder:h.$t("config.splitView.filterPlaceholder"),class:"filter-input"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",BR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"config-group"},[e.createElementVNode("div",{class:"group-header",onClick:T=>m(y.id)},[e.createElementVNode("i",{class:e.normalizeClass(s.value[y.id]?"ri-arrow-right-s-line":"ri-arrow-down-s-line")},null,2),e.createElementVNode("span",JR,e.toDisplayString(h.$t(y.label)),1),e.createElementVNode("span",QR,e.toDisplayString(y.items.length),1)],8,HR),e.withDirectives(e.createElementVNode("div",KR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.items,T=>(e.openBlock(),e.createElementBlock("div",{key:T.key,class:e.normalizeClass(["config-list-item",{"is-selected":l.value===T.key,"is-undefined":!T.isDefined}]),onClick:O=>p(T.key)},[e.createElementVNode("span",$R,e.toDisplayString(T.key),1),T.isDefined?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",{key:0,class:"ri-checkbox-blank-circle-line undefined-indicator",title:h.$t("config.notDefined")},null,8,eI))],10,qR))),128))],512),[[e.vShow,!s.value[y.id]]])]))),128)),u.value.length===0?(e.openBlock(),e.createElementBlock("div",tI,[S[2]||(S[2]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(h.$t("config.splitView.noResults")),1)])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",aI,[b.value?(e.openBlock(),e.createElementBlock("div",nI,[e.createVNode(fc,{item:b.value,description:a.descriptions[b.value.key],"onUpdate:value":g,onDefine:_,onUndefine:f},null,8,["item","description"])])):(e.openBlock(),e.createElementBlock("div",iI,[S[3]||(S[3]=e.createElementVNode("i",{class:"ri-settings-3-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(h.$t("config.splitView.selectConfig")),1)]))])]))}},[["__scopeId","data-v-e7924dfe"]]),oI={name:"ConfigUpload",components:{PrimeFileUpload:un},props:{loading:{type:Boolean,default:!1}},emits:["upload-config"],methods:{handleFileUpload(a){const t=a.files[0];if(!t)return;const n=new FileReader;n.onload=i=>{try{const o=JSON.parse(i.target.result);this.$emit("upload-config",o)}catch{this.$toast.add({severity:"error",summary:"Fichier Invalide",detail:this.$t("config.errors.invalidJsonFile"),life:4e3})}},n.onerror=i=>{console.error("handle file upload error",i)},n.readAsText(t)}}},rI={class:"config-upload"},lI={class:"config-upload-description"},sI={class:"config-upload-warning"};function cI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeFileUpload");return e.openBlock(),e.createElementBlock("div",rI,[e.createElementVNode("p",lI,e.toDisplayString(a.$t("config.raw.uploadDescription")),1),e.createVNode(l,{mode:"basic",name:"configfile[]",accept:".json",maxFileSize:1e6,customUpload:"",onUploader:r.handleFileUpload,chooseLabel:a.$t("config.raw.uploadButton"),auto:"",loading:n.loading,severity:"danger",class:"config-upload-button"},null,8,["onUploader","chooseLabel","loading"]),e.createElementVNode("small",sI,e.toDisplayString(a.$t("config.raw.uploadWarning")),1)])}const Zg=Se(oI,[["render",cI],["__scopeId","data-v-cda1f133"]]),dI={name:"ListVersionConfig",components:{PrimeButton:ce,PrimeCard:oi,PrimeTextarea:va,PrimeProgressSpinner:ea},props:{currentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:["reload"],data(){return{selectedVersion:null,selectedVersionContent:"",isContentLoading:!1}},methods:{async selectVersion(a){if(!(this.selectedVersion&&this.selectedVersion.id===a.id)){this.selectedVersion=a,this.isContentLoading=!0,this.selectedVersionContent="";try{const n=await(await this.getContent(this.currentNode.id,a.id)).text(),i=JSON.parse(n);this.selectedVersionContent=JSON.stringify(i,null,2)}catch{this.selectedVersionContent=this.$t("config.versionViewer.loadError")}finally{this.isContentLoading=!1}}},download(a){this.getContent(this.currentNode.id,a.id,!1).then(t=>{const i=this.currentNode.name.split("."),o=i.pop(),r=i.join("."),l=document.createElement("a"),s=a.id.replace(".","-");l.href=URL.createObjectURL(t),l.download=`${r}_v${s}.${o}`,l.click()})},revert(a){if(!this.versions||this.versions.length===0){console.error("Le tableau des versions est vide.");return}if(this.versions[0].entry.id===a.id){this.$toast.add({severity:"warn",summary:this.$t("error"),detail:this.$t("config.versionViewer.cannotRevertLatest"),life:3e3});return}const n=this.$t("config.versionViewer.restoredVersionComment",{versionNumber:a.id});Re.revertVersion(this.currentNode.id,a.id,n).then(()=>{this.$emit("reload"),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("config.versionViewer.success"),life:3e3})}).catch(i=>{console.error(i),this.$toast.add({severity:"error",summary:this.$t("error"),detail:i.message||this.$t("config.versionViewer.error"),life:3e3})})},getContent(a,t){return Re.getVersionContent(a,t).catch(n=>(this.$toast.add({severity:"error",summary:this.$t("error"),detail:n.message||this.$t("config.versionViewer.genericError"),life:3e3}),Promise.reject(n)))},toLocaleDateString(a){if(!a)return"";let t=new Date(a);return new Intl.DateTimeFormat("fr-FR",{dateStyle:"medium"}).format(t)},toLocaleTimeString(a){return a?new Date(a).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",hour12:!1}):""}}},mI={key:0,class:"version-section-title"},pI={class:"version-layout"},uI={class:"version-list-column"},bI={class:"version-list-container"},gI=["onClick"],_I={class:"version-bubble"},hI={class:"version-bubble-text"},yI={class:"version-info"},fI={class:"version-author"},NI={key:0},SI={class:"version-actions"},EI={class:"version-content-column"},TI={key:0,class:"version-loading"},AI={key:1},OI={key:2,class:"version-empty"};function CI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("PrimeTextarea"),d=e.resolveComponent("PrimeCard"),u=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",null,[n.title?(e.openBlock(),e.createElementBlock("span",mI,e.toDisplayString(n.title.toUpperCase()),1)):e.createCommentVNode("",!0),e.createElementVNode("div",pI,[e.createElementVNode("div",uI,[e.createElementVNode("ul",bI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.versions,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["version-row",{"active-version":o.selectedVersion&&o.selectedVersion.id===b.entry.id}]),onClick:m=>r.selectVersion(b.entry)},[e.createElementVNode("div",_I,[e.createElementVNode("span",hI,e.toDisplayString(b.entry.id),1)]),e.createElementVNode("span",yI,[e.createTextVNode(e.toDisplayString(r.toLocaleDateString(b.entry.modifiedAt))+" "+e.toDisplayString(a.$t("at"))+" "+e.toDisplayString(r.toLocaleTimeString(b.entry.modifiedAt))+" ",1),e.createElementVNode("span",fI,[e.createTextVNode(e.toDisplayString(a.$t("by"))+" "+e.toDisplayString(b.entry.modifiedByUser.displayName)+" ",1),t[0]||(t[0]=e.createElementVNode("br",null,null,-1)),b.entry.versionComment?(e.openBlock(),e.createElementBlock("em",NI,e.toDisplayString(b.entry.versionComment),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",SI,[e.withDirectives(e.createVNode(l,{type:"button",icon:"ri-download-line",onClick:e.withModifiers(m=>r.download(b.entry),["stop"]),severity:"secondary",rounded:"",text:""},null,8,["onClick"]),[[u,a.$t("download"),void 0,{left:!0}]]),e.withDirectives(e.createVNode(l,{type:"button",icon:"ri-history-line",onClick:m=>r.revert(b.entry),severity:"secondary",rounded:"",text:""},null,8,["onClick"]),[[u,a.$t("restore"),void 0,{left:!0}]])])],10,gI))),128))])]),e.createElementVNode("div",EI,[e.createVNode(d,{class:"version-card"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("config.versionViewer.title")),1)]),content:e.withCtx(()=>[o.isContentLoading?(e.openBlock(),e.createElementBlock("div",TI,[e.createVNode(s)])):o.selectedVersionContent?(e.openBlock(),e.createElementBlock("div",AI,[e.createVNode(c,{"model-value":o.selectedVersionContent,readonly:"",class:"version-textarea"},null,8,["model-value"])])):(e.openBlock(),e.createElementBlock("div",OI,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-arrow-left-s-line ri-2x"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("config.versionViewer.selectPrompt")),1)]))]),_:1})])])])}const Dg=Se(dI,[["render",CI],["__scopeId","data-v-a4a3b0f2"]]),Ai={id:null,property:null,negation:!1,operator:null,value:null,value_end:null},RI={name:"AddCriterionPopup",components:{PrimeDialog:_t,PrimeSelect:$t,PrimeSelectButton:Ka,PrimeInputText:at,PrimeDatePicker:ei,PrimeInputNumber:ka,PrimeButton:ce,PrimeDataTable:Ia,PrimeColumn:Ma},props:{visible:Boolean,properties:{type:Array,required:!0},editCriterion:{type:Object,default:null}},emits:["update:visible","add-criterion","update-criterion"],watch:{visible(a){if(a&&this.editCriterion){const t=JSON.parse(JSON.stringify(this.editCriterion));if(t.property&&(t.property.input==="date"||t.property.input==="datetime")&&(t.value&&(t.value=new Date(t.value)),t.value_end&&(t.value_end=new Date(t.value_end))),t.property&&t.property.id){const n=this.properties.find(i=>i.id===t.property.id);n&&(t.property=n)}this.criterion=t}else a&&(this.criterion={...Ai})}},data(){return{criterion:{...Ai},operatorOptions:{text:[{labelKey:"rechercheAvancee.exact",value:"exact"},{labelKey:"rechercheAvancee.contains",value:"contains"}],date:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],datetime:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],number:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],int:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],double:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],boolean:[{labelKey:"rechercheAvancee.is",value:"exact"}]}}},computed:{negationOptions(){return[{label:`${this.$t("rechercheAvancee.mustContain")} (+)`,value:!1},{label:`${this.$t("rechercheAvancee.mustNotContain")} (-)`,value:!0}]},booleanOptions(){return[{label:this.$t("true"),value:!0},{label:this.$t("false"),value:!1}]},isCriterionValid(){return this.criterion.property&&this.criterion.operator&&this.criterion.value!==null&&this.criterion.value!==""},propertyType(){return this.criterion.property?this.criterion.property.input:"text"}},methods:{getOperatorsForCriterion(){const a=this.propertyType;return this.operatorOptions[a]||[]},onPropertyChange(){this.criterion.operator=null,this.criterion.value=null,this.criterion.value_end=null},addCriterion(){const a=this.getOperatorsForCriterion().find(t=>t.value===this.criterion.operator);this.$emit("add-criterion",{...this.criterion,id:Date.now(),operatorLabelKey:a?a.labelKey:this.criterion.operator}),this.criterion={...Ai},this.$emit("update:visible",!1)},updateCriterion(){const a=this.getOperatorsForCriterion().find(t=>t.value===this.criterion.operator);this.$emit("update-criterion",{...this.criterion,operatorLabelKey:a?a.labelKey:this.criterion.operator}),this.criterion={...Ai},this.$emit("update:visible",!1)}}},II={class:"flex flex-column gap-3"},MI={class:"flex flex-column gap-1"},vI={class:"font-semibold"},ZI={key:0,class:"font-semibold"},DI={key:1,class:"font-semibold"},wI={class:"text-sm"},WI={class:"flex gap-3"},LI={class:"flex flex-column gap-1 flex-1"},YI={class:"font-semibold"},kI={class:"flex flex-column gap-1 flex-1"},xI={class:"font-semibold"},zI={class:"flex flex-column gap-1"},GI={class:"font-semibold"},FI={class:"flex gap-2 align-items-center"};function XI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeColumn"),s=e.resolveComponent("PrimeDataTable"),c=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeSelect"),u=e.resolveComponent("PrimeInputText"),b=e.resolveComponent("PrimeDatePicker"),m=e.resolveComponent("PrimeInputNumber"),p=e.resolveComponent("PrimeButton"),g=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(g,{visible:n.visible,"onUpdate:visible":t[10]||(t[10]=_=>a.$emit("update:visible",_)),modal:"",header:n.editCriterion?a.$t("rechercheAvancee.editCriterionPopupTitle"):a.$t("rechercheAvancee.addCriterionPopupTitle"),style:{width:"600px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(p,{label:a.$t("rechercheAvancee.cancelButton"),icon:"ri-close-line",onClick:t[9]||(t[9]=_=>a.$emit("update:visible",!1)),text:""},null,8,["label"]),n.editCriterion?(e.openBlock(),e.createBlock(p,{key:0,label:a.$t("rechercheAvancee.updateButton"),icon:"ri-check-line",onClick:r.updateCriterion,disabled:!r.isCriterionValid},null,8,["label","onClick","disabled"])):(e.openBlock(),e.createBlock(p,{key:1,label:a.$t("rechercheAvancee.addButton"),icon:"ri-add-line",onClick:r.addCriterion,disabled:!r.isCriterionValid},null,8,["label","onClick","disabled"]))]),default:e.withCtx(()=>[e.createElementVNode("div",II,[e.createElementVNode("div",MI,[e.createElementVNode("label",vI,e.toDisplayString(a.$t("rechercheAvancee.propertyLabel")),1),e.createVNode(s,{selection:o.criterion.property,"onUpdate:selection":t[0]||(t[0]=_=>o.criterion.property=_),value:n.properties,"selection-mode":"single",dataKey:"id",paginator:n.properties.length>8,rows:8,size:"small",onRowSelect:r.onPropertyChange,scrollable:"",scrollHeight:"300px"},{default:e.withCtx(()=>[e.createVNode(l,{field:"name",header:a.$t("rechercheAvancee.propertyName"),sortable:""},{body:e.withCtx(_=>[_.data.labelId?(e.openBlock(),e.createElementBlock("span",ZI,e.toDisplayString(a.$t(_.data.labelId)),1)):(e.openBlock(),e.createElementBlock("span",DI,e.toDisplayString(_.data.title),1))]),_:1},8,["header"]),e.createVNode(l,{field:"id",header:a.$t("rechercheAvancee.propertyId"),sortable:""},{body:e.withCtx(_=>[e.createElementVNode("code",wI,e.toDisplayString(_.data.id),1)]),_:1},8,["header"])]),_:1},8,["selection","value","paginator","onRowSelect"])]),e.createElementVNode("div",WI,[e.createElementVNode("div",LI,[e.createElementVNode("label",YI,e.toDisplayString(a.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(c,{modelValue:o.criterion.negation,"onUpdate:modelValue":t[1]||(t[1]=_=>o.criterion.negation=_),options:r.negationOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])]),e.createElementVNode("div",kI,[e.createElementVNode("label",xI,e.toDisplayString(a.$t("rechercheAvancee.operatorLabel")),1),e.createVNode(d,{modelValue:o.criterion.operator,"onUpdate:modelValue":t[2]||(t[2]=_=>o.criterion.operator=_),options:r.getOperatorsForCriterion(),optionLabel:_=>a.$t(_.labelKey),optionValue:"value",placeholder:a.$t("rechercheAvancee.operatorPlaceholder"),disabled:!o.criterion.property},null,8,["modelValue","options","optionLabel","placeholder","disabled"])])]),e.createElementVNode("div",zI,[e.createElementVNode("label",GI,e.toDisplayString(a.$t("rechercheAvancee.valueLabel")),1),e.createElementVNode("div",FI,[r.propertyType==="text"?(e.openBlock(),e.createBlock(u,{key:0,modelValue:o.criterion.value,"onUpdate:modelValue":t[3]||(t[3]=_=>o.criterion.value=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),r.propertyType==="boolean"?(e.openBlock(),e.createBlock(c,{key:1,modelValue:o.criterion.value,"onUpdate:modelValue":t[4]||(t[4]=_=>o.criterion.value=_),options:r.booleanOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),r.propertyType==="date"||r.propertyType==="datetime"?(e.openBlock(),e.createBlock(b,{key:2,modelValue:o.criterion.value,"onUpdate:modelValue":t[5]||(t[5]=_=>o.criterion.value=_),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),(r.propertyType==="date"||r.propertyType==="datetime")&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(b,{key:3,modelValue:o.criterion.value_end,"onUpdate:modelValue":t[6]||(t[6]=_=>o.criterion.value_end=_),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(r.propertyType)?(e.openBlock(),e.createBlock(m,{key:4,modelValue:o.criterion.value,"onUpdate:modelValue":t[7]||(t[7]=_=>o.criterion.value=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(r.propertyType)&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(m,{key:5,modelValue:o.criterion.value_end,"onUpdate:modelValue":t[8]||(t[8]=_=>o.criterion.value_end=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0)])])])]),_:1},8,["visible","header"])}const Oi=Se(RI,[["render",XI]]);class PI{getConfig(t,n){const i=`fr/jeci/pristy/config/${t}/${n}`;return _n.executeWebScript("GET",i)}updateConfig(t,n,i){const o=`fr/jeci/pristy/config/${t}/${n}`;return _n.executeWebScript("PUT",o,null,null,null,i)}validateValueByType(t,n){if(n==="number"&&(isNaN(parseFloat(t))||!isFinite(t)))return this.$t("config.errors.invalidNumber");if(n==="boolean"){const i=String(t).toLowerCase();if(i!=="true"&&i!=="false")return this.$t("config.errors.invalidBoolean")}if(n==="array"||n==="object")try{const i=JSON.parse(t),o=Array.isArray(i)?"array":typeof i;if(n==="array"&&o!=="array"||n==="object"&&o!=="object")return this.$t("config.errors.typeMismatch",{type:n})}catch{return null}return null}}const Qt=new PI;class VI{getView(t){const n=je();return Qt.getConfig(n.INSTANCE_NAME,t).then(i=>i.jsonContent)}saveView(t,n){const i=je();return Qt.updateConfig(i.INSTANCE_NAME,t,n)}deleteView(t){const n=je();return Qt.updateConfig(n.INSTANCE_NAME,t,null)}async listViews(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"vue-*.json"`},include:["properties"]};return(await Wt.search(n)).list.entries.map(o=>o.entry.name)}async listViewEntries(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"vue-*.json"`},include:["properties","allowableOperations"]};return(await Wt.search(n)).list.entries.map(o=>o.entry)}}const na=new VI,Yt=Ft.global.t,En="env-config.json",Nc="savedViews.json",wg={include:["aspectNames","isFavorite","properties","allowableOperations","permissions","path","isLocked"],maxItems:500,skipCount:0};class UI{async _getHiddenFolder(t,n=!1){const o=(await Re.getHomeFolderFromUser(t)).list.entries[0].entry.properties["cm:homeFolder"];if(!o)throw new Error(Yt("vuesUtilisateurs.noUserHomeFound"));let l=(await Re.getChildrenWithOpts(o,wg,!1)).children.find(s=>s.aspectNames&&s.aspectNames.includes("pm:hidden"));return!l&&n&&(console.warn("No hidden folder found, creating one..."),l=(await this.createConfigFolder(o)).entry),l}async _getOrCreateViewsFile(t,n=!1){let o=(await Re.getChildrenWithOpts(t,wg,!0)).children.find(r=>r.name===Nc);if(!o&&n){console.warn(`No ${Nc} file found, creating one...`);const r={name:Nc,nodeType:"cm:content"},l={personalSavedView:[],globalFavoriteView:[]},s=new Blob([JSON.stringify(l,null,2)],{type:"application/json"}),d=(await It.uploadFile(t,r,s)).entry;o=(await Re.updateNode(d.id,{aspectNames:[...d.aspectNames||[],"pm:hidden"]})).entry}return o}async getContent(t,n,i){try{return await Re.getVersionContent(t,n,i)}catch(o){throw console.error("Error getting content:",o.message),o}}async _parseFileContent(t){let n;try{const i=await this.getContent(t.id,t.properties["cm:versionLabel"],!0);n=await(r=>new Promise((l,s)=>{if(!(r instanceof Blob)){l(r);return}const c=new FileReader;c.onload=()=>l(c.result),c.onerror=d=>s(d),c.readAsText(r,"utf-8")}))(i)}catch(i){console.warn(`Could not get content for node ${t.id}, assuming empty.`,i.message),n=""}if(!n||n.trim()==="")return{personalSavedView:[],globalFavoriteView:[]};try{return JSON.parse(n)}catch(i){return console.error("Error parsing JSON content:",i),{personalSavedView:[],globalFavoriteView:[]}}}_normalizeFileContent(t){return Array.isArray(t)?{personalSavedView:t,globalFavoriteView:[]}:{personalSavedView:t?.personalSavedView||[],globalFavoriteView:t?.globalFavoriteView||[]}}async _loadViewsFileContent(){const t=yt().person;if(!t)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const n=await this._getHiddenFolder(t.id,!1);if(!n)return null;const i=await this._getOrCreateViewsFile(n.id,!1);return i?this._parseFileContent(i):null}async getPersonalViews(){try{const t=await this._loadViewsFileContent();return t?t?.personalSavedView||[]:[]}catch(t){return console.error("Error loading personal views:",t.message),[]}}async getPersonalViewsAndGlobalFavorites(){try{const t=await this._loadViewsFileContent();return t?this._normalizeFileContent(t):{personalSavedView:[],globalFavoriteView:[]}}catch(t){return console.error("Error loading personal views:",t.message),{personalSavedView:[],globalFavoriteView:[]}}}async getGlobalViews(){try{const t=await na.listViews();return t.length===0?je().SAVED_VIEWS_GLOBAL||[]:(await Promise.all(t.map(i=>na.getView(i).then(o=>({id:o.id||i.replace(/^vue-/,"").replace(/\.json$/,""),name:o.name||i,description:o.description||"",scope:"global",filename:i,config:o.config||{locations:[],criteria:[]}})).catch(()=>null)))).filter(i=>i!==null)}catch(t){return console.error("Error loading global views from config:",t),je().SAVED_VIEWS_GLOBAL||[]}}async createConfigFolder(t){const n={aspectNames:["pm:hidden"],nodeType:"cm:folder",name:"Configuration"};try{return await Re.createNode(t,n)}catch(i){throw console.error("Error while creating the Configuration folder :",i),i}}async _savePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;if(s.some(u=>u.id===t.id))throw new Error(Yt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:t.id}));if(s.some(u=>u.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));s.push(t),l.personalSavedView=s;const c=JSON.stringify(l,null,2),d=new Blob([c],{type:"application/json"});await Re.updateContentNode(o.id,d,"MAJEURE",null)}async saveView(t){if(t.scope==="global")try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(o=>o.id===t.id))throw new Error(Yt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:t.id}));if(i.some(o=>o.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));i.push(t),n.jsonContent.SAVED_VIEWS_GLOBAL=i,await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent)}catch(n){throw console.error("Error while saving the global view :",n),n}else t.scope==="user"&&await this._savePersonalView(t)}async _updatePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFoundForUpdate"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;if(s.some(b=>b.id!==t.id&&b.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));const c=s.findIndex(b=>b.id===t.id);if(c===-1)throw new Error(Yt("vuesUtilisateurs.savedViewError.personnalNotFound",{id:t.id}));s[c]=t,l.personalSavedView=s;const d=JSON.stringify(l,null,2),u=new Blob([d],{type:"application/json"});return await Re.updateContentNode(o.id,u,"MAJEURE",null)}async updateView(t){if(t.scope==="global")try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(r=>r.id!==t.id&&r.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));const o=i.findIndex(r=>r.id===t.id);if(o===-1)throw new Error(Yt("vuesUtilisateurs.savedViewError.globalNotFound",{id:t.id}));return i[o]=t,n.jsonContent.SAVED_VIEWS_GLOBAL=i,await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent),t}catch(n){throw console.error("Error while updating the global view :",n),n}else if(t.scope==="user")return await this._updatePersonalView(t)}async _deletePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFoundForDelete"));const i=await this._getHiddenFolder(n.id,!1);if(!i)throw new Error(Yt("vuesUtilisateurs.configFolderNotFound"));const o=await this._getOrCreateViewsFile(i.id,!1);if(!o)throw new Error(Yt("vuesUtilisateurs.configFileNotFound"));let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;l.personalSavedView=s.filter(u=>u.id!==t.id);const c=JSON.stringify(l,null,2),d=new Blob([c],{type:"application/json"});await Re.updateContentNode(o.id,d,"MAJEURE",null)}async deleteView(t){if(t.scope==="global"){try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];n.jsonContent.SAVED_VIEWS_GLOBAL=i.filter(o=>o.id!==t.id),await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent)}catch(n){throw console.error("Error while deleting the global view :",n),n}return}else t.scope==="user"&&await this._deletePersonalView(t)}async getViewById(t,n){return t==="user"?(await this.getPersonalViews()).find(o=>o.id===n)||null:t==="global"?(await this.getGlobalViews()).find(o=>o.id===n)||null:(console.error(`Unknown view scope: ${t}`),null)}async toggleFavoriteStatus(t){if(t.scope==="global"){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.globalFavoriteView,c=s.findIndex(b=>b.id===t.id);c>-1?(s.splice(c,1),t.isFavorite=!1):(s.push({id:t.id,name:t.name}),t.isFavorite=!0),l.globalFavoriteView=s;const d=JSON.stringify(l,null,2),u=new Blob([d],{type:"application/json"});return await Re.updateContentNode(o.id,u,"MAJEURE",null),t}else return t.isFavorite=!t.isFavorite,await this.updateView(t)}}const Ca=new UI,ba=Fe.defineStore("userView",{state:()=>({locations:[],criteriaGroups:{rootOperator:"OR",groups:[]},loadedView:null,favoriteViews:[],personalViews:[],globalViews:[],viewsLoading:!0}),getters:{isSavedViewLoaded(a){return a.loadedView!==null},location(a){return a.locations.length>0?a.locations[0]:{type:null,value:""}},allCriteria(a){return a.criteriaGroups.groups.flatMap(t=>t.criteria)},criteria(a){return a.criteriaGroups.groups.flatMap(t=>t.criteria)}},actions:{loadView(a){if(!a||!a.config){console.error("Invalid saved view object provided to loadView",a);return}if(a.config.locations&&Array.isArray(a.config.locations))this.locations=a.config.locations;else if(a.config.location){const t=a.config.location;t.type&&t.value?this.locations=[{id:Date.now(),type:t.type,value:t.value,negation:t.negation||!1,label:t.label||t.value}]:this.locations=[]}else this.locations=[];if(a.config.criteriaGroups){const t=a.config.criteriaGroups;this.criteriaGroups={rootOperator:"OR",groups:(t.groups||[]).map(n=>({...n,operator:"AND"}))}}else a.config.criteria&&a.config.criteria.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:"migrated",operator:"AND",criteria:a.config.criteria}]}:this.criteriaGroups={rootOperator:"OR",groups:[]};this.loadedView=a},addLocation(a){this.locations.push({...a,id:a.id||Date.now()})},removeLocation(a){this.locations.splice(a,1)},setLocation(a){a&&a.type&&a.value?this.locations=[{id:Date.now(),type:a.type,value:a.value,negation:a.negation||!1,label:a.label||a.value}]:this.locations=[]},setCriteria(a){a&&a.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:String(Date.now()),operator:"AND",criteria:a}]}:this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},addGroup(a="AND"){this.criteriaGroups.groups.push({id:String(Date.now()),operator:a,criteria:[]})},removeGroup(a){this.criteriaGroups.groups.splice(a,1)},addCriterionToGroup(a,t){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.push(t)},removeCriterionFromGroup(a,t){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.splice(t,1)},updateCriterionInGroup(a,t,n){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.splice(t,1,n)},addCriterion(a){this.criteriaGroups.groups.length===0&&this.addGroup("AND"),this.criteriaGroups.groups[0].criteria.push(a)},removeCriterion(a){let t=a;for(const n of this.criteriaGroups.groups){if(t<n.criteria.length){n.criteria.splice(t,1);return}t-=n.criteria.length}},resetUserView(){this.locations=[],this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},async saveCurrentView(a){try{await Ca.saveView(a),this.loadView(a)}catch(t){throw console.error("Error saving the current view:",t),t}},async updateCurrentView(a){try{const t=await Ca.updateView(a);this.loadView(t.entry||t)}catch(t){throw console.error("Error updating the current view:",t),t}},async deleteCurrentView(){if(!this.loadedView)throw new Error("No view loaded to delete.");try{await Ca.deleteView(this.loadedView),this.resetUserView()}catch(a){throw console.error("Error deleting the current view:",a),a}},async toggleViewFavorite(a){if(!a||!a.id)throw new Error("Invalid view provided to toggleFavorite action.");try{await Ca.toggleFavoriteStatus(a),await this.fetchFavoriteViews()}catch(t){throw console.error("Error toggling favorite status in store:",t),t}},async fetchFavoriteViews(){this.viewsLoading=!0;try{const[a,t,n]=await Promise.all([Ca.getPersonalViews(),Ca.getGlobalViews(),Ca.getPersonalViewsAndGlobalFavorites()]),i=n?.globalFavoriteView||[],o=(a||[]).filter(s=>s.isFavorite),r=(t||[]).filter(s=>i.some(c=>c.id===s.id));this.personalViews=a,this.globalViews=t;const l=s=>({label:s.name,to:`/vues/${s.scope}/${s.id}`});this.favoriteViews=[...o.map(l),...r.map(l)]}catch(a){console.error("Error fetching favorite views:",a),this.favoriteViews=[]}finally{this.viewsLoading=!1}},async fetchSavedViews(){this.viewsLoading=!0;try{const a=await Promise.allSettled([Ca.getPersonalViews(),Ca.getGlobalViews()]);a[0].status==="fulfilled"&&(this.personalViews=a[0].value),a[1].status==="fulfilled"&&(this.globalViews=a[1].value)}catch(a){console.error("Error fetching views:",a)}finally{this.viewsLoading=!1}}}}),Ci=Fe.defineStore({id:"SearchStore",state:()=>({language:"afts",userQuery:"",aftsQuery:"",fullQuery:"",paging:{maxItems:"15",skipCount:"0"},include:["properties","allowableOperations","permissions","path"],sort:null,defaultSort:[{type:"FIELD",field:"score",ascending:!1}],spellcheck:null,filterQueries:[],facetQueries:[],facets:[],fields:[],context:null,entries:[],pagination:{},isExactSearchActivated:!1}),getters:{facetFields(a){return{facetFields:a.facets}}},actions:{setIsExactSearchActivated(a){this.isExactSearchActivated=a},reset(){const a=je();this.language="afts",this.userQuery="",this.fullQuery="",this.filterQueries=[...a.SEARCH_BASE_FILTER_QUERIES],this.facetQueries=[...a.SEARCH_FACET_QUERIES],this.facets=[...a.SEARCH_FACET],this.fields=[],this.context=null,this.entries=[],this.pagination={}},defineUserQuery(a){const t=je();let n=null;this.isExactSearchActivated?n=t.SEARCH_USER_QUERY.replaceAll("*","").replaceAll("%s",a):n=t.SEARCH_USER_QUERY.replaceAll("%s",a),this.language="afts",this.userQuery=a;let i=this.fields.map(o=>`(${o.query})`);this.fullQuery=[n,...i].join(" AND ")},queryStore(a,t,n=null){if(!a)return Promise.resolve();const i=parseInt(this.paging.maxItems)||15;this.paging.skipCount=t?t*i:0,n?(this.fullQuery=n,this.userQuery=a):this.defineUserQuery(a);const o=n?[]:[...this.filterQueries];o.some(l=>l.query==="-ASPECT:'pm:hidden'")||o.push({query:"-ASPECT:'pm:hidden'"});let r={query:{language:this.language,query:this.fullQuery},include:this.include,paging:this.paging,filterQueries:o.map(l=>({query:l.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(l=>({field:l.field,mincount:l.mincount,label:l.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Wt.search(r).then(l=>{this.context=l.list.context,t>0?this.entries=[...this.entries,...l.list.entries]:this.entries=l.list.entries,this.pagination=l.list.pagination})},searchForExport(a){let t={...this.paging};t.maxItems=a;const n=[...this.filterQueries];n.some(o=>o.query==="-ASPECT:'pm:hidden'")||n.push({query:"-ASPECT:'pm:hidden'"});let i={query:{language:this.language,query:this.fullQuery},include:this.include,paging:t,filterQueries:n.map(o=>({query:o.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(o=>({field:o.field,mincount:o.mincount,label:o.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Wt.search(i).then(o=>o)},addSortField(a){this.sort=a},removeSortField(){this.sort=null},addFilterQuery(a){return a.query?this.filterQueries.find(t=>t.query===a.query)?!1:(this.filterQueries.push({query:a.query,label:a.label}),!0):!1},removeFilterQuery(a){this.filterQueries=this.filterQueries.filter(t=>a.query.startsWith("(SITE:")&&t.label&&(t.label.startsWith("Dossier :")||t.label.startsWith("Folder :"))?!1:t.query!==a.query)},addField(a){return this.fields.find(t=>t.query===a.query)?!1:(this.fields.push({query:a.query,label:a.label}),!0)},removeField(a){this.fields=this.fields.filter(t=>t.query!==a.query)}}}),jI={name:"ExactSearch",components:{PrimeToggleButton:C_},props:{disabled:{type:Boolean,default:!1}},watch:{disabled(a){a&&this.exactSearch&&(this.exactSearch=!1)}},emits:["change-exact-search-settings"],computed:{...Fe.mapState(Ci,["isExactSearchActivated"]),exactSearch:{get(){return this.isExactSearchActivated},set(a){this.setIsExactSearchActivated(a),this.$emit("change-exact-search-settings",a)}}},methods:{...Fe.mapActions(Ci,["setIsExactSearchActivated"])}},BI={id:"exactSearch",class:"flex gap-3 p-3 rounded-2xl"},HI={class:"text-gray-700 font-medium align-content-center"};function JI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeToggleButton");return e.openBlock(),e.createElementBlock("div",BI,[e.createElementVNode("span",HI,e.toDisplayString(a.$t("exactSearch")),1),e.createVNode(l,{modelValue:r.exactSearch,"onUpdate:modelValue":t[0]||(t[0]=s=>r.exactSearch=s),binary:"",onLabel:a.$t("enabled"),offLabel:a.$t("disabled"),class:"rounded-xl",disabled:n.disabled},null,8,["modelValue","onLabel","offLabel","disabled"])])}const Sc=Se(jI,[["render",JI]]),QI={name:"UserViewsFavoritesPanel",components:{PrimeSelect:$t},props:{globalOnly:{type:Boolean,default:!1}},data(){return{selectedPersonalSearch:null,selectedGlobalSearch:null}},mounted(){this.fetchSavedViews()},computed:{...Fe.mapState(ba,{loadedView:"loadedView",personalViews:"personalViews",globalViews:"globalViews",loading:"viewsLoading"}),hasGroupedSearches(){return this.globalOnly?this.globalViews.length>0:this.personalViews.length>0||this.globalViews.length>0}},emits:["load-view"],methods:{...Fe.mapActions(ba,["fetchSavedViews"]),onDropdownChange(a){a.value&&(this.selectView(a.value),this.$nextTick(()=>{this.selectedPersonalSearch=null,this.selectedGlobalSearch=null}))},selectView(a){this.$emit("load-view",a)}}},KI={key:0,class:"text-center p-3"},qI={key:1,class:"text-center text-gray-500 p-3"},$I={key:2},eM={class:"flex flex-column gap-4"},tM={key:0,class:"flex flex-column gap-2"},aM={for:"personal-searches-dropdown"},nM={class:"flex flex-column align-items-start w-30rem overflow-hidden"},iM={class:"font-bold"},oM={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"},rM={key:1,class:"flex flex-column gap-2"},lM={for:"global-searches-dropdown"},sM={class:"flex flex-column align-items-start w-30rem overflow-hidden"},cM={class:"font-bold"},dM={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"};function mM(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelect"),s=e.resolveDirective("tooltip");return a.loading?(e.openBlock(),e.createElementBlock("div",KI,[...t[2]||(t[2]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin text-4xl"},null,-1)])])):r.hasGroupedSearches?(e.openBlock(),e.createElementBlock("div",$I,[e.createElementVNode("div",eM,[!n.globalOnly&&a.personalViews.length>0?(e.openBlock(),e.createElementBlock("div",tM,[e.createElementVNode("label",aM,e.toDisplayString(a.$t("vuesFavorites.personalViews")),1),e.createVNode(l,{id:"personal-searches-dropdown",modelValue:o.selectedPersonalSearch,"onUpdate:modelValue":t[0]||(t[0]=c=>o.selectedPersonalSearch=c),options:a.personalViews,optionLabel:"name",placeholder:a.$t("vuesFavorites.selectPersonalView"),onChange:r.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:a.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",nM,[e.createElementVNode("div",iM,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",oM,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[s,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0),a.globalViews.length>0?(e.openBlock(),e.createElementBlock("div",rM,[e.createElementVNode("label",lM,e.toDisplayString(a.$t("vuesFavorites.globalViews")),1),e.createVNode(l,{id:"global-searches-dropdown",modelValue:o.selectedGlobalSearch,"onUpdate:modelValue":t[1]||(t[1]=c=>o.selectedGlobalSearch=c),options:a.globalViews,optionLabel:"name",placeholder:a.$t("vuesFavorites.selectGlobalView"),onChange:r.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:a.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",sM,[e.createElementVNode("div",cM,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",dM,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[s,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",qI,e.toDisplayString(a.$t("vuesFavorites.noSavedViews")),1))}const Ri=Se(QI,[["render",mM],["__scopeId","data-v-8a1b9530"]]),pM={name:"SaveViewPopup",components:{PrimeDialog:_t,PrimeStepper:Kc,PrimeStepList:qc,PrimeStep:$c,PrimeStepPanels:w_,PrimeStepPanel:W_,PrimeInputText:at,PrimeInputGroup:ai,PrimeInputGroupAddon:Mn,PrimeTextarea:va,PrimeSelectButton:Ka,PrimeButton:ce},props:{visible:Boolean,errorMessage:{type:String,default:null},viewData:{type:Object,default:null},globalOnly:{type:Boolean,default:!1}},emits:["update:visible","save-view","clear-error"],data(){return{currentStep:"1",viewName:"",viewDescription:"",viewFileId:"",scope:"user"}},mounted(){this.checkPristyAdminStatus()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),isEditMode(){return!!this.viewData},showScopeStep(){return this.isPristyAdmin&&!this.globalOnly},fileIdStep(){return this.showScopeStep?"2":"1"},detailsStep(){return this.showScopeStep?"3":"2"},scopeOptions(){const a=[{label:this.$t("vuesUtilisateurs.saveViewPopup.scopeUser"),value:"user"}];return this.isPristyAdmin&&a.push({label:this.$t("vuesUtilisateurs.saveViewPopup.scopeGlobal"),value:"global"}),a},isFormValid(){return!(!this.viewName||this.scope==="global"&&!this.viewFileId)}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),save(){if(!this.isFormValid)return;const a={name:this.viewName,description:this.viewDescription,scope:this.scope};if(this.scope==="global"){const t=this.viewFileId.toLowerCase().replace(/[^a-z0-9-]/g,"-");a.filename=`vue-${t}.json`}this.$emit("save-view",a)},resetForm(){this.viewName="",this.viewDescription="",this.viewFileId="",this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1",this.$emit("clear-error")},populateForm(){this.isEditMode?(this.viewName=this.viewData.name,this.viewDescription=this.viewData.description||"",this.scope=this.globalOnly?"global":this.viewData.scope,this.viewData.filename&&(this.viewFileId=this.viewData.filename.replace(/^vue-/,"").replace(/\.json$/,"")),this.currentStep=this.detailsStep):(this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1")}},watch:{visible(a){a?this.populateForm():this.resetForm()}}},uM={class:"flex flex-column gap-3 py-3"},bM={class:"m-0 text-gray-600"},gM={class:"flex justify-content-end pt-3"},_M={class:"flex flex-column gap-3 py-3"},hM={key:0,class:"m-0 text-gray-600"},yM={key:2,class:"m-0 text-gray-600"},fM={class:"flex justify-content-between pt-3"},NM={key:1},SM={class:"flex flex-column gap-3 py-3"},EM={class:"flex flex-column gap-1"},TM={class:"font-semibold"},AM={key:0,class:"p-error"},OM={key:1,class:"p-error"},CM={class:"flex flex-column gap-1"},RM={class:"font-semibold"},IM={class:"flex justify-content-between pt-3"};function MM(a,t,n,i,o,r){const l=e.resolveComponent("PrimeStep"),s=e.resolveComponent("PrimeStepList"),c=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeButton"),u=e.resolveComponent("PrimeStepPanel"),b=e.resolveComponent("PrimeInputGroupAddon"),m=e.resolveComponent("PrimeInputText"),p=e.resolveComponent("PrimeInputGroup"),g=e.resolveComponent("PrimeTextarea"),_=e.resolveComponent("PrimeStepPanels"),f=e.resolveComponent("PrimeStepper"),h=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(h,{visible:n.visible,"onUpdate:visible":t[6]||(t[6]=S=>a.$emit("update:visible",S)),modal:"",header:r.isEditMode?a.$t("vuesUtilisateurs.modifyViewPopup.title"):a.$t("vuesUtilisateurs.saveViewPopup.title"),style:{width:"550px",maxWidth:"95vw"}},{default:e.withCtx(()=>[e.createVNode(f,{value:o.currentStep,"onUpdate:value":t[5]||(t[5]=S=>o.currentStep=S),linear:""},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[r.showScopeStep?(e.openBlock(),e.createBlock(l,{key:0,value:"1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.scopeLabel")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(l,{value:r.fileIdStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.fileIdLabel")),1)]),_:1},8,["value"]),e.createVNode(l,{value:r.detailsStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.detailsLabel")),1)]),_:1},8,["value"])]),_:1}),e.createVNode(_,null,{default:e.withCtx(()=>[r.showScopeStep?(e.openBlock(),e.createBlock(u,{key:0,value:"1"},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",uM,[e.createElementVNode("p",bM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.scopeDescription")),1),e.createVNode(c,{modelValue:o.scope,"onUpdate:modelValue":t[0]||(t[0]=y=>o.scope=y),options:r.scopeOptions,optionLabel:"label",optionValue:"value",disabled:r.isEditMode},null,8,["modelValue","options","disabled"])]),e.createElementVNode("div",gM,[e.createVNode(d,{label:a.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:y=>S(r.fileIdStep),disabled:!o.scope},null,8,["label","onClick","disabled"])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{value:r.fileIdStep},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",_M,[o.scope==="global"?(e.openBlock(),e.createElementBlock("p",hM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.fileIdDescription")),1)):e.createCommentVNode("",!0),o.scope==="global"?(e.openBlock(),e.createBlock(p,{key:1},{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("vue-",-1)])]),_:1}),e.createVNode(m,{modelValue:o.viewFileId,"onUpdate:modelValue":t[1]||(t[1]=y=>o.viewFileId=y),modelModifiers:{trim:!0},placeholder:a.$t("vuesUtilisateurs.saveViewPopup.fileIdPlaceholder"),disabled:r.isEditMode},null,8,["modelValue","placeholder","disabled"]),e.createVNode(b,null,{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("p",yM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.personalDescription")),1))]),e.createElementVNode("div",fM,[r.showScopeStep?(e.openBlock(),e.createBlock(d,{key:0,label:a.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:y=>S("1")},null,8,["label","onClick"])):(e.openBlock(),e.createElementBlock("span",NM)),e.createVNode(d,{label:a.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:y=>S(r.detailsStep),disabled:o.scope==="global"&&!o.viewFileId},null,8,["label","onClick","disabled"])])]),_:1},8,["value"]),e.createVNode(u,{value:r.detailsStep},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",SM,[e.createElementVNode("div",EM,[e.createElementVNode("label",TM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.nameLabel")),1),e.createVNode(m,{modelValue:o.viewName,"onUpdate:modelValue":t[2]||(t[2]=y=>o.viewName=y),modelModifiers:{trim:!0},class:e.normalizeClass({"p-invalid":n.errorMessage}),onInput:t[3]||(t[3]=y=>a.$emit("clear-error"))},null,8,["modelValue","class"]),!o.viewName&&!n.errorMessage?(e.openBlock(),e.createElementBlock("small",AM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.nameRequired")),1)):e.createCommentVNode("",!0),n.errorMessage?(e.openBlock(),e.createElementBlock("small",OM,e.toDisplayString(n.errorMessage),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",CM,[e.createElementVNode("label",RM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.descriptionLabel")),1),e.createVNode(g,{modelValue:o.viewDescription,"onUpdate:modelValue":t[4]||(t[4]=y=>o.viewDescription=y),rows:"3",autoResize:""},null,8,["modelValue"])])]),e.createElementVNode("div",IM,[e.createVNode(d,{label:a.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:y=>S(r.fileIdStep)},null,8,["label","onClick"]),e.createVNode(d,{label:r.isEditMode?a.$t("vuesUtilisateurs.modifyView"):a.$t("vuesUtilisateurs.saveView"),icon:"ri-save-3-line",onClick:r.save,disabled:!r.isFormValid},null,8,["label","onClick","disabled"])])]),_:1},8,["value"])]),_:1})]),_:1},8,["value"])]),_:1},8,["visible","header"])}const Ii=Se(pM,[["render",MM]]),vM={name:"AdvancedSearchPanel",components:{ExactSearch:Sc,PrimeAccordion:td,PrimeAccordionPanel:ad,PrimeAccordionHeader:nd,PrimeAccordionContent:id,UserViewsFavoritesPanel:Ri,PrimeSelectButton:Ka,PrimeInputText:at,PrimeButton:ce,AddCriterionPopup:Oi,SaveViewPopup:Ii,PrimeDialog:_t,TreeExplorer:en},emits:["change-exact-search-settings","load-view"],watch:{"location.type"(a){a||this.updateLocationValue("")}},data(){return{isAddCriterionDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1}},mounted(){this.checkPristyAdminStatus()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),...Fe.mapState(ba,["location","criteria","loadedView"]),locationModel:{get(){return this.location},set(a){this.setLocation(a)}},locationOptions(){return[{label:this.$t("vuesUtilisateurs.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},locationPlaceholder(){return this.locationModel.type==="Site"?this.$t("vuesUtilisateurs.sitePlaceholder"):this.locationModel.type==="Folder"?this.$t("vuesUtilisateurs.folderPlaceholder"):""},hasActiveCriteria(){const a=this.location&&this.location.type&&this.location.value;return!!(this.criteria&&this.criteria.length>0||a)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return je().METADATA.filter(t=>t.display&&(t.display.includes("view")||t.display.includes("advancedSearch")))}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),...Fe.mapActions(ba,["setLocation","addCriterion","removeCriterion","saveCurrentView","updateCurrentView","deleteCurrentView"]),clearSaveViewError(){this.saveViewError=null},handleDossierSelected(a){this.updateLocationValue(a.id),this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:"Succès",detail:"Recherche supprimée avec succès.",life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(a){this.$toast.add({severity:"error",summary:"Erreur",detail:a.message,life:5e3})}},async handleSaveView(a){this.clearSaveViewError();const t=this.saveViewDialogMode==="create";let n,i,o;const r={location:JSON.parse(JSON.stringify(this.location)),criteria:JSON.parse(JSON.stringify(this.criteria))};t?(n=this.saveCurrentView,o="vuesUtilisateurs.addsSavedViewSuccess",i={id:crypto.randomUUID(),name:a.name,description:a.description,scope:a.scope,config:r}):(n=this.updateCurrentView,o="vuesUtilisateurs.modifySavedViewSuccess",i={...this.loadedView,name:a.name,description:a.description,config:r});try{await n(i),this.$toast.add({severity:"success",summary:"Succès",detail:this.$t(o),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(l){this.$toast.add({severity:"error",summary:"Erreur",detail:l.message,life:5e3})}},handleLoadView(a){this.$emit("load-view",a)},updateLocationValue(a){let t=a;this.locationModel.type==="Folder"&&a&&!a.startsWith("workspace://")&&(t=`workspace://SpacesStore/${a}`),this.setLocation({...this.locationModel,value:t})},handleCriterionAdded(a){this.addCriterion(a)},formatCriterionValueForDisplay(a){if(a.value===null||a.value===void 0)return"";if(a.operator==="range"){const t=a.value instanceof Date?new Date(a.value).toLocaleDateString():a.value||"*",n=a.value_end instanceof Date?new Date(a.value_end).toLocaleDateString():a.value_end||"*";return`[${t} -> ${n}]`}else return a.value instanceof Date?new Date(a.value).toLocaleDateString():typeof a.value=="boolean"?this.$t(a.value?"true":"false"):`"${a.value}"`}}},ZM={key:0,class:"p-2 mb-3 border-1 border-round border-blue-200 bg-blue-50 text-blue-700"},DM={class:"font-bold"},wM={class:"p-fluid formgrid grid"},WM={class:"field col-12"},LM={for:"locationType"},YM={key:0,class:"field col-12"},kM={for:"locationValue"},xM={key:0,id:"username-help"},zM={class:"mt-4"},GM={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},FM={key:1,class:"flex flex-column gap-2"},XM={class:"flex-grow-1"},PM={class:"font-bold mr-1"},VM={class:"font-italic mr-1"},UM={class:"text-gray-700"},jM={key:3,class:"flex gap-2 mt-2"},BM={class:"flex align-items-center"},HM={key:0};function JM(a,t,n,i,o,r){const l=e.resolveComponent("ExactSearch"),s=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),d=e.resolveComponent("PrimeAccordionContent"),u=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeSelectButton"),m=e.resolveComponent("PrimeInputText"),p=e.resolveComponent("PrimeButton"),g=e.resolveComponent("PrimeAccordion"),_=e.resolveComponent("AddCriterionPopup"),f=e.resolveComponent("SaveViewPopup"),h=e.resolveComponent("TreeExplorer"),S=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{onChangeExactSearchSettings:t[0]||(t[0]=y=>a.$emit("change-exact-search-settings",y)),disabled:r.hasActiveCriteria||r.isSavedViewLoaded},null,8,["disabled"]),e.createVNode(g,{class:"mt-4",multiple:"",value:["0"]},{default:e.withCtx(()=>[e.createVNode(u,{value:"0"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesFavorites.title")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel",onLoadView:r.handleLoadView},null,8,["onLoadView"])]),_:1})]),_:1}),e.createVNode(u,{value:"1"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.queryBuilder")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[r.isSavedViewLoaded?(e.openBlock(),e.createElementBlock("div",ZM,[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.loadedViewMessage"))+" ",1),e.createElementVNode("span",DM,e.toDisplayString(a.loadedView.name),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",wM,[e.createElementVNode("div",WM,[e.createElementVNode("label",LM,e.toDisplayString(a.$t("vuesUtilisateurs.locationLabel")),1),e.createVNode(b,{id:"locationType",modelValue:r.locationModel.type,"onUpdate:modelValue":t[1]||(t[1]=y=>r.locationModel.type=y),options:r.locationOptions,optionLabel:"label",optionValue:"value",allowEmpty:"",class:"w-full"},null,8,["modelValue","options"])]),r.locationModel.type?(e.openBlock(),e.createElementBlock("div",YM,[e.createElementVNode("label",kM,e.toDisplayString(a.$t("vuesUtilisateurs.valueLabel")),1),e.createVNode(m,{id:"locationValue",value:r.locationModel.value,placeholder:r.locationPlaceholder,onClick:t[2]||(t[2]=y=>r.locationModel.type==="Folder"?o.isDossierTreeVisible=!0:null),onChange:t[3]||(t[3]=y=>r.updateLocationValue(y.target.value))},null,8,["value","placeholder"]),r.locationModel.type==="Folder"?(e.openBlock(),e.createElementBlock("small",xM,"Ex: workspace://SpacesStore/{ID du dossier}")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",zM,[e.createElementVNode("h5",null,e.toDisplayString(a.$t("vuesUtilisateurs.criteriaTitle")),1),a.criteria.length===0?(e.openBlock(),e.createElementBlock("div",GM,e.toDisplayString(a.$t("vuesUtilisateurs.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",FM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.criteria,(y,T)=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"flex align-items-center p-2 border-1 border-round border-gray-200"},[e.createElementVNode("div",XM,[e.createElementVNode("span",PM,e.toDisplayString(a.$t(y.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([y.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(y.negation?a.$t("vuesUtilisateurs.mustNotContain"):a.$t("vuesUtilisateurs.mustContain")),3),e.createElementVNode("span",VM,e.toDisplayString(a.$t(y.operatorLabelKey)),1),e.createElementVNode("span",UM,e.toDisplayString(r.formatCriterionValueForDisplay(y)),1)]),e.createVNode(p,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger",onClick:O=>a.removeCriterion(T)},null,8,["onClick"])]))),128))])),e.createVNode(p,{icon:"ri-add-line",label:a.$t("vuesUtilisateurs.addCriterionButton"),onClick:t[4]||(t[4]=y=>o.isAddCriterionDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"]),r.hasActiveCriteria?(e.openBlock(),e.createBlock(p,{key:2,icon:"ri-save-3-line",label:a.$t("vuesUtilisateurs.saveView"),onClick:r.openSaveViewPopup,class:"mt-3 w-full"},null,8,["label","onClick"])):e.createCommentVNode("",!0),r.canManageLoadedView?(e.openBlock(),e.createElementBlock("div",jM,[e.createVNode(p,{icon:"ri-pencil-line",label:a.$t("vuesUtilisateurs.modifyView"),onClick:r.modifyView,class:"w-full",severity:"secondary"},null,8,["label","onClick"]),e.createVNode(p,{icon:"ri-delete-bin-line",label:a.$t("vuesUtilisateurs.deleteView"),onClick:r.deleteView,class:"w-full",severity:"danger"},null,8,["label","onClick"])])):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1}),e.createVNode(_,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":t[5]||(t[5]=y=>o.isAddCriterionDialogVisible=y),properties:r.availableProperties,onAddCriterion:r.handleCriterionAdded},null,8,["visible","properties","onAddCriterion"]),e.createVNode(f,{visible:o.saveViewDialogVisible,"onUpdate:visible":t[6]||(t[6]=y=>o.saveViewDialogVisible=y),"view-data":r.viewToEdit,"error-message":o.saveViewError,onSaveView:r.handleSaveView,onClearError:r.clearSaveViewError},null,8,["visible","view-data","error-message","onSaveView","onClearError"]),e.createVNode(S,{visible:o.isDossierTreeVisible,"onUpdate:visible":t[7]||(t[7]=y=>o.isDossierTreeVisible=y),header:"Choisir un dossier",modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(h,{"current-node":null,showUserHome:"",onSelectNode:r.handleDossierSelected},null,8,["onSelectNode"])]),_:1},8,["visible"]),e.createVNode(S,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":t[9]||(t[9]=y=>o.isDeleteConfirmVisible=y),header:"Confirmation de suppression",modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(p,{label:a.$t("no"),icon:"ri-close-line",onClick:t[8]||(t[8]=y=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(p,{label:a.$t("yes"),icon:"ri-check-line",onClick:r.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",BM,[t[10]||(t[10]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl"},null,-1)),a.loadedView?(e.openBlock(),e.createElementBlock("span",HM,e.toDisplayString(a.$t("vuesUtilisateurs.confirmDelete",{name:a.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible"])],64)}const Wg=Se(vM,[["render",JM]]),QM={name:"AdvancedViewPanel",components:{PrimeAccordion:td,PrimeAccordionPanel:ad,PrimeAccordionHeader:nd,PrimeAccordionContent:id,UserViewsFavoritesPanel:Ri,PrimeSelectButton:Ka,PrimeInputText:at,PrimeAutoComplete:Pc,PrimeButton:ce,AddCriterionPopup:Oi,SaveViewPopup:Ii,PrimeDialog:_t,TreeExplorer:en},props:{globalOnly:{type:Boolean,default:!1},showUserHome:{type:Boolean,default:!0},hideViewSelector:{type:Boolean,default:!1}},emits:["change-exact-search-settings","load-view","close-view","view-saved"],data(){return{isAddCriterionDialogVisible:!1,isAddLocationDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1,availableSites:[],filteredSites:[],newLocation:{type:null,value:"",negation:!1,label:""},newLocationSiteInput:null,editingCriterion:null,editingGroupIndex:null,editingCriterionIndex:null,targetGroupIndex:null}},watch:{isAddCriterionDialogVisible(a){a||(this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null,this.targetGroupIndex=null)}},async mounted(){this.checkPristyAdminStatus(),await this.loadSites()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),...Fe.mapState(ba,["locations","criteriaGroups","allCriteria","loadedView"]),locationOptions(){return[{label:this.$t("rechercheAvancee.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},conditionOptions(){return[{label:this.$t("rechercheAvancee.includePrefix"),value:!1},{label:this.$t("rechercheAvancee.excludePrefix"),value:!0}]},hasActiveCriteria(){return!!(this.allCriteria&&this.allCriteria.length>0||this.locations.length>0)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return je().METADATA.filter(t=>t.display&&t.display.includes("view"))}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),...Fe.mapActions(ba,["addLocation","removeLocation","addGroup","removeGroup","addCriterionToGroup","removeCriterionFromGroup","updateCriterionInGroup","saveCurrentView","updateCurrentView","deleteCurrentView"]),removeLocationAtIndex(a){this.removeLocation(a)},resetNewLocation(){this.newLocation={type:null,value:"",negation:!1,label:""},this.newLocationSiteInput=null},confirmAddLocation(){!this.newLocation.type||!this.newLocation.value||(this.addLocation({...this.newLocation}),this.isAddLocationDialogVisible=!1,this.resetNewLocation())},handleNewLocationSiteSelect(a){const t=a.value;t&&t.id&&(this.newLocation.value=t.id,this.newLocation.label=t.title)},clearSaveViewError(){this.saveViewError=null},handleDossierSelected(a){if(this.isAddLocationDialogVisible){const t=a.id.startsWith("workspace://")?a.id:`workspace://SpacesStore/${a.id}`;this.newLocation.value=t,this.newLocation.label=a.name||t}this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.deleteViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(a){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:a.message,life:5e3})}},async handleSaveView(a){this.clearSaveViewError();const t={locations:JSON.parse(JSON.stringify(this.locations)),criteriaGroups:JSON.parse(JSON.stringify(this.criteriaGroups))};if(a.scope==="global"){try{const l={id:a.filename.replace(/^vue-/,"").replace(/\.json$/,""),name:a.name,description:a.description,config:t};await na.saveView(a.filename,l),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.addsSavedViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel&&this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1,this.$emit("view-saved",{filename:a.filename,name:a.name,description:a.description})}catch(l){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:l.message,life:5e3})}return}const n=this.saveViewDialogMode==="create";let i,o,r;n?(i=this.saveCurrentView,r="rechercheAvancee.addsSavedViewSuccess",o={id:crypto.randomUUID(),name:a.name,description:a.description,scope:a.scope,config:t}):(i=this.updateCurrentView,r="rechercheAvancee.modifySavedViewSuccess",o={...this.loadedView,name:a.name,description:a.description,config:t});try{await i(o),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t(r),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(l){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:l.message,life:5e3})}},handleLoadView(a){this.$emit("load-view",a)},handleAddFirstCriterion(){this.addGroup("AND"),this.targetGroupIndex=0,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleAddGroup(){this.addGroup("AND")},openAddCriterionForGroup(a){this.targetGroupIndex=a,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleCriterionAdded(a){this.criteriaGroups.groups.length===0&&(this.addGroup("AND"),this.targetGroupIndex=0);const t=this.targetGroupIndex!==null?this.targetGroupIndex:this.criteriaGroups.groups.length-1;this.addCriterionToGroup(t,a),this.targetGroupIndex=null},startEditCriterion(a,t,n){this.editingGroupIndex=a,this.editingCriterionIndex=t,this.editingCriterion=JSON.parse(JSON.stringify(n)),this.isAddCriterionDialogVisible=!0},handleCriterionUpdated(a){this.updateCriterionInGroup(this.editingGroupIndex,this.editingCriterionIndex,a),this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null},formatCriterionValueForDisplay(a){if(a.value===null||a.value===void 0)return"";if(a.operator==="range"){const t=a.value instanceof Date?new Date(a.value).toLocaleDateString():a.value||"*",n=a.value_end instanceof Date?new Date(a.value_end).toLocaleDateString():a.value_end||"*";return`[${t} -> ${n}]`}else return a.value instanceof Date?new Date(a.value).toLocaleDateString():typeof a.value=="boolean"?this.$t(a.value?"true":"false"):`"${a.value}"`},async loadSites(){try{const a=await ht.getWorkspaces();this.availableSites=a.map(t=>({id:t.id,title:t.title,description:t.description}))}catch(a){console.error("Error loading sites:",a)}},searchSites(a){const t=a.query.toLowerCase();t?this.filteredSites=this.availableSites.filter(n=>n.title.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)):this.filteredSites=[...this.availableSites]}}},KM={key:0,class:"loaded-view-bar"},qM={class:"loaded-view-label"},$M={class:"mt-2 mb-4"},e3={class:"flex align-items-center gap-1 mb-2"},t3={class:"font-bold"},a3={class:"ri-information-line text-gray-400 cursor-help"},n3={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},i3={key:1,class:"flex flex-column gap-2"},o3={class:"font-semibold mr-1"},r3={class:"text-gray-700 flex-grow-1"},l3={class:"mt-4"},s3={class:"font-bold"},c3={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round mt-2"},d3={key:1,class:"flex flex-column mt-2"},m3={key:0,class:"criteria-group-separator"},p3={class:"criteria-group-separator-label"},u3={key:0,class:"flex align-items-center justify-content-end mb-2"},b3={class:"flex flex-column"},g3={key:0,class:"criteria-inline-operator"},_3={class:"criteria-inline-operator-label"},h3={class:"flex align-items-center p-2 border-1 border-round border-gray-200"},y3={class:"flex-grow-1"},f3={class:"font-bold mr-1"},N3={class:"font-italic mr-1"},S3={class:"text-gray-700"},E3={class:"flex gap-2 mt-3"},T3={key:2,class:"view-actions-separator"},A3={class:"flex flex-column gap-3"},O3={class:"flex flex-column gap-1 w-full"},C3={class:"font-semibold"},R3={class:"flex flex-column gap-1 w-full"},I3={class:"font-semibold"},M3={key:0,class:"flex flex-column gap-1 w-full"},v3={class:"font-semibold"},Z3={class:"flex align-items-center"},D3={key:0};function w3(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),d=e.resolveComponent("PrimeAccordionContent"),u=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeAccordion"),m=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeAutoComplete"),g=e.resolveComponent("PrimeInputText"),_=e.resolveComponent("PrimeDialog"),f=e.resolveComponent("AddCriterionPopup"),h=e.resolveComponent("SaveViewPopup"),S=e.resolveComponent("TreeExplorer"),y=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.isSavedViewLoaded&&!n.hideViewSelector?(e.openBlock(),e.createElementBlock("div",KM,[e.createElementVNode("span",qM,[t[15]||(t[15]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(a.$t("rechercheAvancee.activeView",{name:a.loadedView.name})),1)]),e.createVNode(l,{icon:"ri-close-line",label:a.$t("rechercheAvancee.closeView"),severity:"danger",onClick:t[0]||(t[0]=T=>a.$emit("close-view")),outlined:"",size:"small"},null,8,["label"])])):e.createCommentVNode("",!0),e.createVNode(b,{class:e.normalizeClass(["mt-4",{"accordion-locked":n.hideViewSelector}]),multiple:"",value:n.hideViewSelector?["1"]:["0","1"]},{default:e.withCtx(()=>[n.hideViewSelector?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0,value:"0"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("rechercheAvancee.savedViews")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel","global-only":n.globalOnly,onLoadView:r.handleLoadView},null,8,["global-only","onLoadView"])]),_:1})]),_:1})),e.createVNode(u,{value:"1"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("rechercheAvancee.queryBuilder")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("div",$M,[e.createElementVNode("div",e3,[e.createElementVNode("span",t3,e.toDisplayString(a.$t("rechercheAvancee.locationsTitle")),1),e.withDirectives(e.createElementVNode("i",a3,null,512),[[y,a.$t("rechercheAvancee.locationsHint"),void 0,{right:!0}]])]),a.locations.length===0?(e.openBlock(),e.createElementBlock("div",n3,e.toDisplayString(a.$t("rechercheAvancee.noLocations")),1)):(e.openBlock(),e.createElementBlock("div",i3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.locations,(T,O)=>(e.openBlock(),e.createElementBlock("div",{key:T.id||O,class:e.normalizeClass(["flex align-items-center p-2 border-1 border-round",T.negation?"border-red-200 bg-red-50":"border-green-200 bg-green-50"])},[e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-bold px-2 py-1 border-round mr-2",T.negation?"bg-red-100 text-red-700":"bg-green-100 text-green-700"])},e.toDisplayString(T.negation?a.$t("rechercheAvancee.excludePrefix"):a.$t("rechercheAvancee.includePrefix")),3),e.createElementVNode("span",o3,e.toDisplayString(T.type),1),e.createElementVNode("span",r3,e.toDisplayString(T.label||T.value),1),e.createVNode(l,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger","aria-label":a.$t("rechercheAvancee.removeLocation"),onClick:D=>r.removeLocationAtIndex(O)},null,8,["aria-label","onClick"])],2))),128))])),e.createVNode(l,{icon:"ri-add-line",label:a.$t("rechercheAvancee.addLocationButton"),onClick:t[1]||(t[1]=T=>o.isAddLocationDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"])]),e.createElementVNode("div",l3,[e.createElementVNode("span",s3,e.toDisplayString(a.$t("rechercheAvancee.criteriaTitle")),1),a.criteriaGroups.groups.length===0?(e.openBlock(),e.createElementBlock("div",c3,e.toDisplayString(a.$t("rechercheAvancee.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",d3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.criteriaGroups.groups,(T,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:T.id},[O>0?(e.openBlock(),e.createElementBlock("div",m3,[t[16]||(t[16]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1)),e.createElementVNode("span",p3,e.toDisplayString(a.$t("rechercheAvancee.operatorOr")),1),t[17]||(t[17]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["criteria-group-block",{"criteria-group-block--multi":a.criteriaGroups.groups.length>1}])},[a.criteriaGroups.groups.length>1?(e.openBlock(),e.createElementBlock("div",u3,[e.withDirectives(e.createVNode(l,{icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:D=>a.removeGroup(O)},null,8,["onClick"]),[[y,a.$t("rechercheAvancee.removeGroup"),void 0,{left:!0}]])])):e.createCommentVNode("",!0),e.createElementVNode("div",b3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.criteria,(D,I)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D.id},[I>0?(e.openBlock(),e.createElementBlock("div",g3,[e.createElementVNode("span",_3,e.toDisplayString(a.$t("rechercheAvancee.operatorAnd")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",h3,[e.createElementVNode("div",y3,[e.createElementVNode("span",f3,e.toDisplayString(a.$t(D.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([D.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(D.negation?a.$t("rechercheAvancee.mustNotContain"):a.$t("rechercheAvancee.mustContain")),3),e.createElementVNode("span",N3,e.toDisplayString(a.$t(D.operatorLabelKey)),1),e.createElementVNode("span",S3,e.toDisplayString(r.formatCriterionValueForDisplay(D)),1)]),e.createVNode(l,{icon:"ri-pencil-line",text:"",rounded:"",severity:"info",onClick:C=>r.startEditCriterion(O,I,D)},null,8,["onClick"]),e.createVNode(l,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger",onClick:C=>a.removeCriterionFromGroup(O,I)},null,8,["onClick"])])],64))),128))]),e.createVNode(l,{icon:"ri-add-line",label:a.$t("rechercheAvancee.addCriterionButton"),onClick:D=>r.openAddCriterionForGroup(O),class:"mt-2 w-full",outlined:"",size:"small"},null,8,["label","onClick"])],2)],64))),128))])),e.createElementVNode("div",E3,[a.criteriaGroups.groups.length===0?(e.openBlock(),e.createBlock(l,{key:0,icon:"ri-add-line",label:a.$t("rechercheAvancee.addCriterionButton"),onClick:r.handleAddFirstCriterion,class:"flex-1",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),a.criteriaGroups.groups.length>0?(e.openBlock(),e.createBlock(l,{key:1,icon:"ri-add-line",label:a.$t("rechercheAvancee.addOrGroup"),onClick:r.handleAddGroup,class:"flex-1",outlined:"",size:"small"},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),r.hasActiveCriteria?(e.openBlock(),e.createElementBlock("div",T3)):e.createCommentVNode("",!0),r.hasActiveCriteria?(e.openBlock(),e.createBlock(l,{key:3,icon:"ri-save-3-line",label:a.$t("rechercheAvancee.saveViewAsNew"),onClick:r.openSaveViewPopup,class:"w-full",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),r.canManageLoadedView?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(l,{icon:"ri-save-line",label:a.$t("rechercheAvancee.saveViewModifications"),onClick:r.modifyView,class:"mt-2 w-full"},null,8,["label","onClick"]),e.createElementVNode("a",{class:"delete-view-link",onClick:t[2]||(t[2]=(...T)=>r.deleteView&&r.deleteView(...T))},[t[18]||(t[18]=e.createElementVNode("i",{class:"ri-delete-bin-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(a.$t("rechercheAvancee.deleteView")),1)])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1},8,["class","value"]),e.createVNode(_,{visible:o.isAddLocationDialogVisible,"onUpdate:visible":t[9]||(t[9]=T=>o.isAddLocationDialogVisible=T),header:a.$t("rechercheAvancee.addLocationTitle"),modal:"",style:{width:"500px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("cancel"),icon:"ri-close-line",onClick:t[8]||(t[8]=T=>o.isAddLocationDialogVisible=!1),text:""},null,8,["label"]),e.createVNode(l,{label:a.$t("rechercheAvancee.addLocationConfirm"),icon:"ri-check-line",onClick:r.confirmAddLocation,disabled:!o.newLocation.type||!o.newLocation.value},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createElementVNode("div",O3,[e.createElementVNode("label",C3,e.toDisplayString(a.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(m,{modelValue:o.newLocation.negation,"onUpdate:modelValue":t[3]||(t[3]=T=>o.newLocation.negation=T),options:r.conditionOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",R3,[e.createElementVNode("label",I3,e.toDisplayString(a.$t("rechercheAvancee.locationTypeLabel")),1),e.createVNode(m,{modelValue:o.newLocation.type,"onUpdate:modelValue":t[4]||(t[4]=T=>o.newLocation.type=T),options:r.locationOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),o.newLocation.type?(e.openBlock(),e.createElementBlock("div",M3,[e.createElementVNode("label",v3,e.toDisplayString(a.$t("rechercheAvancee.valueLabel")),1),o.newLocation.type==="Site"?(e.openBlock(),e.createBlock(p,{key:0,modelValue:o.newLocationSiteInput,"onUpdate:modelValue":t[5]||(t[5]=T=>o.newLocationSiteInput=T),suggestions:o.filteredSites,optionLabel:"title",onComplete:r.searchSites,onItemSelect:r.handleNewLocationSiteSelect,placeholder:a.$t("rechercheAvancee.sitePlaceholder"),class:"w-full",forceSelection:""},null,8,["modelValue","suggestions","onComplete","onItemSelect","placeholder"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:o.newLocation.value,"onUpdate:modelValue":t[6]||(t[6]=T=>o.newLocation.value=T),placeholder:a.$t("rechercheAvancee.folderPlaceholder"),onClick:t[7]||(t[7]=T=>o.newLocation.type==="Folder"?o.isDossierTreeVisible=!0:null),readonly:"",class:"w-full cursor-pointer"},null,8,["modelValue","placeholder"]))])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]),e.createVNode(f,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":t[10]||(t[10]=T=>o.isAddCriterionDialogVisible=T),properties:r.availableProperties,"edit-criterion":o.editingCriterion,onAddCriterion:r.handleCriterionAdded,onUpdateCriterion:r.handleCriterionUpdated},null,8,["visible","properties","edit-criterion","onAddCriterion","onUpdateCriterion"]),e.createVNode(h,{visible:o.saveViewDialogVisible,"onUpdate:visible":t[11]||(t[11]=T=>o.saveViewDialogVisible=T),"view-data":r.viewToEdit,"error-message":o.saveViewError,"global-only":n.globalOnly,onSaveView:r.handleSaveView,onClearError:r.clearSaveViewError},null,8,["visible","view-data","error-message","global-only","onSaveView","onClearError"]),e.createVNode(_,{visible:o.isDossierTreeVisible,"onUpdate:visible":t[12]||(t[12]=T=>o.isDossierTreeVisible=T),header:a.$t("selectFolder"),modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(S,{"current-node":null,showUserHome:n.showUserHome,onSelectNode:r.handleDossierSelected},null,8,["showUserHome","onSelectNode"])]),_:1},8,["visible","header"]),e.createVNode(_,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":t[14]||(t[14]=T=>o.isDeleteConfirmVisible=T),header:a.$t("rechercheAvancee.confirmDeleteTitle"),modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("no"),icon:"ri-close-line",onClick:t[13]||(t[13]=T=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(l,{label:a.$t("yes"),icon:"ri-check-line",onClick:r.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",Z3,[t[19]||(t[19]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl"},null,-1)),a.loadedView?(e.openBlock(),e.createElementBlock("span",D3,e.toDisplayString(a.$t("rechercheAvancee.confirmDelete",{name:a.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"])],64)}const Lg=Se(QM,[["render",w3]]),W3={name:"FavoriteViewMenu",emits:["menuitem-click"],computed:{...Fe.mapState(ba,{model:"favoriteViews"})},methods:{...Fe.mapActions(ba,["fetchFavoriteViews"]),onMenuItemClick(a){this.$emit("menuitem-click",a)}},async mounted(){await this.fetchFavoriteViews()}},L3={class:"menuItem mt-3"},Y3={key:0},k3={class:"layout-menu"},x3={class:"overflow-hidden text-overflow-ellipsis white-space-nowrap"};function z3(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveDirective("ripple"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",L3,[e.createVNode(l,{to:"/vues"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesFavorites.title")),1)]),_:1})]),a.model.length>0?(e.openBlock(),e.createElementBlock("div",Y3,[e.createElementVNode("ul",k3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.model,(d,u)=>(e.openBlock(),e.createElementBlock("li",{key:d.label||u,role:"none"},[e.withDirectives((e.openBlock(),e.createBlock(l,{"aria-label":d.label,to:d.to,class:"p-ripple flex",exact:"",role:"menuitem",onClick:b=>r.onMenuItemClick({originalEvent:b,item:d})},{default:e.withCtx(()=>[e.createElementVNode("span",x3,e.toDisplayString(d.label),1)]),_:2},1032,["aria-label","to","onClick"])),[[s],[c,d.label]])]))),128))])])):e.createCommentVNode("",!0)],64)}const Yg=Se(W3,[["render",z3],["__scopeId","data-v-90814edd"]]),G3={name:"ViewResultsPanel",components:{ComplexBreadcrumb:_o,PrimeButton:ce,PrimePaginator:Qn,PrimeProgressSpinner:ea},directives:{tooltip:Mt},props:{entries:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},totalRecords:{type:Number,default:0},rowsPerPage:{type:Number,default:25},showLocationActions:{type:Boolean,default:!0},workspaceRouteName:{type:String,default:"espace"},folderRouteName:{type:String,default:"espace-folder"},folderRouteParamName:{type:String,default:"folderId"},homeRoute:{type:[String,Object],default:()=>({name:"home"})}},data(){return{first:0}},emits:["page-change","select-node"],methods:{getNodeIcon(a){return Sa.getIcon(a)},buildBreadcrumbPath(a){if(!a.path||!a.path.elements)return[];const t=a.path.elements.filter(o=>o.name!=="Company Home"&&o.name!=="documentLibrary"&&o.nodeType!=="st:sites"&&o.nodeType!=="sys:container");let n=null;const i=t.map(o=>{const r={id:o.id,name:o.name,nodeType:o.nodeType,isFolder:o.nodeType==="cm:folder"||o.nodeType==="st:site"};return o.nodeType==="st:site"?(n=o.name,r.to={name:this.workspaceRouteName,params:{id:o.name}}):n?r.to={name:this.folderRouteName,params:{id:n,[this.folderRouteParamName]:o.id}}:r.to={},r});return i.unshift({nodeType:"home",to:typeof this.homeRoute=="string"?{name:this.homeRoute}:this.homeRoute}),i},getSiteElement(a){return!a.path||!a.path.elements?null:a.path.elements.find(t=>t.nodeType==="st:site")},getSiteName(a){const t=this.getSiteElement(a);return t?t.name:null},getParentName(a){if(!a.path||!a.path.elements)return"";const t=a.path.elements[a.path.elements.length-1];return t?t.name:""},addParentAsLocation(a,t){if(!a.path||!a.path.elements)return;const n=a.path.elements,i=n[n.length-1];if(!i)return;ba().addLocation({type:"Folder",value:`workspace://SpacesStore/${i.id}`,negation:t,label:i.name})},addSiteAsLocation(a,t){const n=this.getSiteElement(a);if(!n)return;ba().addLocation({type:"Site",value:n.name,negation:t,label:n.name})},formatDate(a){return a?new Date(a).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""},handlePageChange(a){this.first=a.first,this.$emit("page-change",a.first)},formatSize(a){if(!a||a===0)return"0 B";const t=["B","KB","MB","GB"];let n=0,i=a;for(;i>=1024&&n<t.length-1;)i/=1024,n++;return`${i.toFixed(n===0?0:1)} ${t[n]}`}}},F3={class:"view-results-panel"},X3={key:0,class:"flex justify-content-center align-items-center p-5"},P3={key:1,class:"text-center text-gray-500 p-5"},V3={class:"mt-2"},U3={key:2},j3={class:"result-main"},B3={key:0,class:"result-site-row"},H3={class:"result-site-badge"},J3={class:"result-header"},Q3=["title","onClick"],K3={key:1,class:"result-path-row"},q3={class:"result-meta"},$3={key:0,class:"meta-item"},ev={key:1,class:"meta-item"};function tv(a,t,n,i,o,r){const l=e.resolveComponent("PrimeProgressSpinner"),s=e.resolveComponent("PrimeButton"),c=e.resolveComponent("ComplexBreadcrumb"),d=e.resolveComponent("PrimePaginator"),u=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",F3,[n.loading?(e.openBlock(),e.createElementBlock("div",X3,[e.createVNode(l)])):n.entries.length===0?(e.openBlock(),e.createElementBlock("div",P3,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-search-line",style:{"font-size":"3rem"},"aria-hidden":"true"},null,-1)),e.createElementVNode("p",V3,e.toDisplayString(a.$t("rechercheAvancee.noResults")),1)])):(e.openBlock(),e.createElementBlock("div",U3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entries,b=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"view-result-item"},[e.createElementVNode("div",j3,[r.getSiteName(b)?(e.openBlock(),e.createElementBlock("div",B3,[e.createElementVNode("span",H3,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-building-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.getSiteName(b)),1)]),n.showLocationActions&&r.getSiteElement(b)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(s,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addSiteAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsIncludeSite",{name:r.getSiteName(b)})]]),e.withDirectives(e.createVNode(s,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addSiteAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsExcludeSite",{name:r.getSiteName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",J3,[e.createElementVNode("i",{class:e.normalizeClass([r.getNodeIcon(b),"result-icon"]),"aria-hidden":"true"},null,2),e.createElementVNode("a",{class:"result-name",title:b.name,onClick:m=>a.$emit("select-node",b)},e.toDisplayString(b.name),9,Q3)]),b.path&&b.path.elements?(e.openBlock(),e.createElementBlock("div",K3,[e.createVNode(c,{path:r.buildBreadcrumbPath(b),"show-actions":!1,"show-home":!1,"is-in-search":!0,mode:"auto","home-route":n.homeRoute,"workspace-route-name":n.workspaceRouteName,"folder-route-name":n.folderRouteName,class:"result-breadcrumb"},null,8,["path","home-route","workspace-route-name","folder-route-name"]),n.showLocationActions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(s,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addParentAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsIncludeFolder",{name:r.getParentName(b)})]]),e.withDirectives(e.createVNode(s,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addParentAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsExcludeFolder",{name:r.getParentName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",q3,[b.modifiedAt?(e.openBlock(),e.createElementBlock("span",$3,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-time-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.formatDate(b.modifiedAt)),1)])):e.createCommentVNode("",!0),b.content&&b.content.sizeInBytes?(e.openBlock(),e.createElementBlock("span",ev,[t[3]||(t[3]=e.createElementVNode("i",{class:"ri-hard-drive-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.formatSize(b.content.sizeInBytes)),1)])):e.createCommentVNode("",!0)])])]))),128)),e.createVNode(d,{first:o.first,rows:n.rowsPerPage,"total-records":n.totalRecords,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",onPage:r.handlePageChange},null,8,["first","rows","total-records","onPage"])]))])}const kg=Se(G3,[["render",tv],["__scopeId","data-v-0cfc30de"]]),av={class:"save-as-form"},nv={class:"form-field"},iv={for:"filename"},ov={class:"form-field"},rv={for:"location"},lv={class:"input-group"},sv={key:0,class:"explorer-container"},cv=Se({__name:"SaveAsPopup",props:{visible:Boolean,defaultFilename:{type:String,default:null},parentFolderNode:{type:Object,default:null}},emits:["close","save"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=a,o=t,r=e.ref(""),l=e.ref(null),s=e.ref(!1),c=e.ref(null),d=e.ref(""),u=()=>{r.value=i.defaultFilename||n("pdfTools.saveAs.defaultFilename"),l.value=i.parentFolderNode,c.value=i.parentFolderNode?.id,d.value=i.parentFolderNode?.name,s.value=!1},b=async p=>{if(!(!p||!p.isFolder)){if(p.name==="documentLibrary")if(c.value=p.id,p.parentId)try{const g=await Re.getNode(p.parentId);d.value=g.properties["cm:title"]||g.name}catch(g){console.error("Could not fetch parent node name",g),d.value=p.name}else d.value=p.name;else c.value=p.id,d.value=p.name;s.value=!1}},m=()=>{c.value&&o("save",{filename:r.value,folderId:c.value})};return(p,g)=>(e.openBlock(),e.createBlock(e.unref(_t),{visible:a.visible,modal:"",header:p.$t("pdfTools.saveAs.title"),class:"dialog-save-as","onUpdate:visible":g[3]||(g[3]=_=>p.$emit("close")),onShow:u},{footer:e.withCtx(()=>[e.createVNode(e.unref(ce),{label:p.$t("pdfTools.common.cancel"),icon:"ri-close-line",text:"",onClick:g[2]||(g[2]=_=>p.$emit("close"))},null,8,["label"]),e.createVNode(e.unref(ce),{label:p.$t("pdfTools.common.save"),icon:"ri-check-line",onClick:m,disabled:!r.value||!c.value},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",av,[e.createElementVNode("div",nv,[e.createElementVNode("label",iv,e.toDisplayString(p.$t("pdfTools.saveAs.filenameLabel")),1),e.createVNode(e.unref(at),{id:"filename",modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=_=>r.value=_)},null,8,["modelValue"])]),e.createElementVNode("div",ov,[e.createElementVNode("label",rv,e.toDisplayString(p.$t("pdfTools.saveAs.folderLabel")),1),e.createElementVNode("div",lv,[e.createVNode(e.unref(at),{id:"location",readonly:"",value:d.value},null,8,["value"]),e.createVNode(e.unref(ce),{icon:s.value?"ri-arrow-up-s-line":"ri-arrow-down-s-line",label:p.$t("pdfTools.saveAs.browse"),onClick:g[1]||(g[1]=_=>s.value=!s.value)},null,8,["icon","label"])])]),s.value?(e.openBlock(),e.createElementBlock("div",sv,[e.createVNode(en,{"current-node":l.value,"show-user-home":"","show-files":!1,onSelectNode:b},null,8,["current-node"])])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]))}},[["__scopeId","data-v-6d10b1e7"]]),dv={class:"pdf-tools-page"},mv={key:0},pv={key:0,class:"loading-container"},uv={key:1,class:"error-container"},bv={key:2,class:"pdf-editor-layout"},gv={class:"pdf-tools-sidebar"},_v={class:"card"},hv={class:"sidebar-form"},yv={class:"form-field"},fv={class:"form-field form-field--spaced"},Nv={class:"form-field form-field--spaced"},Sv={class:"insert-buttons"},Ev={class:"form-field form-field--spaced"},Tv={class:"watermark-grid"},Av={class:"pdf-preview-container"},Ov=["onClick","onDblclick"],Cv={class:"page-selection"},Rv={class:"page-actions"},Iv={class:"thumbnail-content"},Mv={class:"page-number"},vv={class:"dialog-header"},Zv={class:"page-editor-toolbar"},Dv={class:"zoom-indicator"},wv={class:"editor-layout"},Wv={class:"tool-group"},Lv={key:0,class:"text-settings"},Yv={class:"form-field"},kv={class:"form-label"},xv={class:"form-field"},zv={class:"form-label"},Gv={class:"form-field"},Fv={class:"form-label"},Xv={class:"editor-footer"},Pv={class:"dialog-header"},Vv={class:"signature-pad"},Uv={class:"dialog-footer-buttons"},jv={class:"search-input-group"},Bv={key:0,class:"inline-status"},Hv={key:1,class:"text-muted"},Jv={key:2,class:"favorites-layout"},Qv={class:"favorites-list"},Kv=["onClick"],qv={class:"item-content"},$v={class:"text-ellipsis"},eZ={class:"favorites-preview"},tZ={key:0,class:"preview-placeholder"},aZ={class:"text-muted"},nZ={key:1,class:"preview-placeholder"},iZ={class:"text-muted"},oZ={key:2,class:"preview-wrapper"},rZ={key:0,class:"preview-controls"},lZ={class:"page-info"},sZ={class:"preview-content"},cZ={key:0,class:"inline-status"},dZ={key:1,class:"text-muted"},mZ={key:2,class:"favorites-layout"},pZ={class:"favorites-list"},uZ=["onClick"],bZ={class:"item-content"},gZ={class:"text-ellipsis"},_Z={class:"favorites-preview"},hZ={key:0,class:"preview-placeholder"},yZ={class:"text-muted"},fZ={key:1,class:"preview-placeholder"},NZ={class:"text-muted"},SZ={key:2,class:"preview-wrapper"},EZ={key:0,class:"preview-controls"},TZ={class:"page-info"},AZ={class:"preview-content"},OZ={class:"sidebar-form"},CZ={class:"form-field"},RZ={for:"alfrescoNodeId"},IZ={class:"form-hint"},MZ={class:"insert-footer"},vZ={class:"insert-footer-info"},ZZ={key:0,class:"selected-info"},DZ={class:"selected-label"},wZ={class:"selected-name"},WZ={key:1,class:"error-msg"},LZ={class:"insert-footer-actions"},xg=Se({__name:"PdfToolsComponent",props:{toast:{type:Object,required:!0},id:{type:String,required:!0}},setup(a){const{t}=ta.useI18n(),n=a,i=e.ref(null),o=e.ref(null),r=e.ref([]),l=e.ref(!0),s=e.ref(null),c=e.ref(null),d=e.ref([]),u=e.ref(!1),b=e.ref(null),m=e.ref(1),p={SELECT:"select",REDACT:"redact",HIGHLIGHT:"highlight",COMMENT:"comment",IMAGE:"image",SIGNATURE:"signature",TEXT:"text"},g=e.ref(p.SELECT),_=e.ref([]),f=e.ref(null),h=e.ref(null),S=e.ref(null),y=e.ref(null),T=e.ref(!1),O=e.ref(null);let D=!1,I=null,C=!1,A=null;const w=e.ref(""),X=e.ref(-45),R=e.ref(5),Y=[{label:"Helvetica",value:"Helvetica"},{label:"Times New Roman",value:"TimesRoman"},{label:"Courier",value:"Courier"}],N=e.ref("Helvetica"),V=e.ref(18),le=e.ref("#000000"),Q=e.ref(null),fe=e.ref(!1),K=e.ref(null),ee=e.ref(""),G=e.ref(""),P=e.ref(null),pe=e.ref(null),U=e.ref(!1),B=e.ref(""),de=e.ref(""),ne=e.ref(null),se=e.computed(()=>B.value&&ze(B.value)?!0:!!(ne.value&&ne.value.id)),ge=e.ref(""),Ne=e.ref([]),Ce=e.ref(!1),Ye=e.ref(!1),Ue=e.ref([]),E=e.ref(!1),te=e.ref(!1),J=e.ref(null),{pdf:W}=Ya.usePDF(J),M=e.ref(1),L=e.ref(0),k=e.ref(null),{pdf:j}=Ya.usePDF(k);e.onMounted(()=>{const Z=n.id;Z?re(Z):(s.value=t("pdfTools.loadError"),l.value=!1)});const z=Z=>d.value.some(F=>F.pageIndex===Z.pageIndex),ae=Z=>{c.value=Z;const F=d.value.findIndex(q=>q.pageIndex===Z.pageIndex);F>-1?d.value.splice(F,1):d.value.push(Z)},re=async Z=>{l.value=!0,s.value=null;try{const F=await Re.getNode(Z);P.value=F,Q.value=F.parentId,G.value=F&&(F.name||F.properties&&F.properties["cm:name"])||"";const q=It.getContentUrl(Z);k.value=q;const H=await fetch(q);if(!H.ok)throw new Error(`HTTP error! status: ${H.status}`);const he=await H.arrayBuffer();o.value=new Uint8Array(he),await oe(o.value),r.value.length>0&&(c.value=r.value[0])}catch(F){console.error("Error loading PDF from Alfresco:",F),s.value=t("pdfTools.loadError")}finally{l.value=!1}},oe=async Z=>{i.value=await pt.PDFDocument.load(Z);const F=i.value.getPageCount();r.value=Array.from({length:F},(q,H)=>({pageIndex:H,pageNumber:H+1}))},be=async(Z,{updatePages:F=!0}={})=>{const q=await Z.save();o.value=q;const H=new Blob([q],{type:"application/pdf"});k.value&&k.value.startsWith("blob:")&&URL.revokeObjectURL(k.value),k.value=URL.createObjectURL(H),F&&await oe(q)},Xe=async()=>{if(o.value){l.value=!0;try{const Z=await pt.PDFDocument.create(),F=r.value.map(he=>he.pageIndex),q=await pt.PDFDocument.load(o.value);(await Z.copyPages(q,F)).forEach(he=>Z.addPage(he)),await be(Z)}catch(Z){console.error("Error reordering pages:",Z),s.value=t("pdfTools.reorderError")}finally{l.value=!1}}},ve=async Z=>{if(o.value){l.value=!0;try{const F=await pt.PDFDocument.load(o.value),q=F.getPage(Z.pageIndex),H=q.getRotation().angle;q.setRotation({type:pt.RotationTypes.Degrees,angle:(H+90)%360}),await be(F,{updatePages:!1})}catch(F){console.error("Error rotating page:",F),s.value=t("pdfTools.rotateError")}finally{l.value=!1}}},dt=async()=>{if(d.value.length===0||!o.value)return null;const Z=await pt.PDFDocument.create(),F=await pt.PDFDocument.load(o.value),q=d.value.map(he=>he.pageIndex).sort((he,$)=>he-$);return(await Z.copyPages(F,q)).forEach(he=>Z.addPage(he)),await Z.save()},At=async()=>{if(!(!o.value||d.value.length===0)){if(d.value.length===r.value.length){n.toast.add({severity:"warn",summary:t("pdfTools.common.warning"),detail:t("pdfTools.deleteAllPagesWarning"),life:3e3});return}l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=Z.getPageCount(),q=new Set(d.value.map(Oe=>Oe.pageIndex)),H=[];for(let Oe=0;Oe<F;Oe++)q.has(Oe)||H.push(Oe);const he=await pt.PDFDocument.create();(await he.copyPages(Z,H)).forEach(Oe=>he.addPage(Oe)),await be(he),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.deleted"),detail:t("pdfTools.pagesDeletedSuccess"),life:3e3})}catch(Z){console.error("Error deleting pages:",Z),s.value=t("pdfTools.deletePagesError")}finally{l.value=!1}}},mt=async()=>{B.value="",ne.value=null,de.value="",U.value=!0},me=Z=>{Z===2&&Ue.value.length===0&&!E.value&&tt()},ue=async()=>{let Z=null;if(ne.value?.id?Z=ne.value.id:B.value&&(Z=ze(B.value)),!Z){n.toast.add({severity:"warn",summary:t("pdfTools.common.warning"),detail:t("pdfTools.insertFromAlfresco.invalidInput"),life:3e3});return}await sa(Z),U.value=!1},ze=Z=>{if(!Z)return null;const F=Z.trim();if(/^[0-9a-fA-F-]{20,}$/.test(F))return F;const q=F.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);if(q&&q[1])return q[1];const H=F.match(/\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/);if(H&&H[2])return H[2];const he=F.match(/#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/);if(he&&he[1])return he[1];const $=F.match(/([0-9a-fA-F]{20,})/);return $&&$[1]?$[1]:null},He=async Z=>{if(Z?.content?.mimeType==="application/pdf"&&(ne.value=Z,de.value="",Z?.id)){te.value=!0,M.value=1,L.value=0;try{const F=It.getContentUrl(Z.id);J.value&&J.value.startsWith("blob:")&&URL.revokeObjectURL(J.value),J.value=F}catch(F){console.error("Error loading PDF preview:",F),J.value=null}finally{te.value=!1}}},st=()=>{M.value<L.value&&M.value++},Pt=()=>{M.value>1&&M.value--},Vt=Z=>{de.value="",Z.isFolder?(ne.value=null,de.value=t("pdfTools.insertFromAlfresco.folderSelectError")):Z.content?.mimeType!=="application/pdf"?(ne.value=null,de.value=t("pdfTools.insertFromAlfresco.fileTypeNotAllowedError")):He(Z)},jt=async()=>{if(Ye.value=!0,!ge.value||ge.value.trim().length<2){Ne.value=[];return}Ce.value=!0;try{const Z=Ci();await Z.queryStore(ge.value);const F=Z.entries.map(q=>q.entry||q);Ne.value=F.filter(q=>q.isFile&&q.content?.mimeType==="application/pdf")}catch(Z){console.error("performSearch",Z),Ne.value=[]}finally{Ce.value=!1}},tt=async()=>{E.value=!0;try{const Z=Wn();await Z.loadFavorites(),Ue.value=Z.fileFavorites.filter(F=>F?.target?.file?.content?.mimeType==="application/pdf").map(F=>F.target.file)}catch(Z){console.error("loadFavorites error:",Z),Ue.value=[]}finally{E.value=!1}},sa=async Z=>{if(o.value){l.value=!0;try{if((await Re.getNode(Z)).content?.mimeType!=="application/pdf")throw new Error(t("pdfTools.invalidNodeForInsert"));const H=await(await Re.getNodeContent(Z)).arrayBuffer(),he=new Uint8Array(H),$=await pt.PDFDocument.load(o.value),Oe=await pt.PDFDocument.load(he),Be=Oe.getPageCount(),$e=Array.from({length:Be},(St,ct)=>ct);(await $.copyPages(Oe,$e)).forEach(St=>$.addPage(St)),await be($),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.insertFromPristySuccess",{count:Be}),life:3e3})}catch(F){console.error("Error inserting from Alfresco:",F),s.value=F?.message||t("pdfTools.insertFromPristyError"),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:s.value,life:4e3})}finally{l.value=!1}}},Lt=async Z=>{const F=Z.files?.[0];F&&await kt(F)},kt=async Z=>{if(o.value){l.value=!0;try{const F=await pt.PDFDocument.load(o.value),q=new Uint8Array(await Z.arrayBuffer()),H=await pt.PDFDocument.load(q),he=H.getPageCount(),$=Array.from({length:he},(Be,$e)=>$e);(await F.copyPages(H,$)).forEach(Be=>F.addPage(Be)),await be(F),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.insertFromFileSuccess",{count:he}),life:3e3})}catch(F){console.error("Error inserting PDF:",F),s.value=t("pdfTools.insertError")}finally{l.value=!1}}},x=async()=>{if(!(!w.value||d.value.length===0||!o.value)){l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=d.value.map(q=>q.pageIndex);for(const q of F){const H=Z.getPage(q),{width:he,height:$}=H.getSize();for(let Oe=0;Oe<R.value;Oe++)H.drawText(w.value,{x:he/(R.value+1)*(Oe+1)-150,y:$/(R.value+1)*(Oe+1),size:50,color:pt.rgb(.95,.1,.1),opacity:.5,rotate:pt.degrees(X.value)})}await be(Z,{updatePages:!1})}catch(Z){console.error("Error adding watermark:",Z),s.value=t("pdfTools.watermarkError")}finally{l.value=!1}}},ie=async()=>{if(o.value){l.value=!0;try{const Z=new Blob([o.value],{type:"application/pdf"}),F=new File([Z],"modified.pdf",{type:"application/pdf"}),q={majorVersion:!0,comment:"File modified via Pristy Espaces PDF tools"};await Re.updateContentNode(n.id,F,q),n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.saveSuccess"),life:3e3})}catch(Z){console.error("Error saving changes:",Z),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:t("pdfTools.saveError"),life:3e3})}finally{l.value=!1}}},Te=async Z=>{if(K.value=Z,ee.value=t("pdfTools.saveAs.defaultFilename"),P.value&&P.value.parentId)try{pe.value=await Re.getNode(P.value.parentId)}catch(F){console.error("Could not fetch parent node for Save As dialog",F),pe.value=null}else pe.value=null;fe.value=!0},Pe=async({filename:Z,folderId:F})=>{fe.value=!1,l.value=!0;try{let q;if(K.value==="extract"?q=await dt():q=o.value,!q)throw new Error(t("pdfTools.noContentToSave"));const H=new Blob([q],{type:"application/pdf"}),he=new File([H],Z,{type:"application/pdf"});if(!F)throw new Error("No destination folder selected.");await It.uploadFile(F,{},he),n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.fileCreatedSuccess",{filename:Z}),life:3e3})}catch(q){console.error('Error during "Save As":',q);const H=q.status===409?t("pdfTools.saveAs.conflictError"):t("pdfTools.saveAsError");n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:H,life:4e3})}finally{l.value=!1}},ut=Z=>{b.value=Z||c.value,u.value=!0,m.value=1,_.value=[],setTimeout(Ra,200)},bt=()=>{u.value=!1,b.value=null},Ze=()=>{m.value=Math.min(4,m.value+.1)},Me=()=>{m.value=Math.max(.2,m.value-.1)},xe=Z=>{Z===p.REDACT?window.confirm(t("pdfTools.redactWarning"))&&(g.value=Z):g.value=Z},Ct=Z=>{f.value=Z.files?.[0]||null,f.value&&(h.value=null,g.value=p.IMAGE)},ft=()=>{T.value=!0},Ua=()=>{_.value.pop(),Bt()},nn=async Z=>{if(!(!Z||Z.type!==p.IMAGE||Z._loading||Z._bitmap)){Z._loading=!0;try{let F=null;Z.payload?.file?F=Z.payload.file:Z.payload?.signature&&(F=new Blob([new Uint8Array(Z.payload.signature)],{type:"image/png"})),F&&(Z._bitmap=await createImageBitmap(F),Bt())}catch(F){console.warn(t("pdfTools.imagePreviewUnavailable"),F)}finally{Z._loading=!1}}},on=()=>{const Z=S.value;if(!Z)return null;const F=Array.from(Z.querySelectorAll("canvas"));if(F.length===0)return null;const q=F.filter(Oe=>Oe.offsetParent!==null&&Oe.width>0&&Oe.height>0),H=q.length?q:F;let he=H[0],$=0;for(const Oe of H){const Be=Oe.getBoundingClientRect(),$e=Math.max(0,Be.width)*Math.max(0,Be.height);$e>$&&(he=Oe,$=$e)}return he},Ra=()=>{const Z=on();if(!Z||!y.value)return;const F=Z.getBoundingClientRect(),q=window.devicePixelRatio||1;y.value.style.width=F.width+"px",y.value.style.height=F.height+"px",y.value.width=Math.round(F.width*q),y.value.height=Math.round(F.height*q),Bt()},ha=Z=>{const F=y.value;if(!F)return{x:0,y:0};const q=F.getBoundingClientRect(),H=window.devicePixelRatio||1;return{x:(Z.clientX-q.left)*H,y:(Z.clientY-q.top)*H}};let wa=null,Kt=null,ja=null,ya=null;const rn=Z=>{for(let F=_.value.length-1;F>=0;F--){const q=_.value[F].rect;if(Z.x>=q.x&&Z.x<=q.x+q.w&&Z.y>=q.y&&Z.y<=q.y+q.h)return F}return-1},zi=Z=>{const H=6*(window.devicePixelRatio||1)/2;for(let he=_.value.length-1;he>=0;he--){const $=_.value[he];if($.type!==p.IMAGE&&$.type!==p.TEXT)continue;const Oe=$.rect,Be=[{key:"tl",x:Oe.x,y:Oe.y},{key:"tr",x:Oe.x+Oe.w,y:Oe.y},{key:"bl",x:Oe.x,y:Oe.y+Oe.h},{key:"br",x:Oe.x+Oe.w,y:Oe.y+Oe.h}];for(const $e of Be)if(Z.x>=$e.x-H&&Z.x<=$e.x+H&&Z.y>=$e.y-H&&Z.y<=$e.y+H)return{idx:he,corner:$e.key}}return null},Gi=Z=>{if(g.value===p.REDACT||g.value===p.HIGHLIGHT||g.value===p.TEXT)C=!0,A=ha(Z);else if(g.value===p.COMMENT){const F=ha(Z),q=window.prompt(t("pdfTools.pageEditor.commentPrompt"));q&&(_.value.push({type:p.COMMENT,rect:{x:F.x,y:F.y,w:24,h:24},payload:{text:q}}),Bt())}else if(g.value===p.IMAGE||g.value===p.SELECT||g.value===p.TEXT){const F=ha(Z),q=zi(F);if(q){ja=q.idx,ya=q.corner,Kt={p:F,rect:{..._.value[q.idx].rect}},y.value&&(y.value.style.cursor="nwse-resize");return}const H=rn(F);if(H!==-1&&(_.value[H].type===p.IMAGE||_.value[H].type===p.TEXT)){wa=H,Kt={p:F,rect:{..._.value[H].rect}},y.value&&(y.value.style.cursor="move");return}if(g.value===p.IMAGE){if(!f.value&&!h.value)return;const he={type:p.IMAGE,rect:{x:F.x,y:F.y,w:150,h:100},payload:{file:f.value,signature:h.value}};_.value.push(he),nn(he),Bt(),g.value=p.SELECT,f.value=null,h.value=null}}},Fi=Z=>{if(ja!==null&&ya){const q=ha(Z),H=_.value[ja];if(H){const he=Kt.rect;let $=he.x,Oe=he.y,Be=he.w,$e=he.h;const De=q.x-Kt.p.x,St=q.y-Kt.p.y;ya==="br"?(Be=Math.max(10,he.w+De),$e=Math.max(10,he.h+St)):ya==="tr"?(Be=Math.max(10,he.w+De),$e=Math.max(10,he.h-St),Oe=he.y+St):ya==="bl"?(Be=Math.max(10,he.w-De),$=he.x+De,$e=Math.max(10,he.h+St)):ya==="tl"&&(Be=Math.max(10,he.w-De),$=he.x+De,$e=Math.max(10,he.h-St),Oe=he.y+St),H.rect.x=$,H.rect.y=Oe,H.rect.w=Be,H.rect.h=$e,Bt()}return}if(wa!==null){const q=ha(Z),H=_.value[wa];if(H){const he=q.x-Kt.p.x,$=q.y-Kt.p.y;H.rect.x=Kt.rect.x+he,H.rect.y=Kt.rect.y+$,Bt()}return}if(!C||!A)return;const F=ha(Z);ca.value={x:Math.min(A.x,F.x),y:Math.min(A.y,F.y),w:Math.abs(F.x-A.x),h:Math.abs(F.y-A.y)},Bt()},fa=()=>{if(wa!==null||ja!==null){wa=null,ja=null,ya=null,Kt=null,y.value&&(y.value.style.cursor="crosshair"),Bt();return}if(C&&ca.value)if(g.value===p.TEXT){const Z=window.prompt(t("pdfTools.pageEditor.addTextPrompt"));Z&&Z.trim().length>0&&_.value.push({type:p.TEXT,rect:{...ca.value},payload:{text:Z,font:N.value,size:V.value,color:le.value}})}else _.value.push({type:g.value,rect:{...ca.value}});C=!1,A=null,ca.value=null,Bt()},Un=()=>{C&&(C=!1,A=null,ca.value=null,Bt())},ca=e.ref(null),Bt=()=>{const Z=wa,F=y.value;if(!F)return;const q=F.getContext("2d"),H=window.devicePixelRatio||1;q.clearRect(0,0,F.width,F.height);const he=($,Oe)=>{if($.type===p.REDACT)q.fillStyle="rgba(0,0,0,1)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle="rgba(0,0,0,1)",q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h);else if($.type===p.HIGHLIGHT)q.fillStyle="rgba(255, 235, 59, 0.4)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle="rgba(255, 193, 7, 0.8)",q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h);else if($.type===p.COMMENT)Vi(q,$.rect.x,$.rect.y,20*H);else if($.type===p.IMAGE){if(nn($),$._bitmap&&q.drawImage($._bitmap,$.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle=Oe===Z?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=Oe===Z?2*H:1*H,q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),Oe===Z){q.fillStyle="#0ea5e9";const Be=6*H,$e=Be/2;[[$.rect.x,$.rect.y],[$.rect.x+$.rect.w,$.rect.y],[$.rect.x,$.rect.y+$.rect.h],[$.rect.x+$.rect.w,$.rect.y+$.rect.h]].forEach(([St,ct])=>{q.fillRect(St-$e,ct-$e,Be,Be)})}}else if($.type===p.TEXT){const Be=$.payload||{},$e=Math.max(8,Be.size||18);q.save(),q.fillStyle="rgba(255,255,255,0.35)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.fillStyle=Be.color||"#000",q.font=`${$e}px ${Be.font||"Helvetica"}`,q.textBaseline="top";const De=4*H,St=Math.max(0,$.rect.w-2*De),ct=Xi(q,String(Be.text||""),St);let et=$.rect.y+De;for(const xt of ct)if(q.fillText(xt,$.rect.x+De,et),et+=$e*1.2,et>$.rect.y+$.rect.h-De)break;if(q.strokeStyle=Oe===Z?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=Oe===Z?2*H:1*H,q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),Oe===Z){q.fillStyle="#0ea5e9";const xt=6*H,zt=xt/2;[[$.rect.x,$.rect.y],[$.rect.x+$.rect.w,$.rect.y],[$.rect.x,$.rect.y+$.rect.h],[$.rect.x+$.rect.w,$.rect.y+$.rect.h]].forEach(([rt,Ee])=>{q.fillRect(rt-zt,Ee-zt,xt,xt)})}q.restore()}};if(_.value.forEach(he),ca.value){const $=ca.value;q.setLineDash([6*H,4*H]),q.strokeStyle=g.value===p.REDACT?"black":"goldenrod",q.strokeRect($.x,$.y,$.w,$.h),q.setLineDash([])}},Xi=(Z,F,q)=>{const H=F.split(/\s+/),he=[];let $="";for(const Oe of H){const Be=$?$+" "+Oe:Oe;Z.measureText(Be).width<=q||$===""?$=Be:(he.push($),$=Oe)}return $&&he.push($),he},Pi=Z=>{let F=Z.toString().trim();F.startsWith("#")&&(F=F.slice(1)),F.length===3&&(F=F.split("").map(Oe=>Oe+Oe).join(""));const q=parseInt(F||"000000",16),H=(q>>16&255)/255,he=(q>>8&255)/255,$=(q&255)/255;return{r:H,g:he,b:$}},ln=(Z,F,q,H)=>{const he=String(F).split(/\s+/),$=[];let Oe="";for(const Be of he){const $e=Oe?Oe+" "+Be:Be;Z.widthOfTextAtSize($e,q)<=H||Oe===""?Oe=$e:($.push(Oe),Oe=Be)}return Oe&&$.push(Oe),$},Vi=(Z,F,q,H)=>{Z.save(),Z.translate(F,q),Z.fillStyle="#FFEB3B",Z.strokeStyle="#FBC02D",Z.lineWidth=2,Z.beginPath(),Z.rect(0,0,H,H),Z.fill(),Z.stroke(),Z.beginPath(),Z.moveTo(H*.6,0),Z.lineTo(H,H*.4),Z.lineTo(H*.6,H*.4),Z.closePath(),Z.fillStyle="#FDD835",Z.fill(),Z.restore()},_e=async()=>{if(!(!o.value||!b.value)){l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=b.value.pageIndex;let q=Z.getPage(F);const{width:H,height:he}=q.getSize(),$=on();if(!$)throw new Error(t("pdfTools.pdfRenderCanvasNotFound"));if(_.value.some(rt=>rt.type===p.REDACT)){if(!window.confirm(t("pdfTools.redactFlattenConfirm"))){l.value=!1;return}const Ee=Math.max(2,Math.ceil($.width/$.getBoundingClientRect().width||window.devicePixelRatio||1)),Ie=document.createElement("canvas"),Ve=$.width/$.height;Ie.width=Math.round($.width*Ee),Ie.height=Math.round($.height*Ee);const Ke=Ie.getContext("2d");Ke.imageSmoothingEnabled=!1,Ke.drawImage($,0,0,$.width,$.height,0,0,Ie.width,Ie.height);const Et=Ie.toDataURL("image/jpeg",.5),Gt=await(await fetch(Et)).arrayBuffer(),Cn=await Z.embedJpg(Gt),Ba=Z.insertPage(F+1,[H,he]);Ba.drawImage(Cn,{x:0,y:0,width:H,height:he}),q=Ba}const Be=$.getBoundingClientRect(),$e=$.width,De=$.height,St=window.devicePixelRatio||1,ct=$e/Be.width,et=De/Be.height,xt=H/$e,zt=he/De;for(const rt of _.value){const Ee=rt.rect.x/St,Ie=rt.rect.y/St,Ve=rt.rect.w/St,Ke=rt.rect.h/St,Et=Ee*ct,Gt=Ie*et,Cn=Ve*ct,Ba=Ke*et,Hn=Cn*xt,Rn=Ba*zt,In=Et*xt,cn=he-(Gt+Ba)*zt;if(rt.type===p.REDACT)q.drawRectangle({x:In,y:cn,width:Hn,height:Rn,color:pt.rgb(0,0,0)});else if(rt.type===p.HIGHLIGHT)q.drawRectangle({x:In,y:cn,width:Hn,height:Rn,color:pt.rgb(1,.92,.23),opacity:.4});else if(rt.type===p.COMMENT){if(q.drawRectangle({x:In,y:cn,width:Math.max(14,Hn),height:Math.max(14,Rn),color:pt.rgb(1,.92,.23),opacity:.9}),rt.payload?.text){const qt=String(rt.payload.text).slice(0,200);q.drawText(`Note: ${qt}`,{x:In+2,y:cn+Rn+2,size:8,color:pt.rgb(.2,.2,.2)})}}else if(rt.type===p.IMAGE){let qt=null;if(rt.payload?.file?qt=await rt.payload.file.arrayBuffer():rt.payload?.signature&&(qt=rt.payload.signature),qt){let Jn;try{Jn=await Z.embedPng(qt)}catch{Jn=await Z.embedJpg(qt)}q.drawImage(Jn,{x:In,y:cn,width:Hn,height:Rn,opacity:.98})}}else if(rt.type===p.TEXT){const qt=rt.payload||{},Jn=qt.font==="TimesRoman"?pt.StandardFonts.TimesRoman:qt.font==="Courier"?pt.StandardFonts.Courier:pt.StandardFonts.Helvetica,u_=await Z.embedFont(Jn),Ui=Math.max(6,Number(qt.size)||18),{r:xk,g:zk,b:Gk}=Pi(qt.color||"#000000"),xc=2,Fk=Math.max(1,Hn-2*xc),Xk=ln(u_,String(qt.text||""),Ui,Fk);let zc=cn+Rn-Ui-xc;for(const Pk of Xk)if(q.drawText(Pk,{x:In+xc,y:zc,size:Ui,color:pt.rgb(xk,zk,Gk)}),zc-=Ui*1.2,zc<cn)break}}const Wa=_.value.some(rt=>rt.type===p.REDACT);Wa&&Z.removePage(F),await be(Z,{updatePages:Wa}),_.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.pageEditor.applySuccess"),life:2e3})}catch(Z){console.error("Error applying overlay edits:",Z),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:t("pdfTools.pageEditor.applyError"),life:3e3})}finally{l.value=!1}}};e.watch(m,()=>setTimeout(Ra,0)),e.watch(b,()=>setTimeout(Ra,0)),typeof window<"u"&&window.addEventListener("resize",()=>setTimeout(Ra,0));const We=()=>{m.value=1,setTimeout(Ra,0)},Je=()=>{const Z=O.value;if(!Z)return;const F=window.devicePixelRatio||1,q=440,H=180;Z.style.width=q+"px",Z.style.height=H+"px",Z.width=Math.round(q*F),Z.height=Math.round(H*F);const he=Z.getContext("2d");he.fillStyle="#fff",he.fillRect(0,0,Z.width,Z.height)},ot=()=>{On(),T.value=!1},Nt=Z=>{D=!0,I=Ht(Z)},Ut=Z=>{if(!D)return;const F=Ht(Z);jn(I,F),I=F},Na=Z=>Nt(Z.touches[0]),sn=Z=>Ut(Z.touches[0]),Zt=()=>{D=!1,I=null},Ht=Z=>{const q=O.value.getBoundingClientRect(),H=window.devicePixelRatio||1,he=Z.clientX??Z.pageX,$=Z.clientY??Z.pageY;return{x:(he-q.left)*H,y:($-q.top)*H}},jn=(Z,F)=>{const H=O.value.getContext("2d");H.strokeStyle="#111827",H.lineWidth=3*(window.devicePixelRatio||1),H.lineCap="round",H.beginPath(),H.moveTo(Z.x,Z.y),H.lineTo(F.x,F.y),H.stroke()},On=()=>{const Z=O.value;if(!Z)return;const F=Z.getContext("2d");F.fillStyle="#fff",F.fillRect(0,0,Z.width,Z.height)},Bn=()=>{const Z=O.value;Z&&Z.toBlob(async F=>{h.value=await F.arrayBuffer(),g.value=p.IMAGE,T.value=!1})};return e.watch(T,Z=>{Z&&setTimeout(Je,0)}),e.watch(W,async Z=>{if(!Z){L.value=0;return}try{const F=await Z;L.value=F.numPages}catch(F){console.error("Error loading preview PDF:",F),L.value=0}}),(Z,F)=>{const q=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",dv,[e.createElementVNode("h1",null,[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.title"))+" ",1),G.value?(e.openBlock(),e.createElementBlock("span",mv,"— "+e.toDisplayString(G.value),1)):e.createCommentVNode("",!0)]),l.value?(e.openBlock(),e.createElementBlock("div",pv,[e.createVNode(e.unref(ea)),e.createElementVNode("p",null,e.toDisplayString(Z.$t("pdfTools.loading")),1)])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",uv,[e.createVNode(e.unref(da),{severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})])):e.createCommentVNode("",!0),!l.value&&!s.value?(e.openBlock(),e.createElementBlock("div",bv,[e.createElementVNode("div",gv,[e.createElementVNode("div",_v,[e.createElementVNode("h2",null,e.toDisplayString(Z.$t("pdfTools.sidebar.actions")),1),e.createElementVNode("div",hv,[e.createVNode(e.unref(ce),{icon:"ri-save-2-line",label:Z.$t("pdfTools.sidebar.saveNewVersion"),onClick:ie},null,8,["label"]),e.createVNode(e.unref(ce),{severity:"secondary",class:"btn-mt",icon:"ri-file-copy-2-line",label:Z.$t("pdfTools.sidebar.saveAs"),onClick:F[0]||(F[0]=H=>Te("saveAs"))},null,8,["label"]),e.createVNode(e.unref(Ha)),e.createElementVNode("div",yv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.extractPages")),1),e.createVNode(e.unref(ce),{disabled:d.value.length===0,icon:"ri-file-transfer-line",label:Z.$t("pdfTools.sidebar.extractAndSave"),onClick:F[1]||(F[1]=H=>Te("extract"))},null,8,["disabled","label"])]),e.createElementVNode("div",fv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.deletePages")),1),e.createVNode(e.unref(ce),{disabled:d.value.length===0||r.value.length===d.value.length,severity:"danger",icon:"ri-delete-bin-line",label:Z.$t("pdfTools.sidebar.deleteSelectedPages"),onClick:At},null,8,["disabled","label"])]),e.createElementVNode("div",Nv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.insertPdf")),1),e.createElementVNode("div",Sv,[e.createVNode(e.unref(un),{auto:!1,customUpload:!1,showCancelButton:!1,showUploadButton:!1,accept:"application/pdf","choose-label":Z.$t("pdfTools.sidebar.fromComputer"),severity:"secondary",class:"btn-full",mode:"basic",name:"pdfToInsert",onSelect:Lt},null,8,["choose-label"]),e.createVNode(e.unref(ce),{severity:"secondary",icon:"ri-cloud-line",label:Z.$t("pdfTools.sidebar.fromPristy"),onClick:mt},null,8,["label"])])]),e.createElementVNode("div",Ev,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.addWatermark")),1),e.createVNode(e.unref(at),{modelValue:w.value,"onUpdate:modelValue":F[2]||(F[2]=H=>w.value=H),placeholder:Z.$t("pdfTools.sidebar.watermarkTextPlaceholder"),type:"text"},null,8,["modelValue","placeholder"]),e.createElementVNode("div",Tv,[e.createElementVNode("div",null,[e.createVNode(e.unref(ka),{modelValue:X.value,"onUpdate:modelValue":F[3]||(F[3]=H=>X.value=H),max:360,min:-360,placeholder:Z.$t("pdfTools.sidebar.angle"),suffix:"°"},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",null,[e.createVNode(e.unref(ka),{modelValue:R.value,"onUpdate:modelValue":F[4]||(F[4]=H=>R.value=H),max:10,min:1,placeholder:Z.$t("pdfTools.sidebar.repetitions")},null,8,["modelValue","placeholder"])])]),e.createVNode(e.unref(ce),{disabled:!w.value||d.value.length===0,severity:"secondary",class:"btn-mt",icon:"ri-paint-brush-line",label:Z.$t("pdfTools.sidebar.addWatermarkButton"),onClick:x},null,8,["disabled","label"])])])])]),e.createElementVNode("div",Av,[e.createElementVNode("h2",null,e.toDisplayString(Z.$t("pdfTools.pagePreview.title")),1),e.createVNode(e.unref(R_.VueDraggableNext),{modelValue:r.value,"onUpdate:modelValue":F[5]||(F[5]=H=>r.value=H),class:"page-grid","ghost-class":"ghost","item-key":"pageIndex",onEnd:Xe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.pageIndex,class:"page-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass([{selected:z(H)},"page-thumbnail"]),onClick:he=>ae(H),onDblclick:e.withModifiers(he=>ut(H),["stop"])},[e.createElementVNode("div",Cv,[e.createVNode(e.unref(ma),{binary:"","model-value":z(H)},null,8,["model-value"])]),e.createElementVNode("div",Rv,[e.createVNode(e.unref(ce),{text:"",rounded:"",icon:"ri-clockwise-line",onClick:e.withModifiers(he=>ve(H),["stop"])},null,8,["onClick"]),e.createVNode(e.unref(ce),{"aria-label":Z.$t("pdfTools.pagePreview.openPagePreview",{pageNumber:H.pageNumber}),text:"",rounded:"",icon:"ri-edit-box-line",onClick:e.withModifiers(he=>ut(H),["stop"])},null,8,["aria-label","onClick"])]),e.createElementVNode("div",Iv,[e.createVNode(e.unref(Ya.VuePDF),{annotations:!1,page:H.pageNumber,pdf:e.unref(j),scale:.25,text:!1},null,8,["page","pdf"])]),e.createElementVNode("div",Mv,e.toDisplayString(H.pageNumber),1)],42,Ov)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(_t),{visible:u.value,"onUpdate:visible":F[14]||(F[14]=H=>u.value=H),breakpoints:{"960px":"95vw","640px":"100vw"},dismissableMask:"",modal:"",class:"dialog-page-editor","content-class":"page-editor-dialog",onHide:bt},{header:e.withCtx(()=>[e.createElementVNode("div",vv,[F[21]||(F[21]=e.createElementVNode("i",{class:"ri-file-fill"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.title",{pageNumber:(b.value||c.value)?.pageNumber||"",filename:G.value})),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xv,[e.createElementVNode("small",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.footerHint")),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Zv,[e.createVNode(e.unref(ce),{text:"",icon:"ri-zoom-out-line",onClick:Me}),e.createVNode(e.unref(ce),{text:"",icon:"ri-zoom-in-line",onClick:Ze}),e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.pageEditor.fit"),onClick:We},null,8,["label"]),e.createElementVNode("span",Dv,e.toDisplayString(Math.round(m.value*100))+"%",1),F[22]||(F[22]=e.createElementVNode("span",{class:"spacer"},null,-1)),e.createVNode(e.unref(ce),{text:"",icon:"ri-close-line",label:Z.$t("pdfTools.pageEditor.close"),onClick:bt},null,8,["label"])]),e.createElementVNode("div",wv,[e.createElementVNode("div",Wv,[e.createElementVNode("h4",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.actions")),1),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.SELECT}),icon:"ri-cursor-line",label:Z.$t("pdfTools.pageEditor.tools.select"),onClick:F[6]||(F[6]=H=>xe(p.SELECT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.REDACT}),icon:"ri-eraser-fill",label:Z.$t("pdfTools.pageEditor.tools.redact"),onClick:F[7]||(F[7]=H=>xe(p.REDACT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.HIGHLIGHT}),icon:"ri-mark-pen-line",label:Z.$t("pdfTools.pageEditor.tools.highlight"),onClick:F[8]||(F[8]=H=>xe(p.HIGHLIGHT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.COMMENT}),icon:"ri-sticky-note-line",label:Z.$t("pdfTools.pageEditor.tools.comment"),onClick:F[9]||(F[9]=H=>xe(p.COMMENT))},null,8,["class","label"]),e.createVNode(e.unref(un),{severity:"secondary",class:e.normalizeClass({active:g.value===p.IMAGE}),accept:"image/*","choose-label":Z.$t("pdfTools.pageEditor.tools.image"),mode:"basic",name:"image",onSelect:Ct},null,8,["class","choose-label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.SIGNATURE}),icon:"ri-ball-pen-line",label:Z.$t("pdfTools.pageEditor.tools.signature"),onClick:ft},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.TEXT}),icon:"ri-font-size",label:Z.$t("pdfTools.pageEditor.tools.text"),onClick:F[10]||(F[10]=H=>xe(p.TEXT))},null,8,["class","label"]),g.value===p.TEXT?(e.openBlock(),e.createElementBlock("div",Lv,[e.createElementVNode("div",Yv,[e.createElementVNode("label",kv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.font")),1),e.createVNode(e.unref($t),{modelValue:N.value,"onUpdate:modelValue":F[11]||(F[11]=H=>N.value=H),options:Y,class:"input-full",optionLabel:"label",optionValue:"value"},null,8,["modelValue"])]),e.createElementVNode("div",xv,[e.createElementVNode("label",zv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.size")),1),e.createVNode(e.unref(ka),{modelValue:V.value,"onUpdate:modelValue":F[12]||(F[12]=H=>V.value=H),max:144,min:6},null,8,["modelValue"])]),e.createElementVNode("div",Gv,[e.createElementVNode("label",Fv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.color")),1),e.createVNode(e.unref(at),{modelValue:le.value,"onUpdate:modelValue":F[13]||(F[13]=H=>le.value=H),class:"input-full",placeholder:"#000000"},null,8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(Ha)),e.createVNode(e.unref(ce),{disabled:_.value.length===0,severity:"info",class:"btn-full btn-mt-auto",icon:"ri-check-line",label:Z.$t("pdfTools.pageEditor.apply"),onClick:_e},null,8,["disabled","label"]),e.createVNode(e.unref(ce),{disabled:_.value.length===0,severity:"warn",class:"btn-full btn-mt-sm",icon:"ri-arrow-go-back-line",label:Z.$t("pdfTools.pageEditor.cancel"),onClick:Ua},null,8,["disabled","label"])]),e.createElementVNode("div",{class:"page-editor-canvas",onWheelPassive:Ra,onScrollPassive:Ra},[e.createElementVNode("div",{ref_key:"pdfCanvasWrapper",ref:S,class:"pdf-canvas-wrapper"},[e.unref(j)&&(b.value||c.value)?(e.openBlock(),e.createBlock(e.unref(Ya.VuePDF),{key:0,annotations:!1,page:(b.value||c.value).pageNumber,pdf:e.unref(j),scale:m.value,text:!1,class:"pdf-canvas-absolute"},null,8,["page","pdf","scale"])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{ref_key:"overlayCanvas",ref:y,class:"overlay-canvas",onMousedown:Gi,onMouseleave:Un,onMousemove:Fi,onMouseup:fa},null,544)],512)],32)])]),_:1},8,["visible"]),e.createVNode(e.unref(_t),{visible:T.value,"onUpdate:visible":F[15]||(F[15]=H=>T.value=H),modal:"",class:"dialog-signature-pad",onHide:ot},{header:e.withCtx(()=>[e.createElementVNode("div",Pv,[F[23]||(F[23]=e.createElementVNode("i",{class:"ri-ball-pen-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.signaturePad.title")),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uv,[e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.signaturePad.clear"),onClick:On},null,8,["label"]),e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.signaturePad.use"),onClick:Bn},null,8,["label"])])]),default:e.withCtx(()=>[e.createElementVNode("div",Vv,[e.createElementVNode("canvas",{ref_key:"signaturePadCanvas",ref:O,class:"signature-canvas",onMousedown:Nt,onMouseleave:Zt,onMousemove:Ut,onMouseup:Zt,onTouchstart:e.withModifiers(Na,["prevent"]),onTouchmove:e.withModifiers(sn,["prevent"]),onTouchend:e.withModifiers(Zt,["prevent"])},null,544)])]),_:1},8,["visible"]),e.createVNode(cv,{"default-filename":ee.value,visible:fe.value,"parent-folder-node":pe.value,onClose:F[16]||(F[16]=H=>fe.value=!1),onSave:Pe},null,8,["default-filename","visible","parent-folder-node"]),e.createVNode(e.unref(_t),{visible:U.value,modal:"",header:Z.$t("pdfTools.insertFromAlfresco.title"),class:"dialog-insert-pdf","onUpdate:visible":F[20]||(F[20]=H=>U.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",MZ,[e.createElementVNode("div",vZ,[ne.value?(e.openBlock(),e.createElementBlock("div",ZZ,[e.createElementVNode("span",DZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selected")),1),e.withDirectives((e.openBlock(),e.createElementBlock("span",wZ,[e.createTextVNode(e.toDisplayString(ne.value?.name),1)])),[[q,ne.value?.name,void 0,{top:!0}]])])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",WZ,e.toDisplayString(de.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",LZ,[e.createVNode(e.unref(ce),{label:Z.$t("pdfTools.insertFromAlfresco.cancel"),text:"",onClick:F[19]||(F[19]=H=>U.value=!1)},null,8,["label"]),e.createVNode(e.unref(ce),{disabled:!se.value,label:Z.$t("pdfTools.insertFromAlfresco.insert"),icon:"ri-add-line",onClick:ue},null,8,["disabled","label"])])])]),default:e.withCtx(()=>[e.createVNode(e.unref(Kn),{value:0,"onUpdate:value":me},{default:e.withCtx(()=>[e.createVNode(e.unref(qn),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja),{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.browse")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.search")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.favorites")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.linkOrId")),1)]),_:1})]),_:1}),e.createVNode(e.unref(ji),null,{default:e.withCtx(()=>[e.createVNode(e.unref(mn),{value:0},{default:e.withCtx(()=>[e.createVNode(en,{showUserHome:"",showFiles:"",onSelectNode:Vt})]),_:1}),e.createVNode(e.unref(mn),{value:1},{default:e.withCtx(()=>[e.createElementVNode("div",jv,[e.createVNode(e.unref(at),{modelValue:ge.value,"onUpdate:modelValue":F[17]||(F[17]=H=>ge.value=H),placeholder:Z.$t("pdfTools.insertFromAlfresco.searchPlaceholder"),onKeyup:e.withKeys(jt,["enter"])},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(ce),{icon:"ri-search-line",onClick:jt})]),Ce.value?(e.openBlock(),e.createElementBlock("div",Bv,[e.createVNode(e.unref(ea),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.searching")),1)])):!Ne.value.length&&Ye.value?(e.openBlock(),e.createElementBlock("div",Hv,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.noPdfFound")),1)):Ne.value.length?(e.openBlock(),e.createElementBlock("div",Jv,[e.createElementVNode("div",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":ne.value?.id===H.id}]),onClick:he=>He(H)},[e.createElementVNode("div",qv,[F[24]||(F[24]=e.createElementVNode("i",{class:"ri-file-pdf-line"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",$v,[e.createTextVNode(e.toDisplayString(H.name),1)])),[[q,H.name,void 0,{top:!0}]])])],10,Kv))),128))]),e.createElementVNode("div",eZ,[ne.value?te.value?(e.openBlock(),e.createElementBlock("div",nZ,[e.createVNode(e.unref(ea),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",iZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(W)?(e.openBlock(),e.createElementBlock("div",oZ,[L.value>0?(e.openBlock(),e.createElementBlock("div",rZ,[e.createVNode(e.unref(ce),{icon:"ri-arrow-left-s-line",text:"",size:"small",disabled:M.value<=1,onClick:Pt},null,8,["disabled"]),e.createElementVNode("span",lZ,e.toDisplayString(M.value)+" / "+e.toDisplayString(L.value),1),e.createVNode(e.unref(ce),{icon:"ri-arrow-right-s-line",text:"",size:"small",disabled:M.value>=L.value,onClick:st},null,8,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",sZ,[e.createVNode(e.unref(Ya.VuePDF),{pdf:e.unref(W),page:M.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tZ,[F[25]||(F[25]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon"},null,-1)),e.createElementVNode("p",aZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(mn),{value:2},{default:e.withCtx(()=>[E.value?(e.openBlock(),e.createElementBlock("div",cZ,[e.createVNode(e.unref(ea),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loading")),1)])):Ue.value.length?(e.openBlock(),e.createElementBlock("div",mZ,[e.createElementVNode("div",pZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":ne.value?.id===H.id}]),onClick:he=>He(H)},[e.createElementVNode("div",bZ,[F[26]||(F[26]=e.createElementVNode("i",{class:"ri-file-pdf-line"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",gZ,[e.createTextVNode(e.toDisplayString(H.name),1)])),[[q,H.name,void 0,{top:!0}]])])],10,uZ))),128))]),e.createElementVNode("div",_Z,[ne.value?te.value?(e.openBlock(),e.createElementBlock("div",fZ,[e.createVNode(e.unref(ea),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",NZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(W)?(e.openBlock(),e.createElementBlock("div",SZ,[L.value>0?(e.openBlock(),e.createElementBlock("div",EZ,[e.createVNode(e.unref(ce),{icon:"ri-arrow-left-s-line",text:"",size:"small",disabled:M.value<=1,onClick:Pt},null,8,["disabled"]),e.createElementVNode("span",TZ,e.toDisplayString(M.value)+" / "+e.toDisplayString(L.value),1),e.createVNode(e.unref(ce),{icon:"ri-arrow-right-s-line",text:"",size:"small",disabled:M.value>=L.value,onClick:st},null,8,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",AZ,[e.createVNode(e.unref(Ya.VuePDF),{pdf:e.unref(W),page:M.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",hZ,[F[27]||(F[27]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon"},null,-1)),e.createElementVNode("p",yZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):(e.openBlock(),e.createElementBlock("div",dZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.noPdfFavorite")),1))]),_:1}),e.createVNode(e.unref(mn),{value:3},{default:e.withCtx(()=>[e.createElementVNode("div",OZ,[e.createElementVNode("div",CZ,[e.createElementVNode("label",RZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")),1),e.createVNode(e.unref(at),{id:"alfrescoNodeId",modelValue:B.value,"onUpdate:modelValue":F[18]||(F[18]=H=>B.value=H),placeholder:Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")},null,8,["modelValue","placeholder"]),e.createElementVNode("small",IZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")),1)])])]),_:1})]),_:1})]),_:1})]),_:1},8,["visible","header"])])}}},[["__scopeId","data-v-e46531e9"]]),YZ={class:"version-selectors"},kZ={class:"version-selector-group"},xZ={key:0,class:"flex align-items-center gap-2"},zZ={key:1},GZ={class:"flex align-items-center gap-2"},FZ={class:"version-selector-group"},XZ={key:0,class:"flex align-items-center gap-2"},PZ={key:1},VZ={class:"flex align-items-center gap-2"},UZ={key:0,class:"diff-content"},jZ={class:"diff-headers"},BZ={class:"header-a"},HZ={class:"header-b"},JZ={class:"diff-viewer"},QZ={key:0,class:"loading-container"},KZ={key:1,class:"error-container"},Ec=Se({__name:"DiffViewerDialog",props:{visible:{type:Boolean,required:!0},contentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]}},emits:["update:visible","revertVersion"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=pa.useToast(),{isDarkMode:o}=Ei(),r=a,l=t,s=e.ref(r.visible),c=e.ref(null),d=e.ref(null),u=e.ref(""),b=e.ref(""),m=e.ref(!1),p=e.ref(null),g=e.ref(null),_=e.ref(null),f=e.computed(()=>{if(!r.versions)return[];const w=r.versions.map(X=>({label:`${n("diffViewer.version")} ${X.entry.id} (${new Date(X.entry.modifiedAt).toLocaleDateString()})`,id:X.entry.id})).reverse();return w.map((X,R)=>({...X,isCurrent:R===w.length-1}))}),h=e.computed(()=>f.value.filter(w=>w.id!==d.value)),S=e.computed(()=>f.value.filter(w=>w.id!==c.value)),y=e.computed(()=>{switch(r.contentNode?.content?.mimeType||""){case"text/html":return[Uc.html()];case"text/markdown":case"text/x-markdown":return[ni.markdown()];case"application/json":return[Ki.json()];case"application/xml":case"text/xml":return[qi.xml()];case"application/x-yaml":case"text/yaml":return[ii.yaml()];default:return[]}}),T=w=>{s.value=w,l("update:visible",w)},O=async()=>{if(!(!c.value||!d.value)){m.value=!0,p.value=null;try{const[w,X]=await Promise.all([Re.getVersionContent(r.contentNode.id,c.value),Re.getVersionContent(r.contentNode.id,d.value)]);let R=await w.text(),Y=await X.text();if(r.contentNode?.content?.mimeType==="application/json")try{R=JSON.stringify(JSON.parse(R),null,2),Y=JSON.stringify(JSON.parse(Y),null,2)}catch(N){console.error("Failed to format JSON:",N)}u.value=R,b.value=Y,m.value=!1,await e.nextTick(),D()}catch(w){console.error("Error fetching versions:",w),p.value=n("diffViewer.errors.loadError"),m.value=!1}}},D=()=>{if(_.value&&(_.value.destroy(),_.value=null),!g.value||!u.value&&!b.value)return;const w=o()?Vc.oneDark:Qa.syntaxHighlighting(Qa.defaultHighlightStyle,{fallback:!0}),X=[Dt.lineNumbers(),...y.value,w,xa.EditorState.readOnly.of(!0)];try{_.value=new M_.MergeView({a:{doc:u.value,extensions:X},b:{doc:b.value,extensions:X},parent:g.value})}catch(R){console.error("Error creating MergeView:",R),p.value="Failed to create diff view: "+R.message}},I=()=>{if(f.value.length>=2){const w=f.value.length;c.value=f.value[w-2]?.id,d.value=f.value[w-1]?.id}},C=w=>f.value.find(X=>X.id===w)?.isCurrent,A=async w=>{const X=n("diffViewer.restoredVersionComment",{versionNumber:w});try{await Re.revertVersion(r.contentNode.id,w,X),l("revertVersion"),i.add({severity:"success",summary:n("diffViewer.revertVersion.success"),detail:n("diffViewer.revertVersion.successDetail"),life:3e3}),T(!1)}catch(R){console.error("Error reverting version:",R),i.add({severity:"error",summary:n("diffViewer.revertVersion.error"),detail:R.message,life:3e3})}};return e.watch(()=>r.visible,w=>{s.value=w,w?I():(_.value&&(_.value.destroy(),_.value=null),c.value=null,d.value=null,u.value="",b.value="",p.value=null)}),e.watch([c,d],()=>{c.value&&d.value&&O()}),e.watch(()=>r.versions,w=>{w&&w.length>=2&&s.value&&I()},{deep:!0}),(w,X)=>{const R=e.resolveDirective("tooltip");return e.openBlock(),e.createBlock(e.unref(_t),{visible:s.value,"onUpdate:visible":[X[4]||(X[4]=Y=>s.value=Y),T],header:w.$t("diffViewer.compareTitle"),modal:"",maximizable:"",class:"diff-viewer-dialog"},{default:e.withCtx(()=>[e.createElementVNode("div",YZ,[e.createElementVNode("div",kZ,[e.createVNode(e.unref($t),{modelValue:c.value,"onUpdate:modelValue":X[0]||(X[0]=Y=>c.value=Y),options:h.value,"option-label":"label","option-value":"id",placeholder:w.$t("diffViewer.selectVersionA"),class:"flex-grow-1"},{value:e.withCtx(Y=>[Y.value?(e.openBlock(),e.createElementBlock("div",xZ,[e.createElementVNode("span",null,e.toDisplayString(f.value.find(N=>N.id===Y.value)?.label),1),f.value.find(N=>N.id===Y.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",zZ,e.toDisplayString(Y.placeholder),1))]),option:e.withCtx(Y=>[e.createElementVNode("div",GZ,[e.createElementVNode("span",null,e.toDisplayString(Y.option.label),1),Y.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),c.value&&!C(c.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,type:"button",icon:"ri-history-line",onClick:X[1]||(X[1]=Y=>A(c.value)),severity:"secondary",rounded:"",text:""},null,512)),[[R,w.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",FZ,[e.createVNode(e.unref($t),{modelValue:d.value,"onUpdate:modelValue":X[2]||(X[2]=Y=>d.value=Y),options:S.value,"option-label":"label","option-value":"id",placeholder:w.$t("diffViewer.selectVersionB"),class:"flex-grow-1"},{value:e.withCtx(Y=>[Y.value?(e.openBlock(),e.createElementBlock("div",XZ,[e.createElementVNode("span",null,e.toDisplayString(f.value.find(N=>N.id===Y.value)?.label),1),f.value.find(N=>N.id===Y.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",PZ,e.toDisplayString(Y.placeholder),1))]),option:e.withCtx(Y=>[e.createElementVNode("div",VZ,[e.createElementVNode("span",null,e.toDisplayString(Y.option.label),1),Y.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),d.value&&!C(d.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,type:"button",icon:"ri-history-line",onClick:X[3]||(X[3]=Y=>A(d.value)),severity:"secondary",rounded:"",text:""},null,512)),[[R,w.$t("diffViewer.revertToThisVersion",{versionNumber:d.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)])]),c.value&&d.value?(e.openBlock(),e.createElementBlock("div",UZ,[e.createElementVNode("div",jZ,[e.createElementVNode("div",BZ,[e.createElementVNode("strong",null,e.toDisplayString(w.$t("diffViewer.version"))+" "+e.toDisplayString(c.value),1)]),e.createElementVNode("div",HZ,[e.createElementVNode("strong",null,e.toDisplayString(w.$t("diffViewer.version"))+" "+e.toDisplayString(d.value),1)])]),e.createElementVNode("div",JZ,[m.value?(e.openBlock(),e.createElementBlock("div",QZ,[e.createVNode(e.unref(ea))])):p.value?(e.openBlock(),e.createElementBlock("div",KZ,[X[5]||(X[5]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(p.value),1)])):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"mergeViewContainer",ref:g},null,512))])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header"])}}},[["__scopeId","data-v-875847fb"]]),qZ={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:3e4,messageBufferSize:100},ia={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",ERROR:"error"};function zg(a={}){const t={...qZ,...a},n=e.ref(ia.DISCONNECTED),i=e.ref(null),o=e.ref(0),r=e.shallowRef([]);let l=null,s=null,c=null,d=null,u=!1;const b={onConnected:[],onDisconnected:[],onMessage:[],onError:[],onReconnecting:[]},m=(A,w)=>(b[A]&&b[A].push(w),()=>p(A,w)),p=(A,w)=>{if(b[A]){const X=b[A].indexOf(w);X>-1&&b[A].splice(X,1)}},g=(A,...w)=>{b[A]&&b[A].forEach(X=>X(...w))},_=A=>new Promise((w,X)=>{if(l&&l.readyState===WebSocket.OPEN){w();return}d=A,u=!1,n.value=ia.CONNECTING;try{l=new WebSocket(A),l.onopen=()=>{n.value=ia.CONNECTED,o.value=0,i.value=null,y(),I(),g("onConnected"),w()},l.onclose=R=>{T(),n.value=ia.DISCONNECTED,!u&&!R.wasClean&&O(),g("onDisconnected",R)},l.onerror=R=>{i.value=R,n.value=ia.ERROR,g("onError",R),X(R)},l.onmessage=R=>{try{const Y=JSON.parse(R.data);S(Y)}catch(Y){console.error("[CollabWebSocket] Failed to parse message:",Y)}}}catch(R){i.value=R,n.value=ia.ERROR,g("onError",R),X(R)}}),f=()=>{u=!0,T(),D(),l&&(l.close(1e3,"User disconnected"),l=null),n.value=ia.DISCONNECTED,r.value=[]},h=A=>{const w=JSON.stringify(A);return l&&l.readyState===WebSocket.OPEN?(l.send(w),!0):(r.value.length<t.messageBufferSize?r.value=[...r.value,w]:console.warn("[CollabWebSocket] Message buffer full, dropping message"),!1)},S=A=>{A.type!=="pong"&&g("onMessage",A)},y=()=>{T(),s=setInterval(()=>{l&&l.readyState===WebSocket.OPEN&&h({type:"ping"})},t.heartbeatInterval)},T=()=>{s&&(clearInterval(s),s=null)},O=()=>{if(o.value>=t.maxReconnectAttempts){console.error("[CollabWebSocket] Max reconnection attempts reached"),n.value=ia.ERROR;return}n.value=ia.RECONNECTING,o.value++;const A=Math.min(t.reconnectInterval*Math.pow(t.reconnectDecay,o.value-1),t.maxReconnectInterval);g("onReconnecting",o.value,A),c=setTimeout(()=>{d&&!u&&_(d).catch(()=>{})},A)},D=()=>{c&&(clearTimeout(c),c=null)},I=()=>{if(l&&l.readyState===WebSocket.OPEN&&r.value.length>0){const A=[...r.value];r.value=[],A.forEach(w=>{l.send(w)})}},C=()=>l&&l.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{f()}),{connectionState:e.readonly(n),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(r),connect:_,disconnect:f,send:h,isConnected:C,on:m,off:p}}class $Z{constructor(){this.basePath="/api/collab"}getBaseUrl(){return Qe.config.hostEcm}async getTicket(){return Qe.getTicketEcm()}createAuthHeader(t){return`Basic ${btoa(`ROLE_TICKET:${t}`)}`}async checkAvailability(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/availability/${t}`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(n)}});if(!i.ok){if(i.status===404)return{available:!1,enabled:!1,permissionLevel:"NONE"};if(i.status===403)return{available:!1,enabled:!0,permissionLevel:"NONE",reason:"NO_READ_PERMISSION"};throw new Error(`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(n){throw console.error("[CollabService] Error checking availability:",n),ke("collabService.checkAvailability",n)}}async initSession(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/session/init`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:this.createAuthHeader(n)},body:JSON.stringify({nodeId:t})});if(!i.ok){const o=await i.json();throw new Error(o.error||`HTTP ${i.status}`)}return await i.json()}catch(n){throw console.error("[CollabService] Error initializing session:",n),ke("collabService.initSession",n)}}getWebSocketUrl(){const t=this.getBaseUrl(),n=t.startsWith("https")?"wss":"ws",i=t.replace(/^https?:\/\//,"");return`${n}://${i}/alfresco/collab`}generateClientId(){return`client-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}const Tn=new $Z,Va="editor",an="observer";class eD extends Dt.WidgetType{constructor(t){super(),this.peer=t}toDOM(){const t=document.createElement("span");t.className="cm-remote-cursor",t.style.borderLeft=`2px solid ${this.peer.color}`,t.style.marginLeft="-1px",t.style.position="relative";const n=document.createElement("span");return n.className="cm-remote-cursor-label",n.style.backgroundColor=this.peer.color,n.style.color="#fff",n.style.padding="1px 4px",n.style.borderRadius="3px",n.style.fontSize="10px",n.style.position="absolute",n.style.top="-18px",n.style.left="0",n.style.whiteSpace="nowrap",n.textContent=this.peer.displayName,t.appendChild(n),t}}const Gg=xa.StateEffect.define(),Mi=xa.StateField.define({create(){return[]},update(a,t){for(const n of t.effects)if(n.is(Gg))return n.value;return a}}),tD=Dt.ViewPlugin.fromClass(class{constructor(a){this.decorations=this.createDecorations(a)}update(a){(a.docChanged||a.state.field(Mi)!==a.startState.field(Mi))&&(this.decorations=this.createDecorations(a.view))}createDecorations(a){const t=a.state.field(Mi),n=[];for(const i of t)if(i.position>=0&&i.position<=a.state.doc.length&&(n.push(Dt.Decoration.widget({widget:new eD(i),side:1}).range(i.position)),i.anchor!==i.position)){const o=Math.min(i.anchor,i.position),r=Math.max(i.anchor,i.position);n.push(Dt.Decoration.mark({class:"cm-remote-selection",attributes:{style:`background-color: ${i.color}33`}}).range(o,r))}return Dt.Decoration.set(n,!0)}},{decorations:a=>a.decorations});function Fg(){const a=e.ref(!1),t=e.ref(null),n=e.ref(null),i=e.ref(null),o=e.ref(null),r=e.shallowRef([]),l=e.shallowRef([]),s=e.ref(0),c=e.ref(null),d=e.ref(!1),u=e.ref(null);let b=null,m=null;const{connectionState:p,connect:g,disconnect:_,send:f,on:h,off:S}=zg();let y=null,T=null,O=null;const D=k=>{y=k},I=e.computed(()=>r.value.length),C=e.computed(()=>p.value===ia.CONNECTED),A=e.computed(()=>p.value===ia.RECONNECTING),w=e.computed(()=>o.value===Va),X=e.computed(()=>o.value===an),R=e.computed(()=>r.value.filter(k=>k.role===Va).length),Y=e.computed(()=>r.value.filter(k=>k.role===an).length),N=e.computed(()=>u.value==="WRITE"),V=e.computed(()=>u.value==="READ"||u.value==="WRITE"),le=k=>[li.collab({startVersion:k,clientID:n.value,sharedEffects:j=>{if(j.selection){const z=j.selection.main;te(z.head,z.anchor)}return[]}}),Mi,tD],Q=async k=>new Promise((j,z)=>{const ae=setTimeout(()=>{S("onMessage",re),z(new Error("Authentication timeout"))},5e3),re=oe=>{oe.type==="authenticated"?(clearTimeout(ae),S("onMessage",re),j()):oe.type==="error"&&oe.code==="AUTH_FAILED"&&(clearTimeout(ae),S("onMessage",re),z(new Error(oe.message||"Authentication failed")))};h("onMessage",re),f({type:"auth",ticket:k})}),fe=async(k,j,z,ae=an,re=null,oe=null)=>{a.value&&await K(),d.value=!1;try{T=k,y=j,n.value=Tn.generateClientId(),b=re,m=oe;const be=await Tn.checkAvailability(T);if(u.value=be.permissionLevel||"WRITE",!be.enabled)throw new Error("Collaborative editing is not available for this document");if(be.permissionLevel==="NONE")throw new Error("Access denied to this document");be.permissionLevel==="READ"&&ae===Va&&(ae=an);const Xe=Tn.getWebSocketUrl();h("onMessage",pe),h("onDisconnected",Ne),h("onReconnecting",Ce),await g(Xe);const ve=await Tn.getTicket();return await Q(ve),new Promise((dt,At)=>{const mt=setTimeout(()=>{At(new Error("Timeout waiting for welcome message"))},1e4),me=ue=>{ue.type==="welcome"?(clearTimeout(mt),S("onMessage",me),ee(ue),dt(ue)):ue.type==="error"&&(clearTimeout(mt),S("onMessage",me),ue.code==="SESSION_FULL"&&(d.value=!0),At(new Error(ue.message)))};h("onMessage",me),f({type:"join",nodeId:T,clientId:n.value,displayName:z,mode:ae})})}catch(be){throw c.value=be,be}},K=async()=>{a.value&&(O&&(clearTimeout(O),O=null),t.value&&n.value&&f({type:"leave",sessionId:t.value,clientId:n.value}),_(),a.value=!1,t.value=null,r.value=[],l.value=[],i.value=null,o.value=null,u.value=null,b=null,m=null,y=null,T=null)},ee=k=>{t.value=k.sessionId,s.value=k.version,i.value=k.color,o.value=k.role||an,r.value=k.peers||[],a.value=!0,J()},G=k=>k.toJSON(),P=k=>xa.ChangeSet.fromJSON(k),pe=k=>{switch(k.type){case"updates":U(k);break;case"peers":B(k);break;case"cursor":de(k);break;case"promoted":se(k);break;case"saved":ge(k);break;case"error":ne(k);break}},U=k=>{if(!y&&b&&k.document!==void 0){b(k.document,k.version);return}if(!y)return;const j=k.updates.map(z=>({changes:P(z.changes),clientID:z.clientID}));try{const z=li.receiveUpdates(y.state,j);y.dispatch(z)}catch(z){console.error("[CollabEditor] Error applying updates:",z)}},B=k=>{r.value=k.peers.filter(j=>j.clientId!==n.value),J()},de=k=>{if(k.clientId===n.value)return;const j=r.value.find(z=>z.clientId===k.clientId);j&&(j.cursorPosition=k.position,j.cursorAnchor=k.anchor,J())},ne=k=>{c.value=new Error(k.message),console.error("[CollabEditor] Server error:",k.code,k.message,k.details),k.code==="SESSION_FULL"?(d.value=!0,K()):k.code==="ACCESS_DENIED"&&K()},se=k=>{o.value=Va,s.value=k.version,b&&k.document!==void 0&&b(k.document,k.version)},ge=k=>{m&&m(k.sessionId)},Ne=()=>{},Ce=(k,j)=>{console.log(`[CollabEditor] Reconnecting in ${j}ms (attempt ${k})`)},Ye=()=>{if(!y||!a.value||!C.value)return;const k=li.sendableUpdates(y.state);if(k.length===0)return;const j=li.getSyncedVersion(y.state),z=k.map(re=>({clientID:re.clientID,changes:G(re.changes)})),ae=y.state.doc.toString();f({type:"push",sessionId:t.value,clientId:n.value,version:j,updates:z,document:ae})},Ue=()=>{O&&clearTimeout(O),O=setTimeout(Ye,50)};let E=null;const te=(k,j)=>{E&&clearTimeout(E),E=setTimeout(()=>{a.value&&C.value&&f({type:"cursor",sessionId:t.value,clientId:n.value,position:k,anchor:j})},100)},J=()=>{if(!y)return;const k=r.value.filter(j=>j.cursorPosition!==void 0).map(j=>({clientId:j.clientId,displayName:j.displayName,color:j.color,position:j.cursorPosition,anchor:j.cursorAnchor||j.cursorPosition}));l.value=k,y.dispatch({effects:Gg.of(k)})},W=()=>k=>{k.docChanged&&a.value&&Ue()},M=()=>new Promise((k,j)=>{if(!a.value||!C.value){j(new Error("Not connected to collaborative session"));return}if(o.value===Va){k({role:Va});return}const z=setTimeout(()=>{S("onMessage",ae),j(new Error("Timeout waiting for promotion confirmation"))},1e4),ae=re=>{re.type==="promoted"?(clearTimeout(z),S("onMessage",ae),k(re)):re.type==="error"&&re.context==="promote"&&(clearTimeout(z),S("onMessage",ae),j(new Error(re.message)))};h("onMessage",ae),f({type:"promote",sessionId:t.value,clientId:n.value})}),L=()=>new Promise((k,j)=>{if(!a.value||!C.value){j(new Error("Not connected to collaborative session"));return}const z=setTimeout(()=>{S("onMessage",ae),j(new Error("Timeout waiting for save confirmation"))},1e4),ae=re=>{re.type==="saved"?(clearTimeout(z),S("onMessage",ae),k(re)):re.type==="error"&&re.context==="save"&&(clearTimeout(z),S("onMessage",ae),j(new Error(re.message)))};h("onMessage",ae),f({type:"save",sessionId:t.value,clientId:n.value})});return e.onUnmounted(()=>{K()}),{isCollabActive:a,isSessionFull:d,permissionLevel:u,sessionId:t,clientId:n,myColor:i,myRole:o,connectedPeers:r,remoteCursors:l,connectionState:p,lastError:c,startVersion:s,peerCount:I,isConnected:C,isReconnecting:A,isEditor:w,isObserver:X,editorCount:R,observerCount:Y,hasWritePermission:N,hasReadPermission:V,startCollab:fe,stopCollab:K,setEditorView:D,createCollabExtensions:le,createUpdateListener:W,pushChanges:Ye,requestSave:L,promoteToEditor:M}}const Xg=Fe.defineStore({id:"CollabStore",state:()=>({enabled:!1,loaded:!1,activeSession:null,activeNodeId:null,connectedPeers:[],connectionState:"disconnected",myColor:null,lastError:null,maxPeers:5}),getters:{peerCount:a=>a.connectedPeers.length,hasActivePeers:a=>a.connectedPeers.length>0,isCollabActive:a=>a.activeSession!==null,isConnected:a=>a.connectionState==="connected",isReconnecting:a=>a.connectionState==="reconnecting",isAvailable:a=>a.enabled&&a.loaded},actions:{async init(){try{const a=je();this.enabled=a.COLLAB_ENABLED!==!1,this.maxPeers=a.COLLAB_MAX_PEERS||5,this.loaded=!0,console.log("[CollabStore] Initialized, enabled:",this.enabled)}catch(a){console.error("[CollabStore] Failed to initialize:",a),this.enabled=!1,this.loaded=!0}},async checkAvailability(a){if(!this.enabled)return{available:!1,reason:"disabled"};try{return await Tn.checkAvailability(a)}catch(t){return console.error("[CollabStore] Availability check failed:",t),{available:!1,reason:"error",error:t}}},setActiveSession(a){this.activeSession=a?.sessionId||null,this.activeNodeId=a?.nodeId||null,this.myColor=a?.color||null},updatePeers(a){this.connectedPeers=a||[]},setConnectionState(a){this.connectionState=a},setError(a){this.lastError=a},clearSession(){this.activeSession=null,this.activeNodeId=null,this.connectedPeers=[],this.myColor=null,this.connectionState="disconnected",this.lastError=null},addPeer(a){this.connectedPeers.findIndex(n=>n.clientId===a.clientId)===-1&&this.connectedPeers.push(a)},removePeer(a){const t=this.connectedPeers.findIndex(n=>n.clientId===a);t!==-1&&this.connectedPeers.splice(t,1)},updatePeerCursor(a,t,n){const i=this.connectedPeers.find(o=>o.clientId===a);i&&(i.cursorPosition=t,i.cursorAnchor=n)}}}),aD={class:"codemirror-editor-root"},nD={key:0,class:"consultation-title col"},iD={key:2,class:"collab-indicators flex align-items-center gap-2 ml-3"},oD={class:"collab-status-text text-sm"},rD={key:0,class:"collab-peers flex align-items-center gap-1"},lD={key:0,class:"collab-peer-more text-sm"},sD={key:1,class:"collab-participant-badges flex align-items-center gap-2"},cD={class:"collab-badge collab-badge-editor flex align-items-center gap-1"},dD={class:"text-sm font-medium"},mD={class:"collab-badge collab-badge-observer flex align-items-center gap-1"},pD={class:"text-sm font-medium"},uD={class:"flex gap-2 align-items-center"},bD={class:"card editor-wrapper border-1 surface-border border-round overflow-hidden flex flex-column p-0 m-0"},gD={key:0,class:"edit-mode-wrapper flex-grow-1 flex flex-column min-h-0"},_D=["srcdoc"],hD=["srcdoc"],yD={key:1,class:"consultation-view flex-grow-1"},fD=["srcdoc"],Pg=Se({__name:"CodeMirrorEditor",props:{contentUrl:{type:String,default:null},contentNode:{type:Object,default:null},readOnly:{type:Boolean,default:!1},isSharedLink:{type:Boolean,default:!1}},setup(a){const{t}=ta.useI18n(),n=pa.useToast(),i=ri.useConfirm(),{isDarkMode:o}=Ei(),r=Xg(),{isCollabActive:l,isSessionFull:s,connectedPeers:c,isConnected:d,isReconnecting:u,peerCount:b,myRole:m,isEditor:p,isObserver:g,editorCount:_,observerCount:f,startVersion:h,startCollab:S,stopCollab:y,setEditorView:T,createCollabExtensions:O,createUpdateListener:D,requestSave:I,promoteToEditor:C}=Fg(),A=a,w=e.ref(""),X=e.ref(""),R=e.ref(null),Y=e.ref(!1),N=e.ref(!1),V=e.ref("split"),le=e.ref(!1),Q=e.ref(null),fe=e.ref(null),K=e.ref(null),ee=e.shallowRef(null),G=e.shallowRef(null),P=e.ref([]),pe=e.ref(!1),U=e.ref(!1),B=e.ref(!1),de=e.ref(0),ne=e.ref(null),{isMarkdown:se,isHtml:ge,iframeContent:Ne}=hc({content:w,mimeType:Q}),Ce=e.computed(()=>w.value!==X.value),Ye=e.computed(()=>P.value&&P.value.length>=2),Ue=e.computed(()=>[{value:"editor",icon:"ri-code-line",label:t("editor.viewMode.editorOnly")},{value:"split",icon:"ri-layout-column-fill",label:t("editor.viewMode.split")},{value:"preview",icon:"ri-eye-line",label:t("editor.viewMode.previewOnly")}]),E=me=>{const ue=me?fe:K;if(!ue.value)return;const ze=Nn(Q.value),st=[...Sn({editable:me,showLineNumbers:!0,enableHistory:me,dark:o(),lineWrapping:le.value,onUpdate:me?jt=>{w.value=jt}:null})];ze&&(!Array.isArray(ze)||ze.length>0)&&st.push(ze);const Pt=xa.EditorState.create({doc:w.value,extensions:st}),Vt=new Dt.EditorView({state:Pt,parent:ue.value});me?ee.value=Vt:G.value=Vt},te=me=>{me.value&&(me.value.destroy(),me.value=null)},J=async me=>{if(!(!me.id&&!me.shareId))try{let ue;A.isSharedLink&&me.shareId?ue=await Re.getSharedLinkContent(me.shareId):ue=await Re.getNodeContent(me.id,!1);let ze=await ue.text();if(me.content?.mimeType==="application/json")try{ze=JSON.stringify(JSON.parse(ze),null,2)}catch(He){console.warn("Failed to format JSON, displaying raw content:",He.message)}A.readOnly||await L(me),w.value=ze,X.value=ze,Q.value=me.content?.mimeType||"text/plain",await e.nextTick(),!N.value&&!se.value&&!ge.value&&!G.value&&E(!1)}catch(ue){console.error("Failed to load content:",ue),n.add({severity:"error",summary:t("error.error"),detail:t("editor.loadError"),life:3e3})}},W=async()=>{if(l.value){try{await I(),X.value=w.value,n.add({severity:"success",summary:t("success"),detail:t("editor.saveSuccess"),life:3e3}),await z(A.contentNode.id)}catch(me){n.add({severity:"error",summary:t("error.error"),detail:me.message,life:4e3})}return}if(!Ce.value){N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{});return}try{await Re.updateContentNode(A.contentNode.id,w.value,Q.value),X.value=w.value,n.add({severity:"success",summary:t("success"),detail:t("editor.saveSuccess"),life:3e3}),N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{}),await z(A.contentNode.id)}catch(me){n.add({severity:"error",summary:t("error.error"),detail:me.message,life:4e3})}},M=async()=>{try{const me=await qe.lockNode(A.contentNode.id,{timeToExpire:0,type:"ALLOW_OWNER_CHANGES",lifetime:"EPHEMERAL"});await L(me.entry),await J(me.entry)}catch{try{const ue=await qe.getNode(A.contentNode.id,{include:["properties"]});await L(ue.entry)}catch{n.add({severity:"error",summary:t("error.error"),detail:t("editor.refreshError"),life:3e3})}}},L=async me=>{const ue=me.properties?.["cm:lockOwner"],ze=yt();ue&&ue.id!==ze.person.id?(Y.value=!0,R.value=t("node.lockedBy",{name:ue.displayName})):(Y.value=!1,R.value=null)},k=async()=>{if(!N.value)if(r.enabled&&U.value){B.value=!0;try{N.value=!0,await e.nextTick(),await e.nextTick();let ue=0;for(;!ee.value&&ue<10;)await e.nextTick(),ue++;if(!ee.value)throw new Error("Editor view not created");await dt(),l.value?n.add({severity:"success",summary:t("success"),detail:t("collab.connected"),life:3e3}):(N.value=!1,n.add({severity:"error",summary:t("error.error"),detail:t("collab.initError"),life:4e3}))}catch(ue){console.error("Failed to start collaborative editing:",ue),N.value=!1,n.add({severity:"error",summary:t("error.error"),detail:t("collab.initError"),life:4e3})}finally{B.value=!1}}else await M(),Y.value||(N.value=!0);else if(l.value){await At();let ze=await(await Re.getNodeContent(A.contentNode.id,!1)).text();if(A.contentNode.content?.mimeType==="application/json")try{ze=JSON.stringify(JSON.parse(ze),null,2)}catch{}w.value=ze,X.value=ze,N.value=!1,await ve(A.contentNode.id)}else Ce.value?i.require({message:t("editor.unsavedChanges"),header:t("editor.confirmationHeader"),icon:"ri-alert-line",group:"confirmUnsavedChanges",accept:async()=>{w.value=X.value,N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{})},reject:()=>{}}):(w.value=X.value,N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{}))},j=()=>{const me=document.createElement("a");me.href=A.contentUrl,me.download=A.contentNode.name,me.click()},z=async me=>{if(me)try{const ue=await Re.listNodeVersionHistory(me);P.value=ue.list.entries}catch(ue){console.error("Error fetching versions:",ue)}},ae=()=>{pe.value=!0},re=async()=>{await J(A.contentNode),await z(A.contentNode.id)},oe=async me=>{if(!me||A.readOnly){U.value=!1;return}try{const ue=await r.checkAvailability(me);ne.value=ue.permissionLevel||"WRITE",de.value=ue.maxPeers||0,U.value=ue.enabled===!0&&ne.value!=="NONE"}catch(ue){console.error("[Collab] Failed to check collab availability:",ue),U.value=!1,ne.value=null}},be=(me,ue)=>{if(!N.value&&me!==void 0&&(w.value=me,X.value=me,G.value)){const ze=G.value.state.update({changes:{from:0,to:G.value.state.doc.length,insert:me}});G.value.dispatch(ze)}},Xe=()=>{X.value=w.value},ve=async me=>{if(!(!me||A.readOnly||!r.enabled||!U.value)&&!l.value)try{const ue=yt(),ze=ue.person?.displayName||ue.person?.id||"User";await S(me,null,ze,an,be,Xe)}catch(ue){console.error("[Collab] Failed to connect as observer:",ue)}},dt=async()=>{if(!A.contentNode?.id||!ee.value)throw new Error("Missing node ID or editor view");const me=yt(),ue=me.person?.displayName||me.person?.id||"User";let ze,He;if(l.value&&g.value){const st=await C();ze=st.version||h.value,He=st.document}else{const st=await S(A.contentNode.id,null,ue,Va,be,Xe);ze=st.version,He=st.document}He!==void 0&&(w.value=He,X.value=He),await mt(ze)},At=async()=>{try{await y()}catch(me){console.error("Failed to stop collaborative editing:",me)}},mt=async me=>{if(!fe.value)return;te(ee),await e.nextTick();const ue=Nn(Q.value),ze=Sn({editable:!0,showLineNumbers:!0,enableHistory:!0,dark:o(),lineWrapping:le.value,onUpdate:jt=>{w.value=jt}}),He=O(me),st=Dt.EditorView.updateListener.of(D()),Pt=[...ze,...He,st];ue&&(!Array.isArray(ue)||ue.length>0)&&Pt.push(ue);const Vt=xa.EditorState.create({doc:w.value,extensions:Pt});ee.value=new Dt.EditorView({state:Vt,parent:fe.value}),T(ee.value)};return r.init(),e.watch(()=>A.contentNode,async me=>{me&&(J(me),A.readOnly||(z(me.id),r.loaded||await r.init(),await oe(me.id),await ve(me.id)))},{immediate:!0}),e.watch(N,async me=>{te(ee),te(G),await e.nextTick(),me?V.value!=="preview"&&E(!0):!se.value&&!ge.value&&E(!1)}),e.watch(V,async(me,ue)=>{if(!N.value||!(se.value||ge.value))return;const ze=me!=="preview";ue!=="preview"&&te(ee),ze&&(await e.nextTick(),E(!0))}),e.watch(le,async()=>{N.value&&V.value!=="preview"&&ee.value?(te(ee),await e.nextTick(),E(!0)):!N.value&&!se.value&&!ge.value&&G.value&&(te(G),await e.nextTick(),E(!1))}),e.onBeforeUnmount(async()=>{l.value&&await y(),te(ee),te(G),N.value&&!Y.value&&!l.value&&qe.unlockNode(A.contentNode.id).catch(()=>{})}),(me,ue)=>{const ze=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",aD,[e.createVNode(e.unref(Qi),{class:"consultation-toolbar"},{start:e.withCtx(()=>[a.contentNode?(e.openBlock(),e.createElementBlock("h3",nD,e.toDisplayString(a.contentNode.name),1)):e.createCommentVNode("",!0),me.$route.params.versionId?(e.openBlock(),e.createBlock(e.unref(dn),{key:1,class:"tag-version",value:me.$route.params.versionId},null,8,["value"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("div",iD,[e.createElementVNode("span",{class:e.normalizeClass(["collab-status-dot",{connected:e.unref(d),reconnecting:e.unref(u)}])},null,2),e.createElementVNode("span",oD,e.toDisplayString(e.unref(d)?me.$t("collab.connected"):me.$t("collab.reconnecting")),1),e.unref(b)>0?(e.openBlock(),e.createElementBlock("div",rD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).slice(0,6),He=>e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:He.clientId,class:"collab-peer-avatar",style:e.normalizeStyle({backgroundColor:He.color})},[e.createTextVNode(e.toDisplayString(He.displayName.charAt(0).toUpperCase()),1)],4)),[[ze,He.displayName,void 0,{bottom:!0}]])),128)),e.unref(b)>6?(e.openBlock(),e.createElementBlock("span",lD," +"+e.toDisplayString(e.unref(b)-6),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(l)&&e.unref(d)?(e.openBlock(),e.createElementBlock("div",sD,[e.withDirectives((e.openBlock(),e.createElementBlock("div",cD,[ue[3]||(ue[3]=e.createElementVNode("i",{class:"ri-edit-fill"},null,-1)),e.createElementVNode("span",dD,e.toDisplayString(e.unref(_)+(e.unref(p)?1:0)),1)])),[[ze,me.$t("collab.editorsTooltip"),void 0,{bottom:!0}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",mD,[ue[4]||(ue[4]=e.createElementVNode("i",{class:"ri-eye-fill"},null,-1)),e.createElementVNode("span",pD,e.toDisplayString(e.unref(f)+(e.unref(g)?1:0)),1)])),[[ze,me.$t("collab.observersTooltip"),void 0,{bottom:!0}]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),end:e.withCtx(()=>[e.createElementVNode("div",uD,[N.value&&(e.unref(se)||e.unref(ge))?(e.openBlock(),e.createBlock(e.unref(Ka),{key:0,modelValue:V.value,"onUpdate:modelValue":ue[0]||(ue[0]=He=>V.value=He),options:Ue.value,"option-value":"value","allow-empty":!1,class:"view-mode-selector"},{option:e.withCtx(He=>[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(He.option.icon)},null,2),[[ze,He.option.label,void 0,{bottom:!0}]])]),_:1},8,["modelValue","options"])):e.createCommentVNode("",!0),!a.readOnly&&!e.unref(s)&&(!U.value||ne.value==="WRITE")?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:N.value?"ri-close-line":"ri-pencil-line",severity:N.value?"warning":"info",onClick:k,disabled:Y.value||B.value,loading:B.value,raised:""},null,8,["icon","severity","disabled","loading"])),[[ze,N.value?me.$t("editor.cancelEdit"):me.$t("editor.edit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),N.value&&!a.readOnly?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:2,icon:"ri-save-line",severity:"primary",onClick:W,disabled:Y.value||!Ce.value,raised:""},null,8,["disabled"])),[[ze,me.$t("save"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),ue[5]||(ue[5]=e.createElementVNode("div",{class:"w-1rem"},[e.createElementVNode("i",{class:"ri-more-2-line"})],-1)),N.value&&V.value!=="preview"||!N.value&&!e.unref(se)&&!e.unref(ge)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:3,icon:"ri-text-wrap",severity:le.value?"info":"secondary",onClick:ue[1]||(ue[1]=He=>le.value=!le.value),raised:""},null,8,["severity"])),[[ze,me.$t("editor.lineWrap"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),a.readOnly?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:4,icon:"ri-layout-column-line",severity:"secondary",onClick:ae,disabled:!Ye.value,raised:""},null,8,["disabled"])),[[ze,me.$t("diffViewer.compareTitle"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",severity:"secondary",onClick:j,raised:""},null,512),[[ze,me.$t("download"),void 0,{bottom:!0}]])])]),_:1}),Y.value&&!a.readOnly?(e.openBlock(),e.createBlock(e.unref(da),{key:0,severity:"warn",icon:"ri-lock-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.value),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(da),{key:1,severity:"warn",icon:"ri-group-line",class:"p-small-message px-3 py-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(me.$t("collab.sessionFull"))+" ("+e.toDisplayString(de.value)+"/"+e.toDisplayString(de.value)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(l)&&e.unref(u)?(e.openBlock(),e.createBlock(e.unref(da),{key:2,severity:"warn",icon:"ri-wifi-off-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(me.$t("collab.offline")),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",bD,[N.value?(e.openBlock(),e.createElementBlock("div",gD,[(e.unref(se)||e.unref(ge))&&V.value==="split"?(e.openBlock(),e.createBlock(e.unref(I_),{key:0,class:"flex-grow-1 h-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(Hc),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"editorContainer",ref:fe,class:"w-full flex-grow-1"},null,512)]),_:1}),e.createVNode(e.unref(Hc),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("iframe",{srcdoc:e.unref(Ne),class:"preview-container w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,_D)]),_:1})]),_:1})):!e.unref(se)&&!e.unref(ge)||V.value==="editor"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:fe,class:"editor-only-container w-full flex-grow-1"},null,512)):V.value==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:2,srcdoc:e.unref(Ne),class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,hD)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",yD,[e.unref(se)||e.unref(ge)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(Ne),class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,fD)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"consultationEditorContainer",ref:K,class:"consultation-editor-container"},null,512))]))]),e.createVNode(Ec,{visible:pe.value,"onUpdate:visible":ue[2]||(ue[2]=He=>pe.value=He),"content-node":a.contentNode,versions:P.value,onRevertVersion:re},null,8,["visible","content-node","versions"])])}}},[["__scopeId","data-v-736ea782"]]),ND="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QIqaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pgo8eDp4bXBtZXRhIHhtbG5zOng9J2Fkb2JlOm5zOm1ldGEvJyB4OnhtcHRrPSdBZG9iZSBFeHByZXNzJz4KPHJkZjpSREYgeG1sbnM6cmRmPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbn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xwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+06/ND5wKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAMe4o8wOS8X/Fj4d+Ax/wAVX4u03T3H8Es6hj+HWt6WFrVvgi2aRpTn8KMHQf2kfgn4kvFsNK+IWlPPIcKjTBCT7Zxmtp4DE01dwZTw9SKu0ejwzwXESzW8qSo/KsjZBGM5/KuOSadnuZW1sPpALQIKACgAoAKACgAoAKACgAoAKACgAoATH5cjP0oApax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r7y/b0+5r6d+zL8ffEMqh/CGpAN/HdvsA/76NRLMMPH7YniaS6nq/gT9gHxZfyxXHjvX7XTrfILwW37yQj0zwB+tcVbOYLSmrs56mPUVaKPrz4ZfCDwP8JtJGl+EtKSJnAE1w/M0pHct1/CvDr4mpiZc1R/LoedUrSqu8jtKwMgoAKACgAoAKACgCxYyNFdRMP72PwNTNJxEzpq4yQoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBkyCWNoz0ZSDTTswOWkjaKRkcYKnFdsdVcsbQAUAFABQAUAFABQAUAHXqM4NDDcXryf5daEkugCKACTgYpPUA9MdqBJWCmMKACgAoAKACgAoAKACgAoAKACgBePTr1pWATjvTDTsAx1I5o0AUcHp/SgfyE/wA+tAgoAKACgAoAKACgAoAKALemQGe8XjIU5NRVdotCZ0dchIUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAZuqaaLgefCPnHBHrW1OdtGNMxGUq2GHNdBQlABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQA+KGSdxHGhJNJtR3A6Gws1s4do5c/eNcs5c5DLVQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAJj1oAp3umw3QLr8snr6/WtIVHEaZi3NlcWrbZEPsR0NdEZqRRB/KqAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAFAzwOvpQBctdMnuSGYFEPc96ylUURXNq2tIbVNsajOOT3Nc8pOW5JPSAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAo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qxov3UVfoKTbe4Dx+noaQgoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBAMd6AD8vyoAXJp6AHWkMPy/OgQZoGH5fnQAUrCCq0AKLgFIAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP/9k=",SD={name:"ErrorComponent",components:{PrimeButton:ce},props:{errorNb:{type:String,default:"500"},homeName:{type:String,default:"welcome"}},data(){return{title:"",subtitle:""}},created(){this.title=this.$t("nothingTitle"),this.subtitle=this.$t("nothingText")},methods:{onClick(){this.$router.push({name:this.homeName})}}},ED={class:"error-container"},TD={class:"error-card"},AD={class:"error-title"},OD={class:"error-image",src:ND,alt:"Angry Cat"},CD={class:"error-body"},RD={class:"error-card-title"},ID={class:"error-card-subtitle"};function MD(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",ED,[e.createElementVNode("div",TD,[e.createElementVNode("h2",AD,e.toDisplayString(n.errorNb),1),e.withDirectives(e.createElementVNode("img",OD,null,512),[[s,"www.vecteezy.com"]]),e.createElementVNode("div",CD,[e.createElementVNode("p",RD,e.toDisplayString(o.title),1),e.createElementVNode("p",ID,e.toDisplayString(o.subtitle),1),e.createVNode(l,{icon:"ri-corner-down-left-line",label:a.$t("goHome"),class:"error-button",onClick:r.onClick},null,8,["label","onClick"])])])])}const Tc=Se(SD,[["render",MD],["__scopeId","data-v-b4ec85ac"]]);class vD{getBaseUrl(){return Qe.config.hostEcm}async getTicket(){return Qe.getTicketEcm()}createAuthHeader(t){return`Basic ${btoa(`ROLE_TICKET:${t}`)}`}async getStatus(){try{const t=await this.getTicket(),n=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/status`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(t)}});return n.ok?await n.json():{enabled:!1}}catch(t){return console.error("[ChatBackendService] Error checking status:",t),{enabled:!1}}}async getWorkspaceRoom(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${t}/room`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(n)}});return i.ok?await i.json():(console.warn(`[ChatBackendService] Failed to get room for site ${t}:`,i.status),{found:!1})}catch(n){return console.error(`[ChatBackendService] Error getting room for site ${t}:`,n),{found:!1}}}async createWorkspaceRoom(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${t}/room`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(n)},body:JSON.stringify({})});return i.ok?await i.json():(console.error(`[ChatBackendService] Failed to create room for site ${t}:`,i.status),null)}catch(n){return console.error(`[ChatBackendService] Error creating room for site ${t}:`,n),null}}async getUserChatToken(){try{const t=await this.getTicket(),n=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(t)}});return n.ok?await n.json():{hasCredentials:!1}}catch(t){return console.error("[ChatBackendService] Error getting user token:",t),{hasCredentials:!1}}}async saveUserChatToken(t,n){try{const i=await this.getTicket(),o=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(i)},body:JSON.stringify({userId:t,token:n})});if(!o.ok){const r=await o.json().catch(()=>({}));throw new Error(r.message||`HTTP ${o.status}`)}return await o.json()}catch(i){throw console.error("[ChatBackendService] Error saving user token:",i),i}}}const vi=new vD;class ZD{constructor(){this.credentials=null,this.config=null}init(t){this.config=t,this.credentials=null}isEnabled(){return this.config?.CHAT_ENABLED===!0&&!!this.config?.ROCKETCHAT_HOST}isOAuthEnabled(){return this.config?.CHAT_OAUTH_ENABLED===!0}getServerUrl(){return(this.config?.ROCKETCHAT_HOST||"").replace(/\/$/,"")}getWebSocketUrl(){if(this.config?.ROCKETCHAT_WS_URL)return this.config.ROCKETCHAT_WS_URL;const t=this.config?.ROCKETCHAT_HOST||"",n=t.startsWith("https")?"wss":"ws",i=t.replace(/^https?:\/\//,"").replace(/\/$/,"");return`${n}://${i}/websocket`}async getCredentials(){if(this.credentials)return this.credentials;const t=await vi.getUserChatToken();return t.hasCredentials&&t.userId&&t.token?(this.credentials={userId:t.userId,authToken:t.token},this.credentials):(console.warn("[RocketChatAuthService] No credentials available. User needs to configure token in profile."),null)}clearCredentials(){this.credentials=null}async verifyCredentials(){const t=await this.getCredentials();if(!t)return!1;try{const n=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":t.authToken,"X-User-Id":t.userId}});return n.ok?(await n.json()).success===!0:(this.clearCredentials(),!1)}catch(n){return console.error("[RocketChatAuthService] Error verifying credentials:",n),!1}}async getCurrentUser(){const t=await this.getCredentials();if(!t)return null;try{const n=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":t.authToken,"X-User-Id":t.userId}});return n.ok?await n.json():null}catch(n){return console.error("[RocketChatAuthService] Error getting current user:",n),null}}}const oa=new ZD;class DD{async request(t,n={}){const i=await oa.getCredentials();if(!i)throw new Error("Not authenticated to Rocket.Chat");const r=`${oa.getServerUrl()}${t}`,l={"Content-Type":"application/json","X-Auth-Token":i.authToken,"X-User-Id":i.userId,...n.headers},s=await fetch(r,{...n,headers:l}),c=s.headers.get("content-type");if(!c||!c.includes("application/json")){const u=await s.text();throw console.error(`[RocketChatService] Expected JSON but got ${c}:`,u.substring(0,200)),new Error(`Invalid response from Rocket.Chat: expected JSON, got ${c}`)}const d=await s.json();if(!s.ok||d.success===!1){const u=new Error(d.error||`HTTP ${s.status}`);throw u.status=s.status,u.data=d,u}return d}async getSubscriptions(){return(await this.request("/api/v1/subscriptions.get")).update||[]}async getGroups(){return(await this.request("/api/v1/groups.list")).groups||[]}async getRoomInfo(t){return(await this.request(`/api/v1/rooms.info?roomId=${t}`)).room}async getMessages(t,n={}){const i=new URLSearchParams({roomId:t,count:n.count||50});return n.oldest&&i.append("oldest",n.oldest),n.latest&&i.append("latest",n.latest),(await this.request(`/api/v1/groups.history?${i.toString()}`)).messages||[]}async sendMessage(t,n){return(await this.request("/api/v1/chat.postMessage",{method:"POST",body:JSON.stringify({roomId:t,text:n})})).message}async markAsRead(t){await this.request("/api/v1/subscriptions.read",{method:"POST",body:JSON.stringify({rid:t})})}async getUnreadCounts(){const t=await this.getSubscriptions(),n={};for(const i of t)i.unread>0&&(n[i.rid]=i.unread);return n}async getUserPresence(t){try{return(await this.request(`/api/v1/users.getPresence?userId=${t}`)).presence}catch{return"offline"}}async setUserPresence(t){await this.request("/api/v1/users.setStatus",{method:"POST",body:JSON.stringify({status:t})})}async getRoomMembers(t){return(await this.request(`/api/v1/groups.members?roomId=${t}`)).members||[]}async uploadFile(t,n,i=""){const o=await oa.getCredentials();if(!o)throw new Error("Not authenticated to Rocket.Chat");const r=new FormData;r.append("file",n),i&&r.append("description",i);const l=oa.getServerUrl(),s=await fetch(`${l}/api/v1/rooms.upload/${t}`,{method:"POST",headers:{"X-Auth-Token":o.authToken,"X-User-Id":o.userId},body:r}),c=await s.json();if(!s.ok||c.success===!1)throw new Error(c.error||"Failed to upload file");return c}}const An=new DD,wD={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:25e3,messageBufferSize:100},it={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",AUTHENTICATING:"authenticating",READY:"ready",RECONNECTING:"reconnecting",ERROR:"error"};function Vg(a={}){const t={...wD,...a},n=e.ref(it.DISCONNECTED),i=e.ref(null),o=e.ref(0),r=e.shallowRef([]),l=e.ref(new Set);let s=null,c=null,d=null,u=!1,b=0,m=new Map;const p={onConnected:[],onDisconnected:[],onReady:[],onMessage:[],onRoomMessage:[],onTyping:[],onPresence:[],onError:[],onReconnecting:[]},g=(U,B)=>(p[U]&&p[U].push(B),()=>_(U,B)),_=(U,B)=>{if(p[U]){const de=p[U].indexOf(B);de>-1&&p[U].splice(de,1)}},f=(U,...B)=>{p[U]&&p[U].forEach(de=>de(...B))},h=()=>String(++b),S=()=>new Promise((U,B)=>{if(s&&s.readyState===WebSocket.OPEN){U();return}const de=oa.getWebSocketUrl();if(!de){const ne=new Error("WebSocket URL not configured");i.value=ne,n.value=it.ERROR,B(ne);return}u=!1,n.value=it.CONNECTING;try{s=new WebSocket(de),s.onopen=()=>{n.value=it.CONNECTED,o.value=0,i.value=null,T({msg:"connect",version:"1",support:["1","pre2","pre1"]}),f("onConnected")},s.onclose=ne=>{fe(),n.value=it.DISCONNECTED,!u&&!ne.wasClean&&K(),f("onDisconnected",ne)},s.onerror=ne=>{i.value=ne,n.value=it.ERROR,f("onError",ne),B(ne)},s.onmessage=ne=>{try{const se=JSON.parse(ne.data);I(se,U,B)}catch(se){console.error("[ChatWebSocket] Failed to parse message:",se)}}}catch(ne){i.value=ne,n.value=it.ERROR,f("onError",ne),B(ne)}}),y=()=>{u=!0,fe(),ee(),s&&(s.close(1e3,"User disconnected"),s=null),n.value=it.DISCONNECTED,r.value=[],l.value=new Set,m.clear()},T=U=>s&&s.readyState===WebSocket.OPEN?(s.send(JSON.stringify(U)),!0):!1,O=U=>T(U)?!0:(r.value.length<t.messageBufferSize?r.value=[...r.value,U]:console.warn("[ChatWebSocket] Message buffer full, dropping message"),!1),D=(U,B=[])=>new Promise((de,ne)=>{const se=h();m.set(se,{resolve:de,reject:ne}),T({msg:"method",method:U,id:se,params:B})||(m.delete(se),ne(new Error("WebSocket not connected"))),setTimeout(()=>{m.has(se)&&(m.delete(se),ne(new Error(`Method ${U} timed out`)))},3e4)}),I=(U,B,de)=>{switch(U.msg){case"connected":Q(),C(B,de);break;case"ping":T({msg:"pong"});break;case"pong":break;case"result":A(U);break;case"ready":break;case"added":case"changed":case"removed":w(U);break;case"error":X(U,de);break;case"failed":console.error("[ChatWebSocket] DDP version negotiation failed"),n.value=it.ERROR,de&&de(new Error("DDP version negotiation failed"));break;default:f("onMessage",U)}},C=async(U,B)=>{n.value=it.AUTHENTICATING;try{const de=await oa.getCredentials();if(!de)throw new Error("No credentials available");const ne=await D("login",[{resume:de.authToken}]);if(ne&&ne.id)n.value=it.READY,G(),N(),f("onReady"),U&&U();else throw new Error("Authentication failed")}catch(de){console.error("[ChatWebSocket] Authentication failed:",de),i.value=de,n.value=it.ERROR,f("onError",de),B&&B(de)}},A=U=>{const B=m.get(U.id);B&&(m.delete(U.id),U.error?B.reject(new Error(U.error.message||"Method error")):B.resolve(U.result))},w=U=>{const{collection:B,fields:de}=U;if(B==="stream-room-messages"){if(de&&de.args){const[ne]=de.args;f("onRoomMessage",ne)}}else if(B==="stream-notify-room"){if(de&&de.args){const[ne,...se]=de.args;ne==="typing"&&f("onTyping",...se)}}else B==="stream-notify-user"&&de&&de.args&&f("onMessage",{type:"user-notification",data:de.args})},X=(U,B)=>{const de=new Error(U.reason||"Unknown error");i.value=de,f("onError",de),B&&B(de)},R=async U=>{if(l.value.has(U))return;const B=h();T({msg:"sub",id:B,name:"stream-room-messages",params:[U,!1]});const de=h();T({msg:"sub",id:de,name:"stream-notify-room",params:[`${U}/typing`,!1]}),l.value=new Set([...l.value,U])},Y=U=>{l.value=new Set([...l.value].filter(B=>B!==U))},N=()=>{const U=[...l.value];l.value=new Set,U.forEach(B=>{R(B)})},V=async(U,B)=>D("sendMessage",[{_id:h(),rid:U,msg:B}]),le=(U,B,de)=>{T({msg:"method",method:"stream-notify-room",id:h(),params:[`${U}/typing`,B,de]})},Q=()=>{fe(),c=setInterval(()=>{s&&s.readyState===WebSocket.OPEN&&T({msg:"ping"})},t.heartbeatInterval)},fe=()=>{c&&(clearInterval(c),c=null)},K=()=>{if(o.value>=t.maxReconnectAttempts){console.error("[ChatWebSocket] Max reconnection attempts reached"),n.value=it.ERROR;return}n.value=it.RECONNECTING,o.value++;const U=Math.min(t.reconnectInterval*Math.pow(t.reconnectDecay,o.value-1),t.maxReconnectInterval);f("onReconnecting",o.value,U),d=setTimeout(()=>{u||S().catch(()=>{})},U)},ee=()=>{d&&(clearTimeout(d),d=null)},G=()=>{if(s&&s.readyState===WebSocket.OPEN&&r.value.length>0){const U=[...r.value];r.value=[],U.forEach(B=>{T(B)})}},P=()=>n.value===it.READY&&s&&s.readyState===WebSocket.OPEN,pe=()=>s&&s.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{y()}),{connectionState:e.readonly(n),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(r),subscribedRooms:e.readonly(l),connect:S,disconnect:y,isConnected:pe,isReady:P,subscribeRoom:R,unsubscribeRoom:Y,sendChatMessage:V,sendTyping:le,callMethod:D,send:O,on:g,off:_}}const Ug=Fe.defineStore({id:"chat",state:()=>({enabled:!1,loaded:!1,hasCredentials:!1,connectionState:it.DISCONNECTED,lastError:null,rooms:[],currentRoomId:null,messagesByRoom:{},unreadCounts:{},typingByRoom:{},currentUser:null,_webSocket:null}),getters:{currentRoom:a=>a.currentRoomId&&a.rooms.find(t=>t._id===a.currentRoomId)||null,currentMessages:a=>a.currentRoomId?a.messagesByRoom[a.currentRoomId]||[]:[],currentTypingUsers:a=>a.currentRoomId?a.typingByRoom[a.currentRoomId]||[]:[],totalUnreadCount:a=>Object.values(a.unreadCounts).reduce((t,n)=>t+n,0),isReady:a=>a.enabled&&a.hasCredentials&&a.connectionState===it.READY,isConnecting:a=>a.connectionState===it.CONNECTING||a.connectionState===it.AUTHENTICATING,isReconnecting:a=>a.connectionState===it.RECONNECTING,isAvailable:a=>a.enabled&&a.loaded&&a.hasCredentials},actions:{async init(){try{const a=je();if(oa.init({CHAT_ENABLED:a.CHAT_ENABLED,ROCKETCHAT_HOST:a.ROCKETCHAT_HOST,ROCKETCHAT_WS_URL:a.ROCKETCHAT_WS_URL,CHAT_OAUTH_ENABLED:a.CHAT_OAUTH_ENABLED,CHAT_OAUTH_SERVICE:a.CHAT_OAUTH_SERVICE}),this.enabled=oa.isEnabled(),this.enabled){const t=await oa.getCredentials();this.hasCredentials=!!t,this.hasCredentials&&(this.currentUser=await oa.getCurrentUser())}this.loaded=!0,console.log("[ChatStore] Initialized, enabled:",this.enabled,"hasCredentials:",this.hasCredentials)}catch(a){console.error("[ChatStore] Failed to initialize:",a),this.enabled=!1,this.loaded=!0}},async connect(){if(!this.enabled||!this.hasCredentials)return console.warn("[ChatStore] Cannot connect: chat not available"),!1;if(this._webSocket&&this.connectionState===it.READY)return!0;try{return this._webSocket=Vg(),this._webSocket.on("onReady",()=>{this.connectionState=it.READY,this.loadRooms(),this.currentRoomId&&this._webSocket.subscribeRoom(this.currentRoomId)}),this._webSocket.on("onDisconnected",()=>{this.connectionState=it.DISCONNECTED}),this._webSocket.on("onReconnecting",a=>{this.connectionState=it.RECONNECTING,console.log("[ChatStore] Reconnecting, attempt:",a)}),this._webSocket.on("onError",a=>{this.lastError=a,this.connectionState=it.ERROR}),this._webSocket.on("onRoomMessage",a=>{this.handleNewMessage(a)}),this._webSocket.on("onTyping",(a,t)=>{this.handleTypingIndicator(a,t)}),this.connectionState=it.CONNECTING,await this._webSocket.connect(),!0}catch(a){return console.error("[ChatStore] Connection failed:",a),this.lastError=a,this.connectionState=it.ERROR,!1}},disconnect(){this._webSocket&&(this._webSocket.disconnect(),this._webSocket=null),this.connectionState=it.DISCONNECTED},async loadRooms(){try{const a=await An.getSubscriptions();this.rooms=a.map(n=>({_id:n.rid,name:n.name,fname:n.fname||n.name,type:n.t,unread:n.unread||0,lastMessage:n.lastMessage,updatedAt:n._updatedAt}));const t={};a.forEach(n=>{n.unread>0&&(t[n.rid]=n.unread)}),this.unreadCounts=t}catch(a){console.error("[ChatStore] Failed to load rooms:",a)}},async selectRoom(a){if(!a){this.currentRoomId=null;return}this.currentRoomId=a,this._webSocket&&this._webSocket.isReady()&&await this._webSocket.subscribeRoom(a),this.messagesByRoom[a]||await this.loadMessages(a),await this.markAsRead(a)},async loadMessages(a,t={}){try{const i=[...await An.getMessages(a,{count:t.count||50,oldest:t.oldest,latest:t.latest})].reverse();t.prepend&&this.messagesByRoom[a]?this.messagesByRoom[a]=[...i,...this.messagesByRoom[a]]:this.messagesByRoom[a]=i}catch(n){console.error("[ChatStore] Failed to load messages:",n)}},async sendMessage(a){if(!(!this.currentRoomId||!a.trim()))try{this._webSocket&&this._webSocket.isReady()?await this._webSocket.sendChatMessage(this.currentRoomId,a):await An.sendMessage(this.currentRoomId,a)}catch(t){throw console.error("[ChatStore] Failed to send message:",t),t}},async markAsRead(a){try{await An.markAsRead(a),this.unreadCounts[a]=0}catch(t){console.error("[ChatStore] Failed to mark as read:",t)}},handleNewMessage(a){const t=a.rid;this.messagesByRoom[t]||(this.messagesByRoom[t]=[]),a.ts&&typeof a.ts=="object"&&a.ts.$date&&(a.ts=new Date(a.ts.$date).toISOString()),this.messagesByRoom[t].some(i=>i._id===a._id)||(this.messagesByRoom[t].push(a),t!==this.currentRoomId&&(this.unreadCounts[t]=(this.unreadCounts[t]||0)+1))},handleTypingIndicator(a,t){const n=this.currentRoomId;n&&(this.currentUser&&a===this.currentUser.username||(this.typingByRoom[n]||(this.typingByRoom[n]=[]),t?this.typingByRoom[n].includes(a)||this.typingByRoom[n].push(a):this.typingByRoom[n]=this.typingByRoom[n].filter(i=>i!==a)))},sendTypingIndicator(a){!this.currentRoomId||!this.currentUser||!this._webSocket||!this._webSocket.isReady()||this._webSocket.sendTyping(this.currentRoomId,this.currentUser.username,a)},async getOrCreateWorkspaceRoom(a){try{let t=await vi.getWorkspaceRoom(a);return t.found||(t=await vi.createWorkspaceRoom(a)),t&&t.roomId?(await this.loadRooms(),t):null}catch(t){return console.error("[ChatStore] Failed to get/create workspace room:",t),null}},async uploadFile(a,t=""){if(!this.currentRoomId)throw new Error("No room selected");try{await An.uploadFile(this.currentRoomId,a,t)}catch(n){throw console.error("[ChatStore] Failed to upload file:",n),n}},clear(){this.disconnect(),this.rooms=[],this.currentRoomId=null,this.messagesByRoom={},this.unreadCounts={},this.typingByRoom={},this.currentUser=null,this.lastError=null}}}),WD={name:"ChatMessage",components:{PrimeAvatar:Ji},props:{message:{type:Object,required:!0},currentUserId:{type:String,default:""}},emits:["attachment-click"],computed:{isOwnMessage(){return this.message.u?._id===this.currentUserId},isSystemMessage(){return this.message.t!==void 0},hasAttachments(){return this.message.attachments&&this.message.attachments.length>0},avatarLabel(){return(this.message.u?.name||this.message.u?.username||"?").charAt(0).toUpperCase()},avatarColor(){const a=this.message.u?.username||"";let t=0;for(let i=0;i<a.length;i++)t=a.charCodeAt(i)+((t<<5)-t);return`hsl(${Math.abs(t%360)}, 65%, 45%)`},formattedTime(){if(!this.message.ts)return"";const a=new Date(this.message.ts),t=new Date;return a.toDateString()===t.toDateString()?a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):a.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},methods:{isImageAttachment(a){return a.image_url?!0:["image/jpeg","image/png","image/gif","image/webp"].includes(a.image_type)},getAttachmentUrl(a){const t=oa.getServerUrl(),n=a.image_url||a.title_link;return n?n.startsWith("http")?n:`${t}${n}`:""},openAttachment(a){this.$emit("attachment-click",a)}}},LD={key:0,class:"chat-message__avatar"},YD={class:"chat-message__content"},kD={key:0,class:"chat-message__header"},xD={key:0,class:"chat-message__username"},zD={class:"chat-message__time"},GD={class:"chat-message__body"},FD={key:0,class:"chat-message__text"},XD={key:1,class:"chat-message__attachments"},PD=["src","alt","onClick"],VD={key:1,class:"chat-message__attachment-file"},UD=["href"],jD={key:0,class:"attachment-desc"},BD={key:0,class:"chat-message__text mt-2"};function HD(a,t,n,i,o,r){const l=e.resolveComponent("PrimeAvatar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-message",{"chat-message--own":r.isOwnMessage,"chat-message--system":r.isSystemMessage}])},[!r.isOwnMessage&&!r.isSystemMessage?(e.openBlock(),e.createElementBlock("div",LD,[e.createVNode(l,{label:r.avatarLabel,style:e.normalizeStyle({backgroundColor:r.avatarColor}),shape:"circle"},null,8,["label","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",YD,[r.isSystemMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",kD,[r.isOwnMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",xD,e.toDisplayString(n.message.u?.name||n.message.u?.username||a.$t("chat.unknownUser")),1)),e.createElementVNode("span",zD,e.toDisplayString(r.formattedTime),1)])),e.createElementVNode("div",GD,[r.hasAttachments?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",FD,e.toDisplayString(n.message.msg),1)),r.hasAttachments?(e.openBlock(),e.createElementBlock("div",XD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.message.attachments,s=>(e.openBlock(),e.createElementBlock("div",{key:s._id||s.title,class:"chat-message__attachment"},[r.isImageAttachment(s)?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.getAttachmentUrl(s),alt:s.title||s.description,class:"chat-message__attachment-image",onClick:c=>r.openAttachment(s)},null,8,PD)):(e.openBlock(),e.createElementBlock("div",VD,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-attachment-line"},null,-1)),e.createElementVNode("a",{href:r.getAttachmentUrl(s),target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(s.title||a.$t("chat.attachment")),9,UD),s.description?(e.openBlock(),e.createElementBlock("span",jD,e.toDisplayString(s.description),1)):e.createCommentVNode("",!0)]))]))),128)),n.message.msg?(e.openBlock(),e.createElementBlock("div",BD,e.toDisplayString(n.message.msg),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])],2)}const Ac=Se(WD,[["render",HD],["__scopeId","data-v-4292a3b6"]]),JD={name:"ChatInput",components:{PrimeButton:ce,PrimeTextarea:va},props:{disabled:{type:Boolean,default:!1},typingUsers:{type:Array,default:()=>[]}},emits:["send","typing","upload"],data(){return{message:"",selectedFiles:[],typingTimeout:null,isTyping:!1}},computed:{canSend(){return this.message.trim().length>0||this.selectedFiles.length>0},typingText(){return this.typingUsers.length===0?"":this.typingUsers.length===1?this.$t("chat.userTyping",{user:this.typingUsers[0]}):this.typingUsers.length===2?this.$t("chat.usersTyping",{user1:this.typingUsers[0],user2:this.typingUsers[1]}):this.$t("chat.multipleUsersTyping")}},beforeUnmount(){this.typingTimeout&&clearTimeout(this.typingTimeout),this.isTyping&&this.$emit("typing",!1)},methods:{handleKeyDown(a){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),this.sendMessage())},handleInput(){this.isTyping||(this.isTyping=!0,this.$emit("typing",!0)),this.typingTimeout&&clearTimeout(this.typingTimeout),this.typingTimeout=setTimeout(()=>{this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1))},3e3)},sendMessage(){if(this.canSend){if(this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1)),this.selectedFiles.length>0){this.selectedFiles.forEach(a=>{this.$emit("upload",a,this.message)}),this.selectedFiles=[],this.message="";return}this.message.trim()&&(this.$emit("send",this.message.trim()),this.message="")}},triggerFileInput(){this.$refs.fileInput.click()},handleFileSelect(a){const t=Array.from(a.target.files);this.selectedFiles=[...this.selectedFiles,...t],a.target.value=""},removeFile(a){this.selectedFiles.splice(a,1)}}},QD={class:"chat-input"},KD={class:"chat-input__container"},qD={key:0,class:"chat-input__typing"},$D={class:"typing-text"},ew={key:1,class:"chat-input__files"},tw={class:"file-name"};function aw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeTextarea");return e.openBlock(),e.createElementBlock("div",QD,[e.createElementVNode("div",KD,[e.createVNode(l,{type:"button",icon:"ri-attachment-line",text:"",rounded:"",disabled:n.disabled,"aria-label":a.$t("chat.attachFile"),onClick:r.triggerFileInput},null,8,["disabled","aria-label","onClick"]),e.createElementVNode("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:t[0]||(t[0]=(...c)=>r.handleFileSelect&&r.handleFileSelect(...c))},null,544),e.createVNode(s,{modelValue:o.message,"onUpdate:modelValue":t[1]||(t[1]=c=>o.message=c),placeholder:a.$t("chat.typeMessage"),disabled:n.disabled,"auto-resize":"",rows:1,class:"chat-input__textarea",onKeydown:r.handleKeyDown,onInput:r.handleInput},null,8,["modelValue","placeholder","disabled","onKeydown","onInput"]),e.createVNode(l,{type:"button",icon:"ri-send-plane-2-fill",rounded:"",disabled:n.disabled||!r.canSend,"aria-label":a.$t("chat.send"),onClick:r.sendMessage},null,8,["disabled","aria-label","onClick"])]),n.typingUsers.length>0?(e.openBlock(),e.createElementBlock("div",qD,[t[2]||(t[2]=e.createElementVNode("span",{class:"typing-dots"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")],-1)),e.createElementVNode("span",$D,e.toDisplayString(r.typingText),1)])):e.createCommentVNode("",!0),o.selectedFiles.length>0?(e.openBlock(),e.createElementBlock("div",ew,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedFiles,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"chat-input__file"},[t[3]||(t[3]=e.createElementVNode("i",{class:"ri-file-line"},null,-1)),e.createElementVNode("span",tw,e.toDisplayString(c.name),1),e.createVNode(l,{type:"button",icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:u=>r.removeFile(d)},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)])}const Oc=Se(JD,[["render",aw],["__scopeId","data-v-7f372c65"]]),nw={name:"ChatRoomList",components:{PrimeInputText:at,PrimeBadge:wn},props:{rooms:{type:Array,default:()=>[]},selectedRoomId:{type:String,default:null},unreadCounts:{type:Object,default:()=>({})}},emits:["select"],data(){return{searchQuery:""}},computed:{filteredRooms(){if(!this.searchQuery.trim())return this.sortedRooms;const a=this.searchQuery.toLowerCase();return this.sortedRooms.filter(t=>(t.fname||t.name||"").toLowerCase().includes(a))},sortedRooms(){return[...this.rooms].sort((a,t)=>{const n=this.unreadCounts[a._id]||0,i=this.unreadCounts[t._id]||0;if(n!==i)return i-n;const o=new Date(a.updatedAt||0);return new Date(t.updatedAt||0)-o})}},methods:{selectRoom(a){this.$emit("select",a._id)},getUnreadCount(a){return this.unreadCounts[a]||0},getRoomIcon(a){switch(a.type){case"c":return"ri-hashtag";case"p":return"ri-lock-line";case"d":return"ri-user-line";default:return"ri-chat-3-line"}},truncateMessage(a){if(!a)return"";const t=40;return a.length<=t?a:a.substring(0,t)+"..."}}},iw={class:"chat-room-list"},ow={class:"chat-room-list__search"},rw={class:"p-input-icon-left w-full"},lw={class:"chat-room-list__items"},sw=["onClick"],cw={class:"chat-room-item__icon"},dw={class:"chat-room-item__info"},mw={class:"chat-room-item__name"},pw={key:0,class:"chat-room-item__last-message"},uw={key:0,class:"last-message-user"},bw={key:0,class:"chat-room-list__empty"};function gw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeBadge");return e.openBlock(),e.createElementBlock("div",iw,[e.createElementVNode("div",ow,[e.createElementVNode("span",rw,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createVNode(l,{modelValue:o.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=c=>o.searchQuery=c),placeholder:a.$t("chat.searchRooms"),class:"w-full"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",lw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.filteredRooms,c=>(e.openBlock(),e.createElementBlock("div",{key:c._id,class:e.normalizeClass(["chat-room-item",{"chat-room-item--selected":c._id===n.selectedRoomId}]),onClick:d=>r.selectRoom(c)},[e.createElementVNode("div",cw,[e.createElementVNode("i",{class:e.normalizeClass(r.getRoomIcon(c))},null,2)]),e.createElementVNode("div",dw,[e.createElementVNode("div",mw,e.toDisplayString(c.fname||c.name),1),c.lastMessage?(e.openBlock(),e.createElementBlock("div",pw,[c.lastMessage.u?(e.openBlock(),e.createElementBlock("span",uw,e.toDisplayString(c.lastMessage.u.name||c.lastMessage.u.username)+": ",1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.truncateMessage(c.lastMessage.msg)),1)])):e.createCommentVNode("",!0)]),r.getUnreadCount(c._id)>0?(e.openBlock(),e.createBlock(s,{key:0,value:r.getUnreadCount(c._id),severity:"danger",class:"chat-room-item__badge"},null,8,["value"])):e.createCommentVNode("",!0)],10,sw))),128)),r.filteredRooms.length===0?(e.openBlock(),e.createElementBlock("div",bw,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-chat-3-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.noRooms")),1)])):e.createCommentVNode("",!0)])])}const Cc=Se(nw,[["render",gw],["__scopeId","data-v-4c6163fd"]]),_w={name:"ChatPanel",components:{PrimeButton:ce,PrimeProgressSpinner:ea,ChatMessage:Ac,ChatInput:Oc,ChatRoomList:Cc},props:{showRoomList:{type:Boolean,default:!0},roomId:{type:String,default:null}},emits:["close","minimize","go-to-profile"],data(){return{minimized:!1,loadingMore:!1}},computed:{...Fe.mapStores(Ug),currentRoom(){return this.chatStore.currentRoom},currentUserId(){return this.chatStore.currentUser?._id||""},headerTitle(){return this.currentRoom?this.currentRoom.fname||this.currentRoom.name:this.$t("chat.title")},canLoadMore(){return this.chatStore.currentMessages.length>=50}},watch:{roomId:{immediate:!0,handler(a){a&&this.selectRoom(a)}},"chatStore.currentMessages":{handler(){this.$nextTick(()=>{this.scrollToBottom()})}}},async mounted(){await this.initChat()},beforeUnmount(){},methods:{async initChat(){this.chatStore.loaded||await this.chatStore.init(),this.chatStore.isAvailable&&!this.chatStore.isReady&&await this.chatStore.connect()},async selectRoom(a){await this.chatStore.selectRoom(a),this.$nextTick(()=>{this.scrollToBottom()})},backToRoomList(){this.chatStore.selectRoom(null)},async sendMessage(a){try{await this.chatStore.sendMessage(a),this.$nextTick(()=>{this.scrollToBottom()})}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.sendError"),life:3e3})}},handleTyping(a){this.chatStore.sendTypingIndicator(a)},async uploadFile(a,t){try{await this.chatStore.uploadFile(a,t)}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.uploadError"),life:3e3})}},async loadMoreMessages(){if(!this.chatStore.currentRoomId||this.loadingMore)return;this.loadingMore=!0;const a=this.chatStore.currentMessages,t=a.length>0?a[0].ts:void 0;try{await this.chatStore.loadMessages(this.chatStore.currentRoomId,{count:50,latest:t,prepend:!0})}finally{this.loadingMore=!1}},handleAttachmentClick(a){const t=a.image_url||a.title_link;t&&window.open(t,"_blank","noopener,noreferrer")},scrollToBottom(){const a=this.$refs.messagesContainer;a&&(a.scrollTop=a.scrollHeight)},toggleMinimize(){this.minimized=!this.minimized,this.$emit("minimize",this.minimized)},close(){this.$emit("close")},goToProfile(){this.$emit("go-to-profile")},async reconnect(){await this.chatStore.connect()}}},hw={class:"chat-panel__header"},yw={class:"chat-panel__header-left"},fw={class:"chat-panel__title"},Nw={class:"chat-panel__header-actions"},Sw={class:"chat-panel__body"},Ew={key:0,class:"chat-panel__status"},Tw={key:0,class:"status-connecting"},Aw={key:1,class:"status-reconnecting"},Ow={key:2,class:"status-not-configured"},Cw={key:3,class:"status-error"},Rw={ref:"messagesContainer",class:"chat-panel__messages"},Iw={key:0,class:"chat-panel__load-more"},Mw={key:1,class:"chat-panel__empty"};function vw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("ChatRoomList"),d=e.resolveComponent("ChatMessage"),u=e.resolveComponent("ChatInput");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-panel",{"chat-panel--minimized":o.minimized}])},[e.createElementVNode("div",hw,[e.createElementVNode("div",yw,[n.showRoomList&&r.currentRoom?(e.openBlock(),e.createBlock(l,{key:0,type:"button",icon:"ri-arrow-left-line",text:"",rounded:"",onClick:r.backToRoomList},null,8,["onClick"])):e.createCommentVNode("",!0),e.createElementVNode("h3",fw,e.toDisplayString(r.headerTitle),1)]),e.createElementVNode("div",Nw,[e.createVNode(l,{type:"button",icon:o.minimized?"ri-fullscreen-line":"ri-subtract-line",text:"",rounded:"",onClick:r.toggleMinimize},null,8,["icon","onClick"]),e.createVNode(l,{type:"button",icon:"ri-close-line",text:"",rounded:"",onClick:r.close},null,8,["onClick"])])]),e.withDirectives(e.createElementVNode("div",Sw,[a.chatStore.isReady?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.showRoomList&&!r.currentRoom?(e.openBlock(),e.createBlock(c,{key:0,rooms:a.chatStore.rooms,"selected-room-id":a.chatStore.currentRoomId,"unread-counts":a.chatStore.unreadCounts,onSelect:r.selectRoom},null,8,["rooms","selected-room-id","unread-counts","onSelect"])):r.currentRoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Rw,[r.canLoadMore?(e.openBlock(),e.createElementBlock("div",Iw,[e.createVNode(l,{label:a.$t("chat.loadMore"),text:"",size:"small",loading:o.loadingMore,onClick:r.loadMoreMessages},null,8,["label","loading","onClick"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.chatStore.currentMessages,b=>(e.openBlock(),e.createBlock(d,{key:b._id,message:b,"current-user-id":r.currentUserId,onAttachmentClick:r.handleAttachmentClick},null,8,["message","current-user-id","onAttachmentClick"]))),128)),a.chatStore.currentMessages.length===0?(e.openBlock(),e.createElementBlock("div",Mw,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-chat-smile-2-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.noMessages")),1)])):e.createCommentVNode("",!0)],512),e.createVNode(u,{disabled:!a.chatStore.isReady,"typing-users":a.chatStore.currentTypingUsers,onSend:r.sendMessage,onTyping:r.handleTyping,onUpload:r.uploadFile},null,8,["disabled","typing-users","onSend","onTyping","onUpload"])],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",Ew,[a.chatStore.isConnecting?(e.openBlock(),e.createElementBlock("div",Tw,[e.createVNode(s,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(a.$t("chat.connecting")),1)])):a.chatStore.isReconnecting?(e.openBlock(),e.createElementBlock("div",Aw,[e.createVNode(s,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(a.$t("chat.reconnecting")),1)])):a.chatStore.hasCredentials?a.chatStore.lastError?(e.openBlock(),e.createElementBlock("div",Cw,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-error-warning-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.connectionError")),1),e.createVNode(l,{label:a.$t("chat.retry"),outlined:"",onClick:r.reconnect},null,8,["label","onClick"])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ow,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-key-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.notConfigured")),1),e.createVNode(l,{label:a.$t("chat.configureInProfile"),outlined:"",onClick:r.goToProfile},null,8,["label","onClick"])]))]))],512),[[e.vShow,!o.minimized]])],2)}const jg=Se(_w,[["render",vw],["__scopeId","data-v-2c95abae"]]),Zw={name:"WorkspaceCard",directives:{tooltip:Mt},props:{workspace:{type:Object,required:!0},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},clickable:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},noDescriptionText:{type:String,default:"Aucune description"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},roleTooltips:{type:Object,default:()=>({})}},emits:["click","action-menu"],computed:{description(){return this.workspace.description||this.workspace.properties?.["cm:description"]||""},visibilityIcon(){return{PUBLIC:"ri-global-line",PRIVATE:"ri-lock-line",MODERATED:"ri-shield-user-line"}[this.workspace.visibility]||"ri-question-line"},visibilityLabel(){return this.visibilityLabels[this.workspace.visibility]?this.visibilityLabels[this.workspace.visibility]:{PUBLIC:"Public",PRIVATE:"Privé",MODERATED:"Modéré"}[this.workspace.visibility]||this.workspace.visibility},roleLabel(){return this.roleLabels[this.workspace.role]?this.roleLabels[this.workspace.role]:this.workspace.role},roleTooltip(){return this.roleTooltips[this.workspace.role]?this.roleTooltips[this.workspace.role]:{SiteManager:"Vous pouvez gérer cet espace",SiteCollaborator:"Vous pouvez modifier le contenu",SiteContributor:"Vous pouvez ajouter du contenu",SiteConsumer:"Vous pouvez consulter le contenu"}[this.workspace.role]||""}},methods:{handleClick(){this.clickable&&this.$emit("click",this.workspace)}}},Dw={class:"workspace-card-inner"},ww={class:"workspace-card-content"},Ww={class:"workspace-card-header"},Lw={class:"workspace-card-title"},Yw={class:"workspace-card-footer"},kw={class:"workspace-card-meta"},xw={class:"workspace-card-info"};function zw(a,t,n,i,o,r){const l=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["workspace-card",{"workspace-card-clickable":n.clickable}])},[t[4]||(t[4]=e.createElementVNode("div",{class:"workspace-card-accent"},null,-1)),e.createElementVNode("div",Dw,[e.createElementVNode("div",{class:"workspace-card-body",onClick:t[2]||(t[2]=(...s)=>r.handleClick&&r.handleClick(...s))},[e.createElementVNode("div",ww,[e.createElementVNode("div",Ww,[e.withDirectives((e.openBlock(),e.createElementBlock("span",Lw,[e.createTextVNode(e.toDisplayString(n.workspace.title),1)])),[[l,n.workspace.title,void 0,{top:!0}]]),e.createElementVNode("div",{class:"workspace-card-actions",onClick:t[1]||(t[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(a.$slots,"actions",{},()=>[n.showActionMenu?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"workspace-action-btn",onClick:t[0]||(t[0]=s=>a.$emit("action-menu",s,n.workspace))},[...t[3]||(t[3]=[e.createElementVNode("i",{class:"ri-more-2-line"},null,-1)])])),[[l,n.actionMenuTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])]),n.showDescription?e.withDirectives((e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["workspace-card-description",{"no-description":!r.description}])},[e.createTextVNode(e.toDisplayString(r.description||n.noDescriptionText),1)],2)),[[l,r.description||null,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Yw,[e.createElementVNode("div",kw,[n.showRole&&n.workspace.role?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["workspace-role-badge",`workspace-role-${n.workspace.role.toLowerCase()}`])},[e.createTextVNode(e.toDisplayString(r.roleLabel),1)],2)),[[l,r.roleTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"meta",{},void 0,!0)]),e.createElementVNode("div",xw,[n.showVisibility?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.visibilityIcon,"workspace-visibility-icon"])},null,2)),[[l,r.visibilityLabel,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"footer-end",{},void 0,!0)])])])],2)}const Rc=Se(Zw,[["render",zw],["__scopeId","data-v-fa7e7cb3"]]),Gw={name:"WorkspaceList",components:{PrimeDataView:Bi,PrimeMenu:pn,WorkspaceCard:Rc},props:{workspaces:{type:Array,default:()=>[]},layout:{type:String,default:"grid",validator:a=>["grid","list"].includes(a)},paginator:{type:Boolean,default:!0},rows:{type:Number,default:12},rowsPerPageOptions:{type:Array,default:()=>[6,12,24,48]},emptyMessage:{type:String,default:"Aucun espace trouvé"},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},noDescriptionText:{type:String,default:"Aucune description"},roleTooltips:{type:Object,default:()=>({})},actionMenuItemsBuilder:{type:Function,default:null}},emits:["workspace-click","action-menu"],data(){return{currentActionMenuItems:[],currentWorkspace:null}},methods:{handleActionMenu(a,t){this.currentWorkspace=t,this.actionMenuItemsBuilder?(this.currentActionMenuItems=this.actionMenuItemsBuilder(t),this.$refs.actionMenu.toggle(a)):this.$emit("action-menu",a,t)}}},Fw={class:"workspace-list"},Xw={class:"workspace-list-empty"},Pw={class:"workspace-grid"},Vw={class:"workspace-list-view"};function Uw(a,t,n,i,o,r){const l=e.resolveComponent("WorkspaceCard"),s=e.resolveComponent("PrimeDataView"),c=e.resolveComponent("PrimeMenu");return e.openBlock(),e.createElementBlock("div",Fw,[e.createVNode(s,{value:n.workspaces,layout:n.layout,paginator:n.paginator,rows:n.rows,rowsPerPageOptions:n.rowsPerPageOptions},{empty:e.withCtx(()=>[e.createElementVNode("div",Xw,[e.renderSlot(a.$slots,"empty",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.emptyMessage),1)],!0)])]),grid:e.withCtx(d=>[e.createElementVNode("div",Pw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u.guid||u.name,class:"workspace-grid-item"},[e.renderSlot(a.$slots,"card",{workspace:u},()=>[e.createVNode(l,{workspace:u,showDescription:n.showDescription,showVisibility:n.showVisibility,showRole:n.showRole,showActionMenu:n.showActionMenu,actionMenuTooltip:n.actionMenuTooltip,noDescriptionText:n.noDescriptionText,roleLabels:n.roleLabels,visibilityLabels:n.visibilityLabels,roleTooltips:n.roleTooltips,onClick:b=>a.$emit("workspace-click",u),onActionMenu:r.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(a.$slots,"card-actions",{workspace:u},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(a.$slots,"card-meta",{workspace:u},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(a.$slots,"card-footer-end",{workspace:u},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),list:e.withCtx(d=>[e.createElementVNode("div",Vw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u.guid||u.name,class:"workspace-list-item"},[e.renderSlot(a.$slots,"list-item",{workspace:u},()=>[e.createVNode(l,{workspace:u,showDescription:n.showDescription,showVisibility:n.showVisibility,showRole:n.showRole,showActionMenu:n.showActionMenu,actionMenuTooltip:n.actionMenuTooltip,noDescriptionText:n.noDescriptionText,roleLabels:n.roleLabels,visibilityLabels:n.visibilityLabels,roleTooltips:n.roleTooltips,onClick:b=>a.$emit("workspace-click",u),onActionMenu:r.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(a.$slots,"card-actions",{workspace:u},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(a.$slots,"card-meta",{workspace:u},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(a.$slots,"card-footer-end",{workspace:u},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),_:3},8,["value","layout","paginator","rows","rowsPerPageOptions"]),e.createVNode(c,{ref:"actionMenu",model:o.currentActionMenuItems,popup:!0},null,8,["model"])])}const Bg=Se(Gw,[["render",Uw],["__scopeId","data-v-31d4e912"]]),jw={name:"PredefinedViewsPanel",components:{PrimeSelect:$t,PrimeTabs:Kn,PrimeTabList:qn,PrimeTab:Ja},props:{ancestorNodeId:{type:String,required:!0},displayContext:{type:String,default:"folderView"},initialCategory:{type:String,default:null},initialViewId:{type:String,default:null},categories:{type:Array,default:()=>[]},additionalViews:{type:Array,default:()=>[]}},emits:["load-view","category-change"],data(){return{selectedCategory:null,selectedViewId:null,isRestoringState:!1}},computed:{allViews(){return this.additionalViews},resolvedCategories(){return this.categories.filter(a=>a.display===void 0||a.display.includes(this.displayContext))},selectedCategoryObject(){return this.resolvedCategories.find(a=>a.id===this.selectedCategory)},currentViews(){if(!this.selectedCategory)return[];const a=this.selectedCategoryObject?.views||[];return this.allViews.filter(t=>t.filename&&a.includes(t.filename))}},watch:{resolvedCategories:{handler(a){a.length>0&&!this.selectedCategory&&(this.initialCategory&&a.some(t=>t.id===this.initialCategory)?(this.isRestoringState=!0,this.selectedCategory=this.initialCategory):this.selectedCategory=a[0].id,this.$nextTick(()=>{const t=this.currentViews;if(this.initialViewId&&t.some(n=>n.id===this.initialViewId)){this.selectedViewId=this.initialViewId;const n=t.find(i=>i.id===this.initialViewId);this.$emit("load-view",{view:n,ancestorNodeId:this.ancestorNodeId})}else this.isRestoringState=!1,this.$emit("category-change",{categoryId:this.selectedCategory,hasViews:t.length>0})}))},immediate:!0},selectedCategory(a){if(this.isRestoringState){this.isRestoringState=!1;return}this.selectedViewId=null,this.$nextTick(()=>{this.$emit("category-change",{categoryId:a,hasViews:this.currentViews.length>0})})},selectedViewId(a){if(a==null)return;const t=this.allViews.find(n=>n.id===a);t&&this.$emit("load-view",{view:t,ancestorNodeId:this.ancestorNodeId})},initialViewId(a){if(!a)return;this.allViews.find(n=>n.id===a)&&this.currentViews.some(n=>n.id===a)&&(this.selectedViewId=a)}}},Bw={key:0,class:"predefined-views-panel"},Hw={key:1,class:"panel-separator"},Jw={key:2,class:"tabs-wrapper"};function Qw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelect"),s=e.resolveComponent("PrimeTab"),c=e.resolveComponent("PrimeTabList"),d=e.resolveComponent("PrimeTabs");return r.resolvedCategories.length>0?(e.openBlock(),e.createElementBlock("div",Bw,[r.resolvedCategories.length>1?(e.openBlock(),e.createBlock(l,{key:0,modelValue:o.selectedCategory,"onUpdate:modelValue":t[0]||(t[0]=u=>o.selectedCategory=u),options:r.resolvedCategories,"option-label":"label","option-value":"id",size:"small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),r.resolvedCategories.length>1&&r.currentViews.length>0?(e.openBlock(),e.createElementBlock("span",Hw)):e.createCommentVNode("",!0),r.currentViews.length>0?(e.openBlock(),e.createElementBlock("div",Jw,[e.createVNode(d,{value:o.selectedViewId,"onUpdate:value":t[1]||(t[1]=u=>o.selectedViewId=u),scrollable:""},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentViews,u=>(e.openBlock(),e.createBlock(s,{key:u.id,value:u.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const Kw=Se(jw,[["render",Qw],["__scopeId","data-v-63fa555e"]]),qw={class:"view-toolbar"},$w={class:"drop-zone-text"},eW={class:"drop-zone-hint"},tW={key:0,class:"text-center p-3"},aW={key:0,class:"selection-bar"},nW={class:"selection-info"},iW={class:"selection-text"},oW={class:"selection-actions"},rW={key:2,class:"p-3"},lW={class:"flex flex-column gap-3"},sW={class:"flex flex-column gap-1"},cW={for:"edit-view-name",class:"font-semibold"},dW={class:"flex flex-column gap-1"},mW={for:"edit-view-description",class:"font-semibold"},pW=Se({__name:"ViewList",props:{views:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["load-view","views-changed"],setup(a,{emit:t}){const n=Mt,i=a,o=t,r=pa.useToast(),l=ri.useConfirm(),{t:s}=ta.useI18n(),c=e.ref(null),d=e.ref([]),u=e.ref(!1),b=e.ref(!1),m=e.ref(null),p=e.ref(""),g=e.ref(""),_=e.ref(0),f=e.ref(10),h=e.computed(()=>i.views.slice(_.value,_.value+f.value)),S=K=>{_.value=K.first,f.value=K.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const y=[{key:"name",label:s("adminViewList.existingViews.title"),visible:!0}],T=(K,ee)=>{na.getView(ee.name).then(G=>{const P=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),pe=URL.createObjectURL(P),U=document.createElement("a");U.href=pe,U.download=ee.name,U.click(),URL.revokeObjectURL(pe)}).catch(G=>{console.error("Failed to download view",G),r.add({severity:"error",summary:s("adminViewList.toast.downloadError.summary"),detail:s("adminViewList.toast.downloadError.detail"),life:4e3})})},O=(K,ee)=>{l.require({message:s("adminViewList.deleteView.confirmMessage",{name:ee.name}),header:s("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{Re.deleteNode(ee.id,"fichier").then(()=>{r.add({severity:"success",summary:s("adminViewList.deleteView.toast.success.summary"),detail:s("adminViewList.deleteView.toast.success.detail",{name:ee.name}),life:3e3}),d.value=d.value.filter(G=>G.id!==ee.id),o("views-changed")}).catch(G=>{console.error("Failed to delete view",G),r.add({severity:"error",summary:s("adminViewList.deleteView.toast.error.summary"),detail:s("adminViewList.deleteView.toast.error.detail"),life:4e3})})}})},D=async(K,ee)=>{m.value=ee;try{const G=await na.getView(ee.name);p.value=G.name||ee.name.replace(/^vue-|\.json$/g,""),g.value=G.description||""}catch{p.value=ee.name.replace(/^vue-|\.json$/g,""),g.value=""}b.value=!0},I=async()=>{if(!(!m.value||!p.value))try{const K=await na.getView(m.value.name);K.name=p.value,K.description=g.value,await na.saveView(m.value.name,K),r.add({severity:"success",summary:s("adminViewList.editView.toast.success.summary"),detail:s("adminViewList.editView.toast.success.detail"),life:3e3}),b.value=!1,o("views-changed")}catch(K){console.error("Failed to update view details",K),r.add({severity:"error",summary:s("adminViewList.editView.toast.error.summary"),detail:s("adminViewList.editView.toast.error.detail"),life:4e3})}},C=[{icon:"ri-pencil-line",tooltip:s("adminViewList.editView.button"),handler:D},{icon:"ri-download-line",tooltip:s("adminViewList.existingViews.download"),handler:T},{icon:"ri-delete-bin-line",tooltip:s("adminViewList.deleteView.button"),severity:"danger",handler:O,visible:K=>K.allowableOperations?.includes("delete")}],A=e.computed(()=>d.value.length===i.views.length&&i.views.length>0),w=()=>{d.value=[...i.views]},X=e.computed(()=>d.value.length>0&&d.value.every(K=>K.allowableOperations?.includes("delete"))),R=()=>{d.value.forEach(K=>{T(null,K)})},Y=()=>{const K=d.value.map(ee=>ee.name).join(", ");l.require({message:s("adminViewList.deleteView.confirmMessageMultiple",{count:d.value.length,names:K}),header:s("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{const ee=d.value.map(G=>Re.deleteNode(G.id,"fichier"));Promise.allSettled(ee).then(G=>{const P=G.filter(U=>U.status==="fulfilled").length,pe=G.filter(U=>U.status==="rejected").length;P>0&&r.add({severity:"success",summary:s("adminViewList.deleteView.toast.success.summary"),detail:s("adminViewList.deleteView.toast.successMultiple.detail",{count:P}),life:3e3}),pe>0&&r.add({severity:"error",summary:s("adminViewList.deleteView.toast.error.summary"),detail:s("adminViewList.deleteView.toast.errorMultiple.detail",{count:pe}),life:4e3}),d.value=[],o("views-changed")})}})},N=async()=>{try{const{default:K}=await Promise.resolve().then(()=>kk),ee=new K,G=i.views.map(async B=>{const de=await na.getView(B.name);ee.file(B.name,JSON.stringify(de,null,2))});await Promise.all(G);const P=await ee.generateAsync({type:"blob"}),pe=URL.createObjectURL(P),U=document.createElement("a");U.href=pe,U.download="vues.zip",U.click(),URL.revokeObjectURL(pe),r.add({severity:"success",summary:s("adminViewList.exportAll.toast.success.summary"),detail:s("adminViewList.exportAll.toast.success.detail",{count:i.views.length}),life:3e3})}catch(K){console.error("Failed to export views as ZIP",K),r.add({severity:"error",summary:s("adminViewList.exportAll.toast.error.summary"),detail:s("adminViewList.exportAll.toast.error.detail"),life:4e3})}},V=()=>{c.value.click()},le=K=>{const ee=Array.from(K.target.files);ee.length!==0&&(fe(ee),K.target.value="")},Q=K=>{u.value=!1;const ee=Array.from(K.dataTransfer.files).filter(G=>G.name.endsWith(".json"));if(ee.length===0){r.add({severity:"warn",summary:s("adminViewList.importView.toast.noJsonFiles.summary"),detail:s("adminViewList.importView.toast.noJsonFiles.detail"),life:4e3});return}fe(ee)},fe=async K=>{let ee=0,G=0;for(const P of K)try{const pe=await P.text(),U=JSON.parse(pe);let B=P.name.endsWith(".json")?P.name:`${P.name}.json`;B.startsWith("vue-")||(B=`vue-${B}`),await na.saveView(B,U),ee++}catch(pe){console.error(`Failed to import ${P.name}`,pe),G++}ee>0&&r.add({severity:"success",summary:s("adminViewList.importView.toast.success.summary"),detail:s("adminViewList.importView.toast.success.detail",{count:ee}),life:3e3}),G>0&&r.add({severity:"error",summary:s("adminViewList.importView.toast.error.summary"),detail:s("adminViewList.importView.toast.error.detail",{count:G}),life:4e3}),o("views-changed")};return(K,ee)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",qw,[e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.importView.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:V},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.exportAll.button"),icon:"ri-download-line",severity:"secondary",outlined:"",disabled:a.views.length===0,onClick:N},null,8,["label","disabled"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",multiple:"",style:{display:"none"},onChange:le},null,544)]),e.createElementVNode("div",{class:e.normalizeClass(["drop-zone",{"drop-zone--active":u.value}]),onDragover:ee[0]||(ee[0]=e.withModifiers(G=>u.value=!0,["prevent"])),onDragleave:ee[1]||(ee[1]=e.withModifiers(G=>u.value=!1,["prevent"])),onDrop:e.withModifiers(Q,["prevent"])},[ee[9]||(ee[9]=e.createElementVNode("i",{class:"ri-drag-drop-line drop-zone-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("span",$w,e.toDisplayString(e.unref(s)("adminViewList.dropZone.text")),1),e.createElementVNode("span",eW,e.toDisplayString(e.unref(s)("adminViewList.dropZone.hint")),1)],34),a.loading?(e.openBlock(),e.createElementBlock("div",tW,[ee[10]||(ee[10]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(s)("adminViewList.existingViews.loading")),1)])):a.views.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[d.value.length>0?(e.openBlock(),e.createElementBlock("div",aW,[e.createElementVNode("div",nW,[e.createElementVNode("span",iW,e.toDisplayString(e.unref(s)("adminViewList.selectionBar.selected",{count:d.value.length,total:a.views.length})),1),A.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:ee[2]||(ee[2]=G=>d.value=[])},e.toDisplayString(e.unref(s)("adminViewList.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:w},e.toDisplayString(e.unref(s)("adminViewList.selectionBar.selectAll",{total:a.views.length})),1))]),e.createElementVNode("div",oW,[e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:R},null,512),[[e.unref(n),e.unref(s)("adminViewList.selectionBar.downloadAll"),void 0,{top:!0}]]),ee[11]||(ee[11]=e.createElementVNode("div",{class:"action-separator"},null,-1)),X.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:Y},null,512)),[[e.unref(n),e.unref(s)("adminViewList.deleteView.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Yn,{files:h.value,"current-node":{id:"view-list"},"datatable-column-config":y,"inline-actions":C,"selected-nodes":d.value,"hide-more-actions":"","onUpdate:selectedNodes":ee[3]||(ee[3]=G=>d.value=G),onNavigateTo:ee[4]||(ee[4]=G=>o("load-view",G.name))},null,8,["files","selected-nodes"]),a.views.length>f.value?(e.openBlock(),e.createBlock(e.unref(Qn),{key:1,first:_.value,rows:f.value,"total-records":a.views.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:S},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",rW,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("adminViewList.existingViews.noViewsFound")),1)])),e.createVNode(e.unref(ao),{group:"deleteView"}),e.createVNode(e.unref(_t),{visible:b.value,"onUpdate:visible":ee[8]||(ee[8]=G=>b.value=G),header:e.unref(s)("adminViewList.editView.title"),modal:"",style:{width:"95vw",maxWidth:"30rem"}},{footer:e.withCtx(()=>[e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.editView.cancel"),severity:"secondary",text:"",onClick:ee[7]||(ee[7]=G=>b.value=!1)},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.editView.save"),icon:"ri-save-line",disabled:!p.value,onClick:I},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",lW,[e.createElementVNode("div",sW,[e.createElementVNode("label",cW,e.toDisplayString(e.unref(s)("adminViewList.editView.name")),1),e.createVNode(e.unref(at),{id:"edit-view-name",modelValue:p.value,"onUpdate:modelValue":ee[5]||(ee[5]=G=>p.value=G),placeholder:e.unref(s)("adminViewList.editView.namePlaceholder")},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",dW,[e.createElementVNode("label",mW,e.toDisplayString(e.unref(s)("adminViewList.editView.description")),1),e.createVNode(e.unref(va),{id:"edit-view-description",modelValue:g.value,"onUpdate:modelValue":ee[6]||(ee[6]=G=>g.value=G),placeholder:e.unref(s)("adminViewList.editView.descriptionPlaceholder"),rows:"3","auto-resize":""},null,8,["modelValue","placeholder"])])])]),_:1},8,["visible","header"])]))}},[["__scopeId","data-v-e15e3fbc"]]);class uW{getPlan(t){const n=je();return Qt.getConfig(n.INSTANCE_NAME,t).then(i=>i.jsonContent)}savePlan(t,n){const i=je();return Qt.updateConfig(i.INSTANCE_NAME,t,n)}async listPlans(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"plan-*.json"`},include:["properties"]};return(await Wt.search(n)).list.entries.map(o=>o.entry.name)}async getPlanWithPermissions(t){const i={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"${t}"`},include:["allowableOperations"]},[o,r]=await Promise.all([Wt.search(i),this.getPlan(t)]),s=o.list.entries[0]?.entry?.allowableOperations||[];return{content:r,allowableOperations:s}}async listPlanEntries(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"plan-*.json"`},include:["properties","allowableOperations"]};return(await Wt.search(n)).list.entries.map(o=>o.entry)}}const ga=new uW,bW={class:"create-plan-actions"},Hg=Se({__name:"ClassificationPlanCreate",emits:["create-plan","cancel"],setup(a,{emit:t}){const n=t,i=pa.useToast(),{t:o}=ta.useI18n(),r=e.ref(""),l=()=>{if(!r.value||!r.value.trim()){i.add({severity:"warn",summary:o("adminClassificationLauncher.toast.invalidName.summary"),detail:o("adminClassificationLauncher.toast.invalidName.detail"),life:3e3});return}const s=`plan-${r.value.trim()}.json`;n("create-plan",s)};return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null,e.toDisplayString(e.unref(o)("adminClassificationLauncher.createPlan.description")),1),e.createVNode(e.unref(ai),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Mn),null,{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("plan-",-1)])]),_:1}),e.createVNode(e.unref(at),{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),placeholder:e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-label":e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-required":"true",onKeyup:e.withKeys(l,["enter"])},null,8,["modelValue","placeholder","aria-label"]),e.createVNode(e.unref(Mn),null,{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1}),e.createElementVNode("div",bW,[e.createVNode(e.unref(ce),{label:e.unref(o)("adminClassificationLauncher.createPlan.cancel"),severity:"secondary",text:"",onClick:c[1]||(c[1]=d=>n("cancel"))},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(o)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",disabled:!r.value,onClick:l},null,8,["label","disabled"])])],64))}},[["__scopeId","data-v-a9d1e85f"]]),gW={class:"plan-toolbar"},_W={key:0,class:"text-center p-3"},hW={key:0,class:"selection-bar"},yW={class:"selection-info"},fW={class:"selection-text"},NW={class:"selection-actions"},SW={key:2,class:"p-3"},Jg=Se({__name:"ClassificationPlanList",props:{plans:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["select-plan","import-plan"],setup(a,{emit:t}){const n=Mt,i=a,o=t,r=pa.useToast(),l=ri.useConfirm(),{t:s}=ta.useI18n(),c=e.ref(null),d=e.ref(!1),u=e.ref([]),b=e.ref(0),m=e.ref(10),p=e.computed(()=>i.plans.slice(b.value,b.value+m.value)),g=R=>{b.value=R.first,m.value=R.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const _=[{key:"name",label:s("adminClassificationLauncher.existingPlans.title"),visible:!0}],f=(R,Y)=>{ga.getPlan(Y.name).then(N=>{const V=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),le=URL.createObjectURL(V),Q=document.createElement("a");Q.href=le,Q.download=Y.name,Q.click(),URL.revokeObjectURL(le)}).catch(N=>{console.error("Failed to download plan",N),r.add({severity:"error",summary:s("adminClassificationLauncher.toast.listError.summary"),detail:s("adminClassificationLauncher.toast.listError.detail"),life:4e3})})},h=(R,Y)=>{l.require({message:s("adminClassificationLauncher.deletePlan.confirmMessage",{name:Y.name}),header:s("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{Re.deleteNode(Y.id,"fichier").then(()=>{r.add({severity:"success",summary:s("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.success.detail",{name:Y.name}),life:3e3}),u.value=u.value.filter(N=>N.id!==Y.id),o("import-plan")}).catch(N=>{console.error("Failed to delete plan",N),r.add({severity:"error",summary:s("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.error.detail"),life:4e3})})}})},S=[{icon:"ri-download-line",tooltip:s("adminClassificationLauncher.existingPlans.download"),handler:f},{icon:"ri-delete-bin-line",tooltip:s("adminClassificationLauncher.deletePlan.button"),severity:"danger",handler:h,visible:R=>R.allowableOperations?.includes("delete")}],y=e.computed(()=>u.value.length===i.plans.length&&i.plans.length>0),T=()=>{u.value=[...i.plans]},O=e.computed(()=>u.value.length>0&&u.value.every(R=>R.allowableOperations?.includes("delete"))),D=()=>{u.value.forEach(R=>{f(null,R)})},I=()=>{u.value.forEach(R=>{o("select-plan",R.name)})},C=()=>{const R=u.value.map(Y=>Y.name).join(", ");l.require({message:s("adminClassificationLauncher.deletePlan.confirmMessageMultiple",{count:u.value.length,names:R}),header:s("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{const Y=u.value.map(N=>Re.deleteNode(N.id,"fichier"));Promise.allSettled(Y).then(N=>{const V=N.filter(Q=>Q.status==="fulfilled").length,le=N.filter(Q=>Q.status==="rejected").length;V>0&&r.add({severity:"success",summary:s("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.successMultiple.detail",{count:V}),life:3e3}),le>0&&r.add({severity:"error",summary:s("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.errorMultiple.detail",{count:le}),life:4e3}),u.value=[],o("import-plan")})}})},A=()=>{c.value.click()},w=R=>{const Y=R.target.files[0];if(!Y)return;const N=new FileReader;N.onload=V=>{try{const le=JSON.parse(V.target.result);if(!le.NATURES||!le.FIELDS||!le.EMPLACEMENT)throw new Error(s("adminClassificationLauncher.importPlan.invalidStructure"));let Q=Y.name.endsWith(".json")?Y.name:`${Y.name}.json`;Q.startsWith("plan-")||(Q=`plan-${Q}`),ga.savePlan(Q,le).then(()=>{r.add({severity:"success",summary:s("adminClassificationLauncher.importPlan.toast.success.summary"),detail:s("adminClassificationLauncher.importPlan.toast.success.detail",{filename:Q}),life:3e3}),o("import-plan"),o("select-plan",Q)}).catch(fe=>{console.error("Failed to save imported plan",fe),r.add({severity:"error",summary:s("adminClassificationLauncher.importPlan.toast.saveError.summary"),detail:s("adminClassificationLauncher.importPlan.toast.saveError.detail"),life:4e3})})}catch(le){r.add({severity:"error",summary:s("adminClassificationLauncher.importPlan.toast.parseError.summary"),detail:s("adminClassificationLauncher.importPlan.toast.parseError.detail",{message:le.message}),life:5e3})}},N.readAsText(Y),R.target.value=""},X=R=>{d.value=!1,o("select-plan",R)};return(R,Y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",gW,[e.createVNode(e.unref(ce),{label:e.unref(s)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",onClick:Y[0]||(Y[0]=N=>d.value=!0)},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminClassificationLauncher.importPlan.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:A},null,8,["label"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",style:{display:"none"},onChange:w},null,544)]),a.loading?(e.openBlock(),e.createElementBlock("div",_W,[Y[6]||(Y[6]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(s)("adminClassificationLauncher.existingPlans.loading")),1)])):a.plans.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value.length>0?(e.openBlock(),e.createElementBlock("div",hW,[e.createElementVNode("div",yW,[e.createElementVNode("span",fW,e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.selected",{count:u.value.length,total:a.plans.length})),1),y.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:Y[1]||(Y[1]=N=>u.value=[])},e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:T},e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.selectAll",{total:a.plans.length})),1))]),e.createElementVNode("div",NW,[e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-external-link-line",rounded:"",text:"",severity:"secondary",onClick:I},null,512),[[e.unref(n),e.unref(s)("adminClassificationLauncher.selectionBar.openAll"),void 0,{top:!0}]]),Y[7]||(Y[7]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:D},null,512),[[e.unref(n),e.unref(s)("adminClassificationLauncher.selectionBar.downloadAll"),void 0,{top:!0}]]),O.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:C},null,512)),[[e.unref(n),e.unref(s)("adminClassificationLauncher.deletePlan.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Yn,{files:p.value,"current-node":{id:"classification-plans"},"datatable-column-config":_,"inline-actions":S,"selected-nodes":u.value,"onUpdate:selectedNodes":Y[2]||(Y[2]=N=>u.value=N),onNavigateTo:Y[3]||(Y[3]=N=>o("select-plan",N.name))},null,8,["files","selected-nodes"]),a.plans.length>m.value?(e.openBlock(),e.createBlock(e.unref(Qn),{key:1,first:b.value,rows:m.value,"total-records":a.plans.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:g},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",SW,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("adminClassificationLauncher.existingPlans.noPlansFound")),1)])),e.createVNode(e.unref(_t),{visible:d.value,"onUpdate:visible":Y[5]||(Y[5]=N=>d.value=N),header:e.unref(s)("adminClassificationLauncher.createPlan.title"),modal:"",style:{width:"30rem"}},{default:e.withCtx(()=>[e.createVNode(Hg,{onCreatePlan:X,onCancel:Y[4]||(Y[4]=N=>d.value=!1)})]),_:1},8,["visible","header"]),e.createVNode(e.unref(ao),{group:"deletePlan"})]))}},[["__scopeId","data-v-615a03cb"]]),EW={class:"p-4"},TW={class:"text-2xl m-0"},AW={__name:"AdminClassificationLauncher",emits:["select-plan"],setup(a,{emit:t}){const n=t,i=pa.useToast(),{t:o}=ta.useI18n(),r=e.ref(!0),l=e.ref([]),s=()=>{r.value=!0,ga.listPlanEntries().then(c=>{l.value=c.sort((d,u)=>d.name.localeCompare(u.name))}).catch(c=>{i.add({severity:"error",summary:o("adminClassificationLauncher.toast.listError.summary"),detail:o("adminClassificationLauncher.toast.listError.detail"),life:4e3}),console.error(c)}).finally(()=>{r.value=!1})};return e.onMounted(()=>{s()}),(c,d)=>(e.openBlock(),e.createElementBlock("div",EW,[e.createVNode(e.unref(oi),null,{title:e.withCtx(()=>[e.createElementVNode("h1",TW,e.toDisplayString(e.unref(o)("adminClassificationLauncher.title")),1)]),content:e.withCtx(()=>[e.createVNode(Jg,{plans:l.value,loading:r.value,onSelectPlan:d[0]||(d[0]=u=>n("select-plan",u)),onImportPlan:s},null,8,["plans","loading"])]),_:1})]))}};function ra(a){if(!a)return[];const t=/\${(.*?)}/g,n=a.matchAll(t);return Array.from(n,i=>i[1].split(":")[0].trim())}function Zi(a,t){return a?a.replace(/\${(.*?)}/g,(n,i)=>{const[o,r]=i.trim().split(":"),l=t[o];if(l==null)return n;let s=String(l);return r==="upper"&&(s=s.toUpperCase()),s}):""}class OW{getAspects(t={}){return oo.listAspects(t)}getAspect(t){return oo.getAspect(t)}getTypes(t={}){return ro.listTypes(t)}getType(t){return ro.getType(t)}extractPropertiesFromType(t){const n=[];return t.properties&&Object.entries(t.properties).forEach(([i,o])=>{n.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),n}extractPropertiesFromAspect(t){const n=[];return t.properties&&Object.entries(t.properties).forEach(([i,o])=>{n.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),n}async getAllPropertyKeys(){const t=new Set;try{const n=await this.getTypes({maxItems:1e3});if(n.list?.entries)for(const o of n.list.entries){const r=await this.getType(o.entry.id);this.extractPropertiesFromType(r.entry).forEach(s=>t.add(s.key))}const i=await this.getAspects({maxItems:1e3});if(i.list?.entries)for(const o of i.list.entries){const r=await this.getAspect(o.entry.id);this.extractPropertiesFromAspect(r.entry).forEach(s=>t.add(s.key))}}catch(n){console.error("Failed to fetch property keys from Alfresco",n)}return Array.from(t).sort()}}const _a=new OW,Qg=()=>({code:"",name:"",type:"cm:content",icon:"ri-file-line",emplacement:[],aspects:[],categories:[],metadata:{}}),CW={name:"NatureForm",components:{PrimeInputText:at,PrimeMultiSelect:Dn,PrimeDropdown:qa,PrimeInputSwitch:Jc,PrimeDataTable:Ia,PrimeColumn:Ma},props:{nature:{type:Object,default:null},emplacements:{type:Array,required:!0},existingNatures:{type:Array,default:()=>[]},isDuplicating:{type:Boolean,default:!1},categories:{type:Array,default:()=>[]}},emits:["save","cancel"],setup(){return{toast:pa.useToast()}},data(){return{editableNature:Qg(),editableMetadata:[],isEditMode:!1,metadataTypes:["ignored","value","field","template","parent"],remixIcons:["ri-file-line","ri-file-text-line","ri-file-pdf-line","ri-image-line","ri-film-line","ri-folder-line","ri-archive-line","ri-mail-line"],availableProperties:[],filteredProperties:[],selectedAspects:[],availableAspects:[]}},computed:{emplacementOptions(){return this.emplacements.map(a=>a.code)},calculatedPath(){return!this.editableNature.emplacement||this.editableNature.emplacement.length===0?"/":"/"+this.editableNature.emplacement.map(a=>{const t=this.emplacements.find(i=>i.code===a);if(!t)return`[${a}]`;const n=t.metadata?.["cm:name"];return n?.value||n?.template||a}).join("/")}},watch:{nature:{handler(a){a&&a.code?(this.isEditMode=!0,this.editableNature=JSON.parse(JSON.stringify(a))):(this.isEditMode=!1,this.editableNature=a?JSON.parse(JSON.stringify(a)):Qg()),this.selectedAspects=this.editableNature.aspects||[],this.metadataToObjectArray(this.editableNature.metadata)},immediate:!0},"editableNature.type":{handler(a){a&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{async loadAvailableAspects(){try{const a=await _a.getAspects({maxItems:1e3});a.list?.entries&&(this.availableAspects=a.list.entries.map(t=>({id:t.entry.id,title:t.entry.title||t.entry.id})))}catch(a){console.error("Failed to load available aspects",a),this.availableAspects=[]}},async loadAllProperties(){const a=[];if(this.editableNature.type)try{const t=await _a.getType(this.editableNature.type),n=_a.extractPropertiesFromType(t.entry);a.push(...n.map(i=>({...i,source:`Type: ${this.editableNature.type}`})))}catch(t){console.error("Failed to load properties for type",this.editableNature.type,t)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const t of this.selectedAspects)try{const n=await _a.getAspect(t),i=_a.extractPropertiesFromAspect(n.entry);a.push(...i.map(o=>({...o,source:`Aspect: ${t}`})))}catch(n){console.error("Failed to load properties for aspect",t,n)}this.availableProperties=a,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const a={};this.editableMetadata.forEach(n=>{a[n.key]={type:n.type,value:n.value,required:n.required,title:n.title}});const t=this.availableProperties.map(n=>a[n.key]?{key:n.key,title:n.title,type:a[n.key].type,value:a[n.key].value,required:a[n.key].required||!1}:{key:n.key,title:n.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(n=>{n.type!=="ignored"&&!this.availableProperties.find(i=>i.key===n.key)&&t.push({key:n.key,title:n.title||n.key,type:n.type,value:n.value,required:n.required})}),this.editableMetadata=t},searchProperties(a){const t=a.query.toLowerCase();t?this.filteredProperties=this.availableProperties.filter(n=>n.key.toLowerCase().includes(t)||n.title.toLowerCase().includes(t)||n.source&&n.source.toLowerCase().includes(t)):this.filteredProperties=this.availableProperties},metadataToObjectArray(a){if(!a){this.editableMetadata=[];return}const t=Object.entries(a).reduce((n,[i,o])=>{const r=Object.keys(o).find(c=>c!=="required"),l=o[r],s=o.required||!1;return n[i]={type:r,value:l,required:s},n},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(n=>{const i=t[n.key]||{type:"ignored",value:"",required:!1};return{key:n.key,title:n.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(a).map(([n,i])=>{const o=Object.keys(i).find(s=>s!=="required"),r=i[o],l=i.required||!1;return{key:n,type:o,value:r,required:l,title:n}})},metadataArrayToObject(){return this.editableMetadata.reduce((a,t)=>(t.key&&t.type!=="ignored"&&(a[t.key]={[t.type]:t.value},t.required&&t.type!=="parent"&&t.type!=="template"&&(a[t.key].required=!0)),a),{})},onMetadataTypeChange(a){if(a.type==="field"&&a.key&&!a.value){const t=a.key.split(":");t.length>1?a.value=t[t.length-1]:a.value=a.key}},addMetadata(){this.editableMetadata.push({key:"",type:"value",value:"",required:!1})},removeMetadata(a){this.editableMetadata.splice(a,1)},submit(){const a=Ft.global.t;if(!this.editableNature.code||!this.editableNature.name){this.toast.add({severity:"warn",summary:a("natureForm.validation.nameAndCodeRequired"),life:4e3});return}if((!this.isEditMode||this.isDuplicating)&&this.existingNatures.some(i=>i.code===this.editableNature.code)){this.toast.add({severity:"warn",summary:a("natureForm.validation.codeAlreadyExists",{code:this.editableNature.code}),life:4e3});return}const t={...this.editableNature,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",t)}}},RW={class:"flex flex-column gap-3"},IW={class:"form-field"},MW={class:"form-label",for:"name"},vW={class:"form-field"},ZW={class:"form-label",for:"code"},DW={class:"form-field"},wW={class:"form-label",for:"type"},WW={class:"form-field"},LW={class:"form-label",for:"aspects"},YW={class:"font-semibold"},kW={class:"text-color-secondary"},xW={class:"form-field"},zW={class:"form-label",for:"icon"},GW={key:0,class:"flex align-items-center"},FW={class:"flex align-items-center"},XW={key:0,class:"form-field"},PW={class:"form-label",for:"categories"},VW={class:"form-field"},UW={class:"form-label",for:"emplacement"},jW={class:"form-help"},BW={class:"form-field"},HW={class:"form-label"},JW={key:0,class:"text-center p-3 text-color-secondary"},QW={class:"form-help"};function KW(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeDropdown"),d=e.resolveComponent("PrimeColumn"),u=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable");return e.openBlock(),e.createElementBlock("div",RW,[e.createElementVNode("div",IW,[e.createElementVNode("label",MW,e.toDisplayString(a.$t("natureForm.name")),1),e.createVNode(l,{id:"name",modelValue:o.editableNature.name,"onUpdate:modelValue":t[0]||(t[0]=m=>o.editableNature.name=m),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",vW,[e.createElementVNode("label",ZW,e.toDisplayString(a.$t("natureForm.code")),1),e.createVNode(l,{id:"code",modelValue:o.editableNature.code,"onUpdate:modelValue":t[1]||(t[1]=m=>o.editableNature.code=m),disabled:o.isEditMode&&!n.isDuplicating,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",DW,[e.createElementVNode("label",wW,e.toDisplayString(a.$t("natureForm.documentType")),1),e.createVNode(l,{id:"type",modelValue:o.editableNature.type,"onUpdate:modelValue":t[2]||(t[2]=m=>o.editableNature.type=m),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",WW,[e.createElementVNode("label",LW,e.toDisplayString(a.$t("natureForm.aspects")),1),e.createVNode(s,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":t[3]||(t[3]=m=>o.selectedAspects=m),options:o.availableAspects,placeholder:a.$t("natureForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(m=>[e.createElementVNode("div",null,[e.createElementVNode("div",YW,e.toDisplayString(m.option.id),1),e.createElementVNode("small",kW,e.toDisplayString(m.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",xW,[e.createElementVNode("label",zW,e.toDisplayString(a.$t("natureForm.icon")),1),e.createVNode(c,{id:"icon",modelValue:o.editableNature.icon,"onUpdate:modelValue":t[4]||(t[4]=m=>o.editableNature.icon=m),options:o.remixIcons,placeholder:a.$t("natureForm.chooseIcon"),class:"w-full"},{value:e.withCtx(m=>[m.value?(e.openBlock(),e.createElementBlock("div",GW,[e.createElementVNode("i",{class:e.normalizeClass([m.value,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(m.value),1)])):e.createCommentVNode("",!0)]),option:e.withCtx(m=>[e.createElementVNode("div",FW,[e.createElementVNode("i",{class:e.normalizeClass([m.option,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(m.option),1)])]),_:1},8,["modelValue","options","placeholder"])]),n.categories.length>0?(e.openBlock(),e.createElementBlock("div",XW,[e.createElementVNode("label",PW,e.toDisplayString(a.$t("natureForm.categories")),1),e.createVNode(s,{id:"categories",modelValue:o.editableNature.categories,"onUpdate:modelValue":t[5]||(t[5]=m=>o.editableNature.categories=m),options:n.categories,placeholder:a.$t("natureForm.selectCategories"),optionLabel:"label",optionValue:"id",class:"w-full",filter:""},null,8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",VW,[e.createElementVNode("label",UW,e.toDisplayString(a.$t("natureForm.emplacement")),1),e.createVNode(s,{id:"emplacement",modelValue:o.editableNature.emplacement,"onUpdate:modelValue":t[6]||(t[6]=m=>o.editableNature.emplacement=m),options:r.emplacementOptions,placeholder:a.$t("natureForm.selectPath"),class:"w-full"},null,8,["modelValue","options","placeholder"]),e.createElementVNode("small",jW,[e.createTextVNode(e.toDisplayString(a.$t("natureForm.calculatedPath"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(r.calculatedPath),1)])]),e.createElementVNode("div",BW,[e.createElementVNode("label",HW,e.toDisplayString(a.$t("natureForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",JW,e.toDisplayString(a.$t("natureForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(d,{field:"key",header:a.$t("natureForm.key")},{body:e.withCtx(({data:m})=>[e.createElementVNode("strong",null,e.toDisplayString(m.key),1),e.createElementVNode("div",QW,e.toDisplayString(m.title),1)]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:m})=>[e.createVNode(c,{modelValue:m.type,"onUpdate:modelValue":p=>m.type=p,options:o.metadataTypes,placeholder:a.$t("natureForm.mappingType"),class:"w-full",onChange:p=>r.onMetadataTypeChange(m)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.value")},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(l,{key:0,modelValue:m.value,"onUpdate:modelValue":p=>m.value=p,placeholder:a.$t("natureForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="template"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(u,{key:0,modelValue:m.required,"onUpdate:modelValue":p=>m.required=p},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const Kg=Se(CW,[["render",KW],["__scopeId","data-v-dfc83edd"]]),Di=()=>({name:"",description:"",type:"string",input:"text",values:[],search:null,regex:null,default:null,min:null,max:null}),qW=()=>({lang:"afts",query:"",valueField:"cm:name"}),wi={string:["text","textarea","password","list","multilist","select","chips","search"],number:["int","double","knob","rating"],boolean:["boolean","toggle"],date:["date","datetime"]},$W={name:"FieldForm",components:{PrimeInputText:at,PrimeTextarea:va,PrimeDropdown:qa,PrimeButton:ce,PrimeMessage:da,PrimeInputNumber:ka,PrimeInputGroup:ai,PrimeInputGroupAddon:Mn},props:{field:{type:Object,default:null},existingFields:{type:Array,default:()=>[]}},emits:["save"],data(){return{editableField:Di(),valuesAsString:"",isEditMode:!1,dataTypes:Object.keys(wi),searchLanguages:["afts","cmis","noderef"],isTestingSearch:!1,testResults:[],testError:null,regexTestString:""}},computed:{filteredInputTypes(){return wi[this.editableField.type]||[]},showValuesInput(){return["list","multilist","select"].includes(this.editableField.input)},showSearchInput(){return this.editableField.input==="search"},showStringConstraints(){return this.editableField.type==="string"&&this.editableField.input==="text"},showNumberConstraints(){return this.editableField.type==="number"},regexTestResult(){if(!this.editableField.regex||!this.regexTestString)return!1;try{return new RegExp(this.editableField.regex).test(this.regexTestString)}catch{return!1}},regexTestResultIcon(){return this.regexTestResult?"ri-check-line":"ri-close-line"},regexTestResultClass(){return this.regexTestResult?"bg-green-500":"bg-red-500"}},watch:{field:{handler(a){a&&a.name?(this.isEditMode=!0,this.editableField={...Di(),...JSON.parse(JSON.stringify(a))}):(this.isEditMode=!1,this.editableField=a?{...Di(),...JSON.parse(JSON.stringify(a))}:Di()),this.valuesAsString=(this.editableField.values||[]).join(`
|
|
153
|
+
</html>`}function hc(a={}){const{content:t,mimeType:n,customStyles:i=""}=a,o=e.computed(()=>{const c=n?.value;return c==="text/markdown"||c==="text/x-markdown"||c==="text/x-web-markdown"}),r=e.computed(()=>n?.value==="text/html"),l=e.computed(()=>o.value||r.value),s=e.computed(()=>{if(!t?.value)return Ni("");let c="";return o.value?c=gc(t.value):r.value&&(c=_c(t.value)),Ni(c,i)});return{isMarkdown:o,isHtml:r,shouldRenderPreview:l,iframeContent:s,renderMarkdown:gc,sanitizeHtml:_c,generatePreviewDocument:Ni}}const zn={aura:E_,material:T_,lara:A_,nora:O_},Gn={soho:{0:"#ffffff",50:"#f8f8f9",100:"#f0f1f2",200:"#e1e2e4",300:"#c4c5c8",400:"#9fa1a5",500:"#7f8084",600:"#65666a",700:"#4f5053",800:"#3a3b3d",900:"#27282a",950:"#131315"},viva:{0:"#ffffff",50:"#f9f9fa",100:"#f3f3f4",200:"#e6e7e8",300:"#cacacd",400:"#a5a6a9",500:"#87898a",600:"#6c6e6f",700:"#555658",800:"#3f4041",900:"#2a2b2c",950:"#151516"},ocean:{0:"#ffffff",50:"#f8f9f9",100:"#f1f2f2",200:"#e3e4e4",300:"#c7c8c8",400:"#a2a4a4",500:"#828787",600:"#686c6c",700:"#525555",800:"#3c3e3e",900:"#282a2a",950:"#141515"}},PO=[{name:"slate",label:"Slate",value:"#64748b"},{name:"emerald",label:"Emerald",value:"#10b981"},{name:"green",label:"Green",value:"#22c55e"},{name:"lime",label:"Lime",value:"#84cc16"},{name:"orange",label:"Orange",value:"#f97316"},{name:"amber",label:"Amber",value:"#f59e0b"},{name:"yellow",label:"Yellow",value:"#eab308"},{name:"teal",label:"Teal",value:"#14b8a6"},{name:"cyan",label:"Cyan",value:"#06b6d4"},{name:"sky",label:"Sky",value:"#0ea5e9"},{name:"blue",label:"Blue",value:"#3b82f6"},{name:"indigo",label:"Indigo",value:"#6366f1"},{name:"violet",label:"Violet",value:"#8b5cf6"},{name:"purple",label:"Purple",value:"#a855f7"},{name:"fuchsia",label:"Fuchsia",value:"#d946ef"},{name:"pink",label:"Pink",value:"#ec4899"},{name:"rose",label:"Rose",value:"#f43f5e"},{name:"red",label:"Red",value:"#ef4444"}],VO=[{name:"slate",label:"Slate",value:"#64748b"},{name:"gray",label:"Gray",value:"#6b7280"},{name:"zinc",label:"Zinc",value:"#71717a"},{name:"neutral",label:"Neutral",value:"#737373"},{name:"stone",label:"Stone",value:"#78716c"},{name:"soho",label:"Soho",value:"#7f8084"},{name:"viva",label:"Viva",value:"#87898a"},{name:"ocean",label:"Ocean",value:"#828787"}],Si=[12,13,14,15,16,17,18],UO=["85%","90%","95%","100%","105%","110%","115%"],Oa={darkMode:!1,preset:"aura",primaryColor:"emerald",surfaceColor:"slate",scale:3},Ot={darkMode:"user-dark-mode",preset:"user-preset",primaryColor:"user-primary-color",surfaceColor:"user-surface-color",scale:"user-scale"};function Ei(){const a=()=>{const h=localStorage.getItem(Ot.darkMode)==="true";return h?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark"),h},t=h=>{localStorage.setItem(Ot.darkMode,h.toString()),h?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark")},n=()=>localStorage.getItem(Ot.darkMode)==="true",i=()=>{const h=localStorage.getItem(Ot.preset)||Oa.preset;return h&&zn[h]&&za.usePreset(zn[h]),h},o=h=>{zn[h]&&(localStorage.setItem(Ot.preset,h),za.usePreset(zn[h]),l(),d())},r=()=>localStorage.getItem(Ot.preset)||Oa.preset,l=()=>{const h=localStorage.getItem(Ot.primaryColor)||Oa.primaryColor;return za.updatePrimaryPalette({50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`}),h},s=h=>{localStorage.setItem(Ot.primaryColor,h),za.updatePrimaryPalette({50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`})},c=()=>localStorage.getItem(Ot.primaryColor)||Oa.primaryColor,d=()=>{const h=localStorage.getItem(Ot.surfaceColor)||Oa.surfaceColor;return Gn[h]?za.updateSurfacePalette(Gn[h]):za.updateSurfacePalette({0:"#ffffff",50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`}),h},u=h=>{localStorage.setItem(Ot.surfaceColor,h),Gn[h]?za.updateSurfacePalette(Gn[h]):za.updateSurfacePalette({0:"#ffffff",50:`{${h}.50}`,100:`{${h}.100}`,200:`{${h}.200}`,300:`{${h}.300}`,400:`{${h}.400}`,500:`{${h}.500}`,600:`{${h}.600}`,700:`{${h}.700}`,800:`{${h}.800}`,900:`{${h}.900}`,950:`{${h}.950}`})},b=()=>localStorage.getItem(Ot.surfaceColor)||Oa.surfaceColor,m=()=>{const h=localStorage.getItem(Ot.scale)||Oa.scale.toString(),S=parseInt(h),y=Si[S]||Si[Oa.scale];return document.documentElement.style.fontSize=`${y}px`,S},p=h=>{const S=Si[h];S&&(document.documentElement.style.fontSize=`${S}px`,localStorage.setItem(Ot.scale,h.toString()))},g=()=>parseInt(localStorage.getItem(Ot.scale)||Oa.scale.toString()),_=()=>{a(),i(),l(),d(),m()};return{applyDarkMode:a,applyPreset:i,applyPrimaryColor:l,applySurfaceColor:d,applyScale:m,applyAllThemeSettings:_,setDarkMode:t,setPreset:o,setPrimaryColor:s,setSurfaceColor:u,setScale:p,isDarkMode:n,getPreset:r,getPrimaryColor:c,getSurfaceColor:b,getScale:g,resetToDefaults:()=>{localStorage.removeItem(Ot.darkMode),localStorage.removeItem(Ot.preset),localStorage.removeItem(Ot.primaryColor),localStorage.removeItem(Ot.surfaceColor),localStorage.removeItem(Ot.scale),_()},themePresets:zn,primaryColors:PO,surfaceColors:VO,customSurfacePalettes:Gn,scaleValues:Si,scalePercentages:UO,defaults:Oa,storageKeys:Ot}}const jO={class:"code-viewer-wrapper"},BO={key:0,class:"loading-container"},HO={key:1,class:"error-container"},JO={key:2},QO=["srcdoc"],KO={name:"PreviewPanel",components:{VideoPlayer:vo,ImageViewer:Mo,AudioPlayer:Zo,PDFComponent:co,CodeMirrorViewer:Se({__name:"CodeMirrorViewer",props:{contentNode:{type:Object,required:!0},isSharedLink:{type:Boolean,default:!1}},setup(a){const{t}=ta.useI18n(),{isDarkMode:n}=Ei(),i=a,o=e.ref(""),r=e.ref(null),l=e.ref(null),s=e.shallowRef(null),c=e.ref(!1),d=e.ref(null),{isMarkdown:u,isHtml:b,iframeContent:m}=hc({content:o,mimeType:r}),p=()=>{if(!l.value)return;const f=Nn(r.value),S=[...Sn({editable:!1,showLineNumbers:!0,enableHistory:!1,dark:n()})];f&&(!Array.isArray(f)||f.length>0)&&S.push(f);const y=xa.EditorState.create({doc:o.value,extensions:S});s.value=new Dt.EditorView({state:y,parent:l.value})},g=()=>{s.value&&(s.value.destroy(),s.value=null)},_=async f=>{if(!(!f.id&&!f.shareId)){c.value=!0,d.value=null;try{let h;i.isSharedLink&&f.shareId?h=await Re.getSharedLinkContent(f.shareId):h=await Re.getNodeContent(f.id,!1);let S=await h.text();if(f.content?.mimeType==="application/json")try{S=JSON.stringify(JSON.parse(S),null,2)}catch(y){console.warn("Failed to format JSON, displaying raw content:",y.message)}o.value=S,r.value=f.content?.mimeType||"text/plain",c.value=!1,await e.nextTick(),!u.value&&!b.value&&p()}catch(h){console.error("Failed to load content:",h),d.value=t("editor.loadError"),c.value=!1}}};return e.watch(()=>i.contentNode,f=>{f&&(g(),_(f))},{immediate:!0}),e.onBeforeUnmount(()=>{g()}),(f,h)=>(e.openBlock(),e.createElementBlock("div",jO,[c.value?(e.openBlock(),e.createElementBlock("div",BO,[e.createVNode(e.unref(ea))])):d.value?(e.openBlock(),e.createElementBlock("div",HO,[h[0]||(h[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(d.value),1)])):(e.openBlock(),e.createElementBlock("div",JO,[e.unref(u)||e.unref(b)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(m),class:"preview-iframe w-full h-screen",sandbox:"allow-scripts allow-popups"},null,8,QO)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:l,class:"h-full w-full"},null,512))]))]))}},[["__scopeId","data-v-5063b880"]]),PrimeButton:ce},directives:{tooltip:Mt},inject:["collaboraService","isCurrentNodeDisplayed"],props:{isPreviewPanelVisible:{type:Boolean,default:!1},currentNodeDisplayed:{type:Object,default:()=>({})},hasOnlyOneFile:{type:Boolean,default:!1}},emits:["closeContentPanel","showPreviousFile","showNextFile"],data(){return{url:null}},computed:{...Fe.mapState(Rt,["children"])},watch:{currentNodeDisplayed(a){a!=null?this.computeUrl(a):this.closeContentPanel()}},methods:{getPDFRef(){return this.$refs.pdfComponent},getImagePreviewRef(){return this.$refs.imageViewer},closeContentPanel(){this.$emit("closeContentPanel")},showPreviousFile(a){this.$emit("showPreviousFile",a)},showNextFile(a){this.$emit("showNextFile",a)},computeUrl(a){this.mimeType=a.content.mimeType,this.currentFileName=a.name,this.currentFileId=a.id,this.mimeType&&(this.mimeType==="application/pdf"||this.mimeType.includes("image/")||this.mimeType.includes("video/")||this.mimeType.includes("audio/"))?this.url=It.getContentUrl(a.id):It.getRenditionUrl(a.id).then(t=>{this.url=t}).catch(t=>{if(t.message==="NOT_CREATED")return console.warn("Fail loading content : NOT_CREATED"),null;console.error("Fail loading content",t)})}}},qO={class:"preview-card"},$O={key:0,class:"panel-header"},eC={class:"file-name"},tC={class:"nav-actions"},aC={class:"preview-content"};function nC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("router-link"),c=e.resolveComponent("ImageViewer"),d=e.resolveComponent("VideoPlayer"),u=e.resolveComponent("AudioPlayer"),b=e.resolveComponent("CodeMirrorViewer"),m=e.resolveComponent("PDFComponent"),p=e.resolveDirective("tooltip");return n.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["preview-panel-container",{hidden:!n.isPreviewPanelVisible}])},[e.createElementVNode("div",qO,[n.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",$O,[e.createVNode(l,{class:"close-btn",type:"button",icon:"ri-close-line",severity:"danger",rounded:"",text:"",onClick:r.closeContentPanel},null,8,["onClick"]),e.withDirectives((e.openBlock(),e.createElementBlock("div",eC,[e.createTextVNode(e.toDisplayString(n.currentNodeDisplayed.name),1)])),[[p,n.currentNodeDisplayed.name,void 0,{top:!0}]]),e.createElementVNode("div",tC,[e.withDirectives(e.createVNode(l,{type:"button",class:"nav-btn",icon:"ri-skip-left-line",severity:"secondary",disabled:n.hasOnlyOneFile,onClick:t[0]||(t[0]=g=>r.showPreviousFile(a.children))},null,8,["disabled"]),[[p,a.$t("previousFile"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(l,{type:"button",class:"nav-btn",icon:"ri-skip-right-line",severity:"secondary","icon-pos":"right",disabled:n.hasOnlyOneFile,onClick:t[1]||(t[1]=g=>r.showNextFile(a.children))},null,8,["disabled"]),[[p,a.$t("nextFile"),void 0,{bottom:!0}]]),e.createVNode(s,{to:r.collaboraService.getRoute(n.currentNodeDisplayed)},{default:e.withCtx(()=>[e.createVNode(l,{class:"open-btn",label:"Ouvrir",type:"button",severity:"secondary",raised:""})]),_:1},8,["to"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",aC,[n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("image/")?(e.openBlock(),e.createBlock(c,{key:0,ref:"imageViewer","content-node":n.currentNodeDisplayed,"show-title":!1},null,8,["content-node"])):n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("video/")?(e.openBlock(),e.createBlock(d,{key:1,"content-url":o.url,"content-node":n.currentNodeDisplayed},null,8,["content-url","content-node"])):n.currentNodeDisplayed&&a.mimeType&&a.mimeType.includes("audio/")?(e.openBlock(),e.createBlock(u,{key:2,"content-url":o.url,"content-node":n.currentNodeDisplayed},null,8,["content-url","content-node"])):n.currentNodeDisplayed&&a.mimeType&&(a.mimeType.startsWith("text/")||a.mimeType==="application/json"||a.mimeType==="application/xml"||a.mimeType==="application/x-yaml"||a.mimeType==="application/x-sh")?(e.openBlock(),e.createBlock(b,{key:3,"content-node":n.currentNodeDisplayed},null,8,["content-node"])):o.url?(e.openBlock(),e.createBlock(m,{key:o.url,ref:"pdfComponent",url:o.url,class:"pdf-viewer"},null,8,["url"])):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)}const Ng=Se(KO,[["render",nC],["__scopeId","data-v-defea78c"]]),iC={name:"SelectionStatus",components:{PrimeProgressSpinner:ea},inject:["actionsService"],emits:["resetPageSelection"],computed:{useSelectionStore(){return Tt},...Fe.mapState(Tt,["isSelectionRemovalVisible","isCurrentPageFullySelected"]),...Fe.mapState(Rt,["currentNode","loading","pagination","totalRecordNodes"]),hasMoreElements(){return this.totalRecordNodes>=500},hasSelectedNodes(){return Tt().nodes.length!==0&&this.pagination&&!this.loading}},methods:{deleteSelection(){Tt().resetSelection(),Tt().setIsCurrentPageFullySelected(!1),Tt().setIsSelectionRemovalVisible(!1),this.$emit("resetPageSelection")},selectAllNodes(){let a=this.currentNode.guid||this.currentNode.id;this.actionsService.selectAllNodes(a,!0).then(t=>{let n=t.children;n.length>0&&Tt().selectNodes(n),Tt().setIsCurrentPageFullySelected(!1),Tt().setIsSelectionRemovalVisible(!0)})}}},oC={class:"selection-status-container"},rC={key:1,class:"nbrOfSearchResult"},lC={key:2,class:"nbrOfSearchResult"},sC={key:3,class:"selectOrDeleteDiv"},cC={class:"selection-info"},dC={key:4,class:"selectOrDeleteDiv"},mC={class:"selection-info"};function pC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeProgressSpinner");return e.openBlock(),e.createElementBlock("div",oC,[a.loading?(e.openBlock(),e.createBlock(l,{key:0,class:"spinner",strokeWidth:"8",fill:"var(--surface-ground)",animationDuration:".5s","aria-label":"Custom ProgressSpinner"})):e.createCommentVNode("",!0),!a.loading&&a.pagination&&!r.hasSelectedNodes?(e.openBlock(),e.createElementBlock("div",rC,e.toDisplayString(a.$t("howMuchResult",{nbrEntries:a.pagination.count,totalEntries:a.pagination.totalItems})),1)):r.hasSelectedNodes&&!a.isCurrentPageFullySelected&&!a.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",lC,e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems})),1)):r.hasSelectedNodes&&a.isCurrentPageFullySelected?(e.openBlock(),e.createElementBlock("div",sC,[e.createElementVNode("span",cC,[e.createTextVNode(e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems}))+" ",1),r.hasMoreElements?(e.openBlock(),e.createElementBlock("span",{key:0,class:"action-link",onClick:t[0]||(t[0]=s=>r.selectAllNodes())},e.toDisplayString(a.$t("selectAllElementMoreThan",{totalEntries:a.pagination.totalItems})),1)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"action-link",onClick:t[1]||(t[1]=s=>r.selectAllNodes())},e.toDisplayString(a.$t("selectAllElement",{totalEntries:a.pagination.totalItems})),1))])])):r.hasSelectedNodes&&a.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",dC,[e.createElementVNode("span",mC,[e.createTextVNode(e.toDisplayString(a.$t("howMuchSelected",{nbrEntries:r.useSelectionStore().nodes.length,totalEntries:a.pagination.totalItems}))+" ",1),e.createElementVNode("span",{class:"action-link",onClick:t[2]||(t[2]=s=>r.deleteSelection())},e.toDisplayString(a.$t("deleteSelection")),1)])])):e.createCommentVNode("",!0)])}const Sg=Se(iC,[["render",pC],["__scopeId","data-v-e4e3c767"]]),uC={name:"LayoutSelector",components:{PrimeSelectButton:Ka},emits:["update-layout"],data(){return{layout:localStorage.getItem("contentViewLayout")||"datatable",options:["list","grid","datatable"]}},methods:{onLayoutChange(){this.$emit("update-layout",this.layout)}}},bC={class:"listView flex-grow-0"};function gC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelectButton");return e.openBlock(),e.createElementBlock("div",bC,[e.createVNode(l,{modelValue:o.layout,"onUpdate:modelValue":t[0]||(t[0]=s=>o.layout=s),options:o.options,"allow-empty":!1,onChange:r.onLayoutChange},{option:e.withCtx(({option:s})=>[e.createElementVNode("i",{class:e.normalizeClass([s==="list"?"ri-list-check":s==="grid"?"ri-grid-line":"ri-table-line"])},null,2)]),_:1},8,["modelValue","options","onChange"])])}const Eg=Se(uC,[["render",gC]]),_C={name:"HelpKeyMessage",components:{PrimeMessage:da},props:{helpKey:{type:Boolean,default:!1}},emits:["set-help-hey"],methods:{changeHelpKey(){this.$emit("set-help-hey",!1)}}};function hC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeMessage");return n.helpKey?(e.openBlock(),e.createBlock(l,{key:0,closable:!1,severity:"secondary",class:"text-lg font-semibold p-0",size:"large",onClick:r.changeHelpKey},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createElementVNode("p",{class:"ml-1 font-bold"},"Liste des Raccourcies Claviers",-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-left-line"})]),e.createTextVNode("Page Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-right-line"})]),e.createTextVNode("Page Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-up-line"})]),e.createTextVNode("Document Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-down-line"})]),e.createTextVNode("Document Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"+"),e.createTextVNode("Zoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"-"),e.createTextVNode("Dézoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"0"),e.createTextVNode("Zoom adapté à la hauteur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"5"),e.createTextVNode("Zoom adapté à la largeur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ECHAP"),e.createTextVNode("Fermer la prévisualisation")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ENTER"),e.createTextVNode("Ouvre le document")],-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)}const Tg=Se(_C,[["render",hC],["__scopeId","data-v-d3a64f2d"]]),yC={name:"CustomToastContent",props:{severity:{type:String,default:"info"},summary:{type:String,default:"Info"},link:{type:String,default:""},linkText:{type:String,default:"Cliquez ici"},messageBeforeLink:{type:String,default:""},messageAfterLink:{type:String,default:""},message:{type:String,default:"Voici un message sans lien."}},computed:{iconClass(){switch(this.severity){case"success":return"ri-check-line text-success";case"info":return"ri-information-line text-info";case"warn":return"ri-alert-line text-warning";case"error":return"ri-close-circle-line text-danger";default:return"ri-information-line text-info"}}}},fC={class:"flex w-full gap-1"},NC={class:"flex flex-column flex-grow-1 gap-1"},SC={class:"text-base font-bold"},EC={class:"text-base"},TC=["href"],AC={key:1};function OC(a,t,n,i,o,r){return e.openBlock(),e.createElementBlock("div",fC,[e.createElementVNode("i",{class:e.normalizeClass([r.iconClass,"mr-2 text-2xl"])},null,2),e.createElementVNode("div",NC,[e.createElementVNode("div",SC,e.toDisplayString(n.summary),1),e.createElementVNode("div",EC,[n.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.messageBeforeLink)+" ",1),e.createElementVNode("a",{href:n.link,class:"underline",target:"_blank",rel:"noopener"},e.toDisplayString(n.linkText),9,TC),e.createTextVNode(" "+e.toDisplayString(n.messageAfterLink),1)],64)):(e.openBlock(),e.createElementBlock("div",AC,e.toDisplayString(n.message),1))])])])}const Ag=Se(yC,[["render",OC]]),CC={name:"UploadStatus",components:{PrimeKnob:Bc},emits:["openFile"],data(){return{isReduced:!1}},computed:{...Fe.mapState(Da,["files","isUploading","overallMessage","activeRequests"])},methods:{...Fe.mapActions(Da,["clearCompleted","cancelUpload"]),changeReducedState(){this.isReduced=!this.isReduced},cancelFileUpload(a){this.cancelUpload(a)},getIconColor(a){switch(a){case"success":return"color: green";case"error":return"color: red";default:return""}},iconForStatus(a){switch(a){case"success":return"ri-checkbox-circle-fill text-2xl";case"error":return"ri-close-circle-fill text-2xl";default:return""}},openFile(a){this.$emit("openFile",a)}}},RC={key:0,class:"fixed bottom-0 right-0 w-full sm:w-30rem surface-0 border-round shadow-5 m-0 sm:m-3 z-5 p-3 surface-border surface-ground border-1"},IC={class:"flex justify-content-between align-items-center"},MC={key:0,class:"file-list"},vC={class:"flex flex-column pr-1"},ZC=["onClick"],DC={key:1,class:"file-name"},wC={key:2,class:"error-message text-xs"},WC={class:"status-container"},LC={key:1};function YC(a,t,n,i,o,r){const l=e.resolveComponent("Button"),s=e.resolveComponent("PrimeKnob");return a.files.length>0?(e.openBlock(),e.createElementBlock("div",RC,[e.createElementVNode("div",IC,[e.createElementVNode("strong",null,e.toDisplayString(a.overallMessage),1),e.createElementVNode("div",null,[e.createVNode(l,{icon:o.isReduced?"ri-arrow-up-line":"ri-arrow-down-line",onClick:r.changeReducedState,text:"",rounded:"",severity:"secondary","aria-label":"Réduire"},null,8,["icon","onClick"]),a.isUploading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:0,icon:"ri-close-line",onClick:a.clearCompleted,text:"",rounded:"",severity:"secondary","aria-label":"Fermer"},null,8,["onClick"]))])]),o.isReduced?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",MC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.files,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:"file-item"},[e.createElementVNode("div",vC,[c.status==="success"?(e.openBlock(),e.createElementBlock("a",{key:0,class:"file-name cursor-pointer",onClick:d=>r.openFile(c)},e.toDisplayString(c.name),9,ZC)):(e.openBlock(),e.createElementBlock("span",DC,e.toDisplayString(c.name),1)),c.status==="error"?(e.openBlock(),e.createElementBlock("p",wC,e.toDisplayString(c.message),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",WC,[c.status==="uploading"?(e.openBlock(),e.createBlock(s,{key:0,modelValue:c.percent,"onUpdate:modelValue":d=>c.percent=d,size:50,strokeWidth:5,readonly:"",valueTemplate:"{value}%",class:"upload-knob"},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),c.status==="rejected"?(e.openBlock(),e.createElementBlock("div",LC,e.toDisplayString(a.$t("canceledImport")),1)):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`${r.iconForStatus(c.status)}`),style:e.normalizeStyle(r.getIconColor(c.status))},null,6)),c.status==="uploading"&&c.percent!==100?(e.openBlock(),e.createBlock(l,{key:3,icon:"ri-close-line",text:"",rounded:"",severity:"danger",onClick:d=>r.cancelFileUpload(c.name),"aria-label":"Annuler",class:"cancel-btn"},null,8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]))])):e.createCommentVNode("",!0)}const Og=Se(CC,[["render",YC],["__scopeId","data-v-a3067d5a"]]),kC={name:"UploadTargetInfo",computed:{...Fe.mapState(Rt,["currentNode","workspace"])}},xC={class:"overlay-content"},zC={class:"text-xl font-bold"},GC={class:"mt-2 text-color-secondary"};function FC(a,t,n,i,o,r){return e.openBlock(),e.createElementBlock("div",xC,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-upload-cloud-line text-8xl"},null,-1)),e.createElementVNode("span",zC,e.toDisplayString(a.$t("dropFileFolders")),1),e.createElementVNode("div",GC,e.toDisplayString(a.currentNode?.name==="documentLibrary"?a.workspace?.title||a.workspace?.id:a.currentNode?.name||a.$t("currentFolder")),1)])}const Cg=Se(kC,[["render",FC],["__scopeId","data-v-489463cc"]]),XC={name:"FolderUpload",components:{PrimeButton:ce},data(){return{isDraggingOver:!1}},emits:["close"],methods:{...Fe.mapActions(Da,["startUpload"]),closePopup(){this.$emit("close",!1)},handleFolderSelect(a){const n=Array.from(a.target.files).map(i=>({file:i,relativePath:i.webkitRelativePath}));this.processFiles(n)},processFiles(a){const t=Rt().currentNode.id;this.startUpload(a,t),this.closePopup()},async handleDrop(a){this.isDraggingOver=!1;const t=a.dataTransfer.items,n=[],i=[],o=async r=>{if(r.isFile)return new Promise(l=>r.file(s=>{const c=r.fullPath.startsWith("/")?r.fullPath.substring(1):r.fullPath;n.push({file:s,relativePath:c}),l()}));if(r.isDirectory){const l=r.createReader();return new Promise(s=>{const c=async()=>{const d=await new Promise(u=>l.readEntries(u));if(d.length>0){for(const u of d)await o(u);await c()}s()};c()})}};for(const r of t){const l=r.webkitGetAsEntry();l&&i.push(o(l))}await Promise.all(i),n.length>0&&this.processFiles(n)},triggerFileInput(){this.$refs.fileInput.click()},handleDragOver(){this.isDraggingOver=!0},handleDragLeave(){this.isDraggingOver=!1}}},PC={class:"folder-upload-container"},VC={class:"folder-upload-buttonbar"};function UC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton");return e.openBlock(),e.createElementBlock("div",PC,[e.createElementVNode("div",VC,[e.createVNode(l,{class:"select-folder-btn",label:a.$t("selectFolder"),onClick:r.triggerFileInput},null,8,["label","onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["folder-upload-dropzone",{"is-dragging":o.isDraggingOver}]),onDragover:t[0]||(t[0]=e.withModifiers((...s)=>r.handleDragOver&&r.handleDragOver(...s),["prevent"])),onDragleave:t[1]||(t[1]=e.withModifiers((...s)=>r.handleDragLeave&&r.handleDragLeave(...s),["prevent"])),onDrop:t[2]||(t[2]=e.withModifiers(s=>r.handleDrop(s),["prevent"]))},[e.createElementVNode("p",null,e.toDisplayString(a.$t("dropFolder")),1)],34),e.createElementVNode("input",{type:"file",webkitdirectory:"",onChange:t[3]||(t[3]=s=>r.handleFolderSelect(s)),ref:"fileInput",class:"file-input-hidden"},null,544)])}const yc=Se(XC,[["render",UC],["__scopeId","data-v-042839bf"]]),jC={name:"ImportPopupWithWorker",components:{PrimeButton:ce,PrimeDialog:_t,FileUpload:un,FolderUpload:yc},props:{node:{type:Object,required:!0},importType:{type:String,default:"file"},forcedPlanName:{type:String,default:null},accept:{type:String,default:null}},emits:["close","upload-with-plan"],computed:{...Fe.mapState(Da,["isUploading"])},methods:{...Fe.mapActions(Da,["startUpload"]),closePopup(){this.$emit("close",!1)},handleUpload(a){const t=a.files;if(!t||t.length===0)return;if(this.forcedPlanName){const i=t.map(o=>new File([o],o.name,{type:o.type}));this.$emit("upload-with-plan",{files:i,planName:this.forcedPlanName}),this.closePopup();return}const n=t.map(i=>({file:new File([i],i.name,{type:i.type}),relativePath:""}));this.startUpload(n,this.node.id),this.closePopup()}}},BC={key:0},HC={key:1};function JC(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("FileUpload"),c=e.resolveComponent("FolderUpload"),d=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(d,{header:a.$t("importElement"),visible:"",modal:"",onKeyup:e.withKeys(r.closePopup,["esc"]),class:"popup"},{closeicon:e.withCtx(()=>[e.createVNode(l,{icon:"ri-close-line",onClick:r.closePopup,outlined:"",text:"",severity:"secondary"},null,8,["onClick"])]),footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("close"),onClick:r.closePopup,severity:"secondary"},null,8,["label","onClick"])]),default:e.withCtx(()=>[n.importType==="file"?(e.openBlock(),e.createElementBlock("div",BC,[e.createVNode(s,{name:"upload_files",chooseLabel:a.$t("imports.selectFiles"),uploadLabel:a.$t("send"),cancelLabel:a.$t("cancel"),onUploader:r.handleUpload,customUpload:"",multiple:"",maxFileSize:2147483648,disabled:a.isUploading,accept:n.accept},{empty:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(a.$t("dragAndDrop")),1)]),_:1},8,["chooseLabel","uploadLabel","cancelLabel","onUploader","disabled","accept"])])):n.importType==="folder"?(e.openBlock(),e.createElementBlock("div",HC,[e.createVNode(c,{onClose:r.closePopup},null,8,["onClose"])])):e.createCommentVNode("",!0)]),_:1},8,["header","onKeyup"])}const Rg=Se(jC,[["render",JC]]),QC={name:"AddPairInConfigDialog",components:{PrimeDialog:_t,PrimeButton:ce,PrimeInputText:at,PrimeSelect:$t},props:{visible:{type:Boolean,default:!1},existingKeys:{type:Array,default:()=>[]}},emits:["update:visible","add-pair"],data(){return{newKey:"",newValue:"",newType:"string",availableTypes:["string","number","boolean","array","object"],errors:{key:null,value:null}}},watch:{visible(a){a&&this.resetForm()}},methods:{resetForm(){this.newKey="",this.newValue="",this.newType="string",this.errors={key:null,value:null}},submit(){this.errors={key:null,value:null};let a=!0;this.newKey.trim()?this.existingKeys.includes(this.newKey.trim())&&(this.errors.key=this.$t("config.errors.keyDuplicate"),a=!1):(this.errors.key=this.$t("config.errors.keyRequired"),a=!1);const t=Qt.validateValueByType(this.newValue,this.newType);t&&(this.errors.value=t,a=!1),a&&(this.$emit("add-pair",{key:this.newKey,value:this.newValue,type:this.newType}),this.$emit("update:visible",!1))}}},KC={class:"field"},qC={for:"newKey"},$C={key:0,class:"p-error"},eR={class:"field"},tR={for:"newType"},aR={class:"field"},nR={for:"newValue"},iR={key:0,class:"p-error"};function oR(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeSelect"),c=e.resolveComponent("PrimeButton"),d=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(d,{header:a.$t("config.dialog.addTitle"),visible:n.visible,"onUpdate:visible":t[4]||(t[4]=u=>a.$emit("update:visible",u)),modal:"",class:"dialog-add-pair"},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("config.buttons.cancel"),icon:"ri-close-line",class:"p-button-text",onClick:t[3]||(t[3]=u=>a.$emit("update:visible",!1))},null,8,["label"]),e.createVNode(c,{label:a.$t("config.buttons.add"),icon:"ri-check-line",onClick:r.submit,autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",KC,[e.createElementVNode("label",qC,e.toDisplayString(a.$t("config.dialog.keyLabel")),1),e.createVNode(l,{id:"newKey",modelValue:o.newKey,"onUpdate:modelValue":t[0]||(t[0]=u=>o.newKey=u),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.key}])},null,8,["modelValue","class"]),o.errors.key?(e.openBlock(),e.createElementBlock("small",$C,e.toDisplayString(o.errors.key),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",eR,[e.createElementVNode("label",tR,e.toDisplayString(a.$t("config.dialog.typeLabel")),1),e.createVNode(s,{id:"newType",modelValue:o.newType,"onUpdate:modelValue":t[1]||(t[1]=u=>o.newType=u),options:o.availableTypes,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",aR,[e.createElementVNode("label",nR,e.toDisplayString(a.$t("config.dialog.valueLabel")),1),e.createVNode(l,{id:"newValue",modelValue:o.newValue,"onUpdate:modelValue":t[2]||(t[2]=u=>o.newValue=u),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.value}])},null,8,["modelValue","class"]),o.errors.value?(e.openBlock(),e.createElementBlock("small",iR,e.toDisplayString(o.errors.value),1)):e.createCommentVNode("",!0)])]),_:1},8,["header","visible"])}const Ig=Se(QC,[["render",oR]]),rR={class:"array-editor"},lR={key:1,class:"object-item"},sR={key:0},cR={key:0},dR={key:1,class:"object-summary"},mR={class:"summary-item"},pR={key:0,class:"summary-item"},uR={key:1,class:"summary-item"},bR={class:"summary-item"},gR={key:1},_R={class:"action-buttons"},Ti=Se({__name:"ArrayEditor",props:{modelValue:{type:Array,required:!0},isMetadata:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const n=a,i=t,o=e.ref(JSON.parse(JSON.stringify(n.modelValue))),r=["text","datetime","boolean","double","int","date"],l=["popup","details","advancedSearch","view"],s=e.ref(null),c={id:"",title:"",labelId:"",display:[],input:"text",readOnly:!1,modelAspect:"",modelType:""};e.watch(()=>n.modelValue,T=>{o.value=JSON.parse(JSON.stringify(T))},{deep:!0});const d=T=>{const O=typeof T;return O==="string"||O==="number"||O==="boolean"},u=T=>typeof T=="object"&&T!==null,b=(T,O)=>{o.value[T]=O,i("update:modelValue",o.value)},m=(T,O,D)=>{o.value[T][O]=D,i("update:modelValue",o.value)},p=T=>{o.value.splice(T,1),i("update:modelValue",o.value)},g=()=>{if(n.isMetadata){const T={...c,order:o.value.length+1};o.value.push(T)}else if(o.value.length>0){const T=o.value[0],O=typeof T;O==="string"?o.value.push(""):O==="number"?o.value.push(0):O==="object"&&T!==null?o.value.push(JSON.parse(JSON.stringify(T))):o.value.push("")}else o.value.push("");i("update:modelValue",o.value)},_=T=>{const O=o.value[T];o.value[T]={...c,...O},s.value=T},f=()=>{s.value=null,i("update:modelValue",o.value)},h=T=>{const O=JSON.parse(JSON.stringify(o.value[T]));o.value.splice(T+1,0,O),o.value.forEach((D,I)=>{u(D)&&Object.prototype.hasOwnProperty.call(D,"order")&&(D.order=I+1)}),i("update:modelValue",o.value)},S=(T,O)=>{const D=T+O;if(D<0||D>=o.value.length)return;const I=o.value.splice(T,1)[0];o.value.splice(D,0,I),o.value.forEach((C,A)=>{u(C)&&Object.prototype.hasOwnProperty.call(C,"order")&&(C.order=A+1)}),i("update:modelValue",o.value)},y=T=>{if(!n.isMetadata)return"transparent";const O=T.modelAspect||T.modelType;if(!O)return"transparent";let D=0;for(let C=0;C<O.length;C++)D=O.charCodeAt(C)+((D<<5)-D);return`hsla(${D%360}, 50%, 50%, 0.15)`};return(T,O)=>(e.openBlock(),e.createElementBlock("div",rR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(D,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"array-item",style:e.normalizeStyle({backgroundColor:y(D)})},[d(D)?(e.openBlock(),e.createBlock(e.unref(at),{key:0,"model-value":D,"onUpdate:modelValue":C=>b(I,C),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("div",lR,[a.isMetadata?(e.openBlock(),e.createElementBlock("div",sR,[s.value===I?(e.openBlock(),e.createElementBlock("div",cR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(c),C=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(C),1),C==="input"?(e.openBlock(),e.createBlock(e.unref($t),{key:0,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),options:r,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):C==="display"?(e.openBlock(),e.createBlock(e.unref(Dn),{key:1,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),options:l,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):C==="readOnly"?(e.openBlock(),e.createBlock(e.unref(vn),{key:2,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A)},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(e.unref(at),{key:3,"model-value":D[C],"onUpdate:modelValue":A=>m(I,C,A),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"]))]))),128))])):(e.openBlock(),e.createElementBlock("div",dR,[e.createElementVNode("div",mR,[O[1]||(O[1]=e.createElementVNode("strong",null,"ID:",-1)),e.createTextVNode(" "+e.toDisplayString(D.id),1)]),D.title?(e.openBlock(),e.createElementBlock("div",pR,[O[2]||(O[2]=e.createElementVNode("strong",null,"Title:",-1)),e.createTextVNode(" "+e.toDisplayString(D.title),1)])):e.createCommentVNode("",!0),D.labelId?(e.openBlock(),e.createElementBlock("div",uR,[O[3]||(O[3]=e.createElementVNode("strong",null,"Label ID:",-1)),e.createTextVNode(" "+e.toDisplayString(D.labelId),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",bR,[O[4]||(O[4]=e.createElementVNode("strong",null,"Input:",-1)),e.createTextVNode(" "+e.toDisplayString(D.input),1)])]))])):(e.openBlock(),e.createElementBlock("div",gR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D,(C,A)=>(e.openBlock(),e.createElementBlock("div",{key:A,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(A),1),e.createVNode(e.unref(at),{"model-value":C,"onUpdate:modelValue":w=>m(I,A,w),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])]))),128))]))])),e.createElementVNode("div",_R,[a.isMetadata&&s.value!==I?(e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-pencil-line",class:"p-button-secondary p-button-sm",onClick:C=>_(I)},null,8,["onClick"])):e.createCommentVNode("",!0),a.isMetadata&&s.value===I?(e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:"ri-check-line",class:"p-button-success p-button-sm",onClick:O[0]||(O[0]=C=>f())})):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:2,icon:"ri-arrow-up-line",class:"p-button-secondary p-button-sm",onClick:C=>S(I,-1),disabled:I===0},null,8,["onClick","disabled"])):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:3,icon:"ri-arrow-down-line",class:"p-button-secondary p-button-sm",onClick:C=>S(I,1),disabled:I===o.value.length-1},null,8,["onClick","disabled"])):e.createCommentVNode("",!0),a.isMetadata?(e.openBlock(),e.createBlock(e.unref(ce),{key:4,icon:"ri-file-copy-line",class:"p-button-secondary p-button-sm",onClick:C=>h(I)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(ce),{icon:"ri-delete-bin-line",class:"p-button-danger p-button-sm",onClick:C=>p(I)},null,8,["onClick"])])],4))),128)),e.createVNode(e.unref(ce),{label:T.$t("config.arrayEditor.addItem"),icon:"ri-add-line",class:"p-button-sm p-button-secondary mt-2",onClick:g},null,8,["label"])]))}},[["__scopeId","data-v-df66456b"]]),hR={class:"config-cards-container"},yR={class:"card-title-wrapper"},fR={class:"type-badge ml-2"},NR={class:"title-buttons"},SR={key:0,class:"description"},ER={key:1,class:"undefined-container"},TR={class:"help-text"},AR={key:2,class:"editor-container"},OR={key:3},Mg=Se({__name:"ConfigDatatable",props:{configData:{type:Array,required:!0},loading:{type:Boolean,default:!1},descriptions:{type:Object,default:()=>({})}},emits:["update:config"],setup(a,{emit:t}){const n=a,i=t,o=e.ref(n.configData.reduce((u,b)=>(b.type==="array"&&(u[b.key]=!1),u),{})),r=u=>{o.value[u]=!o.value[u]},l=(u,b)=>{const m=n.configData.map(p=>p.key===u?{...p,value:b}:p);i("update:config",m)},s=u=>{const b=n.configData.map(m=>m.key===u?{...m,isDefined:!0}:m);i("update:config",b)},c=u=>{const b=n.configData.map(m=>{if(m.key===u){const p=n.descriptions[u]?.default;return{...m,isDefined:!1,value:p}}return m});i("update:config",b)},d=e.computed(()=>[...n.configData].sort((u,b)=>u.key.localeCompare(b.key)));return(u,b)=>(e.openBlock(),e.createElementBlock("div",hR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(e.unref(oi),{key:m.key,class:"config-card"},{title:e.withCtx(()=>[e.createElementVNode("div",yR,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(m.key)+" ",1),e.createElementVNode("small",fR,e.toDisplayString(u.$t(`config.types.${m.type}`)),1)]),e.createElementVNode("div",NR,[m.type==="array"&&m.isDefined?(e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:o.value[m.key]?"ri-close-large-line":"ri-add-large-line",class:"p-button-text p-button","aria-label":o.value[m.key]?u.$t("config.buttons.collapse"):u.$t("config.buttons.expand"),onClick:p=>r(m.key)},null,8,["icon","aria-label","onClick"])):e.createCommentVNode("",!0),m.isDefined?(e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:"ri-delete-bin-line",severity:"danger","aria-label":u.$t("config.buttons.undefine"),class:"p-button-sm",onClick:p=>c(m.key)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0)])])]),content:e.withCtx(()=>[a.descriptions[m.key]?.descriptionKey?(e.openBlock(),e.createElementBlock("p",SR,e.toDisplayString(u.$t(a.descriptions[m.key].descriptionKey)),1)):e.createCommentVNode("",!0),m.isDefined?e.withDirectives((e.openBlock(),e.createElementBlock("div",AR,[m.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(vn),{key:0,"model-value":m.value,"onUpdate:modelValue":p=>l(m.key,p)},null,8,["model-value","onUpdate:modelValue"])):m.type==="array"?(e.openBlock(),e.createBlock(Ti,{key:1,"is-metadata":m.key==="METADATA","model-value":m.value,"onUpdate:modelValue":p=>l(m.key,p)},null,8,["is-metadata","model-value","onUpdate:modelValue"])):m.type==="string"||m.type==="number"?(e.openBlock(),e.createBlock(e.unref(at),{key:2,"model-value":m.value,class:"w-full","onUpdate:modelValue":p=>l(m.key,p)},null,8,["model-value","onUpdate:modelValue"])):m.type==="object"?(e.openBlock(),e.createElementBlock("pre",OR,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)],512)),[[e.vShow,m.type!=="array"||o.value[m.key]]]):(e.openBlock(),e.createElementBlock("div",ER,[e.createVNode(e.unref(ce),{label:u.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:p=>s(m.key)},null,8,["label","onClick"]),e.createElementVNode("small",TR,e.toDisplayString(u.$t("config.notDefined")),1)]))]),_:2},1024))),128))]))}},[["__scopeId","data-v-0394ea8e"]]),CR={class:"config-item-editor"},RR={class:"editor-header"},IR={class:"config-key"},MR={class:"type-badge"},vR={key:0,class:"config-description"},ZR={class:"definition-actions"},DR={key:0,class:"undefined-container"},wR={class:"help-text"},WR={key:1,class:"defined-actions"},LR={key:1,class:"editor-content"},YR={key:0,class:"editor-field"},kR={key:1,class:"editor-field"},xR={key:2,class:"editor-field"},zR={key:3,class:"editor-field editor-field-array"},GR={key:4,class:"editor-field"},FR={class:"object-display"},XR={key:2,class:"default-hint"},fc=Se({__name:"ConfigItemEditor",props:{item:{type:Object,required:!0},description:{type:Object,default:()=>({})}},emits:["update:value","define","undefine"],setup(a,{emit:t}){const n=t,i=s=>{n("update:value",s)},o=()=>{n("define")},r=()=>{n("undefine")},l=s=>typeof s=="object"?JSON.stringify(s):String(s);return(s,c)=>(e.openBlock(),e.createElementBlock("div",CR,[e.createElementVNode("div",RR,[e.createElementVNode("h3",IR,e.toDisplayString(a.item.key),1),e.createElementVNode("span",MR,e.toDisplayString(s.$t(`config.types.${a.item.type}`)),1)]),a.description?.descriptionKey?(e.openBlock(),e.createElementBlock("p",vR,e.toDisplayString(s.$t(a.description.descriptionKey)),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ZR,[a.item.isDefined?(e.openBlock(),e.createElementBlock("div",WR,[e.createVNode(e.unref(ce),{label:s.$t("config.buttons.undefine"),icon:"ri-delete-bin-line",severity:"danger",class:"p-button-outlined p-button-sm",onClick:r},null,8,["label"])])):(e.openBlock(),e.createElementBlock("div",DR,[e.createVNode(e.unref(ce),{label:s.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:o},null,8,["label"]),e.createElementVNode("small",wR,e.toDisplayString(s.$t("config.notDefined")),1)]))]),a.item.isDefined?(e.openBlock(),e.createElementBlock("div",LR,[a.item.type==="boolean"?(e.openBlock(),e.createElementBlock("div",YR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(vn),{"model-value":a.item.value,"onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="string"?(e.openBlock(),e.createElementBlock("div",kR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(at),{"model-value":a.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="number"?(e.openBlock(),e.createElementBlock("div",xR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(e.unref(ka),{"model-value":a.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):a.item.type==="array"?(e.openBlock(),e.createElementBlock("div",zR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createVNode(Ti,{"is-metadata":a.item.key==="METADATA","model-value":a.item.value,"onUpdate:modelValue":i},null,8,["is-metadata","model-value"])])):a.item.type==="object"?(e.openBlock(),e.createElementBlock("div",GR,[e.createElementVNode("label",null,e.toDisplayString(s.$t("config.table.valueHeader")),1),e.createElementVNode("pre",FR,e.toDisplayString(JSON.stringify(a.item.value,null,2)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a.description?.default!==void 0?(e.openBlock(),e.createElementBlock("div",XR,[c[0]||(c[0]=e.createElementVNode("i",{class:"ri-information-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(s.$t("config.splitView.defaultValue"))+": ",1),e.createElementVNode("code",null,e.toDisplayString(l(a.description.default)),1)])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-2de0c6b0"]]),PR={class:"config-split-view"},VR={class:"config-list-panel"},UR={class:"filter-container"},jR={class:"filter-input-wrapper"},BR={class:"config-groups"},HR=["onClick"],JR={class:"group-label"},QR={class:"group-count"},KR={class:"group-items"},qR=["onClick"],$R={class:"item-key"},eI=["title"],tI={key:0,class:"empty-state"},aI={class:"config-editor-panel"},nI={key:0,class:"editor-wrapper"},iI={key:1,class:"empty-editor"},vg=Se({__name:"ConfigSplitView",props:{configData:{type:Array,required:!0},descriptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},emits:["update:config"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=a,o=t,r=e.ref(""),l=e.ref(null),s=e.ref({}),c={display:{id:"display",label:"config.groups.display",prefixes:["THEME","APP_ROOT","SHOW_","PRIMEVUE","BREADCRUMB","EDIT_","OPEN_"]},matomo:{id:"matomo",label:"config.groups.matomo",prefixes:["MATOMO_"]},sentry:{id:"sentry",label:"config.groups.sentry",prefixes:["SENTRY_"]},chat:{id:"chat",label:"config.groups.chat",prefixes:["CHAT_","ROCKETCHAT_"]},search:{id:"search",label:"config.groups.search",prefixes:["SEARCH_"]},pagination:{id:"pagination",label:"config.groups.pagination",prefixes:["DEFAULT_ELEMENT","ROW_PER_PAGE"]},metadata:{id:"metadata",label:"config.groups.metadata",keys:["METADATA","ASPECTS","CONSTRAINTS","ALLOWED_FILE_EXTENSIONS"]},security:{id:"security",label:"config.groups.security",keys:["NEW_PASSWORD_RULES"]},other:{id:"other",label:"config.groups.other"}},d=h=>{for(const[S,y]of Object.entries(c))if(S!=="other"){if(y.keys&&y.keys.includes(h))return S;if(y.prefixes){for(const T of y.prefixes)if(h.startsWith(T))return S}}return"other"},u=e.computed(()=>{const h=r.value.toLowerCase().trim(),S={};for(const T of Object.keys(c))S[T]=[];for(const T of i.configData){if(h){const D=T.key.toLowerCase().includes(h),I=i.descriptions[T.key]?.descriptionKey,C=I?n(I).toLowerCase().includes(h):!1;if(!D&&!C)continue}const O=d(T.key);S[O].push(T)}for(const T of Object.keys(S))S[T].sort((O,D)=>O.key.localeCompare(D.key));const y=[];for(const[T,O]of Object.entries(c))S[T].length>0&&y.push({id:T,label:O.label,items:S[T]});return y}),b=e.computed(()=>l.value?i.configData.find(h=>h.key===l.value):null),m=h=>{s.value[h]=!s.value[h]},p=h=>{l.value=h},g=h=>{if(!l.value)return;const S=i.configData.map(y=>y.key===l.value?{...y,value:h}:y);o("update:config",S)},_=()=>{if(!l.value)return;const h=i.configData.map(S=>S.key===l.value?{...S,isDefined:!0}:S);o("update:config",h)},f=()=>{if(!l.value)return;const h=i.configData.map(S=>{if(S.key===l.value){const y=i.descriptions[S.key]?.default;return{...S,isDefined:!1,value:y}}return S});o("update:config",h)};return e.watch(()=>i.configData,()=>{!l.value&&i.configData.length>0&&u.value.length>0&&u.value[0].items.length>0&&(l.value=u.value[0].items[0].key)},{immediate:!0}),(h,S)=>(e.openBlock(),e.createElementBlock("div",PR,[e.createElementVNode("div",VR,[e.createElementVNode("div",UR,[e.createElementVNode("span",jR,[S[1]||(S[1]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createVNode(e.unref(at),{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=y=>r.value=y),placeholder:h.$t("config.splitView.filterPlaceholder"),class:"filter-input"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",BR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"config-group"},[e.createElementVNode("div",{class:"group-header",onClick:T=>m(y.id)},[e.createElementVNode("i",{class:e.normalizeClass(s.value[y.id]?"ri-arrow-right-s-line":"ri-arrow-down-s-line")},null,2),e.createElementVNode("span",JR,e.toDisplayString(h.$t(y.label)),1),e.createElementVNode("span",QR,e.toDisplayString(y.items.length),1)],8,HR),e.withDirectives(e.createElementVNode("div",KR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.items,T=>(e.openBlock(),e.createElementBlock("div",{key:T.key,class:e.normalizeClass(["config-list-item",{"is-selected":l.value===T.key,"is-undefined":!T.isDefined}]),onClick:O=>p(T.key)},[e.createElementVNode("span",$R,e.toDisplayString(T.key),1),T.isDefined?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",{key:0,class:"ri-checkbox-blank-circle-line undefined-indicator",title:h.$t("config.notDefined")},null,8,eI))],10,qR))),128))],512),[[e.vShow,!s.value[y.id]]])]))),128)),u.value.length===0?(e.openBlock(),e.createElementBlock("div",tI,[S[2]||(S[2]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(h.$t("config.splitView.noResults")),1)])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",aI,[b.value?(e.openBlock(),e.createElementBlock("div",nI,[e.createVNode(fc,{item:b.value,description:a.descriptions[b.value.key],"onUpdate:value":g,onDefine:_,onUndefine:f},null,8,["item","description"])])):(e.openBlock(),e.createElementBlock("div",iI,[S[3]||(S[3]=e.createElementVNode("i",{class:"ri-settings-3-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(h.$t("config.splitView.selectConfig")),1)]))])]))}},[["__scopeId","data-v-e7924dfe"]]),oI={name:"ConfigUpload",components:{PrimeFileUpload:un},props:{loading:{type:Boolean,default:!1}},emits:["upload-config"],methods:{handleFileUpload(a){const t=a.files[0];if(!t)return;const n=new FileReader;n.onload=i=>{try{const o=JSON.parse(i.target.result);this.$emit("upload-config",o)}catch{this.$toast.add({severity:"error",summary:"Fichier Invalide",detail:this.$t("config.errors.invalidJsonFile"),life:4e3})}},n.onerror=i=>{console.error("handle file upload error",i)},n.readAsText(t)}}},rI={class:"config-upload"},lI={class:"config-upload-description"},sI={class:"config-upload-warning"};function cI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeFileUpload");return e.openBlock(),e.createElementBlock("div",rI,[e.createElementVNode("p",lI,e.toDisplayString(a.$t("config.raw.uploadDescription")),1),e.createVNode(l,{mode:"basic",name:"configfile[]",accept:".json",maxFileSize:1e6,customUpload:"",onUploader:r.handleFileUpload,chooseLabel:a.$t("config.raw.uploadButton"),auto:"",loading:n.loading,severity:"danger",class:"config-upload-button"},null,8,["onUploader","chooseLabel","loading"]),e.createElementVNode("small",sI,e.toDisplayString(a.$t("config.raw.uploadWarning")),1)])}const Zg=Se(oI,[["render",cI],["__scopeId","data-v-cda1f133"]]),dI={name:"ListVersionConfig",components:{PrimeButton:ce,PrimeCard:oi,PrimeTextarea:va,PrimeProgressSpinner:ea},props:{currentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:["reload"],data(){return{selectedVersion:null,selectedVersionContent:"",isContentLoading:!1}},methods:{async selectVersion(a){if(!(this.selectedVersion&&this.selectedVersion.id===a.id)){this.selectedVersion=a,this.isContentLoading=!0,this.selectedVersionContent="";try{const n=await(await this.getContent(this.currentNode.id,a.id)).text(),i=JSON.parse(n);this.selectedVersionContent=JSON.stringify(i,null,2)}catch{this.selectedVersionContent=this.$t("config.versionViewer.loadError")}finally{this.isContentLoading=!1}}},download(a){this.getContent(this.currentNode.id,a.id,!1).then(t=>{const i=this.currentNode.name.split("."),o=i.pop(),r=i.join("."),l=document.createElement("a"),s=a.id.replace(".","-");l.href=URL.createObjectURL(t),l.download=`${r}_v${s}.${o}`,l.click()})},revert(a){if(!this.versions||this.versions.length===0){console.error("Le tableau des versions est vide.");return}if(this.versions[0].entry.id===a.id){this.$toast.add({severity:"warn",summary:this.$t("error"),detail:this.$t("config.versionViewer.cannotRevertLatest"),life:3e3});return}const n=this.$t("config.versionViewer.restoredVersionComment",{versionNumber:a.id});Re.revertVersion(this.currentNode.id,a.id,n).then(()=>{this.$emit("reload"),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("config.versionViewer.success"),life:3e3})}).catch(i=>{console.error(i),this.$toast.add({severity:"error",summary:this.$t("error"),detail:i.message||this.$t("config.versionViewer.error"),life:3e3})})},getContent(a,t){return Re.getVersionContent(a,t).catch(n=>(this.$toast.add({severity:"error",summary:this.$t("error"),detail:n.message||this.$t("config.versionViewer.genericError"),life:3e3}),Promise.reject(n)))},toLocaleDateString(a){if(!a)return"";let t=new Date(a);return new Intl.DateTimeFormat("fr-FR",{dateStyle:"medium"}).format(t)},toLocaleTimeString(a){return a?new Date(a).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",hour12:!1}):""}}},mI={key:0,class:"version-section-title"},pI={class:"version-layout"},uI={class:"version-list-column"},bI={class:"version-list-container"},gI=["onClick"],_I={class:"version-bubble"},hI={class:"version-bubble-text"},yI={class:"version-info"},fI={class:"version-author"},NI={key:0},SI={class:"version-actions"},EI={class:"version-content-column"},TI={key:0,class:"version-loading"},AI={key:1},OI={key:2,class:"version-empty"};function CI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("PrimeTextarea"),d=e.resolveComponent("PrimeCard"),u=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",null,[n.title?(e.openBlock(),e.createElementBlock("span",mI,e.toDisplayString(n.title.toUpperCase()),1)):e.createCommentVNode("",!0),e.createElementVNode("div",pI,[e.createElementVNode("div",uI,[e.createElementVNode("ul",bI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.versions,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["version-row",{"active-version":o.selectedVersion&&o.selectedVersion.id===b.entry.id}]),onClick:m=>r.selectVersion(b.entry)},[e.createElementVNode("div",_I,[e.createElementVNode("span",hI,e.toDisplayString(b.entry.id),1)]),e.createElementVNode("span",yI,[e.createTextVNode(e.toDisplayString(r.toLocaleDateString(b.entry.modifiedAt))+" "+e.toDisplayString(a.$t("at"))+" "+e.toDisplayString(r.toLocaleTimeString(b.entry.modifiedAt))+" ",1),e.createElementVNode("span",fI,[e.createTextVNode(e.toDisplayString(a.$t("by"))+" "+e.toDisplayString(b.entry.modifiedByUser.displayName)+" ",1),t[0]||(t[0]=e.createElementVNode("br",null,null,-1)),b.entry.versionComment?(e.openBlock(),e.createElementBlock("em",NI,e.toDisplayString(b.entry.versionComment),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",SI,[e.withDirectives(e.createVNode(l,{type:"button",icon:"ri-download-line",onClick:e.withModifiers(m=>r.download(b.entry),["stop"]),severity:"secondary",rounded:"",text:""},null,8,["onClick"]),[[u,a.$t("download"),void 0,{left:!0}]]),e.withDirectives(e.createVNode(l,{type:"button",icon:"ri-history-line",onClick:m=>r.revert(b.entry),severity:"secondary",rounded:"",text:""},null,8,["onClick"]),[[u,a.$t("restore"),void 0,{left:!0}]])])],10,gI))),128))])]),e.createElementVNode("div",EI,[e.createVNode(d,{class:"version-card"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("config.versionViewer.title")),1)]),content:e.withCtx(()=>[o.isContentLoading?(e.openBlock(),e.createElementBlock("div",TI,[e.createVNode(s)])):o.selectedVersionContent?(e.openBlock(),e.createElementBlock("div",AI,[e.createVNode(c,{"model-value":o.selectedVersionContent,readonly:"",class:"version-textarea"},null,8,["model-value"])])):(e.openBlock(),e.createElementBlock("div",OI,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-arrow-left-s-line ri-2x"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("config.versionViewer.selectPrompt")),1)]))]),_:1})])])])}const Dg=Se(dI,[["render",CI],["__scopeId","data-v-a4a3b0f2"]]),Ai={id:null,property:null,negation:!1,operator:null,value:null,value_end:null},RI={name:"AddCriterionPopup",components:{PrimeDialog:_t,PrimeSelect:$t,PrimeSelectButton:Ka,PrimeInputText:at,PrimeDatePicker:ei,PrimeInputNumber:ka,PrimeButton:ce,PrimeDataTable:Ia,PrimeColumn:Ma},props:{visible:Boolean,properties:{type:Array,required:!0},editCriterion:{type:Object,default:null}},emits:["update:visible","add-criterion","update-criterion"],watch:{visible(a){if(a&&this.editCriterion){const t=JSON.parse(JSON.stringify(this.editCriterion));if(t.property&&(t.property.input==="date"||t.property.input==="datetime")&&(t.value&&(t.value=new Date(t.value)),t.value_end&&(t.value_end=new Date(t.value_end))),t.property&&t.property.id){const n=this.properties.find(i=>i.id===t.property.id);n&&(t.property=n)}this.criterion=t}else a&&(this.criterion={...Ai})}},data(){return{criterion:{...Ai},operatorOptions:{text:[{labelKey:"rechercheAvancee.exact",value:"exact"},{labelKey:"rechercheAvancee.contains",value:"contains"}],date:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],datetime:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],number:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],int:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],double:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],boolean:[{labelKey:"rechercheAvancee.is",value:"exact"}]}}},computed:{negationOptions(){return[{label:`${this.$t("rechercheAvancee.mustContain")} (+)`,value:!1},{label:`${this.$t("rechercheAvancee.mustNotContain")} (-)`,value:!0}]},booleanOptions(){return[{label:this.$t("true"),value:!0},{label:this.$t("false"),value:!1}]},isCriterionValid(){return this.criterion.property&&this.criterion.operator&&this.criterion.value!==null&&this.criterion.value!==""},propertyType(){return this.criterion.property?this.criterion.property.input:"text"}},methods:{getOperatorsForCriterion(){const a=this.propertyType;return this.operatorOptions[a]||[]},onPropertyChange(){this.criterion.operator=null,this.criterion.value=null,this.criterion.value_end=null},addCriterion(){const a=this.getOperatorsForCriterion().find(t=>t.value===this.criterion.operator);this.$emit("add-criterion",{...this.criterion,id:Date.now(),operatorLabelKey:a?a.labelKey:this.criterion.operator}),this.criterion={...Ai},this.$emit("update:visible",!1)},updateCriterion(){const a=this.getOperatorsForCriterion().find(t=>t.value===this.criterion.operator);this.$emit("update-criterion",{...this.criterion,operatorLabelKey:a?a.labelKey:this.criterion.operator}),this.criterion={...Ai},this.$emit("update:visible",!1)}}},II={class:"flex flex-column gap-3"},MI={class:"flex flex-column gap-1"},vI={class:"font-semibold"},ZI={key:0,class:"font-semibold"},DI={key:1,class:"font-semibold"},wI={class:"text-sm"},WI={class:"flex gap-3"},LI={class:"flex flex-column gap-1 flex-1"},YI={class:"font-semibold"},kI={class:"flex flex-column gap-1 flex-1"},xI={class:"font-semibold"},zI={class:"flex flex-column gap-1"},GI={class:"font-semibold"},FI={class:"flex gap-2 align-items-center"};function XI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeColumn"),s=e.resolveComponent("PrimeDataTable"),c=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeSelect"),u=e.resolveComponent("PrimeInputText"),b=e.resolveComponent("PrimeDatePicker"),m=e.resolveComponent("PrimeInputNumber"),p=e.resolveComponent("PrimeButton"),g=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(g,{visible:n.visible,"onUpdate:visible":t[10]||(t[10]=_=>a.$emit("update:visible",_)),modal:"",header:n.editCriterion?a.$t("rechercheAvancee.editCriterionPopupTitle"):a.$t("rechercheAvancee.addCriterionPopupTitle"),style:{width:"600px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(p,{label:a.$t("rechercheAvancee.cancelButton"),icon:"ri-close-line",onClick:t[9]||(t[9]=_=>a.$emit("update:visible",!1)),text:""},null,8,["label"]),n.editCriterion?(e.openBlock(),e.createBlock(p,{key:0,label:a.$t("rechercheAvancee.updateButton"),icon:"ri-check-line",onClick:r.updateCriterion,disabled:!r.isCriterionValid},null,8,["label","onClick","disabled"])):(e.openBlock(),e.createBlock(p,{key:1,label:a.$t("rechercheAvancee.addButton"),icon:"ri-add-line",onClick:r.addCriterion,disabled:!r.isCriterionValid},null,8,["label","onClick","disabled"]))]),default:e.withCtx(()=>[e.createElementVNode("div",II,[e.createElementVNode("div",MI,[e.createElementVNode("label",vI,e.toDisplayString(a.$t("rechercheAvancee.propertyLabel")),1),e.createVNode(s,{selection:o.criterion.property,"onUpdate:selection":t[0]||(t[0]=_=>o.criterion.property=_),value:n.properties,"selection-mode":"single",dataKey:"id",paginator:n.properties.length>8,rows:8,size:"small",onRowSelect:r.onPropertyChange,scrollable:"",scrollHeight:"300px"},{default:e.withCtx(()=>[e.createVNode(l,{field:"name",header:a.$t("rechercheAvancee.propertyName"),sortable:""},{body:e.withCtx(_=>[_.data.labelId?(e.openBlock(),e.createElementBlock("span",ZI,e.toDisplayString(a.$t(_.data.labelId)),1)):(e.openBlock(),e.createElementBlock("span",DI,e.toDisplayString(_.data.title),1))]),_:1},8,["header"]),e.createVNode(l,{field:"id",header:a.$t("rechercheAvancee.propertyId"),sortable:""},{body:e.withCtx(_=>[e.createElementVNode("code",wI,e.toDisplayString(_.data.id),1)]),_:1},8,["header"])]),_:1},8,["selection","value","paginator","onRowSelect"])]),e.createElementVNode("div",WI,[e.createElementVNode("div",LI,[e.createElementVNode("label",YI,e.toDisplayString(a.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(c,{modelValue:o.criterion.negation,"onUpdate:modelValue":t[1]||(t[1]=_=>o.criterion.negation=_),options:r.negationOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])]),e.createElementVNode("div",kI,[e.createElementVNode("label",xI,e.toDisplayString(a.$t("rechercheAvancee.operatorLabel")),1),e.createVNode(d,{modelValue:o.criterion.operator,"onUpdate:modelValue":t[2]||(t[2]=_=>o.criterion.operator=_),options:r.getOperatorsForCriterion(),optionLabel:_=>a.$t(_.labelKey),optionValue:"value",placeholder:a.$t("rechercheAvancee.operatorPlaceholder"),disabled:!o.criterion.property},null,8,["modelValue","options","optionLabel","placeholder","disabled"])])]),e.createElementVNode("div",zI,[e.createElementVNode("label",GI,e.toDisplayString(a.$t("rechercheAvancee.valueLabel")),1),e.createElementVNode("div",FI,[r.propertyType==="text"?(e.openBlock(),e.createBlock(u,{key:0,modelValue:o.criterion.value,"onUpdate:modelValue":t[3]||(t[3]=_=>o.criterion.value=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),r.propertyType==="boolean"?(e.openBlock(),e.createBlock(c,{key:1,modelValue:o.criterion.value,"onUpdate:modelValue":t[4]||(t[4]=_=>o.criterion.value=_),options:r.booleanOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),r.propertyType==="date"||r.propertyType==="datetime"?(e.openBlock(),e.createBlock(b,{key:2,modelValue:o.criterion.value,"onUpdate:modelValue":t[5]||(t[5]=_=>o.criterion.value=_),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),(r.propertyType==="date"||r.propertyType==="datetime")&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(b,{key:3,modelValue:o.criterion.value_end,"onUpdate:modelValue":t[6]||(t[6]=_=>o.criterion.value_end=_),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(r.propertyType)?(e.openBlock(),e.createBlock(m,{key:4,modelValue:o.criterion.value,"onUpdate:modelValue":t[7]||(t[7]=_=>o.criterion.value=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(r.propertyType)&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(m,{key:5,modelValue:o.criterion.value_end,"onUpdate:modelValue":t[8]||(t[8]=_=>o.criterion.value_end=_),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0)])])])]),_:1},8,["visible","header"])}const Oi=Se(RI,[["render",XI]]);class PI{getConfig(t,n){const i=`fr/jeci/pristy/config/${t}/${n}`;return _n.executeWebScript("GET",i)}updateConfig(t,n,i){const o=`fr/jeci/pristy/config/${t}/${n}`;return _n.executeWebScript("PUT",o,null,null,null,i)}validateValueByType(t,n){if(n==="number"&&(isNaN(parseFloat(t))||!isFinite(t)))return this.$t("config.errors.invalidNumber");if(n==="boolean"){const i=String(t).toLowerCase();if(i!=="true"&&i!=="false")return this.$t("config.errors.invalidBoolean")}if(n==="array"||n==="object")try{const i=JSON.parse(t),o=Array.isArray(i)?"array":typeof i;if(n==="array"&&o!=="array"||n==="object"&&o!=="object")return this.$t("config.errors.typeMismatch",{type:n})}catch{return null}return null}}const Qt=new PI;class VI{getView(t){const n=je();return Qt.getConfig(n.INSTANCE_NAME,t).then(i=>i.jsonContent)}saveView(t,n){const i=je();return Qt.updateConfig(i.INSTANCE_NAME,t,n)}deleteView(t){const n=je();return Qt.updateConfig(n.INSTANCE_NAME,t,null)}async listViews(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"vue-*.json"`},include:["properties"]};return(await Wt.search(n)).list.entries.map(o=>o.entry.name)}async listViewEntries(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"vue-*.json"`},include:["properties","allowableOperations"]};return(await Wt.search(n)).list.entries.map(o=>o.entry)}}const na=new VI,Yt=Ft.global.t,En="env-config.json",Nc="savedViews.json",wg={include:["aspectNames","isFavorite","properties","allowableOperations","permissions","path","isLocked"],maxItems:500,skipCount:0};class UI{async _getHiddenFolder(t,n=!1){const o=(await Re.getHomeFolderFromUser(t)).list.entries[0].entry.properties["cm:homeFolder"];if(!o)throw new Error(Yt("vuesUtilisateurs.noUserHomeFound"));let l=(await Re.getChildrenWithOpts(o,wg,!1)).children.find(s=>s.aspectNames&&s.aspectNames.includes("pm:hidden"));return!l&&n&&(console.warn("No hidden folder found, creating one..."),l=(await this.createConfigFolder(o)).entry),l}async _getOrCreateViewsFile(t,n=!1){let o=(await Re.getChildrenWithOpts(t,wg,!0)).children.find(r=>r.name===Nc);if(!o&&n){console.warn(`No ${Nc} file found, creating one...`);const r={name:Nc,nodeType:"cm:content"},l={personalSavedView:[],globalFavoriteView:[]},s=new Blob([JSON.stringify(l,null,2)],{type:"application/json"}),d=(await It.uploadFile(t,r,s)).entry;o=(await Re.updateNode(d.id,{aspectNames:[...d.aspectNames||[],"pm:hidden"]})).entry}return o}async getContent(t,n,i){try{return await Re.getVersionContent(t,n,i)}catch(o){throw console.error("Error getting content:",o.message),o}}async _parseFileContent(t){let n;try{const i=await this.getContent(t.id,t.properties["cm:versionLabel"],!0);n=await(r=>new Promise((l,s)=>{if(!(r instanceof Blob)){l(r);return}const c=new FileReader;c.onload=()=>l(c.result),c.onerror=d=>s(d),c.readAsText(r,"utf-8")}))(i)}catch(i){console.warn(`Could not get content for node ${t.id}, assuming empty.`,i.message),n=""}if(!n||n.trim()==="")return{personalSavedView:[],globalFavoriteView:[]};try{return JSON.parse(n)}catch(i){return console.error("Error parsing JSON content:",i),{personalSavedView:[],globalFavoriteView:[]}}}_normalizeFileContent(t){return Array.isArray(t)?{personalSavedView:t,globalFavoriteView:[]}:{personalSavedView:t?.personalSavedView||[],globalFavoriteView:t?.globalFavoriteView||[]}}async _loadViewsFileContent(){const t=yt().person;if(!t)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const n=await this._getHiddenFolder(t.id,!1);if(!n)return null;const i=await this._getOrCreateViewsFile(n.id,!1);return i?this._parseFileContent(i):null}async getPersonalViews(){try{const t=await this._loadViewsFileContent();return t?t?.personalSavedView||[]:[]}catch(t){return console.error("Error loading personal views:",t.message),[]}}async getPersonalViewsAndGlobalFavorites(){try{const t=await this._loadViewsFileContent();return t?this._normalizeFileContent(t):{personalSavedView:[],globalFavoriteView:[]}}catch(t){return console.error("Error loading personal views:",t.message),{personalSavedView:[],globalFavoriteView:[]}}}async getGlobalViews(){try{const t=await na.listViews();return t.length===0?je().SAVED_VIEWS_GLOBAL||[]:(await Promise.all(t.map(i=>na.getView(i).then(o=>({id:o.id||i.replace(/^vue-/,"").replace(/\.json$/,""),name:o.name||i,description:o.description||"",scope:"global",filename:i,config:o.config||{locations:[],criteria:[]}})).catch(()=>null)))).filter(i=>i!==null)}catch(t){return console.error("Error loading global views from config:",t),je().SAVED_VIEWS_GLOBAL||[]}}async createConfigFolder(t){const n={aspectNames:["pm:hidden"],nodeType:"cm:folder",name:"Configuration"};try{return await Re.createNode(t,n)}catch(i){throw console.error("Error while creating the Configuration folder :",i),i}}async _savePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;if(s.some(u=>u.id===t.id))throw new Error(Yt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:t.id}));if(s.some(u=>u.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));s.push(t),l.personalSavedView=s;const c=JSON.stringify(l,null,2),d=new Blob([c],{type:"application/json"});await Re.updateContentNode(o.id,d,"MAJEURE",null)}async saveView(t){if(t.scope==="global")try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(o=>o.id===t.id))throw new Error(Yt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:t.id}));if(i.some(o=>o.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));i.push(t),n.jsonContent.SAVED_VIEWS_GLOBAL=i,await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent)}catch(n){throw console.error("Error while saving the global view :",n),n}else t.scope==="user"&&await this._savePersonalView(t)}async _updatePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFoundForUpdate"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;if(s.some(b=>b.id!==t.id&&b.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));const c=s.findIndex(b=>b.id===t.id);if(c===-1)throw new Error(Yt("vuesUtilisateurs.savedViewError.personnalNotFound",{id:t.id}));s[c]=t,l.personalSavedView=s;const d=JSON.stringify(l,null,2),u=new Blob([d],{type:"application/json"});return await Re.updateContentNode(o.id,u,"MAJEURE",null)}async updateView(t){if(t.scope==="global")try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(r=>r.id!==t.id&&r.name.toLowerCase()===t.name.toLowerCase()))throw new Error(Yt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:t.name}));const o=i.findIndex(r=>r.id===t.id);if(o===-1)throw new Error(Yt("vuesUtilisateurs.savedViewError.globalNotFound",{id:t.id}));return i[o]=t,n.jsonContent.SAVED_VIEWS_GLOBAL=i,await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent),t}catch(n){throw console.error("Error while updating the global view :",n),n}else if(t.scope==="user")return await this._updatePersonalView(t)}async _deletePersonalView(t){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFoundForDelete"));const i=await this._getHiddenFolder(n.id,!1);if(!i)throw new Error(Yt("vuesUtilisateurs.configFolderNotFound"));const o=await this._getOrCreateViewsFile(i.id,!1);if(!o)throw new Error(Yt("vuesUtilisateurs.configFileNotFound"));let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.personalSavedView;l.personalSavedView=s.filter(u=>u.id!==t.id);const c=JSON.stringify(l,null,2),d=new Blob([c],{type:"application/json"});await Re.updateContentNode(o.id,d,"MAJEURE",null)}async deleteView(t){if(t.scope==="global"){try{const n=await Qt.getConfig(je().INSTANCE_NAME,En),i=n.jsonContent.SAVED_VIEWS_GLOBAL||[];n.jsonContent.SAVED_VIEWS_GLOBAL=i.filter(o=>o.id!==t.id),await Qt.updateConfig(je().INSTANCE_NAME,En,n.jsonContent)}catch(n){throw console.error("Error while deleting the global view :",n),n}return}else t.scope==="user"&&await this._deletePersonalView(t)}async getViewById(t,n){return t==="user"?(await this.getPersonalViews()).find(o=>o.id===n)||null:t==="global"?(await this.getGlobalViews()).find(o=>o.id===n)||null:(console.error(`Unknown view scope: ${t}`),null)}async toggleFavoriteStatus(t){if(t.scope==="global"){const n=yt().person;if(!n)throw new Error(Yt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(n.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let r=await this._parseFileContent(o),l=this._normalizeFileContent(r);const s=l.globalFavoriteView,c=s.findIndex(b=>b.id===t.id);c>-1?(s.splice(c,1),t.isFavorite=!1):(s.push({id:t.id,name:t.name}),t.isFavorite=!0),l.globalFavoriteView=s;const d=JSON.stringify(l,null,2),u=new Blob([d],{type:"application/json"});return await Re.updateContentNode(o.id,u,"MAJEURE",null),t}else return t.isFavorite=!t.isFavorite,await this.updateView(t)}}const Ca=new UI,ba=Fe.defineStore("userView",{state:()=>({locations:[],criteriaGroups:{rootOperator:"OR",groups:[]},loadedView:null,favoriteViews:[],personalViews:[],globalViews:[],viewsLoading:!0}),getters:{isSavedViewLoaded(a){return a.loadedView!==null},location(a){return a.locations.length>0?a.locations[0]:{type:null,value:""}},allCriteria(a){return a.criteriaGroups.groups.flatMap(t=>t.criteria)},criteria(a){return a.criteriaGroups.groups.flatMap(t=>t.criteria)}},actions:{loadView(a){if(!a||!a.config){console.error("Invalid saved view object provided to loadView",a);return}if(a.config.locations&&Array.isArray(a.config.locations))this.locations=a.config.locations;else if(a.config.location){const t=a.config.location;t.type&&t.value?this.locations=[{id:Date.now(),type:t.type,value:t.value,negation:t.negation||!1,label:t.label||t.value}]:this.locations=[]}else this.locations=[];if(a.config.criteriaGroups){const t=a.config.criteriaGroups;this.criteriaGroups={rootOperator:"OR",groups:(t.groups||[]).map(n=>({...n,operator:"AND"}))}}else a.config.criteria&&a.config.criteria.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:"migrated",operator:"AND",criteria:a.config.criteria}]}:this.criteriaGroups={rootOperator:"OR",groups:[]};this.loadedView=a},addLocation(a){this.locations.push({...a,id:a.id||Date.now()})},removeLocation(a){this.locations.splice(a,1)},setLocation(a){a&&a.type&&a.value?this.locations=[{id:Date.now(),type:a.type,value:a.value,negation:a.negation||!1,label:a.label||a.value}]:this.locations=[]},setCriteria(a){a&&a.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:String(Date.now()),operator:"AND",criteria:a}]}:this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},addGroup(a="AND"){this.criteriaGroups.groups.push({id:String(Date.now()),operator:a,criteria:[]})},removeGroup(a){this.criteriaGroups.groups.splice(a,1)},addCriterionToGroup(a,t){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.push(t)},removeCriterionFromGroup(a,t){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.splice(t,1)},updateCriterionInGroup(a,t,n){this.criteriaGroups.groups[a]&&this.criteriaGroups.groups[a].criteria.splice(t,1,n)},addCriterion(a){this.criteriaGroups.groups.length===0&&this.addGroup("AND"),this.criteriaGroups.groups[0].criteria.push(a)},removeCriterion(a){let t=a;for(const n of this.criteriaGroups.groups){if(t<n.criteria.length){n.criteria.splice(t,1);return}t-=n.criteria.length}},resetUserView(){this.locations=[],this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},async saveCurrentView(a){try{await Ca.saveView(a),this.loadView(a)}catch(t){throw console.error("Error saving the current view:",t),t}},async updateCurrentView(a){try{const t=await Ca.updateView(a);this.loadView(t.entry||t)}catch(t){throw console.error("Error updating the current view:",t),t}},async deleteCurrentView(){if(!this.loadedView)throw new Error("No view loaded to delete.");try{await Ca.deleteView(this.loadedView),this.resetUserView()}catch(a){throw console.error("Error deleting the current view:",a),a}},async toggleViewFavorite(a){if(!a||!a.id)throw new Error("Invalid view provided to toggleFavorite action.");try{await Ca.toggleFavoriteStatus(a),await this.fetchFavoriteViews()}catch(t){throw console.error("Error toggling favorite status in store:",t),t}},async fetchFavoriteViews(){this.viewsLoading=!0;try{const[a,t,n]=await Promise.all([Ca.getPersonalViews(),Ca.getGlobalViews(),Ca.getPersonalViewsAndGlobalFavorites()]),i=n?.globalFavoriteView||[],o=(a||[]).filter(s=>s.isFavorite),r=(t||[]).filter(s=>i.some(c=>c.id===s.id));this.personalViews=a,this.globalViews=t;const l=s=>({label:s.name,to:`/vues/${s.scope}/${s.id}`});this.favoriteViews=[...o.map(l),...r.map(l)]}catch(a){console.error("Error fetching favorite views:",a),this.favoriteViews=[]}finally{this.viewsLoading=!1}},async fetchSavedViews(){this.viewsLoading=!0;try{const a=await Promise.allSettled([Ca.getPersonalViews(),Ca.getGlobalViews()]);a[0].status==="fulfilled"&&(this.personalViews=a[0].value),a[1].status==="fulfilled"&&(this.globalViews=a[1].value)}catch(a){console.error("Error fetching views:",a)}finally{this.viewsLoading=!1}}}}),Ci=Fe.defineStore({id:"SearchStore",state:()=>({language:"afts",userQuery:"",aftsQuery:"",fullQuery:"",paging:{maxItems:"15",skipCount:"0"},include:["properties","allowableOperations","permissions","path"],sort:null,defaultSort:[{type:"FIELD",field:"score",ascending:!1}],spellcheck:null,filterQueries:[],facetQueries:[],facets:[],fields:[],context:null,entries:[],pagination:{},isExactSearchActivated:!1}),getters:{facetFields(a){return{facetFields:a.facets}}},actions:{setIsExactSearchActivated(a){this.isExactSearchActivated=a},reset(){const a=je();this.language="afts",this.userQuery="",this.fullQuery="",this.filterQueries=[...a.SEARCH_BASE_FILTER_QUERIES],this.facetQueries=[...a.SEARCH_FACET_QUERIES],this.facets=[...a.SEARCH_FACET],this.fields=[],this.context=null,this.entries=[],this.pagination={}},defineUserQuery(a){const t=je();let n=null;this.isExactSearchActivated?n=t.SEARCH_USER_QUERY.replaceAll("*","").replaceAll("%s",a):n=t.SEARCH_USER_QUERY.replaceAll("%s",a),this.language="afts",this.userQuery=a;let i=this.fields.map(o=>`(${o.query})`);this.fullQuery=[n,...i].join(" AND ")},queryStore(a,t,n=null){if(!a)return Promise.resolve();const i=parseInt(this.paging.maxItems)||15;this.paging.skipCount=t?t*i:0,n?(this.fullQuery=n,this.userQuery=a):this.defineUserQuery(a);const o=n?[]:[...this.filterQueries];o.some(l=>l.query==="-ASPECT:'pm:hidden'")||o.push({query:"-ASPECT:'pm:hidden'"});let r={query:{language:this.language,query:this.fullQuery},include:this.include,paging:this.paging,filterQueries:o.map(l=>({query:l.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(l=>({field:l.field,mincount:l.mincount,label:l.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Wt.search(r).then(l=>{this.context=l.list.context,t>0?this.entries=[...this.entries,...l.list.entries]:this.entries=l.list.entries,this.pagination=l.list.pagination})},searchForExport(a){let t={...this.paging};t.maxItems=a;const n=[...this.filterQueries];n.some(o=>o.query==="-ASPECT:'pm:hidden'")||n.push({query:"-ASPECT:'pm:hidden'"});let i={query:{language:this.language,query:this.fullQuery},include:this.include,paging:t,filterQueries:n.map(o=>({query:o.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(o=>({field:o.field,mincount:o.mincount,label:o.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Wt.search(i).then(o=>o)},addSortField(a){this.sort=a},removeSortField(){this.sort=null},addFilterQuery(a){return a.query?this.filterQueries.find(t=>t.query===a.query)?!1:(this.filterQueries.push({query:a.query,label:a.label}),!0):!1},removeFilterQuery(a){this.filterQueries=this.filterQueries.filter(t=>a.query.startsWith("(SITE:")&&t.label&&(t.label.startsWith("Dossier :")||t.label.startsWith("Folder :"))?!1:t.query!==a.query)},addField(a){return this.fields.find(t=>t.query===a.query)?!1:(this.fields.push({query:a.query,label:a.label}),!0)},removeField(a){this.fields=this.fields.filter(t=>t.query!==a.query)}}}),jI={name:"ExactSearch",components:{PrimeToggleButton:C_},props:{disabled:{type:Boolean,default:!1}},watch:{disabled(a){a&&this.exactSearch&&(this.exactSearch=!1)}},emits:["change-exact-search-settings"],computed:{...Fe.mapState(Ci,["isExactSearchActivated"]),exactSearch:{get(){return this.isExactSearchActivated},set(a){this.setIsExactSearchActivated(a),this.$emit("change-exact-search-settings",a)}}},methods:{...Fe.mapActions(Ci,["setIsExactSearchActivated"])}},BI={id:"exactSearch",class:"flex gap-3 p-3 rounded-2xl"},HI={class:"text-gray-700 font-medium align-content-center"};function JI(a,t,n,i,o,r){const l=e.resolveComponent("PrimeToggleButton");return e.openBlock(),e.createElementBlock("div",BI,[e.createElementVNode("span",HI,e.toDisplayString(a.$t("exactSearch")),1),e.createVNode(l,{modelValue:r.exactSearch,"onUpdate:modelValue":t[0]||(t[0]=s=>r.exactSearch=s),binary:"",onLabel:a.$t("enabled"),offLabel:a.$t("disabled"),class:"rounded-xl",disabled:n.disabled},null,8,["modelValue","onLabel","offLabel","disabled"])])}const Sc=Se(jI,[["render",JI]]),QI={name:"UserViewsFavoritesPanel",components:{PrimeSelect:$t},props:{globalOnly:{type:Boolean,default:!1}},data(){return{selectedPersonalSearch:null,selectedGlobalSearch:null}},mounted(){this.fetchSavedViews()},computed:{...Fe.mapState(ba,{loadedView:"loadedView",personalViews:"personalViews",globalViews:"globalViews",loading:"viewsLoading"}),hasGroupedSearches(){return this.globalOnly?this.globalViews.length>0:this.personalViews.length>0||this.globalViews.length>0}},emits:["load-view"],methods:{...Fe.mapActions(ba,["fetchSavedViews"]),onDropdownChange(a){a.value&&(this.selectView(a.value),this.$nextTick(()=>{this.selectedPersonalSearch=null,this.selectedGlobalSearch=null}))},selectView(a){this.$emit("load-view",a)}}},KI={key:0,class:"text-center p-3"},qI={key:1,class:"text-center text-gray-500 p-3"},$I={key:2},eM={class:"flex flex-column gap-4"},tM={key:0,class:"flex flex-column gap-2"},aM={for:"personal-searches-dropdown"},nM={class:"flex flex-column align-items-start w-30rem overflow-hidden"},iM={class:"font-bold"},oM={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"},rM={key:1,class:"flex flex-column gap-2"},lM={for:"global-searches-dropdown"},sM={class:"flex flex-column align-items-start w-30rem overflow-hidden"},cM={class:"font-bold"},dM={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"};function mM(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelect"),s=e.resolveDirective("tooltip");return a.loading?(e.openBlock(),e.createElementBlock("div",KI,[...t[2]||(t[2]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin text-4xl"},null,-1)])])):r.hasGroupedSearches?(e.openBlock(),e.createElementBlock("div",$I,[e.createElementVNode("div",eM,[!n.globalOnly&&a.personalViews.length>0?(e.openBlock(),e.createElementBlock("div",tM,[e.createElementVNode("label",aM,e.toDisplayString(a.$t("vuesFavorites.personalViews")),1),e.createVNode(l,{id:"personal-searches-dropdown",modelValue:o.selectedPersonalSearch,"onUpdate:modelValue":t[0]||(t[0]=c=>o.selectedPersonalSearch=c),options:a.personalViews,optionLabel:"name",placeholder:a.$t("vuesFavorites.selectPersonalView"),onChange:r.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:a.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",nM,[e.createElementVNode("div",iM,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",oM,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[s,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0),a.globalViews.length>0?(e.openBlock(),e.createElementBlock("div",rM,[e.createElementVNode("label",lM,e.toDisplayString(a.$t("vuesFavorites.globalViews")),1),e.createVNode(l,{id:"global-searches-dropdown",modelValue:o.selectedGlobalSearch,"onUpdate:modelValue":t[1]||(t[1]=c=>o.selectedGlobalSearch=c),options:a.globalViews,optionLabel:"name",placeholder:a.$t("vuesFavorites.selectGlobalView"),onChange:r.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:a.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",sM,[e.createElementVNode("div",cM,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",dM,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[s,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",qI,e.toDisplayString(a.$t("vuesFavorites.noSavedViews")),1))}const Ri=Se(QI,[["render",mM],["__scopeId","data-v-8a1b9530"]]),pM={name:"SaveViewPopup",components:{PrimeDialog:_t,PrimeStepper:Kc,PrimeStepList:qc,PrimeStep:$c,PrimeStepPanels:w_,PrimeStepPanel:W_,PrimeInputText:at,PrimeInputGroup:ai,PrimeInputGroupAddon:Mn,PrimeTextarea:va,PrimeSelectButton:Ka,PrimeButton:ce},props:{visible:Boolean,errorMessage:{type:String,default:null},viewData:{type:Object,default:null},globalOnly:{type:Boolean,default:!1}},emits:["update:visible","save-view","clear-error"],data(){return{currentStep:"1",viewName:"",viewDescription:"",viewFileId:"",scope:"user"}},mounted(){this.checkPristyAdminStatus()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),isEditMode(){return!!this.viewData},showScopeStep(){return this.isPristyAdmin&&!this.globalOnly},fileIdStep(){return this.showScopeStep?"2":"1"},detailsStep(){return this.showScopeStep?"3":"2"},scopeOptions(){const a=[{label:this.$t("vuesUtilisateurs.saveViewPopup.scopeUser"),value:"user"}];return this.isPristyAdmin&&a.push({label:this.$t("vuesUtilisateurs.saveViewPopup.scopeGlobal"),value:"global"}),a},isFormValid(){return!(!this.viewName||this.scope==="global"&&!this.viewFileId)}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),save(){if(!this.isFormValid)return;const a={name:this.viewName,description:this.viewDescription,scope:this.scope};if(this.scope==="global"){const t=this.viewFileId.toLowerCase().replace(/[^a-z0-9-]/g,"-");a.filename=`vue-${t}.json`}this.$emit("save-view",a)},resetForm(){this.viewName="",this.viewDescription="",this.viewFileId="",this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1",this.$emit("clear-error")},populateForm(){this.isEditMode?(this.viewName=this.viewData.name,this.viewDescription=this.viewData.description||"",this.scope=this.globalOnly?"global":this.viewData.scope,this.viewData.filename&&(this.viewFileId=this.viewData.filename.replace(/^vue-/,"").replace(/\.json$/,"")),this.currentStep=this.detailsStep):(this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1")}},watch:{visible(a){a?this.populateForm():this.resetForm()}}},uM={class:"flex flex-column gap-3 py-3"},bM={class:"m-0 text-gray-600"},gM={class:"flex justify-content-end pt-3"},_M={class:"flex flex-column gap-3 py-3"},hM={key:0,class:"m-0 text-gray-600"},yM={key:2,class:"m-0 text-gray-600"},fM={class:"flex justify-content-between pt-3"},NM={key:1},SM={class:"flex flex-column gap-3 py-3"},EM={class:"flex flex-column gap-1"},TM={class:"font-semibold"},AM={key:0,class:"p-error"},OM={key:1,class:"p-error"},CM={class:"flex flex-column gap-1"},RM={class:"font-semibold"},IM={class:"flex justify-content-between pt-3"};function MM(a,t,n,i,o,r){const l=e.resolveComponent("PrimeStep"),s=e.resolveComponent("PrimeStepList"),c=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeButton"),u=e.resolveComponent("PrimeStepPanel"),b=e.resolveComponent("PrimeInputGroupAddon"),m=e.resolveComponent("PrimeInputText"),p=e.resolveComponent("PrimeInputGroup"),g=e.resolveComponent("PrimeTextarea"),_=e.resolveComponent("PrimeStepPanels"),f=e.resolveComponent("PrimeStepper"),h=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(h,{visible:n.visible,"onUpdate:visible":t[6]||(t[6]=S=>a.$emit("update:visible",S)),modal:"",header:r.isEditMode?a.$t("vuesUtilisateurs.modifyViewPopup.title"):a.$t("vuesUtilisateurs.saveViewPopup.title"),style:{width:"550px",maxWidth:"95vw"}},{default:e.withCtx(()=>[e.createVNode(f,{value:o.currentStep,"onUpdate:value":t[5]||(t[5]=S=>o.currentStep=S),linear:""},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[r.showScopeStep?(e.openBlock(),e.createBlock(l,{key:0,value:"1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.scopeLabel")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(l,{value:r.fileIdStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.fileIdLabel")),1)]),_:1},8,["value"]),e.createVNode(l,{value:r.detailsStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.detailsLabel")),1)]),_:1},8,["value"])]),_:1}),e.createVNode(_,null,{default:e.withCtx(()=>[r.showScopeStep?(e.openBlock(),e.createBlock(u,{key:0,value:"1"},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",uM,[e.createElementVNode("p",bM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.scopeDescription")),1),e.createVNode(c,{modelValue:o.scope,"onUpdate:modelValue":t[0]||(t[0]=y=>o.scope=y),options:r.scopeOptions,optionLabel:"label",optionValue:"value",disabled:r.isEditMode},null,8,["modelValue","options","disabled"])]),e.createElementVNode("div",gM,[e.createVNode(d,{label:a.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:y=>S(r.fileIdStep),disabled:!o.scope},null,8,["label","onClick","disabled"])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{value:r.fileIdStep},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",_M,[o.scope==="global"?(e.openBlock(),e.createElementBlock("p",hM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.fileIdDescription")),1)):e.createCommentVNode("",!0),o.scope==="global"?(e.openBlock(),e.createBlock(p,{key:1},{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("vue-",-1)])]),_:1}),e.createVNode(m,{modelValue:o.viewFileId,"onUpdate:modelValue":t[1]||(t[1]=y=>o.viewFileId=y),modelModifiers:{trim:!0},placeholder:a.$t("vuesUtilisateurs.saveViewPopup.fileIdPlaceholder"),disabled:r.isEditMode},null,8,["modelValue","placeholder","disabled"]),e.createVNode(b,null,{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("p",yM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.personalDescription")),1))]),e.createElementVNode("div",fM,[r.showScopeStep?(e.openBlock(),e.createBlock(d,{key:0,label:a.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:y=>S("1")},null,8,["label","onClick"])):(e.openBlock(),e.createElementBlock("span",NM)),e.createVNode(d,{label:a.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:y=>S(r.detailsStep),disabled:o.scope==="global"&&!o.viewFileId},null,8,["label","onClick","disabled"])])]),_:1},8,["value"]),e.createVNode(u,{value:r.detailsStep},{default:e.withCtx(({activateCallback:S})=>[e.createElementVNode("div",SM,[e.createElementVNode("div",EM,[e.createElementVNode("label",TM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.nameLabel")),1),e.createVNode(m,{modelValue:o.viewName,"onUpdate:modelValue":t[2]||(t[2]=y=>o.viewName=y),modelModifiers:{trim:!0},class:e.normalizeClass({"p-invalid":n.errorMessage}),onInput:t[3]||(t[3]=y=>a.$emit("clear-error"))},null,8,["modelValue","class"]),!o.viewName&&!n.errorMessage?(e.openBlock(),e.createElementBlock("small",AM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.nameRequired")),1)):e.createCommentVNode("",!0),n.errorMessage?(e.openBlock(),e.createElementBlock("small",OM,e.toDisplayString(n.errorMessage),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",CM,[e.createElementVNode("label",RM,e.toDisplayString(a.$t("vuesUtilisateurs.saveViewPopup.descriptionLabel")),1),e.createVNode(g,{modelValue:o.viewDescription,"onUpdate:modelValue":t[4]||(t[4]=y=>o.viewDescription=y),rows:"3",autoResize:""},null,8,["modelValue"])])]),e.createElementVNode("div",IM,[e.createVNode(d,{label:a.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:y=>S(r.fileIdStep)},null,8,["label","onClick"]),e.createVNode(d,{label:r.isEditMode?a.$t("vuesUtilisateurs.modifyView"):a.$t("vuesUtilisateurs.saveView"),icon:"ri-save-3-line",onClick:r.save,disabled:!r.isFormValid},null,8,["label","onClick","disabled"])])]),_:1},8,["value"])]),_:1})]),_:1},8,["value"])]),_:1},8,["visible","header"])}const Ii=Se(pM,[["render",MM]]),vM={name:"AdvancedSearchPanel",components:{ExactSearch:Sc,PrimeAccordion:td,PrimeAccordionPanel:ad,PrimeAccordionHeader:nd,PrimeAccordionContent:id,UserViewsFavoritesPanel:Ri,PrimeSelectButton:Ka,PrimeInputText:at,PrimeButton:ce,AddCriterionPopup:Oi,SaveViewPopup:Ii,PrimeDialog:_t,TreeExplorer:en},emits:["change-exact-search-settings","load-view"],watch:{"location.type"(a){a||this.updateLocationValue("")}},data(){return{isAddCriterionDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1}},mounted(){this.checkPristyAdminStatus()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),...Fe.mapState(ba,["location","criteria","loadedView"]),locationModel:{get(){return this.location},set(a){this.setLocation(a)}},locationOptions(){return[{label:this.$t("vuesUtilisateurs.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},locationPlaceholder(){return this.locationModel.type==="Site"?this.$t("vuesUtilisateurs.sitePlaceholder"):this.locationModel.type==="Folder"?this.$t("vuesUtilisateurs.folderPlaceholder"):""},hasActiveCriteria(){const a=this.location&&this.location.type&&this.location.value;return!!(this.criteria&&this.criteria.length>0||a)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return je().METADATA.filter(t=>t.display&&(t.display.includes("view")||t.display.includes("advancedSearch")))}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),...Fe.mapActions(ba,["setLocation","addCriterion","removeCriterion","saveCurrentView","updateCurrentView","deleteCurrentView"]),clearSaveViewError(){this.saveViewError=null},handleDossierSelected(a){this.updateLocationValue(a.id),this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:"Succès",detail:"Recherche supprimée avec succès.",life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(a){this.$toast.add({severity:"error",summary:"Erreur",detail:a.message,life:5e3})}},async handleSaveView(a){this.clearSaveViewError();const t=this.saveViewDialogMode==="create";let n,i,o;const r={location:JSON.parse(JSON.stringify(this.location)),criteria:JSON.parse(JSON.stringify(this.criteria))};t?(n=this.saveCurrentView,o="vuesUtilisateurs.addsSavedViewSuccess",i={id:crypto.randomUUID(),name:a.name,description:a.description,scope:a.scope,config:r}):(n=this.updateCurrentView,o="vuesUtilisateurs.modifySavedViewSuccess",i={...this.loadedView,name:a.name,description:a.description,config:r});try{await n(i),this.$toast.add({severity:"success",summary:"Succès",detail:this.$t(o),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(l){this.$toast.add({severity:"error",summary:"Erreur",detail:l.message,life:5e3})}},handleLoadView(a){this.$emit("load-view",a)},updateLocationValue(a){let t=a;this.locationModel.type==="Folder"&&a&&!a.startsWith("workspace://")&&(t=`workspace://SpacesStore/${a}`),this.setLocation({...this.locationModel,value:t})},handleCriterionAdded(a){this.addCriterion(a)},formatCriterionValueForDisplay(a){if(a.value===null||a.value===void 0)return"";if(a.operator==="range"){const t=a.value instanceof Date?new Date(a.value).toLocaleDateString():a.value||"*",n=a.value_end instanceof Date?new Date(a.value_end).toLocaleDateString():a.value_end||"*";return`[${t} -> ${n}]`}else return a.value instanceof Date?new Date(a.value).toLocaleDateString():typeof a.value=="boolean"?this.$t(a.value?"true":"false"):`"${a.value}"`}}},ZM={key:0,class:"p-2 mb-3 border-1 border-round border-blue-200 bg-blue-50 text-blue-700"},DM={class:"font-bold"},wM={class:"p-fluid formgrid grid"},WM={class:"field col-12"},LM={for:"locationType"},YM={key:0,class:"field col-12"},kM={for:"locationValue"},xM={key:0,id:"username-help"},zM={class:"mt-4"},GM={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},FM={key:1,class:"flex flex-column gap-2"},XM={class:"flex-grow-1"},PM={class:"font-bold mr-1"},VM={class:"font-italic mr-1"},UM={class:"text-gray-700"},jM={key:3,class:"flex gap-2 mt-2"},BM={class:"flex align-items-center"},HM={key:0};function JM(a,t,n,i,o,r){const l=e.resolveComponent("ExactSearch"),s=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),d=e.resolveComponent("PrimeAccordionContent"),u=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeSelectButton"),m=e.resolveComponent("PrimeInputText"),p=e.resolveComponent("PrimeButton"),g=e.resolveComponent("PrimeAccordion"),_=e.resolveComponent("AddCriterionPopup"),f=e.resolveComponent("SaveViewPopup"),h=e.resolveComponent("TreeExplorer"),S=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{onChangeExactSearchSettings:t[0]||(t[0]=y=>a.$emit("change-exact-search-settings",y)),disabled:r.hasActiveCriteria||r.isSavedViewLoaded},null,8,["disabled"]),e.createVNode(g,{class:"mt-4",multiple:"",value:["0"]},{default:e.withCtx(()=>[e.createVNode(u,{value:"0"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesFavorites.title")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel",onLoadView:r.handleLoadView},null,8,["onLoadView"])]),_:1})]),_:1}),e.createVNode(u,{value:"1"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.queryBuilder")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[r.isSavedViewLoaded?(e.openBlock(),e.createElementBlock("div",ZM,[e.createTextVNode(e.toDisplayString(a.$t("vuesUtilisateurs.loadedViewMessage"))+" ",1),e.createElementVNode("span",DM,e.toDisplayString(a.loadedView.name),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",wM,[e.createElementVNode("div",WM,[e.createElementVNode("label",LM,e.toDisplayString(a.$t("vuesUtilisateurs.locationLabel")),1),e.createVNode(b,{id:"locationType",modelValue:r.locationModel.type,"onUpdate:modelValue":t[1]||(t[1]=y=>r.locationModel.type=y),options:r.locationOptions,optionLabel:"label",optionValue:"value",allowEmpty:"",class:"w-full"},null,8,["modelValue","options"])]),r.locationModel.type?(e.openBlock(),e.createElementBlock("div",YM,[e.createElementVNode("label",kM,e.toDisplayString(a.$t("vuesUtilisateurs.valueLabel")),1),e.createVNode(m,{id:"locationValue",value:r.locationModel.value,placeholder:r.locationPlaceholder,onClick:t[2]||(t[2]=y=>r.locationModel.type==="Folder"?o.isDossierTreeVisible=!0:null),onChange:t[3]||(t[3]=y=>r.updateLocationValue(y.target.value))},null,8,["value","placeholder"]),r.locationModel.type==="Folder"?(e.openBlock(),e.createElementBlock("small",xM,"Ex: workspace://SpacesStore/{ID du dossier}")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",zM,[e.createElementVNode("h5",null,e.toDisplayString(a.$t("vuesUtilisateurs.criteriaTitle")),1),a.criteria.length===0?(e.openBlock(),e.createElementBlock("div",GM,e.toDisplayString(a.$t("vuesUtilisateurs.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",FM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.criteria,(y,T)=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"flex align-items-center p-2 border-1 border-round border-gray-200"},[e.createElementVNode("div",XM,[e.createElementVNode("span",PM,e.toDisplayString(a.$t(y.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([y.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(y.negation?a.$t("vuesUtilisateurs.mustNotContain"):a.$t("vuesUtilisateurs.mustContain")),3),e.createElementVNode("span",VM,e.toDisplayString(a.$t(y.operatorLabelKey)),1),e.createElementVNode("span",UM,e.toDisplayString(r.formatCriterionValueForDisplay(y)),1)]),e.createVNode(p,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger",onClick:O=>a.removeCriterion(T)},null,8,["onClick"])]))),128))])),e.createVNode(p,{icon:"ri-add-line",label:a.$t("vuesUtilisateurs.addCriterionButton"),onClick:t[4]||(t[4]=y=>o.isAddCriterionDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"]),r.hasActiveCriteria?(e.openBlock(),e.createBlock(p,{key:2,icon:"ri-save-3-line",label:a.$t("vuesUtilisateurs.saveView"),onClick:r.openSaveViewPopup,class:"mt-3 w-full"},null,8,["label","onClick"])):e.createCommentVNode("",!0),r.canManageLoadedView?(e.openBlock(),e.createElementBlock("div",jM,[e.createVNode(p,{icon:"ri-pencil-line",label:a.$t("vuesUtilisateurs.modifyView"),onClick:r.modifyView,class:"w-full",severity:"secondary"},null,8,["label","onClick"]),e.createVNode(p,{icon:"ri-delete-bin-line",label:a.$t("vuesUtilisateurs.deleteView"),onClick:r.deleteView,class:"w-full",severity:"danger"},null,8,["label","onClick"])])):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1}),e.createVNode(_,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":t[5]||(t[5]=y=>o.isAddCriterionDialogVisible=y),properties:r.availableProperties,onAddCriterion:r.handleCriterionAdded},null,8,["visible","properties","onAddCriterion"]),e.createVNode(f,{visible:o.saveViewDialogVisible,"onUpdate:visible":t[6]||(t[6]=y=>o.saveViewDialogVisible=y),"view-data":r.viewToEdit,"error-message":o.saveViewError,onSaveView:r.handleSaveView,onClearError:r.clearSaveViewError},null,8,["visible","view-data","error-message","onSaveView","onClearError"]),e.createVNode(S,{visible:o.isDossierTreeVisible,"onUpdate:visible":t[7]||(t[7]=y=>o.isDossierTreeVisible=y),header:"Choisir un dossier",modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(h,{"current-node":null,showUserHome:"",onSelectNode:r.handleDossierSelected},null,8,["onSelectNode"])]),_:1},8,["visible"]),e.createVNode(S,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":t[9]||(t[9]=y=>o.isDeleteConfirmVisible=y),header:"Confirmation de suppression",modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(p,{label:a.$t("no"),icon:"ri-close-line",onClick:t[8]||(t[8]=y=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(p,{label:a.$t("yes"),icon:"ri-check-line",onClick:r.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",BM,[t[10]||(t[10]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl"},null,-1)),a.loadedView?(e.openBlock(),e.createElementBlock("span",HM,e.toDisplayString(a.$t("vuesUtilisateurs.confirmDelete",{name:a.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible"])],64)}const Wg=Se(vM,[["render",JM]]),QM={name:"AdvancedViewPanel",components:{PrimeAccordion:td,PrimeAccordionPanel:ad,PrimeAccordionHeader:nd,PrimeAccordionContent:id,UserViewsFavoritesPanel:Ri,PrimeSelectButton:Ka,PrimeInputText:at,PrimeAutoComplete:Pc,PrimeButton:ce,AddCriterionPopup:Oi,SaveViewPopup:Ii,PrimeDialog:_t,TreeExplorer:en},props:{globalOnly:{type:Boolean,default:!1},showUserHome:{type:Boolean,default:!0},hideViewSelector:{type:Boolean,default:!1},canEditLoadedView:{type:Boolean,default:!1}},emits:["change-exact-search-settings","load-view","close-view","view-saved"],data(){return{isAddCriterionDialogVisible:!1,isAddLocationDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1,availableSites:[],filteredSites:[],newLocation:{type:null,value:"",negation:!1,label:""},newLocationSiteInput:null,editingCriterion:null,editingGroupIndex:null,editingCriterionIndex:null,targetGroupIndex:null}},watch:{isAddCriterionDialogVisible(a){a||(this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null,this.targetGroupIndex=null)}},async mounted(){this.checkPristyAdminStatus(),await this.loadSites()},computed:{...Fe.mapState(yt,["isPristyAdmin"]),...Fe.mapState(ba,["locations","criteriaGroups","allCriteria","loadedView"]),locationOptions(){return[{label:this.$t("rechercheAvancee.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},conditionOptions(){return[{label:this.$t("rechercheAvancee.includePrefix"),value:!1},{label:this.$t("rechercheAvancee.excludePrefix"),value:!0}]},hasActiveCriteria(){return!!(this.allCriteria&&this.allCriteria.length>0||this.locations.length>0)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.canEditLoadedView||this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return je().METADATA.filter(t=>t.display&&t.display.includes("view"))}},methods:{...Fe.mapActions(yt,["checkPristyAdminStatus"]),...Fe.mapActions(ba,["addLocation","removeLocation","addGroup","removeGroup","addCriterionToGroup","removeCriterionFromGroup","updateCriterionInGroup","saveCurrentView","updateCurrentView","deleteCurrentView"]),removeLocationAtIndex(a){this.removeLocation(a)},resetNewLocation(){this.newLocation={type:null,value:"",negation:!1,label:""},this.newLocationSiteInput=null},confirmAddLocation(){!this.newLocation.type||!this.newLocation.value||(this.addLocation({...this.newLocation}),this.isAddLocationDialogVisible=!1,this.resetNewLocation())},handleNewLocationSiteSelect(a){const t=a.value;t&&t.id&&(this.newLocation.value=t.id,this.newLocation.label=t.title)},clearSaveViewError(){this.saveViewError=null},handleDossierSelected(a){if(this.isAddLocationDialogVisible){const t=a.id.startsWith("workspace://")?a.id:`workspace://SpacesStore/${a.id}`;this.newLocation.value=t,this.newLocation.label=a.name||t}this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.deleteViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(a){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:a.message,life:5e3})}},async handleSaveView(a){this.clearSaveViewError();const t={locations:JSON.parse(JSON.stringify(this.locations)),criteriaGroups:JSON.parse(JSON.stringify(this.criteriaGroups))};if(a.scope==="global"){try{const l={id:a.filename.replace(/^vue-/,"").replace(/\.json$/,""),name:a.name,description:a.description,config:t};await na.saveView(a.filename,l),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.addsSavedViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel&&this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1,this.$emit("view-saved",{filename:a.filename,name:a.name,description:a.description})}catch(l){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:l.message,life:5e3})}return}const n=this.saveViewDialogMode==="create";let i,o,r;n?(i=this.saveCurrentView,r="rechercheAvancee.addsSavedViewSuccess",o={id:crypto.randomUUID(),name:a.name,description:a.description,scope:a.scope,config:t}):(i=this.updateCurrentView,r="rechercheAvancee.modifySavedViewSuccess",o={...this.loadedView,name:a.name,description:a.description,config:t});try{await i(o),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t(r),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(l){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:l.message,life:5e3})}},handleLoadView(a){this.$emit("load-view",a)},handleAddFirstCriterion(){this.addGroup("AND"),this.targetGroupIndex=0,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleAddGroup(){this.addGroup("AND")},openAddCriterionForGroup(a){this.targetGroupIndex=a,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleCriterionAdded(a){this.criteriaGroups.groups.length===0&&(this.addGroup("AND"),this.targetGroupIndex=0);const t=this.targetGroupIndex!==null?this.targetGroupIndex:this.criteriaGroups.groups.length-1;this.addCriterionToGroup(t,a),this.targetGroupIndex=null},startEditCriterion(a,t,n){this.editingGroupIndex=a,this.editingCriterionIndex=t,this.editingCriterion=JSON.parse(JSON.stringify(n)),this.isAddCriterionDialogVisible=!0},handleCriterionUpdated(a){this.updateCriterionInGroup(this.editingGroupIndex,this.editingCriterionIndex,a),this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null},formatCriterionValueForDisplay(a){if(a.value===null||a.value===void 0)return"";if(a.operator==="range"){const t=a.value instanceof Date?new Date(a.value).toLocaleDateString():a.value||"*",n=a.value_end instanceof Date?new Date(a.value_end).toLocaleDateString():a.value_end||"*";return`[${t} -> ${n}]`}else return a.value instanceof Date?new Date(a.value).toLocaleDateString():typeof a.value=="boolean"?this.$t(a.value?"true":"false"):`"${a.value}"`},async loadSites(){try{const a=await ht.getWorkspaces();this.availableSites=a.map(t=>({id:t.id,title:t.title,description:t.description}))}catch(a){console.error("Error loading sites:",a)}},searchSites(a){const t=a.query.toLowerCase();t?this.filteredSites=this.availableSites.filter(n=>n.title.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)):this.filteredSites=[...this.availableSites]}}},KM={key:0,class:"loaded-view-bar"},qM={class:"loaded-view-label"},$M={class:"mt-2 mb-4"},e3={class:"flex align-items-center gap-1 mb-2"},t3={class:"font-bold"},a3={class:"ri-information-line text-gray-400 cursor-help"},n3={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},i3={key:1,class:"flex flex-column gap-2"},o3={class:"font-semibold mr-1"},r3={class:"text-gray-700 flex-grow-1"},l3={class:"mt-4"},s3={class:"font-bold"},c3={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round mt-2"},d3={key:1,class:"flex flex-column mt-2"},m3={key:0,class:"criteria-group-separator"},p3={class:"criteria-group-separator-label"},u3={key:0,class:"flex align-items-center justify-content-end mb-2"},b3={class:"flex flex-column"},g3={key:0,class:"criteria-inline-operator"},_3={class:"criteria-inline-operator-label"},h3={class:"flex align-items-center p-2 border-1 border-round border-gray-200"},y3={class:"flex-grow-1"},f3={class:"font-bold mr-1"},N3={class:"font-italic mr-1"},S3={class:"text-gray-700"},E3={class:"flex gap-2 mt-3"},T3={key:2,class:"view-actions-separator"},A3={class:"flex flex-column gap-3"},O3={class:"flex flex-column gap-1 w-full"},C3={class:"font-semibold"},R3={class:"flex flex-column gap-1 w-full"},I3={class:"font-semibold"},M3={key:0,class:"flex flex-column gap-1 w-full"},v3={class:"font-semibold"},Z3={class:"flex align-items-center"},D3={key:0};function w3(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),d=e.resolveComponent("PrimeAccordionContent"),u=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeAccordion"),m=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeAutoComplete"),g=e.resolveComponent("PrimeInputText"),_=e.resolveComponent("PrimeDialog"),f=e.resolveComponent("AddCriterionPopup"),h=e.resolveComponent("SaveViewPopup"),S=e.resolveComponent("TreeExplorer"),y=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.isSavedViewLoaded&&!n.hideViewSelector?(e.openBlock(),e.createElementBlock("div",KM,[e.createElementVNode("span",qM,[t[15]||(t[15]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(a.$t("rechercheAvancee.activeView",{name:a.loadedView.name})),1)]),e.createVNode(l,{icon:"ri-close-line",label:a.$t("rechercheAvancee.closeView"),severity:"danger",onClick:t[0]||(t[0]=T=>a.$emit("close-view")),outlined:"",size:"small"},null,8,["label"])])):e.createCommentVNode("",!0),e.createVNode(b,{class:e.normalizeClass(["mt-4",{"accordion-locked":n.hideViewSelector}]),multiple:"",value:n.hideViewSelector?["1"]:["0","1"]},{default:e.withCtx(()=>[n.hideViewSelector?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0,value:"0"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("rechercheAvancee.savedViews")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel","global-only":n.globalOnly,onLoadView:r.handleLoadView},null,8,["global-only","onLoadView"])]),_:1})]),_:1})),e.createVNode(u,{value:"1"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("rechercheAvancee.queryBuilder")),1)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("div",$M,[e.createElementVNode("div",e3,[e.createElementVNode("span",t3,e.toDisplayString(a.$t("rechercheAvancee.locationsTitle")),1),e.withDirectives(e.createElementVNode("i",a3,null,512),[[y,a.$t("rechercheAvancee.locationsHint"),void 0,{right:!0}]])]),a.locations.length===0?(e.openBlock(),e.createElementBlock("div",n3,e.toDisplayString(a.$t("rechercheAvancee.noLocations")),1)):(e.openBlock(),e.createElementBlock("div",i3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.locations,(T,O)=>(e.openBlock(),e.createElementBlock("div",{key:T.id||O,class:e.normalizeClass(["flex align-items-center p-2 border-1 border-round",T.negation?"border-red-200 bg-red-50":"border-green-200 bg-green-50"])},[e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-bold px-2 py-1 border-round mr-2",T.negation?"bg-red-100 text-red-700":"bg-green-100 text-green-700"])},e.toDisplayString(T.negation?a.$t("rechercheAvancee.excludePrefix"):a.$t("rechercheAvancee.includePrefix")),3),e.createElementVNode("span",o3,e.toDisplayString(T.type),1),e.createElementVNode("span",r3,e.toDisplayString(T.label||T.value),1),e.createVNode(l,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger","aria-label":a.$t("rechercheAvancee.removeLocation"),onClick:D=>r.removeLocationAtIndex(O)},null,8,["aria-label","onClick"])],2))),128))])),e.createVNode(l,{icon:"ri-add-line",label:a.$t("rechercheAvancee.addLocationButton"),onClick:t[1]||(t[1]=T=>o.isAddLocationDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"])]),e.createElementVNode("div",l3,[e.createElementVNode("span",s3,e.toDisplayString(a.$t("rechercheAvancee.criteriaTitle")),1),a.criteriaGroups.groups.length===0?(e.openBlock(),e.createElementBlock("div",c3,e.toDisplayString(a.$t("rechercheAvancee.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",d3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.criteriaGroups.groups,(T,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:T.id},[O>0?(e.openBlock(),e.createElementBlock("div",m3,[t[16]||(t[16]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1)),e.createElementVNode("span",p3,e.toDisplayString(a.$t("rechercheAvancee.operatorOr")),1),t[17]||(t[17]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["criteria-group-block",{"criteria-group-block--multi":a.criteriaGroups.groups.length>1}])},[a.criteriaGroups.groups.length>1?(e.openBlock(),e.createElementBlock("div",u3,[e.withDirectives(e.createVNode(l,{icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:D=>a.removeGroup(O)},null,8,["onClick"]),[[y,a.$t("rechercheAvancee.removeGroup"),void 0,{left:!0}]])])):e.createCommentVNode("",!0),e.createElementVNode("div",b3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.criteria,(D,I)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D.id},[I>0?(e.openBlock(),e.createElementBlock("div",g3,[e.createElementVNode("span",_3,e.toDisplayString(a.$t("rechercheAvancee.operatorAnd")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",h3,[e.createElementVNode("div",y3,[e.createElementVNode("span",f3,e.toDisplayString(a.$t(D.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([D.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(D.negation?a.$t("rechercheAvancee.mustNotContain"):a.$t("rechercheAvancee.mustContain")),3),e.createElementVNode("span",N3,e.toDisplayString(a.$t(D.operatorLabelKey)),1),e.createElementVNode("span",S3,e.toDisplayString(r.formatCriterionValueForDisplay(D)),1)]),e.createVNode(l,{icon:"ri-pencil-line",text:"",rounded:"",severity:"info",onClick:C=>r.startEditCriterion(O,I,D)},null,8,["onClick"]),e.createVNode(l,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger",onClick:C=>a.removeCriterionFromGroup(O,I)},null,8,["onClick"])])],64))),128))]),e.createVNode(l,{icon:"ri-add-line",label:a.$t("rechercheAvancee.addCriterionButton"),onClick:D=>r.openAddCriterionForGroup(O),class:"mt-2 w-full",outlined:"",size:"small"},null,8,["label","onClick"])],2)],64))),128))])),e.createElementVNode("div",E3,[a.criteriaGroups.groups.length===0?(e.openBlock(),e.createBlock(l,{key:0,icon:"ri-add-line",label:a.$t("rechercheAvancee.addCriterionButton"),onClick:r.handleAddFirstCriterion,class:"flex-1",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),a.criteriaGroups.groups.length>0?(e.openBlock(),e.createBlock(l,{key:1,icon:"ri-add-line",label:a.$t("rechercheAvancee.addOrGroup"),onClick:r.handleAddGroup,class:"flex-1",outlined:"",size:"small"},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),r.hasActiveCriteria?(e.openBlock(),e.createElementBlock("div",T3)):e.createCommentVNode("",!0),r.hasActiveCriteria?(e.openBlock(),e.createBlock(l,{key:3,icon:"ri-save-3-line",label:a.$t("rechercheAvancee.saveViewAsNew"),onClick:r.openSaveViewPopup,class:"w-full",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),r.canManageLoadedView?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(l,{icon:"ri-save-line",label:a.$t("rechercheAvancee.saveViewModifications"),onClick:r.modifyView,class:"mt-2 w-full"},null,8,["label","onClick"]),e.createElementVNode("a",{class:"delete-view-link",onClick:t[2]||(t[2]=(...T)=>r.deleteView&&r.deleteView(...T))},[t[18]||(t[18]=e.createElementVNode("i",{class:"ri-delete-bin-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(a.$t("rechercheAvancee.deleteView")),1)])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1},8,["class","value"]),e.createVNode(_,{visible:o.isAddLocationDialogVisible,"onUpdate:visible":t[9]||(t[9]=T=>o.isAddLocationDialogVisible=T),header:a.$t("rechercheAvancee.addLocationTitle"),modal:"",style:{width:"500px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("cancel"),icon:"ri-close-line",onClick:t[8]||(t[8]=T=>o.isAddLocationDialogVisible=!1),text:""},null,8,["label"]),e.createVNode(l,{label:a.$t("rechercheAvancee.addLocationConfirm"),icon:"ri-check-line",onClick:r.confirmAddLocation,disabled:!o.newLocation.type||!o.newLocation.value},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createElementVNode("div",O3,[e.createElementVNode("label",C3,e.toDisplayString(a.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(m,{modelValue:o.newLocation.negation,"onUpdate:modelValue":t[3]||(t[3]=T=>o.newLocation.negation=T),options:r.conditionOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",R3,[e.createElementVNode("label",I3,e.toDisplayString(a.$t("rechercheAvancee.locationTypeLabel")),1),e.createVNode(m,{modelValue:o.newLocation.type,"onUpdate:modelValue":t[4]||(t[4]=T=>o.newLocation.type=T),options:r.locationOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),o.newLocation.type?(e.openBlock(),e.createElementBlock("div",M3,[e.createElementVNode("label",v3,e.toDisplayString(a.$t("rechercheAvancee.valueLabel")),1),o.newLocation.type==="Site"?(e.openBlock(),e.createBlock(p,{key:0,modelValue:o.newLocationSiteInput,"onUpdate:modelValue":t[5]||(t[5]=T=>o.newLocationSiteInput=T),suggestions:o.filteredSites,optionLabel:"title",onComplete:r.searchSites,onItemSelect:r.handleNewLocationSiteSelect,placeholder:a.$t("rechercheAvancee.sitePlaceholder"),class:"w-full",forceSelection:""},null,8,["modelValue","suggestions","onComplete","onItemSelect","placeholder"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:o.newLocation.value,"onUpdate:modelValue":t[6]||(t[6]=T=>o.newLocation.value=T),placeholder:a.$t("rechercheAvancee.folderPlaceholder"),onClick:t[7]||(t[7]=T=>o.newLocation.type==="Folder"?o.isDossierTreeVisible=!0:null),readonly:"",class:"w-full cursor-pointer"},null,8,["modelValue","placeholder"]))])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]),e.createVNode(f,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":t[10]||(t[10]=T=>o.isAddCriterionDialogVisible=T),properties:r.availableProperties,"edit-criterion":o.editingCriterion,onAddCriterion:r.handleCriterionAdded,onUpdateCriterion:r.handleCriterionUpdated},null,8,["visible","properties","edit-criterion","onAddCriterion","onUpdateCriterion"]),e.createVNode(h,{visible:o.saveViewDialogVisible,"onUpdate:visible":t[11]||(t[11]=T=>o.saveViewDialogVisible=T),"view-data":r.viewToEdit,"error-message":o.saveViewError,"global-only":n.globalOnly,onSaveView:r.handleSaveView,onClearError:r.clearSaveViewError},null,8,["visible","view-data","error-message","global-only","onSaveView","onClearError"]),e.createVNode(_,{visible:o.isDossierTreeVisible,"onUpdate:visible":t[12]||(t[12]=T=>o.isDossierTreeVisible=T),header:a.$t("selectFolder"),modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(S,{"current-node":null,showUserHome:n.showUserHome,onSelectNode:r.handleDossierSelected},null,8,["showUserHome","onSelectNode"])]),_:1},8,["visible","header"]),e.createVNode(_,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":t[14]||(t[14]=T=>o.isDeleteConfirmVisible=T),header:a.$t("rechercheAvancee.confirmDeleteTitle"),modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(l,{label:a.$t("no"),icon:"ri-close-line",onClick:t[13]||(t[13]=T=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(l,{label:a.$t("yes"),icon:"ri-check-line",onClick:r.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",Z3,[t[19]||(t[19]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl"},null,-1)),a.loadedView?(e.openBlock(),e.createElementBlock("span",D3,e.toDisplayString(a.$t("rechercheAvancee.confirmDelete",{name:a.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"])],64)}const Lg=Se(QM,[["render",w3]]),W3={name:"FavoriteViewMenu",emits:["menuitem-click"],computed:{...Fe.mapState(ba,{model:"favoriteViews"})},methods:{...Fe.mapActions(ba,["fetchFavoriteViews"]),onMenuItemClick(a){this.$emit("menuitem-click",a)}},async mounted(){await this.fetchFavoriteViews()}},L3={class:"menuItem mt-3"},Y3={key:0},k3={class:"layout-menu"},x3={class:"overflow-hidden text-overflow-ellipsis white-space-nowrap"};function z3(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveDirective("ripple"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",L3,[e.createVNode(l,{to:"/vues"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("vuesFavorites.title")),1)]),_:1})]),a.model.length>0?(e.openBlock(),e.createElementBlock("div",Y3,[e.createElementVNode("ul",k3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.model,(d,u)=>(e.openBlock(),e.createElementBlock("li",{key:d.label||u,role:"none"},[e.withDirectives((e.openBlock(),e.createBlock(l,{"aria-label":d.label,to:d.to,class:"p-ripple flex",exact:"",role:"menuitem",onClick:b=>r.onMenuItemClick({originalEvent:b,item:d})},{default:e.withCtx(()=>[e.createElementVNode("span",x3,e.toDisplayString(d.label),1)]),_:2},1032,["aria-label","to","onClick"])),[[s],[c,d.label]])]))),128))])])):e.createCommentVNode("",!0)],64)}const Yg=Se(W3,[["render",z3],["__scopeId","data-v-90814edd"]]),G3={name:"ViewResultsPanel",components:{ComplexBreadcrumb:_o,PrimeButton:ce,PrimePaginator:Qn,PrimeProgressSpinner:ea},directives:{tooltip:Mt},props:{entries:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},totalRecords:{type:Number,default:0},rowsPerPage:{type:Number,default:25},showLocationActions:{type:Boolean,default:!0},workspaceRouteName:{type:String,default:"espace"},folderRouteName:{type:String,default:"espace-folder"},folderRouteParamName:{type:String,default:"folderId"},homeRoute:{type:[String,Object],default:()=>({name:"home"})}},data(){return{first:0}},emits:["page-change","select-node"],methods:{getNodeIcon(a){return Sa.getIcon(a)},buildBreadcrumbPath(a){if(!a.path||!a.path.elements)return[];const t=a.path.elements.filter(o=>o.name!=="Company Home"&&o.name!=="documentLibrary"&&o.nodeType!=="st:sites"&&o.nodeType!=="sys:container");let n=null;const i=t.map(o=>{const r={id:o.id,name:o.name,nodeType:o.nodeType,isFolder:o.nodeType==="cm:folder"||o.nodeType==="st:site"};return o.nodeType==="st:site"?(n=o.name,r.to={name:this.workspaceRouteName,params:{id:o.name}}):n?r.to={name:this.folderRouteName,params:{id:n,[this.folderRouteParamName]:o.id}}:r.to={},r});return i.unshift({nodeType:"home",to:typeof this.homeRoute=="string"?{name:this.homeRoute}:this.homeRoute}),i},getSiteElement(a){return!a.path||!a.path.elements?null:a.path.elements.find(t=>t.nodeType==="st:site")},getSiteName(a){const t=this.getSiteElement(a);return t?t.name:null},getParentName(a){if(!a.path||!a.path.elements)return"";const t=a.path.elements[a.path.elements.length-1];return t?t.name:""},addParentAsLocation(a,t){if(!a.path||!a.path.elements)return;const n=a.path.elements,i=n[n.length-1];if(!i)return;ba().addLocation({type:"Folder",value:`workspace://SpacesStore/${i.id}`,negation:t,label:i.name})},addSiteAsLocation(a,t){const n=this.getSiteElement(a);if(!n)return;ba().addLocation({type:"Site",value:n.name,negation:t,label:n.name})},formatDate(a){return a?new Date(a).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""},handlePageChange(a){this.first=a.first,this.$emit("page-change",a.first)},formatSize(a){if(!a||a===0)return"0 B";const t=["B","KB","MB","GB"];let n=0,i=a;for(;i>=1024&&n<t.length-1;)i/=1024,n++;return`${i.toFixed(n===0?0:1)} ${t[n]}`}}},F3={class:"view-results-panel"},X3={key:0,class:"flex justify-content-center align-items-center p-5"},P3={key:1,class:"text-center text-gray-500 p-5"},V3={class:"mt-2"},U3={key:2},j3={class:"result-main"},B3={key:0,class:"result-site-row"},H3={class:"result-site-badge"},J3={class:"result-header"},Q3=["title","onClick"],K3={key:1,class:"result-path-row"},q3={class:"result-meta"},$3={key:0,class:"meta-item"},ev={key:1,class:"meta-item"};function tv(a,t,n,i,o,r){const l=e.resolveComponent("PrimeProgressSpinner"),s=e.resolveComponent("PrimeButton"),c=e.resolveComponent("ComplexBreadcrumb"),d=e.resolveComponent("PrimePaginator"),u=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",F3,[n.loading?(e.openBlock(),e.createElementBlock("div",X3,[e.createVNode(l)])):n.entries.length===0?(e.openBlock(),e.createElementBlock("div",P3,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-search-line",style:{"font-size":"3rem"},"aria-hidden":"true"},null,-1)),e.createElementVNode("p",V3,e.toDisplayString(a.$t("rechercheAvancee.noResults")),1)])):(e.openBlock(),e.createElementBlock("div",U3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entries,b=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"view-result-item"},[e.createElementVNode("div",j3,[r.getSiteName(b)?(e.openBlock(),e.createElementBlock("div",B3,[e.createElementVNode("span",H3,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-building-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.getSiteName(b)),1)]),n.showLocationActions&&r.getSiteElement(b)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(s,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addSiteAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsIncludeSite",{name:r.getSiteName(b)})]]),e.withDirectives(e.createVNode(s,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addSiteAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsExcludeSite",{name:r.getSiteName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",J3,[e.createElementVNode("i",{class:e.normalizeClass([r.getNodeIcon(b),"result-icon"]),"aria-hidden":"true"},null,2),e.createElementVNode("a",{class:"result-name",title:b.name,onClick:m=>a.$emit("select-node",b)},e.toDisplayString(b.name),9,Q3)]),b.path&&b.path.elements?(e.openBlock(),e.createElementBlock("div",K3,[e.createVNode(c,{path:r.buildBreadcrumbPath(b),"show-actions":!1,"show-home":!1,"is-in-search":!0,mode:"auto","home-route":n.homeRoute,"workspace-route-name":n.workspaceRouteName,"folder-route-name":n.folderRouteName,class:"result-breadcrumb"},null,8,["path","home-route","workspace-route-name","folder-route-name"]),n.showLocationActions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(s,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addParentAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsIncludeFolder",{name:r.getParentName(b)})]]),e.withDirectives(e.createVNode(s,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(m=>r.addParentAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[u,a.$t("rechercheAvancee.addAsExcludeFolder",{name:r.getParentName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",q3,[b.modifiedAt?(e.openBlock(),e.createElementBlock("span",$3,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-time-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.formatDate(b.modifiedAt)),1)])):e.createCommentVNode("",!0),b.content&&b.content.sizeInBytes?(e.openBlock(),e.createElementBlock("span",ev,[t[3]||(t[3]=e.createElementVNode("i",{class:"ri-hard-drive-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(r.formatSize(b.content.sizeInBytes)),1)])):e.createCommentVNode("",!0)])])]))),128)),e.createVNode(d,{first:o.first,rows:n.rowsPerPage,"total-records":n.totalRecords,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",onPage:r.handlePageChange},null,8,["first","rows","total-records","onPage"])]))])}const kg=Se(G3,[["render",tv],["__scopeId","data-v-0cfc30de"]]),av={class:"save-as-form"},nv={class:"form-field"},iv={for:"filename"},ov={class:"form-field"},rv={for:"location"},lv={class:"input-group"},sv={key:0,class:"explorer-container"},cv=Se({__name:"SaveAsPopup",props:{visible:Boolean,defaultFilename:{type:String,default:null},parentFolderNode:{type:Object,default:null}},emits:["close","save"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=a,o=t,r=e.ref(""),l=e.ref(null),s=e.ref(!1),c=e.ref(null),d=e.ref(""),u=()=>{r.value=i.defaultFilename||n("pdfTools.saveAs.defaultFilename"),l.value=i.parentFolderNode,c.value=i.parentFolderNode?.id,d.value=i.parentFolderNode?.name,s.value=!1},b=async p=>{if(!(!p||!p.isFolder)){if(p.name==="documentLibrary")if(c.value=p.id,p.parentId)try{const g=await Re.getNode(p.parentId);d.value=g.properties["cm:title"]||g.name}catch(g){console.error("Could not fetch parent node name",g),d.value=p.name}else d.value=p.name;else c.value=p.id,d.value=p.name;s.value=!1}},m=()=>{c.value&&o("save",{filename:r.value,folderId:c.value})};return(p,g)=>(e.openBlock(),e.createBlock(e.unref(_t),{visible:a.visible,modal:"",header:p.$t("pdfTools.saveAs.title"),class:"dialog-save-as","onUpdate:visible":g[3]||(g[3]=_=>p.$emit("close")),onShow:u},{footer:e.withCtx(()=>[e.createVNode(e.unref(ce),{label:p.$t("pdfTools.common.cancel"),icon:"ri-close-line",text:"",onClick:g[2]||(g[2]=_=>p.$emit("close"))},null,8,["label"]),e.createVNode(e.unref(ce),{label:p.$t("pdfTools.common.save"),icon:"ri-check-line",onClick:m,disabled:!r.value||!c.value},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",av,[e.createElementVNode("div",nv,[e.createElementVNode("label",iv,e.toDisplayString(p.$t("pdfTools.saveAs.filenameLabel")),1),e.createVNode(e.unref(at),{id:"filename",modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=_=>r.value=_)},null,8,["modelValue"])]),e.createElementVNode("div",ov,[e.createElementVNode("label",rv,e.toDisplayString(p.$t("pdfTools.saveAs.folderLabel")),1),e.createElementVNode("div",lv,[e.createVNode(e.unref(at),{id:"location",readonly:"",value:d.value},null,8,["value"]),e.createVNode(e.unref(ce),{icon:s.value?"ri-arrow-up-s-line":"ri-arrow-down-s-line",label:p.$t("pdfTools.saveAs.browse"),onClick:g[1]||(g[1]=_=>s.value=!s.value)},null,8,["icon","label"])])]),s.value?(e.openBlock(),e.createElementBlock("div",sv,[e.createVNode(en,{"current-node":l.value,"show-user-home":"","show-files":!1,onSelectNode:b},null,8,["current-node"])])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]))}},[["__scopeId","data-v-6d10b1e7"]]),dv={class:"pdf-tools-page"},mv={key:0},pv={key:0,class:"loading-container"},uv={key:1,class:"error-container"},bv={key:2,class:"pdf-editor-layout"},gv={class:"pdf-tools-sidebar"},_v={class:"card"},hv={class:"sidebar-form"},yv={class:"form-field"},fv={class:"form-field form-field--spaced"},Nv={class:"form-field form-field--spaced"},Sv={class:"insert-buttons"},Ev={class:"form-field form-field--spaced"},Tv={class:"watermark-grid"},Av={class:"pdf-preview-container"},Ov=["onClick","onDblclick"],Cv={class:"page-selection"},Rv={class:"page-actions"},Iv={class:"thumbnail-content"},Mv={class:"page-number"},vv={class:"dialog-header"},Zv={class:"page-editor-toolbar"},Dv={class:"zoom-indicator"},wv={class:"editor-layout"},Wv={class:"tool-group"},Lv={key:0,class:"text-settings"},Yv={class:"form-field"},kv={class:"form-label"},xv={class:"form-field"},zv={class:"form-label"},Gv={class:"form-field"},Fv={class:"form-label"},Xv={class:"editor-footer"},Pv={class:"dialog-header"},Vv={class:"signature-pad"},Uv={class:"dialog-footer-buttons"},jv={class:"search-input-group"},Bv={key:0,class:"inline-status"},Hv={key:1,class:"text-muted"},Jv={key:2,class:"favorites-layout"},Qv={class:"favorites-list"},Kv=["onClick"],qv={class:"item-content"},$v={class:"text-ellipsis"},eZ={class:"favorites-preview"},tZ={key:0,class:"preview-placeholder"},aZ={class:"text-muted"},nZ={key:1,class:"preview-placeholder"},iZ={class:"text-muted"},oZ={key:2,class:"preview-wrapper"},rZ={key:0,class:"preview-controls"},lZ={class:"page-info"},sZ={class:"preview-content"},cZ={key:0,class:"inline-status"},dZ={key:1,class:"text-muted"},mZ={key:2,class:"favorites-layout"},pZ={class:"favorites-list"},uZ=["onClick"],bZ={class:"item-content"},gZ={class:"text-ellipsis"},_Z={class:"favorites-preview"},hZ={key:0,class:"preview-placeholder"},yZ={class:"text-muted"},fZ={key:1,class:"preview-placeholder"},NZ={class:"text-muted"},SZ={key:2,class:"preview-wrapper"},EZ={key:0,class:"preview-controls"},TZ={class:"page-info"},AZ={class:"preview-content"},OZ={class:"sidebar-form"},CZ={class:"form-field"},RZ={for:"alfrescoNodeId"},IZ={class:"form-hint"},MZ={class:"insert-footer"},vZ={class:"insert-footer-info"},ZZ={key:0,class:"selected-info"},DZ={class:"selected-label"},wZ={class:"selected-name"},WZ={key:1,class:"error-msg"},LZ={class:"insert-footer-actions"},xg=Se({__name:"PdfToolsComponent",props:{toast:{type:Object,required:!0},id:{type:String,required:!0}},setup(a){const{t}=ta.useI18n(),n=a,i=e.ref(null),o=e.ref(null),r=e.ref([]),l=e.ref(!0),s=e.ref(null),c=e.ref(null),d=e.ref([]),u=e.ref(!1),b=e.ref(null),m=e.ref(1),p={SELECT:"select",REDACT:"redact",HIGHLIGHT:"highlight",COMMENT:"comment",IMAGE:"image",SIGNATURE:"signature",TEXT:"text"},g=e.ref(p.SELECT),_=e.ref([]),f=e.ref(null),h=e.ref(null),S=e.ref(null),y=e.ref(null),T=e.ref(!1),O=e.ref(null);let D=!1,I=null,C=!1,A=null;const w=e.ref(""),X=e.ref(-45),R=e.ref(5),Y=[{label:"Helvetica",value:"Helvetica"},{label:"Times New Roman",value:"TimesRoman"},{label:"Courier",value:"Courier"}],N=e.ref("Helvetica"),V=e.ref(18),le=e.ref("#000000"),Q=e.ref(null),fe=e.ref(!1),K=e.ref(null),ee=e.ref(""),G=e.ref(""),P=e.ref(null),pe=e.ref(null),U=e.ref(!1),B=e.ref(""),de=e.ref(""),ne=e.ref(null),se=e.computed(()=>B.value&&ze(B.value)?!0:!!(ne.value&&ne.value.id)),ge=e.ref(""),Ne=e.ref([]),Ce=e.ref(!1),Ye=e.ref(!1),Ue=e.ref([]),E=e.ref(!1),te=e.ref(!1),J=e.ref(null),{pdf:W}=Ya.usePDF(J),M=e.ref(1),L=e.ref(0),k=e.ref(null),{pdf:j}=Ya.usePDF(k);e.onMounted(()=>{const Z=n.id;Z?re(Z):(s.value=t("pdfTools.loadError"),l.value=!1)});const z=Z=>d.value.some(F=>F.pageIndex===Z.pageIndex),ae=Z=>{c.value=Z;const F=d.value.findIndex(q=>q.pageIndex===Z.pageIndex);F>-1?d.value.splice(F,1):d.value.push(Z)},re=async Z=>{l.value=!0,s.value=null;try{const F=await Re.getNode(Z);P.value=F,Q.value=F.parentId,G.value=F&&(F.name||F.properties&&F.properties["cm:name"])||"";const q=It.getContentUrl(Z);k.value=q;const H=await fetch(q);if(!H.ok)throw new Error(`HTTP error! status: ${H.status}`);const he=await H.arrayBuffer();o.value=new Uint8Array(he),await oe(o.value),r.value.length>0&&(c.value=r.value[0])}catch(F){console.error("Error loading PDF from Alfresco:",F),s.value=t("pdfTools.loadError")}finally{l.value=!1}},oe=async Z=>{i.value=await pt.PDFDocument.load(Z);const F=i.value.getPageCount();r.value=Array.from({length:F},(q,H)=>({pageIndex:H,pageNumber:H+1}))},be=async(Z,{updatePages:F=!0}={})=>{const q=await Z.save();o.value=q;const H=new Blob([q],{type:"application/pdf"});k.value&&k.value.startsWith("blob:")&&URL.revokeObjectURL(k.value),k.value=URL.createObjectURL(H),F&&await oe(q)},Xe=async()=>{if(o.value){l.value=!0;try{const Z=await pt.PDFDocument.create(),F=r.value.map(he=>he.pageIndex),q=await pt.PDFDocument.load(o.value);(await Z.copyPages(q,F)).forEach(he=>Z.addPage(he)),await be(Z)}catch(Z){console.error("Error reordering pages:",Z),s.value=t("pdfTools.reorderError")}finally{l.value=!1}}},ve=async Z=>{if(o.value){l.value=!0;try{const F=await pt.PDFDocument.load(o.value),q=F.getPage(Z.pageIndex),H=q.getRotation().angle;q.setRotation({type:pt.RotationTypes.Degrees,angle:(H+90)%360}),await be(F,{updatePages:!1})}catch(F){console.error("Error rotating page:",F),s.value=t("pdfTools.rotateError")}finally{l.value=!1}}},dt=async()=>{if(d.value.length===0||!o.value)return null;const Z=await pt.PDFDocument.create(),F=await pt.PDFDocument.load(o.value),q=d.value.map(he=>he.pageIndex).sort((he,$)=>he-$);return(await Z.copyPages(F,q)).forEach(he=>Z.addPage(he)),await Z.save()},At=async()=>{if(!(!o.value||d.value.length===0)){if(d.value.length===r.value.length){n.toast.add({severity:"warn",summary:t("pdfTools.common.warning"),detail:t("pdfTools.deleteAllPagesWarning"),life:3e3});return}l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=Z.getPageCount(),q=new Set(d.value.map(Oe=>Oe.pageIndex)),H=[];for(let Oe=0;Oe<F;Oe++)q.has(Oe)||H.push(Oe);const he=await pt.PDFDocument.create();(await he.copyPages(Z,H)).forEach(Oe=>he.addPage(Oe)),await be(he),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.deleted"),detail:t("pdfTools.pagesDeletedSuccess"),life:3e3})}catch(Z){console.error("Error deleting pages:",Z),s.value=t("pdfTools.deletePagesError")}finally{l.value=!1}}},mt=async()=>{B.value="",ne.value=null,de.value="",U.value=!0},me=Z=>{Z===2&&Ue.value.length===0&&!E.value&&tt()},ue=async()=>{let Z=null;if(ne.value?.id?Z=ne.value.id:B.value&&(Z=ze(B.value)),!Z){n.toast.add({severity:"warn",summary:t("pdfTools.common.warning"),detail:t("pdfTools.insertFromAlfresco.invalidInput"),life:3e3});return}await sa(Z),U.value=!1},ze=Z=>{if(!Z)return null;const F=Z.trim();if(/^[0-9a-fA-F-]{20,}$/.test(F))return F;const q=F.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);if(q&&q[1])return q[1];const H=F.match(/\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/);if(H&&H[2])return H[2];const he=F.match(/#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/);if(he&&he[1])return he[1];const $=F.match(/([0-9a-fA-F]{20,})/);return $&&$[1]?$[1]:null},He=async Z=>{if(Z?.content?.mimeType==="application/pdf"&&(ne.value=Z,de.value="",Z?.id)){te.value=!0,M.value=1,L.value=0;try{const F=It.getContentUrl(Z.id);J.value&&J.value.startsWith("blob:")&&URL.revokeObjectURL(J.value),J.value=F}catch(F){console.error("Error loading PDF preview:",F),J.value=null}finally{te.value=!1}}},st=()=>{M.value<L.value&&M.value++},Pt=()=>{M.value>1&&M.value--},Vt=Z=>{de.value="",Z.isFolder?(ne.value=null,de.value=t("pdfTools.insertFromAlfresco.folderSelectError")):Z.content?.mimeType!=="application/pdf"?(ne.value=null,de.value=t("pdfTools.insertFromAlfresco.fileTypeNotAllowedError")):He(Z)},jt=async()=>{if(Ye.value=!0,!ge.value||ge.value.trim().length<2){Ne.value=[];return}Ce.value=!0;try{const Z=Ci();await Z.queryStore(ge.value);const F=Z.entries.map(q=>q.entry||q);Ne.value=F.filter(q=>q.isFile&&q.content?.mimeType==="application/pdf")}catch(Z){console.error("performSearch",Z),Ne.value=[]}finally{Ce.value=!1}},tt=async()=>{E.value=!0;try{const Z=Wn();await Z.loadFavorites(),Ue.value=Z.fileFavorites.filter(F=>F?.target?.file?.content?.mimeType==="application/pdf").map(F=>F.target.file)}catch(Z){console.error("loadFavorites error:",Z),Ue.value=[]}finally{E.value=!1}},sa=async Z=>{if(o.value){l.value=!0;try{if((await Re.getNode(Z)).content?.mimeType!=="application/pdf")throw new Error(t("pdfTools.invalidNodeForInsert"));const H=await(await Re.getNodeContent(Z)).arrayBuffer(),he=new Uint8Array(H),$=await pt.PDFDocument.load(o.value),Oe=await pt.PDFDocument.load(he),Be=Oe.getPageCount(),$e=Array.from({length:Be},(St,ct)=>ct);(await $.copyPages(Oe,$e)).forEach(St=>$.addPage(St)),await be($),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.insertFromPristySuccess",{count:Be}),life:3e3})}catch(F){console.error("Error inserting from Alfresco:",F),s.value=F?.message||t("pdfTools.insertFromPristyError"),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:s.value,life:4e3})}finally{l.value=!1}}},Lt=async Z=>{const F=Z.files?.[0];F&&await kt(F)},kt=async Z=>{if(o.value){l.value=!0;try{const F=await pt.PDFDocument.load(o.value),q=new Uint8Array(await Z.arrayBuffer()),H=await pt.PDFDocument.load(q),he=H.getPageCount(),$=Array.from({length:he},(Be,$e)=>$e);(await F.copyPages(H,$)).forEach(Be=>F.addPage(Be)),await be(F),d.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.insertFromFileSuccess",{count:he}),life:3e3})}catch(F){console.error("Error inserting PDF:",F),s.value=t("pdfTools.insertError")}finally{l.value=!1}}},x=async()=>{if(!(!w.value||d.value.length===0||!o.value)){l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=d.value.map(q=>q.pageIndex);for(const q of F){const H=Z.getPage(q),{width:he,height:$}=H.getSize();for(let Oe=0;Oe<R.value;Oe++)H.drawText(w.value,{x:he/(R.value+1)*(Oe+1)-150,y:$/(R.value+1)*(Oe+1),size:50,color:pt.rgb(.95,.1,.1),opacity:.5,rotate:pt.degrees(X.value)})}await be(Z,{updatePages:!1})}catch(Z){console.error("Error adding watermark:",Z),s.value=t("pdfTools.watermarkError")}finally{l.value=!1}}},ie=async()=>{if(o.value){l.value=!0;try{const Z=new Blob([o.value],{type:"application/pdf"}),F=new File([Z],"modified.pdf",{type:"application/pdf"}),q={majorVersion:!0,comment:"File modified via Pristy Espaces PDF tools"};await Re.updateContentNode(n.id,F,q),n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.saveSuccess"),life:3e3})}catch(Z){console.error("Error saving changes:",Z),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:t("pdfTools.saveError"),life:3e3})}finally{l.value=!1}}},Te=async Z=>{if(K.value=Z,ee.value=t("pdfTools.saveAs.defaultFilename"),P.value&&P.value.parentId)try{pe.value=await Re.getNode(P.value.parentId)}catch(F){console.error("Could not fetch parent node for Save As dialog",F),pe.value=null}else pe.value=null;fe.value=!0},Pe=async({filename:Z,folderId:F})=>{fe.value=!1,l.value=!0;try{let q;if(K.value==="extract"?q=await dt():q=o.value,!q)throw new Error(t("pdfTools.noContentToSave"));const H=new Blob([q],{type:"application/pdf"}),he=new File([H],Z,{type:"application/pdf"});if(!F)throw new Error("No destination folder selected.");await It.uploadFile(F,{},he),n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.fileCreatedSuccess",{filename:Z}),life:3e3})}catch(q){console.error('Error during "Save As":',q);const H=q.status===409?t("pdfTools.saveAs.conflictError"):t("pdfTools.saveAsError");n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:H,life:4e3})}finally{l.value=!1}},ut=Z=>{b.value=Z||c.value,u.value=!0,m.value=1,_.value=[],setTimeout(Ra,200)},bt=()=>{u.value=!1,b.value=null},Ze=()=>{m.value=Math.min(4,m.value+.1)},Me=()=>{m.value=Math.max(.2,m.value-.1)},xe=Z=>{Z===p.REDACT?window.confirm(t("pdfTools.redactWarning"))&&(g.value=Z):g.value=Z},Ct=Z=>{f.value=Z.files?.[0]||null,f.value&&(h.value=null,g.value=p.IMAGE)},ft=()=>{T.value=!0},Ua=()=>{_.value.pop(),Bt()},nn=async Z=>{if(!(!Z||Z.type!==p.IMAGE||Z._loading||Z._bitmap)){Z._loading=!0;try{let F=null;Z.payload?.file?F=Z.payload.file:Z.payload?.signature&&(F=new Blob([new Uint8Array(Z.payload.signature)],{type:"image/png"})),F&&(Z._bitmap=await createImageBitmap(F),Bt())}catch(F){console.warn(t("pdfTools.imagePreviewUnavailable"),F)}finally{Z._loading=!1}}},on=()=>{const Z=S.value;if(!Z)return null;const F=Array.from(Z.querySelectorAll("canvas"));if(F.length===0)return null;const q=F.filter(Oe=>Oe.offsetParent!==null&&Oe.width>0&&Oe.height>0),H=q.length?q:F;let he=H[0],$=0;for(const Oe of H){const Be=Oe.getBoundingClientRect(),$e=Math.max(0,Be.width)*Math.max(0,Be.height);$e>$&&(he=Oe,$=$e)}return he},Ra=()=>{const Z=on();if(!Z||!y.value)return;const F=Z.getBoundingClientRect(),q=window.devicePixelRatio||1;y.value.style.width=F.width+"px",y.value.style.height=F.height+"px",y.value.width=Math.round(F.width*q),y.value.height=Math.round(F.height*q),Bt()},ha=Z=>{const F=y.value;if(!F)return{x:0,y:0};const q=F.getBoundingClientRect(),H=window.devicePixelRatio||1;return{x:(Z.clientX-q.left)*H,y:(Z.clientY-q.top)*H}};let wa=null,Kt=null,ja=null,ya=null;const rn=Z=>{for(let F=_.value.length-1;F>=0;F--){const q=_.value[F].rect;if(Z.x>=q.x&&Z.x<=q.x+q.w&&Z.y>=q.y&&Z.y<=q.y+q.h)return F}return-1},zi=Z=>{const H=6*(window.devicePixelRatio||1)/2;for(let he=_.value.length-1;he>=0;he--){const $=_.value[he];if($.type!==p.IMAGE&&$.type!==p.TEXT)continue;const Oe=$.rect,Be=[{key:"tl",x:Oe.x,y:Oe.y},{key:"tr",x:Oe.x+Oe.w,y:Oe.y},{key:"bl",x:Oe.x,y:Oe.y+Oe.h},{key:"br",x:Oe.x+Oe.w,y:Oe.y+Oe.h}];for(const $e of Be)if(Z.x>=$e.x-H&&Z.x<=$e.x+H&&Z.y>=$e.y-H&&Z.y<=$e.y+H)return{idx:he,corner:$e.key}}return null},Gi=Z=>{if(g.value===p.REDACT||g.value===p.HIGHLIGHT||g.value===p.TEXT)C=!0,A=ha(Z);else if(g.value===p.COMMENT){const F=ha(Z),q=window.prompt(t("pdfTools.pageEditor.commentPrompt"));q&&(_.value.push({type:p.COMMENT,rect:{x:F.x,y:F.y,w:24,h:24},payload:{text:q}}),Bt())}else if(g.value===p.IMAGE||g.value===p.SELECT||g.value===p.TEXT){const F=ha(Z),q=zi(F);if(q){ja=q.idx,ya=q.corner,Kt={p:F,rect:{..._.value[q.idx].rect}},y.value&&(y.value.style.cursor="nwse-resize");return}const H=rn(F);if(H!==-1&&(_.value[H].type===p.IMAGE||_.value[H].type===p.TEXT)){wa=H,Kt={p:F,rect:{..._.value[H].rect}},y.value&&(y.value.style.cursor="move");return}if(g.value===p.IMAGE){if(!f.value&&!h.value)return;const he={type:p.IMAGE,rect:{x:F.x,y:F.y,w:150,h:100},payload:{file:f.value,signature:h.value}};_.value.push(he),nn(he),Bt(),g.value=p.SELECT,f.value=null,h.value=null}}},Fi=Z=>{if(ja!==null&&ya){const q=ha(Z),H=_.value[ja];if(H){const he=Kt.rect;let $=he.x,Oe=he.y,Be=he.w,$e=he.h;const De=q.x-Kt.p.x,St=q.y-Kt.p.y;ya==="br"?(Be=Math.max(10,he.w+De),$e=Math.max(10,he.h+St)):ya==="tr"?(Be=Math.max(10,he.w+De),$e=Math.max(10,he.h-St),Oe=he.y+St):ya==="bl"?(Be=Math.max(10,he.w-De),$=he.x+De,$e=Math.max(10,he.h+St)):ya==="tl"&&(Be=Math.max(10,he.w-De),$=he.x+De,$e=Math.max(10,he.h-St),Oe=he.y+St),H.rect.x=$,H.rect.y=Oe,H.rect.w=Be,H.rect.h=$e,Bt()}return}if(wa!==null){const q=ha(Z),H=_.value[wa];if(H){const he=q.x-Kt.p.x,$=q.y-Kt.p.y;H.rect.x=Kt.rect.x+he,H.rect.y=Kt.rect.y+$,Bt()}return}if(!C||!A)return;const F=ha(Z);ca.value={x:Math.min(A.x,F.x),y:Math.min(A.y,F.y),w:Math.abs(F.x-A.x),h:Math.abs(F.y-A.y)},Bt()},fa=()=>{if(wa!==null||ja!==null){wa=null,ja=null,ya=null,Kt=null,y.value&&(y.value.style.cursor="crosshair"),Bt();return}if(C&&ca.value)if(g.value===p.TEXT){const Z=window.prompt(t("pdfTools.pageEditor.addTextPrompt"));Z&&Z.trim().length>0&&_.value.push({type:p.TEXT,rect:{...ca.value},payload:{text:Z,font:N.value,size:V.value,color:le.value}})}else _.value.push({type:g.value,rect:{...ca.value}});C=!1,A=null,ca.value=null,Bt()},Un=()=>{C&&(C=!1,A=null,ca.value=null,Bt())},ca=e.ref(null),Bt=()=>{const Z=wa,F=y.value;if(!F)return;const q=F.getContext("2d"),H=window.devicePixelRatio||1;q.clearRect(0,0,F.width,F.height);const he=($,Oe)=>{if($.type===p.REDACT)q.fillStyle="rgba(0,0,0,1)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle="rgba(0,0,0,1)",q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h);else if($.type===p.HIGHLIGHT)q.fillStyle="rgba(255, 235, 59, 0.4)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle="rgba(255, 193, 7, 0.8)",q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h);else if($.type===p.COMMENT)Vi(q,$.rect.x,$.rect.y,20*H);else if($.type===p.IMAGE){if(nn($),$._bitmap&&q.drawImage($._bitmap,$.rect.x,$.rect.y,$.rect.w,$.rect.h),q.strokeStyle=Oe===Z?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=Oe===Z?2*H:1*H,q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),Oe===Z){q.fillStyle="#0ea5e9";const Be=6*H,$e=Be/2;[[$.rect.x,$.rect.y],[$.rect.x+$.rect.w,$.rect.y],[$.rect.x,$.rect.y+$.rect.h],[$.rect.x+$.rect.w,$.rect.y+$.rect.h]].forEach(([St,ct])=>{q.fillRect(St-$e,ct-$e,Be,Be)})}}else if($.type===p.TEXT){const Be=$.payload||{},$e=Math.max(8,Be.size||18);q.save(),q.fillStyle="rgba(255,255,255,0.35)",q.fillRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),q.fillStyle=Be.color||"#000",q.font=`${$e}px ${Be.font||"Helvetica"}`,q.textBaseline="top";const De=4*H,St=Math.max(0,$.rect.w-2*De),ct=Xi(q,String(Be.text||""),St);let et=$.rect.y+De;for(const xt of ct)if(q.fillText(xt,$.rect.x+De,et),et+=$e*1.2,et>$.rect.y+$.rect.h-De)break;if(q.strokeStyle=Oe===Z?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=Oe===Z?2*H:1*H,q.strokeRect($.rect.x,$.rect.y,$.rect.w,$.rect.h),Oe===Z){q.fillStyle="#0ea5e9";const xt=6*H,zt=xt/2;[[$.rect.x,$.rect.y],[$.rect.x+$.rect.w,$.rect.y],[$.rect.x,$.rect.y+$.rect.h],[$.rect.x+$.rect.w,$.rect.y+$.rect.h]].forEach(([rt,Ee])=>{q.fillRect(rt-zt,Ee-zt,xt,xt)})}q.restore()}};if(_.value.forEach(he),ca.value){const $=ca.value;q.setLineDash([6*H,4*H]),q.strokeStyle=g.value===p.REDACT?"black":"goldenrod",q.strokeRect($.x,$.y,$.w,$.h),q.setLineDash([])}},Xi=(Z,F,q)=>{const H=F.split(/\s+/),he=[];let $="";for(const Oe of H){const Be=$?$+" "+Oe:Oe;Z.measureText(Be).width<=q||$===""?$=Be:(he.push($),$=Oe)}return $&&he.push($),he},Pi=Z=>{let F=Z.toString().trim();F.startsWith("#")&&(F=F.slice(1)),F.length===3&&(F=F.split("").map(Oe=>Oe+Oe).join(""));const q=parseInt(F||"000000",16),H=(q>>16&255)/255,he=(q>>8&255)/255,$=(q&255)/255;return{r:H,g:he,b:$}},ln=(Z,F,q,H)=>{const he=String(F).split(/\s+/),$=[];let Oe="";for(const Be of he){const $e=Oe?Oe+" "+Be:Be;Z.widthOfTextAtSize($e,q)<=H||Oe===""?Oe=$e:($.push(Oe),Oe=Be)}return Oe&&$.push(Oe),$},Vi=(Z,F,q,H)=>{Z.save(),Z.translate(F,q),Z.fillStyle="#FFEB3B",Z.strokeStyle="#FBC02D",Z.lineWidth=2,Z.beginPath(),Z.rect(0,0,H,H),Z.fill(),Z.stroke(),Z.beginPath(),Z.moveTo(H*.6,0),Z.lineTo(H,H*.4),Z.lineTo(H*.6,H*.4),Z.closePath(),Z.fillStyle="#FDD835",Z.fill(),Z.restore()},_e=async()=>{if(!(!o.value||!b.value)){l.value=!0;try{const Z=await pt.PDFDocument.load(o.value),F=b.value.pageIndex;let q=Z.getPage(F);const{width:H,height:he}=q.getSize(),$=on();if(!$)throw new Error(t("pdfTools.pdfRenderCanvasNotFound"));if(_.value.some(rt=>rt.type===p.REDACT)){if(!window.confirm(t("pdfTools.redactFlattenConfirm"))){l.value=!1;return}const Ee=Math.max(2,Math.ceil($.width/$.getBoundingClientRect().width||window.devicePixelRatio||1)),Ie=document.createElement("canvas"),Ve=$.width/$.height;Ie.width=Math.round($.width*Ee),Ie.height=Math.round($.height*Ee);const Ke=Ie.getContext("2d");Ke.imageSmoothingEnabled=!1,Ke.drawImage($,0,0,$.width,$.height,0,0,Ie.width,Ie.height);const Et=Ie.toDataURL("image/jpeg",.5),Gt=await(await fetch(Et)).arrayBuffer(),Cn=await Z.embedJpg(Gt),Ba=Z.insertPage(F+1,[H,he]);Ba.drawImage(Cn,{x:0,y:0,width:H,height:he}),q=Ba}const Be=$.getBoundingClientRect(),$e=$.width,De=$.height,St=window.devicePixelRatio||1,ct=$e/Be.width,et=De/Be.height,xt=H/$e,zt=he/De;for(const rt of _.value){const Ee=rt.rect.x/St,Ie=rt.rect.y/St,Ve=rt.rect.w/St,Ke=rt.rect.h/St,Et=Ee*ct,Gt=Ie*et,Cn=Ve*ct,Ba=Ke*et,Hn=Cn*xt,Rn=Ba*zt,In=Et*xt,cn=he-(Gt+Ba)*zt;if(rt.type===p.REDACT)q.drawRectangle({x:In,y:cn,width:Hn,height:Rn,color:pt.rgb(0,0,0)});else if(rt.type===p.HIGHLIGHT)q.drawRectangle({x:In,y:cn,width:Hn,height:Rn,color:pt.rgb(1,.92,.23),opacity:.4});else if(rt.type===p.COMMENT){if(q.drawRectangle({x:In,y:cn,width:Math.max(14,Hn),height:Math.max(14,Rn),color:pt.rgb(1,.92,.23),opacity:.9}),rt.payload?.text){const qt=String(rt.payload.text).slice(0,200);q.drawText(`Note: ${qt}`,{x:In+2,y:cn+Rn+2,size:8,color:pt.rgb(.2,.2,.2)})}}else if(rt.type===p.IMAGE){let qt=null;if(rt.payload?.file?qt=await rt.payload.file.arrayBuffer():rt.payload?.signature&&(qt=rt.payload.signature),qt){let Jn;try{Jn=await Z.embedPng(qt)}catch{Jn=await Z.embedJpg(qt)}q.drawImage(Jn,{x:In,y:cn,width:Hn,height:Rn,opacity:.98})}}else if(rt.type===p.TEXT){const qt=rt.payload||{},Jn=qt.font==="TimesRoman"?pt.StandardFonts.TimesRoman:qt.font==="Courier"?pt.StandardFonts.Courier:pt.StandardFonts.Helvetica,u_=await Z.embedFont(Jn),Ui=Math.max(6,Number(qt.size)||18),{r:xk,g:zk,b:Gk}=Pi(qt.color||"#000000"),xc=2,Fk=Math.max(1,Hn-2*xc),Xk=ln(u_,String(qt.text||""),Ui,Fk);let zc=cn+Rn-Ui-xc;for(const Pk of Xk)if(q.drawText(Pk,{x:In+xc,y:zc,size:Ui,color:pt.rgb(xk,zk,Gk)}),zc-=Ui*1.2,zc<cn)break}}const Wa=_.value.some(rt=>rt.type===p.REDACT);Wa&&Z.removePage(F),await be(Z,{updatePages:Wa}),_.value=[],n.toast.add({severity:"success",summary:t("pdfTools.common.success"),detail:t("pdfTools.pageEditor.applySuccess"),life:2e3})}catch(Z){console.error("Error applying overlay edits:",Z),n.toast.add({severity:"error",summary:t("pdfTools.common.error"),detail:t("pdfTools.pageEditor.applyError"),life:3e3})}finally{l.value=!1}}};e.watch(m,()=>setTimeout(Ra,0)),e.watch(b,()=>setTimeout(Ra,0)),typeof window<"u"&&window.addEventListener("resize",()=>setTimeout(Ra,0));const We=()=>{m.value=1,setTimeout(Ra,0)},Je=()=>{const Z=O.value;if(!Z)return;const F=window.devicePixelRatio||1,q=440,H=180;Z.style.width=q+"px",Z.style.height=H+"px",Z.width=Math.round(q*F),Z.height=Math.round(H*F);const he=Z.getContext("2d");he.fillStyle="#fff",he.fillRect(0,0,Z.width,Z.height)},ot=()=>{On(),T.value=!1},Nt=Z=>{D=!0,I=Ht(Z)},Ut=Z=>{if(!D)return;const F=Ht(Z);jn(I,F),I=F},Na=Z=>Nt(Z.touches[0]),sn=Z=>Ut(Z.touches[0]),Zt=()=>{D=!1,I=null},Ht=Z=>{const q=O.value.getBoundingClientRect(),H=window.devicePixelRatio||1,he=Z.clientX??Z.pageX,$=Z.clientY??Z.pageY;return{x:(he-q.left)*H,y:($-q.top)*H}},jn=(Z,F)=>{const H=O.value.getContext("2d");H.strokeStyle="#111827",H.lineWidth=3*(window.devicePixelRatio||1),H.lineCap="round",H.beginPath(),H.moveTo(Z.x,Z.y),H.lineTo(F.x,F.y),H.stroke()},On=()=>{const Z=O.value;if(!Z)return;const F=Z.getContext("2d");F.fillStyle="#fff",F.fillRect(0,0,Z.width,Z.height)},Bn=()=>{const Z=O.value;Z&&Z.toBlob(async F=>{h.value=await F.arrayBuffer(),g.value=p.IMAGE,T.value=!1})};return e.watch(T,Z=>{Z&&setTimeout(Je,0)}),e.watch(W,async Z=>{if(!Z){L.value=0;return}try{const F=await Z;L.value=F.numPages}catch(F){console.error("Error loading preview PDF:",F),L.value=0}}),(Z,F)=>{const q=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",dv,[e.createElementVNode("h1",null,[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.title"))+" ",1),G.value?(e.openBlock(),e.createElementBlock("span",mv,"— "+e.toDisplayString(G.value),1)):e.createCommentVNode("",!0)]),l.value?(e.openBlock(),e.createElementBlock("div",pv,[e.createVNode(e.unref(ea)),e.createElementVNode("p",null,e.toDisplayString(Z.$t("pdfTools.loading")),1)])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",uv,[e.createVNode(e.unref(da),{severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})])):e.createCommentVNode("",!0),!l.value&&!s.value?(e.openBlock(),e.createElementBlock("div",bv,[e.createElementVNode("div",gv,[e.createElementVNode("div",_v,[e.createElementVNode("h2",null,e.toDisplayString(Z.$t("pdfTools.sidebar.actions")),1),e.createElementVNode("div",hv,[e.createVNode(e.unref(ce),{icon:"ri-save-2-line",label:Z.$t("pdfTools.sidebar.saveNewVersion"),onClick:ie},null,8,["label"]),e.createVNode(e.unref(ce),{severity:"secondary",class:"btn-mt",icon:"ri-file-copy-2-line",label:Z.$t("pdfTools.sidebar.saveAs"),onClick:F[0]||(F[0]=H=>Te("saveAs"))},null,8,["label"]),e.createVNode(e.unref(Ha)),e.createElementVNode("div",yv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.extractPages")),1),e.createVNode(e.unref(ce),{disabled:d.value.length===0,icon:"ri-file-transfer-line",label:Z.$t("pdfTools.sidebar.extractAndSave"),onClick:F[1]||(F[1]=H=>Te("extract"))},null,8,["disabled","label"])]),e.createElementVNode("div",fv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.deletePages")),1),e.createVNode(e.unref(ce),{disabled:d.value.length===0||r.value.length===d.value.length,severity:"danger",icon:"ri-delete-bin-line",label:Z.$t("pdfTools.sidebar.deleteSelectedPages"),onClick:At},null,8,["disabled","label"])]),e.createElementVNode("div",Nv,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.insertPdf")),1),e.createElementVNode("div",Sv,[e.createVNode(e.unref(un),{auto:!1,customUpload:!1,showCancelButton:!1,showUploadButton:!1,accept:"application/pdf","choose-label":Z.$t("pdfTools.sidebar.fromComputer"),severity:"secondary",class:"btn-full",mode:"basic",name:"pdfToInsert",onSelect:Lt},null,8,["choose-label"]),e.createVNode(e.unref(ce),{severity:"secondary",icon:"ri-cloud-line",label:Z.$t("pdfTools.sidebar.fromPristy"),onClick:mt},null,8,["label"])])]),e.createElementVNode("div",Ev,[e.createElementVNode("h3",null,e.toDisplayString(Z.$t("pdfTools.sidebar.addWatermark")),1),e.createVNode(e.unref(at),{modelValue:w.value,"onUpdate:modelValue":F[2]||(F[2]=H=>w.value=H),placeholder:Z.$t("pdfTools.sidebar.watermarkTextPlaceholder"),type:"text"},null,8,["modelValue","placeholder"]),e.createElementVNode("div",Tv,[e.createElementVNode("div",null,[e.createVNode(e.unref(ka),{modelValue:X.value,"onUpdate:modelValue":F[3]||(F[3]=H=>X.value=H),max:360,min:-360,placeholder:Z.$t("pdfTools.sidebar.angle"),suffix:"°"},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",null,[e.createVNode(e.unref(ka),{modelValue:R.value,"onUpdate:modelValue":F[4]||(F[4]=H=>R.value=H),max:10,min:1,placeholder:Z.$t("pdfTools.sidebar.repetitions")},null,8,["modelValue","placeholder"])])]),e.createVNode(e.unref(ce),{disabled:!w.value||d.value.length===0,severity:"secondary",class:"btn-mt",icon:"ri-paint-brush-line",label:Z.$t("pdfTools.sidebar.addWatermarkButton"),onClick:x},null,8,["disabled","label"])])])])]),e.createElementVNode("div",Av,[e.createElementVNode("h2",null,e.toDisplayString(Z.$t("pdfTools.pagePreview.title")),1),e.createVNode(e.unref(R_.VueDraggableNext),{modelValue:r.value,"onUpdate:modelValue":F[5]||(F[5]=H=>r.value=H),class:"page-grid","ghost-class":"ghost","item-key":"pageIndex",onEnd:Xe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.pageIndex,class:"page-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass([{selected:z(H)},"page-thumbnail"]),onClick:he=>ae(H),onDblclick:e.withModifiers(he=>ut(H),["stop"])},[e.createElementVNode("div",Cv,[e.createVNode(e.unref(ma),{binary:"","model-value":z(H)},null,8,["model-value"])]),e.createElementVNode("div",Rv,[e.createVNode(e.unref(ce),{text:"",rounded:"",icon:"ri-clockwise-line",onClick:e.withModifiers(he=>ve(H),["stop"])},null,8,["onClick"]),e.createVNode(e.unref(ce),{"aria-label":Z.$t("pdfTools.pagePreview.openPagePreview",{pageNumber:H.pageNumber}),text:"",rounded:"",icon:"ri-edit-box-line",onClick:e.withModifiers(he=>ut(H),["stop"])},null,8,["aria-label","onClick"])]),e.createElementVNode("div",Iv,[e.createVNode(e.unref(Ya.VuePDF),{annotations:!1,page:H.pageNumber,pdf:e.unref(j),scale:.25,text:!1},null,8,["page","pdf"])]),e.createElementVNode("div",Mv,e.toDisplayString(H.pageNumber),1)],42,Ov)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(_t),{visible:u.value,"onUpdate:visible":F[14]||(F[14]=H=>u.value=H),breakpoints:{"960px":"95vw","640px":"100vw"},dismissableMask:"",modal:"",class:"dialog-page-editor","content-class":"page-editor-dialog",onHide:bt},{header:e.withCtx(()=>[e.createElementVNode("div",vv,[F[21]||(F[21]=e.createElementVNode("i",{class:"ri-file-fill"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.title",{pageNumber:(b.value||c.value)?.pageNumber||"",filename:G.value})),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xv,[e.createElementVNode("small",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.footerHint")),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Zv,[e.createVNode(e.unref(ce),{text:"",icon:"ri-zoom-out-line",onClick:Me}),e.createVNode(e.unref(ce),{text:"",icon:"ri-zoom-in-line",onClick:Ze}),e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.pageEditor.fit"),onClick:We},null,8,["label"]),e.createElementVNode("span",Dv,e.toDisplayString(Math.round(m.value*100))+"%",1),F[22]||(F[22]=e.createElementVNode("span",{class:"spacer"},null,-1)),e.createVNode(e.unref(ce),{text:"",icon:"ri-close-line",label:Z.$t("pdfTools.pageEditor.close"),onClick:bt},null,8,["label"])]),e.createElementVNode("div",wv,[e.createElementVNode("div",Wv,[e.createElementVNode("h4",null,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.actions")),1),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.SELECT}),icon:"ri-cursor-line",label:Z.$t("pdfTools.pageEditor.tools.select"),onClick:F[6]||(F[6]=H=>xe(p.SELECT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.REDACT}),icon:"ri-eraser-fill",label:Z.$t("pdfTools.pageEditor.tools.redact"),onClick:F[7]||(F[7]=H=>xe(p.REDACT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.HIGHLIGHT}),icon:"ri-mark-pen-line",label:Z.$t("pdfTools.pageEditor.tools.highlight"),onClick:F[8]||(F[8]=H=>xe(p.HIGHLIGHT))},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.COMMENT}),icon:"ri-sticky-note-line",label:Z.$t("pdfTools.pageEditor.tools.comment"),onClick:F[9]||(F[9]=H=>xe(p.COMMENT))},null,8,["class","label"]),e.createVNode(e.unref(un),{severity:"secondary",class:e.normalizeClass({active:g.value===p.IMAGE}),accept:"image/*","choose-label":Z.$t("pdfTools.pageEditor.tools.image"),mode:"basic",name:"image",onSelect:Ct},null,8,["class","choose-label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.SIGNATURE}),icon:"ri-ball-pen-line",label:Z.$t("pdfTools.pageEditor.tools.signature"),onClick:ft},null,8,["class","label"]),e.createVNode(e.unref(ce),{text:"",severity:"secondary",class:e.normalizeClass({active:g.value===p.TEXT}),icon:"ri-font-size",label:Z.$t("pdfTools.pageEditor.tools.text"),onClick:F[10]||(F[10]=H=>xe(p.TEXT))},null,8,["class","label"]),g.value===p.TEXT?(e.openBlock(),e.createElementBlock("div",Lv,[e.createElementVNode("div",Yv,[e.createElementVNode("label",kv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.font")),1),e.createVNode(e.unref($t),{modelValue:N.value,"onUpdate:modelValue":F[11]||(F[11]=H=>N.value=H),options:Y,class:"input-full",optionLabel:"label",optionValue:"value"},null,8,["modelValue"])]),e.createElementVNode("div",xv,[e.createElementVNode("label",zv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.size")),1),e.createVNode(e.unref(ka),{modelValue:V.value,"onUpdate:modelValue":F[12]||(F[12]=H=>V.value=H),max:144,min:6},null,8,["modelValue"])]),e.createElementVNode("div",Gv,[e.createElementVNode("label",Fv,e.toDisplayString(Z.$t("pdfTools.pageEditor.tools.color")),1),e.createVNode(e.unref(at),{modelValue:le.value,"onUpdate:modelValue":F[13]||(F[13]=H=>le.value=H),class:"input-full",placeholder:"#000000"},null,8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(Ha)),e.createVNode(e.unref(ce),{disabled:_.value.length===0,severity:"info",class:"btn-full btn-mt-auto",icon:"ri-check-line",label:Z.$t("pdfTools.pageEditor.apply"),onClick:_e},null,8,["disabled","label"]),e.createVNode(e.unref(ce),{disabled:_.value.length===0,severity:"warn",class:"btn-full btn-mt-sm",icon:"ri-arrow-go-back-line",label:Z.$t("pdfTools.pageEditor.cancel"),onClick:Ua},null,8,["disabled","label"])]),e.createElementVNode("div",{class:"page-editor-canvas",onWheelPassive:Ra,onScrollPassive:Ra},[e.createElementVNode("div",{ref_key:"pdfCanvasWrapper",ref:S,class:"pdf-canvas-wrapper"},[e.unref(j)&&(b.value||c.value)?(e.openBlock(),e.createBlock(e.unref(Ya.VuePDF),{key:0,annotations:!1,page:(b.value||c.value).pageNumber,pdf:e.unref(j),scale:m.value,text:!1,class:"pdf-canvas-absolute"},null,8,["page","pdf","scale"])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{ref_key:"overlayCanvas",ref:y,class:"overlay-canvas",onMousedown:Gi,onMouseleave:Un,onMousemove:Fi,onMouseup:fa},null,544)],512)],32)])]),_:1},8,["visible"]),e.createVNode(e.unref(_t),{visible:T.value,"onUpdate:visible":F[15]||(F[15]=H=>T.value=H),modal:"",class:"dialog-signature-pad",onHide:ot},{header:e.withCtx(()=>[e.createElementVNode("div",Pv,[F[23]||(F[23]=e.createElementVNode("i",{class:"ri-ball-pen-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.signaturePad.title")),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uv,[e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.signaturePad.clear"),onClick:On},null,8,["label"]),e.createVNode(e.unref(ce),{text:"",label:Z.$t("pdfTools.signaturePad.use"),onClick:Bn},null,8,["label"])])]),default:e.withCtx(()=>[e.createElementVNode("div",Vv,[e.createElementVNode("canvas",{ref_key:"signaturePadCanvas",ref:O,class:"signature-canvas",onMousedown:Nt,onMouseleave:Zt,onMousemove:Ut,onMouseup:Zt,onTouchstart:e.withModifiers(Na,["prevent"]),onTouchmove:e.withModifiers(sn,["prevent"]),onTouchend:e.withModifiers(Zt,["prevent"])},null,544)])]),_:1},8,["visible"]),e.createVNode(cv,{"default-filename":ee.value,visible:fe.value,"parent-folder-node":pe.value,onClose:F[16]||(F[16]=H=>fe.value=!1),onSave:Pe},null,8,["default-filename","visible","parent-folder-node"]),e.createVNode(e.unref(_t),{visible:U.value,modal:"",header:Z.$t("pdfTools.insertFromAlfresco.title"),class:"dialog-insert-pdf","onUpdate:visible":F[20]||(F[20]=H=>U.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",MZ,[e.createElementVNode("div",vZ,[ne.value?(e.openBlock(),e.createElementBlock("div",ZZ,[e.createElementVNode("span",DZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selected")),1),e.withDirectives((e.openBlock(),e.createElementBlock("span",wZ,[e.createTextVNode(e.toDisplayString(ne.value?.name),1)])),[[q,ne.value?.name,void 0,{top:!0}]])])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",WZ,e.toDisplayString(de.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",LZ,[e.createVNode(e.unref(ce),{label:Z.$t("pdfTools.insertFromAlfresco.cancel"),text:"",onClick:F[19]||(F[19]=H=>U.value=!1)},null,8,["label"]),e.createVNode(e.unref(ce),{disabled:!se.value,label:Z.$t("pdfTools.insertFromAlfresco.insert"),icon:"ri-add-line",onClick:ue},null,8,["disabled","label"])])])]),default:e.withCtx(()=>[e.createVNode(e.unref(Kn),{value:0,"onUpdate:value":me},{default:e.withCtx(()=>[e.createVNode(e.unref(qn),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja),{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.browse")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.search")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.favorites")),1)]),_:1}),e.createVNode(e.unref(Ja),{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.linkOrId")),1)]),_:1})]),_:1}),e.createVNode(e.unref(ji),null,{default:e.withCtx(()=>[e.createVNode(e.unref(mn),{value:0},{default:e.withCtx(()=>[e.createVNode(en,{showUserHome:"",showFiles:"",onSelectNode:Vt})]),_:1}),e.createVNode(e.unref(mn),{value:1},{default:e.withCtx(()=>[e.createElementVNode("div",jv,[e.createVNode(e.unref(at),{modelValue:ge.value,"onUpdate:modelValue":F[17]||(F[17]=H=>ge.value=H),placeholder:Z.$t("pdfTools.insertFromAlfresco.searchPlaceholder"),onKeyup:e.withKeys(jt,["enter"])},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(ce),{icon:"ri-search-line",onClick:jt})]),Ce.value?(e.openBlock(),e.createElementBlock("div",Bv,[e.createVNode(e.unref(ea),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.searching")),1)])):!Ne.value.length&&Ye.value?(e.openBlock(),e.createElementBlock("div",Hv,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.noPdfFound")),1)):Ne.value.length?(e.openBlock(),e.createElementBlock("div",Jv,[e.createElementVNode("div",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":ne.value?.id===H.id}]),onClick:he=>He(H)},[e.createElementVNode("div",qv,[F[24]||(F[24]=e.createElementVNode("i",{class:"ri-file-pdf-line"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",$v,[e.createTextVNode(e.toDisplayString(H.name),1)])),[[q,H.name,void 0,{top:!0}]])])],10,Kv))),128))]),e.createElementVNode("div",eZ,[ne.value?te.value?(e.openBlock(),e.createElementBlock("div",nZ,[e.createVNode(e.unref(ea),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",iZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(W)?(e.openBlock(),e.createElementBlock("div",oZ,[L.value>0?(e.openBlock(),e.createElementBlock("div",rZ,[e.createVNode(e.unref(ce),{icon:"ri-arrow-left-s-line",text:"",size:"small",disabled:M.value<=1,onClick:Pt},null,8,["disabled"]),e.createElementVNode("span",lZ,e.toDisplayString(M.value)+" / "+e.toDisplayString(L.value),1),e.createVNode(e.unref(ce),{icon:"ri-arrow-right-s-line",text:"",size:"small",disabled:M.value>=L.value,onClick:st},null,8,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",sZ,[e.createVNode(e.unref(Ya.VuePDF),{pdf:e.unref(W),page:M.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tZ,[F[25]||(F[25]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon"},null,-1)),e.createElementVNode("p",aZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(mn),{value:2},{default:e.withCtx(()=>[E.value?(e.openBlock(),e.createElementBlock("div",cZ,[e.createVNode(e.unref(ea),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loading")),1)])):Ue.value.length?(e.openBlock(),e.createElementBlock("div",mZ,[e.createElementVNode("div",pZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,H=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":ne.value?.id===H.id}]),onClick:he=>He(H)},[e.createElementVNode("div",bZ,[F[26]||(F[26]=e.createElementVNode("i",{class:"ri-file-pdf-line"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",gZ,[e.createTextVNode(e.toDisplayString(H.name),1)])),[[q,H.name,void 0,{top:!0}]])])],10,uZ))),128))]),e.createElementVNode("div",_Z,[ne.value?te.value?(e.openBlock(),e.createElementBlock("div",fZ,[e.createVNode(e.unref(ea),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",NZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(W)?(e.openBlock(),e.createElementBlock("div",SZ,[L.value>0?(e.openBlock(),e.createElementBlock("div",EZ,[e.createVNode(e.unref(ce),{icon:"ri-arrow-left-s-line",text:"",size:"small",disabled:M.value<=1,onClick:Pt},null,8,["disabled"]),e.createElementVNode("span",TZ,e.toDisplayString(M.value)+" / "+e.toDisplayString(L.value),1),e.createVNode(e.unref(ce),{icon:"ri-arrow-right-s-line",text:"",size:"small",disabled:M.value>=L.value,onClick:st},null,8,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",AZ,[e.createVNode(e.unref(Ya.VuePDF),{pdf:e.unref(W),page:M.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",hZ,[F[27]||(F[27]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon"},null,-1)),e.createElementVNode("p",yZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):(e.openBlock(),e.createElementBlock("div",dZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.noPdfFavorite")),1))]),_:1}),e.createVNode(e.unref(mn),{value:3},{default:e.withCtx(()=>[e.createElementVNode("div",OZ,[e.createElementVNode("div",CZ,[e.createElementVNode("label",RZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")),1),e.createVNode(e.unref(at),{id:"alfrescoNodeId",modelValue:B.value,"onUpdate:modelValue":F[18]||(F[18]=H=>B.value=H),placeholder:Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")},null,8,["modelValue","placeholder"]),e.createElementVNode("small",IZ,e.toDisplayString(Z.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")),1)])])]),_:1})]),_:1})]),_:1})]),_:1},8,["visible","header"])])}}},[["__scopeId","data-v-e46531e9"]]),YZ={class:"version-selectors"},kZ={class:"version-selector-group"},xZ={key:0,class:"flex align-items-center gap-2"},zZ={key:1},GZ={class:"flex align-items-center gap-2"},FZ={class:"version-selector-group"},XZ={key:0,class:"flex align-items-center gap-2"},PZ={key:1},VZ={class:"flex align-items-center gap-2"},UZ={key:0,class:"diff-content"},jZ={class:"diff-headers"},BZ={class:"header-a"},HZ={class:"header-b"},JZ={class:"diff-viewer"},QZ={key:0,class:"loading-container"},KZ={key:1,class:"error-container"},Ec=Se({__name:"DiffViewerDialog",props:{visible:{type:Boolean,required:!0},contentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]}},emits:["update:visible","revertVersion"],setup(a,{emit:t}){const{t:n}=ta.useI18n(),i=pa.useToast(),{isDarkMode:o}=Ei(),r=a,l=t,s=e.ref(r.visible),c=e.ref(null),d=e.ref(null),u=e.ref(""),b=e.ref(""),m=e.ref(!1),p=e.ref(null),g=e.ref(null),_=e.ref(null),f=e.computed(()=>{if(!r.versions)return[];const w=r.versions.map(X=>({label:`${n("diffViewer.version")} ${X.entry.id} (${new Date(X.entry.modifiedAt).toLocaleDateString()})`,id:X.entry.id})).reverse();return w.map((X,R)=>({...X,isCurrent:R===w.length-1}))}),h=e.computed(()=>f.value.filter(w=>w.id!==d.value)),S=e.computed(()=>f.value.filter(w=>w.id!==c.value)),y=e.computed(()=>{switch(r.contentNode?.content?.mimeType||""){case"text/html":return[Uc.html()];case"text/markdown":case"text/x-markdown":return[ni.markdown()];case"application/json":return[Ki.json()];case"application/xml":case"text/xml":return[qi.xml()];case"application/x-yaml":case"text/yaml":return[ii.yaml()];default:return[]}}),T=w=>{s.value=w,l("update:visible",w)},O=async()=>{if(!(!c.value||!d.value)){m.value=!0,p.value=null;try{const[w,X]=await Promise.all([Re.getVersionContent(r.contentNode.id,c.value),Re.getVersionContent(r.contentNode.id,d.value)]);let R=await w.text(),Y=await X.text();if(r.contentNode?.content?.mimeType==="application/json")try{R=JSON.stringify(JSON.parse(R),null,2),Y=JSON.stringify(JSON.parse(Y),null,2)}catch(N){console.error("Failed to format JSON:",N)}u.value=R,b.value=Y,m.value=!1,await e.nextTick(),D()}catch(w){console.error("Error fetching versions:",w),p.value=n("diffViewer.errors.loadError"),m.value=!1}}},D=()=>{if(_.value&&(_.value.destroy(),_.value=null),!g.value||!u.value&&!b.value)return;const w=o()?Vc.oneDark:Qa.syntaxHighlighting(Qa.defaultHighlightStyle,{fallback:!0}),X=[Dt.lineNumbers(),...y.value,w,xa.EditorState.readOnly.of(!0)];try{_.value=new M_.MergeView({a:{doc:u.value,extensions:X},b:{doc:b.value,extensions:X},parent:g.value})}catch(R){console.error("Error creating MergeView:",R),p.value="Failed to create diff view: "+R.message}},I=()=>{if(f.value.length>=2){const w=f.value.length;c.value=f.value[w-2]?.id,d.value=f.value[w-1]?.id}},C=w=>f.value.find(X=>X.id===w)?.isCurrent,A=async w=>{const X=n("diffViewer.restoredVersionComment",{versionNumber:w});try{await Re.revertVersion(r.contentNode.id,w,X),l("revertVersion"),i.add({severity:"success",summary:n("diffViewer.revertVersion.success"),detail:n("diffViewer.revertVersion.successDetail"),life:3e3}),T(!1)}catch(R){console.error("Error reverting version:",R),i.add({severity:"error",summary:n("diffViewer.revertVersion.error"),detail:R.message,life:3e3})}};return e.watch(()=>r.visible,w=>{s.value=w,w?I():(_.value&&(_.value.destroy(),_.value=null),c.value=null,d.value=null,u.value="",b.value="",p.value=null)}),e.watch([c,d],()=>{c.value&&d.value&&O()}),e.watch(()=>r.versions,w=>{w&&w.length>=2&&s.value&&I()},{deep:!0}),(w,X)=>{const R=e.resolveDirective("tooltip");return e.openBlock(),e.createBlock(e.unref(_t),{visible:s.value,"onUpdate:visible":[X[4]||(X[4]=Y=>s.value=Y),T],header:w.$t("diffViewer.compareTitle"),modal:"",maximizable:"",class:"diff-viewer-dialog"},{default:e.withCtx(()=>[e.createElementVNode("div",YZ,[e.createElementVNode("div",kZ,[e.createVNode(e.unref($t),{modelValue:c.value,"onUpdate:modelValue":X[0]||(X[0]=Y=>c.value=Y),options:h.value,"option-label":"label","option-value":"id",placeholder:w.$t("diffViewer.selectVersionA"),class:"flex-grow-1"},{value:e.withCtx(Y=>[Y.value?(e.openBlock(),e.createElementBlock("div",xZ,[e.createElementVNode("span",null,e.toDisplayString(f.value.find(N=>N.id===Y.value)?.label),1),f.value.find(N=>N.id===Y.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",zZ,e.toDisplayString(Y.placeholder),1))]),option:e.withCtx(Y=>[e.createElementVNode("div",GZ,[e.createElementVNode("span",null,e.toDisplayString(Y.option.label),1),Y.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),c.value&&!C(c.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,type:"button",icon:"ri-history-line",onClick:X[1]||(X[1]=Y=>A(c.value)),severity:"secondary",rounded:"",text:""},null,512)),[[R,w.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",FZ,[e.createVNode(e.unref($t),{modelValue:d.value,"onUpdate:modelValue":X[2]||(X[2]=Y=>d.value=Y),options:S.value,"option-label":"label","option-value":"id",placeholder:w.$t("diffViewer.selectVersionB"),class:"flex-grow-1"},{value:e.withCtx(Y=>[Y.value?(e.openBlock(),e.createElementBlock("div",XZ,[e.createElementVNode("span",null,e.toDisplayString(f.value.find(N=>N.id===Y.value)?.label),1),f.value.find(N=>N.id===Y.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",PZ,e.toDisplayString(Y.placeholder),1))]),option:e.withCtx(Y=>[e.createElementVNode("div",VZ,[e.createElementVNode("span",null,e.toDisplayString(Y.option.label),1),Y.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(wn),{key:0,value:w.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),d.value&&!C(d.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,type:"button",icon:"ri-history-line",onClick:X[3]||(X[3]=Y=>A(d.value)),severity:"secondary",rounded:"",text:""},null,512)),[[R,w.$t("diffViewer.revertToThisVersion",{versionNumber:d.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)])]),c.value&&d.value?(e.openBlock(),e.createElementBlock("div",UZ,[e.createElementVNode("div",jZ,[e.createElementVNode("div",BZ,[e.createElementVNode("strong",null,e.toDisplayString(w.$t("diffViewer.version"))+" "+e.toDisplayString(c.value),1)]),e.createElementVNode("div",HZ,[e.createElementVNode("strong",null,e.toDisplayString(w.$t("diffViewer.version"))+" "+e.toDisplayString(d.value),1)])]),e.createElementVNode("div",JZ,[m.value?(e.openBlock(),e.createElementBlock("div",QZ,[e.createVNode(e.unref(ea))])):p.value?(e.openBlock(),e.createElementBlock("div",KZ,[X[5]||(X[5]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(p.value),1)])):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"mergeViewContainer",ref:g},null,512))])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header"])}}},[["__scopeId","data-v-875847fb"]]),qZ={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:3e4,messageBufferSize:100},ia={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",ERROR:"error"};function zg(a={}){const t={...qZ,...a},n=e.ref(ia.DISCONNECTED),i=e.ref(null),o=e.ref(0),r=e.shallowRef([]);let l=null,s=null,c=null,d=null,u=!1;const b={onConnected:[],onDisconnected:[],onMessage:[],onError:[],onReconnecting:[]},m=(A,w)=>(b[A]&&b[A].push(w),()=>p(A,w)),p=(A,w)=>{if(b[A]){const X=b[A].indexOf(w);X>-1&&b[A].splice(X,1)}},g=(A,...w)=>{b[A]&&b[A].forEach(X=>X(...w))},_=A=>new Promise((w,X)=>{if(l&&l.readyState===WebSocket.OPEN){w();return}d=A,u=!1,n.value=ia.CONNECTING;try{l=new WebSocket(A),l.onopen=()=>{n.value=ia.CONNECTED,o.value=0,i.value=null,y(),I(),g("onConnected"),w()},l.onclose=R=>{T(),n.value=ia.DISCONNECTED,!u&&!R.wasClean&&O(),g("onDisconnected",R)},l.onerror=R=>{i.value=R,n.value=ia.ERROR,g("onError",R),X(R)},l.onmessage=R=>{try{const Y=JSON.parse(R.data);S(Y)}catch(Y){console.error("[CollabWebSocket] Failed to parse message:",Y)}}}catch(R){i.value=R,n.value=ia.ERROR,g("onError",R),X(R)}}),f=()=>{u=!0,T(),D(),l&&(l.close(1e3,"User disconnected"),l=null),n.value=ia.DISCONNECTED,r.value=[]},h=A=>{const w=JSON.stringify(A);return l&&l.readyState===WebSocket.OPEN?(l.send(w),!0):(r.value.length<t.messageBufferSize?r.value=[...r.value,w]:console.warn("[CollabWebSocket] Message buffer full, dropping message"),!1)},S=A=>{A.type!=="pong"&&g("onMessage",A)},y=()=>{T(),s=setInterval(()=>{l&&l.readyState===WebSocket.OPEN&&h({type:"ping"})},t.heartbeatInterval)},T=()=>{s&&(clearInterval(s),s=null)},O=()=>{if(o.value>=t.maxReconnectAttempts){console.error("[CollabWebSocket] Max reconnection attempts reached"),n.value=ia.ERROR;return}n.value=ia.RECONNECTING,o.value++;const A=Math.min(t.reconnectInterval*Math.pow(t.reconnectDecay,o.value-1),t.maxReconnectInterval);g("onReconnecting",o.value,A),c=setTimeout(()=>{d&&!u&&_(d).catch(()=>{})},A)},D=()=>{c&&(clearTimeout(c),c=null)},I=()=>{if(l&&l.readyState===WebSocket.OPEN&&r.value.length>0){const A=[...r.value];r.value=[],A.forEach(w=>{l.send(w)})}},C=()=>l&&l.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{f()}),{connectionState:e.readonly(n),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(r),connect:_,disconnect:f,send:h,isConnected:C,on:m,off:p}}class $Z{constructor(){this.basePath="/api/collab"}getBaseUrl(){return Qe.config.hostEcm}async getTicket(){return Qe.getTicketEcm()}createAuthHeader(t){return`Basic ${btoa(`ROLE_TICKET:${t}`)}`}async checkAvailability(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/availability/${t}`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(n)}});if(!i.ok){if(i.status===404)return{available:!1,enabled:!1,permissionLevel:"NONE"};if(i.status===403)return{available:!1,enabled:!0,permissionLevel:"NONE",reason:"NO_READ_PERMISSION"};throw new Error(`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(n){throw console.error("[CollabService] Error checking availability:",n),ke("collabService.checkAvailability",n)}}async initSession(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/session/init`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:this.createAuthHeader(n)},body:JSON.stringify({nodeId:t})});if(!i.ok){const o=await i.json();throw new Error(o.error||`HTTP ${i.status}`)}return await i.json()}catch(n){throw console.error("[CollabService] Error initializing session:",n),ke("collabService.initSession",n)}}getWebSocketUrl(){const t=this.getBaseUrl(),n=t.startsWith("https")?"wss":"ws",i=t.replace(/^https?:\/\//,"");return`${n}://${i}/alfresco/collab`}generateClientId(){return`client-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}const Tn=new $Z,Va="editor",an="observer";class eD extends Dt.WidgetType{constructor(t){super(),this.peer=t}toDOM(){const t=document.createElement("span");t.className="cm-remote-cursor",t.style.borderLeft=`2px solid ${this.peer.color}`,t.style.marginLeft="-1px",t.style.position="relative";const n=document.createElement("span");return n.className="cm-remote-cursor-label",n.style.backgroundColor=this.peer.color,n.style.color="#fff",n.style.padding="1px 4px",n.style.borderRadius="3px",n.style.fontSize="10px",n.style.position="absolute",n.style.top="-18px",n.style.left="0",n.style.whiteSpace="nowrap",n.textContent=this.peer.displayName,t.appendChild(n),t}}const Gg=xa.StateEffect.define(),Mi=xa.StateField.define({create(){return[]},update(a,t){for(const n of t.effects)if(n.is(Gg))return n.value;return a}}),tD=Dt.ViewPlugin.fromClass(class{constructor(a){this.decorations=this.createDecorations(a)}update(a){(a.docChanged||a.state.field(Mi)!==a.startState.field(Mi))&&(this.decorations=this.createDecorations(a.view))}createDecorations(a){const t=a.state.field(Mi),n=[];for(const i of t)if(i.position>=0&&i.position<=a.state.doc.length&&(n.push(Dt.Decoration.widget({widget:new eD(i),side:1}).range(i.position)),i.anchor!==i.position)){const o=Math.min(i.anchor,i.position),r=Math.max(i.anchor,i.position);n.push(Dt.Decoration.mark({class:"cm-remote-selection",attributes:{style:`background-color: ${i.color}33`}}).range(o,r))}return Dt.Decoration.set(n,!0)}},{decorations:a=>a.decorations});function Fg(){const a=e.ref(!1),t=e.ref(null),n=e.ref(null),i=e.ref(null),o=e.ref(null),r=e.shallowRef([]),l=e.shallowRef([]),s=e.ref(0),c=e.ref(null),d=e.ref(!1),u=e.ref(null);let b=null,m=null;const{connectionState:p,connect:g,disconnect:_,send:f,on:h,off:S}=zg();let y=null,T=null,O=null;const D=k=>{y=k},I=e.computed(()=>r.value.length),C=e.computed(()=>p.value===ia.CONNECTED),A=e.computed(()=>p.value===ia.RECONNECTING),w=e.computed(()=>o.value===Va),X=e.computed(()=>o.value===an),R=e.computed(()=>r.value.filter(k=>k.role===Va).length),Y=e.computed(()=>r.value.filter(k=>k.role===an).length),N=e.computed(()=>u.value==="WRITE"),V=e.computed(()=>u.value==="READ"||u.value==="WRITE"),le=k=>[li.collab({startVersion:k,clientID:n.value,sharedEffects:j=>{if(j.selection){const z=j.selection.main;te(z.head,z.anchor)}return[]}}),Mi,tD],Q=async k=>new Promise((j,z)=>{const ae=setTimeout(()=>{S("onMessage",re),z(new Error("Authentication timeout"))},5e3),re=oe=>{oe.type==="authenticated"?(clearTimeout(ae),S("onMessage",re),j()):oe.type==="error"&&oe.code==="AUTH_FAILED"&&(clearTimeout(ae),S("onMessage",re),z(new Error(oe.message||"Authentication failed")))};h("onMessage",re),f({type:"auth",ticket:k})}),fe=async(k,j,z,ae=an,re=null,oe=null)=>{a.value&&await K(),d.value=!1;try{T=k,y=j,n.value=Tn.generateClientId(),b=re,m=oe;const be=await Tn.checkAvailability(T);if(u.value=be.permissionLevel||"WRITE",!be.enabled)throw new Error("Collaborative editing is not available for this document");if(be.permissionLevel==="NONE")throw new Error("Access denied to this document");be.permissionLevel==="READ"&&ae===Va&&(ae=an);const Xe=Tn.getWebSocketUrl();h("onMessage",pe),h("onDisconnected",Ne),h("onReconnecting",Ce),await g(Xe);const ve=await Tn.getTicket();return await Q(ve),new Promise((dt,At)=>{const mt=setTimeout(()=>{At(new Error("Timeout waiting for welcome message"))},1e4),me=ue=>{ue.type==="welcome"?(clearTimeout(mt),S("onMessage",me),ee(ue),dt(ue)):ue.type==="error"&&(clearTimeout(mt),S("onMessage",me),ue.code==="SESSION_FULL"&&(d.value=!0),At(new Error(ue.message)))};h("onMessage",me),f({type:"join",nodeId:T,clientId:n.value,displayName:z,mode:ae})})}catch(be){throw c.value=be,be}},K=async()=>{a.value&&(O&&(clearTimeout(O),O=null),t.value&&n.value&&f({type:"leave",sessionId:t.value,clientId:n.value}),_(),a.value=!1,t.value=null,r.value=[],l.value=[],i.value=null,o.value=null,u.value=null,b=null,m=null,y=null,T=null)},ee=k=>{t.value=k.sessionId,s.value=k.version,i.value=k.color,o.value=k.role||an,r.value=k.peers||[],a.value=!0,J()},G=k=>k.toJSON(),P=k=>xa.ChangeSet.fromJSON(k),pe=k=>{switch(k.type){case"updates":U(k);break;case"peers":B(k);break;case"cursor":de(k);break;case"promoted":se(k);break;case"saved":ge(k);break;case"error":ne(k);break}},U=k=>{if(!y&&b&&k.document!==void 0){b(k.document,k.version);return}if(!y)return;const j=k.updates.map(z=>({changes:P(z.changes),clientID:z.clientID}));try{const z=li.receiveUpdates(y.state,j);y.dispatch(z)}catch(z){console.error("[CollabEditor] Error applying updates:",z)}},B=k=>{r.value=k.peers.filter(j=>j.clientId!==n.value),J()},de=k=>{if(k.clientId===n.value)return;const j=r.value.find(z=>z.clientId===k.clientId);j&&(j.cursorPosition=k.position,j.cursorAnchor=k.anchor,J())},ne=k=>{c.value=new Error(k.message),console.error("[CollabEditor] Server error:",k.code,k.message,k.details),k.code==="SESSION_FULL"?(d.value=!0,K()):k.code==="ACCESS_DENIED"&&K()},se=k=>{o.value=Va,s.value=k.version,b&&k.document!==void 0&&b(k.document,k.version)},ge=k=>{m&&m(k.sessionId)},Ne=()=>{},Ce=(k,j)=>{console.log(`[CollabEditor] Reconnecting in ${j}ms (attempt ${k})`)},Ye=()=>{if(!y||!a.value||!C.value)return;const k=li.sendableUpdates(y.state);if(k.length===0)return;const j=li.getSyncedVersion(y.state),z=k.map(re=>({clientID:re.clientID,changes:G(re.changes)})),ae=y.state.doc.toString();f({type:"push",sessionId:t.value,clientId:n.value,version:j,updates:z,document:ae})},Ue=()=>{O&&clearTimeout(O),O=setTimeout(Ye,50)};let E=null;const te=(k,j)=>{E&&clearTimeout(E),E=setTimeout(()=>{a.value&&C.value&&f({type:"cursor",sessionId:t.value,clientId:n.value,position:k,anchor:j})},100)},J=()=>{if(!y)return;const k=r.value.filter(j=>j.cursorPosition!==void 0).map(j=>({clientId:j.clientId,displayName:j.displayName,color:j.color,position:j.cursorPosition,anchor:j.cursorAnchor||j.cursorPosition}));l.value=k,y.dispatch({effects:Gg.of(k)})},W=()=>k=>{k.docChanged&&a.value&&Ue()},M=()=>new Promise((k,j)=>{if(!a.value||!C.value){j(new Error("Not connected to collaborative session"));return}if(o.value===Va){k({role:Va});return}const z=setTimeout(()=>{S("onMessage",ae),j(new Error("Timeout waiting for promotion confirmation"))},1e4),ae=re=>{re.type==="promoted"?(clearTimeout(z),S("onMessage",ae),k(re)):re.type==="error"&&re.context==="promote"&&(clearTimeout(z),S("onMessage",ae),j(new Error(re.message)))};h("onMessage",ae),f({type:"promote",sessionId:t.value,clientId:n.value})}),L=()=>new Promise((k,j)=>{if(!a.value||!C.value){j(new Error("Not connected to collaborative session"));return}const z=setTimeout(()=>{S("onMessage",ae),j(new Error("Timeout waiting for save confirmation"))},1e4),ae=re=>{re.type==="saved"?(clearTimeout(z),S("onMessage",ae),k(re)):re.type==="error"&&re.context==="save"&&(clearTimeout(z),S("onMessage",ae),j(new Error(re.message)))};h("onMessage",ae),f({type:"save",sessionId:t.value,clientId:n.value})});return e.onUnmounted(()=>{K()}),{isCollabActive:a,isSessionFull:d,permissionLevel:u,sessionId:t,clientId:n,myColor:i,myRole:o,connectedPeers:r,remoteCursors:l,connectionState:p,lastError:c,startVersion:s,peerCount:I,isConnected:C,isReconnecting:A,isEditor:w,isObserver:X,editorCount:R,observerCount:Y,hasWritePermission:N,hasReadPermission:V,startCollab:fe,stopCollab:K,setEditorView:D,createCollabExtensions:le,createUpdateListener:W,pushChanges:Ye,requestSave:L,promoteToEditor:M}}const Xg=Fe.defineStore({id:"CollabStore",state:()=>({enabled:!1,loaded:!1,activeSession:null,activeNodeId:null,connectedPeers:[],connectionState:"disconnected",myColor:null,lastError:null,maxPeers:5}),getters:{peerCount:a=>a.connectedPeers.length,hasActivePeers:a=>a.connectedPeers.length>0,isCollabActive:a=>a.activeSession!==null,isConnected:a=>a.connectionState==="connected",isReconnecting:a=>a.connectionState==="reconnecting",isAvailable:a=>a.enabled&&a.loaded},actions:{async init(){try{const a=je();this.enabled=a.COLLAB_ENABLED!==!1,this.maxPeers=a.COLLAB_MAX_PEERS||5,this.loaded=!0,console.log("[CollabStore] Initialized, enabled:",this.enabled)}catch(a){console.error("[CollabStore] Failed to initialize:",a),this.enabled=!1,this.loaded=!0}},async checkAvailability(a){if(!this.enabled)return{available:!1,reason:"disabled"};try{return await Tn.checkAvailability(a)}catch(t){return console.error("[CollabStore] Availability check failed:",t),{available:!1,reason:"error",error:t}}},setActiveSession(a){this.activeSession=a?.sessionId||null,this.activeNodeId=a?.nodeId||null,this.myColor=a?.color||null},updatePeers(a){this.connectedPeers=a||[]},setConnectionState(a){this.connectionState=a},setError(a){this.lastError=a},clearSession(){this.activeSession=null,this.activeNodeId=null,this.connectedPeers=[],this.myColor=null,this.connectionState="disconnected",this.lastError=null},addPeer(a){this.connectedPeers.findIndex(n=>n.clientId===a.clientId)===-1&&this.connectedPeers.push(a)},removePeer(a){const t=this.connectedPeers.findIndex(n=>n.clientId===a);t!==-1&&this.connectedPeers.splice(t,1)},updatePeerCursor(a,t,n){const i=this.connectedPeers.find(o=>o.clientId===a);i&&(i.cursorPosition=t,i.cursorAnchor=n)}}}),aD={class:"codemirror-editor-root"},nD={key:0,class:"consultation-title col"},iD={key:2,class:"collab-indicators flex align-items-center gap-2 ml-3"},oD={class:"collab-status-text text-sm"},rD={key:0,class:"collab-peers flex align-items-center gap-1"},lD={key:0,class:"collab-peer-more text-sm"},sD={key:1,class:"collab-participant-badges flex align-items-center gap-2"},cD={class:"collab-badge collab-badge-editor flex align-items-center gap-1"},dD={class:"text-sm font-medium"},mD={class:"collab-badge collab-badge-observer flex align-items-center gap-1"},pD={class:"text-sm font-medium"},uD={class:"flex gap-2 align-items-center"},bD={class:"card editor-wrapper border-1 surface-border border-round overflow-hidden flex flex-column p-0 m-0"},gD={key:0,class:"edit-mode-wrapper flex-grow-1 flex flex-column min-h-0"},_D=["srcdoc"],hD=["srcdoc"],yD={key:1,class:"consultation-view flex-grow-1"},fD=["srcdoc"],Pg=Se({__name:"CodeMirrorEditor",props:{contentUrl:{type:String,default:null},contentNode:{type:Object,default:null},readOnly:{type:Boolean,default:!1},isSharedLink:{type:Boolean,default:!1}},setup(a){const{t}=ta.useI18n(),n=pa.useToast(),i=ri.useConfirm(),{isDarkMode:o}=Ei(),r=Xg(),{isCollabActive:l,isSessionFull:s,connectedPeers:c,isConnected:d,isReconnecting:u,peerCount:b,myRole:m,isEditor:p,isObserver:g,editorCount:_,observerCount:f,startVersion:h,startCollab:S,stopCollab:y,setEditorView:T,createCollabExtensions:O,createUpdateListener:D,requestSave:I,promoteToEditor:C}=Fg(),A=a,w=e.ref(""),X=e.ref(""),R=e.ref(null),Y=e.ref(!1),N=e.ref(!1),V=e.ref("split"),le=e.ref(!1),Q=e.ref(null),fe=e.ref(null),K=e.ref(null),ee=e.shallowRef(null),G=e.shallowRef(null),P=e.ref([]),pe=e.ref(!1),U=e.ref(!1),B=e.ref(!1),de=e.ref(0),ne=e.ref(null),{isMarkdown:se,isHtml:ge,iframeContent:Ne}=hc({content:w,mimeType:Q}),Ce=e.computed(()=>w.value!==X.value),Ye=e.computed(()=>P.value&&P.value.length>=2),Ue=e.computed(()=>[{value:"editor",icon:"ri-code-line",label:t("editor.viewMode.editorOnly")},{value:"split",icon:"ri-layout-column-fill",label:t("editor.viewMode.split")},{value:"preview",icon:"ri-eye-line",label:t("editor.viewMode.previewOnly")}]),E=me=>{const ue=me?fe:K;if(!ue.value)return;const ze=Nn(Q.value),st=[...Sn({editable:me,showLineNumbers:!0,enableHistory:me,dark:o(),lineWrapping:le.value,onUpdate:me?jt=>{w.value=jt}:null})];ze&&(!Array.isArray(ze)||ze.length>0)&&st.push(ze);const Pt=xa.EditorState.create({doc:w.value,extensions:st}),Vt=new Dt.EditorView({state:Pt,parent:ue.value});me?ee.value=Vt:G.value=Vt},te=me=>{me.value&&(me.value.destroy(),me.value=null)},J=async me=>{if(!(!me.id&&!me.shareId))try{let ue;A.isSharedLink&&me.shareId?ue=await Re.getSharedLinkContent(me.shareId):ue=await Re.getNodeContent(me.id,!1);let ze=await ue.text();if(me.content?.mimeType==="application/json")try{ze=JSON.stringify(JSON.parse(ze),null,2)}catch(He){console.warn("Failed to format JSON, displaying raw content:",He.message)}A.readOnly||await L(me),w.value=ze,X.value=ze,Q.value=me.content?.mimeType||"text/plain",await e.nextTick(),!N.value&&!se.value&&!ge.value&&!G.value&&E(!1)}catch(ue){console.error("Failed to load content:",ue),n.add({severity:"error",summary:t("error.error"),detail:t("editor.loadError"),life:3e3})}},W=async()=>{if(l.value){try{await I(),X.value=w.value,n.add({severity:"success",summary:t("success"),detail:t("editor.saveSuccess"),life:3e3}),await z(A.contentNode.id)}catch(me){n.add({severity:"error",summary:t("error.error"),detail:me.message,life:4e3})}return}if(!Ce.value){N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{});return}try{await Re.updateContentNode(A.contentNode.id,w.value,Q.value),X.value=w.value,n.add({severity:"success",summary:t("success"),detail:t("editor.saveSuccess"),life:3e3}),N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{}),await z(A.contentNode.id)}catch(me){n.add({severity:"error",summary:t("error.error"),detail:me.message,life:4e3})}},M=async()=>{try{const me=await qe.lockNode(A.contentNode.id,{timeToExpire:0,type:"ALLOW_OWNER_CHANGES",lifetime:"EPHEMERAL"});await L(me.entry),await J(me.entry)}catch{try{const ue=await qe.getNode(A.contentNode.id,{include:["properties"]});await L(ue.entry)}catch{n.add({severity:"error",summary:t("error.error"),detail:t("editor.refreshError"),life:3e3})}}},L=async me=>{const ue=me.properties?.["cm:lockOwner"],ze=yt();ue&&ue.id!==ze.person.id?(Y.value=!0,R.value=t("node.lockedBy",{name:ue.displayName})):(Y.value=!1,R.value=null)},k=async()=>{if(!N.value)if(r.enabled&&U.value){B.value=!0;try{N.value=!0,await e.nextTick(),await e.nextTick();let ue=0;for(;!ee.value&&ue<10;)await e.nextTick(),ue++;if(!ee.value)throw new Error("Editor view not created");await dt(),l.value?n.add({severity:"success",summary:t("success"),detail:t("collab.connected"),life:3e3}):(N.value=!1,n.add({severity:"error",summary:t("error.error"),detail:t("collab.initError"),life:4e3}))}catch(ue){console.error("Failed to start collaborative editing:",ue),N.value=!1,n.add({severity:"error",summary:t("error.error"),detail:t("collab.initError"),life:4e3})}finally{B.value=!1}}else await M(),Y.value||(N.value=!0);else if(l.value){await At();let ze=await(await Re.getNodeContent(A.contentNode.id,!1)).text();if(A.contentNode.content?.mimeType==="application/json")try{ze=JSON.stringify(JSON.parse(ze),null,2)}catch{}w.value=ze,X.value=ze,N.value=!1,await ve(A.contentNode.id)}else Ce.value?i.require({message:t("editor.unsavedChanges"),header:t("editor.confirmationHeader"),icon:"ri-alert-line",group:"confirmUnsavedChanges",accept:async()=>{w.value=X.value,N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{})},reject:()=>{}}):(w.value=X.value,N.value=!1,await qe.unlockNode(A.contentNode.id).catch(()=>{}))},j=()=>{const me=document.createElement("a");me.href=A.contentUrl,me.download=A.contentNode.name,me.click()},z=async me=>{if(me)try{const ue=await Re.listNodeVersionHistory(me);P.value=ue.list.entries}catch(ue){console.error("Error fetching versions:",ue)}},ae=()=>{pe.value=!0},re=async()=>{await J(A.contentNode),await z(A.contentNode.id)},oe=async me=>{if(!me||A.readOnly){U.value=!1;return}try{const ue=await r.checkAvailability(me);ne.value=ue.permissionLevel||"WRITE",de.value=ue.maxPeers||0,U.value=ue.enabled===!0&&ne.value!=="NONE"}catch(ue){console.error("[Collab] Failed to check collab availability:",ue),U.value=!1,ne.value=null}},be=(me,ue)=>{if(!N.value&&me!==void 0&&(w.value=me,X.value=me,G.value)){const ze=G.value.state.update({changes:{from:0,to:G.value.state.doc.length,insert:me}});G.value.dispatch(ze)}},Xe=()=>{X.value=w.value},ve=async me=>{if(!(!me||A.readOnly||!r.enabled||!U.value)&&!l.value)try{const ue=yt(),ze=ue.person?.displayName||ue.person?.id||"User";await S(me,null,ze,an,be,Xe)}catch(ue){console.error("[Collab] Failed to connect as observer:",ue)}},dt=async()=>{if(!A.contentNode?.id||!ee.value)throw new Error("Missing node ID or editor view");const me=yt(),ue=me.person?.displayName||me.person?.id||"User";let ze,He;if(l.value&&g.value){const st=await C();ze=st.version||h.value,He=st.document}else{const st=await S(A.contentNode.id,null,ue,Va,be,Xe);ze=st.version,He=st.document}He!==void 0&&(w.value=He,X.value=He),await mt(ze)},At=async()=>{try{await y()}catch(me){console.error("Failed to stop collaborative editing:",me)}},mt=async me=>{if(!fe.value)return;te(ee),await e.nextTick();const ue=Nn(Q.value),ze=Sn({editable:!0,showLineNumbers:!0,enableHistory:!0,dark:o(),lineWrapping:le.value,onUpdate:jt=>{w.value=jt}}),He=O(me),st=Dt.EditorView.updateListener.of(D()),Pt=[...ze,...He,st];ue&&(!Array.isArray(ue)||ue.length>0)&&Pt.push(ue);const Vt=xa.EditorState.create({doc:w.value,extensions:Pt});ee.value=new Dt.EditorView({state:Vt,parent:fe.value}),T(ee.value)};return r.init(),e.watch(()=>A.contentNode,async me=>{me&&(J(me),A.readOnly||(z(me.id),r.loaded||await r.init(),await oe(me.id),await ve(me.id)))},{immediate:!0}),e.watch(N,async me=>{te(ee),te(G),await e.nextTick(),me?V.value!=="preview"&&E(!0):!se.value&&!ge.value&&E(!1)}),e.watch(V,async(me,ue)=>{if(!N.value||!(se.value||ge.value))return;const ze=me!=="preview";ue!=="preview"&&te(ee),ze&&(await e.nextTick(),E(!0))}),e.watch(le,async()=>{N.value&&V.value!=="preview"&&ee.value?(te(ee),await e.nextTick(),E(!0)):!N.value&&!se.value&&!ge.value&&G.value&&(te(G),await e.nextTick(),E(!1))}),e.onBeforeUnmount(async()=>{l.value&&await y(),te(ee),te(G),N.value&&!Y.value&&!l.value&&qe.unlockNode(A.contentNode.id).catch(()=>{})}),(me,ue)=>{const ze=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",aD,[e.createVNode(e.unref(Qi),{class:"consultation-toolbar"},{start:e.withCtx(()=>[a.contentNode?(e.openBlock(),e.createElementBlock("h3",nD,e.toDisplayString(a.contentNode.name),1)):e.createCommentVNode("",!0),me.$route.params.versionId?(e.openBlock(),e.createBlock(e.unref(dn),{key:1,class:"tag-version",value:me.$route.params.versionId},null,8,["value"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("div",iD,[e.createElementVNode("span",{class:e.normalizeClass(["collab-status-dot",{connected:e.unref(d),reconnecting:e.unref(u)}])},null,2),e.createElementVNode("span",oD,e.toDisplayString(e.unref(d)?me.$t("collab.connected"):me.$t("collab.reconnecting")),1),e.unref(b)>0?(e.openBlock(),e.createElementBlock("div",rD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).slice(0,6),He=>e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:He.clientId,class:"collab-peer-avatar",style:e.normalizeStyle({backgroundColor:He.color})},[e.createTextVNode(e.toDisplayString(He.displayName.charAt(0).toUpperCase()),1)],4)),[[ze,He.displayName,void 0,{bottom:!0}]])),128)),e.unref(b)>6?(e.openBlock(),e.createElementBlock("span",lD," +"+e.toDisplayString(e.unref(b)-6),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(l)&&e.unref(d)?(e.openBlock(),e.createElementBlock("div",sD,[e.withDirectives((e.openBlock(),e.createElementBlock("div",cD,[ue[3]||(ue[3]=e.createElementVNode("i",{class:"ri-edit-fill"},null,-1)),e.createElementVNode("span",dD,e.toDisplayString(e.unref(_)+(e.unref(p)?1:0)),1)])),[[ze,me.$t("collab.editorsTooltip"),void 0,{bottom:!0}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",mD,[ue[4]||(ue[4]=e.createElementVNode("i",{class:"ri-eye-fill"},null,-1)),e.createElementVNode("span",pD,e.toDisplayString(e.unref(f)+(e.unref(g)?1:0)),1)])),[[ze,me.$t("collab.observersTooltip"),void 0,{bottom:!0}]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),end:e.withCtx(()=>[e.createElementVNode("div",uD,[N.value&&(e.unref(se)||e.unref(ge))?(e.openBlock(),e.createBlock(e.unref(Ka),{key:0,modelValue:V.value,"onUpdate:modelValue":ue[0]||(ue[0]=He=>V.value=He),options:Ue.value,"option-value":"value","allow-empty":!1,class:"view-mode-selector"},{option:e.withCtx(He=>[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(He.option.icon)},null,2),[[ze,He.option.label,void 0,{bottom:!0}]])]),_:1},8,["modelValue","options"])):e.createCommentVNode("",!0),!a.readOnly&&!e.unref(s)&&(!U.value||ne.value==="WRITE")?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:1,icon:N.value?"ri-close-line":"ri-pencil-line",severity:N.value?"warning":"info",onClick:k,disabled:Y.value||B.value,loading:B.value,raised:""},null,8,["icon","severity","disabled","loading"])),[[ze,N.value?me.$t("editor.cancelEdit"):me.$t("editor.edit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),N.value&&!a.readOnly?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:2,icon:"ri-save-line",severity:"primary",onClick:W,disabled:Y.value||!Ce.value,raised:""},null,8,["disabled"])),[[ze,me.$t("save"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),ue[5]||(ue[5]=e.createElementVNode("div",{class:"w-1rem"},[e.createElementVNode("i",{class:"ri-more-2-line"})],-1)),N.value&&V.value!=="preview"||!N.value&&!e.unref(se)&&!e.unref(ge)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:3,icon:"ri-text-wrap",severity:le.value?"info":"secondary",onClick:ue[1]||(ue[1]=He=>le.value=!le.value),raised:""},null,8,["severity"])),[[ze,me.$t("editor.lineWrap"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),a.readOnly?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:4,icon:"ri-layout-column-line",severity:"secondary",onClick:ae,disabled:!Ye.value,raised:""},null,8,["disabled"])),[[ze,me.$t("diffViewer.compareTitle"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",severity:"secondary",onClick:j,raised:""},null,512),[[ze,me.$t("download"),void 0,{bottom:!0}]])])]),_:1}),Y.value&&!a.readOnly?(e.openBlock(),e.createBlock(e.unref(da),{key:0,severity:"warn",icon:"ri-lock-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.value),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(da),{key:1,severity:"warn",icon:"ri-group-line",class:"p-small-message px-3 py-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(me.$t("collab.sessionFull"))+" ("+e.toDisplayString(de.value)+"/"+e.toDisplayString(de.value)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(l)&&e.unref(u)?(e.openBlock(),e.createBlock(e.unref(da),{key:2,severity:"warn",icon:"ri-wifi-off-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(me.$t("collab.offline")),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",bD,[N.value?(e.openBlock(),e.createElementBlock("div",gD,[(e.unref(se)||e.unref(ge))&&V.value==="split"?(e.openBlock(),e.createBlock(e.unref(I_),{key:0,class:"flex-grow-1 h-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(Hc),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"editorContainer",ref:fe,class:"w-full flex-grow-1"},null,512)]),_:1}),e.createVNode(e.unref(Hc),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("iframe",{srcdoc:e.unref(Ne),class:"preview-container w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,_D)]),_:1})]),_:1})):!e.unref(se)&&!e.unref(ge)||V.value==="editor"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:fe,class:"editor-only-container w-full flex-grow-1"},null,512)):V.value==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:2,srcdoc:e.unref(Ne),class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,hD)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",yD,[e.unref(se)||e.unref(ge)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(Ne),class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,8,fD)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"consultationEditorContainer",ref:K,class:"consultation-editor-container"},null,512))]))]),e.createVNode(Ec,{visible:pe.value,"onUpdate:visible":ue[2]||(ue[2]=He=>pe.value=He),"content-node":a.contentNode,versions:P.value,onRevertVersion:re},null,8,["visible","content-node","versions"])])}}},[["__scopeId","data-v-736ea782"]]),ND="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QIqaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pgo8eDp4bXBtZXRhIHhtbG5zOng9J2Fkb2JlOm5zOm1ldGEvJyB4O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z9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+06/ND5wKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAMe4o8wOS8X/Fj4d+Ax/wAVX4u03T3H8Es6hj+HWt6WFrVvgi2aRpTn8KMHQf2kfgn4kvFsNK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KACgAoAKACgAoAKACgAoAKAFAzwOvpQBctdMnuSGYFEPc96ylUURXNq2tIbVNsajOOT3Nc8pOW5JPSAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAEKq6kOoKnqD0NO9gM+40a3lJaPMbHt1FaRqyW47mdPpd1D823ePVea1VRMoqFWU4YYPvWgB707AJSAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAHpFJKcIhJ9hUuSQF230a4k5kwi+/JqJVkthXNO20y1t8HbuYdzzWMpykK5b/X0qBBQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAHPbj6UMCKS2glGJIlPviqUmth3KcuiWz8xsUP51aqtBcpy6HcL/AKtlcfka0jVT3HcqyWN1F9+FvyzVqSYyEoy9VI+tV7oCUAFABn2NJ2QBTAKACgAoAKACgAoAKACgAoAKACgAoAKVwCqsAUgHLHI/3EZvoKnmSAsR6ddydIyB6mk6kV1AtRaHKfmmkC+wGah1+wrlyLSLSIcqXPuazdST2FctxxRxjaiKo+lRdvcQ7n2pALQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAf4d6AD+dADHiib78Sn6imm1sBA+nWb9YgPpxVKch3IX0W2b7rMv45qlVaC5C2hL/AATfmtV7buh3Im0OcfdkVvrS9qguRto12OgVvoav2qC4w6Ter/yy/Wq9ou4XGnTbwf8ALE0c8e4xpsLwdYGo54dwE+xXX/PFvyp88e4B9iuv+eD/APfNHPHuACyuj/y7v+VLnj3AcNPuz/ywanzIBRpt4f8AliaXPHuA8aTen/lmPzFP2kRXHjRrvqdg+pqPaoLkq6FL/FMv4Cl7cLki6FH/ABzMfoMVLrNiuTJo1mv3lLfU0nVkwuTpYWkf3YV/Hmoc5MLkqxov3UVfoKTbe4Dx+noaQgoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBAMd6AD8vyoAXJp6AHWkMPy/OgQZoGH5fnQAUrCCq0AKLgFIAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP/9k=",SD={name:"ErrorComponent",components:{PrimeButton:ce},props:{errorNb:{type:String,default:"500"},homeName:{type:String,default:"welcome"}},data(){return{title:"",subtitle:""}},created(){this.title=this.$t("nothingTitle"),this.subtitle=this.$t("nothingText")},methods:{onClick(){this.$router.push({name:this.homeName})}}},ED={class:"error-container"},TD={class:"error-card"},AD={class:"error-title"},OD={class:"error-image",src:ND,alt:"Angry Cat"},CD={class:"error-body"},RD={class:"error-card-title"},ID={class:"error-card-subtitle"};function MD(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",ED,[e.createElementVNode("div",TD,[e.createElementVNode("h2",AD,e.toDisplayString(n.errorNb),1),e.withDirectives(e.createElementVNode("img",OD,null,512),[[s,"www.vecteezy.com"]]),e.createElementVNode("div",CD,[e.createElementVNode("p",RD,e.toDisplayString(o.title),1),e.createElementVNode("p",ID,e.toDisplayString(o.subtitle),1),e.createVNode(l,{icon:"ri-corner-down-left-line",label:a.$t("goHome"),class:"error-button",onClick:r.onClick},null,8,["label","onClick"])])])])}const Tc=Se(SD,[["render",MD],["__scopeId","data-v-b4ec85ac"]]);class vD{getBaseUrl(){return Qe.config.hostEcm}async getTicket(){return Qe.getTicketEcm()}createAuthHeader(t){return`Basic ${btoa(`ROLE_TICKET:${t}`)}`}async getStatus(){try{const t=await this.getTicket(),n=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/status`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(t)}});return n.ok?await n.json():{enabled:!1}}catch(t){return console.error("[ChatBackendService] Error checking status:",t),{enabled:!1}}}async getWorkspaceRoom(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${t}/room`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(n)}});return i.ok?await i.json():(console.warn(`[ChatBackendService] Failed to get room for site ${t}:`,i.status),{found:!1})}catch(n){return console.error(`[ChatBackendService] Error getting room for site ${t}:`,n),{found:!1}}}async createWorkspaceRoom(t){try{const n=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${t}/room`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(n)},body:JSON.stringify({})});return i.ok?await i.json():(console.error(`[ChatBackendService] Failed to create room for site ${t}:`,i.status),null)}catch(n){return console.error(`[ChatBackendService] Error creating room for site ${t}:`,n),null}}async getUserChatToken(){try{const t=await this.getTicket(),n=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(t)}});return n.ok?await n.json():{hasCredentials:!1}}catch(t){return console.error("[ChatBackendService] Error getting user token:",t),{hasCredentials:!1}}}async saveUserChatToken(t,n){try{const i=await this.getTicket(),o=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(i)},body:JSON.stringify({userId:t,token:n})});if(!o.ok){const r=await o.json().catch(()=>({}));throw new Error(r.message||`HTTP ${o.status}`)}return await o.json()}catch(i){throw console.error("[ChatBackendService] Error saving user token:",i),i}}}const vi=new vD;class ZD{constructor(){this.credentials=null,this.config=null}init(t){this.config=t,this.credentials=null}isEnabled(){return this.config?.CHAT_ENABLED===!0&&!!this.config?.ROCKETCHAT_HOST}isOAuthEnabled(){return this.config?.CHAT_OAUTH_ENABLED===!0}getServerUrl(){return(this.config?.ROCKETCHAT_HOST||"").replace(/\/$/,"")}getWebSocketUrl(){if(this.config?.ROCKETCHAT_WS_URL)return this.config.ROCKETCHAT_WS_URL;const t=this.config?.ROCKETCHAT_HOST||"",n=t.startsWith("https")?"wss":"ws",i=t.replace(/^https?:\/\//,"").replace(/\/$/,"");return`${n}://${i}/websocket`}async getCredentials(){if(this.credentials)return this.credentials;const t=await vi.getUserChatToken();return t.hasCredentials&&t.userId&&t.token?(this.credentials={userId:t.userId,authToken:t.token},this.credentials):(console.warn("[RocketChatAuthService] No credentials available. User needs to configure token in profile."),null)}clearCredentials(){this.credentials=null}async verifyCredentials(){const t=await this.getCredentials();if(!t)return!1;try{const n=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":t.authToken,"X-User-Id":t.userId}});return n.ok?(await n.json()).success===!0:(this.clearCredentials(),!1)}catch(n){return console.error("[RocketChatAuthService] Error verifying credentials:",n),!1}}async getCurrentUser(){const t=await this.getCredentials();if(!t)return null;try{const n=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":t.authToken,"X-User-Id":t.userId}});return n.ok?await n.json():null}catch(n){return console.error("[RocketChatAuthService] Error getting current user:",n),null}}}const oa=new ZD;class DD{async request(t,n={}){const i=await oa.getCredentials();if(!i)throw new Error("Not authenticated to Rocket.Chat");const r=`${oa.getServerUrl()}${t}`,l={"Content-Type":"application/json","X-Auth-Token":i.authToken,"X-User-Id":i.userId,...n.headers},s=await fetch(r,{...n,headers:l}),c=s.headers.get("content-type");if(!c||!c.includes("application/json")){const u=await s.text();throw console.error(`[RocketChatService] Expected JSON but got ${c}:`,u.substring(0,200)),new Error(`Invalid response from Rocket.Chat: expected JSON, got ${c}`)}const d=await s.json();if(!s.ok||d.success===!1){const u=new Error(d.error||`HTTP ${s.status}`);throw u.status=s.status,u.data=d,u}return d}async getSubscriptions(){return(await this.request("/api/v1/subscriptions.get")).update||[]}async getGroups(){return(await this.request("/api/v1/groups.list")).groups||[]}async getRoomInfo(t){return(await this.request(`/api/v1/rooms.info?roomId=${t}`)).room}async getMessages(t,n={}){const i=new URLSearchParams({roomId:t,count:n.count||50});return n.oldest&&i.append("oldest",n.oldest),n.latest&&i.append("latest",n.latest),(await this.request(`/api/v1/groups.history?${i.toString()}`)).messages||[]}async sendMessage(t,n){return(await this.request("/api/v1/chat.postMessage",{method:"POST",body:JSON.stringify({roomId:t,text:n})})).message}async markAsRead(t){await this.request("/api/v1/subscriptions.read",{method:"POST",body:JSON.stringify({rid:t})})}async getUnreadCounts(){const t=await this.getSubscriptions(),n={};for(const i of t)i.unread>0&&(n[i.rid]=i.unread);return n}async getUserPresence(t){try{return(await this.request(`/api/v1/users.getPresence?userId=${t}`)).presence}catch{return"offline"}}async setUserPresence(t){await this.request("/api/v1/users.setStatus",{method:"POST",body:JSON.stringify({status:t})})}async getRoomMembers(t){return(await this.request(`/api/v1/groups.members?roomId=${t}`)).members||[]}async uploadFile(t,n,i=""){const o=await oa.getCredentials();if(!o)throw new Error("Not authenticated to Rocket.Chat");const r=new FormData;r.append("file",n),i&&r.append("description",i);const l=oa.getServerUrl(),s=await fetch(`${l}/api/v1/rooms.upload/${t}`,{method:"POST",headers:{"X-Auth-Token":o.authToken,"X-User-Id":o.userId},body:r}),c=await s.json();if(!s.ok||c.success===!1)throw new Error(c.error||"Failed to upload file");return c}}const An=new DD,wD={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:25e3,messageBufferSize:100},it={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",AUTHENTICATING:"authenticating",READY:"ready",RECONNECTING:"reconnecting",ERROR:"error"};function Vg(a={}){const t={...wD,...a},n=e.ref(it.DISCONNECTED),i=e.ref(null),o=e.ref(0),r=e.shallowRef([]),l=e.ref(new Set);let s=null,c=null,d=null,u=!1,b=0,m=new Map;const p={onConnected:[],onDisconnected:[],onReady:[],onMessage:[],onRoomMessage:[],onTyping:[],onPresence:[],onError:[],onReconnecting:[]},g=(U,B)=>(p[U]&&p[U].push(B),()=>_(U,B)),_=(U,B)=>{if(p[U]){const de=p[U].indexOf(B);de>-1&&p[U].splice(de,1)}},f=(U,...B)=>{p[U]&&p[U].forEach(de=>de(...B))},h=()=>String(++b),S=()=>new Promise((U,B)=>{if(s&&s.readyState===WebSocket.OPEN){U();return}const de=oa.getWebSocketUrl();if(!de){const ne=new Error("WebSocket URL not configured");i.value=ne,n.value=it.ERROR,B(ne);return}u=!1,n.value=it.CONNECTING;try{s=new WebSocket(de),s.onopen=()=>{n.value=it.CONNECTED,o.value=0,i.value=null,T({msg:"connect",version:"1",support:["1","pre2","pre1"]}),f("onConnected")},s.onclose=ne=>{fe(),n.value=it.DISCONNECTED,!u&&!ne.wasClean&&K(),f("onDisconnected",ne)},s.onerror=ne=>{i.value=ne,n.value=it.ERROR,f("onError",ne),B(ne)},s.onmessage=ne=>{try{const se=JSON.parse(ne.data);I(se,U,B)}catch(se){console.error("[ChatWebSocket] Failed to parse message:",se)}}}catch(ne){i.value=ne,n.value=it.ERROR,f("onError",ne),B(ne)}}),y=()=>{u=!0,fe(),ee(),s&&(s.close(1e3,"User disconnected"),s=null),n.value=it.DISCONNECTED,r.value=[],l.value=new Set,m.clear()},T=U=>s&&s.readyState===WebSocket.OPEN?(s.send(JSON.stringify(U)),!0):!1,O=U=>T(U)?!0:(r.value.length<t.messageBufferSize?r.value=[...r.value,U]:console.warn("[ChatWebSocket] Message buffer full, dropping message"),!1),D=(U,B=[])=>new Promise((de,ne)=>{const se=h();m.set(se,{resolve:de,reject:ne}),T({msg:"method",method:U,id:se,params:B})||(m.delete(se),ne(new Error("WebSocket not connected"))),setTimeout(()=>{m.has(se)&&(m.delete(se),ne(new Error(`Method ${U} timed out`)))},3e4)}),I=(U,B,de)=>{switch(U.msg){case"connected":Q(),C(B,de);break;case"ping":T({msg:"pong"});break;case"pong":break;case"result":A(U);break;case"ready":break;case"added":case"changed":case"removed":w(U);break;case"error":X(U,de);break;case"failed":console.error("[ChatWebSocket] DDP version negotiation failed"),n.value=it.ERROR,de&&de(new Error("DDP version negotiation failed"));break;default:f("onMessage",U)}},C=async(U,B)=>{n.value=it.AUTHENTICATING;try{const de=await oa.getCredentials();if(!de)throw new Error("No credentials available");const ne=await D("login",[{resume:de.authToken}]);if(ne&&ne.id)n.value=it.READY,G(),N(),f("onReady"),U&&U();else throw new Error("Authentication failed")}catch(de){console.error("[ChatWebSocket] Authentication failed:",de),i.value=de,n.value=it.ERROR,f("onError",de),B&&B(de)}},A=U=>{const B=m.get(U.id);B&&(m.delete(U.id),U.error?B.reject(new Error(U.error.message||"Method error")):B.resolve(U.result))},w=U=>{const{collection:B,fields:de}=U;if(B==="stream-room-messages"){if(de&&de.args){const[ne]=de.args;f("onRoomMessage",ne)}}else if(B==="stream-notify-room"){if(de&&de.args){const[ne,...se]=de.args;ne==="typing"&&f("onTyping",...se)}}else B==="stream-notify-user"&&de&&de.args&&f("onMessage",{type:"user-notification",data:de.args})},X=(U,B)=>{const de=new Error(U.reason||"Unknown error");i.value=de,f("onError",de),B&&B(de)},R=async U=>{if(l.value.has(U))return;const B=h();T({msg:"sub",id:B,name:"stream-room-messages",params:[U,!1]});const de=h();T({msg:"sub",id:de,name:"stream-notify-room",params:[`${U}/typing`,!1]}),l.value=new Set([...l.value,U])},Y=U=>{l.value=new Set([...l.value].filter(B=>B!==U))},N=()=>{const U=[...l.value];l.value=new Set,U.forEach(B=>{R(B)})},V=async(U,B)=>D("sendMessage",[{_id:h(),rid:U,msg:B}]),le=(U,B,de)=>{T({msg:"method",method:"stream-notify-room",id:h(),params:[`${U}/typing`,B,de]})},Q=()=>{fe(),c=setInterval(()=>{s&&s.readyState===WebSocket.OPEN&&T({msg:"ping"})},t.heartbeatInterval)},fe=()=>{c&&(clearInterval(c),c=null)},K=()=>{if(o.value>=t.maxReconnectAttempts){console.error("[ChatWebSocket] Max reconnection attempts reached"),n.value=it.ERROR;return}n.value=it.RECONNECTING,o.value++;const U=Math.min(t.reconnectInterval*Math.pow(t.reconnectDecay,o.value-1),t.maxReconnectInterval);f("onReconnecting",o.value,U),d=setTimeout(()=>{u||S().catch(()=>{})},U)},ee=()=>{d&&(clearTimeout(d),d=null)},G=()=>{if(s&&s.readyState===WebSocket.OPEN&&r.value.length>0){const U=[...r.value];r.value=[],U.forEach(B=>{T(B)})}},P=()=>n.value===it.READY&&s&&s.readyState===WebSocket.OPEN,pe=()=>s&&s.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{y()}),{connectionState:e.readonly(n),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(r),subscribedRooms:e.readonly(l),connect:S,disconnect:y,isConnected:pe,isReady:P,subscribeRoom:R,unsubscribeRoom:Y,sendChatMessage:V,sendTyping:le,callMethod:D,send:O,on:g,off:_}}const Ug=Fe.defineStore({id:"chat",state:()=>({enabled:!1,loaded:!1,hasCredentials:!1,connectionState:it.DISCONNECTED,lastError:null,rooms:[],currentRoomId:null,messagesByRoom:{},unreadCounts:{},typingByRoom:{},currentUser:null,_webSocket:null}),getters:{currentRoom:a=>a.currentRoomId&&a.rooms.find(t=>t._id===a.currentRoomId)||null,currentMessages:a=>a.currentRoomId?a.messagesByRoom[a.currentRoomId]||[]:[],currentTypingUsers:a=>a.currentRoomId?a.typingByRoom[a.currentRoomId]||[]:[],totalUnreadCount:a=>Object.values(a.unreadCounts).reduce((t,n)=>t+n,0),isReady:a=>a.enabled&&a.hasCredentials&&a.connectionState===it.READY,isConnecting:a=>a.connectionState===it.CONNECTING||a.connectionState===it.AUTHENTICATING,isReconnecting:a=>a.connectionState===it.RECONNECTING,isAvailable:a=>a.enabled&&a.loaded&&a.hasCredentials},actions:{async init(){try{const a=je();if(oa.init({CHAT_ENABLED:a.CHAT_ENABLED,ROCKETCHAT_HOST:a.ROCKETCHAT_HOST,ROCKETCHAT_WS_URL:a.ROCKETCHAT_WS_URL,CHAT_OAUTH_ENABLED:a.CHAT_OAUTH_ENABLED,CHAT_OAUTH_SERVICE:a.CHAT_OAUTH_SERVICE}),this.enabled=oa.isEnabled(),this.enabled){const t=await oa.getCredentials();this.hasCredentials=!!t,this.hasCredentials&&(this.currentUser=await oa.getCurrentUser())}this.loaded=!0,console.log("[ChatStore] Initialized, enabled:",this.enabled,"hasCredentials:",this.hasCredentials)}catch(a){console.error("[ChatStore] Failed to initialize:",a),this.enabled=!1,this.loaded=!0}},async connect(){if(!this.enabled||!this.hasCredentials)return console.warn("[ChatStore] Cannot connect: chat not available"),!1;if(this._webSocket&&this.connectionState===it.READY)return!0;try{return this._webSocket=Vg(),this._webSocket.on("onReady",()=>{this.connectionState=it.READY,this.loadRooms(),this.currentRoomId&&this._webSocket.subscribeRoom(this.currentRoomId)}),this._webSocket.on("onDisconnected",()=>{this.connectionState=it.DISCONNECTED}),this._webSocket.on("onReconnecting",a=>{this.connectionState=it.RECONNECTING,console.log("[ChatStore] Reconnecting, attempt:",a)}),this._webSocket.on("onError",a=>{this.lastError=a,this.connectionState=it.ERROR}),this._webSocket.on("onRoomMessage",a=>{this.handleNewMessage(a)}),this._webSocket.on("onTyping",(a,t)=>{this.handleTypingIndicator(a,t)}),this.connectionState=it.CONNECTING,await this._webSocket.connect(),!0}catch(a){return console.error("[ChatStore] Connection failed:",a),this.lastError=a,this.connectionState=it.ERROR,!1}},disconnect(){this._webSocket&&(this._webSocket.disconnect(),this._webSocket=null),this.connectionState=it.DISCONNECTED},async loadRooms(){try{const a=await An.getSubscriptions();this.rooms=a.map(n=>({_id:n.rid,name:n.name,fname:n.fname||n.name,type:n.t,unread:n.unread||0,lastMessage:n.lastMessage,updatedAt:n._updatedAt}));const t={};a.forEach(n=>{n.unread>0&&(t[n.rid]=n.unread)}),this.unreadCounts=t}catch(a){console.error("[ChatStore] Failed to load rooms:",a)}},async selectRoom(a){if(!a){this.currentRoomId=null;return}this.currentRoomId=a,this._webSocket&&this._webSocket.isReady()&&await this._webSocket.subscribeRoom(a),this.messagesByRoom[a]||await this.loadMessages(a),await this.markAsRead(a)},async loadMessages(a,t={}){try{const i=[...await An.getMessages(a,{count:t.count||50,oldest:t.oldest,latest:t.latest})].reverse();t.prepend&&this.messagesByRoom[a]?this.messagesByRoom[a]=[...i,...this.messagesByRoom[a]]:this.messagesByRoom[a]=i}catch(n){console.error("[ChatStore] Failed to load messages:",n)}},async sendMessage(a){if(!(!this.currentRoomId||!a.trim()))try{this._webSocket&&this._webSocket.isReady()?await this._webSocket.sendChatMessage(this.currentRoomId,a):await An.sendMessage(this.currentRoomId,a)}catch(t){throw console.error("[ChatStore] Failed to send message:",t),t}},async markAsRead(a){try{await An.markAsRead(a),this.unreadCounts[a]=0}catch(t){console.error("[ChatStore] Failed to mark as read:",t)}},handleNewMessage(a){const t=a.rid;this.messagesByRoom[t]||(this.messagesByRoom[t]=[]),a.ts&&typeof a.ts=="object"&&a.ts.$date&&(a.ts=new Date(a.ts.$date).toISOString()),this.messagesByRoom[t].some(i=>i._id===a._id)||(this.messagesByRoom[t].push(a),t!==this.currentRoomId&&(this.unreadCounts[t]=(this.unreadCounts[t]||0)+1))},handleTypingIndicator(a,t){const n=this.currentRoomId;n&&(this.currentUser&&a===this.currentUser.username||(this.typingByRoom[n]||(this.typingByRoom[n]=[]),t?this.typingByRoom[n].includes(a)||this.typingByRoom[n].push(a):this.typingByRoom[n]=this.typingByRoom[n].filter(i=>i!==a)))},sendTypingIndicator(a){!this.currentRoomId||!this.currentUser||!this._webSocket||!this._webSocket.isReady()||this._webSocket.sendTyping(this.currentRoomId,this.currentUser.username,a)},async getOrCreateWorkspaceRoom(a){try{let t=await vi.getWorkspaceRoom(a);return t.found||(t=await vi.createWorkspaceRoom(a)),t&&t.roomId?(await this.loadRooms(),t):null}catch(t){return console.error("[ChatStore] Failed to get/create workspace room:",t),null}},async uploadFile(a,t=""){if(!this.currentRoomId)throw new Error("No room selected");try{await An.uploadFile(this.currentRoomId,a,t)}catch(n){throw console.error("[ChatStore] Failed to upload file:",n),n}},clear(){this.disconnect(),this.rooms=[],this.currentRoomId=null,this.messagesByRoom={},this.unreadCounts={},this.typingByRoom={},this.currentUser=null,this.lastError=null}}}),WD={name:"ChatMessage",components:{PrimeAvatar:Ji},props:{message:{type:Object,required:!0},currentUserId:{type:String,default:""}},emits:["attachment-click"],computed:{isOwnMessage(){return this.message.u?._id===this.currentUserId},isSystemMessage(){return this.message.t!==void 0},hasAttachments(){return this.message.attachments&&this.message.attachments.length>0},avatarLabel(){return(this.message.u?.name||this.message.u?.username||"?").charAt(0).toUpperCase()},avatarColor(){const a=this.message.u?.username||"";let t=0;for(let i=0;i<a.length;i++)t=a.charCodeAt(i)+((t<<5)-t);return`hsl(${Math.abs(t%360)}, 65%, 45%)`},formattedTime(){if(!this.message.ts)return"";const a=new Date(this.message.ts),t=new Date;return a.toDateString()===t.toDateString()?a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):a.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},methods:{isImageAttachment(a){return a.image_url?!0:["image/jpeg","image/png","image/gif","image/webp"].includes(a.image_type)},getAttachmentUrl(a){const t=oa.getServerUrl(),n=a.image_url||a.title_link;return n?n.startsWith("http")?n:`${t}${n}`:""},openAttachment(a){this.$emit("attachment-click",a)}}},LD={key:0,class:"chat-message__avatar"},YD={class:"chat-message__content"},kD={key:0,class:"chat-message__header"},xD={key:0,class:"chat-message__username"},zD={class:"chat-message__time"},GD={class:"chat-message__body"},FD={key:0,class:"chat-message__text"},XD={key:1,class:"chat-message__attachments"},PD=["src","alt","onClick"],VD={key:1,class:"chat-message__attachment-file"},UD=["href"],jD={key:0,class:"attachment-desc"},BD={key:0,class:"chat-message__text mt-2"};function HD(a,t,n,i,o,r){const l=e.resolveComponent("PrimeAvatar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-message",{"chat-message--own":r.isOwnMessage,"chat-message--system":r.isSystemMessage}])},[!r.isOwnMessage&&!r.isSystemMessage?(e.openBlock(),e.createElementBlock("div",LD,[e.createVNode(l,{label:r.avatarLabel,style:e.normalizeStyle({backgroundColor:r.avatarColor}),shape:"circle"},null,8,["label","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",YD,[r.isSystemMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",kD,[r.isOwnMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",xD,e.toDisplayString(n.message.u?.name||n.message.u?.username||a.$t("chat.unknownUser")),1)),e.createElementVNode("span",zD,e.toDisplayString(r.formattedTime),1)])),e.createElementVNode("div",GD,[r.hasAttachments?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",FD,e.toDisplayString(n.message.msg),1)),r.hasAttachments?(e.openBlock(),e.createElementBlock("div",XD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.message.attachments,s=>(e.openBlock(),e.createElementBlock("div",{key:s._id||s.title,class:"chat-message__attachment"},[r.isImageAttachment(s)?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.getAttachmentUrl(s),alt:s.title||s.description,class:"chat-message__attachment-image",onClick:c=>r.openAttachment(s)},null,8,PD)):(e.openBlock(),e.createElementBlock("div",VD,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-attachment-line"},null,-1)),e.createElementVNode("a",{href:r.getAttachmentUrl(s),target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(s.title||a.$t("chat.attachment")),9,UD),s.description?(e.openBlock(),e.createElementBlock("span",jD,e.toDisplayString(s.description),1)):e.createCommentVNode("",!0)]))]))),128)),n.message.msg?(e.openBlock(),e.createElementBlock("div",BD,e.toDisplayString(n.message.msg),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])],2)}const Ac=Se(WD,[["render",HD],["__scopeId","data-v-4292a3b6"]]),JD={name:"ChatInput",components:{PrimeButton:ce,PrimeTextarea:va},props:{disabled:{type:Boolean,default:!1},typingUsers:{type:Array,default:()=>[]}},emits:["send","typing","upload"],data(){return{message:"",selectedFiles:[],typingTimeout:null,isTyping:!1}},computed:{canSend(){return this.message.trim().length>0||this.selectedFiles.length>0},typingText(){return this.typingUsers.length===0?"":this.typingUsers.length===1?this.$t("chat.userTyping",{user:this.typingUsers[0]}):this.typingUsers.length===2?this.$t("chat.usersTyping",{user1:this.typingUsers[0],user2:this.typingUsers[1]}):this.$t("chat.multipleUsersTyping")}},beforeUnmount(){this.typingTimeout&&clearTimeout(this.typingTimeout),this.isTyping&&this.$emit("typing",!1)},methods:{handleKeyDown(a){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),this.sendMessage())},handleInput(){this.isTyping||(this.isTyping=!0,this.$emit("typing",!0)),this.typingTimeout&&clearTimeout(this.typingTimeout),this.typingTimeout=setTimeout(()=>{this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1))},3e3)},sendMessage(){if(this.canSend){if(this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1)),this.selectedFiles.length>0){this.selectedFiles.forEach(a=>{this.$emit("upload",a,this.message)}),this.selectedFiles=[],this.message="";return}this.message.trim()&&(this.$emit("send",this.message.trim()),this.message="")}},triggerFileInput(){this.$refs.fileInput.click()},handleFileSelect(a){const t=Array.from(a.target.files);this.selectedFiles=[...this.selectedFiles,...t],a.target.value=""},removeFile(a){this.selectedFiles.splice(a,1)}}},QD={class:"chat-input"},KD={class:"chat-input__container"},qD={key:0,class:"chat-input__typing"},$D={class:"typing-text"},ew={key:1,class:"chat-input__files"},tw={class:"file-name"};function aw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeTextarea");return e.openBlock(),e.createElementBlock("div",QD,[e.createElementVNode("div",KD,[e.createVNode(l,{type:"button",icon:"ri-attachment-line",text:"",rounded:"",disabled:n.disabled,"aria-label":a.$t("chat.attachFile"),onClick:r.triggerFileInput},null,8,["disabled","aria-label","onClick"]),e.createElementVNode("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:t[0]||(t[0]=(...c)=>r.handleFileSelect&&r.handleFileSelect(...c))},null,544),e.createVNode(s,{modelValue:o.message,"onUpdate:modelValue":t[1]||(t[1]=c=>o.message=c),placeholder:a.$t("chat.typeMessage"),disabled:n.disabled,"auto-resize":"",rows:1,class:"chat-input__textarea",onKeydown:r.handleKeyDown,onInput:r.handleInput},null,8,["modelValue","placeholder","disabled","onKeydown","onInput"]),e.createVNode(l,{type:"button",icon:"ri-send-plane-2-fill",rounded:"",disabled:n.disabled||!r.canSend,"aria-label":a.$t("chat.send"),onClick:r.sendMessage},null,8,["disabled","aria-label","onClick"])]),n.typingUsers.length>0?(e.openBlock(),e.createElementBlock("div",qD,[t[2]||(t[2]=e.createElementVNode("span",{class:"typing-dots"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")],-1)),e.createElementVNode("span",$D,e.toDisplayString(r.typingText),1)])):e.createCommentVNode("",!0),o.selectedFiles.length>0?(e.openBlock(),e.createElementBlock("div",ew,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedFiles,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"chat-input__file"},[t[3]||(t[3]=e.createElementVNode("i",{class:"ri-file-line"},null,-1)),e.createElementVNode("span",tw,e.toDisplayString(c.name),1),e.createVNode(l,{type:"button",icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:u=>r.removeFile(d)},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)])}const Oc=Se(JD,[["render",aw],["__scopeId","data-v-7f372c65"]]),nw={name:"ChatRoomList",components:{PrimeInputText:at,PrimeBadge:wn},props:{rooms:{type:Array,default:()=>[]},selectedRoomId:{type:String,default:null},unreadCounts:{type:Object,default:()=>({})}},emits:["select"],data(){return{searchQuery:""}},computed:{filteredRooms(){if(!this.searchQuery.trim())return this.sortedRooms;const a=this.searchQuery.toLowerCase();return this.sortedRooms.filter(t=>(t.fname||t.name||"").toLowerCase().includes(a))},sortedRooms(){return[...this.rooms].sort((a,t)=>{const n=this.unreadCounts[a._id]||0,i=this.unreadCounts[t._id]||0;if(n!==i)return i-n;const o=new Date(a.updatedAt||0);return new Date(t.updatedAt||0)-o})}},methods:{selectRoom(a){this.$emit("select",a._id)},getUnreadCount(a){return this.unreadCounts[a]||0},getRoomIcon(a){switch(a.type){case"c":return"ri-hashtag";case"p":return"ri-lock-line";case"d":return"ri-user-line";default:return"ri-chat-3-line"}},truncateMessage(a){if(!a)return"";const t=40;return a.length<=t?a:a.substring(0,t)+"..."}}},iw={class:"chat-room-list"},ow={class:"chat-room-list__search"},rw={class:"p-input-icon-left w-full"},lw={class:"chat-room-list__items"},sw=["onClick"],cw={class:"chat-room-item__icon"},dw={class:"chat-room-item__info"},mw={class:"chat-room-item__name"},pw={key:0,class:"chat-room-item__last-message"},uw={key:0,class:"last-message-user"},bw={key:0,class:"chat-room-list__empty"};function gw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeBadge");return e.openBlock(),e.createElementBlock("div",iw,[e.createElementVNode("div",ow,[e.createElementVNode("span",rw,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-search-line"},null,-1)),e.createVNode(l,{modelValue:o.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=c=>o.searchQuery=c),placeholder:a.$t("chat.searchRooms"),class:"w-full"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",lw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.filteredRooms,c=>(e.openBlock(),e.createElementBlock("div",{key:c._id,class:e.normalizeClass(["chat-room-item",{"chat-room-item--selected":c._id===n.selectedRoomId}]),onClick:d=>r.selectRoom(c)},[e.createElementVNode("div",cw,[e.createElementVNode("i",{class:e.normalizeClass(r.getRoomIcon(c))},null,2)]),e.createElementVNode("div",dw,[e.createElementVNode("div",mw,e.toDisplayString(c.fname||c.name),1),c.lastMessage?(e.openBlock(),e.createElementBlock("div",pw,[c.lastMessage.u?(e.openBlock(),e.createElementBlock("span",uw,e.toDisplayString(c.lastMessage.u.name||c.lastMessage.u.username)+": ",1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.truncateMessage(c.lastMessage.msg)),1)])):e.createCommentVNode("",!0)]),r.getUnreadCount(c._id)>0?(e.openBlock(),e.createBlock(s,{key:0,value:r.getUnreadCount(c._id),severity:"danger",class:"chat-room-item__badge"},null,8,["value"])):e.createCommentVNode("",!0)],10,sw))),128)),r.filteredRooms.length===0?(e.openBlock(),e.createElementBlock("div",bw,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-chat-3-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.noRooms")),1)])):e.createCommentVNode("",!0)])])}const Cc=Se(nw,[["render",gw],["__scopeId","data-v-4c6163fd"]]),_w={name:"ChatPanel",components:{PrimeButton:ce,PrimeProgressSpinner:ea,ChatMessage:Ac,ChatInput:Oc,ChatRoomList:Cc},props:{showRoomList:{type:Boolean,default:!0},roomId:{type:String,default:null}},emits:["close","minimize","go-to-profile"],data(){return{minimized:!1,loadingMore:!1}},computed:{...Fe.mapStores(Ug),currentRoom(){return this.chatStore.currentRoom},currentUserId(){return this.chatStore.currentUser?._id||""},headerTitle(){return this.currentRoom?this.currentRoom.fname||this.currentRoom.name:this.$t("chat.title")},canLoadMore(){return this.chatStore.currentMessages.length>=50}},watch:{roomId:{immediate:!0,handler(a){a&&this.selectRoom(a)}},"chatStore.currentMessages":{handler(){this.$nextTick(()=>{this.scrollToBottom()})}}},async mounted(){await this.initChat()},beforeUnmount(){},methods:{async initChat(){this.chatStore.loaded||await this.chatStore.init(),this.chatStore.isAvailable&&!this.chatStore.isReady&&await this.chatStore.connect()},async selectRoom(a){await this.chatStore.selectRoom(a),this.$nextTick(()=>{this.scrollToBottom()})},backToRoomList(){this.chatStore.selectRoom(null)},async sendMessage(a){try{await this.chatStore.sendMessage(a),this.$nextTick(()=>{this.scrollToBottom()})}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.sendError"),life:3e3})}},handleTyping(a){this.chatStore.sendTypingIndicator(a)},async uploadFile(a,t){try{await this.chatStore.uploadFile(a,t)}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.uploadError"),life:3e3})}},async loadMoreMessages(){if(!this.chatStore.currentRoomId||this.loadingMore)return;this.loadingMore=!0;const a=this.chatStore.currentMessages,t=a.length>0?a[0].ts:void 0;try{await this.chatStore.loadMessages(this.chatStore.currentRoomId,{count:50,latest:t,prepend:!0})}finally{this.loadingMore=!1}},handleAttachmentClick(a){const t=a.image_url||a.title_link;t&&window.open(t,"_blank","noopener,noreferrer")},scrollToBottom(){const a=this.$refs.messagesContainer;a&&(a.scrollTop=a.scrollHeight)},toggleMinimize(){this.minimized=!this.minimized,this.$emit("minimize",this.minimized)},close(){this.$emit("close")},goToProfile(){this.$emit("go-to-profile")},async reconnect(){await this.chatStore.connect()}}},hw={class:"chat-panel__header"},yw={class:"chat-panel__header-left"},fw={class:"chat-panel__title"},Nw={class:"chat-panel__header-actions"},Sw={class:"chat-panel__body"},Ew={key:0,class:"chat-panel__status"},Tw={key:0,class:"status-connecting"},Aw={key:1,class:"status-reconnecting"},Ow={key:2,class:"status-not-configured"},Cw={key:3,class:"status-error"},Rw={ref:"messagesContainer",class:"chat-panel__messages"},Iw={key:0,class:"chat-panel__load-more"},Mw={key:1,class:"chat-panel__empty"};function vw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeButton"),s=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("ChatRoomList"),d=e.resolveComponent("ChatMessage"),u=e.resolveComponent("ChatInput");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-panel",{"chat-panel--minimized":o.minimized}])},[e.createElementVNode("div",hw,[e.createElementVNode("div",yw,[n.showRoomList&&r.currentRoom?(e.openBlock(),e.createBlock(l,{key:0,type:"button",icon:"ri-arrow-left-line",text:"",rounded:"",onClick:r.backToRoomList},null,8,["onClick"])):e.createCommentVNode("",!0),e.createElementVNode("h3",fw,e.toDisplayString(r.headerTitle),1)]),e.createElementVNode("div",Nw,[e.createVNode(l,{type:"button",icon:o.minimized?"ri-fullscreen-line":"ri-subtract-line",text:"",rounded:"",onClick:r.toggleMinimize},null,8,["icon","onClick"]),e.createVNode(l,{type:"button",icon:"ri-close-line",text:"",rounded:"",onClick:r.close},null,8,["onClick"])])]),e.withDirectives(e.createElementVNode("div",Sw,[a.chatStore.isReady?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.showRoomList&&!r.currentRoom?(e.openBlock(),e.createBlock(c,{key:0,rooms:a.chatStore.rooms,"selected-room-id":a.chatStore.currentRoomId,"unread-counts":a.chatStore.unreadCounts,onSelect:r.selectRoom},null,8,["rooms","selected-room-id","unread-counts","onSelect"])):r.currentRoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Rw,[r.canLoadMore?(e.openBlock(),e.createElementBlock("div",Iw,[e.createVNode(l,{label:a.$t("chat.loadMore"),text:"",size:"small",loading:o.loadingMore,onClick:r.loadMoreMessages},null,8,["label","loading","onClick"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.chatStore.currentMessages,b=>(e.openBlock(),e.createBlock(d,{key:b._id,message:b,"current-user-id":r.currentUserId,onAttachmentClick:r.handleAttachmentClick},null,8,["message","current-user-id","onAttachmentClick"]))),128)),a.chatStore.currentMessages.length===0?(e.openBlock(),e.createElementBlock("div",Mw,[t[2]||(t[2]=e.createElementVNode("i",{class:"ri-chat-smile-2-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.noMessages")),1)])):e.createCommentVNode("",!0)],512),e.createVNode(u,{disabled:!a.chatStore.isReady,"typing-users":a.chatStore.currentTypingUsers,onSend:r.sendMessage,onTyping:r.handleTyping,onUpload:r.uploadFile},null,8,["disabled","typing-users","onSend","onTyping","onUpload"])],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",Ew,[a.chatStore.isConnecting?(e.openBlock(),e.createElementBlock("div",Tw,[e.createVNode(s,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(a.$t("chat.connecting")),1)])):a.chatStore.isReconnecting?(e.openBlock(),e.createElementBlock("div",Aw,[e.createVNode(s,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(a.$t("chat.reconnecting")),1)])):a.chatStore.hasCredentials?a.chatStore.lastError?(e.openBlock(),e.createElementBlock("div",Cw,[t[1]||(t[1]=e.createElementVNode("i",{class:"ri-error-warning-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.connectionError")),1),e.createVNode(l,{label:a.$t("chat.retry"),outlined:"",onClick:r.reconnect},null,8,["label","onClick"])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ow,[t[0]||(t[0]=e.createElementVNode("i",{class:"ri-key-line"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("chat.notConfigured")),1),e.createVNode(l,{label:a.$t("chat.configureInProfile"),outlined:"",onClick:r.goToProfile},null,8,["label","onClick"])]))]))],512),[[e.vShow,!o.minimized]])],2)}const jg=Se(_w,[["render",vw],["__scopeId","data-v-2c95abae"]]),Zw={name:"WorkspaceCard",directives:{tooltip:Mt},props:{workspace:{type:Object,required:!0},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},clickable:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},noDescriptionText:{type:String,default:"Aucune description"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},roleTooltips:{type:Object,default:()=>({})}},emits:["click","action-menu"],computed:{description(){return this.workspace.description||this.workspace.properties?.["cm:description"]||""},visibilityIcon(){return{PUBLIC:"ri-global-line",PRIVATE:"ri-lock-line",MODERATED:"ri-shield-user-line"}[this.workspace.visibility]||"ri-question-line"},visibilityLabel(){return this.visibilityLabels[this.workspace.visibility]?this.visibilityLabels[this.workspace.visibility]:{PUBLIC:"Public",PRIVATE:"Privé",MODERATED:"Modéré"}[this.workspace.visibility]||this.workspace.visibility},roleLabel(){return this.roleLabels[this.workspace.role]?this.roleLabels[this.workspace.role]:this.workspace.role},roleTooltip(){return this.roleTooltips[this.workspace.role]?this.roleTooltips[this.workspace.role]:{SiteManager:"Vous pouvez gérer cet espace",SiteCollaborator:"Vous pouvez modifier le contenu",SiteContributor:"Vous pouvez ajouter du contenu",SiteConsumer:"Vous pouvez consulter le contenu"}[this.workspace.role]||""}},methods:{handleClick(){this.clickable&&this.$emit("click",this.workspace)}}},Dw={class:"workspace-card-inner"},ww={class:"workspace-card-content"},Ww={class:"workspace-card-header"},Lw={class:"workspace-card-title"},Yw={class:"workspace-card-footer"},kw={class:"workspace-card-meta"},xw={class:"workspace-card-info"};function zw(a,t,n,i,o,r){const l=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["workspace-card",{"workspace-card-clickable":n.clickable}])},[t[4]||(t[4]=e.createElementVNode("div",{class:"workspace-card-accent"},null,-1)),e.createElementVNode("div",Dw,[e.createElementVNode("div",{class:"workspace-card-body",onClick:t[2]||(t[2]=(...s)=>r.handleClick&&r.handleClick(...s))},[e.createElementVNode("div",ww,[e.createElementVNode("div",Ww,[e.withDirectives((e.openBlock(),e.createElementBlock("span",Lw,[e.createTextVNode(e.toDisplayString(n.workspace.title),1)])),[[l,n.workspace.title,void 0,{top:!0}]]),e.createElementVNode("div",{class:"workspace-card-actions",onClick:t[1]||(t[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(a.$slots,"actions",{},()=>[n.showActionMenu?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"workspace-action-btn",onClick:t[0]||(t[0]=s=>a.$emit("action-menu",s,n.workspace))},[...t[3]||(t[3]=[e.createElementVNode("i",{class:"ri-more-2-line"},null,-1)])])),[[l,n.actionMenuTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])]),n.showDescription?e.withDirectives((e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["workspace-card-description",{"no-description":!r.description}])},[e.createTextVNode(e.toDisplayString(r.description||n.noDescriptionText),1)],2)),[[l,r.description||null,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Yw,[e.createElementVNode("div",kw,[n.showRole&&n.workspace.role?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["workspace-role-badge",`workspace-role-${n.workspace.role.toLowerCase()}`])},[e.createTextVNode(e.toDisplayString(r.roleLabel),1)],2)),[[l,r.roleTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"meta",{},void 0,!0)]),e.createElementVNode("div",xw,[n.showVisibility?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.visibilityIcon,"workspace-visibility-icon"])},null,2)),[[l,r.visibilityLabel,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"footer-end",{},void 0,!0)])])])],2)}const Rc=Se(Zw,[["render",zw],["__scopeId","data-v-fa7e7cb3"]]),Gw={name:"WorkspaceList",components:{PrimeDataView:Bi,PrimeMenu:pn,WorkspaceCard:Rc},props:{workspaces:{type:Array,default:()=>[]},layout:{type:String,default:"grid",validator:a=>["grid","list"].includes(a)},paginator:{type:Boolean,default:!0},rows:{type:Number,default:12},rowsPerPageOptions:{type:Array,default:()=>[6,12,24,48]},emptyMessage:{type:String,default:"Aucun espace trouvé"},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},noDescriptionText:{type:String,default:"Aucune description"},roleTooltips:{type:Object,default:()=>({})},actionMenuItemsBuilder:{type:Function,default:null}},emits:["workspace-click","action-menu"],data(){return{currentActionMenuItems:[],currentWorkspace:null}},methods:{handleActionMenu(a,t){this.currentWorkspace=t,this.actionMenuItemsBuilder?(this.currentActionMenuItems=this.actionMenuItemsBuilder(t),this.$refs.actionMenu.toggle(a)):this.$emit("action-menu",a,t)}}},Fw={class:"workspace-list"},Xw={class:"workspace-list-empty"},Pw={class:"workspace-grid"},Vw={class:"workspace-list-view"};function Uw(a,t,n,i,o,r){const l=e.resolveComponent("WorkspaceCard"),s=e.resolveComponent("PrimeDataView"),c=e.resolveComponent("PrimeMenu");return e.openBlock(),e.createElementBlock("div",Fw,[e.createVNode(s,{value:n.workspaces,layout:n.layout,paginator:n.paginator,rows:n.rows,rowsPerPageOptions:n.rowsPerPageOptions},{empty:e.withCtx(()=>[e.createElementVNode("div",Xw,[e.renderSlot(a.$slots,"empty",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.emptyMessage),1)],!0)])]),grid:e.withCtx(d=>[e.createElementVNode("div",Pw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u.guid||u.name,class:"workspace-grid-item"},[e.renderSlot(a.$slots,"card",{workspace:u},()=>[e.createVNode(l,{workspace:u,showDescription:n.showDescription,showVisibility:n.showVisibility,showRole:n.showRole,showActionMenu:n.showActionMenu,actionMenuTooltip:n.actionMenuTooltip,noDescriptionText:n.noDescriptionText,roleLabels:n.roleLabels,visibilityLabels:n.visibilityLabels,roleTooltips:n.roleTooltips,onClick:b=>a.$emit("workspace-click",u),onActionMenu:r.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(a.$slots,"card-actions",{workspace:u},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(a.$slots,"card-meta",{workspace:u},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(a.$slots,"card-footer-end",{workspace:u},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),list:e.withCtx(d=>[e.createElementVNode("div",Vw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u.guid||u.name,class:"workspace-list-item"},[e.renderSlot(a.$slots,"list-item",{workspace:u},()=>[e.createVNode(l,{workspace:u,showDescription:n.showDescription,showVisibility:n.showVisibility,showRole:n.showRole,showActionMenu:n.showActionMenu,actionMenuTooltip:n.actionMenuTooltip,noDescriptionText:n.noDescriptionText,roleLabels:n.roleLabels,visibilityLabels:n.visibilityLabels,roleTooltips:n.roleTooltips,onClick:b=>a.$emit("workspace-click",u),onActionMenu:r.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(a.$slots,"card-actions",{workspace:u},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(a.$slots,"card-meta",{workspace:u},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(a.$slots,"card-footer-end",{workspace:u},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),_:3},8,["value","layout","paginator","rows","rowsPerPageOptions"]),e.createVNode(c,{ref:"actionMenu",model:o.currentActionMenuItems,popup:!0},null,8,["model"])])}const Bg=Se(Gw,[["render",Uw],["__scopeId","data-v-31d4e912"]]),jw={name:"PredefinedViewsPanel",components:{PrimeSelect:$t,PrimeTabs:Kn,PrimeTabList:qn,PrimeTab:Ja},props:{ancestorNodeId:{type:String,required:!0},displayContext:{type:String,default:"folderView"},initialCategory:{type:String,default:null},initialViewId:{type:String,default:null},categories:{type:Array,default:()=>[]},additionalViews:{type:Array,default:()=>[]}},emits:["load-view","category-change"],data(){return{selectedCategory:null,selectedViewId:null,isRestoringState:!1}},computed:{allViews(){return this.additionalViews},resolvedCategories(){return this.categories.filter(a=>a.display===void 0||a.display.includes(this.displayContext))},selectedCategoryObject(){return this.resolvedCategories.find(a=>a.id===this.selectedCategory)},currentViews(){if(!this.selectedCategory)return[];const a=this.selectedCategoryObject?.views||[];return this.allViews.filter(t=>t.filename&&a.includes(t.filename))}},watch:{resolvedCategories:{handler(a){a.length>0&&!this.selectedCategory&&(this.initialCategory&&a.some(t=>t.id===this.initialCategory)?(this.isRestoringState=!0,this.selectedCategory=this.initialCategory):this.selectedCategory=a[0].id,this.$nextTick(()=>{const t=this.currentViews;if(this.initialViewId&&t.some(n=>n.id===this.initialViewId)){this.selectedViewId=this.initialViewId;const n=t.find(i=>i.id===this.initialViewId);this.$emit("load-view",{view:n,ancestorNodeId:this.ancestorNodeId})}else this.isRestoringState=!1,this.$emit("category-change",{categoryId:this.selectedCategory,hasViews:t.length>0})}))},immediate:!0},selectedCategory(a){if(this.isRestoringState){this.isRestoringState=!1;return}this.selectedViewId=null,this.$nextTick(()=>{this.$emit("category-change",{categoryId:a,hasViews:this.currentViews.length>0})})},selectedViewId(a){if(a==null)return;const t=this.allViews.find(n=>n.id===a);t&&this.$emit("load-view",{view:t,ancestorNodeId:this.ancestorNodeId})},initialViewId(a){if(!a)return;this.allViews.find(n=>n.id===a)&&this.currentViews.some(n=>n.id===a)&&(this.selectedViewId=a)}}},Bw={key:0,class:"predefined-views-panel"},Hw={key:1,class:"panel-separator"},Jw={key:2,class:"tabs-wrapper"};function Qw(a,t,n,i,o,r){const l=e.resolveComponent("PrimeSelect"),s=e.resolveComponent("PrimeTab"),c=e.resolveComponent("PrimeTabList"),d=e.resolveComponent("PrimeTabs");return r.resolvedCategories.length>0?(e.openBlock(),e.createElementBlock("div",Bw,[r.resolvedCategories.length>1?(e.openBlock(),e.createBlock(l,{key:0,modelValue:o.selectedCategory,"onUpdate:modelValue":t[0]||(t[0]=u=>o.selectedCategory=u),options:r.resolvedCategories,"option-label":"label","option-value":"id",size:"small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),r.resolvedCategories.length>1&&r.currentViews.length>0?(e.openBlock(),e.createElementBlock("span",Hw)):e.createCommentVNode("",!0),r.currentViews.length>0?(e.openBlock(),e.createElementBlock("div",Jw,[e.createVNode(d,{value:o.selectedViewId,"onUpdate:value":t[1]||(t[1]=u=>o.selectedViewId=u),scrollable:""},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentViews,u=>(e.openBlock(),e.createBlock(s,{key:u.id,value:u.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const Kw=Se(jw,[["render",Qw],["__scopeId","data-v-63fa555e"]]),qw={class:"view-toolbar"},$w={class:"drop-zone-text"},eW={class:"drop-zone-hint"},tW={key:0,class:"text-center p-3"},aW={key:0,class:"selection-bar"},nW={class:"selection-info"},iW={class:"selection-text"},oW={class:"selection-actions"},rW={key:2,class:"p-3"},lW={class:"flex flex-column gap-3"},sW={class:"flex flex-column gap-1"},cW={for:"edit-view-name",class:"font-semibold"},dW={class:"flex flex-column gap-1"},mW={for:"edit-view-description",class:"font-semibold"},pW=Se({__name:"ViewList",props:{views:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["load-view","views-changed"],setup(a,{emit:t}){const n=Mt,i=a,o=t,r=pa.useToast(),l=ri.useConfirm(),{t:s}=ta.useI18n(),c=e.ref(null),d=e.ref([]),u=e.ref(!1),b=e.ref(!1),m=e.ref(null),p=e.ref(""),g=e.ref(""),_=e.ref(0),f=e.ref(10),h=e.computed(()=>i.views.slice(_.value,_.value+f.value)),S=K=>{_.value=K.first,f.value=K.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const y=[{key:"name",label:s("adminViewList.existingViews.title"),visible:!0}],T=(K,ee)=>{na.getView(ee.name).then(G=>{const P=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),pe=URL.createObjectURL(P),U=document.createElement("a");U.href=pe,U.download=ee.name,U.click(),URL.revokeObjectURL(pe)}).catch(G=>{console.error("Failed to download view",G),r.add({severity:"error",summary:s("adminViewList.toast.downloadError.summary"),detail:s("adminViewList.toast.downloadError.detail"),life:4e3})})},O=(K,ee)=>{l.require({message:s("adminViewList.deleteView.confirmMessage",{name:ee.name}),header:s("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{Re.deleteNode(ee.id,"fichier").then(()=>{r.add({severity:"success",summary:s("adminViewList.deleteView.toast.success.summary"),detail:s("adminViewList.deleteView.toast.success.detail",{name:ee.name}),life:3e3}),d.value=d.value.filter(G=>G.id!==ee.id),o("views-changed")}).catch(G=>{console.error("Failed to delete view",G),r.add({severity:"error",summary:s("adminViewList.deleteView.toast.error.summary"),detail:s("adminViewList.deleteView.toast.error.detail"),life:4e3})})}})},D=async(K,ee)=>{m.value=ee;try{const G=await na.getView(ee.name);p.value=G.name||ee.name.replace(/^vue-|\.json$/g,""),g.value=G.description||""}catch{p.value=ee.name.replace(/^vue-|\.json$/g,""),g.value=""}b.value=!0},I=async()=>{if(!(!m.value||!p.value))try{const K=await na.getView(m.value.name);K.name=p.value,K.description=g.value,await na.saveView(m.value.name,K),r.add({severity:"success",summary:s("adminViewList.editView.toast.success.summary"),detail:s("adminViewList.editView.toast.success.detail"),life:3e3}),b.value=!1,o("views-changed")}catch(K){console.error("Failed to update view details",K),r.add({severity:"error",summary:s("adminViewList.editView.toast.error.summary"),detail:s("adminViewList.editView.toast.error.detail"),life:4e3})}},C=[{icon:"ri-pencil-line",tooltip:s("adminViewList.editView.button"),handler:D},{icon:"ri-download-line",tooltip:s("adminViewList.existingViews.download"),handler:T},{icon:"ri-delete-bin-line",tooltip:s("adminViewList.deleteView.button"),severity:"danger",handler:O,visible:K=>K.allowableOperations?.includes("delete")}],A=e.computed(()=>d.value.length===i.views.length&&i.views.length>0),w=()=>{d.value=[...i.views]},X=e.computed(()=>d.value.length>0&&d.value.every(K=>K.allowableOperations?.includes("delete"))),R=()=>{d.value.forEach(K=>{T(null,K)})},Y=()=>{const K=d.value.map(ee=>ee.name).join(", ");l.require({message:s("adminViewList.deleteView.confirmMessageMultiple",{count:d.value.length,names:K}),header:s("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{const ee=d.value.map(G=>Re.deleteNode(G.id,"fichier"));Promise.allSettled(ee).then(G=>{const P=G.filter(U=>U.status==="fulfilled").length,pe=G.filter(U=>U.status==="rejected").length;P>0&&r.add({severity:"success",summary:s("adminViewList.deleteView.toast.success.summary"),detail:s("adminViewList.deleteView.toast.successMultiple.detail",{count:P}),life:3e3}),pe>0&&r.add({severity:"error",summary:s("adminViewList.deleteView.toast.error.summary"),detail:s("adminViewList.deleteView.toast.errorMultiple.detail",{count:pe}),life:4e3}),d.value=[],o("views-changed")})}})},N=async()=>{try{const{default:K}=await Promise.resolve().then(()=>kk),ee=new K,G=i.views.map(async B=>{const de=await na.getView(B.name);ee.file(B.name,JSON.stringify(de,null,2))});await Promise.all(G);const P=await ee.generateAsync({type:"blob"}),pe=URL.createObjectURL(P),U=document.createElement("a");U.href=pe,U.download="vues.zip",U.click(),URL.revokeObjectURL(pe),r.add({severity:"success",summary:s("adminViewList.exportAll.toast.success.summary"),detail:s("adminViewList.exportAll.toast.success.detail",{count:i.views.length}),life:3e3})}catch(K){console.error("Failed to export views as ZIP",K),r.add({severity:"error",summary:s("adminViewList.exportAll.toast.error.summary"),detail:s("adminViewList.exportAll.toast.error.detail"),life:4e3})}},V=()=>{c.value.click()},le=K=>{const ee=Array.from(K.target.files);ee.length!==0&&(fe(ee),K.target.value="")},Q=K=>{u.value=!1;const ee=Array.from(K.dataTransfer.files).filter(G=>G.name.endsWith(".json"));if(ee.length===0){r.add({severity:"warn",summary:s("adminViewList.importView.toast.noJsonFiles.summary"),detail:s("adminViewList.importView.toast.noJsonFiles.detail"),life:4e3});return}fe(ee)},fe=async K=>{let ee=0,G=0;for(const P of K)try{const pe=await P.text(),U=JSON.parse(pe);let B=P.name.endsWith(".json")?P.name:`${P.name}.json`;B.startsWith("vue-")||(B=`vue-${B}`),await na.saveView(B,U),ee++}catch(pe){console.error(`Failed to import ${P.name}`,pe),G++}ee>0&&r.add({severity:"success",summary:s("adminViewList.importView.toast.success.summary"),detail:s("adminViewList.importView.toast.success.detail",{count:ee}),life:3e3}),G>0&&r.add({severity:"error",summary:s("adminViewList.importView.toast.error.summary"),detail:s("adminViewList.importView.toast.error.detail",{count:G}),life:4e3}),o("views-changed")};return(K,ee)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",qw,[e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.importView.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:V},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.exportAll.button"),icon:"ri-download-line",severity:"secondary",outlined:"",disabled:a.views.length===0,onClick:N},null,8,["label","disabled"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",multiple:"",style:{display:"none"},onChange:le},null,544)]),e.createElementVNode("div",{class:e.normalizeClass(["drop-zone",{"drop-zone--active":u.value}]),onDragover:ee[0]||(ee[0]=e.withModifiers(G=>u.value=!0,["prevent"])),onDragleave:ee[1]||(ee[1]=e.withModifiers(G=>u.value=!1,["prevent"])),onDrop:e.withModifiers(Q,["prevent"])},[ee[9]||(ee[9]=e.createElementVNode("i",{class:"ri-drag-drop-line drop-zone-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("span",$w,e.toDisplayString(e.unref(s)("adminViewList.dropZone.text")),1),e.createElementVNode("span",eW,e.toDisplayString(e.unref(s)("adminViewList.dropZone.hint")),1)],34),a.loading?(e.openBlock(),e.createElementBlock("div",tW,[ee[10]||(ee[10]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(s)("adminViewList.existingViews.loading")),1)])):a.views.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[d.value.length>0?(e.openBlock(),e.createElementBlock("div",aW,[e.createElementVNode("div",nW,[e.createElementVNode("span",iW,e.toDisplayString(e.unref(s)("adminViewList.selectionBar.selected",{count:d.value.length,total:a.views.length})),1),A.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:ee[2]||(ee[2]=G=>d.value=[])},e.toDisplayString(e.unref(s)("adminViewList.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:w},e.toDisplayString(e.unref(s)("adminViewList.selectionBar.selectAll",{total:a.views.length})),1))]),e.createElementVNode("div",oW,[e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:R},null,512),[[e.unref(n),e.unref(s)("adminViewList.selectionBar.downloadAll"),void 0,{top:!0}]]),ee[11]||(ee[11]=e.createElementVNode("div",{class:"action-separator"},null,-1)),X.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:Y},null,512)),[[e.unref(n),e.unref(s)("adminViewList.deleteView.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Yn,{files:h.value,"current-node":{id:"view-list"},"datatable-column-config":y,"inline-actions":C,"selected-nodes":d.value,"hide-more-actions":"","onUpdate:selectedNodes":ee[3]||(ee[3]=G=>d.value=G),onNavigateTo:ee[4]||(ee[4]=G=>o("load-view",G.name))},null,8,["files","selected-nodes"]),a.views.length>f.value?(e.openBlock(),e.createBlock(e.unref(Qn),{key:1,first:_.value,rows:f.value,"total-records":a.views.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:S},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",rW,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("adminViewList.existingViews.noViewsFound")),1)])),e.createVNode(e.unref(ao),{group:"deleteView"}),e.createVNode(e.unref(_t),{visible:b.value,"onUpdate:visible":ee[8]||(ee[8]=G=>b.value=G),header:e.unref(s)("adminViewList.editView.title"),modal:"",style:{width:"95vw",maxWidth:"30rem"}},{footer:e.withCtx(()=>[e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.editView.cancel"),severity:"secondary",text:"",onClick:ee[7]||(ee[7]=G=>b.value=!1)},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminViewList.editView.save"),icon:"ri-save-line",disabled:!p.value,onClick:I},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",lW,[e.createElementVNode("div",sW,[e.createElementVNode("label",cW,e.toDisplayString(e.unref(s)("adminViewList.editView.name")),1),e.createVNode(e.unref(at),{id:"edit-view-name",modelValue:p.value,"onUpdate:modelValue":ee[5]||(ee[5]=G=>p.value=G),placeholder:e.unref(s)("adminViewList.editView.namePlaceholder")},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",dW,[e.createElementVNode("label",mW,e.toDisplayString(e.unref(s)("adminViewList.editView.description")),1),e.createVNode(e.unref(va),{id:"edit-view-description",modelValue:g.value,"onUpdate:modelValue":ee[6]||(ee[6]=G=>g.value=G),placeholder:e.unref(s)("adminViewList.editView.descriptionPlaceholder"),rows:"3","auto-resize":""},null,8,["modelValue","placeholder"])])])]),_:1},8,["visible","header"])]))}},[["__scopeId","data-v-e15e3fbc"]]);class uW{getPlan(t){const n=je();return Qt.getConfig(n.INSTANCE_NAME,t).then(i=>i.jsonContent)}savePlan(t,n){const i=je();return Qt.updateConfig(i.INSTANCE_NAME,t,n)}async listPlans(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"plan-*.json"`},include:["properties"]};return(await Wt.search(n)).list.entries.map(o=>o.entry.name)}async getPlanWithPermissions(t){const i={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"${t}"`},include:["allowableOperations"]},[o,r]=await Promise.all([Wt.search(i),this.getPlan(t)]),s=o.list.entries[0]?.entry?.allowableOperations||[];return{content:r,allowableOperations:s}}async listPlanEntries(){const n={query:{language:"afts",query:`PATH:"/app:company_home/app:dictionary/cm:pristy-config/cm:${je().INSTANCE_NAME}/*" AND cm:name:"plan-*.json"`},include:["properties","allowableOperations"]};return(await Wt.search(n)).list.entries.map(o=>o.entry)}}const ga=new uW,bW={class:"create-plan-actions"},Hg=Se({__name:"ClassificationPlanCreate",emits:["create-plan","cancel"],setup(a,{emit:t}){const n=t,i=pa.useToast(),{t:o}=ta.useI18n(),r=e.ref(""),l=()=>{if(!r.value||!r.value.trim()){i.add({severity:"warn",summary:o("adminClassificationLauncher.toast.invalidName.summary"),detail:o("adminClassificationLauncher.toast.invalidName.detail"),life:3e3});return}const s=`plan-${r.value.trim()}.json`;n("create-plan",s)};return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null,e.toDisplayString(e.unref(o)("adminClassificationLauncher.createPlan.description")),1),e.createVNode(e.unref(ai),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Mn),null,{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("plan-",-1)])]),_:1}),e.createVNode(e.unref(at),{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),placeholder:e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-label":e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-required":"true",onKeyup:e.withKeys(l,["enter"])},null,8,["modelValue","placeholder","aria-label"]),e.createVNode(e.unref(Mn),null,{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1}),e.createElementVNode("div",bW,[e.createVNode(e.unref(ce),{label:e.unref(o)("adminClassificationLauncher.createPlan.cancel"),severity:"secondary",text:"",onClick:c[1]||(c[1]=d=>n("cancel"))},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(o)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",disabled:!r.value,onClick:l},null,8,["label","disabled"])])],64))}},[["__scopeId","data-v-a9d1e85f"]]),gW={class:"plan-toolbar"},_W={key:0,class:"text-center p-3"},hW={key:0,class:"selection-bar"},yW={class:"selection-info"},fW={class:"selection-text"},NW={class:"selection-actions"},SW={key:2,class:"p-3"},Jg=Se({__name:"ClassificationPlanList",props:{plans:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["select-plan","import-plan"],setup(a,{emit:t}){const n=Mt,i=a,o=t,r=pa.useToast(),l=ri.useConfirm(),{t:s}=ta.useI18n(),c=e.ref(null),d=e.ref(!1),u=e.ref([]),b=e.ref(0),m=e.ref(10),p=e.computed(()=>i.plans.slice(b.value,b.value+m.value)),g=R=>{b.value=R.first,m.value=R.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const _=[{key:"name",label:s("adminClassificationLauncher.existingPlans.title"),visible:!0}],f=(R,Y)=>{ga.getPlan(Y.name).then(N=>{const V=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),le=URL.createObjectURL(V),Q=document.createElement("a");Q.href=le,Q.download=Y.name,Q.click(),URL.revokeObjectURL(le)}).catch(N=>{console.error("Failed to download plan",N),r.add({severity:"error",summary:s("adminClassificationLauncher.toast.listError.summary"),detail:s("adminClassificationLauncher.toast.listError.detail"),life:4e3})})},h=(R,Y)=>{l.require({message:s("adminClassificationLauncher.deletePlan.confirmMessage",{name:Y.name}),header:s("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{Re.deleteNode(Y.id,"fichier").then(()=>{r.add({severity:"success",summary:s("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.success.detail",{name:Y.name}),life:3e3}),u.value=u.value.filter(N=>N.id!==Y.id),o("import-plan")}).catch(N=>{console.error("Failed to delete plan",N),r.add({severity:"error",summary:s("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.error.detail"),life:4e3})})}})},S=[{icon:"ri-download-line",tooltip:s("adminClassificationLauncher.existingPlans.download"),handler:f},{icon:"ri-delete-bin-line",tooltip:s("adminClassificationLauncher.deletePlan.button"),severity:"danger",handler:h,visible:R=>R.allowableOperations?.includes("delete")}],y=e.computed(()=>u.value.length===i.plans.length&&i.plans.length>0),T=()=>{u.value=[...i.plans]},O=e.computed(()=>u.value.length>0&&u.value.every(R=>R.allowableOperations?.includes("delete"))),D=()=>{u.value.forEach(R=>{f(null,R)})},I=()=>{u.value.forEach(R=>{o("select-plan",R.name)})},C=()=>{const R=u.value.map(Y=>Y.name).join(", ");l.require({message:s("adminClassificationLauncher.deletePlan.confirmMessageMultiple",{count:u.value.length,names:R}),header:s("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{const Y=u.value.map(N=>Re.deleteNode(N.id,"fichier"));Promise.allSettled(Y).then(N=>{const V=N.filter(Q=>Q.status==="fulfilled").length,le=N.filter(Q=>Q.status==="rejected").length;V>0&&r.add({severity:"success",summary:s("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.successMultiple.detail",{count:V}),life:3e3}),le>0&&r.add({severity:"error",summary:s("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:s("adminClassificationLauncher.deletePlan.toast.errorMultiple.detail",{count:le}),life:4e3}),u.value=[],o("import-plan")})}})},A=()=>{c.value.click()},w=R=>{const Y=R.target.files[0];if(!Y)return;const N=new FileReader;N.onload=V=>{try{const le=JSON.parse(V.target.result);if(!le.NATURES||!le.FIELDS||!le.EMPLACEMENT)throw new Error(s("adminClassificationLauncher.importPlan.invalidStructure"));let Q=Y.name.endsWith(".json")?Y.name:`${Y.name}.json`;Q.startsWith("plan-")||(Q=`plan-${Q}`),ga.savePlan(Q,le).then(()=>{r.add({severity:"success",summary:s("adminClassificationLauncher.importPlan.toast.success.summary"),detail:s("adminClassificationLauncher.importPlan.toast.success.detail",{filename:Q}),life:3e3}),o("import-plan"),o("select-plan",Q)}).catch(fe=>{console.error("Failed to save imported plan",fe),r.add({severity:"error",summary:s("adminClassificationLauncher.importPlan.toast.saveError.summary"),detail:s("adminClassificationLauncher.importPlan.toast.saveError.detail"),life:4e3})})}catch(le){r.add({severity:"error",summary:s("adminClassificationLauncher.importPlan.toast.parseError.summary"),detail:s("adminClassificationLauncher.importPlan.toast.parseError.detail",{message:le.message}),life:5e3})}},N.readAsText(Y),R.target.value=""},X=R=>{d.value=!1,o("select-plan",R)};return(R,Y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",gW,[e.createVNode(e.unref(ce),{label:e.unref(s)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",onClick:Y[0]||(Y[0]=N=>d.value=!0)},null,8,["label"]),e.createVNode(e.unref(ce),{label:e.unref(s)("adminClassificationLauncher.importPlan.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:A},null,8,["label"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",style:{display:"none"},onChange:w},null,544)]),a.loading?(e.openBlock(),e.createElementBlock("div",_W,[Y[6]||(Y[6]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(s)("adminClassificationLauncher.existingPlans.loading")),1)])):a.plans.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value.length>0?(e.openBlock(),e.createElementBlock("div",hW,[e.createElementVNode("div",yW,[e.createElementVNode("span",fW,e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.selected",{count:u.value.length,total:a.plans.length})),1),y.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:Y[1]||(Y[1]=N=>u.value=[])},e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:T},e.toDisplayString(e.unref(s)("adminClassificationLauncher.selectionBar.selectAll",{total:a.plans.length})),1))]),e.createElementVNode("div",NW,[e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-external-link-line",rounded:"",text:"",severity:"secondary",onClick:I},null,512),[[e.unref(n),e.unref(s)("adminClassificationLauncher.selectionBar.openAll"),void 0,{top:!0}]]),Y[7]||(Y[7]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(e.unref(ce),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:D},null,512),[[e.unref(n),e.unref(s)("adminClassificationLauncher.selectionBar.downloadAll"),void 0,{top:!0}]]),O.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(ce),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:C},null,512)),[[e.unref(n),e.unref(s)("adminClassificationLauncher.deletePlan.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Yn,{files:p.value,"current-node":{id:"classification-plans"},"datatable-column-config":_,"inline-actions":S,"selected-nodes":u.value,"onUpdate:selectedNodes":Y[2]||(Y[2]=N=>u.value=N),onNavigateTo:Y[3]||(Y[3]=N=>o("select-plan",N.name))},null,8,["files","selected-nodes"]),a.plans.length>m.value?(e.openBlock(),e.createBlock(e.unref(Qn),{key:1,first:b.value,rows:m.value,"total-records":a.plans.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:g},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",SW,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("adminClassificationLauncher.existingPlans.noPlansFound")),1)])),e.createVNode(e.unref(_t),{visible:d.value,"onUpdate:visible":Y[5]||(Y[5]=N=>d.value=N),header:e.unref(s)("adminClassificationLauncher.createPlan.title"),modal:"",style:{width:"30rem"}},{default:e.withCtx(()=>[e.createVNode(Hg,{onCreatePlan:X,onCancel:Y[4]||(Y[4]=N=>d.value=!1)})]),_:1},8,["visible","header"]),e.createVNode(e.unref(ao),{group:"deletePlan"})]))}},[["__scopeId","data-v-615a03cb"]]),EW={class:"p-4"},TW={class:"text-2xl m-0"},AW={__name:"AdminClassificationLauncher",emits:["select-plan"],setup(a,{emit:t}){const n=t,i=pa.useToast(),{t:o}=ta.useI18n(),r=e.ref(!0),l=e.ref([]),s=()=>{r.value=!0,ga.listPlanEntries().then(c=>{l.value=c.sort((d,u)=>d.name.localeCompare(u.name))}).catch(c=>{i.add({severity:"error",summary:o("adminClassificationLauncher.toast.listError.summary"),detail:o("adminClassificationLauncher.toast.listError.detail"),life:4e3}),console.error(c)}).finally(()=>{r.value=!1})};return e.onMounted(()=>{s()}),(c,d)=>(e.openBlock(),e.createElementBlock("div",EW,[e.createVNode(e.unref(oi),null,{title:e.withCtx(()=>[e.createElementVNode("h1",TW,e.toDisplayString(e.unref(o)("adminClassificationLauncher.title")),1)]),content:e.withCtx(()=>[e.createVNode(Jg,{plans:l.value,loading:r.value,onSelectPlan:d[0]||(d[0]=u=>n("select-plan",u)),onImportPlan:s},null,8,["plans","loading"])]),_:1})]))}};function ra(a){if(!a)return[];const t=/\${(.*?)}/g,n=a.matchAll(t);return Array.from(n,i=>i[1].split(":")[0].trim())}function Zi(a,t){return a?a.replace(/\${(.*?)}/g,(n,i)=>{const[o,r]=i.trim().split(":"),l=t[o];if(l==null)return n;let s=String(l);return r==="upper"&&(s=s.toUpperCase()),s}):""}class OW{getAspects(t={}){return oo.listAspects(t)}getAspect(t){return oo.getAspect(t)}getTypes(t={}){return ro.listTypes(t)}getType(t){return ro.getType(t)}extractPropertiesFromType(t){const n=[];return t.properties&&Object.entries(t.properties).forEach(([i,o])=>{n.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),n}extractPropertiesFromAspect(t){const n=[];return t.properties&&Object.entries(t.properties).forEach(([i,o])=>{n.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),n}async getAllPropertyKeys(){const t=new Set;try{const n=await this.getTypes({maxItems:1e3});if(n.list?.entries)for(const o of n.list.entries){const r=await this.getType(o.entry.id);this.extractPropertiesFromType(r.entry).forEach(s=>t.add(s.key))}const i=await this.getAspects({maxItems:1e3});if(i.list?.entries)for(const o of i.list.entries){const r=await this.getAspect(o.entry.id);this.extractPropertiesFromAspect(r.entry).forEach(s=>t.add(s.key))}}catch(n){console.error("Failed to fetch property keys from Alfresco",n)}return Array.from(t).sort()}}const _a=new OW,Qg=()=>({code:"",name:"",type:"cm:content",icon:"ri-file-line",emplacement:[],aspects:[],categories:[],metadata:{}}),CW={name:"NatureForm",components:{PrimeInputText:at,PrimeMultiSelect:Dn,PrimeDropdown:qa,PrimeInputSwitch:Jc,PrimeDataTable:Ia,PrimeColumn:Ma},props:{nature:{type:Object,default:null},emplacements:{type:Array,required:!0},existingNatures:{type:Array,default:()=>[]},isDuplicating:{type:Boolean,default:!1},categories:{type:Array,default:()=>[]}},emits:["save","cancel"],setup(){return{toast:pa.useToast()}},data(){return{editableNature:Qg(),editableMetadata:[],isEditMode:!1,metadataTypes:["ignored","value","field","template","parent"],remixIcons:["ri-file-line","ri-file-text-line","ri-file-pdf-line","ri-image-line","ri-film-line","ri-folder-line","ri-archive-line","ri-mail-line"],availableProperties:[],filteredProperties:[],selectedAspects:[],availableAspects:[]}},computed:{emplacementOptions(){return this.emplacements.map(a=>a.code)},calculatedPath(){return!this.editableNature.emplacement||this.editableNature.emplacement.length===0?"/":"/"+this.editableNature.emplacement.map(a=>{const t=this.emplacements.find(i=>i.code===a);if(!t)return`[${a}]`;const n=t.metadata?.["cm:name"];return n?.value||n?.template||a}).join("/")}},watch:{nature:{handler(a){a&&a.code?(this.isEditMode=!0,this.editableNature=JSON.parse(JSON.stringify(a))):(this.isEditMode=!1,this.editableNature=a?JSON.parse(JSON.stringify(a)):Qg()),this.selectedAspects=this.editableNature.aspects||[],this.metadataToObjectArray(this.editableNature.metadata)},immediate:!0},"editableNature.type":{handler(a){a&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{async loadAvailableAspects(){try{const a=await _a.getAspects({maxItems:1e3});a.list?.entries&&(this.availableAspects=a.list.entries.map(t=>({id:t.entry.id,title:t.entry.title||t.entry.id})))}catch(a){console.error("Failed to load available aspects",a),this.availableAspects=[]}},async loadAllProperties(){const a=[];if(this.editableNature.type)try{const t=await _a.getType(this.editableNature.type),n=_a.extractPropertiesFromType(t.entry);a.push(...n.map(i=>({...i,source:`Type: ${this.editableNature.type}`})))}catch(t){console.error("Failed to load properties for type",this.editableNature.type,t)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const t of this.selectedAspects)try{const n=await _a.getAspect(t),i=_a.extractPropertiesFromAspect(n.entry);a.push(...i.map(o=>({...o,source:`Aspect: ${t}`})))}catch(n){console.error("Failed to load properties for aspect",t,n)}this.availableProperties=a,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const a={};this.editableMetadata.forEach(n=>{a[n.key]={type:n.type,value:n.value,required:n.required,title:n.title}});const t=this.availableProperties.map(n=>a[n.key]?{key:n.key,title:n.title,type:a[n.key].type,value:a[n.key].value,required:a[n.key].required||!1}:{key:n.key,title:n.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(n=>{n.type!=="ignored"&&!this.availableProperties.find(i=>i.key===n.key)&&t.push({key:n.key,title:n.title||n.key,type:n.type,value:n.value,required:n.required})}),this.editableMetadata=t},searchProperties(a){const t=a.query.toLowerCase();t?this.filteredProperties=this.availableProperties.filter(n=>n.key.toLowerCase().includes(t)||n.title.toLowerCase().includes(t)||n.source&&n.source.toLowerCase().includes(t)):this.filteredProperties=this.availableProperties},metadataToObjectArray(a){if(!a){this.editableMetadata=[];return}const t=Object.entries(a).reduce((n,[i,o])=>{const r=Object.keys(o).find(c=>c!=="required"),l=o[r],s=o.required||!1;return n[i]={type:r,value:l,required:s},n},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(n=>{const i=t[n.key]||{type:"ignored",value:"",required:!1};return{key:n.key,title:n.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(a).map(([n,i])=>{const o=Object.keys(i).find(s=>s!=="required"),r=i[o],l=i.required||!1;return{key:n,type:o,value:r,required:l,title:n}})},metadataArrayToObject(){return this.editableMetadata.reduce((a,t)=>(t.key&&t.type!=="ignored"&&(a[t.key]={[t.type]:t.value},t.required&&t.type!=="parent"&&t.type!=="template"&&(a[t.key].required=!0)),a),{})},onMetadataTypeChange(a){if(a.type==="field"&&a.key&&!a.value){const t=a.key.split(":");t.length>1?a.value=t[t.length-1]:a.value=a.key}},addMetadata(){this.editableMetadata.push({key:"",type:"value",value:"",required:!1})},removeMetadata(a){this.editableMetadata.splice(a,1)},submit(){const a=Ft.global.t;if(!this.editableNature.code||!this.editableNature.name){this.toast.add({severity:"warn",summary:a("natureForm.validation.nameAndCodeRequired"),life:4e3});return}if((!this.isEditMode||this.isDuplicating)&&this.existingNatures.some(i=>i.code===this.editableNature.code)){this.toast.add({severity:"warn",summary:a("natureForm.validation.codeAlreadyExists",{code:this.editableNature.code}),life:4e3});return}const t={...this.editableNature,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",t)}}},RW={class:"flex flex-column gap-3"},IW={class:"form-field"},MW={class:"form-label",for:"name"},vW={class:"form-field"},ZW={class:"form-label",for:"code"},DW={class:"form-field"},wW={class:"form-label",for:"type"},WW={class:"form-field"},LW={class:"form-label",for:"aspects"},YW={class:"font-semibold"},kW={class:"text-color-secondary"},xW={class:"form-field"},zW={class:"form-label",for:"icon"},GW={key:0,class:"flex align-items-center"},FW={class:"flex align-items-center"},XW={key:0,class:"form-field"},PW={class:"form-label",for:"categories"},VW={class:"form-field"},UW={class:"form-label",for:"emplacement"},jW={class:"form-help"},BW={class:"form-field"},HW={class:"form-label"},JW={key:0,class:"text-center p-3 text-color-secondary"},QW={class:"form-help"};function KW(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeDropdown"),d=e.resolveComponent("PrimeColumn"),u=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable");return e.openBlock(),e.createElementBlock("div",RW,[e.createElementVNode("div",IW,[e.createElementVNode("label",MW,e.toDisplayString(a.$t("natureForm.name")),1),e.createVNode(l,{id:"name",modelValue:o.editableNature.name,"onUpdate:modelValue":t[0]||(t[0]=m=>o.editableNature.name=m),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",vW,[e.createElementVNode("label",ZW,e.toDisplayString(a.$t("natureForm.code")),1),e.createVNode(l,{id:"code",modelValue:o.editableNature.code,"onUpdate:modelValue":t[1]||(t[1]=m=>o.editableNature.code=m),disabled:o.isEditMode&&!n.isDuplicating,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",DW,[e.createElementVNode("label",wW,e.toDisplayString(a.$t("natureForm.documentType")),1),e.createVNode(l,{id:"type",modelValue:o.editableNature.type,"onUpdate:modelValue":t[2]||(t[2]=m=>o.editableNature.type=m),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",WW,[e.createElementVNode("label",LW,e.toDisplayString(a.$t("natureForm.aspects")),1),e.createVNode(s,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":t[3]||(t[3]=m=>o.selectedAspects=m),options:o.availableAspects,placeholder:a.$t("natureForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(m=>[e.createElementVNode("div",null,[e.createElementVNode("div",YW,e.toDisplayString(m.option.id),1),e.createElementVNode("small",kW,e.toDisplayString(m.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",xW,[e.createElementVNode("label",zW,e.toDisplayString(a.$t("natureForm.icon")),1),e.createVNode(c,{id:"icon",modelValue:o.editableNature.icon,"onUpdate:modelValue":t[4]||(t[4]=m=>o.editableNature.icon=m),options:o.remixIcons,placeholder:a.$t("natureForm.chooseIcon"),class:"w-full"},{value:e.withCtx(m=>[m.value?(e.openBlock(),e.createElementBlock("div",GW,[e.createElementVNode("i",{class:e.normalizeClass([m.value,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(m.value),1)])):e.createCommentVNode("",!0)]),option:e.withCtx(m=>[e.createElementVNode("div",FW,[e.createElementVNode("i",{class:e.normalizeClass([m.option,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(m.option),1)])]),_:1},8,["modelValue","options","placeholder"])]),n.categories.length>0?(e.openBlock(),e.createElementBlock("div",XW,[e.createElementVNode("label",PW,e.toDisplayString(a.$t("natureForm.categories")),1),e.createVNode(s,{id:"categories",modelValue:o.editableNature.categories,"onUpdate:modelValue":t[5]||(t[5]=m=>o.editableNature.categories=m),options:n.categories,placeholder:a.$t("natureForm.selectCategories"),optionLabel:"label",optionValue:"id",class:"w-full",filter:""},null,8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",VW,[e.createElementVNode("label",UW,e.toDisplayString(a.$t("natureForm.emplacement")),1),e.createVNode(s,{id:"emplacement",modelValue:o.editableNature.emplacement,"onUpdate:modelValue":t[6]||(t[6]=m=>o.editableNature.emplacement=m),options:r.emplacementOptions,placeholder:a.$t("natureForm.selectPath"),class:"w-full"},null,8,["modelValue","options","placeholder"]),e.createElementVNode("small",jW,[e.createTextVNode(e.toDisplayString(a.$t("natureForm.calculatedPath"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(r.calculatedPath),1)])]),e.createElementVNode("div",BW,[e.createElementVNode("label",HW,e.toDisplayString(a.$t("natureForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",JW,e.toDisplayString(a.$t("natureForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(d,{field:"key",header:a.$t("natureForm.key")},{body:e.withCtx(({data:m})=>[e.createElementVNode("strong",null,e.toDisplayString(m.key),1),e.createElementVNode("div",QW,e.toDisplayString(m.title),1)]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:m})=>[e.createVNode(c,{modelValue:m.type,"onUpdate:modelValue":p=>m.type=p,options:o.metadataTypes,placeholder:a.$t("natureForm.mappingType"),class:"w-full",onChange:p=>r.onMetadataTypeChange(m)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.value")},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(l,{key:0,modelValue:m.value,"onUpdate:modelValue":p=>m.value=p,placeholder:a.$t("natureForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("natureForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="template"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(u,{key:0,modelValue:m.required,"onUpdate:modelValue":p=>m.required=p},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const Kg=Se(CW,[["render",KW],["__scopeId","data-v-dfc83edd"]]),Di=()=>({name:"",description:"",type:"string",input:"text",values:[],search:null,regex:null,default:null,min:null,max:null}),qW=()=>({lang:"afts",query:"",valueField:"cm:name"}),wi={string:["text","textarea","password","list","multilist","select","chips","search"],number:["int","double","knob","rating"],boolean:["boolean","toggle"],date:["date","datetime"]},$W={name:"FieldForm",components:{PrimeInputText:at,PrimeTextarea:va,PrimeDropdown:qa,PrimeButton:ce,PrimeMessage:da,PrimeInputNumber:ka,PrimeInputGroup:ai,PrimeInputGroupAddon:Mn},props:{field:{type:Object,default:null},existingFields:{type:Array,default:()=>[]}},emits:["save"],data(){return{editableField:Di(),valuesAsString:"",isEditMode:!1,dataTypes:Object.keys(wi),searchLanguages:["afts","cmis","noderef"],isTestingSearch:!1,testResults:[],testError:null,regexTestString:""}},computed:{filteredInputTypes(){return wi[this.editableField.type]||[]},showValuesInput(){return["list","multilist","select"].includes(this.editableField.input)},showSearchInput(){return this.editableField.input==="search"},showStringConstraints(){return this.editableField.type==="string"&&this.editableField.input==="text"},showNumberConstraints(){return this.editableField.type==="number"},regexTestResult(){if(!this.editableField.regex||!this.regexTestString)return!1;try{return new RegExp(this.editableField.regex).test(this.regexTestString)}catch{return!1}},regexTestResultIcon(){return this.regexTestResult?"ri-check-line":"ri-close-line"},regexTestResultClass(){return this.regexTestResult?"bg-green-500":"bg-red-500"}},watch:{field:{handler(a){a&&a.name?(this.isEditMode=!0,this.editableField={...Di(),...JSON.parse(JSON.stringify(a))}):(this.isEditMode=!1,this.editableField=a?{...Di(),...JSON.parse(JSON.stringify(a))}:Di()),this.valuesAsString=(this.editableField.values||[]).join(`
|
|
154
154
|
`),this.editableField.search||(this.editableField.search=qW())},immediate:!0}},methods:{onDataTypeChange(){this.filteredInputTypes.includes(this.editableField.input)||(this.editableField.input=this.filteredInputTypes[0])},onInputTypeChange(){for(const a in wi)if(wi[a].includes(this.editableField.input)){this.editableField.type!==a&&(this.editableField.type=a);break}},async testSearch(){if(!this.editableField.search.query){this.testError=this.$t("fieldForm.search.testError.emptyQuery");return}this.isTestingSearch=!0,this.testResults=[],this.testError=null;try{const a={include:["properties"],query:{language:this.editableField.search.lang,query:this.editableField.search.query}},t=await Wt.search(a);this.testResults=t.list.entries.map(n=>n.entry.properties[this.editableField.search.valueField]||n.entry.name),this.testResults.length===0&&(this.testError=this.$t("fieldForm.search.testError.noResult"))}catch(a){this.testError=this.$t("fieldForm.search.testError.fetchError",{message:a.message})}finally{this.isTestingSearch=!1}},submit(){const a={...this.editableField};if(!a.name||!a.description){console.error(this.$t("fieldForm.errors.nameAndDescriptionRequired"));return}if(!this.isEditMode&&this.existingFields.some(t=>t.name===a.name)){console.error(this.$t("fieldForm.errors.fieldNameExists",{name:a.name}));return}this.showValuesInput?a.values=this.valuesAsString?this.valuesAsString.split(`
|
|
155
155
|
`).filter(t=>t):[]:delete a.values,this.showSearchInput||delete a.search,this.showStringConstraints||delete a.regex,this.showNumberConstraints||(delete a.default,delete a.min,delete a.max),a.input||(a.input="text"),this.$emit("save",a)}}},e5={class:"flex flex-column gap-3"},t5={class:"form-field"},a5={class:"form-label",for:"name"},n5={class:"form-help"},i5={class:"form-field"},o5={class:"form-label",for:"description"},r5={class:"form-help"},l5={class:"form-field"},s5={class:"form-label",for:"type"},c5={class:"form-help"},d5={class:"form-field"},m5={class:"form-label",for:"input"},p5={class:"form-help"},u5={key:0,class:"border-1 surface-border p-3 border-round"},b5={class:"form-field mb-3"},g5={class:"form-label",for:"regex"},_5={class:"form-help"},h5={class:"form-field"},y5={class:"form-label",for:"regex-test"},f5={key:1,class:"border-1 surface-border p-3 border-round"},N5={class:"grid"},S5={class:"col-4"},E5={class:"form-field"},T5={class:"form-label",for:"default"},A5={class:"col-4"},O5={class:"form-field"},C5={class:"form-label",for:"min"},R5={class:"col-4"},I5={class:"form-field"},M5={class:"form-label",for:"max"},v5={key:2,class:"form-field"},Z5={class:"form-label",for:"values"},D5={class:"form-help"},w5={key:3,class:"border-1 surface-border p-3 border-round"},W5={class:"flex flex-column gap-3"},L5={class:"form-field"},Y5={class:"form-label",for:"search-lang"},k5={class:"form-field"},x5={class:"form-label",for:"search-query"},z5={class:"form-field"},G5={class:"form-label",for:"search-value"},F5={key:0},X5={class:"list-none p-0 m-0"};function P5(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeDropdown"),c=e.resolveComponent("PrimeInputGroupAddon"),d=e.resolveComponent("PrimeInputGroup"),u=e.resolveComponent("PrimeInputNumber"),b=e.resolveComponent("PrimeTextarea"),m=e.resolveComponent("PrimeButton"),p=e.resolveComponent("PrimeMessage");return e.openBlock(),e.createElementBlock("div",e5,[e.createElementVNode("div",t5,[e.createElementVNode("label",a5,e.toDisplayString(a.$t("fieldForm.name.label")),1),e.createVNode(l,{id:"name",modelValue:o.editableField.name,"onUpdate:modelValue":t[0]||(t[0]=g=>o.editableField.name=g),disabled:o.isEditMode,class:"w-full"},null,8,["modelValue","disabled"]),e.createElementVNode("small",n5,e.toDisplayString(a.$t("fieldForm.name.help")),1)]),e.createElementVNode("div",i5,[e.createElementVNode("label",o5,e.toDisplayString(a.$t("fieldForm.description.label")),1),e.createVNode(l,{id:"description",modelValue:o.editableField.description,"onUpdate:modelValue":t[1]||(t[1]=g=>o.editableField.description=g),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",r5,e.toDisplayString(a.$t("fieldForm.description.help")),1)]),e.createElementVNode("div",l5,[e.createElementVNode("label",s5,e.toDisplayString(a.$t("fieldForm.dataType.label")),1),e.createVNode(s,{id:"type",modelValue:o.editableField.type,"onUpdate:modelValue":t[2]||(t[2]=g=>o.editableField.type=g),options:o.dataTypes,placeholder:a.$t("fieldForm.dataType.placeholder"),class:"w-full",onChange:r.onDataTypeChange},null,8,["modelValue","options","placeholder","onChange"]),e.createElementVNode("small",c5,e.toDisplayString(a.$t("fieldForm.dataType.help")),1)]),e.createElementVNode("div",d5,[e.createElementVNode("label",m5,e.toDisplayString(a.$t("fieldForm.inputType.label")),1),e.createVNode(s,{id:"input",modelValue:o.editableField.input,"onUpdate:modelValue":t[3]||(t[3]=g=>o.editableField.input=g),options:r.filteredInputTypes,placeholder:a.$t("fieldForm.inputType.placeholder"),class:"w-full",onChange:r.onInputTypeChange},null,8,["modelValue","options","placeholder","onChange"]),e.createElementVNode("small",p5,e.toDisplayString(a.$t("fieldForm.inputType.help")),1)]),r.showStringConstraints?(e.openBlock(),e.createElementBlock("div",u5,[e.createElementVNode("h5",null,e.toDisplayString(a.$t("fieldForm.stringConstraints.title")),1),e.createElementVNode("div",b5,[e.createElementVNode("label",g5,e.toDisplayString(a.$t("fieldForm.stringConstraints.regex.label")),1),e.createVNode(l,{id:"regex",modelValue:o.editableField.regex,"onUpdate:modelValue":t[4]||(t[4]=g=>o.editableField.regex=g),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",_5,e.toDisplayString(a.$t("fieldForm.stringConstraints.regex.help")),1)]),e.createElementVNode("div",h5,[e.createElementVNode("label",y5,e.toDisplayString(a.$t("fieldForm.stringConstraints.regexTester.label")),1),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(l,{id:"regex-test",modelValue:o.regexTestString,"onUpdate:modelValue":t[5]||(t[5]=g=>o.regexTestString=g),placeholder:a.$t("fieldForm.stringConstraints.regexTester.placeholder"),class:"w-full"},null,8,["modelValue","placeholder"]),e.createVNode(c,{class:e.normalizeClass(r.regexTestResultClass)},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ri-lg",r.regexTestResultIcon]),"aria-hidden":"true"},null,2)]),_:1},8,["class"])]),_:1})])])):e.createCommentVNode("",!0),r.showNumberConstraints?(e.openBlock(),e.createElementBlock("div",f5,[e.createElementVNode("h5",null,e.toDisplayString(a.$t("fieldForm.numberConstraints.title")),1),e.createElementVNode("div",N5,[e.createElementVNode("div",S5,[e.createElementVNode("div",E5,[e.createElementVNode("label",T5,e.toDisplayString(a.$t("fieldForm.numberConstraints.default.label")),1),e.createVNode(u,{id:"default",modelValue:o.editableField.default,"onUpdate:modelValue":t[6]||(t[6]=g=>o.editableField.default=g),class:"w-full"},null,8,["modelValue"])])]),e.createElementVNode("div",A5,[e.createElementVNode("div",O5,[e.createElementVNode("label",C5,e.toDisplayString(a.$t("fieldForm.numberConstraints.min.label")),1),e.createVNode(u,{id:"min",modelValue:o.editableField.min,"onUpdate:modelValue":t[7]||(t[7]=g=>o.editableField.min=g),class:"w-full"},null,8,["modelValue"])])]),e.createElementVNode("div",R5,[e.createElementVNode("div",I5,[e.createElementVNode("label",M5,e.toDisplayString(a.$t("fieldForm.numberConstraints.max.label")),1),e.createVNode(u,{id:"max",modelValue:o.editableField.max,"onUpdate:modelValue":t[8]||(t[8]=g=>o.editableField.max=g),class:"w-full"},null,8,["modelValue"])])])])])):e.createCommentVNode("",!0),r.showValuesInput?(e.openBlock(),e.createElementBlock("div",v5,[e.createElementVNode("label",Z5,e.toDisplayString(a.$t("fieldForm.values.label")),1),e.createVNode(b,{id:"values",modelValue:o.valuesAsString,"onUpdate:modelValue":t[9]||(t[9]=g=>o.valuesAsString=g),rows:"5",class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",D5,e.toDisplayString(a.$t("fieldForm.values.help")),1)])):e.createCommentVNode("",!0),r.showSearchInput?(e.openBlock(),e.createElementBlock("div",w5,[e.createElementVNode("h5",null,e.toDisplayString(a.$t("fieldForm.search.title")),1),e.createElementVNode("div",W5,[e.createElementVNode("div",L5,[e.createElementVNode("label",Y5,e.toDisplayString(a.$t("fieldForm.search.lang.label")),1),e.createVNode(s,{id:"search-lang",modelValue:o.editableField.search.lang,"onUpdate:modelValue":t[10]||(t[10]=g=>o.editableField.search.lang=g),options:o.searchLanguages,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",k5,[e.createElementVNode("label",x5,e.toDisplayString(a.$t("fieldForm.search.query.label")),1),e.createVNode(b,{id:"search-query",modelValue:o.editableField.search.query,"onUpdate:modelValue":t[11]||(t[11]=g=>o.editableField.search.query=g),rows:"3",class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",z5,[e.createElementVNode("label",G5,e.toDisplayString(a.$t("fieldForm.search.valueField.label")),1),e.createVNode(l,{id:"search-value",modelValue:o.editableField.search.valueField,"onUpdate:modelValue":t[12]||(t[12]=g=>o.editableField.search.valueField=g),class:"w-full"},null,8,["modelValue"])]),e.createVNode(m,{label:a.$t("fieldForm.search.testButton.label"),icon:"ri-search-line",class:"p-button-outlined",onClick:r.testSearch,loading:o.isTestingSearch},null,8,["label","onClick","loading"]),o.testResults.length>0?(e.openBlock(),e.createElementBlock("div",F5,[e.createElementVNode("h6",null,e.toDisplayString(a.$t("fieldForm.search.testResults.title")),1),e.createElementVNode("ul",X5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.testResults,(g,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},e.toDisplayString(g),1))),128))])])):e.createCommentVNode("",!0),o.testError?(e.openBlock(),e.createBlock(p,{key:1,severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.testError),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])}const qg=Se($W,[["render",P5],["__scopeId","data-v-8ef13777"]]),$g=()=>({code:"",type:"cm:folder",aspects:[],metadata:{}}),V5={name:"EmplacementForm",components:{PrimeInputText:at,PrimeDropdown:qa,PrimeMultiSelect:Dn,PrimeInputSwitch:Jc,PrimeDataTable:Ia,PrimeColumn:Ma},props:{emplacement:{type:Object,default:null}},emits:["save"],setup(){return{toast:pa.useToast()}},data(){return{editableEmplacement:$g(),editableMetadata:[],isEditMode:!1,isTypeReadOnly:!0,metadataTypes:["ignored","value","field","template","parent"],availableProperties:[],selectedAspects:[],availableAspects:[]}},watch:{emplacement:{handler(a){a&&a.code?(this.isEditMode=!0,this.editableEmplacement=JSON.parse(JSON.stringify(a))):(this.isEditMode=!1,this.editableEmplacement=$g()),this.isTypeReadOnly=!0,this.selectedAspects=this.editableEmplacement.aspects||[],this.metadataToObjectArray(this.editableEmplacement.metadata)},immediate:!0},"editableEmplacement.type":{handler(a){a&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{async loadAvailableAspects(){try{const a=await _a.getAspects({maxItems:1e3});a.list?.entries&&(this.availableAspects=a.list.entries.map(t=>({id:t.entry.id,title:t.entry.title||t.entry.id})))}catch(a){console.error("Failed to load available aspects",a),this.availableAspects=[]}},async loadAllProperties(){const a=[];if(this.editableEmplacement.type)try{const t=await _a.getType(this.editableEmplacement.type),n=_a.extractPropertiesFromType(t.entry);a.push(...n.map(i=>({...i,source:`Type: ${this.editableEmplacement.type}`})))}catch(t){console.error("Failed to load properties for type",this.editableEmplacement.type,t)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const t of this.selectedAspects)try{const n=await _a.getAspect(t),i=_a.extractPropertiesFromAspect(n.entry);a.push(...i.map(o=>({...o,source:`Aspect: ${t}`})))}catch(n){console.error("Failed to load properties for aspect",t,n)}this.availableProperties=a,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const a={};this.editableMetadata.forEach(n=>{a[n.key]={type:n.type,value:n.value,required:n.required,title:n.title}});const t=this.availableProperties.map(n=>a[n.key]?{key:n.key,title:n.title,type:a[n.key].type,value:a[n.key].value,required:a[n.key].required||!1}:{key:n.key,title:n.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(n=>{n.type!=="ignored"&&!this.availableProperties.find(i=>i.key===n.key)&&t.push({key:n.key,title:n.title||n.key,type:n.type,value:n.value,required:n.required})}),this.editableMetadata=t},metadataToObjectArray(a){if(!a){this.editableMetadata=[];return}const t=Object.entries(a).reduce((n,[i,o])=>{const r=Object.keys(o).find(c=>c!=="required"),l=o[r],s=o.required||!1;return n[i]={type:r,value:l,required:s},n},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(n=>{const i=t[n.key]||{type:"ignored",value:"",required:!1};return{key:n.key,title:n.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(a).map(([n,i])=>{const o=Object.keys(i).find(s=>s!=="required"),r=i[o],l=i.required||!1;return{key:n,type:o,value:r,required:l,title:n}})},metadataArrayToObject(){return this.editableMetadata.reduce((a,t)=>(t.key&&t.type!=="ignored"&&(a[t.key]={[t.type]:t.value},t.required&&t.type!=="parent"&&t.type!=="template"&&(a[t.key].required=!0)),a),{})},onMetadataTypeChange(a){if(a.type==="field"&&a.key&&!a.value){const t=a.key.split(":");t.length>1?a.value=t[t.length-1]:a.value=a.key}},submit(){if(!this.editableEmplacement.code){this.toast.add({severity:"warn",summary:Ft.global.t("emplacementForm.validation.codeRequired"),life:4e3});return}const a={...this.editableEmplacement,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",a)}}},U5={class:"flex flex-column gap-3"},j5={class:"form-field"},B5={class:"form-label",for:"code"},H5={class:"form-help"},J5={class:"form-field"},Q5={class:"form-label",for:"type"},K5={class:"form-help"},q5={class:"form-field"},$5={class:"form-label",for:"aspects"},eL={class:"font-semibold"},tL={class:"text-color-secondary"},aL={class:"form-field"},nL={class:"form-label"},iL={key:0,class:"text-center p-3 text-color-secondary"},oL={class:"form-help"};function rL(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputText"),s=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeColumn"),d=e.resolveComponent("PrimeDropdown"),u=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable");return e.openBlock(),e.createElementBlock("div",U5,[e.createElementVNode("div",j5,[e.createElementVNode("label",B5,e.toDisplayString(a.$t("emplacementForm.code")),1),e.createVNode(l,{id:"code",modelValue:o.editableEmplacement.code,"onUpdate:modelValue":t[0]||(t[0]=m=>o.editableEmplacement.code=m),disabled:o.isEditMode,class:"w-full"},null,8,["modelValue","disabled"]),e.createElementVNode("small",H5,e.toDisplayString(a.$t("emplacementForm.codeHelp")),1)]),e.createElementVNode("div",J5,[e.createElementVNode("label",Q5,[e.createTextVNode(e.toDisplayString(a.$t("emplacementForm.type"))+" ",1),o.isTypeReadOnly?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",class:"type-edit-link",onClick:t[1]||(t[1]=e.withModifiers(m=>o.isTypeReadOnly=!1,["prevent"]))},e.toDisplayString(a.$t("emplacementForm.editType")),1)):e.createCommentVNode("",!0)]),e.createVNode(l,{id:"type",modelValue:o.editableEmplacement.type,"onUpdate:modelValue":t[2]||(t[2]=m=>o.editableEmplacement.type=m),disabled:o.isTypeReadOnly,class:e.normalizeClass(["w-full",{"type-readonly":o.isTypeReadOnly}])},null,8,["modelValue","disabled","class"]),e.createElementVNode("small",K5,e.toDisplayString(a.$t("emplacementForm.typeHelp")),1)]),e.createElementVNode("div",q5,[e.createElementVNode("label",$5,e.toDisplayString(a.$t("emplacementForm.aspects")),1),e.createVNode(s,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":t[3]||(t[3]=m=>o.selectedAspects=m),options:o.availableAspects,placeholder:a.$t("emplacementForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(m=>[e.createElementVNode("div",null,[e.createElementVNode("div",eL,e.toDisplayString(m.option.id),1),e.createElementVNode("small",tL,e.toDisplayString(m.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",aL,[e.createElementVNode("label",nL,e.toDisplayString(a.$t("emplacementForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",iL,e.toDisplayString(a.$t("emplacementForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(c,{field:"key",header:a.$t("emplacementForm.key")},{body:e.withCtx(({data:m})=>[e.createElementVNode("strong",null,e.toDisplayString(m.key),1),e.createElementVNode("div",oL,e.toDisplayString(m.title),1)]),_:1},8,["header"]),e.createVNode(c,{header:a.$t("emplacementForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:m})=>[e.createVNode(d,{modelValue:m.type,"onUpdate:modelValue":p=>m.type=p,options:o.metadataTypes,placeholder:a.$t("emplacementForm.mappingType"),class:"w-full",onChange:p=>r.onMetadataTypeChange(m)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(c,{header:a.$t("emplacementForm.value")},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(l,{key:0,modelValue:m.value,"onUpdate:modelValue":p=>m.value=p,placeholder:a.$t("emplacementForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(c,{header:a.$t("emplacementForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:m})=>[m.type!=="parent"&&m.type!=="template"&&m.type!=="ignored"?(e.openBlock(),e.createBlock(u,{key:0,modelValue:m.required,"onUpdate:modelValue":p=>m.required=p},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const e_=Se(V5,[["render",rL],["__scopeId","data-v-1f7cf5fe"]]),lL={name:"ViewSelectorPopup",components:{PrimeDialog:_t,PrimeButton:ce,PrimeCheckbox:ma,PrimeInputText:at,PrimeIconField:$n,PrimeInputIcon:ti},props:{visible:Boolean,selectedViews:{type:Array,default:()=>[]},availableViews:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:visible","update:selectedViews"],data(){return{localSelected:[],searchQuery:"",dragIndex:null,dragOverIndex:null}},computed:{allFilenames(){return this.availableViews.map(a=>a.value||a)},unselectedViews(){return this.allFilenames.filter(a=>!this.localSelected.includes(a))},isSearching(){return this.searchQuery.trim().length>0},searchResults(){const a=this.searchQuery.trim().toLowerCase();return a?this.allFilenames.filter(t=>t.toLowerCase().includes(a)):[]}},watch:{visible(a){a&&(this.localSelected=[...this.selectedViews||[]],this.searchQuery="")}},methods:{isSelected(a){return this.localSelected.includes(a)},toggleView(a,t){t?this.localSelected.includes(a)||this.localSelected.push(a):this.localSelected=this.localSelected.filter(n=>n!==a)},moveView(a,t){const n=a+t;if(n<0||n>=this.localSelected.length)return;const i=[...this.localSelected],o=i.splice(a,1)[0];i.splice(n,0,o),this.localSelected=i},onDragStart(a,t){this.dragIndex=a,t.dataTransfer.effectAllowed="move"},onDragOver(a){this.dragOverIndex=a},onDragLeave(){this.dragOverIndex=null},onDrop(a){if(this.dragOverIndex=null,this.dragIndex===null||this.dragIndex===a)return;const t=[...this.localSelected],n=t.splice(this.dragIndex,1)[0];t.splice(a,0,n),this.localSelected=t},onDragEnd(){this.dragIndex=null,this.dragOverIndex=null},validate(){this.$emit("update:selectedViews",[...this.localSelected]),this.$emit("update:visible",!1)}}},sL={key:0,class:"view-selector-search"},cL={key:1,class:"text-center p-3"},dL={key:0,class:"view-selector-section"},mL={class:"view-selector-section-header"},pL={class:"view-selector-list"},uL={class:"view-selector-label"},bL={key:0,class:"text-sm text-color-secondary p-2"},gL={key:0,class:"view-selector-section"},_L={class:"view-selector-section-header"},hL={class:"view-selector-list"},yL=["draggable","onDragstart","onDragover","onDrop"],fL={key:0,class:"ri-draggable drag-handle"},NL={class:"view-selector-label"},SL={key:1,class:"view-selector-arrows"},EL={key:1,class:"view-selector-section"},TL={class:"view-selector-section-header"},AL={class:"view-selector-list"},OL={class:"view-selector-label"};function CL(a,t,n,i,o,r){const l=e.resolveComponent("PrimeInputIcon"),s=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimeIconField"),d=e.resolveComponent("PrimeCheckbox"),u=e.resolveComponent("PrimeButton"),b=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(b,{visible:n.visible,"onUpdate:visible":t[5]||(t[5]=m=>a.$emit("update:visible",m)),modal:"",header:a.$t("adminClassificationPage.viewSelector.title"),style:{width:"550px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(u,{label:a.$t("cancel"),severity:"secondary",text:"",onClick:t[4]||(t[4]=m=>a.$emit("update:visible",!1))},null,8,["label"]),n.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0,label:a.$t("adminClassificationPage.viewSelector.validate"),icon:"ri-check-line",onClick:r.validate},null,8,["label","onClick"]))]),default:e.withCtx(()=>[n.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",sL,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(l,{class:"ri-search-line"}),e.createVNode(s,{modelValue:o.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=m=>o.searchQuery=m),placeholder:a.$t("adminClassificationPage.viewSelector.search"),size:"small",fluid:""},null,8,["modelValue","placeholder"]),o.searchQuery?(e.openBlock(),e.createBlock(l,{key:0,class:"ri-close-line view-selector-clear",onClick:t[1]||(t[1]=m=>o.searchQuery="")})):e.createCommentVNode("",!0)]),_:1})])),n.loading?(e.openBlock(),e.createElementBlock("div",cL,[...t[6]||(t[6]=[e.createElementVNode("i",{class:"pi pi-spin pi-spinner",style:{"font-size":"1.5rem"}},null,-1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[r.isSearching?(e.openBlock(),e.createElementBlock("div",dL,[e.createElementVNode("div",mL,e.toDisplayString(a.$t("adminClassificationPage.viewSelector.searchResults")),1),e.createElementVNode("div",pL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.searchResults,m=>(e.openBlock(),e.createElementBlock("div",{key:"search-"+m,class:"view-selector-item"},[e.createVNode(d,{modelValue:r.isSelected(m),binary:!0,"onUpdate:modelValue":p=>r.toggleView(m,p)},null,8,["modelValue","onUpdate:modelValue"]),e.createElementVNode("span",uL,e.toDisplayString(m),1)]))),128)),r.searchResults.length===0?(e.openBlock(),e.createElementBlock("div",bL,e.toDisplayString(a.$t("adminClassificationPage.viewSelector.noResults")),1)):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.localSelected.length>0?(e.openBlock(),e.createElementBlock("div",gL,[e.createElementVNode("div",_L,e.toDisplayString(a.$t("adminClassificationPage.viewSelector.selected")),1),e.createElementVNode("div",hL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.localSelected,(m,p)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["view-selector-item",{"drag-over":!n.readonly&&o.dragOverIndex===p}]),draggable:!n.readonly,onDragstart:g=>!n.readonly&&r.onDragStart(p,g),onDragover:e.withModifiers(g=>!n.readonly&&r.onDragOver(p),["prevent"]),onDragleave:t[2]||(t[2]=g=>!n.readonly&&r.onDragLeave()),onDrop:g=>!n.readonly&&r.onDrop(p),onDragend:t[3]||(t[3]=g=>!n.readonly&&r.onDragEnd())},[n.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",fL)),e.createVNode(d,{modelValue:!0,binary:!0,disabled:n.readonly,"onUpdate:modelValue":g=>r.toggleView(m,g)},null,8,["disabled","onUpdate:modelValue"]),e.createElementVNode("span",NL,e.toDisplayString(m),1),n.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",SL,[e.createVNode(u,{type:"button",icon:"ri-arrow-up-s-line",size:"small",severity:"secondary",text:"",rounded:"",disabled:p===0,onClick:g=>r.moveView(p,-1)},null,8,["disabled","onClick"]),e.createVNode(u,{type:"button",icon:"ri-arrow-down-s-line",size:"small",severity:"secondary",text:"",rounded:"",disabled:p===o.localSelected.length-1,onClick:g=>r.moveView(p,1)},null,8,["disabled","onClick"])]))],42,yL))),128))])])):e.createCommentVNode("",!0),!n.readonly&&r.unselectedViews.length>0?(e.openBlock(),e.createElementBlock("div",EL,[e.createElementVNode("div",TL,e.toDisplayString(a.$t("adminClassificationPage.viewSelector.available")),1),e.createElementVNode("div",AL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.unselectedViews,m=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"view-selector-item"},[e.createVNode(d,{modelValue:!1,binary:!0,"onUpdate:modelValue":p=>r.toggleView(m,p)},null,8,["onUpdate:modelValue"]),e.createElementVNode("span",OL,e.toDisplayString(m),1)]))),128))])])):e.createCommentVNode("",!0)],64))],64))]),_:1},8,["visible","header"])}const RL=Se(lL,[["render",CL],["__scopeId","data-v-765c68bc"]]),Ge=Ft.global.t,IL=()=>({NAME:"Nouveau Plan",DESCRIPTION:"Description",FIELDS:[],EMPLACEMENT:[],NATURES:[],VIEW_CATEGORIES:[]}),ML={name:"AdminClassificationPage",components:{PrimeCard:oi,PrimeButton:ce,PrimeDataTable:Ia,PrimeColumn:Ma,PrimeDialog:_t,PrimeConfirmDialog:ao,PrimeTabs:Kn,PrimeTabList:qn,PrimeTab:Ja,PrimeTabPanels:ji,PrimeTabPanel:mn,PrimeInputText:at,PrimeMultiSelect:Dn,PrimeTag:dn,NatureForm:Kg,FieldForm:qg,EmplacementForm:e_,ViewSelectorPopup:RL},props:{filename:{type:String,required:!0}},setup(){return{confirm:ri.useConfirm()}},data(){return{planContent:null,loading:!0,isSaving:!1,isNewPlan:!1,dialogTitle:"",selectedItem:null,displayNatureDialog:!1,displayFieldDialog:!1,displayEmplacementDialog:!1,isDirty:!1,isDuplicating:!1,displayCategoryDialog:!1,categoryForm:{id:"",label:"",display:[],views:[]},isEditingCategory:!1,displayOptions:[{label:"folderView",value:"folderView"},{label:"import",value:"import"},{label:"requalify",value:"requalify"}],availableViews:[],viewsLoading:!1,displayViewSelector:!1,viewSelectorCategory:null,canEdit:!1}},methods:{getCalculatedPath(a){return!a.emplacement||a.emplacement.length===0?"/":"/"+a.emplacement.map(t=>{const n=this.planContent.EMPLACEMENT.find(o=>o.code===t);if(!n)return`[${t}]`;const i=n.metadata?.["cm:name"];return i?.value||i?.template||t}).join("/")},getCategoryLabel(a){const t=(this.planContent?.VIEW_CATEGORIES||[]).find(n=>n.id===a);return t?t.label:a},loadPlan(){this.loading=!0,this.isNewPlan=!1,this.isDirty=!1,ga.getPlanWithPermissions(this.filename).then(({content:a,allowableOperations:t})=>{this.planContent=a,this.canEdit=t?.includes("update")??!1}).catch(a=>{a.response&&a.response.status===404?(this.isNewPlan=!0,this.canEdit=!0,this.planContent=IL(),this.isDirty=!0,this.$toast.add({severity:"info",summary:Ge("adminClassificationPage.toast.newPlan"),detail:Ge("adminClassificationPage.toast.fileNotExist",{filename:this.filename}),life:3e3})):this.$toast.add({severity:"error",summary:Ge("adminClassificationPage.toast.loadError"),detail:Ge("adminClassificationPage.toast.loadErrorDetail"),life:4e3})}).finally(()=>{this.loading=!1})},savePlanFile(){this.isSaving=!0,ga.savePlan(this.filename,this.planContent).then(()=>{this.$toast.add({severity:"success",summary:Ge("success"),detail:Ge("adminClassificationPage.toast.saveSuccess"),life:3e3}),this.isNewPlan=!1,this.isDirty=!1}).catch(()=>{this.$toast.add({severity:"error",summary:Ge("error"),detail:Ge("adminClassificationPage.toast.saveError"),life:4e3})}).finally(()=>{this.isSaving=!1})},handleBeforeUnload(a){this.isDirty&&(a.preventDefault(),a.returnValue="")},exportPlan(){if(!this.planContent)return;const a=JSON.stringify(this.planContent,null,2),t=new Blob([a],{type:"application/json"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=this.filename.endsWith(".json")?this.filename:`${this.filename}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n),this.$toast.add({severity:"success",summary:Ge("adminClassificationPage.toast.exportSuccess"),detail:Ge("adminClassificationPage.toast.exportSuccessDetail",{filename:this.filename}),life:3e3})},triggerImport(){this.$refs.fileInput.click()},handleFileImport(a){const t=a.target.files[0];if(!t)return;const n=new FileReader;n.onload=i=>{try{const o=JSON.parse(i.target.result);if(!o.NATURES||!o.FIELDS||!o.EMPLACEMENT)throw new Error(Ge("adminClassificationPage.toast.invalidFileStructure"));this.planContent=o,this.isDirty=!0,this.$toast.add({severity:"success",summary:Ge("adminClassificationPage.toast.importSuccess"),detail:Ge("adminClassificationPage.toast.importSuccessDetail"),life:4e3})}catch(o){this.$toast.add({severity:"error",summary:Ge("adminClassificationPage.toast.importError"),detail:Ge("adminClassificationPage.toast.importErrorDetail",{message:o.message}),life:5e3})}},n.readAsText(t),a.target.value=""},async loadAvailableViews(){this.viewsLoading=!0;try{const a=await na.listViews();this.availableViews=a.map(t=>({label:t,value:t}))}catch{this.availableViews=[]}finally{this.viewsLoading=!1}},openNewNatureDialog(){this.selectedItem=null,this.isDuplicating=!1,this.dialogTitle=Ge("adminClassificationPage.dialog.createNature"),this.displayNatureDialog=!0},openEditNatureDialog(a){this.selectedItem=a,this.isDuplicating=!1,this.dialogTitle=Ge("adminClassificationPage.dialog.editNature",{name:a.name}),this.displayNatureDialog=!0},openDuplicateNatureDialog(a){this.selectedItem=JSON.parse(JSON.stringify(a)),this.selectedItem.code="",this.isDuplicating=!0,this.dialogTitle=Ge("adminClassificationPage.dialog.duplicateNature",{name:a.name}),this.displayNatureDialog=!0},onNatureSaved(a){const t=this.planContent.NATURES.findIndex(n=>n.code===a.code);t!==-1?this.planContent.NATURES[t]=a:this.planContent.NATURES.push(a),this.autocreateFieldsFromNature(a),this.displayNatureDialog=!1},confirmDeleteNature(a){this.confirmDeleteItem(a,this.planContent.NATURES,Ge("adminClassificationPage.confirm.nature"))},openNewFieldDialog(){this.selectedItem=null,this.dialogTitle=Ge("adminClassificationPage.dialog.createField"),this.displayFieldDialog=!0},openEditFieldDialog(a){this.selectedItem=a,this.dialogTitle=Ge("adminClassificationPage.dialog.editField",{name:a.name}),this.displayFieldDialog=!0},openDuplicateFieldDialog(a){this.selectedItem=JSON.parse(JSON.stringify(a)),this.selectedItem.name="",this.dialogTitle=Ge("adminClassificationPage.dialog.duplicateField",{name:a.name}),this.displayFieldDialog=!0},onFieldSaved(a){const t=this.planContent.FIELDS.findIndex(n=>n.name===a.name);t!==-1?this.planContent.FIELDS[t]=a:this.planContent.FIELDS.push(a),this.displayFieldDialog=!1},confirmDeleteField(a){if(this.isFieldUsed(a.name)){this.$toast.add({severity:"error",summary:Ge("adminClassificationPage.toast.deleteImpossible"),detail:Ge("adminClassificationPage.toast.fieldUsed",{name:a.name}),life:5e3});return}this.confirmDeleteItem(a,this.planContent.FIELDS,Ge("adminClassificationPage.confirm.field"))},openNewEmplacementDialog(){this.selectedItem=null,this.dialogTitle=Ge("adminClassificationPage.dialog.createEmplacement"),this.displayEmplacementDialog=!0},openEditEmplacementDialog(a){this.selectedItem=a,this.dialogTitle=Ge("adminClassificationPage.dialog.editEmplacement",{code:a.code}),this.displayEmplacementDialog=!0},onEmplacementSaved(a){const t=this.planContent.EMPLACEMENT.findIndex(n=>n.code===a.code);t!==-1?this.planContent.EMPLACEMENT[t]=a:this.planContent.EMPLACEMENT.push(a),this.autocreateFieldsFromEmplacement(a),this.displayEmplacementDialog=!1},confirmDeleteEmplacement(a){if(this.planContent.NATURES.some(n=>n.emplacement.includes(a.code))){this.$toast.add({severity:"error",summary:Ge("adminClassificationPage.toast.deleteImpossible"),detail:Ge("adminClassificationPage.toast.emplacementUsed",{code:a.code}),life:5e3});return}this.confirmDeleteItem(a,this.planContent.EMPLACEMENT,Ge("adminClassificationPage.confirm.emplacement"))},openNewCategoryDialog(){this.categoryForm={id:"",label:"",display:[],views:[]},this.isEditingCategory=!1,this.dialogTitle=Ge("adminClassificationPage.dialog.createCategory"),this.displayCategoryDialog=!0},openEditCategoryDialog(a){this.categoryForm={id:a.id,label:a.label,display:[...a.display||[]],views:[...a.views||[]]},this.isEditingCategory=!0,this.dialogTitle=Ge("adminClassificationPage.dialog.editCategory",{label:a.label}),this.displayCategoryDialog=!0},onCategoryReorder(a){this.planContent.VIEW_CATEGORIES=a.value},saveCategoryForm(){this.planContent.VIEW_CATEGORIES||(this.planContent.VIEW_CATEGORIES=[]);const a=this.planContent.VIEW_CATEGORIES.findIndex(n=>n.id===this.categoryForm.id),t={...this.categoryForm};a!==-1?this.planContent.VIEW_CATEGORIES[a]=t:this.planContent.VIEW_CATEGORIES.push(t),this.displayCategoryDialog=!1},openViewSelector(a){this.viewSelectorCategory=a,this.displayViewSelector=!0},onViewsUpdated(a){this.viewSelectorCategory&&(this.viewSelectorCategory.views=a)},confirmDeleteCategory(a){this.confirm.require({message:Ge("adminClassificationPage.confirm.deleteMessage",{itemType:Ge("adminClassificationPage.confirm.category"),name:a.label}),header:Ge("adminClassificationPage.confirm.deleteHeader"),icon:"pi pi-exclamation-triangle",group:"deleteItem",acceptProps:{severity:"danger"},accept:()=>{const t=this.planContent.VIEW_CATEGORIES.findIndex(n=>n.id===a.id);t>-1&&this.planContent.VIEW_CATEGORIES.splice(t,1),this.$toast.add({severity:"info",summary:Ge("adminClassificationPage.toast.confirmed"),detail:Ge("adminClassificationPage.toast.itemDeleted"),life:3e3})}})},autocreateFieldsFromNature(a){const t=new Set;Object.values(a.metadata).forEach(n=>{n.field&&t.add(n.field),n.template&&ra(n.template).forEach(i=>t.add(i))}),a.emplacement.forEach(n=>{const i=this.planContent.EMPLACEMENT.find(o=>o.code===n);i&&(ra(i.name).forEach(o=>t.add(o)),ra(i.title).forEach(o=>t.add(o)))}),t.forEach(n=>{this.planContent.FIELDS.some(i=>i.name===n)||(this.planContent.FIELDS.push({name:n,description:Ge("adminClassificationPage.toast.autoCreatedForNature",{name:a.name}),type:"string",input:"text"}),this.$toast.add({severity:"info",summary:Ge("adminClassificationPage.toast.fieldCreated"),detail:Ge("adminClassificationPage.toast.fieldAutoCreated",{fieldName:n}),life:4e3}))})},autocreateFieldsFromEmplacement(a){const t=new Set;ra(a.name).forEach(n=>t.add(n)),ra(a.title).forEach(n=>t.add(n)),t.forEach(n=>{this.planContent.FIELDS.some(i=>i.name===n)||(this.planContent.FIELDS.push({name:n,description:Ge("adminClassificationPage.toast.autoCreatedForEmplacement",{code:a.code}),type:"string",input:"text"}),this.$toast.add({severity:"info",summary:Ge("adminClassificationPage.toast.fieldCreated"),detail:Ge("adminClassificationPage.toast.fieldAutoCreated",{fieldName:n}),life:4e3}))})},isFieldUsed(a){for(const t of this.planContent.NATURES)for(const n of Object.values(t.metadata))if(n.field===a||n.template&&ra(n.template).includes(a))return!0;for(const t of this.planContent.EMPLACEMENT)if(ra(t.name).includes(a)||ra(t.title).includes(a))return!0;return!1},confirmDeleteItem(a,t,n){this.confirm.require({message:Ge("adminClassificationPage.confirm.deleteMessage",{itemType:n,name:a.name||a.code}),header:Ge("adminClassificationPage.confirm.deleteHeader"),icon:"pi pi-exclamation-triangle",group:"deleteItem",acceptProps:{severity:"danger"},accept:()=>{const i=a.code?"code":"name",o=t.findIndex(r=>r[i]===a[i]);o>-1&&t.splice(o,1),this.$toast.add({severity:"info",summary:Ge("adminClassificationPage.toast.confirmed"),detail:Ge("adminClassificationPage.toast.itemDeleted"),life:3e3})}})}},mounted(){this.filename.startsWith("plan-")||this.$toast.add({severity:"warn",summary:Ge("adminClassificationPage.toast.invalidFilename"),detail:Ge("adminClassificationPage.toast.filenameMustStartWithPlan"),life:5e3}),this.loadPlan(),this.loadAvailableViews(),window.addEventListener("beforeunload",this.handleBeforeUnload)},beforeUnmount(){window.removeEventListener("beforeunload",this.handleBeforeUnload)},watch:{filename(){this.loadPlan()},planContent:{handler(){this.loading||(this.isDirty=!0)},deep:!0}}},vL={class:"p-4"},ZL={key:0},DL={key:1},wL={key:0,class:"text-center"},WL={key:1},LL={key:0,class:"mb-2"},YL={key:0,class:"mb-2"},kL={key:0,class:"mb-2"},xL={key:0,class:"mb-2"},zL={class:"flex align-items-center gap-2"},GL={class:"flex gap-2 justify-content-between"},FL={class:"flex gap-2"},XL={class:"flex gap-2"},PL={class:"flex flex-column gap-3 p-3"},VL={class:"category-form-field"},UL={class:"category-form-label",for:"categoryId"},jL={class:"category-form-field"},BL={class:"category-form-label",for:"categoryLabel"},HL={class:"category-form-field"},JL={class:"category-form-label",for:"categoryDisplay"};function QL(a,t,n,i,o,r){const l=e.resolveComponent("PrimeTab"),s=e.resolveComponent("PrimeTabList"),c=e.resolveComponent("PrimeButton"),d=e.resolveComponent("PrimeColumn"),u=e.resolveComponent("PrimeTag"),b=e.resolveComponent("PrimeDataTable"),m=e.resolveComponent("PrimeTabPanel"),p=e.resolveComponent("PrimeTabPanels"),g=e.resolveComponent("PrimeTabs"),_=e.resolveComponent("PrimeCard"),f=e.resolveComponent("NatureForm"),h=e.resolveComponent("PrimeDialog"),S=e.resolveComponent("FieldForm"),y=e.resolveComponent("EmplacementForm"),T=e.resolveComponent("PrimeInputText"),O=e.resolveComponent("PrimeMultiSelect"),D=e.resolveComponent("ViewSelectorPopup"),I=e.resolveComponent("PrimeConfirmDialog");return e.openBlock(),e.createElementBlock("div",vL,[e.createVNode(_,null,{title:e.withCtx(()=>[o.isNewPlan?(e.openBlock(),e.createElementBlock("span",ZL,e.toDisplayString(a.$t("adminClassificationPage.titleNew")),1)):(e.openBlock(),e.createElementBlock("span",DL,e.toDisplayString(a.$t("adminClassificationPage.titleAdmin")),1))]),subtitle:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.file"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(n.filename),1)]),content:e.withCtx(()=>[o.loading?(e.openBlock(),e.createElementBlock("div",wL,[t[16]||(t[16]=e.createElementVNode("i",{class:"pi pi-spin pi-spinner",style:{"font-size":"2rem"}},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.$t("adminClassificationPage.loading")),1)])):e.createCommentVNode("",!0),!o.loading&&o.planContent?(e.openBlock(),e.createElementBlock("div",WL,[e.createVNode(g,{value:0},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(l,{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.tabs.natures")),1)]),_:1}),e.createVNode(l,{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.tabs.fields")),1)]),_:1}),e.createVNode(l,{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.tabs.emplacements")),1)]),_:1}),e.createVNode(l,{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.tabs.categories")),1)]),_:1})]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(m,{value:0},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",LL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.newNature"),icon:"ri-add-line",onClick:r.openNewNatureDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.NATURES,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(d,{field:"code",header:a.$t("adminClassificationPage.columns.code"),sortable:""},null,8,["header"]),e.createVNode(d,{field:"name",header:a.$t("adminClassificationPage.columns.name"),sortable:""},null,8,["header"]),e.createVNode(d,{header:a.$t("adminClassificationPage.columns.emplacement")},{body:e.withCtx(C=>[e.createElementVNode("code",null,e.toDisplayString(r.getCalculatedPath(C.data)),1)]),_:1},8,["header"]),e.createVNode(d,{field:"type",header:a.$t("adminClassificationPage.columns.type")},null,8,["header"]),e.createVNode(d,{header:a.$t("adminClassificationPage.columns.icon")},{body:e.withCtx(C=>[e.createElementVNode("i",{class:e.normalizeClass(C.data.icon),"aria-hidden":"true"},null,2)]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("adminClassificationPage.columns.categories")},{body:e.withCtx(C=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.data.categories||[],A=>(e.openBlock(),e.createBlock(u,{key:A,value:r.getCategoryLabel(A),class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(d,{key:0,header:a.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(C=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":a.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:A=>r.openEditNatureDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-file-copy-line","aria-label":a.$t("duplicate"),rounded:"",severity:"info",class:"mr-2",onClick:A=>r.openDuplicateNatureDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":a.$t("delete"),rounded:"",severity:"warn",onClick:A=>r.confirmDeleteNature(C.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(m,{value:1},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",YL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.newField"),icon:"ri-add-line",onClick:r.openNewFieldDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.FIELDS,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(d,{field:"name",header:a.$t("adminClassificationPage.columns.name"),sortable:""},null,8,["header"]),e.createVNode(d,{field:"description",header:a.$t("adminClassificationPage.columns.description")},null,8,["header"]),e.createVNode(d,{field:"type",header:a.$t("adminClassificationPage.columns.type")},null,8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(d,{key:0,header:a.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(C=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":a.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:A=>r.openEditFieldDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-file-copy-line","aria-label":a.$t("duplicate"),rounded:"",severity:"info",class:"mr-2",onClick:A=>r.openDuplicateFieldDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":a.$t("delete"),rounded:"",severity:"warn",onClick:A=>r.confirmDeleteField(C.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(m,{value:2},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",kL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.newEmplacement"),icon:"ri-add-line",onClick:r.openNewEmplacementDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.EMPLACEMENT,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(d,{field:"code",header:a.$t("adminClassificationPage.columns.code"),sortable:""},null,8,["header"]),e.createVNode(d,{field:"name",header:a.$t("adminClassificationPage.columns.name")},null,8,["header"]),e.createVNode(d,{field:"title",header:a.$t("adminClassificationPage.columns.title")},null,8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(d,{key:0,header:a.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(C=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":a.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:A=>r.openEditEmplacementDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":a.$t("delete"),rounded:"",severity:"warn",onClick:A=>r.confirmDeleteEmplacement(C.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(m,{value:3},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",xL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.newCategory"),icon:"ri-add-line",onClick:r.openNewCategoryDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.VIEW_CATEGORIES,onRowReorder:r.onCategoryReorder,paginator:"",rows:10,"reorderable-rows":o.canEdit},{empty:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("adminClassificationPage.tabs.categories"))+" : 0 ",1)]),default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createBlock(d,{key:0,rowReorder:"",headerStyle:"width: 3rem","reorderable-column":!1})):e.createCommentVNode("",!0),e.createVNode(d,{field:"id",header:a.$t("adminClassificationPage.columns.id"),sortable:""},null,8,["header"]),e.createVNode(d,{field:"label",header:a.$t("adminClassificationPage.columns.label")},null,8,["header"]),e.createVNode(d,{header:a.$t("adminClassificationPage.columns.display")},{body:e.withCtx(C=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.data.display,A=>(e.openBlock(),e.createBlock(u,{key:A,value:A,class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"]),e.createVNode(d,{header:a.$t("adminClassificationPage.columns.views")},{body:e.withCtx(C=>[e.createElementVNode("div",zL,[!C.data.views||C.data.views.length===0?(e.openBlock(),e.createBlock(u,{key:0,value:a.$t("adminClassificationPage.viewSelector.noViews"),severity:"secondary"},null,8,["value"])):(e.openBlock(),e.createBlock(u,{key:1,value:a.$t("adminClassificationPage.viewSelector.nViews",{count:C.data.views.length}),severity:"info"},null,8,["value"])),e.createVNode(c,{icon:o.canEdit?"ri-pencil-line":"ri-eye-line",size:"small",severity:"secondary",text:"",rounded:"",onClick:A=>r.openViewSelector(C.data,C.index)},null,8,["icon","onClick"])])]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(d,{key:1,header:a.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(C=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":a.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:A=>r.openEditCategoryDialog(C.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":a.$t("delete"),rounded:"",severity:"warn",onClick:A=>r.confirmDeleteCategory(C.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value","onRowReorder","reorderable-rows"])]),_:1})]),_:1})]),_:1})])):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",GL,[e.createElementVNode("div",FL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.export"),icon:"ri-download-line",disabled:o.loading||!o.planContent,onClick:r.exportPlan,severity:"secondary",outlined:""},null,8,["label","disabled","onClick"]),o.canEdit?(e.openBlock(),e.createBlock(c,{key:0,label:a.$t("adminClassificationPage.buttons.import"),icon:"ri-upload-line",disabled:o.loading||o.isSaving,onClick:r.triggerImport,severity:"secondary",outlined:""},null,8,["label","disabled","onClick"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",XL,[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.reload"),icon:"pi pi-refresh",disabled:o.loading||o.isSaving,onClick:r.loadPlan,severity:"secondary"},null,8,["label","disabled","onClick"]),o.canEdit?(e.openBlock(),e.createBlock(c,{key:0,label:o.isNewPlan?a.$t("adminClassificationPage.buttons.createFile"):a.$t("adminClassificationPage.buttons.saveFile"),icon:"pi pi-save",loading:o.isSaving,disabled:o.loading||!o.isDirty,class:"w-18rem",onClick:r.savePlanFile},null,8,["label","loading","disabled","onClick"])):e.createCommentVNode("",!0)])]),e.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:t[0]||(t[0]=(...C)=>r.handleFileImport&&r.handleFileImport(...C))},null,544)]),_:1}),e.createVNode(h,{visible:o.displayNatureDialog,"onUpdate:visible":t[3]||(t[3]=C=>o.displayNatureDialog=C),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:t[1]||(t[1]=C=>o.displayNatureDialog=!1)},null,8,["label"]),e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:t[2]||(t[2]=C=>a.$refs.natureForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(f,{ref:"natureForm",nature:o.selectedItem,"existing-natures":o.planContent.NATURES||[],emplacements:o.planContent.EMPLACEMENT||[],categories:o.planContent.VIEW_CATEGORIES||[],"is-duplicating":o.isDuplicating,onSave:r.onNatureSaved},null,8,["nature","existing-natures","emplacements","categories","is-duplicating","onSave"])]),_:1},8,["visible","header"]),e.createVNode(h,{visible:o.displayFieldDialog,"onUpdate:visible":t[6]||(t[6]=C=>o.displayFieldDialog=C),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:t[4]||(t[4]=C=>o.displayFieldDialog=!1)},null,8,["label"]),e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:t[5]||(t[5]=C=>a.$refs.fieldForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(S,{ref:"fieldForm",field:o.selectedItem,"existing-fields":o.planContent.FIELDS||[],onSave:r.onFieldSaved},null,8,["field","existing-fields","onSave"])]),_:1},8,["visible","header"]),e.createVNode(h,{visible:o.displayEmplacementDialog,"onUpdate:visible":t[9]||(t[9]=C=>o.displayEmplacementDialog=C),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:t[7]||(t[7]=C=>o.displayEmplacementDialog=!1)},null,8,["label"]),e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:t[8]||(t[8]=C=>a.$refs.emplacementForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"emplacementForm",emplacement:o.selectedItem,onSave:r.onEmplacementSaved},null,8,["emplacement","onSave"])]),_:1},8,["visible","header"]),e.createVNode(h,{visible:o.displayCategoryDialog,"onUpdate:visible":t[14]||(t[14]=C=>o.displayCategoryDialog=C),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:t[13]||(t[13]=C=>o.displayCategoryDialog=!1)},null,8,["label"]),e.createVNode(c,{label:a.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:r.saveCategoryForm},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",PL,[e.createElementVNode("div",VL,[e.createElementVNode("label",UL,e.toDisplayString(a.$t("adminClassificationPage.columns.id")),1),e.createVNode(T,{id:"categoryId",modelValue:o.categoryForm.id,"onUpdate:modelValue":t[10]||(t[10]=C=>o.categoryForm.id=C),disabled:o.isEditingCategory,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",jL,[e.createElementVNode("label",BL,e.toDisplayString(a.$t("adminClassificationPage.columns.label")),1),e.createVNode(T,{id:"categoryLabel",modelValue:o.categoryForm.label,"onUpdate:modelValue":t[11]||(t[11]=C=>o.categoryForm.label=C),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",HL,[e.createElementVNode("label",JL,e.toDisplayString(a.$t("adminClassificationPage.columns.display")),1),e.createVNode(O,{id:"categoryDisplay",modelValue:o.categoryForm.display,"onUpdate:modelValue":t[12]||(t[12]=C=>o.categoryForm.display=C),options:o.displayOptions,"option-label":"label","option-value":"value",class:"w-full"},null,8,["modelValue","options"])])])]),_:1},8,["visible","header"]),e.createVNode(D,{visible:o.displayViewSelector,"onUpdate:visible":t[15]||(t[15]=C=>o.displayViewSelector=C),selectedViews:o.viewSelectorCategory?o.viewSelectorCategory.views||[]:[],availableViews:o.availableViews,loading:o.viewsLoading,readonly:!o.canEdit,"onUpdate:selectedViews":r.onViewsUpdated},null,8,["visible","selectedViews","availableViews","loading","readonly","onUpdate:selectedViews"]),e.createVNode(I,{group:"deleteItem"})])}const KL=Se(ML,[["render",QL],["__scopeId","data-v-ce2643fe"]]);class qL{async ensureFolderHierarchy(t,n){let i=t;for(const o of n){const r={name:o.name,nodeType:o.type||"cm:folder"};o.properties&&(r.properties=o.properties);try{i=(await Re.createNode(i,r)).entry.id}catch(l){if((l.code||l.status)===409)try{i=(await qe.getNode(i,{relativePath:o.name})).entry.id}catch{throw l}else throw l}}return i}async getDocumentLibraryId(t){const n=await ht.getWorkspace(t);return(await Re.getDocumentLibrary(n.guid)).id}async createFileWithPlan(t,n,i,o,r,l){const s=await this.getDocumentLibraryId(t),c=await this.ensureFolderHierarchy(s,n),d=await Re.copyNode(i,c,o),u={};return l.type&&(u.nodeType=l.type),l.aspects&&(u.aspectNames=l.aspects),r&&Object.keys(r).length>0&&(u.properties=r),Object.keys(u).length>0&&await Re.updateNode(d.entry.id,u),d}async requalifyDocument(t,n,i,o,r,l,s){const c=s||await this.getDocumentLibraryId(n),d=await this.ensureFolderHierarchy(c,i);await Re.moveNode(t,d,r);const u={};if(l.type&&(u.nodeType=l.type),l.aspects){const m=(await Re.getNode(t)).aspectNames||[],p=new Set([...m,...l.aspects]);u.aspectNames=[...p]}if(o&&Object.keys(o).length>0&&(u.properties=o),Object.keys(u).length>0)return Re.updateNode(t,u)}async uploadWithPlan(t,n,i,o,r,l){Da().startUploadWithClassificationPlan(t,n,i,o,r,l)}}const Wi=new qL;function t_({planContent:a,metadataValues:t,selectedNature:n,destinationNodeName:i}){const o=pa.useToast(),r=Ft.global.t,l=e.ref({}),s=e.ref({}),c=I=>l.value[I]||[],d=I=>!!s.value[I],u=async I=>{if(!(!I.search||c(I.name).length>0)){s.value[I.name]=!0;try{const C={include:["properties"],query:{language:I.search.lang,query:I.search.query}},A=await Wt.search(C);l.value[I.name]=A.list.entries.map(w=>w.entry.properties[I.search.valueField]||w.entry.name)}catch(C){console.error(`Failed to execute search for field ${I.name}`,C),o.add({severity:"error",summary:r("classificationPlan.toast.searchError"),detail:r("classificationPlan.toast.searchFieldFailed",{field:I.description}),life:4e3})}finally{s.value[I.name]=!1}}},b=e.ref({});let m=null;const p=(I,C)=>{if(!I||C===void 0||C===null||C===""){delete b.value[I.name];return}I.regex&&(new RegExp(I.regex).test(C)?delete b.value[I.name]:b.value[I.name]=r("classificationPlan.validationRegexError",{regex:I.regex}))},g=(I,C)=>{clearTimeout(m),m=setTimeout(()=>{p(I,C)},500)},_=I=>Zi(I,t.value),f=e.computed(()=>{if(!n.value||!a.value?.FIELDS)return[];const I=new Set;Object.values(n.value.metadata).filter(w=>w.field).forEach(w=>I.add(w.field)),n.value.emplacement&&a.value.EMPLACEMENT&&n.value.emplacement.forEach(w=>{const X=a.value.EMPLACEMENT.find(R=>R.code===w);X&&X.metadata&&Object.values(X.metadata).forEach(R=>{R.field&&I.add(R.field),R.template&&ra(R.template).forEach(Y=>I.add(Y))})});const C=n.value.metadata["cm:name"]?.template;C&&ra(C).forEach(w=>I.add(w));const A=[...I];return a.value.FIELDS.filter(w=>A.includes(w.name))}),h=e.computed(()=>{if(!n.value)return[];const I=new Set;return Object.entries(n.value.metadata).filter(([,C])=>C.required&&C.field).forEach(([,C])=>I.add(C.field)),Object.values(n.value.metadata).forEach(C=>{C.template&&ra(C.template).forEach(A=>I.add(A))}),n.value.emplacement&&a.value.EMPLACEMENT&&n.value.emplacement.forEach(C=>{const A=a.value.EMPLACEMENT.find(w=>w.code===C);A&&A.metadata&&Object.entries(A.metadata).forEach(([,w])=>{w.required&&w.field&&I.add(w.field),w.template&&ra(w.template).forEach(X=>I.add(X))})}),[...I]}),S=I=>h.value.includes(I),y=e.computed(()=>!n.value||!a.value?.EMPLACEMENT?[]:n.value.emplacement.map(I=>{const C=a.value.EMPLACEMENT.find(R=>R.code===I);if(!C)return{name:`[${I}]`};const A={};C.type&&(A.type=C.type);const w={};let X=null;if(C.metadata)for(const[R,Y]of Object.entries(C.metadata)){const N=Object.keys(Y).find(le=>le!=="required"),V=Y[N];switch(N){case"value":w[R]=V;break;case"field":w[R]=t.value[V];break;case"template":w[R]=_(V);break}if(R==="cm:name"&&N!=="parent")switch(N){case"value":X=V;break;case"field":X=t.value[V];break;case"template":X=_(V);break}}return Object.keys(w).length>0&&(A.properties=w),A.name=X||C.name||`[${I}]`,A})),T=e.computed(()=>{if(!n.value||!a.value?.EMPLACEMENT)return"";const I=n.value.emplacement.map(C=>{const A=a.value.EMPLACEMENT.find(w=>w.code===C);if(!A)return"[emplacement introuvable]";if(A.metadata&&A.metadata["cm:name"]){const w=A.metadata["cm:name"],X=Object.keys(w).find(Y=>Y!=="required"),R=w[X];switch(X){case"value":return R;case"field":return t.value[R]||`[${R}]`;case"template":return _(R);default:return A.name||`[${C}]`}}return A.name||`[${C}]`});return i.value&&I.unshift(i.value),I.join("/")}),O=e.ref({});return e.watch([t,n],()=>{if(!n.value){O.value={};return}const I={};y.value.forEach(A=>{A.properties&&Object.assign(I,A.properties)});const C={};for(const[A,w]of Object.entries(n.value.metadata)){const X=Object.keys(w).find(Y=>Y!=="required"),R=w[X];switch(X){case"value":C[A]=R;break;case"field":C[A]=t.value[R];break;case"template":C[A]=_(R);break;case"parent":I[A]&&(C[A]=I[A]);break}}O.value=C},{deep:!0}),{currentFields:f,requiredFields:h,isFieldRequired:S,summaryPathFull:y,summaryDestinationPath:T,summaryMetadata:O,resolveTemplateReactive:_,searchOptions:l,searchLoading:s,getSearchOptions:c,isSearchLoading:d,loadSearchOptions:u,validationErrors:b,validateField:p,debounceValidate:g,resetClassification:()=>{l.value={},s.value={},b.value={},O.value={}}}}const Ic="__ALL_CATEGORIES__",a_="__NO_CATEGORY__",Li="__NO_NATURE__",$L={name:"NatureSelector",components:{PrimeDataTable:Ia,PrimeColumn:Ma,PrimeInputText:at,PrimeIconField:$n,PrimeInputIcon:ti,PrimeDropdown:qa,PrimeTag:dn},props:{natures:{type:Array,required:!0},modelValue:{type:String,default:null},allowNoNature:{type:Boolean,default:!1},gridThreshold:{type:Number,default:4},categories:{type:Array,default:()=>[]}},emits:["update:modelValue","select-no-nature"],setup(a,{emit:t}){const n=Ft.global.t,i=e.ref(""),o=e.ref(null),r=e.ref(Ic),l=e.computed(()=>!a.categories||a.categories.length===0?[]:[{label:n("classificationPlan.allCategories"),value:Ic},...a.categories.map(_=>({label:_.label,value:_.id})),{label:n("classificationPlan.noCategory"),value:a_}]),s=e.computed(()=>r.value===Ic?a.natures:r.value===a_?a.natures.filter(g=>!g.categories||g.categories.length===0):a.natures.filter(g=>g.categories&&g.categories.includes(r.value))),c=e.computed(()=>{const g=i.value.toLowerCase().trim();return g?s.value.filter(_=>_.name.toLowerCase().includes(g)||_.code.toLowerCase().includes(g)):s.value}),d=e.computed(()=>({code:Li,name:n("classificationPlan.noNature"),icon:"ri-file-line"})),u=e.computed(()=>{const g=[...c.value],_=i.value.trim().length>0;return a.allowNoNature&&!_&&g.unshift(d.value),g});return{t:n,natureSearch:i,selectedObject:o,selectedCategory:r,categoryFilterOptions:l,categoryFilteredNatures:s,tableOptions:u,rowClass:g=>g.code===Li?"nature-row-no-nature":"",onRowSelect:g=>{g.data.code===Li?t("select-no-nature"):t("update:modelValue",g.data.code)},getCategoryLabel:g=>{const _=a.categories.find(f=>f.id===g);return _?_.label:g},NO_NATURE_CODE:Li}}},eY={key:0},tY={key:0,class:"nature-category-filter"},aY={class:"nature-grid"},nY={key:0,class:"nature-grid-item"},iY={class:"nature-card-label nature-card-label--muted"},oY=["onClick"],rY={class:"nature-card-label"},lY={class:"nature-toolbar"},sY={key:0},cY={key:1,class:"nature-name-muted"};function dY(a,t,n,i,o,r){const l=e.resolveComponent("PrimeDropdown"),s=e.resolveComponent("PrimeInputIcon"),c=e.resolveComponent("PrimeInputText"),d=e.resolveComponent("PrimeIconField"),u=e.resolveComponent("PrimeColumn"),b=e.resolveComponent("PrimeTag"),m=e.resolveComponent("PrimeDataTable");return n.natures.length<=n.gridThreshold?(e.openBlock(),e.createElementBlock("div",eY,[i.categoryFilterOptions.length>0?(e.openBlock(),e.createElementBlock("div",tY,[e.createVNode(l,{modelValue:i.selectedCategory,"onUpdate:modelValue":t[0]||(t[0]=p=>i.selectedCategory=p),options:i.categoryFilterOptions,optionLabel:"label",optionValue:"value",placeholder:i.t("classificationPlan.filterByCategory"),class:"w-full"},{dropdownicon:e.withCtx(()=>[...t[6]||(t[6]=[e.createElementVNode("i",{class:"ri-filter-3-line"},null,-1)])]),_:1},8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",aY,[n.allowNoNature?(e.openBlock(),e.createElementBlock("div",nY,[e.createElementVNode("div",{class:e.normalizeClass(["nature-card","nature-card-no-nature",n.modelValue===i.NO_NATURE_CODE?"nature-card--selected":"nature-card--default"]),onClick:t[1]||(t[1]=p=>a.$emit("select-no-nature"))},[t[7]||(t[7]=e.createElementVNode("i",{class:"ri-file-line",style:{"font-size":"2rem"}},null,-1)),e.createElementVNode("div",iY,e.toDisplayString(i.t("classificationPlan.noNature")),1)],2)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.categoryFilteredNatures,p=>(e.openBlock(),e.createElementBlock("div",{key:p.code,class:"nature-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass(["nature-card",n.modelValue===p.code?"nature-card--selected":"nature-card--default"]),onClick:g=>a.$emit("update:modelValue",p.code)},[e.createElementVNode("i",{class:e.normalizeClass(p.icon||"ri-file-line"),style:{"font-size":"2rem"}},null,2),e.createElementVNode("div",rY,e.toDisplayString(p.name),1)],10,oY)]))),128))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",lY,[e.createVNode(d,{class:"nature-toolbar-search"},{default:e.withCtx(()=>[e.createVNode(s,{class:"ri-search-line"}),e.createVNode(c,{modelValue:i.natureSearch,"onUpdate:modelValue":t[2]||(t[2]=p=>i.natureSearch=p),placeholder:i.t("classificationPlan.searchNaturePlaceholder"),class:"full-width"},null,8,["modelValue","placeholder"]),i.natureSearch?(e.openBlock(),e.createBlock(s,{key:0,class:"ri-close-line nature-search-clear",onClick:t[3]||(t[3]=p=>i.natureSearch="")})):e.createCommentVNode("",!0)]),_:1}),i.categoryFilterOptions.length>0?(e.openBlock(),e.createBlock(l,{key:0,modelValue:i.selectedCategory,"onUpdate:modelValue":t[4]||(t[4]=p=>i.selectedCategory=p),options:i.categoryFilterOptions,optionLabel:"label",optionValue:"value",placeholder:i.t("classificationPlan.filterByCategory"),class:"nature-toolbar-category"},{dropdownicon:e.withCtx(()=>[...t[8]||(t[8]=[e.createElementVNode("i",{class:"ri-filter-3-line"},null,-1)])]),_:1},8,["modelValue","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(m,{selection:i.selectedObject,"onUpdate:selection":t[5]||(t[5]=p=>i.selectedObject=p),value:i.tableOptions,"selection-mode":"single",dataKey:"code",paginator:i.tableOptions.length>12,rows:12,rowsPerPageOptions:[12,24,50],size:"small",rowHover:"",rowClass:i.rowClass,onRowSelect:i.onRowSelect},{default:e.withCtx(()=>[e.createVNode(u,{field:"icon",header:"",style:{width:"3rem"}},{body:e.withCtx(p=>[e.createElementVNode("i",{class:e.normalizeClass(p.data.icon||"ri-file-line"),style:{"font-size":"1.5rem"}},null,2)]),_:1}),e.createVNode(u,{field:"name",header:i.t("classificationPlan.natureColumn")},{body:e.withCtx(p=>[e.createElementVNode("span",{class:e.normalizeClass({"nature-name-muted":p.data.code===i.NO_NATURE_CODE})},e.toDisplayString(p.data.name),3)]),_:1},8,["header"]),e.createVNode(u,{field:"code",header:i.t("classificationPlan.code"),style:{width:"15rem"}},{body:e.withCtx(p=>[p.data.code!==i.NO_NATURE_CODE?(e.openBlock(),e.createElementBlock("code",sY,e.toDisplayString(p.data.code),1)):(e.openBlock(),e.createElementBlock("span",cY,"--"))]),_:1},8,["header"]),n.categories.length>0?(e.openBlock(),e.createBlock(u,{key:0,header:i.t("classificationPlan.category")},{body:e.withCtx(p=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.data.categories||[],g=>(e.openBlock(),e.createBlock(b,{key:g,value:i.getCategoryLabel(g),class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["selection","value","paginator","rowClass","onRowSelect"])],64))}const n_=Se($L,[["render",dY],["__scopeId","data-v-dc710e8e"]]),mY={name:"MetadataFormFields",components:{PrimeDatePicker:ei,PrimeInputNumber:ka,PrimeKnob:Bc,PrimeCheckbox:ma,PrimeToggleSwitch:vn,PrimeDropdown:qa,PrimeMultiSelect:Dn,PrimeSelectButton:Ka,PrimeInputChips:v_,PrimeRating:Z_,PrimePassword:ed,PrimeTextarea:va,PrimeInputText:at},props:{fields:{type:Array,required:!0},modelValue:{type:Object,required:!0},requiredFields:{type:Array,default:()=>[]},disabledFields:{type:Set,default:()=>new Set},validationErrors:{type:Object,default:()=>({})},getSearchOptions:{type:Function,default:()=>[]},isSearchLoading:{type:Function,default:()=>!1}},emits:["update:modelValue","load-search","validate"],setup(a,{emit:t}){return{t:Ft.global.t,updateField:(o,r)=>{t("update:modelValue",{...a.modelValue,[o]:r})}}}},pY=["for"],uY={key:0,class:"required"},bY={key:15},gY={key:16},_Y={key:17,class:"p-error"};function hY(a,t,n,i,o,r){const l=e.resolveComponent("PrimeDatePicker"),s=e.resolveComponent("PrimeInputNumber"),c=e.resolveComponent("PrimeKnob"),d=e.resolveComponent("PrimeCheckbox"),u=e.resolveComponent("PrimeToggleSwitch"),b=e.resolveComponent("PrimeDropdown"),m=e.resolveComponent("PrimeMultiSelect"),p=e.resolveComponent("PrimeSelectButton"),g=e.resolveComponent("PrimeInputChips"),_=e.resolveComponent("PrimeRating"),f=e.resolveComponent("PrimePassword"),h=e.resolveComponent("PrimeTextarea"),S=e.resolveComponent("PrimeInputText");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.fields,y=>(e.openBlock(),e.createElementBlock("div",{key:y.name,class:"form-field"},[e.createElementVNode("label",{for:y.name},[e.createTextVNode(e.toDisplayString(y.description)+" ",1),n.requiredFields.includes(y.name)?(e.openBlock(),e.createElementBlock("span",uY," *")):e.createCommentVNode("",!0)],8,pY),y.input==="date"?(e.openBlock(),e.createBlock(l,{key:0,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="datetime"?(e.openBlock(),e.createBlock(l,{key:1,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),showTime:"","onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.type==="number"?(e.openBlock(),e.createBlock(s,{key:2,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),min:y.min,max:y.max,"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","min","max","onUpdate:modelValue"])):y.input==="knob"?(e.openBlock(),e.createBlock(c,{key:3,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="boolean"?(e.openBlock(),e.createBlock(d,{key:4,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),binary:!0,"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="toggle"?(e.openBlock(),e.createBlock(u,{key:5,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="list"?(e.openBlock(),e.createBlock(b,{key:6,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),options:y.values||[],placeholder:y.description,"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","options","placeholder","onUpdate:modelValue"])):y.input==="search"?(e.openBlock(),e.createBlock(b,{key:7,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),options:n.getSearchOptions(y.name),loading:n.isSearchLoading(y.name),placeholder:i.t("classificationPlan.searchPlaceholder"),"onUpdate:modelValue":T=>i.updateField(y.name,T),onFocus:T=>a.$emit("load-search",y)},null,8,["id","modelValue","disabled","options","loading","placeholder","onUpdate:modelValue","onFocus"])):y.input==="multilist"?(e.openBlock(),e.createBlock(m,{key:8,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),options:y.values||[],placeholder:y.description,"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","options","placeholder","onUpdate:modelValue"])):y.input==="select"?(e.openBlock(),e.createBlock(p,{key:9,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),options:y.values||[],"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","options","onUpdate:modelValue"])):y.input==="chips"?(e.openBlock(),e.createBlock(g,{key:10,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="rating"?(e.openBlock(),e.createBlock(_,{key:11,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="password"?(e.openBlock(),e.createBlock(f,{key:12,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):y.input==="textarea"?(e.openBlock(),e.createBlock(h,{key:13,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),"onUpdate:modelValue":T=>i.updateField(y.name,T)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(S,{key:14,id:y.name,modelValue:n.modelValue[y.name],disabled:n.disabledFields.has(y.name),pattern:y.regex,"onUpdate:modelValue":T=>i.updateField(y.name,T),onInput:T=>a.$emit("validate",y,n.modelValue[y.name])},null,8,["id","modelValue","disabled","pattern","onUpdate:modelValue","onInput"])),y.type==="number"&&(y.min!==void 0||y.max!==void 0)?(e.openBlock(),e.createElementBlock("small",bY,e.toDisplayString(i.t("classificationPlan.min"))+": "+e.toDisplayString(y.min??i.t("classificationPlan.na"))+", "+e.toDisplayString(i.t("classificationPlan.max"))+": "+e.toDisplayString(y.max??i.t("classificationPlan.na")),1)):e.createCommentVNode("",!0),y.type==="string"&&y.regex?(e.openBlock(),e.createElementBlock("small",gY,e.toDisplayString(i.t("classificationPlan.constraint"))+": "+e.toDisplayString(y.regex),1)):e.createCommentVNode("",!0),n.validationErrors[y.name]?(e.openBlock(),e.createElementBlock("small",_Y,e.toDisplayString(n.validationErrors[y.name]),1)):e.createCommentVNode("",!0)]))),128)}const i_=Se(mY,[["render",hY],["__scopeId","data-v-d29bb16a"]]),yY={name:"UploadPlanPopup",components:{PrimeDialog:_t,PrimeDropdown:qa,PrimeButton:ce,PrimeFileUpload:un,PrimePanel:Qc,PrimeDivider:Ha,PrimeMessage:da,PrimeStepper:Kc,PrimeStepList:qc,PrimeStep:$c,NatureSelector:n_,MetadataFormFields:i_},props:{visible:{type:Boolean,default:!1},forcedPlanName:{type:String,default:null},filesToUpload:{type:Array,default:()=>[]},createFileMode:{type:Object,default:null},defaultDestinationNodeId:{type:String,default:null}},emits:["update:visible","close","file-created","upload-complete"],setup(a,{emit:t}){const n=pa.useToast(),i=Ft.global.t,o=e.ref(1),r=e.ref(!1),l=e.ref([]),s=e.ref(null),c=e.ref(null),d=e.ref(null),u=e.ref(!1),b=e.ref({}),m=e.ref([]),p=e.ref(null),g=e.ref(new Set),_=e.ref(null),f=e.computed({get:()=>a.visible,set:L=>t("update:visible",L)}),h=e.computed(()=>!!a.forcedPlanName),S=e.computed(()=>!!a.createFileMode),y=e.ref(null),T=e.ref(null),O=e.computed(()=>c.value?.NATURES||[]),D=e.computed(()=>(c.value?.VIEW_CATEGORIES||[]).filter(L=>L.display&&L.display.includes("import"))),I=e.computed(()=>O.value.find(L=>L.code===d.value)),{currentFields:C,requiredFields:A,isFieldRequired:w,summaryPathFull:X,summaryDestinationPath:R,summaryMetadata:Y,getSearchOptions:N,isSearchLoading:V,loadSearchOptions:le,validationErrors:Q,debounceValidate:fe,resetClassification:K}=t_({planContent:c,metadataValues:b,selectedNature:I,destinationNodeName:T}),ee=e.computed(()=>{const L=[];return h.value||L.push({value:1,label:i("classificationPlan.stepper.plan")}),L.push({value:2,label:i("classificationPlan.stepper.nature")}),L.push({value:3,label:u.value?i("classificationPlan.stepper.files"):i("classificationPlan.stepper.metadata")}),L.push({value:4,label:i("classificationPlan.stepper.summary")}),L}),G=e.computed(()=>{switch(o.value){case 1:return i("classificationPlan.steps.selectPlan");case 2:return i("classificationPlan.steps.selectNature");case 3:return u.value?i("classificationPlan.steps.selectFiles"):h.value?i("classificationPlan.steps.fillMetadata"):i("classificationPlan.steps.fillMetadataAndFiles");case 4:return i("classificationPlan.steps.summary");default:return""}}),P=e.computed(()=>{if(!I.value)return m.value.map(k=>({original:k.name,new:k.name}));const L=I.value.metadata["cm:name"]?.template;return L?m.value.map(k=>({original:k.name,new:Zi(L,b.value)})):m.value.map(k=>({original:k.name,new:k.name}))}),pe=e.computed(()=>{if(o.value===1&&!h.value)return!!s.value;if(o.value===2)return!!d.value||u.value;if(o.value===3){if(u.value)return m.value.length>0;const L=A.value.every(z=>{const ae=b.value[z];return ae!=null&&ae!==""}),k=S.value||m.value.length>0,j=Object.keys(Q.value).length===0;return L&&k&&j}return o.value===4}),U=e.computed(()=>o.value===3?i("classificationPlan.buttons.viewSummary"):o.value===4?S.value?i("classificationPlan.buttons.acceptAndCreate"):i("classificationPlan.buttons.acceptAndImport"):i("classificationPlan.buttons.next")),B=async()=>{u.value=!0,d.value=null;try{if(a.defaultDestinationNodeId){const k=[(await qe.getNode(a.defaultDestinationNodeId)).entry.name],j=Rt().currentNode?.id;if(j&&j!==a.defaultDestinationNodeId){const z=await qe.getNode(j,{include:["path"]}),ae=z.entry.path?.elements||[],re=ae.findIndex(oe=>oe.id===a.defaultDestinationNodeId);if(re!==-1){const oe=ae.slice(re+1).map(be=>be.name);k.push(...oe)}k.push(z.entry.name)}y.value="/ "+k.join(" / ")}else{const L=Rt().currentNode?.id;if(L){const k=await qe.getNode(L,{include:["path"]}),j=k.entry.path?.elements||[],z=j.findIndex(re=>re.name==="documentLibrary"),ae=j.slice(z+1).map(re=>re.name);ae.push(k.entry.name),y.value="/ "+ae.join(" / ")}}}catch{}o.value=3},de=L=>{const k=new Set(m.value.map(z=>z.name)),j=L.files.filter(z=>!k.has(z.name));m.value=[...m.value,...j]},ne=L=>{m.value=m.value.filter((k,j)=>j!==L)},se=L=>bi.convertBytesToSize(L)||"-",ge=async()=>{r.value=!0;try{l.value=await ga.listPlans()}catch(L){console.error("Failed to load classification plans",L),n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.loadPlansError"),life:3e3})}finally{r.value=!1}},Ne=async()=>{if(s.value){r.value=!0;try{c.value=await ga.getPlan(s.value),await Ce()}catch(L){console.error(`Failed to load plan content for ${s.value}`,L),n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.loadPlanContentError",{plan:s.value}),life:3e3})}finally{r.value=!1}}},Ce=async()=>{try{const L=Rt(),k=a.defaultDestinationNodeId||L.currentNode?.id;if(!k||!c.value)return;const j=await qe.getNode(k,{include:["path","properties"]}),z=j.entry.path?.elements||[],ae=z.findIndex(ve=>ve.name==="Sites");ae!==-1&&z.length>ae+1&&(_.value=z[ae+1].name);const re=z.findIndex(ve=>ve.name==="documentLibrary");if(re===-1)return;const oe=z.slice(re+1).map(ve=>ve.id),Xe=(await Promise.all(oe.map(ve=>qe.getNode(ve,{include:["properties"]})))).map(ve=>({id:ve.entry.id,name:ve.entry.name,properties:ve.entry.properties||{}}));Xe.push({id:j.entry.id,name:j.entry.name,properties:j.entry.properties||{}}),Ye(Xe)}catch(L){console.error("Failed to detect parent context:",L)}},Ye=L=>{if(!c.value?.EMPLACEMENT)return;const k=[],j={},z=new Set;for(const ae of c.value.EMPLACEMENT){if(!ae.metadata)continue;const re=Object.keys(ae.metadata);for(const oe of L){let be=0;const Xe={};for(const ve of re)oe.properties[ve]!==void 0&&(be++,Xe[ve]=oe.properties[ve]);if(be>0){k.push({emplacementCode:ae.code,folderId:oe.id,folderName:oe.name,metadataValues:Xe});for(const[ve,dt]of Object.entries(ae.metadata)){const At=Object.keys(dt).find(mt=>mt!=="required");if(At==="field"){const mt=dt[At],me=oe.properties[ve];me!==void 0&&(j[mt]=me,z.add(mt))}}break}}}p.value={matchedEmplacements:k,extractedValues:j},g.value=z},Ue=()=>{b.value={},C.value.forEach(L=>{p.value?.extractedValues&&p.value.extractedValues[L.name]!==void 0?b.value[L.name]=p.value.extractedValues[L.name]:b.value[L.name]=L.default!==void 0?L.default:null})},E=async()=>{const L=a.createFileMode,k=I.value.metadata["cm:name"]?.template,j=k?Zi(k,b.value)+(L.fileExtension?`.${L.fileExtension}`:""):L.fileName,z=await Wi.createFileWithPlan(_.value,X.value,L.templateNodeId,j,Y.value,I.value);f.value=!1,t("file-created",{nodeId:z.entry.id,fileType:L.fileType}),n.add({severity:"success",summary:i("success"),detail:i("files.successCreate"),life:3e3})},te=async()=>{if(!_.value){n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.workspaceError"),life:5e3});return}if(S.value){await E();return}const L=Da();if(L.onCompleteCallback=()=>t("upload-complete"),u.value){const k=a.defaultDestinationNodeId||Rt().currentNode?.id,j=m.value.map(z=>({file:z,relativePath:""}));L.startUpload(j,k)}else await Wi.uploadWithPlan(_.value,X.value,m.value,Y.value,P.value,a.defaultDestinationNodeId);f.value=!1},J=()=>{if(o.value===1&&!h.value&&Ne(),o.value===2&&Ue(),o.value===4){te();return}o.value<4&&o.value++},W=()=>{if(o.value>1){if(h.value&&o.value===2)return;o.value--}},M=()=>{o.value=1,s.value=null,c.value=null,d.value=null,u.value=!1,y.value=null,T.value=null,b.value={},m.value=[],p.value=null,g.value=new Set,_.value=null,K(),t("close")};return e.watch(()=>a.visible,L=>{L&&(a.defaultDestinationNodeId&&qe.getNode(a.defaultDestinationNodeId).then(k=>{T.value=k.entry.name}).catch(()=>{}),a.forcedPlanName?(s.value=a.forcedPlanName,m.value=a.filesToUpload||[],o.value=2,Ne(),a.createFileMode&&(m.value=[{name:a.createFileMode.fileName}])):l.value.length===0&&ge()),L||M()}),e.watch(d,L=>{L&&(u.value=!1,J())}),{isVisible:f,currentStep:o,isLoading:r,planFiles:l,selectedPlanFile:s,planContent:c,selectedNatureCode:d,metadataValues:b,internalFiles:m,natureOptions:O,importCategories:D,selectedNature:I,currentFields:C,requiredFields:A,canGoToNextStep:pe,nextButtonLabel:U,summaryDestinationPath:R,summaryPathFull:X,summaryFileRenames:P,summaryMetadata:Y,onFileSelect:de,nextStep:J,prevStep:W,reset:M,isFieldRequired:w,getSearchOptions:N,isSearchLoading:V,loadSearchOptions:le,validationErrors:Q,debounceValidate:fe,isForcedPlan:h,isCreateMode:S,noNature:u,noNatureResolvedPath:y,selectNoNature:B,visibleSteps:ee,currentStepTitle:G,removeFile:ne,formatFileSize:se,preFilledFields:g,t:i}}},fY={key:0,class:"stepper-header"},NY={class:"step-title"},SY={key:0,class:"step-plan-info"},EY={key:1,class:"loading-container"},TY={key:2},AY={key:3},OY={key:4},CY={key:0,class:"no-nature-destination"},RY={class:"no-nature-destination-label"},IY={class:"no-nature-destination-path"},MY={key:0,class:"upload-file-list"},vY={key:0,class:"upload-file-size"},ZY={key:3,class:"files-section"},DY={key:5};function wY(a,t,n,i,o,r){const l=e.resolveComponent("PrimeStep"),s=e.resolveComponent("PrimeStepList"),c=e.resolveComponent("PrimeStepper"),d=e.resolveComponent("PrimeDropdown"),u=e.resolveComponent("PrimeMessage"),b=e.resolveComponent("NatureSelector"),m=e.resolveComponent("MetadataFormFields"),p=e.resolveComponent("PrimeButton"),g=e.resolveComponent("PrimeFileUpload"),_=e.resolveComponent("PrimePanel"),f=e.resolveComponent("PrimeDivider"),h=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(h,{visible:i.isVisible,"onUpdate:visible":t[6]||(t[6]=S=>i.isVisible=S),header:i.isCreateMode?i.t("classificationPlan.upload.headerCreate"):i.t("classificationPlan.upload.headerImport"),modal:"",class:"upload-plan-dialog",style:{width:"50rem"},onHide:i.reset},{footer:e.withCtx(()=>[e.createVNode(p,{label:i.t("classificationPlan.buttons.cancel"),icon:"ri-close-line",text:"",onClick:t[5]||(t[5]=S=>i.isVisible=!1)},null,8,["label"]),i.currentStep>1&&!(i.isForcedPlan&&i.currentStep===2)?(e.openBlock(),e.createBlock(p,{key:0,label:i.t("classificationPlan.buttons.previous"),icon:"ri-arrow-left-line",text:"",onClick:i.prevStep},null,8,["label","onClick"])):e.createCommentVNode("",!0),e.createVNode(p,{label:i.nextButtonLabel,icon:"ri-arrow-right-line","icon-pos":"right",onClick:i.nextStep,disabled:!i.canGoToNextStep},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[i.isLoading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fY,[e.createVNode(c,{value:i.currentStep,linear:"",class:"stepper-indicator"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.visibleSteps,S=>(e.openBlock(),e.createBlock(l,{key:S.value,value:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),e.createElementVNode("h4",NY,e.toDisplayString(i.currentStepTitle),1),i.selectedPlanFile&&i.currentStep>=2?(e.openBlock(),e.createElementBlock("small",SY,e.toDisplayString(i.t("classificationPlan.plan"))+" : "+e.toDisplayString(i.selectedPlanFile),1)):e.createCommentVNode("",!0)])),i.isLoading?(e.openBlock(),e.createElementBlock("div",EY,[...t[7]||(t[7]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin",style:{"font-size":"2rem"}},null,-1)])])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===1&&!i.isForcedPlan?(e.openBlock(),e.createElementBlock("div",TY,[e.createVNode(d,{modelValue:i.selectedPlanFile,"onUpdate:modelValue":t[0]||(t[0]=S=>i.selectedPlanFile=S),options:i.planFiles,placeholder:i.t("classificationPlan.choosePlan"),class:"full-width",disabled:i.planFiles.length===0,"aria-label":i.t("classificationPlan.planAriaLabel")},null,8,["modelValue","options","placeholder","disabled","aria-label"]),!i.isLoading&&i.planFiles.length===0?(e.openBlock(),e.createBlock(u,{key:0,severity:"info",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.t("classificationPlan.noPlanFound")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===2?(e.openBlock(),e.createElementBlock("div",AY,[e.createVNode(b,{natures:i.natureOptions,modelValue:i.selectedNatureCode,allowNoNature:!i.isCreateMode,categories:i.importCategories,"onUpdate:modelValue":t[1]||(t[1]=S=>i.selectedNatureCode=S),onSelectNoNature:i.selectNoNature},null,8,["natures","modelValue","allowNoNature","categories","onSelectNoNature"])])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===3?(e.openBlock(),e.createElementBlock("div",OY,[i.noNature?(e.openBlock(),e.createElementBlock("div",CY,[e.createElementVNode("p",RY,[t[8]||(t[8]=e.createElementVNode("i",{class:"ri-file-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(i.t("classificationPlan.destinationLabel")),1)]),e.createElementVNode("code",IY,e.toDisplayString(i.noNatureResolvedPath||i.t("classificationPlan.destinationCurrent")),1)])):e.createCommentVNode("",!0),i.noNature?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:1,fields:i.currentFields,modelValue:i.metadataValues,requiredFields:i.requiredFields,disabledFields:i.preFilledFields,validationErrors:i.validationErrors,getSearchOptions:i.getSearchOptions,isSearchLoading:i.isSearchLoading,"onUpdate:modelValue":t[2]||(t[2]=S=>i.metadataValues=S),onLoadSearch:t[3]||(t[3]=S=>i.loadSearchOptions(S)),onValidate:t[4]||(t[4]=S=>i.debounceValidate(S,i.metadataValues[S.name]))},null,8,["fields","modelValue","requiredFields","disabledFields","validationErrors","getSearchOptions","isSearchLoading"])),i.isCreateMode?(e.openBlock(),e.createElementBlock("div",ZY,[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.fileToCreate"))+" :",1)]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.internalFiles,(S,y)=>(e.openBlock(),e.createElementBlock("li",{key:y},e.toDisplayString(S.name),1))),128))])])):(e.openBlock(),e.createBlock(g,{key:2,name:"files[]",onSelect:i.onFileSelect,multiple:"","show-upload-button":!1,"show-cancel-button":!1,"choose-label":i.t("classificationPlan.chooseFiles")},{content:e.withCtx(()=>[i.internalFiles.length?(e.openBlock(),e.createElementBlock("ul",MY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.internalFiles,(S,y)=>(e.openBlock(),e.createElementBlock("li",{key:y,class:"upload-file-item"},[e.createElementVNode("span",null,e.toDisplayString(S.name),1),S.size?(e.openBlock(),e.createElementBlock("span",vY,e.toDisplayString(i.formatFileSize(S.size)),1)):e.createCommentVNode("",!0),e.createVNode(p,{icon:"ri-close-line",text:"",rounded:"",severity:"danger",size:"small",onClick:T=>i.removeFile(y)},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["onSelect","choose-label"]))])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===4?(e.openBlock(),e.createElementBlock("div",DY,[e.createElementVNode("p",null,e.toDisplayString(i.t("classificationPlan.summary.verifyBeforeImport")),1),e.createVNode(_,{header:i.t("classificationPlan.summary.generalInfo")},{default:e.withCtx(()=>[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.plan"))+" :",1),e.createTextVNode(" "+e.toDisplayString(i.selectedPlanFile),1)]),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.nature"))+" :",1),e.createTextVNode(" "+e.toDisplayString(i.noNature?i.t("classificationPlan.noNature"):i.selectedNature?.name),1)])]),_:1},8,["header"]),i.noNature?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,header:i.t("classificationPlan.summary.metadataToSend"),class:"panel-margin"},{default:e.withCtx(()=>[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.summaryMetadata,(S,y)=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createElementVNode("strong",null,e.toDisplayString(y)+":",1),e.createTextVNode(" "+e.toDisplayString(S),1)]))),128))])]),_:1},8,["header"])),e.createVNode(_,{header:i.t("classificationPlan.summary.fileClassification"),class:"panel-margin"},{default:e.withCtx(()=>[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.summary.destinationFolder"))+" :",1)]),e.createElementVNode("p",null,[e.createElementVNode("code",null,e.toDisplayString(i.noNature?i.noNatureResolvedPath||i.t("classificationPlan.destinationCurrent"):i.summaryDestinationPath),1)]),e.createVNode(f),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.isCreateMode?i.t("classificationPlan.fileToCreate")+" :":i.t("classificationPlan.files")+" :"),1)]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.summaryFileRenames,S=>(e.openBlock(),e.createElementBlock("li",{key:S.original},[e.createTextVNode(e.toDisplayString(S.original)+" ",1),S.original!==S.new?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[9]||(t[9]=e.createElementVNode("i",{class:"ri-arrow-right-line arrow-icon"},null,-1)),e.createElementVNode("strong",null,e.toDisplayString(S.new),1)],64)):e.createCommentVNode("",!0)]))),128))])]),_:1},8,["header"])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header","onHide"])}const WY=Se(yY,[["render",wY],["__scopeId","data-v-dff33881"]]),LY={name:"RequalifyPlanPopup",components:{PrimeDialog:_t,PrimeDropdown:qa,PrimeButton:ce,PrimePanel:Qc,PrimeDivider:Ha,PrimeMessage:da,NatureSelector:n_,MetadataFormFields:i_},props:{currentNode:{type:Object,required:!0},forcedPlanName:{type:String,default:null},defaultDestinationNodeId:{type:String,default:null}},emits:["close"],setup(a,{emit:t}){const n=pa.useToast(),i=Ft.global.t,o=e.ref(1),r=e.ref(!1),l=e.ref(!0),s=e.ref([]),c=e.ref(null),d=e.ref(null),u=e.ref(null),b=e.ref({}),m=e.ref(null),p=e.ref({}),g=e.computed(()=>!!a.forcedPlanName),_=e.ref(null),f=e.computed(()=>d.value?.NATURES||[]),h=e.computed(()=>(d.value?.VIEW_CATEGORIES||[]).filter(ne=>ne.display&&ne.display.includes("requalify"))),S=e.computed(()=>f.value.find(ne=>ne.code===u.value)),{currentFields:y,requiredFields:T,isFieldRequired:O,summaryPathFull:D,summaryDestinationPath:I,summaryMetadata:C,getSearchOptions:A,isSearchLoading:w,loadSearchOptions:X,validationErrors:R,debounceValidate:Y,resetClassification:N}=t_({planContent:d,metadataValues:b,selectedNature:S,destinationNodeName:_}),V=e.computed(()=>{const ne=a.currentNode.path?.name;if(!ne)return a.currentNode.name;if(_.value){const Ne=ne.split("/"),Ce=Ne.indexOf(_.value);if(Ce!==-1){const Ye=Ne.slice(Ce);return Ye.push(a.currentNode.name),Ye.join("/")}}const se=ne.split("/"),ge=se.indexOf("documentLibrary");if(ge!==-1){const Ne=se.slice(ge+1);return Ne.push(a.currentNode.name),Ne.join("/")}return ne+"/"+a.currentNode.name}),le=e.computed(()=>{if(!S.value)return a.currentNode.name;const ne=S.value.metadata["cm:name"]?.template;if(!ne)return a.currentNode.name;const se=a.currentNode.name,ge=se.lastIndexOf("."),Ne=ge>0?se.substring(ge):"";return Zi(ne,b.value)+Ne}),Q=e.computed(()=>{if(o.value===1&&!g.value)return!!c.value;if(o.value===2)return!!u.value;if(o.value===3){const ne=T.value.every(ge=>{const Ne=b.value[ge];return Ne!=null&&Ne!==""}),se=Object.keys(R.value).length===0;return ne&&se}return o.value===4}),fe=e.computed(()=>o.value===3?i("classificationPlan.buttons.viewSummary"):o.value===4?i("classificationPlan.buttons.requalify"):i("classificationPlan.buttons.next")),K=async()=>{r.value=!0;try{s.value=await ga.listPlans()}catch(ne){console.error("Failed to load classification plans",ne),n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.loadPlansError"),life:3e3})}finally{r.value=!1}},ee=async()=>{if(c.value){r.value=!0;try{d.value=await ga.getPlan(c.value),await G()}catch(ne){console.error(`Failed to load plan content for ${c.value}`,ne),n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.loadPlanContentError",{plan:c.value}),life:3e3})}finally{r.value=!1}}},G=async()=>{try{const se=(await qe.getNode(a.currentNode.id,{include:["path"]})).entry.path?.elements||[],ge=se.findIndex(Ce=>Ce.name==="Sites");ge!==-1&&se.length>ge+1&&(m.value=se[ge+1].name);const Ne=se.findIndex(Ce=>Ce.name==="documentLibrary");if(Ne!==-1){const Ce=se.slice(Ne+1),Ye={};for(const Ue of Ce)try{const E=await qe.getNode(Ue.id,{include:["properties"]});Object.assign(Ye,E.entry.properties||{})}catch(E){console.warn(`Failed to fetch properties for parent folder ${Ue.name}`,E)}p.value=Ye}}catch(ne){console.error("Failed to detect workspace site ID:",ne)}},P=()=>{b.value={};const ne={};if(S.value?.metadata)for(const[Ne,Ce]of Object.entries(S.value.metadata)){const Ye=Object.keys(Ce).find(Ue=>Ue!=="required");Ye==="field"&&(ne[Ce[Ye]]=Ne)}S.value?.emplacement&&d.value?.EMPLACEMENT&&S.value.emplacement.forEach(Ne=>{const Ce=d.value.EMPLACEMENT.find(Ye=>Ye.code===Ne);if(Ce?.metadata)for(const[Ye,Ue]of Object.entries(Ce.metadata)){const E=Object.keys(Ue).find(te=>te!=="required");E==="field"&&(ne[Ue[E]]=Ye)}});const se=a.currentNode.properties||{},ge=p.value||{};y.value.forEach(Ne=>{let Ce=null;const Ye=ne[Ne.name];Ye&&(Ce=se[Ye]??ge[Ye]),Ce==null&&(Ce=se[Ne.name]),Ce!=null?b.value[Ne.name]=Ce:b.value[Ne.name]=Ne.default!==void 0?Ne.default:null})},pe=async()=>{if(!m.value){n.add({severity:"error",summary:i("error"),detail:i("classificationPlan.toast.workspaceError"),life:5e3});return}try{await Wi.requalifyDocument(a.currentNode.id,m.value,D.value,C.value,le.value,S.value,a.defaultDestinationNodeId),n.add({severity:"success",summary:i("success"),detail:i("classificationPlan.toast.requalifySuccess"),life:3e3}),l.value=!1,t("close")}catch(ne){console.error("Requalification failed:",ne),n.add({severity:"error",summary:i("error"),detail:ne.message||i("classificationPlan.toast.requalifyError"),life:5e3})}},U=()=>{if(o.value===1&&!g.value&&ee(),o.value===2&&P(),o.value===4){pe();return}o.value<4&&o.value++},B=()=>{if(o.value>1){if(g.value&&o.value===2)return;o.value--}},de=()=>{o.value=1,c.value=null,d.value=null,u.value=null,b.value={},m.value=null,_.value=null,N()};return a.defaultDestinationNodeId&&qe.getNode(a.defaultDestinationNodeId).then(ne=>{_.value=ne.entry.name}).catch(()=>{}),a.forcedPlanName?(c.value=a.forcedPlanName,o.value=2,ee()):K(),e.watch(l,ne=>{ne||(de(),t("close"))}),e.watch(u,ne=>{ne&&U()}),{isVisible:l,currentStep:o,isLoading:r,planFiles:s,selectedPlanFile:c,planContent:d,selectedNatureCode:u,metadataValues:b,natureOptions:f,requalifyCategories:h,selectedNature:S,currentFields:y,requiredFields:T,canGoToNextStep:Q,nextButtonLabel:fe,summaryDestinationPath:I,displayCurrentPath:V,summaryPathFull:D,summaryNewFileName:le,summaryMetadata:C,nextStep:U,prevStep:B,reset:de,isFieldRequired:O,getSearchOptions:A,isSearchLoading:w,loadSearchOptions:X,validationErrors:R,debounceValidate:Y,isForcedPlan:g,t:i}}},YY={key:0,class:"loading-container"},kY={key:1},xY={key:2},zY={key:3},GY={key:4};function FY(a,t,n,i,o,r){const l=e.resolveComponent("PrimeDropdown"),s=e.resolveComponent("PrimeMessage"),c=e.resolveComponent("NatureSelector"),d=e.resolveComponent("MetadataFormFields"),u=e.resolveComponent("PrimePanel"),b=e.resolveComponent("PrimeDivider"),m=e.resolveComponent("PrimeButton"),p=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(p,{visible:i.isVisible,"onUpdate:visible":t[6]||(t[6]=g=>i.isVisible=g),header:i.t("classificationPlan.requalify.title"),modal:"",class:"requalify-dialog",style:{width:"50rem"},onHide:i.reset},{footer:e.withCtx(()=>[e.createVNode(m,{label:i.t("classificationPlan.buttons.cancel"),icon:"ri-close-line",text:"",onClick:t[5]||(t[5]=g=>i.isVisible=!1)},null,8,["label"]),i.currentStep>1&&!(i.isForcedPlan&&i.currentStep===2)?(e.openBlock(),e.createBlock(m,{key:0,label:i.t("classificationPlan.buttons.previous"),icon:"ri-arrow-left-line",text:"",onClick:i.prevStep},null,8,["label","onClick"])):e.createCommentVNode("",!0),e.createVNode(m,{label:i.nextButtonLabel,icon:"ri-arrow-right-line","icon-pos":"right",onClick:i.nextStep,disabled:!i.canGoToNextStep},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[i.isLoading?(e.openBlock(),e.createElementBlock("div",YY,[...t[7]||(t[7]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin",style:{"font-size":"2rem"}},null,-1)])])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===1&&!i.isForcedPlan?(e.openBlock(),e.createElementBlock("div",kY,[e.createElementVNode("h5",null,e.toDisplayString(i.t("classificationPlan.requalify.title"))+" - "+e.toDisplayString(i.t("classificationPlan.steps.step",{n:1})),1),e.createElementVNode("p",null,e.toDisplayString(i.t("classificationPlan.steps.selectPlan")),1),e.createVNode(l,{modelValue:i.selectedPlanFile,"onUpdate:modelValue":t[0]||(t[0]=g=>i.selectedPlanFile=g),options:i.planFiles,placeholder:i.t("classificationPlan.choosePlan"),class:"full-width",disabled:i.planFiles.length===0,"aria-label":i.t("classificationPlan.requalify.title")},null,8,["modelValue","options","placeholder","disabled","aria-label"]),!i.isLoading&&i.planFiles.length===0?(e.openBlock(),e.createBlock(s,{key:0,severity:"info",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.t("classificationPlan.noPlanFound")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===2?(e.openBlock(),e.createElementBlock("div",xY,[e.createElementVNode("h5",null,e.toDisplayString(i.t("classificationPlan.requalify.title"))+" - "+e.toDisplayString(i.t("classificationPlan.steps.step",{n:i.isForcedPlan?1:2})),1),e.createElementVNode("p",null,e.toDisplayString(i.t("classificationPlan.steps.selectNature")),1),e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(i.t("classificationPlan.plan"))+" : ",1),e.createElementVNode("strong",null,e.toDisplayString(i.selectedPlanFile),1)]),e.createVNode(c,{natures:i.natureOptions,modelValue:i.selectedNatureCode,allowNoNature:!1,categories:i.requalifyCategories,"onUpdate:modelValue":t[1]||(t[1]=g=>i.selectedNatureCode=g)},null,8,["natures","modelValue","categories"])])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===3?(e.openBlock(),e.createElementBlock("div",zY,[e.createElementVNode("h5",null,e.toDisplayString(i.t("classificationPlan.requalify.title"))+" - "+e.toDisplayString(i.t("classificationPlan.steps.step",{n:i.isForcedPlan?2:3})),1),e.createElementVNode("p",null,e.toDisplayString(i.t("classificationPlan.steps.fillMetadata")),1),e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(i.t("classificationPlan.nature"))+" : ",1),e.createElementVNode("strong",null,e.toDisplayString(i.selectedNature?.name),1)]),e.createVNode(d,{fields:i.currentFields,modelValue:i.metadataValues,requiredFields:i.requiredFields,disabledFields:new Set,validationErrors:i.validationErrors,getSearchOptions:i.getSearchOptions,isSearchLoading:i.isSearchLoading,"onUpdate:modelValue":t[2]||(t[2]=g=>i.metadataValues=g),onLoadSearch:t[3]||(t[3]=g=>i.loadSearchOptions(g)),onValidate:t[4]||(t[4]=g=>i.debounceValidate(g,i.metadataValues[g.name]))},null,8,["fields","modelValue","requiredFields","disabledFields","validationErrors","getSearchOptions","isSearchLoading"])])):e.createCommentVNode("",!0),!i.isLoading&&i.currentStep===4?(e.openBlock(),e.createElementBlock("div",GY,[e.createElementVNode("h5",null,e.toDisplayString(i.t("classificationPlan.requalify.title"))+" - "+e.toDisplayString(i.t("classificationPlan.steps.step",{n:i.isForcedPlan?3:4})),1),e.createElementVNode("p",null,e.toDisplayString(i.t("classificationPlan.summary.verifyBeforeRequalify")),1),e.createVNode(u,{header:i.t("classificationPlan.summary.generalInfo")},{default:e.withCtx(()=>[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.plan"))+" :",1),e.createTextVNode(" "+e.toDisplayString(i.selectedPlanFile),1)]),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.nature"))+" :",1),e.createTextVNode(" "+e.toDisplayString(i.selectedNature?.name),1)])]),_:1},8,["header"]),e.createVNode(u,{header:i.t("classificationPlan.summary.metadata"),class:"panel-margin"},{default:e.withCtx(()=>[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.summaryMetadata,(g,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createElementVNode("strong",null,e.toDisplayString(_)+":",1),e.createTextVNode(" "+e.toDisplayString(g),1)]))),128))])]),_:1},8,["header"]),e.createVNode(u,{header:i.t("classificationPlan.summary.movement"),class:"panel-margin"},{default:e.withCtx(()=>[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.requalify.summaryFrom"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(i.displayCurrentPath),1)]),e.createVNode(b),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.requalify.summaryTo"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(i.summaryDestinationPath),1)]),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(i.t("classificationPlan.summary.document"))+" :",1),e.createTextVNode(" "+e.toDisplayString(n.currentNode.name)+" ",1),i.summaryNewFileName!==n.currentNode.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[8]||(t[8]=e.createElementVNode("i",{class:"ri-arrow-right-line arrow-icon"},null,-1)),e.createElementVNode("strong",null,e.toDisplayString(i.summaryNewFileName),1)],64)):e.createCommentVNode("",!0)])]),_:1},8,["header"])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header","onHide"])}const XY=Se(LY,[["render",FY],["__scopeId","data-v-d691588e"]]),Xt={STATIC:"static",DRAWER:"drawer",SLIM:"slim",SLIM_PLUS:"slim-plus",HORIZONTAL:"horizontal"},Fn={LIGHT:"light",DARK:"dark",PRIMARY:"primary"},la={MENU_MODE:"layout-menu-mode",MENU_THEME:"layout-menu-theme",STATIC_MENU_INACTIVE:"layout-static-menu-inactive",DRAWER_ANCHORED:"layout-drawer-anchored"},Yi={menuMode:Xt.STATIC,menuTheme:Fn.LIGHT,staticMenuDesktopInactive:!1},Mc=991,ki=e.ref(typeof window<"u"?window.innerWidth:1200),PY=()=>{if(typeof window>"u"||typeof navigator>"u")return!1;const a="ontouchstart"in window||navigator.maxTouchPoints>0,t=navigator.userAgent||navigator.vendor||window.opera||"",i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(t),o=navigator.platform||"",l=/iPhone|iPod|iPad|Android|webOS|BlackBerry/i.test(o);return a&&(i||l)},vc=e.ref(PY()),VY=()=>{ki.value=window.innerWidth};let o_=!1;const UY=()=>{typeof window<"u"&&!o_&&(window.addEventListener("resize",VY),o_=!0)};let Xn=localStorage.getItem(la.MENU_MODE)||Yi.menuMode;const we=e.reactive({menuMode:localStorage.getItem(la.MENU_MODE)||Yi.menuMode,menuTheme:localStorage.getItem(la.MENU_THEME)||Yi.menuTheme,staticMenuDesktopInactive:localStorage.getItem(la.STATIC_MENU_INACTIVE)==="true"||Yi.staticMenuDesktopInactive,anchored:localStorage.getItem(la.DRAWER_ANCHORED)==="true",mobileMenuActive:!1,overlayMenuActive:!1,profileSidebarVisible:!1,configSidebarVisible:!1,staticMenuMobileActive:!1,menuHoverActive:!1,sidebarActive:!1,activeMenuItem:null});function Pn(){e.watch(()=>we.menuMode,C=>{localStorage.setItem(la.MENU_MODE,C)}),e.watch(()=>we.menuTheme,C=>{localStorage.setItem(la.MENU_THEME,C)}),e.watch(()=>we.staticMenuDesktopInactive,C=>{localStorage.setItem(la.STATIC_MENU_INACTIVE,String(C))}),e.watch(()=>we.anchored,C=>{localStorage.setItem(la.DRAWER_ANCHORED,String(C))}),e.watch(()=>ki.value<=Mc,(C,A)=>{vc.value||(C&&!A?(we.menuMode!==Xt.DRAWER&&we.menuMode!==Xt.STATIC&&(Xn=we.menuMode,we.menuMode=Xt.DRAWER),we.menuMode===Xt.STATIC&&(we.staticMenuDesktopInactive=!0)):!C&&A&&(Xn&&Xn!==we.menuMode&&(we.menuMode=Xn),we.menuMode===Xt.STATIC&&(we.staticMenuDesktopInactive=!1)))});const a=e.computed(()=>we.overlayMenuActive||we.staticMenuMobileActive||we.sidebarActive),t=e.computed(()=>!vc.value),n=e.computed(()=>vc.value),i=e.computed(()=>ki.value<=Mc),o=e.computed(()=>we.menuMode===Xt.STATIC),r=e.computed(()=>we.menuMode===Xt.DRAWER),l=e.computed(()=>we.menuMode===Xt.SLIM),s=e.computed(()=>we.menuMode===Xt.SLIM_PLUS),c=e.computed(()=>we.menuMode===Xt.HORIZONTAL),d=e.computed(()=>({"layout-static":o.value,"layout-drawer":r.value,"layout-drawer-active":r.value&&we.sidebarActive,"layout-drawer-anchored":r.value&&we.anchored,"layout-slim":l.value,"layout-slim-plus":s.value,"layout-horizontal":c.value,"layout-mobile":n.value,"layout-small-screen":i.value&&!n.value,"layout-static-inactive":o.value&&we.staticMenuDesktopInactive&&t.value,"layout-overlay-active":we.overlayMenuActive,"layout-mobile-active":we.staticMenuMobileActive,"p-input-filled":!1,"p-ripple-disabled":!1,[`layout-menu-${we.menuTheme}`]:!0})),u=C=>{Object.values(Xt).includes(C)&&(we.menuMode=C,ki.value>Mc&&(Xn=C))},b=C=>{Object.values(Fn).includes(C)&&(we.menuTheme=C)},m=()=>{if(n.value){we.staticMenuMobileActive=!we.staticMenuMobileActive;return}if(i.value){we.staticMenuMobileActive=!we.staticMenuMobileActive;return}o.value?we.staticMenuDesktopInactive=!we.staticMenuDesktopInactive:(l.value||s.value||c.value)&&(we.overlayMenuActive=!we.overlayMenuActive)},p=()=>{we.staticMenuMobileActive=!0},g=()=>{we.staticMenuMobileActive=!1};return{layoutState:we,MENU_MODES:Xt,MENU_THEMES:Fn,isSidebarActive:a,isDesktop:t,isMobile:n,isSmallScreen:i,isStatic:o,isDrawer:r,isSlim:l,isSlimPlus:s,isHorizontal:c,containerClass:d,setMenuMode:u,setMenuTheme:b,toggleMenu:m,toggleAnchor:()=>{we.anchored=!we.anchored,we.anchored&&(we.sidebarActive=!0)},showMobileMenu:p,hideMobileMenu:g,hideOverlayMenu:()=>{we.overlayMenuActive=!1},onMenuToggle:()=>{m()},onSidebarMouseEnter:()=>{r.value&&!we.anchored&&(we.sidebarActive=!0)},onSidebarMouseLeave:()=>{r.value&&!we.anchored&&(we.sidebarActive=!1)},setActiveMenuItem:C=>{we.activeMenuItem=C},resetMenu:()=>{we.overlayMenuActive=!1,we.staticMenuMobileActive=!1,we.menuHoverActive=!1},onDocumentClick:C=>{if(we.staticMenuMobileActive){const A=document.querySelector(".layout-sidebar"),w=document.querySelector(".layout-topbar-menu-button");A&&!A.contains(C.target)&&w&&!w.contains(C.target)&&g()}},applyLayoutSettings:()=>{UY();const C=localStorage.getItem(la.MENU_MODE),A=localStorage.getItem(la.MENU_THEME),w=localStorage.getItem(la.STATIC_MENU_INACTIVE);C&&Object.values(Xt).includes(C)&&(we.menuMode=C),A&&Object.values(Fn).includes(A)&&(we.menuTheme=A),w!==null&&(we.staticMenuDesktopInactive=w==="true")}}}function r_(a,t){return a.to===t?!0:a.items?a.items.some(n=>n.to===t):!1}const jY={name:"AppSubmenu",props:{items:{type:Array,default:()=>[]}},setup(a){const t=Gc.useRoute(),{t:n}=ta.useI18n(),{layoutState:i,isSlim:o,isSlimPlus:r,isDrawer:l}=Pn(),s=e.ref([]),c="pristy-menu-expanded-sections",d=T=>T.key||T.labelKey||T.label,u=()=>{try{const T=localStorage.getItem(c);if(T){const O=JSON.parse(T);a.items.forEach((D,I)=>{D.items&&O.includes(d(D))&&(s.value.includes(I)||s.value.push(I))})}}catch(T){console.warn("Failed to load menu state from localStorage:",T)}},b=()=>{try{const T=s.value.map(O=>a.items[O]).filter(Boolean).map(d);localStorage.setItem(c,JSON.stringify(T))}catch(T){console.warn("Failed to save menu state to localStorage:",T)}},m=()=>{a.items.forEach((T,O)=>{T.items&&r_(T,t.path)&&(s.value.includes(O)||(s.value.push(O),b()))})};u(),e.watch(()=>t.path,()=>{m()},{immediate:!0});const p=e.computed(()=>l.value?!i.sidebarActive&&!i.anchored:o.value||r.value);return{expandedSections:s,isSlimMode:p,isExpanded:T=>s.value.includes(T),toggleSection:T=>{const O=s.value.indexOf(T);O===-1?s.value.push(T):s.value.splice(O,1),b()},isActive:T=>t.path===T.to,hasActiveChild:T=>r_(T,t.path),isActiveSection:T=>T.to&&t.path===T.to,getLabel:T=>T.labelKey?n(T.labelKey):T.label||""}}},BY={class:"sidebar-menu"},HY={key:0,class:"menu-section"},JY={class:"menu-label"},QY={class:"menu-label"},KY=["onClick"],qY={class:"menu-subitems"},$Y={class:"menu-label"},e9={key:0,class:"menu-badge"},t9={class:"menu-label"},a9={key:0,class:"menu-badge"},n9={key:1,class:"menu-link disabled"},i9={class:"menu-label"},o9={key:0,class:"menu-badge"};function r9(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("ul",BY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,(c,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.labelKey||c.label},[c.items&&c.items.length>0?(e.openBlock(),e.createElementBlock("li",HY,[e.createElementVNode("div",{class:e.normalizeClass(["menu-section-header",{"has-active-child":i.hasActiveChild(c),"is-active":i.isActiveSection(c)}])},[c.to?e.withDirectives((e.openBlock(),e.createBlock(l,{key:0,to:c.to,class:"menu-section-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",JY,e.toDisplayString(i.getLabel(c)),1)]),_:2},1032,["to"])),[[s,i.getLabel(c),void 0,{right:!0}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",QY,e.toDisplayString(i.getLabel(c)),1)],64)),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"menu-toggle-btn",onClick:u=>i.toggleSection(d)},[e.createElementVNode("i",{class:e.normalizeClass(["menu-arrow ri-arrow-down-s-line",{expanded:i.isExpanded(d)}])},null,2)],8,KY)),[[s,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]])],2),e.createVNode(e.Transition,{name:"submenu"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",qY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,u=>(e.openBlock(),e.createElementBlock("li",{key:u.labelKey||u.label,class:e.normalizeClass(["menu-item",{active:i.isActive(u)}])},[e.withDirectives((e.openBlock(),e.createBlock(l,{to:u.to,class:"menu-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([u.icon,"menu-icon"])},null,2),e.createElementVNode("span",$Y,e.toDisplayString(i.getLabel(u)),1),u.badge?(e.openBlock(),e.createElementBlock("span",e9,e.toDisplayString(u.badge),1)):e.createCommentVNode("",!0)]),_:2},1032,["to"])),[[s,i.getLabel(u),void 0,{right:!0}]])],2))),128))],512),[[e.vShow,i.isExpanded(d)&&!i.isSlimMode]])]),_:2},1024)])):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["menu-item",{active:i.isActive(c),disabled:c.disabled}])},[!c.disabled&&c.to?e.withDirectives((e.openBlock(),e.createBlock(l,{key:0,to:c.to,class:"menu-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",t9,e.toDisplayString(i.getLabel(c)),1),c.badge?(e.openBlock(),e.createElementBlock("span",a9,e.toDisplayString(c.badge),1)):e.createCommentVNode("",!0)]),_:2},1032,["to"])),[[s,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]]):e.withDirectives((e.openBlock(),e.createElementBlock("span",n9,[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",i9,e.toDisplayString(i.getLabel(c)),1),c.badge?(e.openBlock(),e.createElementBlock("span",o9,e.toDisplayString(c.badge),1)):e.createCommentVNode("",!0)])),[[s,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]])],2))],64))),128))])}const Zc=Se(jY,[["render",r9],["__scopeId","data-v-c162188d"]]),l9={name:"AppSidebar",components:{AppSubmenu:Zc},props:{menuItems:{type:Array,default:()=>[]},logoFull:{type:String,default:""},logoIcon:{type:String,default:""},logoAlt:{type:String,default:"Logo"}},setup(){const{layoutState:a,isSlim:t,isSlimPlus:n,isDrawer:i,toggleAnchor:o}=Pn(),r=e.computed(()=>i.value?!a.sidebarActive&&!a.anchored:t.value||n.value);return{layoutState:a,isSlim:t,isSlimPlus:n,isDrawer:i,toggleAnchor:o,isSlimMode:r}}},s9={class:"layout-sidebar"},c9={class:"sidebar-header"},d9=["src","alt"],m9=["src","alt"],p9={class:"sidebar-content"};function u9(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveComponent("AppSubmenu");return e.openBlock(),e.createElementBlock("aside",s9,[e.createElementVNode("div",c9,[e.renderSlot(a.$slots,"logo",{isSlimMode:i.isSlimMode},()=>[e.createVNode(l,{to:"/",class:"sidebar-logo"},{default:e.withCtx(()=>[i.isSlimMode?(e.openBlock(),e.createElementBlock("img",{key:1,src:n.logoIcon,alt:n.logoAlt,class:"logo-icon"},null,8,m9)):(e.openBlock(),e.createElementBlock("img",{key:0,src:n.logoFull,alt:n.logoAlt,class:"logo-full"},null,8,d9))]),_:1})],!0),i.isDrawer&&(i.layoutState.sidebarActive||i.layoutState.anchored)?(e.openBlock(),e.createElementBlock("button",{key:0,class:"anchor-button",onClick:t[0]||(t[0]=(...c)=>i.toggleAnchor&&i.toggleAnchor(...c))},[e.createElementVNode("i",{class:e.normalizeClass(i.layoutState.anchored?"ri-pushpin-fill":"ri-pushpin-line")},null,2)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",p9,[e.createVNode(s,{items:n.menuItems},null,8,["items"])]),e.renderSlot(a.$slots,"footer",{},void 0,!0)])}const Dc=Se(l9,[["render",u9],["__scopeId","data-v-053bd38b"]]);function b9(a,t){return a.to===t?!0:a.items?a.items.some(n=>n.to===t):!1}const g9={name:"AppTopbar",components:{PrimeMenu:pn},props:{showMenuButton:{type:Boolean,default:!0},horizontalMenu:{type:Boolean,default:!1},showLogo:{type:Boolean,default:!1},logo:{type:String,default:""},logoAlt:{type:String,default:"Pristy"},menuItems:{type:Array,default:()=>[]},showSearch:{type:Boolean,default:!0},searchRoute:{type:String,default:"/search"},searchTooltip:{type:String,default:"Recherche"},portalUrl:{type:String,default:""},portalTooltip:{type:String,default:"Portail"},settingsItems:{type:Array,default:()=>[]},settingsTooltip:{type:String,default:"Paramètres"},showLogout:{type:Boolean,default:!0},logoutTooltip:{type:String,default:"Déconnexion"},loginRouteName:{type:String,default:"login"}},emits:["toggle-menu","logout"],setup(a){const{isMobile:t}=Pn(),n=e.computed(()=>{const i=[...a.settingsItems||[]];return t.value&&a.showLogout&&(i.length>0&&i.push({separator:!0}),i.push({label:a.logoutTooltip,icon:"ri-logout-box-line",command:()=>{document.dispatchEvent(new CustomEvent("topbar-logout"))}})),i});return{isMobile:t,computedSettingsItems:n}},mounted(){this._logoutHandler=()=>this.handleLogout(),document.addEventListener("topbar-logout",this._logoutHandler)},beforeUnmount(){document.removeEventListener("topbar-logout",this._logoutHandler)},methods:{getLabel(a){return a.labelKey?this.$t(a.labelKey):a.label||""},hasActiveChild(a){return b9(a,this.$route.path)},toggleDropdown(a,t){const n="dropdown-"+(t.labelKey||t.label),i=this.$refs[n];i&&i[0]&&i[0].toggle(a)},getDropdownItems(a){return a.items.map(t=>({label:this.getLabel(t),icon:t.icon,command:()=>{this.$router.push(t.to)}}))},toggleSettingsMenu(a){this.$refs.settingsMenu.toggle(a)},async handleLogout(){const a=yt(),t=je();this.$emit("logout"),t.AUTH==="keycloak"||t.AUTH==="lemonldap"?await a.logout():(await a.logout(),this.$router.push({name:this.loginRouteName}))}}},_9={class:"layout-topbar"},h9={class:"topbar-start"},y9=["src","alt"],f9={key:0,class:"topbar-menu"},N9={key:0,class:"topbar-menu-dropdown"},S9=["onClick"],E9={class:"topbar-end"},T9=["href"];function A9(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveComponent("PrimeMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("header",_9,[e.createElementVNode("div",h9,[n.showMenuButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"topbar-menu-button layout-topbar-menu-button",onClick:t[0]||(t[0]=d=>a.$emit("toggle-menu"))},[...t[3]||(t[3]=[e.createElementVNode("i",{class:"ri-menu-line"},null,-1)])])):e.createCommentVNode("",!0),n.horizontalMenu||n.showLogo?e.renderSlot(a.$slots,"logo",{key:1},()=>[e.createVNode(l,{to:"/",class:"topbar-logo"},{default:e.withCtx(()=>[n.logo?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.logo,alt:n.logoAlt,class:"topbar-logo-image"},null,8,y9)):e.createCommentVNode("",!0)]),_:1})],!0):e.createCommentVNode("",!0)]),n.horizontalMenu?(e.openBlock(),e.createElementBlock("nav",f9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menuItems,d=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d.labelKey||d.label},[d.items&&d.items.length>0?(e.openBlock(),e.createElementBlock("div",N9,[e.createElementVNode("button",{class:e.normalizeClass(["topbar-menu-item",{active:r.hasActiveChild(d)}]),onClick:u=>r.toggleDropdown(u,d)},[e.createElementVNode("i",{class:e.normalizeClass(d.icon)},null,2),e.createElementVNode("span",null,e.toDisplayString(r.getLabel(d)),1),t[4]||(t[4]=e.createElementVNode("i",{class:"ri-arrow-down-s-line dropdown-arrow"},null,-1))],10,S9),e.createVNode(s,{ref_for:!0,ref:"dropdown-"+(d.labelKey||d.label),model:r.getDropdownItems(d),popup:!0},null,8,["model"])])):(e.openBlock(),e.createBlock(l,{key:1,to:d.to,class:e.normalizeClass(["topbar-menu-item",{active:a.$route.path===d.to}])},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(d.icon)},null,2),e.createElementVNode("span",null,e.toDisplayString(r.getLabel(d)),1)]),_:2},1032,["to","class"]))],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",E9,[e.renderSlot(a.$slots,"actions-start",{},void 0,!0),n.showSearch?e.withDirectives((e.openBlock(),e.createBlock(l,{key:0,to:n.searchRoute,class:"topbar-action"},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createElementVNode("i",{class:"ri-search-line"},null,-1)])]),_:1},8,["to"])),[[c,n.searchTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0),n.portalUrl?e.withDirectives((e.openBlock(),e.createElementBlock("a",{key:1,href:n.portalUrl,class:"topbar-action"},[...t[6]||(t[6]=[e.createElementVNode("i",{class:"ri-home-smile-line"},null,-1)])],8,T9)),[[c,n.portalTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0),i.computedSettingsItems&&i.computedSettingsItems.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(s,{ref:"settingsMenu",model:i.computedSettingsItems,popup:!0},null,8,["model"]),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"topbar-action",onClick:t[1]||(t[1]=(...d)=>r.toggleSettingsMenu&&r.toggleSettingsMenu(...d))},[...t[7]||(t[7]=[e.createElementVNode("i",{class:"ri-settings-3-line"},null,-1)])])),[[c,n.settingsTooltip,void 0,{bottom:!0}]])],64)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"actions-end",{},void 0,!0),n.showLogout&&!i.isMobile?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:3,class:"topbar-action",onClick:t[2]||(t[2]=(...d)=>r.handleLogout&&r.handleLogout(...d))},[...t[8]||(t[8]=[e.createElementVNode("i",{class:"ri-logout-box-line"},null,-1)])])),[[c,n.logoutTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])])}const wc=Se(g9,[["render",A9],["__scopeId","data-v-e48b98fd"]]),O9={name:"AppMobileLayout",components:{PrimeMenu:pn},props:{logo:{type:String,default:""},logoAlt:{type:String,default:"Logo"},profileTooltip:{type:String,default:"Profil"},bottomBarItems:{type:Array,default:()=>[]},profileMenuItems:{type:Array,default:()=>[]},logoutLabel:{type:String,default:"Déconnexion"},showLogout:{type:Boolean,default:!0},loginRouteName:{type:String,default:"login"}},emits:["logout"],setup(a,{emit:t}){return{computedProfileItems:e.computed(()=>{const i=a.profileMenuItems.map(o=>{if(o.separator)return{separator:!0};const r={label:o.label,icon:o.icon};return o.action==="logout"?r.command=()=>{document.dispatchEvent(new CustomEvent("mobile-logout"))}:o.command&&(r.command=o.command),r});return a.showLogout&&(a.profileMenuItems.some(r=>r.action==="logout")||(i.length>0&&i.push({separator:!0}),i.push({label:a.logoutLabel,icon:"ri-logout-box-line",command:()=>{document.dispatchEvent(new CustomEvent("mobile-logout"))}}))),i})}},mounted(){this._logoutHandler=()=>this.handleLogout(),document.addEventListener("mobile-logout",this._logoutHandler)},beforeUnmount(){document.removeEventListener("mobile-logout",this._logoutHandler)},methods:{toggleProfileMenu(a){this.$refs.profileMenu.toggle(a)},isActiveRoute(a){return this.$route.path===a.to||a.activeMatch&&this.$route.path.startsWith(a.activeMatch)},async handleLogout(){const a=yt(),t=je();this.$emit("logout"),t.AUTH==="keycloak"||t.AUTH==="lemonldap"?await a.logout():(await a.logout(),this.$router.push({name:this.loginRouteName}))}}},C9={class:"mobile-layout"},R9={class:"mobile-topbar"},I9={class:"mobile-topbar-start"},M9=["src","alt"],v9={class:"mobile-topbar-end"},Z9={class:"mobile-content"},D9={class:"mobile-bottom-bar"},w9={key:0},W9={key:1};function L9(a,t,n,i,o,r){const l=e.resolveComponent("router-link"),s=e.resolveComponent("PrimeMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",C9,[e.createElementVNode("header",R9,[e.createElementVNode("div",I9,[e.renderSlot(a.$slots,"topbar-start",{},()=>[n.logo?(e.openBlock(),e.createBlock(l,{key:0,to:"/",class:"mobile-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:n.logo,alt:n.logoAlt,class:"mobile-logo-image"},null,8,M9)]),_:1})):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",v9,[e.renderSlot(a.$slots,"topbar-end",{},void 0,!0),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"mobile-profile-btn",onClick:t[0]||(t[0]=(...d)=>r.toggleProfileMenu&&r.toggleProfileMenu(...d))},[...t[1]||(t[1]=[e.createElementVNode("i",{class:"ri-user-line"},null,-1)])])),[[c,n.profileTooltip,void 0,{bottom:!0}]]),e.createVNode(s,{ref:"profileMenu",model:i.computedProfileItems,popup:!0,class:"mobile-profile-menu"},null,8,["model"])])]),e.createElementVNode("main",Z9,[e.renderSlot(a.$slots,"default",{},void 0,!0),e.renderSlot(a.$slots,"footer",{},void 0,!0)]),e.createElementVNode("nav",D9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.bottomBarItems,d=>(e.openBlock(),e.createBlock(l,{key:d.key||d.to,to:d.to,class:e.normalizeClass(["bottom-bar-item",{active:r.isActiveRoute(d)}])},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(d.icon)},null,2),d.labelKey?(e.openBlock(),e.createElementBlock("span",w9,e.toDisplayString(a.$t(d.labelKey)),1)):d.label?(e.openBlock(),e.createElementBlock("span",W9,e.toDisplayString(d.label),1)):e.createCommentVNode("",!0)]),_:2},1032,["to","class"]))),128)),e.renderSlot(a.$slots,"bottom-bar-extra",{},void 0,!0)])])}const Wc=Se(O9,[["render",L9],["__scopeId","data-v-c4e33907"]]),Y9={name:"AppLayout",components:{AppSidebar:Dc,AppTopbar:wc,AppMobileLayout:Wc},props:{menuItems:{type:Array,default:()=>[]},sidebarLogoFull:{type:String,default:""},sidebarLogoIcon:{type:String,default:""},sidebarLogoAlt:{type:String,default:"Logo"},topbarLogo:{type:String,default:""},topbarLogoAlt:{type:String,default:"Logo"},showSearch:{type:Boolean,default:!1},searchRoute:{type:String,default:"/search"},searchTooltip:{type:String,default:"Recherche"},portalUrl:{type:String,default:""},portalTooltip:{type:String,default:"Portail"},settingsItems:{type:Array,default:()=>[]},settingsTooltip:{type:String,default:"Paramètres"},showLogout:{type:Boolean,default:!0},logoutTooltip:{type:String,default:"Déconnexion"},loginRouteName:{type:String,default:"login"},mobileLogo:{type:String,default:""},mobileLogoAlt:{type:String,default:""},mobileBottomBarItems:{type:Array,default:()=>[]},mobileProfileMenuItems:{type:Array,default:()=>[]}},emits:["logout"],setup(){const{layoutState:a,containerClass:t,isMobile:n,isSmallScreen:i,isHorizontal:o,isDrawer:r,isSlim:l,isSlimPlus:s,isStatic:c,onMenuToggle:d,hideMobileMenu:u,onDocumentClick:b,onSidebarMouseEnter:m,onSidebarMouseLeave:p,applyLayoutSettings:g}=Pn(),_=e.ref(window.innerWidth),f=()=>{_.value=window.innerWidth};e.onMounted(()=>{g(),window.addEventListener("resize",f)}),e.onUnmounted(()=>{window.removeEventListener("resize",f)});const h=e.computed(()=>n.value?!0:!o.value),S=e.computed(()=>n.value||i.value?!0:c.value),y=e.computed(()=>n.value||i.value&&c.value?!0:c.value&&a.staticMenuDesktopInactive);return{layoutState:a,containerClass:t,isMobile:n,isSmallScreen:i,isHorizontal:o,isDrawer:r,isSlim:l,isSlimPlus:s,isStatic:c,showSidebar:h,showMenuButton:S,showTopbarLogo:y,onMenuToggle:d,hideMobileMenu:u,onDocumentClick:b,onSidebarMouseEnter:m,onSidebarMouseLeave:p}}},k9={class:"layout-main"},x9={class:"layout-content"};function z9(a,t,n,i,o,r){const l=e.resolveComponent("AppMobileLayout"),s=e.resolveComponent("AppSidebar"),c=e.resolveComponent("AppTopbar");return i.isMobile?(e.openBlock(),e.createBlock(l,{key:0,logo:n.mobileLogo||n.topbarLogo,logoAlt:n.mobileLogoAlt||n.topbarLogoAlt,bottomBarItems:n.mobileBottomBarItems,profileMenuItems:n.mobileProfileMenuItems,showLogout:n.showLogout,logoutLabel:n.logoutTooltip,loginRouteName:n.loginRouteName,onLogout:t[0]||(t[0]=d=>a.$emit("logout"))},e.createSlots({default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots["mobile-topbar-start"]?{name:"topbar-start",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"mobile-topbar-start")]),key:"0"}:void 0,a.$slots["mobile-topbar-end"]?{name:"topbar-end",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"mobile-topbar-end")]),key:"1"}:void 0,a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),key:"2"}:void 0,a.$slots["mobile-bottom-bar-extra"]?{name:"bottom-bar-extra",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"mobile-bottom-bar-extra")]),key:"3"}:void 0]),1032,["logo","logoAlt","bottomBarItems","profileMenuItems","showLogout","logoutLabel","loginRouteName"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["layout-wrapper",i.containerClass]),onClick:t[2]||(t[2]=(...d)=>i.onDocumentClick&&i.onDocumentClick(...d))},[i.showSidebar?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.$slots.sidebar?e.renderSlot(a.$slots,"sidebar",{key:0,menuItems:n.menuItems,isSlimMode:i.isSlim||i.isSlimPlus,isCollapsed:i.layoutState.staticMenuDesktopInactive,onMouseEnter:i.onSidebarMouseEnter,onMouseLeave:i.onSidebarMouseLeave}):(e.openBlock(),e.createBlock(s,{key:1,menuItems:n.menuItems,logoFull:n.sidebarLogoFull,logoIcon:n.sidebarLogoIcon,logoAlt:n.sidebarLogoAlt,onMouseenter:i.onSidebarMouseEnter,onMouseleave:i.onSidebarMouseLeave},{logo:e.withCtx(({isSlimMode:d})=>[e.renderSlot(a.$slots,"sidebar-logo",{isSlimMode:d})]),footer:e.withCtx(()=>[e.renderSlot(a.$slots,"sidebar-footer")]),_:3},8,["menuItems","logoFull","logoIcon","logoAlt","onMouseenter","onMouseleave"]))],64)):e.createCommentVNode("",!0),e.createVNode(c,{showMenuButton:i.showMenuButton,showLogo:i.showTopbarLogo,logo:n.topbarLogo,logoAlt:n.topbarLogoAlt,horizontalMenu:i.isHorizontal,menuItems:n.menuItems,showSearch:n.showSearch,searchRoute:n.searchRoute,searchTooltip:n.searchTooltip,portalUrl:n.portalUrl,portalTooltip:n.portalTooltip,settingsItems:n.settingsItems,settingsTooltip:n.settingsTooltip,showLogout:n.showLogout,logoutTooltip:n.logoutTooltip,loginRouteName:n.loginRouteName,onToggleMenu:i.onMenuToggle,onLogout:t[1]||(t[1]=d=>a.$emit("logout"))},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"topbar-logo")]),"actions-start":e.withCtx(()=>[e.renderSlot(a.$slots,"topbar-actions-start")]),"actions-end":e.withCtx(()=>[e.renderSlot(a.$slots,"topbar-actions-end")]),_:3},8,["showMenuButton","showLogo","logo","logoAlt","horizontalMenu","menuItems","showSearch","searchRoute","searchTooltip","portalUrl","portalTooltip","settingsItems","settingsTooltip","showLogout","logoutTooltip","loginRouteName","onToggleMenu"]),e.createElementVNode("div",k9,[e.createElementVNode("div",x9,[e.renderSlot(a.$slots,"default")]),e.renderSlot(a.$slots,"footer")])],2))}const l_=Se(Y9,[["render",z9]]),G9={name:"AppFooter",props:{copyrightHolder:{type:String,default:"JECI SARL"},copyrightLink:{type:String,default:"Pristy"},copyrightUrl:{type:String,default:"https://pristy.fr"},showVersion:{type:Boolean,default:!0},version:{type:String,default:()=>typeof __BUILD_VERSION__<"u"?__BUILD_VERSION__:"0.0.0"},commit:{type:String,default:()=>typeof __BUILD_COMMIT__<"u"?__BUILD_COMMIT__:"unknown"},buildDate:{type:String,default:()=>typeof __BUILD_DATE__<"u"?__BUILD_DATE__:"unknown"}},computed:{currentYear(){return new Date().getFullYear()},versionTooltip(){return`Commit: ${this.commit}
|
|
156
156
|
Build: ${this.buildDate}`}}},F9={class:"app-footer"},X9={class:"footer-content"},P9={class:"copyright"},V9=["href"],U9={key:0,class:"version"};function j9(a,t,n,i,o,r){const l=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("footer",F9,[e.createElementVNode("div",X9,[e.renderSlot(a.$slots,"left",{},()=>[e.createElementVNode("span",P9,[e.createTextVNode(" © "+e.toDisplayString(r.currentYear)+" "+e.toDisplayString(n.copyrightHolder)+" - ",1),e.createElementVNode("a",{href:n.copyrightUrl,target:"_blank",rel:"noopener"},e.toDisplayString(n.copyrightLink),9,V9)])],!0),e.renderSlot(a.$slots,"center",{},void 0,!0),e.renderSlot(a.$slots,"right",{},()=>[n.showVersion?e.withDirectives((e.openBlock(),e.createElementBlock("span",U9,[e.createTextVNode(" v"+e.toDisplayString(n.version),1)])),[[l,r.versionTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])])}const s_=Se(G9,[["render",j9],["__scopeId","data-v-c66135cc"]]);class B9{getPublicLink(){}createPublicLink(){}}class H9{getLoolUrl(t){let n=`${t}/alfresco/service/lool/host/url`;return lt.get(n).then(i=>i.data).catch(i=>{throw ke("getLoolUrl",i)})}getAccessToken(t,n,i){let o=`${t}/alfresco/service/lool/token?nodeRef=workspace://SpacesStore/${n}&action=${i}`,r={headers:{Authorization:`basic ${window.btoa(window.localStorage["ticket-ECM"])}`}};return lt.get(o,r).then(l=>l.data).catch(l=>{throw ke("getAccessToken",l)})}}const J9=new H9;class Q9{isDivBody(t,n){return["BODY","DIV"].includes(t.target.nodeName)&&!n&&!t.isComposing}eventPdfComponent(t,n){if(t)switch(n.key){case"ArrowLeft":t.previousPage();break;case"ArrowRight":t.nextPage();break;case"+":t.zoomIn();break;case"-":t.zoomOut();break;case"5":t.fitWidthAuto();break;case"0":t.fitAuto();break}}eventImageViewer(t,n){if(t)switch(n.key){case"+":t.zoomIn();break;case"-":t.zoomOut();break;case"0":t.fitAuto();break}}}const K9=new Q9;function q9(a,t=""){if(typeof a>"u"||a===null)throw new Error("mandatory parameter "+t)}function Lc(a,t=""){if(typeof a!="string"||t.trim()==="")throw new Error("mandatory parameter "+t)}class c_{alive=!1;hide=!1;code;label;parent}class Yc extends c_{groupConfidentiel;constructor({code:t,label:n,parent:i,groupConfidentiel:o,alive:r=!0}){super(),this.code=t,this.label=n,this.parent=i,this.groupConfidentiel=o,this.alive=r}isConfidentiel(){return this.groupConfidentiel&&this.groupConfidentiel.length>0}}class d_ extends c_{constructor({code:t,label:n,parent:i,hide:o=!1}){super(),this.code=t,this.label=n,this.parent=i,this.hide=o}}class $9{app="social";loading=!0;constructor(){this.filingPlans={},this.natures={}}async loadPlanClassement(t){this.loading=!0,Lc(t,"planType");let n=`plan-${t}.json`;console.info(`loading plan ${t}`);const i=`fr/jeci/pristy/config/${this.app}/${n}`;return _n.executeWebScript("GET",i).then(o=>{const r=o.PLAN_CLASSEMENT,l=o.NATURE_DOCUMENT;if(!r)throw new Error(`Missing PLAN_CLASSEMENT in ${n}`);if(!l)throw new Error(`Missing NATURE_DOCUMENT in ${n}`);this.filingPlans[t]=r.map(s=>{let c=new Yc(s);return c.alive=!0,c}),this.natures[t]=l.filter(s=>{let c=this.getTypeDossier(t,s.parent);return c!=null}).map(s=>{let c=new d_(s);return c.alive=!0,c}),this.loading=!1})}getTypeDossier(t,n){return this._findPlan(t,i=>i.code===n)}getTypeDossierFromLabel(t,n){return this._findPlan(t,i=>i.label===n)}_findPlan(t,n){return this._assertPlanExist(t),this.filingPlans[t].find(n)}_assertPlanExist(t){if(!Object.prototype.hasOwnProperty.call(this.filingPlans,t))throw new Error(`Filling Plan ${t} not loaded`)}getPlan(t){return Object.prototype.hasOwnProperty.call(this.filingPlans,t)?this.filingPlans[t]:(console.warn("Filling Plan ${planType} not loaded"),null)}getFilteredPlan(t){return So.getUserGroups(yt().person.id,!1).then(n=>Object.prototype.hasOwnProperty.call(this.filingPlans,t)?this.filingPlans[t].filter(o=>o.groupConfidentiel?n.includes(o.groupConfidentiel):!0):(console.warn(`Filing Plan ${t} not loaded`),null))}getNatureDocument(t,n){return Object.prototype.hasOwnProperty.call(this.natures,t)?this.natures[t].find(i=>i.code===n):(console.warn(`Filling Plan ${t} not loaded`),null)}getNatures(t){return Object.prototype.hasOwnProperty.call(this.natures,t)?this.natures[t]:(console.warn(`Filling Plan ${t} not loaded`),null)}getEnabledNatures(t){return Object.prototype.hasOwnProperty.call(this.natures,t)?this.natures[t].filter(n=>n.hide===!1):(console.warn(`Filling Plan ${t} not loaded`),null)}getTypeDossierOfNode(t,n){const i=this.getFolderNameFromPath(n);let o=this.getTypeDossierFromLabel(t,i);return o||(o=new Yc({label:`${i} - Hors Plan`}),o.hide=!0),Promise.resolve(o)}getFolderNameFromPath(t){if(!t.path)return console.warn("No file path provided"),null;const n=t.path.elements.length-1;return t.path.elements[n].name}async treeNodes(t){return Lc(t,"planType"),this.getFilteredPlan(t).then(n=>n.map(i=>({id:i.id||null,key:i.code,label:i.label,children:[],isFolder:!0,confidentiel:i.isConfidentiel(),icon:"ri-folder-line"})))}}const ek=new $9,tk={modifiedat:"cm:modified",createdat:"cm:created",createdbyuser:"cm:creator",modifiedbyuser:"cm:modifier",name:"cm:name",title:"cm:title",description:"cm:description",mimetype:"cm:content.mimetype",encoding:"cm:content.encoding",sizeinbytes:"cm:content.size",type:"TYPE","cm:type":"TYPE"};class ak{mapAliasToSolr(t){if(!t)return t;const n=t.toLowerCase();return tk[n]||t}buildAftsQueryFromJSON(t){if(!t)return"";const n=[],i=t.locations||[],o=i.filter(l=>!l.negation),r=i.filter(l=>l.negation);if(o.length>0){const l=o.map(s=>s.type==="Site"&&s.value?`SITE:"${s.value}"`:s.type==="Folder"&&s.value?`ANCESTOR:'${s.value}'`:null).filter(Boolean);l.length===1?n.push(l[0]):l.length>1&&n.push(`(${l.join(" OR ")})`)}if(r.forEach(l=>{l.type==="Site"&&l.value?n.push(`NOT SITE:"${l.value}"`):l.type==="Folder"&&l.value&&n.push(`NOT ANCESTOR:'${l.value}'`)}),t.criteriaGroups){const l=this._buildGroupsParts(t.criteriaGroups);l&&n.push(l)}else{const s=(t.criteria||[]).map(c=>this._buildCriterionPart(c)).filter(Boolean);s.length>0&&n.push(s.join(" AND "))}return n.join(" AND ")}_buildCriterionPart(t){if(t.query)return t.query;if(t.value===null||t.value==="")return null;const n=t.negation?"NOT ":"";let i="";const o=this.mapAliasToSolr(t.property?.id);switch(t.property?.input){case"boolean":i=`${o}:${t.value}`;break;case"date":case"datetime":if(t.operator==="range"){let l="MIN";if(t.value){const c=new Date(t.value);c.setHours(0,0,0,0),l=c.toISOString()}let s="MAX";if(t.value_end){const c=new Date(t.value_end);c.setHours(23,59,59,999),s=c.toISOString()}i=`${o}:['${l}' TO '${s}']`}else{const l=new Date(t.value);l.setHours(0,0,0,0);const s=new Date(t.value);s.setHours(23,59,59,999),i=`[${o}:'${l.toISOString()}' TO '${s.toISOString()}']`}break;default:if(t.operator==="exact")i=`${o}:"${t.value}"`;else if(t.operator==="contains")i=`${o}:"*${t.value}*"`;else if(t.operator==="range"){const l=t.value!==null?t.value:"MIN",s=t.value_end!==null?t.value_end:"MAX";i=`${o}:[${l} TO ${s}]`}break}return i?n?`${n}(${i})`:i:null}_buildGroupQuery(t){const n=t.criteria.map(i=>this._buildCriterionPart(i)).filter(Boolean);return n.length===0?null:n.length===1?n[0]:`(${n.join(` ${t.operator} `)})`}_buildGroupsParts(t){const n=t.groups.map(i=>this._buildGroupQuery(i)).filter(Boolean);return n.length===0?null:n.length===1?n[0]:n.join(` ${t.rootOperator} `)}}const nk=new ak,ik={install(a,t){console.log("load Keycloak With",t.init);const n=new D_(t.init);n.onReady=()=>{typeof t.onReady=="function"&&t.onReady(n)};let i;n.onAuthSuccess=()=>{i=setInterval(()=>{n.updateToken(60).then(o=>{t.init.enableLogging&&console.log(`[vue-keycloak-js] Token ${o?"updated":"not updated"}`)}).catch(o=>{t.init.enableLogging&&console.error("[vue-keycloak-js] Error updating token:",o),n.clearToken()})},1e4)},n.onAuthLogout=()=>{clearInterval(i),typeof t.onAuthLogout=="function"&&t.onAuthLogout(n)},n.init(t.init).then(o=>{typeof t.onInitSuccess=="function"&&t.onInitSuccess(o)}).catch(o=>{const r=new Error("Failure during initialization of Keycloak");typeof t.onInitError=="function"?t.onInitError(r,o):console.error(r,o)})}},ok=Fe.defineStore({id:"UserPreferencesStore",state:()=>({listView:!0})});let Vn=null;const rk=Fe.defineStore("filingPlan",{state:()=>({currentPlanName:null,planClassement:[],natures:[],viewCategories:[],dynamicViews:[],loading:!1,loaded:!1}),getters:{enabledNatures:a=>a.natures.filter(t=>!t.hide),hasPlan:a=>a.currentPlanName!==null&&a.loaded},actions:{async loadPlan(a,t=!1){if(a&&!(this.currentPlanName===a&&this.loaded&&!t)){if(Vn&&this.currentPlanName===a)return Vn;this.loading=!0,this.currentPlanName=a,Vn=this._doLoad(a);try{await Vn}finally{Vn=null}}},async _doLoad(a){try{const t=await ga.getPlan(a);this.planClassement=t.PLAN_CLASSEMENT||[],this.natures=t.NATURE_DOCUMENT||[],this.viewCategories=t.VIEW_CATEGORIES||[],await this._loadDynamicViews(),this.loaded=!0}catch(t){throw console.error(`Failed to load plan ${a}:`,t),this.reset(),t}finally{this.loading=!1}},async _loadDynamicViews(){const a=new Set;for(const n of this.viewCategories)for(const i of n.views||[])a.add(i);const t=[];for(const n of a)try{const i=await na.getView(n);t.push({...i,filename:n})}catch{}this.dynamicViews=t},reset(){this.currentPlanName=null,this.planClassement=[],this.natures=[],this.viewCategories=[],this.dynamicViews=[],this.loaded=!1,this.loading=!1}}}),lk={components:{PrimeButton:ce,PrimeMessage:da,PrimeDivider:Ha,PrimeInputText:at,PrimePassword:ed},data(){return{email:"",password:"",checked:!1,loginError:!1,failLoginMessage:null}},methods:{goToForgotPasswordPage(){this.$router.push({name:"forgot-password"})},goToACA(){window.location.href=this.ACA_LINK},login(){yt().login(this.email,this.password).then(t=>{if(t===!1)throw new Error(this.$t("login.emptyPasswordOrUser"));this.$route.query?.target===void 0?this.$router.push({name:"welcome"}):this.$router.replace(this.$route.query.target)}).catch(t=>{this.loginError=!0,t instanceof Error?this.failLoginMessage=t.message:t&&typeof t=="object"&&t.message?this.failLoginMessage=t.message:typeof t=="string"?this.failLoginMessage=t:this.failLoginMessage=this.$t("login.unexpectedError")})}},computed:{...Fe.mapState(je,["SHOW_ACA_LOGIN_LINK","ACA_LINK"])}},sk={class:"login-container"},ck={class:"login-wrapper"},dk={class:"login-content"},mk={class:"login-card"},pk={class:"login-header"},uk={class:"login-title"},bk={class:"login-subtitle"},gk={class:"login-form"},_k={for:"email",class:"form-label"},hk={for:"password",class:"form-label"},yk={class:"forgot-password-wrapper"};function fk(a,t,n,i,o,r){const l=e.resolveComponent("PrimeMessage"),s=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimePassword"),d=e.resolveComponent("PrimeButton"),u=e.resolveComponent("PrimeDivider");return e.openBlock(),e.createElementBlock("div",sk,[e.createElementVNode("div",ck,[e.createElementVNode("div",dk,[e.createElementVNode("div",mk,[e.createElementVNode("div",pk,[t[3]||(t[3]=e.createElementVNode("div",{id:"loginLogo"},null,-1)),e.createElementVNode("div",uk,e.toDisplayString(a.$t("welcome")),1),e.createElementVNode("span",bk,e.toDisplayString(a.$t("connectToContinue")),1)]),o.loginError?(e.openBlock(),e.createBlock(l,{key:0,severity:"error",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.failLoginMessage),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",gk,[e.createElementVNode("label",_k,e.toDisplayString(a.$t("userIdentification")),1),e.createVNode(s,{id:"email",modelValue:o.email,"onUpdate:modelValue":t[0]||(t[0]=b=>o.email=b),type:"text",class:"form-input",placeholder:a.$t("userID"),fluid:"",onKeyup:e.withKeys(r.login,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e.createElementVNode("label",hk,e.toDisplayString(a.$t("password")),1),e.createVNode(c,{id:"password",modelValue:o.password,"onUpdate:modelValue":t[1]||(t[1]=b=>o.password=b),placeholder:a.$t("password"),class:"form-input",feedback:!1,fluid:"",onKeyup:e.withKeys(r.login,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e.createElementVNode("div",yk,[e.createElementVNode("a",{class:"forgot-password-link",onClick:t[2]||(t[2]=(...b)=>r.goToForgotPasswordPage&&r.goToForgotPasswordPage(...b))},e.toDisplayString(a.$t("forgotPasswordLink")),1)]),e.createVNode(d,{label:a.$t("connect"),class:"login-button",onClick:r.login},null,8,["label","onClick"]),a.SHOW_ACA_LOGIN_LINK?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(u),e.createVNode(d,{label:a.$t("accessACA"),class:"aca-button",severity:"secondary",onClick:r.goToACA},null,8,["label","onClick"])],64)):e.createCommentVNode("",!0)])])])])])}const Nk=Se(lk,[["render",fk],["__scopeId","data-v-1d49d6da"]]),Sk={name:"NotFoundPages",components:{ErrorComponent:Tc},props:{homeName:{type:String,default:"welcome"}},data(){return{errorNb:"404"}}};function Ek(a,t,n,i,o,r){const l=e.resolveComponent("ErrorComponent");return e.openBlock(),e.createBlock(l,{errorNb:o.errorNb,homeName:n.homeName},null,8,["errorNb","homeName"])}const Tk=Se(Sk,[["render",Ek]]),Ak="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1100'%20height='1000'%20viewBox='0%200%201100%201000'%3e%3cg%20style='display:inline'%3e%3cpath%20d='M504.426%20175.12v-755.5h1894.998l.25%20755.5.252%20755.5h-1895.5Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M504.426%20175.12v-755.5h1894.998l.25%20755.5.252%20755.5h-1895.5Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M504.426%20175.12v-755.5h1895v1511h-1895Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M344.426%20175.12v-755.5h2747.998l.25%20755.5.252%20755.5h-2748.5Zm1755.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.582.582%2027.69%205.518%2028.094%205.115.219-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cg%20transform='translate(-373.824%20-16.55)'%3e%3cellipse%20cx='883.322'%20cy='351.763'%20rx='332.891'%20ry='332.227'%20style='fill:%23fdcc10;fill-opacity:1;fill-rule:evenodd;stroke-width:1.36545'/%3e%3cellipse%20cx='1271.467'%20cy='-1399.972'%20rx='9.654'%20ry='14.943'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:1.07838'%20transform='matrix(.01022%20.99995%20-.73576%20.67724%200%200)'/%3e%3cpath%20d='M698.399%20510.786h377.707v37.887H698.399z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cpath%20d='M1024.732%20333.496h10.646V347.1h-10.646z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.851044'/%3e%3cpath%20d='M1024.732%20347.1h7.555v50.777h-7.555z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='974.908'%20cy='238.842'%20rx='30.894'%20ry='65.439'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.962295'%20transform='scale(.99949%201)skewY(-1.836)'/%3e%3cellipse%20cx='789.328'%20cy='199.342'%20rx='30.147'%20ry='57.369'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.9591'/%3e%3cellipse%20cx='855.354'%20cy='465.346'%20rx='129.287'%20ry='123.534'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:1.58529'%20transform='matrix(.9982%20-.06006%20.07118%20.99746%200%200)'/%3e%3cellipse%20cx='770.095'%20cy='484.385'%20rx='46.392'%20ry='35.959'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.779911'/%3e%3cellipse%20cx='881.389'%20cy='266.221'%20rx='122.165'%20ry='100.678'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.577874'/%3e%3cellipse%20cx='886.202'%20cy='398.533'%20rx='44.874'%20ry='27.488'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1002.481'%20cy='496.03'%20rx='50.178'%20ry='46.446'%20style='display:inline;fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.921829'/%3e%3cellipse%20cx='720.087'%20cy='515.926'%20rx='29.185'%20ry='38.246'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.940325'/%3e%3cellipse%20cx='1050.535'%20cy='520.144'%20rx='29.975'%20ry='38.891'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.976919'/%3e%3cellipse%20cx='888.535'%20cy='556.265'%20rx='223.45'%20ry='6.652'%20style='fill:%23ffdb4d;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cellipse%20cx='1066.161'%20cy='323.616'%20rx='17.899'%20ry='17.66'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.407524'/%3e%3cellipse%20cx='884.493'%20cy='302.689'%20rx='40.783'%20ry='35.689'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.611888'/%3e%3cellipse%20cx='885.193'%20cy='316.702'%20rx='61.145'%20ry='37.618'%20style='display:inline;fill:%23fff;fill-rule:evenodd;stroke-width:.769215'/%3e%3cellipse%20cx='630.476'%20cy='630.722'%20rx='13.95'%20ry='17.914'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.445568'%20transform='rotate(-8.83)skewY(-.047)'/%3e%3cellipse%20cx='601.085'%20cy='595.628'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cellipse%20cx='615.853'%20cy='589.417'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cellipse%20cx='630.595'%20cy='595.228'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cpath%20d='M1846.988%202208.439h23.684v125.747h-23.684z'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.259371'%20transform='matrix(.27793%20-.9606%20.10538%20.99443%200%200)'/%3e%3cpath%20d='M763.562%20380.117h223.296v16.564H763.562z'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='761.201'%20cy='407.401'%20rx='16.724'%20ry='22.934'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1024.667'%20cy='537.129'%20rx='12.87'%20ry='12.749'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1118.16'%20cy='350.644'%20rx='15.168'%20ry='18.308'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.618348'%20transform='rotate(9.215)'/%3e%3cpath%20d='M724.008%20555.45c-17.545-.455-27.728-1.095-29.098-1.828-2.6-1.392-2.24-4.252.588-4.656%201.976-.283%201.89-.569-1.709-5.706-4.155-5.932-7.358-15.012-8.227-23.318-.81-7.752%201.253-18.214%205.111-25.927%205.761-11.515%2015.241-18.93%2025.46-19.911%204.591-.442%204.742-.56%207.25-5.68%202.769-5.656%2011.813-14.774%2017.203-17.344%202.105-1.004%203.215-2.215%203.22-3.514.004-1.09-1.137-13.308-2.535-27.15-2.218-21.972-2.381-25.736-1.284-29.654.988-3.532%202.154-5.123%205.472-7.473%202.378-1.684%205.92-3.195%208.122-3.466%203.87-.475%203.928-.542%206.103-7.018%204.228-12.585%2012.053-26.941%2019.985-36.662l2.35-2.88-4.056-4.8c-5.45-6.449-9.327-12.273-12.783-19.2-8.937-17.914-10.9-35.643-6.048-54.615%201.848-7.229%201.848-7.364-.023-15.937-2.55-11.688-3.341-28.77-1.931-41.73%201.274-11.707%205.076-32.822%207.195-39.959%201.838-6.189%205.41-12.116%209.857-16.36%202.56-2.442%204.866-3.662%207.73-4.091%205.12-.766%209.382.925%2016.093%206.385%204.68%203.807%207.378%207.009%2019%2022.542%203.501%204.68%205.007%206.009%206.24%205.506%205.108-2.082%2015.892-5.512%2021.256-6.76%2011.595-2.7%2027.38-4.245%2043.419-4.253%2015.236-.008%2016.605.152%2028.32%203.298%206.77%201.818%2015.515%204.41%2019.432%205.758%203.917%201.349%207.198%202.345%207.29%202.214.092-.13%201.302-2.182%202.688-4.558%203.586-6.146%2014.585-18.14%2021.002-22.903%203.005-2.23%207.476-4.74%209.937-5.578%203.577-1.22%205.176-1.311%207.978-.458%205.37%201.635%209.601%206.36%2013.725%2015.327%202.681%205.831%204.559%2012.19%206.595%2022.337%201.566%207.802%203.12%2019.074%203.454%2025.05.515%209.21.212%2013.279-1.988%2026.705-1.427%208.712-2.405%2017.784-2.173%2020.16s1.17%207.56%202.083%2011.52c1.26%205.464%201.55%209.863%201.2%2018.24-.253%206.072-1.159%2013.632-2.012%2016.8-2.027%207.523-9.088%2021.715-13.978%2028.094l-3.874%205.053%205.835%206.947c3.21%203.82%207.802%2010.1%2010.205%2013.954%204.554%207.304%2010.716%2020.75%2012.87%2028.085%201.193%204.065%201.284%203.515%201.911-11.573.596-14.31.955-16.714%203.725-24.89%206.528-19.274%2011.796-26.992%2021.773-31.904%205.46-2.688%207.607-3.184%2015.227-3.517%209.647-.422%2014.061.523%2019.871%204.256%204.185%202.689%207.854%209.324%208.822%2015.952.514%203.519.228%205.52-1.277%208.922-3.07%206.94-5.829%2010.16-10.46%2012.208-3.358%201.485-5.383%201.763-9.208%201.26-7.236-.95-12.597-4.47-15.485-10.17-1.326-2.616-2.768-4.757-3.205-4.757-1.179%200-3.973%203.325-3.973%204.728%200%20.669-.803%202.363-1.785%203.764-.981%201.402-2.597%204.924-3.59%207.828-2.238%206.549-2.406%2020.522-.48%2039.84%201.293%2012.972%201.268%2013.698-.71%2020.846-1.128%204.073-3.312%209.473-4.854%2012-2.235%203.66-2.93%206.156-3.42%2012.274-.337%204.224-.836%209.235-1.107%2011.134-.486%203.401-.39%203.516%206.25%207.528%204.66%202.816%208.373%206.092%2012.028%2010.616%202.907%203.599%206.246%208.52%207.42%2010.936%201.797%203.698%202.828%204.626%206.512%205.859%204.962%201.66%2011.694%206.677%2015.153%2011.292%205.906%207.881%209.809%2019.612%209.846%2029.602.024%206.405-3.418%2018.892-6.644%2024.098l-2.79%204.505%203.037.295c3.634.353%204.596%203.02%201.658%204.592-1.244.666-14.324%201.402-34.858%201.96-37.819%201.03-281.658.977-321.936-.07m17.539-8.583%207.829-.004-.524-3.902c-.412-3.073-.068-4.517%201.618-6.798l2.14-2.895-1.993-18.883a9378%209378%200%200%201-3.915-37.991c-1.057-10.51-2.112-19.3-2.345-19.533s-2.42.95-4.86%202.629c-4.651%203.2-10.994%2010.96-11.035%2013.5-.013.824%201.397%202%203.163%202.64%201.752.633%204.99%202.695%207.193%204.581%203.022%202.587%204.343%204.652%205.375%208.4.753%202.735%201.634%206.7%201.958%208.812l.59%203.84-2.907-5.28c-3.958-7.19-10.51-13.055-16.607-14.865-2.693-.8-5.82-1.455-6.949-1.455s-4.363.687-7.188%201.526c-3.927%201.166-6.406%202.804-10.531%206.96-6.69%206.739-9.675%2013.788-10.37%2024.499-.836%2012.886%202.705%2023.364%2010.671%2031.573l3.774%203.888%2013.542-.62c7.448-.34%2017.065-.62%2021.37-.622zm330.844-4.455c1.96-2.976%204.102-7.188%204.76-9.36.66-2.172%201.2-8.269%201.203-13.549%200-7.855-.423-10.734-2.347-15.84-1.74-4.617-3.756-7.652-7.758-11.674-4.13-4.151-6.62-5.795-10.543-6.96-2.825-.84-6.06-1.526-7.188-1.526-4.357%200-11.779%202.987-15.644%206.296-2.223%201.902-5.709%206.34-7.747%209.861-3.596%206.214-3.737%206.806-4.764%2020.037-.897%2011.554-.845%2014.044.342%2016.32%201.604%203.074%201.802%206.827.471%208.926-.791%201.249.969%201.51%2013.215%201.96%207.77.285%2018.247.61%2023.282.72l9.155.2zm-87.633-3.855c0-1.419-1.145-1.521-10.8-.965-5.94.343-57.78.625-115.2.627-68.957.003-104.4.33-104.4.964%200%20.635%2039.04.96%20115.2.96%20106.493%200%20115.2-.12%20115.2-1.586m-222.72-5.854c-.002-7.425-8.172-96.45-9.537-103.92-.531-2.904-1.625-10.371-2.432-16.595-1.274-9.826-1.288-11.744-.104-14.578%201.836-4.393%209.978-9.125%2015.725-9.138%202.273-.005%207.973%201.071%2012.668%202.391%2010.39%202.921%2019.671%203.097%2029.76.562%206.667-1.675%2013.545-1.861%2092.883-2.518%2071.611-.592%2085.406-.918%2084-1.986-1.377-1.045-21.686-1.282-111.795-1.307-73.494-.02-111.679.305-114.82.979-3.3.707-5.673%202.006-7.937%204.342-2.903%202.995-3.268%203.992-3.598%209.829-.22%203.905%202.17%2030.41%205.995%2066.457%203.499%2032.98%206.586%2061.366%206.86%2063.082.275%201.716.912%203.12%201.416%203.12s.916-.324.916-.72m266.697-45.354c2.668-3.643%2010.522-8.588%2014.704-9.256%202.045-.327%203.72-1.092%203.72-1.699%200-4.381-15.33-18.804-18.638-17.535-.799.306-1.557%205.665-2.355%2016.628-.647%208.897-1.374%2018.552-1.616%2021.456l-.44%205.28%201.431-6.234c.788-3.429%202.225-7.317%203.194-8.64m2.18-106.497c-.57-3.672-1.037-11.415-1.037-17.206%200-9.132.388-11.715%202.918-19.46%203.197-9.783%208.993-18.662%2012.807-19.62%201.233-.31%203.834.103%205.779.915%202.69%201.124%204.002%202.533%205.486%205.887%202.578%205.829%206.513%208.26%2012.808%207.916%204.36-.239%205.021-.607%207.92-4.415%202.326-3.057%203.162-5.145%203.162-7.9%200-2.061-.715-5.535-1.59-7.72-1.3-3.25-2.48-4.387-6.48-6.25-5.867-2.732-14.061-3.032-21.607-.791-10.252%203.044-16.685%2012.133-22.295%2031.5-2.472%208.533-2.748%2010.907-2.748%2023.686%200%2013.748.077%2014.293%202.4%2017.054%201.32%201.569%202.434%203.438%202.476%204.154.056.955.204.985.556.114.264-.653.013-4.192-.556-7.864m-21.197-2.282c0-.69-1.529-5.045-3.397-9.68-4.741-11.757-9.962-20.153-20.946-33.685l-2.32-2.86-4.669%204.596c-2.567%202.527-8.51%207.184-13.204%2010.348-15.07%2010.156-29.628%2016.163-51.036%2021.06-10.951%202.506-38.223%203.572-51.45%202.012-24.508-2.89-49.824-12.537-66.94-25.506a939%20939%200%200%200-6.89-5.182c-1.547-1.138-2.19-.684-6.121%204.32-2.417%203.074-6.012%208.612-7.99%2012.306-3.29%206.143-9.711%2021.086-9.8%2022.804-.02.396%2055.043.72%20122.363.72%20100.064%200%20122.4-.228%20122.4-1.253m-100.8-14.628c5.016-.89%2013.007-2.888%2017.757-4.438%209.888-3.227%2022.961-9.59%2030.98-15.079%207.45-5.1%2016.852-13.393%2021.943-19.358%202.31-2.706%204.2-4.993%204.202-5.082%200-.089-1.836-.162-4.08-.162-3.423%200-4.082-.305-4.082-1.893%200-1.495.909-2.048%204.32-2.627%207.958-1.352%209.074-2.25%2013.24-10.664%202.139-4.32%204.177-9.01%204.53-10.422l.641-2.566-5.765%201.795c-3.171.987-7.422%201.925-9.446%202.086-3.153.25-3.722-.007-3.976-1.789-.26-1.826.384-2.218%205.28-3.211%206.662-1.352%2012.642-3.832%2015.054-6.243%201.524-1.524%201.67-2.722%201.106-9.031-.687-7.684-3.709-21.482-5.325-24.319-1.022-1.793-.316-8.667%201.19-11.598.5-.97.69-1.978.427-2.242-.264-.264-1.919.141-3.678.9-4.483%201.935-11.432%203.496-12.956%202.91-.705-.27-1.282-1.266-1.282-2.213%200-1.286%201.276-2.022%205.04-2.91%206.933-1.633%2013.063-4.62%2014.741-7.182%203.395-5.18%202.494-34.97-1.625-53.74-2.776-12.655-3.73-15.843-6.169-20.64-2.479-4.876-5.645-8.097-8.94-9.098-3.46-1.051-11.364%204.813-20.32%2015.076-5.603%206.42-8.997%2011.443-12.178%2018.021-2.426%205.016-4.565%209.298-4.754%209.515-.189.216-1.86-.423-3.715-1.422-3.79-2.041-5.053-4.612-3.302-6.722.647-.78%201.006-1.585.8-1.79-.65-.643-14.645-5.997-17.418-6.663l-2.64-.634v29.42l3.36%203.256c3.378%203.274%204.261%206.05%202.308%207.257-.578.358-3.17-1.437-5.76-3.987l-4.708-4.637-.01-12.997c-.01-7.147-.272-14.58-.593-16.517-.577-3.492-.633-3.53-6.889-4.62-3.469-.603-9.898-1.35-14.287-1.66l-7.98-.564v27.865c0%2023.225-.233%2028.058-1.398%2029.025-.77.639-1.85.882-2.4.541-.66-.407-1.002-10.285-1.002-28.882v-28.264l-3.6.018c-4.399.021-23.075%202.622-24.31%203.385-.496.307-.89%208.564-.89%2018.669v18.118l-2.64%201.862c-1.452%201.024-4.965%203.034-7.806%204.465-4.641%202.339-5.315%202.454-6.638%201.132-2.013-2.014-.704-3.394%206.476-6.826l5.808-2.776v-16.623c0-9.143-.108-16.618-.24-16.611-.832.043-12.467%203.921-15.895%205.298-3.157%201.269-3.979%202.029-3.476%203.215%201.84%204.348%201.583%205.716-1.364%207.24-1.611.833-3.293%201.514-3.736%201.514s-2.46-3.564-4.481-7.92c-4.095-8.826-13.82-22.54-20.026-28.238-2.234-2.051-5.676-4.722-7.648-5.935-4.007-2.464-6.512-2.178-10.19%201.164-2.863%202.603-6.496%209.705-7.739%2015.132-5.843%2025.502-7.277%2037.045-6.554%2052.735.431%209.362.906%2012.246%202.343%2014.24.991%201.377%204.701%203.967%208.244%205.756%204.475%202.26%206.442%203.8%206.442%205.04%200%202.367-2.878%202.317-7.68-.134-2.07-1.056-3.951-1.92-4.18-1.92s.015%201.7.543%203.779c.766%203.018.637%204.418-.642%206.96-1.652%203.281-5.303%2017.207-5.315%2020.27-.009%202.21%206.007%207.741%2010.741%209.876%202.228%201.005%203.653%202.308%203.653%203.341%200%203.625-4.782%202.717-10.744-2.039-1.949-1.554-3.785-2.827-4.08-2.827s-.536.783-.536%201.74c0%203.052%203.668%2015.874%206.143%2021.469%202.562%205.794%204.04%206.73%2012.757%208.077%204.29.662%205.826%202.437%203.663%204.232-.858.712-2.907.86-5.826.423l-4.503-.675%204.203%205.988c5.475%207.801%2018.876%2020.532%2027.806%2026.415%208.742%205.76%2021.926%2012.037%2032.077%2015.274%206.76%202.156%2017.905%204.412%2028.32%205.734%206.855.87%2032.457-.27%2041.28-1.838zm-31.686-26.296c-4.775-1.452-8.504-3.926-11.901-7.895-3.624-4.233-5.358-8.76-5.367-14.008-.005-2.697-.335-3.12-2.437-3.12-3.567%200-9.089-2.56-9.089-4.214%200-2.304%201.657-2.691%204.724-1.105%204.013%202.075%2013.968%201.895%2018.796-.34%202.112-.978%205-3.021%206.42-4.54%202.293-2.455%204.62-6.923%204.62-8.87%200-.388-1.538-1.261-3.418-1.941-1.922-.695-3.887-2.263-4.487-3.58-.882-1.936-.729-2.801.878-4.957%201.75-2.35%202.624-2.64%208.705-2.893%206.343-.262%206.885-.121%208.781%202.29%201.112%201.413%202.021%203.12%202.021%203.795%200%201.55-5.454%206.195-7.273%206.195-1.634%200-1.703.905-.346%204.498%201.452%203.842%205.55%207.933%2010.02%2010.002%204.827%202.236%2014.782%202.416%2018.795.341%202.794-1.445%204.724-1.217%204.724.557%200%201.044-7%204.762-8.966%204.762-.974%200-1.478%201.584-1.764%205.545-.57%207.874-4.579%2013.48-12.455%2017.416-4.911%202.455-7%202.945-12.248%202.877-3.48-.046-7.41-.412-8.733-.815m17.39-6.176c1.904-.91%204.872-3.034%206.595-4.718l3.133-3.062-5.156-2.307c-6.951-3.11-17.982-3.836-24.643-1.623-2.665.885-5.374%202.246-6.02%203.024-.954%201.15-.743%201.884%201.126%203.915%201.266%201.374%204.461%203.541%207.101%204.816%203.63%201.753%205.97%202.232%209.6%201.964%202.64-.194%206.359-1.099%208.264-2.01m-55.784-72.099c-5.985-4.51-12.554-6.648-18.113-5.895-2.446.331-7.548%202.194-11.339%204.14-6.038%203.099-7.198%203.398-9.36%202.413-1.357-.619-2.468-1.728-2.468-2.466%200-1.653%2010.996-7.487%2018.524-9.828%204.76-1.48%206.33-1.569%2010.88-.615%206.389%201.34%2014.435%204.908%2019.11%208.474%202.335%201.781%203.33%203.247%203.133%204.62-.21%201.472-1.057%202.063-3.167%202.211-1.995.14-4.206-.798-7.2-3.054m78.4%202.692c-1.349-1.349-.537-3.897%202-6.274%203.585-3.36%209.2-6.055%2016.867-8.098%205.464-1.456%207.079-1.534%2010.97-.533%206.69%201.723%2020.403%208.667%2020.403%2010.332%200%20.778-1.11%201.92-2.467%202.539-2.164.986-3.323.684-9.4-2.442-11.765-6.054-18.88-5.647-29.301%201.678-4.658%203.274-7.668%204.202-9.072%202.798m68.618-34.516c-5.195-8.552-14.081-19.006-21.262-25.014-6.242-5.224-6.68-5.845-6.698-9.495q-.042-9.066%207.43-20.095c4.598-6.788%207.484-8.589%209.626-6.008.814.981-.14%203.658-4.039%2011.327-2.807%205.523-5.373%2011.181-5.7%2012.574-.502%202.129-.025%202.968%202.994%205.262%206.69%205.085%2014.545%2013.614%2019.433%2021.102%202.678%204.101%204.636%208.06%204.353%208.799s-.515%201.872-.515%202.52-.54%201.887-1.2%202.755c-1.053%201.385-1.593.93-4.422-3.727m-209.226-.556c-1.646-1.646-1.396-4.454.84-9.408%201.304-2.889%205.48-7.702%2012.607-14.531l10.658-10.212-6.042-12.264c-5.704-11.576-5.944-12.335-4.285-13.548%202.344-1.714%203.799-1.619%205.797.379%204.773%204.774%2012.873%2021.189%2012.873%2026.09%200%202.042-1.178%203.649-5.04%206.869-10.413%208.684-16.394%2015.013-20.128%2021.297-2.118%203.564-4.363%206.48-4.99%206.48-.625%200-1.656-.518-2.29-1.152'%20style='fill:%238a8a8a;stroke-width:.96'/%3e%3cpath%20d='M736.598%20555.48c-19.536-.356-37.032-.982-38.88-1.392s-3.659-1.217-4.025-1.793c-.925-1.457.996-3.512%203.282-3.512%201.693%200%201.574-.374-1.08-3.395-3.876-4.416-7.2-11.127-8.775-17.725-1.835-7.68-1.44-19.456.902-26.92%202.466-7.862%206.564-14.11%2012.871-19.628%205.166-4.518%2011.382-7.212%2016.647-7.212%202.881%200%203.39-.47%205.781-5.354%202.831-5.782%2011.812-14.869%2017.265-17.47%202.105-1.003%203.215-2.214%203.22-3.513.004-1.09-1.137-13.308-2.535-27.15-2.218-21.972-2.381-25.736-1.284-29.654.988-3.532%202.154-5.123%205.472-7.473%202.378-1.684%205.92-3.195%208.122-3.466%203.87-.475%203.928-.542%206.103-7.018%204.228-12.585%2012.053-26.941%2019.985-36.662l2.35-2.88-4.056-4.8c-5.45-6.449-9.327-12.273-12.783-19.2-8.937-17.914-10.9-35.643-6.048-54.615%201.848-7.229%201.848-7.364-.023-15.937-2.55-11.688-3.341-28.77-1.931-41.73%201.274-11.707%205.076-32.822%207.195-39.959%201.838-6.189%205.41-12.116%209.857-16.36%202.56-2.442%204.866-3.662%207.73-4.091%205.12-.766%209.382.925%2016.093%206.385%204.68%203.807%207.378%207.009%2019%2022.542%203.501%204.68%205.007%206.009%206.24%205.506%205.108-2.082%2015.892-5.512%2021.256-6.76%2011.625-2.706%2027.396-4.245%2043.572-4.253%2013.394-.007%2017.423.335%2023.52%201.99%206.676%201.814%2027.684%208.144%2030.288%209.127.588.222%202.211-1.62%203.607-4.092%203.477-6.161%2014.55-18.308%2021.164-23.216%203.005-2.23%207.476-4.74%209.937-5.578%203.577-1.22%205.176-1.311%207.978-.458%205.37%201.635%209.601%206.36%2013.725%2015.327%202.681%205.831%204.559%2012.19%206.595%2022.337%201.566%207.802%203.12%2019.074%203.454%2025.05.515%209.21.212%2013.279-1.988%2026.705-1.427%208.712-2.405%2017.784-2.173%2020.16s1.17%207.56%202.083%2011.52c1.26%205.464%201.55%209.863%201.2%2018.24-.253%206.072-1.159%2013.632-2.012%2016.8-2.027%207.523-9.088%2021.715-13.978%2028.094l-3.874%205.053%205.835%206.947c3.21%203.82%207.802%2010.1%2010.205%2013.954%204.554%207.304%2010.716%2020.75%2012.87%2028.085%201.193%204.065%201.284%203.515%201.911-11.573.595-14.31.955-16.714%203.725-24.89%206.528-19.274%2011.796-26.992%2021.773-31.904%205.46-2.688%207.607-3.184%2015.227-3.517%209.647-.422%2014.061.523%2019.871%204.256%204.185%202.689%207.854%209.324%208.822%2015.952.514%203.519.228%205.52-1.277%208.922-3.07%206.94-5.829%2010.16-10.46%2012.208-3.358%201.485-5.383%201.763-9.208%201.26-7.236-.95-12.597-4.47-15.485-10.17-1.326-2.616-2.768-4.757-3.205-4.757-1.179%200-3.973%203.325-3.973%204.728%200%20.669-.803%202.363-1.785%203.764-.981%201.402-2.597%204.924-3.59%207.828-2.238%206.549-2.406%2020.522-.48%2039.84%201.293%2012.972%201.268%2013.698-.71%2020.846-1.128%204.073-3.312%209.473-4.854%2012-2.235%203.66-2.93%206.156-3.42%2012.274-.337%204.224-.836%209.235-1.107%2011.134-.486%203.401-.39%203.516%206.25%207.528%204.66%202.816%208.373%206.092%2012.028%2010.616%202.907%203.599%206.246%208.52%207.42%2010.936%201.825%203.756%202.801%204.615%206.723%205.918%205.347%201.776%2012.824%208.157%2017.07%2014.567%204.314%206.512%206.905%2015.645%207.019%2024.741.12%209.662-1.483%2016.593-5.61%2024.24-3.174%205.884-3.196%206-1.096%206.015%201.178.008%202.745.397%203.482.863%202.338%201.48.38%203.706-3.913%204.45-2.28.394-19.699%201.014-38.707%201.377-44.24.844-255.864.838-302.4-.01zm1.156-8.277%2011.537-.62-.43-3.94c-.34-3.124.012-4.406%201.7-6.193l2.126-2.254-3.828-38.33c-2.105-21.081-4.065-38.567-4.355-38.857-.96-.96-5.927%202.28-9.961%206.497-3.553%203.715-7.71%2010.222-6.896%2010.794.171.12%202.785%201.402%205.808%202.85%203.024%201.448%206.37%203.742%207.437%205.098%201.976%202.513%203.255%206.387%204.375%2013.255l.626%203.84-2.1-3.84c-3.181-5.815-9.327-11.648-14.716-13.966-3.635-1.564-6.155-1.979-10.175-1.676-2.94.222-7.057%201.226-9.152%202.231-7.537%203.617-14.098%2012.38-16.81%2022.451-1.834%206.81-1.417%2018.048.927%2025.006%202.278%206.762%206.336%2013.229%2010.217%2016.282%202.188%201.721%203.867%201.992%2012.333%201.992%205.39%200%2014.991-.279%2021.337-.62m334.254-3.54c4.394-6.386%206.982-15.182%206.982-23.73%200-4.038-.51-9.235-1.133-11.55-2.714-10.076-9.283-18.846-16.81-22.442-5.525-2.64-12.998-3.039-18.381-.983-5.331%202.036-11.13%207.055-14.957%2012.945l-2.807%204.32.647-3.36c1.377-7.153%202.488-10.402%204.382-12.809%202.168-2.756%2012.972-8.31%2016.164-8.31%201.113%200%202.023-.368%202.023-.817%200-1.325-5.286-8.23-9.267-12.105-3.339-3.25-10.689-7.828-11.342-7.066-.144.17-1.633%2016.844-3.308%2037.056s-3.289%2037.384-3.587%2038.16-.08%201.411.483%201.411%201.542%201.73%202.175%203.843c.861%202.872.88%204.44.074%206.207l-1.077%202.364%209.805.31c5.392.172%2015.94.403%2023.438.514l13.634.202zm-53.896-.602c1.568-2.51.588-4.715-2.434-5.474-3.703-.93-260.707.63-261.681%201.589-.463.455-.563%201.938-.222%203.297l.62%202.47h131.27c129.35%200%20131.289-.027%20132.447-1.882m-256.468-20.438c-.352-5.94-.88-12.58-1.174-14.757l-.533-3.957%207.05%201.22c16.55%202.863%2029.98%203.78%2054.571%203.726%2027.344-.061%2040.42-1.234%2063.158-5.668%2040.241-7.846%2073.571-23.077%2093.438-42.698%208.32-8.217%2013.29-15.502%2016.918-24.797%202.138-5.478%202.51-7.92%202.51-16.509%200-8.612-.37-11.025-2.533-16.57-3.012-7.719-7.258-14.16-10.915-16.556-2.536-1.662-7.487-1.708-113.276-1.055-60.844.375-111.886%201.044-113.428%201.486-7.057%202.024-9.81%205.305-10.822%2012.892-.454%203.403%201.091%2021.225%205.004%2057.723%203.113%2029.04%206.113%2057.552%206.665%2063.36s1.179%2011.1%201.392%2011.76c.214.66.89%201.2%201.503%201.2.816%200%20.942-2.878.472-10.8m269.262-142.784c-.565-3.643-1.028-10.93-1.028-16.193%200-8.025.463-10.986%202.868-18.345%204.4-13.464%2010.963-21.78%2016.208-20.538%203.523.835%205.729%202.985%208.334%208.121%202.15%204.242%203.74%205.393%209.805%207.104%206.383%201.802%2013.978-5.658%2013.82-13.572-.046-2.27-.99-5.908-2.1-8.082-1.51-2.958-3.125-4.443-6.424-5.902-3.645-1.612-5.833-1.877-12.659-1.53-13.545.69-19.767%204.996-26.093%2018.055-1.474%203.043-3.888%209.793-5.363%2015-2.375%208.38-2.685%2011.07-2.7%2023.441-.016%2013.855.01%2014.002%202.624%2017.114%201.452%201.726%202.705%204.078%202.784%205.225.106%201.54.25%201.385.548-.594.222-1.474-.06-5.661-.624-9.304m-21.146-2.656c-3.838-12.928-13.47-30.031-22.82-40.523l-3.817-4.284-5.663%205.078c-7.014%206.29-18.75%2014.146-28.14%2018.837-8.832%204.412-23.854%209.385-36.8%2012.182-8.35%201.804-12.896%202.132-30.002%202.167-17.61.035-21.495-.245-30.72-2.212-12.993-2.772-25.403-6.846-35.52-11.663-8.555-4.074-20.275-11.474-25.662-16.204l-3.535-3.104-4.834%206.543c-2.66%203.599-6.579%209.874-8.71%2013.945-3.733%207.13-8.619%2019-8.619%2020.94%200%20.606%2043.49.938%20122.813.938h122.813Zm-99.882-13.153c24.996-4.83%2047.305-16.232%2063.838-32.623%208.56-8.486%2016.49-19.554%2020.759-28.966%201.512-3.335%203.67-9.42%204.796-13.524%201.647-6.007%201.923-8.865%201.412-14.677-.349-3.969-1.725-11.105-3.06-15.857-2.75-9.793-2.838-10.43-1.998-14.4.336-1.584%201.02-4.824%201.52-7.2.502-2.376%201.433-5.616%202.07-7.2.639-1.584%201.364-8.712%201.613-15.84.317-9.072-.026-16.415-1.143-24.48-2.722-19.649-6.083-32.121-10.395-38.573-2.343-3.506-3.931-4.834-6.56-5.484-3.061-.756-3.982-.503-7.857%202.164-5.292%203.64-17.265%2016.635-21.491%2023.325-1.681%202.66-4.261%207.603-5.734%2010.983s-3.054%206.145-3.515%206.145-2.093-.893-3.627-1.985c-2.926-2.084-3.559-4.54-1.658-6.44.866-.867-.197-1.72-4.56-3.659-7.26-3.227-12.231-4.785-22.97-7.2-11.023-2.478-35.14-3.481-46.679-1.941-15.78%202.106-38.933%209.154-38.582%2011.746.098.726.457%202.234.799%203.352.494%201.622-.087%202.47-2.87%204.19-1.919%201.186-3.607%202-3.751%201.807-.144-.192-1.861-3.767-3.816-7.944-6.006-12.838-17.323-27.178-26.37-33.413-3.376-2.327-4.76-2.746-7.422-2.246-5.549%201.04-10.979%2010.132-12.798%2021.426-.531%203.301-1.21%206.396-1.507%206.877-1.448%202.343-4.345%2026.732-4.354%2036.66-.01%2011.708.981%2019.112%203.242%2024.201.745%201.677%201.792%204.916%202.327%207.198.8%203.413.66%204.862-.79%208.16-.968%202.206-2.714%208.091-3.879%2013.078-1.646%207.047-2%2010.788-1.589%2016.8.622%209.103%203.788%2018.884%209.462%2029.235%205.385%209.821%2010.02%2015.943%2017.812%2023.52%208.286%208.059%2015.763%2013.623%2025.612%2019.06%2013.597%207.504%2027.432%2012.096%2044.162%2014.658%2011.371%201.74%2038.342%201.233%2049.551-.933m-32.29-26.532c-5.24-1.519-12.199-6.886-14.61-11.267-1.256-2.284-2.41-6.161-2.565-8.616-.28-4.44-.304-4.47-4.72-5.596-2.44-.623-5.09-1.674-5.887-2.336-2.616-2.17.056-2.924%205.43-1.531%203.58.928%206.885%201.118%2010.6.61%202.968-.407%206.245-1.194%207.282-1.749s3.458-2.749%205.379-4.875c3.695-4.09%205.573-8.837%203.739-9.449-.586-.195-2.49-1.33-4.232-2.524-2.333-1.598-3.096-2.78-2.902-4.495.42-3.696%203.81-5.641%209.875-5.665%204.066-.016%205.84.445%207.44%201.936%203.126%202.912%202.722%206.332-1.019%208.613-1.716%201.046-3.512%202.034-3.991%202.196-1.722.582.53%205.667%204.34%209.801%202.137%202.318%205.399%204.714%207.248%205.324%203.4%201.122%2015.173.794%2019.283-.536%201.606-.52%202.16-.321%202.16.775%200%20.917-1.815%202.078-4.8%203.07-4.731%201.57-4.8%201.65-4.82%205.597-.063%2011.824-12.127%2021.946-25.834%2021.676-2.412-.048-5.74-.48-7.396-.96m17.486-6.044c2.682-1.248%205.837-3.492%207.013-4.987l2.136-2.716-4.259-2.165c-2.342-1.19-6.794-2.57-9.892-3.065-8.213-1.313-18.532.638-21.353%204.036-1.028%201.24-.94%201.898.52%203.86%205.228%207.026%2016.742%209.272%2025.835%205.037m-55.756-72.18c-2.64-1.829-7.087-4.182-9.883-5.23-4.385-1.644-5.705-1.756-9.6-.815-2.484.6-7.362%202.562-10.84%204.36-5.39%202.786-6.71%203.12-8.957%202.265-1.45-.552-2.47-1.54-2.267-2.197.566-1.832%2015.006-9.127%2020.612-10.412%203.947-.905%205.945-.884%209.6.1%209.84%202.649%2021.415%209.651%2021.415%2012.955%200%201.255-2.11%202.447-4.158%202.35-.617-.029-3.282-1.548-5.922-3.376m77.92%202.79c-.352-.353-.64-1.41-.64-2.352%200-3.357%2011.615-10.108%2021.2-12.32%204.625-1.069%206.071-1.024%2010.56.325%206.227%201.872%2018.38%208.263%2018.904%209.94.205.657-.82%201.648-2.278%202.202-2.258.859-3.496.558-8.352-2.03-3.135-1.672-7.918-3.629-10.627-4.35-4.276-1.136-5.52-1.113-9.426.175-2.475.816-7.133%203.186-10.352%205.266-5.76%203.723-7.723%204.41-8.989%203.143m66.789-37.5c-5.805-8.817-16.594-20.78-22.317-24.746l-4.07-2.82.56-5.988c.307-3.293%201.463-7.76%202.568-9.925%202.73-5.351%208.386-14.117%209.588-14.86%201.308-.808%204.802.351%204.802%201.594%200%20.543-2.376%205.733-5.28%2011.534-2.904%205.8-5.28%2011.557-5.28%2012.79%200%201.492%201.045%202.895%203.12%204.19%204.704%202.932%2014.357%2013.222%2019.397%2020.677%203.724%205.506%204.405%207.186%204.034%209.94-.246%201.822-.843%203.71-1.328%204.195-.535.535-2.811-2.05-5.794-6.58m-207.76%201.189c-1.888-4.146%201.402-9.475%2013.462-21.8l10.989-11.23-2.15-5.09c-1.181-2.8-3.82-8.17-5.861-11.935-3.541-6.53-3.633-6.918-1.995-8.4.945-.855%202.204-1.555%202.798-1.555%203.126%200%2014.454%2019.982%2015.234%2026.87.365%203.22-.004%203.691-8.274%2010.57-9.333%207.763-14.124%2012.966-16.805%2018.253-1.963%203.869-4.28%206.707-5.476%206.707-.458%200-1.322-1.076-1.921-2.39'%20style='fill:%23474747;stroke-width:.96'/%3e%3cellipse%20cx='885.983'%20cy='326.113'%20rx='19.82'%20ry='9.5'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd'/%3e%3cpath%20d='M768.245%20553.884c-34.584-.425-65.472-1.106-68.64-1.514-4.874-.626-5.76-1.036-5.76-2.66%200-1.246.74-2.025%202.107-2.22%202.031-.289%201.986-.46-1.239-4.685-6.033-7.904-9-17.173-9.017-28.173-.02-13.202%204.312-24.407%2012.723-32.903%205.169-5.22%2011.028-8.174%2017.803-8.976%204.395-.52%204.716-.764%206.69-5.066%202.957-6.446%208.647-12.5%2015.396-16.381%205.638-3.243%205.82-3.47%205.39-6.716-.246-1.848-1.318-12.216-2.382-23.04s-2.18-20.483-2.48-21.464c-.301-.981-.253-4.137.107-7.013.49-3.927%201.407-6.088%203.682-8.679%203.357-3.823%207.78-6.044%2012.035-6.044%202.537%200%202.902-.423%203.93-4.56%201.798-7.234%2011.9-26.943%2017.748-34.623%202.94-3.863%205.347-7.245%205.347-7.516s-2.112-2.943-4.693-5.937c-8.903-10.33-14.962-21.968-18.367-35.282-2.657-10.386-2.608-26.228.113-36.489%201.107-4.176%201.977-8.025%201.934-8.553s-.96-4.848-2.036-9.6c-1.49-6.578-1.97-12.19-2.018-23.52-.064-15.45.788-24.187%204.027-41.28%203.402-17.95%205.9-24.071%2012.738-31.208%203.863-4.031%204.459-4.312%209.145-4.312%202.756%200%206.394.708%208.084%201.573%206.148%203.147%2012.488%209.508%2021.501%2021.573%205.062%206.775%209.466%2012.173%209.788%2011.994%205.254-2.927%2017.624-6.818%2027.464-8.64%2015.684-2.904%2025.987-3.717%2041.28-3.255%2016.281.49%2018.337.898%2040.801%208.088%205.545%201.775%2010.364%203.227%2010.71%203.227.344%200%201.797-1.998%203.227-4.439%203.675-6.27%2014.818-18.661%2020.597-22.903%202.686-1.972%206.98-4.382%209.542-5.355%203.684-1.4%205.379-1.571%208.1-.82%201.894.523%204.823%202.112%206.509%203.53%204.173%203.512%2010.736%2017.946%2012.78%2028.11.898%204.464%202.04%209.957%202.54%2012.206.498%202.249%201.35%209.62%201.891%2016.379.916%2011.417.807%2013.367-1.533%2027.47-2.758%2016.626-2.754%2021.395.03%2036.542%201.531%208.325%201.622%2010.875.686%2019.2-1.642%2014.604-6.52%2027.296-15.195%2039.532-2.313%203.263-4.205%206.223-4.205%206.579s2.001%202.87%204.448%205.588c9.456%2010.504%2018.083%2025.465%2022.856%2039.638%202.841%208.434%204.557%209.166%203.803%201.62-.864-8.645%201.09-26.744%203.767-34.907%204.026-12.274%208.325-20.196%2014.054-25.895%207.096-7.06%2012.731-9.115%2024.992-9.115%208.1%200%209.748.308%2014.736%202.758%205.074%202.491%205.885%203.326%208.4%208.64%203.888%208.22%203.796%2013.877-.336%2020.772-4.2%207.006-8.19%209.59-14.813%209.59-8.893%200-15.494-3.917-18.286-10.85-1.123-2.787-1.938-3.582-3.447-3.36-2.245.33-6.061%207.238-9.362%2016.947-1.87%205.5-2.013%207.332-1.454%2018.72%201.79%2036.46%201.788%2036.09.093%2042.233-.897%203.25-2.926%207.953-4.509%2010.45-2.436%203.844-3.007%205.98-3.716%2013.92-1.322%2014.795-1.625%2013.736%205.022%2017.54%206.906%203.952%2016.748%2014.699%2019.95%2021.783%201.89%204.181%202.634%204.879%206.236%205.842%208.443%202.258%2017.35%2011.826%2021.845%2023.465%202.52%206.524%203.388%2020.66%201.704%2027.75-1.284%205.409-5.388%2014.907-6.825%2015.795-1.648%201.018-.795%202.202%201.801%202.501%201.9.219%202.64.843%202.64%202.224%200%201.607-.861%202.028-5.28%202.584-7.178.903-148.756%202.654-201.6%202.493-23.496-.071-71.016-.478-105.6-.903m-18.564-8.31c.086-.101-.321-1.45-.905-2.996-1.076-2.852-.552-4.807%202.39-8.906.942-1.313.454-9.134-2.457-39.36-1.998-20.747-3.812-38.277-4.031-38.956-.316-.977-.977-.934-3.181.205-1.53.792-4.203%202.634-5.939%204.095-3.267%202.75-8.593%2010.395-8.593%2012.336%200%20.608%201.832%201.928%204.07%202.932%206.465%202.899%2010.133%206.696%2011.76%2012.17%202.17%207.311%201.77%208.23-1.46%203.351-3.222-4.863-7.834-8.747-12.9-10.864-1.83-.765-5.827-1.387-8.88-1.382-10.378.018-19.737%206.638-24.785%2017.534-1.236%202.668-2.78%207.827-3.43%2011.464-1.473%208.245-.243%2017.398%203.414%2025.407%202.545%205.573%208.209%2012.412%2011.262%2013.6%201.352.525%2043.196-.078%2043.665-.63m320.74-1.387c3.239-3.447%207.058-12.769%208.167-19.933.762-4.923.721-8.286-.16-13.217-3.15-17.632-14.186-28.974-28.214-28.998-9.142-.015-16.839%204.307-21.91%2012.305-1.529%202.41-2.78%203.728-2.78%202.928%200-3.66%203.086-11.235%205.498-13.495%203.112-2.917%209.995-6.54%2012.464-6.562.945-.008%202.324-.398%203.064-.867%201.109-.701.91-1.597-1.132-5.08-3.016-5.148-9.685-11.44-14.998-14.15-3.655-1.864-3.94-1.886-3.99-.308-.03.935-1.481%2018.332-3.225%2038.66-2.718%2031.67-2.98%2037.181-1.838%2038.507%201.54%201.786%201.991%206.154.949%209.189-.632%201.838-.33%202.144%202.444%202.486%201.74.215%2012.27.46%2023.397.544%2019.845.151%2020.272.112%2022.265-2.009m-53.372-1.346c2.02-1.828%202.267-4.236.603-5.9-.885-.885-30.902-1.125-129.84-1.038-70.778.063-129.983.39-131.567.727-2.042.434-2.972%201.255-3.194%202.819-.751%205.285-8.814%204.98%20132.115%204.98%20119.738%200%20130.267-.126%20131.883-1.588m-3.378-11.198c.488-.487%209.966-112.94%2010.576-125.481.487-10.006.325-12.533-.965-15.028-.853-1.65-3.181-4.012-5.174-5.251l-3.624-2.253-123.327-.261c-75.602-.16-125.916.097-130.018.666-10.167%201.409-15.017%205.95-15.67%2014.675-.21%202.794%202.04%2027.328%205%2054.52s6.022%2055.704%206.803%2063.36%201.57%2014.352%201.754%2014.88c.22.635%2043.307.874%20127.35.706%2069.86-.14%20127.142-.38%20127.295-.533m18.54-135.533c0-3.168-.64-10.512-1.417-16.32-.778-5.808-1.417-13.623-1.422-17.367-.014-11.947%205.034-27.329%2011.55-35.193%202.323-2.804%203.67-3.6%206.089-3.6%201.709%200%203.924.598%204.923%201.328s2.922%203.431%204.273%206c3.041%205.788%207.378%208.317%2013.237%207.722%202.244-.228%204.753-.973%205.575-1.656s2.599-3.122%203.946-5.422c2.034-3.47%202.343-4.898%201.817-8.406-1.22-8.13-6.546-13.05-15.703-14.503-4.87-.773-14.544.943-19.462%203.451-7.607%203.881-13.707%2014.34-18.611%2031.914-2.402%208.608-2.593%2010.529-2.29%2023.098.318%2013.257.414%2013.812%202.91%2016.777%202.903%203.447%204.162%209.449%203.4%2016.207-.305%202.702-.171%203.878.347%203.06.463-.732.84-3.922.838-7.09m-22.661-20.4c-.358-1.452-2.183-6.312-4.054-10.8-3.357-8.05-13.306-23.768-19.716-31.148l-3.29-3.787-6.123%205.707c-10.299%209.6-24.712%2018.28-39.852%2024.002-15.643%205.91-38.217%2010.026-54.99%2010.026-11.044%200-28.13-2.26-39.495-5.223-16.877-4.4-34.198-12.472-46.035-21.453-3.28-2.488-6.776-5.127-7.77-5.863-2.09-1.55-1.898-1.737-9.317%209.019-5.589%208.102-9.573%2015.87-12.923%2025.2l-2.5%206.96h246.716zm-97.22-13.53c11.897-2.769%2021.803-6.27%2031.372-11.09%2017.052-8.59%2032.973-22.126%2042.465-36.104%205.178-7.625%2010.92-19.884%2012.88-27.495.834-3.244%201.518-8.54%201.518-11.77%200-5.623-2.757-20.339-4.977-26.574-.868-2.438-.583-4.907%201.61-13.92%203.535-14.524%204.27-32.537%201.984-48.64-.88-6.202-2.25-13.87-3.046-17.037-.796-3.168-1.874-7.488-2.396-9.6-2.306-9.331-8.123-16.8-13.085-16.8-3.507%200-10.978%205.068-15.291%2010.374-2.014%202.478-4.53%205.395-5.591%206.483-3.937%204.036-7.08%208.846-11.401%2017.45-3.275%206.52-4.817%208.69-5.883%208.282-.794-.305-1.444-.89-1.444-1.3s-.864-.971-1.92-1.247c-2.124-.555-2.561-3.498-.784-5.274.624-.625.948-1.291.72-1.481-.23-.19-4.304-1.891-9.056-3.78-4.752-1.89-13.176-4.441-18.72-5.671-8.75-1.94-12.678-2.236-29.76-2.236-15.55%200-21.292.366-27.36%201.742-9.327%202.116-15.243%203.891-23.716%207.117l-6.435%202.45%201.388%202.684c1.227%202.372%201.213%202.859-.12%204.192-2.453%202.453-5.535%203.841-5.926%202.67-1.156-3.468-8.32-17.215-10.519-20.186-11.417-15.424-19.98-23.23-25.483-23.23-1.365%200-3.757%201.074-5.315%202.385-3.509%202.952-7.57%2011.071-8.41%2016.816-.347%202.376-1.214%206.48-1.925%209.12-.71%202.64-2.013%209.906-2.895%2016.146-1.149%208.134-1.47%2015.2-1.137%2024.96.444%2012.988%201.46%2018.36%205.485%2028.974.458%201.21.043%203.52-1.123%206.24-3.023%207.057-5.536%2019.19-5.543%2026.764-.009%209.234%202.927%2019.812%208.536%2030.754%202.43%204.741%207.01%2011.93%2010.178%2015.974%206.44%208.222%2016.789%2017.54%2026.86%2024.18%2012.381%208.165%2029.016%2014.869%2044.472%2017.922%2011.284%202.23%2012.755%202.319%2032.828%201.986%2014.476-.24%2020.589-.746%2026.965-2.23m-34.818-26.45c-5.176-1.393-10.163-4.916-13.905-9.822-1.961-2.57-2.714-4.819-3.017-9.006-.398-5.505-.448-5.588-3.74-6.205-4.729-.887-7.965-2.521-7.965-4.021%200-1.64.891-1.618%205.066.127%205.159%202.155%2014.97.956%2020.412-2.495%204.593-2.913%208.112-7.71%208.118-11.064.003-1.418-1.126-2.65-3.596-3.928-4.402-2.278-5.12-5.255-2.056-8.518%201.93-2.053%202.833-2.278%207.765-1.938%205.893.406%207.989%201.483%208.984%204.618.728%202.294-2.847%206.552-5.5%206.552-1.288%200-1.753.727-1.753%202.738%200%203.823%203.58%208.724%208.658%2011.853%205.488%203.383%2014.625%204.304%2020.272%202.045%202.084-.834%204.03-1.275%204.325-.98%201.117%201.116-.864%202.598-5.14%203.845l-4.43%201.292-.17%204.86c-.34%209.658-8.124%2018.066-18.857%2020.368-5.867%201.258-7.779%201.212-13.47-.32m17.207-5.352c4.221-1.916%208.886-5.929%208.886-7.645%200-1.64-6.935-4.643-13.454-5.826-3.382-.613-8.095-.823-10.472-.466-5.846.876-11.459%203.222-12.538%205.239-.684%201.276-.18%202.344%202.188%204.634%201.691%201.636%204.588%203.628%206.436%204.428%204.78%202.067%2013.988%201.89%2018.954-.364m-3.114-46.095c0-1.709-3.167-2.51-4.53-1.147-.532.532-.662%201.461-.288%202.065.954%201.544%204.818.808%204.818-.918m-52.767-26.912c-7.495-4.98-13.8-7.058-18.828-6.209-2.137.362-6.883%202.156-10.546%203.99-6.884%203.443-10.745%203.848-11.253%201.18-.2-1.054%201.764-2.616%206.23-4.954%203.588-1.879%208.973-4.123%2011.967-4.988%205.03-1.452%205.902-1.453%2011.452-.015%207.242%201.876%2013.611%205.04%2018.145%209.012%203.256%202.854%203.302%202.989%201.496%204.394-1.025.797-2.105%201.437-2.4%201.422s-3.113-1.74-6.263-3.832m78.308%202.54c-.602-.725-.857-1.936-.567-2.692.854-2.227%2011.085-8.383%2016.676-10.034%207.983-2.358%2014.45-1.453%2024.35%203.404%204.62%202.268%208.4%204.717%208.4%205.443%200%20.727-1.058%201.587-2.35%201.911-1.634.41-4.417-.444-9.137-2.805-3.732-1.868-8.627-3.671-10.877-4.009-4.967-.745-11.398%201.474-19.112%206.594-2.906%201.929-5.51%203.507-5.786%203.507-.277%200-.996-.593-1.597-1.318m66.215-37.329c-2.948-4.482-9.59-12.267-15.322-17.959l-10.118-10.046.134-5.47c.074-3.044.867-6.89%201.787-8.673%203.25-6.296%209.304-15.1%2010.77-15.662.822-.315%202.09.023%202.818.752%201.126%201.126.613%202.678-3.424%2010.355-2.61%204.967-5.177%2010.595-5.702%2012.506l-.956%203.475%207.088%205.914c6.784%205.662%2015.736%2016.425%2018.936%2022.767%201.179%202.338%201.298%203.754.546%206.48-.53%201.919-1.051%203.485-1.159%203.481-.107-.004-2.536-3.568-5.398-7.92m-206.871%201.953c-1.592-2.43-1.562-2.706.822-7.746%201.818-3.842%205.138-7.738%2012.54-14.713%205.536-5.217%2010.068-10.182%2010.07-11.032.003-1.693-6.59-16.068-9.312-20.304-1.28-1.992-1.45-3.052-.686-4.263%201.686-2.673%203.171-2.527%206.09.597%203.585%203.838%2011.734%2020.244%2011.924%2024.006.128%202.533-1.054%203.958-9.392%2011.324-5.722%205.054-11.192%2010.923-13.67%2014.666-7.37%2011.135-6.493%2010.355-8.386%207.465'%20style='fill:%23040403;stroke-width:.96'/%3e%3cellipse%20cx='894.927'%20cy='331.661'%20rx='.305'%20ry='.191'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='886.078'%20cy='370.851'%20rx='4.774'%20ry='.163'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='894.548'%20cy='404.879'%20rx='2.8'%20ry='4.271'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1145.216'%20cy='-344.084'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.73853%20.67422%20-.63988%20.76848%200%200)'/%3e%3cellipse%20cx='1161.324'%20cy='60.068'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.92465%20.38081%20-.33829%20.94104%200%200)'/%3e%3cellipse%20cx='1141.388'%20cy='122.194'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.94198%20.33566%20-.2924%20.9563%200%200)'/%3e%3cellipse%20cx='818.868'%20cy='559.334'%20rx='2.166'%20ry='.747'%20style='fill:%23ffdb4d;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cellipse%20cx='885.732'%20cy='370.645'%20rx='5.565'%20ry='.59'%20style='fill:%23000;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cpath%20d='M866.308%20513.459c.286-3.163.778-14.75%201.092-25.75.626-21.883%202.814-56.19%204.603-72.16l1.137-10.16%2011.123-2.06c27.089-5.018%2031.22-5.495%2048.123-5.558%2013.803-.05%2018.12.284%2022.958%201.776%2023.23%207.168%2033.385%2022.843%2032.318%2049.886-.402%2010.184-.634%2011.15-4.61%2019.173-10.298%2020.783-35.818%2036.819-69.186%2043.475-9.613%201.918-43.738%207.114-46.78%207.124-.975.003-1.17-1.427-.778-5.746'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M576.847%20433.52c-33.704-.235-99.078%206.542-160.356%2016.937-23.08%203.915-36.666%206.601-37.525%207.418-.468.445%205.022%2046.53%205.601%2047.023.188.16%2013.49-2.372%2029.563-5.629%2016.072-3.256%2029.426-5.727%2029.676-5.49.249.237-.672%2060.911-2.047%20134.832s-2.491%20139.574-2.479%20145.895l.022%2011.494%203.216-.588c1.77-.323%2013.897-1.702%2026.948-3.064l23.728-2.477-.642-4.533c-1.421-10.022-2.926-56.672-2.938-91.041l-.012-36.44%202.633-.01c4.417-.016%2063.011-8.66%2075.912-11.199%2064.141-12.62%2097.624-37.064%20108.858-79.469%202.325-8.775%202.656-12.833%202.67-32.822l.015-22.808-3.855-10.51c-5.024-13.697-10.579-22.316-20.113-31.213-16.02-14.948-36.468-22.874-66.475-25.768-3.418-.33-7.586-.505-12.4-.539zm636.505%2035.667c-.13-.098-6.819%201.26-14.861%203.016s-19.41%204.239-25.26%205.518l-10.635%202.326-.761%2026.328c-.419%2014.48-1.108%2033.963-1.536%2043.295l-.777%2016.967h-49.62l-5.85%2015.299-5.85%2015.298%2029.664.297%2029.666.297-.736%2043.65c-1.442%2085.626%204.027%20112.955%2027.015%20135.01%2014.122%2013.55%2029.08%2018.88%2050.358%2017.946%2012.985-.571%2021.458-2.922%2032.003-8.877%209.584-5.412%2022.007-17.961%2029.965-30.27%206.415-9.92%207.08-10.596%208.075-8.217.596%201.426%203.184%206.841%205.752%2012.033%207.966%2016.11%2021.37%2026.758%2038.529%2030.606%209.198%202.062%2014.567%202.065%2024.728.018%2016.42-3.309%2033.579-14.094%2041.916-26.346l3.858-5.666.375%2012.662c.729%2024.579-2.982%20103.33-7.438%20157.861-2.161%2026.448-7.37%2078.352-8.304%2082.762-.862%204.062-1.95%204.325%2028.79-6.904%2028.175-10.292%2024.694-5.323%2027.409-39.143%205.007-62.374%208.853-206.478%208.873-332.47l.01-61.547-9.065.742c-4.986.409-16.171%201.32-24.857%202.023l-15.793%201.281.281%207.788c.155%204.283%201.116%2021.807%202.135%2038.94%201.019%2017.135%201.681%2040.667%201.473%2052.294l-.38%2021.14-5.565%2011.016c-16.58%2032.813-36.9%2049.854-52.655%2044.156-10.576-3.824-18.196-20.11-22.168-47.382-3.093-21.241-1.586-75.265%203.211-115.092.917-7.614%201.471-14.03%201.23-14.26-.429-.408-46.636-3.466-47.13-3.12-.524.37-3.907%2020.662-5.76%2034.56-1.345%2010.085-2.021%2025.13-2.234%2049.7l-.307%2035.237-3.781%209.824c-8.142%2021.155-18.597%2038.09-29.633%2047.994-8.266%207.419-15.621%2010.672-24.127%2010.672-14.265%200-24.223-10.575-28.883-30.674-1.518-6.546-1.877-14.732-1.826-41.53.062-32.434%202.157-85.708%203.45-87.696.365-.563%2012.02-.64%2027.22-.18l26.582.807%204.275-16.244c2.352-8.934%204.276-16.576%204.276-16.983s-13.686-.49-30.414-.183l-30.414.556.01-4.57c.01-2.514%201.298-24.33%202.87-48.479%201.574-24.148%202.753-43.987%202.622-44.086zm-637.755%204.483c39.818%201.266%2060.273%2020.246%2060.214%2056.125-.027%2016.786-5.486%2028.664-19.287%2041.97-17.871%2017.231-43.408%2028.121-79.402%2033.86-20.329%203.241-46.332%206.386-46.443%205.617-.769-5.3%201.502-60.645%203.61-87.998%202.315-30.021%203.72-39.97%205.731-40.568%205.452-1.622%2044.467-7.38%2057.33-8.461q9.714-.817%2018.247-.545m318.484%2038.47c-.188.072-.463.204-.676.292q.164.016.328.008c.117-.102.23-.201.348-.3zm-27.774%201.319c-.131.247-.286.418-.414.676q.205-.212.41-.42c-.002-.086.006-.17.005-.256m23.239%209.69a3%203%200%200%200-.317.02c-.126.045-.249.096-.375.14-.223.122-.468.253-.767.4.56-.144%201.224-.341%201.469-.465zm-180.018%2032.554c-2.19.021-4.52.183-6.92.49l-7.709.987-.836%2011.908c-1.009%2014.379-5.542%2042.777-10.76%2067.404-2.11%209.966-3.499%2018.32-3.085%2018.563%201.597.938%2028.273%205.28%2028.882%204.7.355-.336%202.447-8.751%204.65-18.7s4.128-18.188%204.276-18.307c.436-.351%2026.876%203.871%2027.408%204.377.267.254-.31%205.649-1.28%2011.988-3.335%2021.764-5.685%2054.309-5.05%2069.94.697%2017.141%203.933%2029.745%2010.85%2042.265%2014.65%2026.518%2043.54%2040.485%2070.12%2033.9%2013.125-3.251%2021.385-8.058%2033.624-19.564%206.273-5.897%2011.406-10.155%2011.406-9.463.002%202.18%206.81%2015.054%2010.201%2019.293%208.524%2010.65%2026.003%2016.739%2044.739%2015.584%2016.987-1.046%2031.645-7.116%2044.797-18.549l6.162-5.357%204.662%203.856c13.114%2010.844%2025.058%2018.005%2035.076%2021.03%205.889%201.78%2020.804%201.949%2028.756.327%2029.118-5.94%2055.819-28.938%2063.691-54.86%203.34-10.995%202.007-28.213-3.351-43.288-8.163-22.968-25.68-51.247-47.051-75.961l-10.274-11.881%202.133-14.326c1.173-7.88%201.889-14.558%201.592-14.84-.932-.886-39.456-6.63-40.135-5.985-.355.338-1.18%204.824-1.836%209.97-3.829%2030.07-18.986%2082.596-32.582%20112.91l-3.441%207.67-1.479-3.085c-.812-1.696-2.04-2.888-2.73-2.648s-8.756%202.803-17.924%205.697-16.67%205.743-16.67%206.328c0%201.644%204.335%209.367%2011.983%2021.35%206.844%2010.724%206.93%2010.956%204.804%2013.191-6.608%206.95-21.1%209.277-28.119%204.516-6.551-4.445-9.646-12.426-11.142-28.735-1.349-14.695.07-78.462%202.644-118.875.622-9.756.731-18.074.244-18.484-.875-.736-47.058-3.69-47.703-3.05-.183.181-.698%2027.367-1.144%2060.411l-.813%2060.082-5.596%2011.272c-7.092%2014.287-13.317%2023.002-21.527%2030.139-15.88%2013.804-33.219%2011.545-42.373-5.52-5.534-10.315-6.8-18.378-6.773-43.123.025-23.417.583-29.762%205.828-66.248%203.394-23.612%203.085-27.439-2.74-34.024-4.28-4.837-12.886-9.876-16.868-9.876-1.79%200-8.478%202.001-14.861%204.449-23.741%209.104-32.05%204.593-29.992-16.287.702-7.124.529-8.265-1.557-10.248-2.305-2.193-7.635-3.377-14.207-3.313m318.228%2097.344c.857-.938%2010.588%2010.005%2017.153%2019.289%205.915%208.364%2011.881%2020.573%2014.513%2029.7%203.154%2010.93%202.626%2024.265-1.355%2034.241-3.645%209.135-12.527%2017.563-21.045%2019.97-9.291%202.623-14.947%202.243-22.908-1.54-6-2.851-21.506-15.764-21.506-17.908%200-.394%202.573-5.923%205.717-12.285%206.83-13.823%2016.684-37.493%2023.574-56.63%202.755-7.649%205.39-14.325%205.857-14.837'%20style='fill:%23000;stroke-width:1.14084'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ok={name:"ErrorPage",data(){return{id:null}},mounted(){this.id=this.$route.params.id}},Ck={class:"error-container"},Rk={class:"error-page"},Ik={class:"error-content-section"},Mk={class:"error-content"},vk={class:"error-message"},Zk={key:0,class:"error-title"},Dk={class:"error-description"};function wk(a,t,n,i,o,r){return e.openBlock(),e.createElementBlock("div",Ck,[e.createElementVNode("div",Rk,[t[0]||(t[0]=e.createElementVNode("div",{class:"error-logo-section"},[e.createElementVNode("img",{src:Ak,alt:"Pristy logo",class:"pristy-logo"})],-1)),e.createElementVNode("div",Ik,[e.createElementVNode("div",Mk,[e.createElementVNode("div",vk,[o.id?(e.openBlock(),e.createElementBlock("h1",Zk,e.toDisplayString(a.$t("error",{error:o.id})),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Dk,e.toDisplayString(a.$t(`errors.${o.id}`)),1)])])])])])}const Wk=Se(Ok,[["render",wk],["__scopeId","data-v-dcedb536"]]),Lk={install(a){a.component("PaginatorComponent",so),a.component("PDFComponent",co),a.component("PristyIcon",hn),a.component("TreeExplorer",en),a.component("CopyOrMovePopup",bo),a.component("EllipsisBreadcrumb",fu),a.component("BreadCrumbAlfresco",Nu),a.component("ComplexBreadcrumb",_o),a.component("ContentTableView",fo),a.component("ContentListView",Ou),a.component("ContentCompactTableView",Yn),a.component("ContentGridView",No),a.component("DynamicContentView",Ru),a.component("ContentFiltersHeader",Iu),a.component("ImageViewer",Mo),a.component("VideoPlayer",vo),a.component("AudioPlayer",Zo),a.component("PreviewPanel",Ng),a.component("CreateWorkflowPopup",To),a.component("ImportNewVersionPopup",Ao),a.component("ShareLinkPopup",Io),a.component("MemberListPopup",Co),a.component("SendMailPopup",Ro),a.component("LayoutSelector",Eg),a.component("HelpKeyMessage",Tg),a.component("SelectionStatus",Sg),a.component("MemberList",Oo),a.component("ActionMenu",fn),a.component("CustomToastContent",Ag),a.component("UploadTargetInfo",Cg),a.component("FolderUpload",yc),a.component("ImportPopupWithWorker",Rg),a.component("UploadStatus",Og),a.component("AddPairInConfigDialog",Ig),a.component("ConfigDatatable",Mg),a.component("ConfigItemEditor",fc),a.component("ConfigSplitView",vg),a.component("ConfigUpload",Zg),a.component("ListVersionConfig",Dg),a.component("AddCriterionPopup",Oi),a.component("AdvancedSearchPanel",Wg),a.component("AdvancedViewPanel",Lg),a.component("ExactSearch",Sc),a.component("FavoriteViewMenu",Yg),a.component("UserViewsFavoritesPanel",Ri),a.component("SaveViewPopup",Ii),a.component("ViewResultsPanel",kg),a.component("PdfToolsComponent",xg),a.component("CodeMirrorEditor",Pg),a.component("DiffViewerDialog",Ec),a.component("ArrayEditor",Ti),a.component("ErrorComponent",Tc),a.component("WorkspaceCard",Rc),a.component("WorkspaceList",Bg),a.component("AppLayout",l_),a.component("AppSidebar",Dc),a.component("AppTopbar",wc),a.component("AppSubmenu",Zc),a.component("AppFooter",s_),a.component("AppMobileLayout",Wc),a.component("ChatPanel",jg),a.component("ChatMessage",Ac),a.component("ChatInput",Oc),a.component("ChatRoomList",Cc)}};function xi(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kc={exports:{}};var m_;function Yk(){return m_||(m_=1,(function(a,t){(function(n){a.exports=n()})(function(){return(function n(i,o,r){function l(d,u){if(!o[d]){if(!i[d]){var b=typeof xi=="function"&ξif(!u&&b)return b(d,!0);if(s)return s(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var p=o[d]={exports:{}};i[d][0].call(p.exports,function(g){var _=i[d][1][g];return l(_||g)},p,p.exports,n,i,o,r)}return o[d].exports}for(var s=typeof xi=="function"&&xi,c=0;c<r.length;c++)l(r[c]);return l})({1:[function(n,i,o){var r=n("./utils"),l=n("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var d,u,b,m,p,g,_,f=[],h=0,S=c.length,y=S,T=r.getTypeOf(c)!=="string";h<c.length;)y=S-h,b=T?(d=c[h++],u=h<S?c[h++]:0,h<S?c[h++]:0):(d=c.charCodeAt(h++),u=h<S?c.charCodeAt(h++):0,h<S?c.charCodeAt(h++):0),m=d>>2,p=(3&d)<<4|u>>4,g=1<y?(15&u)<<2|b>>6:64,_=2<y?63&b:64,f.push(s.charAt(m)+s.charAt(p)+s.charAt(g)+s.charAt(_));return f.join("")},o.decode=function(c){var d,u,b,m,p,g,_=0,f=0,h="data:";if(c.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var S,y=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===s.charAt(64)&&y--,c.charAt(c.length-2)===s.charAt(64)&&y--,y%1!=0)throw new Error("Invalid base64 input, bad content length.");for(S=l.uint8array?new Uint8Array(0|y):new Array(0|y);_<c.length;)d=s.indexOf(c.charAt(_++))<<2|(m=s.indexOf(c.charAt(_++)))>>4,u=(15&m)<<4|(p=s.indexOf(c.charAt(_++)))>>2,b=(3&p)<<6|(g=s.indexOf(c.charAt(_++))),S[f++]=d,p!==64&&(S[f++]=u),g!==64&&(S[f++]=b);return S}},{"./support":30,"./utils":32}],2:[function(n,i,o){var r=n("./external"),l=n("./stream/DataWorker"),s=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function d(u,b,m,p,g){this.compressedSize=u,this.uncompressedSize=b,this.crc32=m,this.compression=p,this.compressedContent=g}d.prototype={getContentWorker:function(){var u=new l(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),b=this;return u.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new l(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(u,b,m){return u.pipe(new s).pipe(new c("uncompressedSize")).pipe(b.compressWorker(m)).pipe(new c("compressedSize")).withStreamInfo("compression",b)},i.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,o){var r=n("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},o.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,o){var r=n("./utils"),l=(function(){for(var s,c=[],d=0;d<256;d++){s=d;for(var u=0;u<8;u++)s=1&s?3988292384^s>>>1:s>>>1;c[d]=s}return c})();i.exports=function(s,c){return s!==void 0&&s.length?r.getTypeOf(s)!=="string"?(function(d,u,b,m){var p=l,g=m+b;d^=-1;for(var _=m;_<g;_++)d=d>>>8^p[255&(d^u[_])];return-1^d})(0|c,s,s.length,0):(function(d,u,b,m){var p=l,g=m+b;d^=-1;for(var _=m;_<g;_++)d=d>>>8^p[255&(d^u.charCodeAt(_))];return-1^d})(0|c,s,s.length,0):0}},{"./utils":32}],5:[function(n,i,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(n,i,o){var r=null;r=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:r}},{lie:37}],7:[function(n,i,o){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=n("pako"),s=n("./utils"),c=n("./stream/GenericWorker"),d=r?"uint8array":"array";function u(b,m){c.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=m,this.meta={}}o.magic="\b\0",s.inherits(u,c),u.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(d,b.data),!1)},u.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var b=this;this._pako.onData=function(m){b.push({data:m,meta:b.meta})}},o.compressWorker=function(b){return new u("Deflate",b)},o.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,o){function r(p,g){var _,f="";for(_=0;_<g;_++)f+=String.fromCharCode(255&p),p>>>=8;return f}function l(p,g,_,f,h,S){var y,T,O=p.file,D=p.compression,I=S!==d.utf8encode,C=s.transformTo("string",S(O.name)),A=s.transformTo("string",d.utf8encode(O.name)),w=O.comment,X=s.transformTo("string",S(w)),R=s.transformTo("string",d.utf8encode(w)),Y=A.length!==O.name.length,N=R.length!==w.length,V="",le="",Q="",fe=O.dir,K=O.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};g&&!_||(ee.crc32=p.crc32,ee.compressedSize=p.compressedSize,ee.uncompressedSize=p.uncompressedSize);var G=0;g&&(G|=8),I||!Y&&!N||(G|=2048);var P=0,pe=0;fe&&(P|=16),h==="UNIX"?(pe=798,P|=(function(B,de){var ne=B;return B||(ne=de?16893:33204),(65535&ne)<<16})(O.unixPermissions,fe)):(pe=20,P|=(function(B){return 63&(B||0)})(O.dosPermissions)),y=K.getUTCHours(),y<<=6,y|=K.getUTCMinutes(),y<<=5,y|=K.getUTCSeconds()/2,T=K.getUTCFullYear()-1980,T<<=4,T|=K.getUTCMonth()+1,T<<=5,T|=K.getUTCDate(),Y&&(le=r(1,1)+r(u(C),4)+A,V+="up"+r(le.length,2)+le),N&&(Q=r(1,1)+r(u(X),4)+R,V+="uc"+r(Q.length,2)+Q);var U="";return U+=`
|