@bimdata/viewer 2.2.0-beta.3 → 2.2.0-beta.5

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.
@@ -1862,7 +1862,7 @@ end`};e.events.push(["putFont",function(n){(function(s){var a=s.font,l=s.out,c=s
1862
1862
  --bimdata-local-context-width: ${o.width}px;
1863
1863
  --bimdata-local-context-center-width: ${o.centerWidth}px;
1864
1864
  --bimdata-local-context-resolution: ${o.resolution};
1865
- `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[O(s,{ref:"modalManagerTemplateRef"},null,512),m("div",c8i,[o.windowPlugins.leftSidePanel?(D(),se(a,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):ve("",!0),m("div",u8i,[(D(!0),Y(Mt,null,ei(o.windowPlugins.free,h=>(D(),se(l,{key:h.name,style:{height:"100%"},plugin:h},null,8,["plugin"]))),128)),O(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),O(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(D(),se(a,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):ve("",!0)]),o.loading?(D(),Y("div",d8i,[o.spinner&&o.spinner.component?(D(),se(Ls(o.spinner.component),Pf(Ka({key:0},o.spinner.props)),null,16)):(D(),se(u,{key:1,size:"20px",border:"3px"}))])):ve("",!0),o.layoutSettingsDisplayed?(D(),Y("div",h8i,[O(d)])):ve("",!0)],36)}const p8i=K(l8i,[["render",A8i]]);class g8i{constructor(e=!0){const i=t9i(wQ,null,{resizable:e});i.registerContent("default",p8i),this.settings=Tl({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?i9i(e):null}copy(e){return o9i(this.areas.layout,e)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:s=null}={}){const a=r?{options:{windowName:r,windowState:n}}:null;return s===null?this.areas.splitLayout(e,i,o,a):this.areas.split(s,e,i,o,a)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}}const M8i="@bimdata/viewer",f8i="module",w8i="2.2.0-beta.3",L8i="A customizable BIM viewer.",m8i=["bim","viewer","bimdata","ifc","bcf"],y8i="./index.d.ts",v8i="BIMData.io",C8i="https://developers.bimdata.io/viewer/index.html",I8i={email:"support@bimdata.io"},j8i=["last 2 chrome version","last 2 firefox version"],b8i="dist/bimdata-viewer.esm.min.js",x8i="dist/bimdata-viewer.esm.min.js",N8i={build:"vite build && esbuild dist/bimdata-viewer.esm.min.js --minify --outfile=dist/bimdata-viewer.esm.min.js --allow-overwrite","build:split":"vite build -c vite.config.split.js && esbuild dist/bimdata-viewer-split.esm.min.js --minify --outfile=dist/bimdata-viewer-split.esm.min.js --allow-overwrite","cy:run":"cypress run","cy:open":"cypress open",dev:"vite",prebuild:"rm -rf dist",prepublishOnly:"npm run build","semantic-release":"semantic-release",serve:"http-server -c-1 --silent",test:"npm run test:unit & npm run build & npm run test:e2e","test:unit":"jest","test:e2e":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:run","test:e2e-dev":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:open",version:"echo $npm_package_version",ts:"tsc"},D8i=["dist/*","types/*","CHANGELOG.md","README.md","package.json","package-lock.json","index.d.ts"],S8i={"@babel/preset-env":"^7.24.3","@bimdata/2d-engine":"2.4.0","@bimdata/areas-next":"0.1.15","@bimdata/bcf-components":"6.2.1","@bimdata/building-maker":"3.0.3","@bimdata/components":"1.3.3","@bimdata/design-system":"2.1.0-rc.14","@bimdata/typescript-fetch-api-client":"10.1.0","@rollup/plugin-alias":"5.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-image":"^3.0.3","@rollup/plugin-replace":"^5.0.5","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^12.0.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^10.0.2","@semantic-release/npm":"^12.0.0","@semantic-release/release-notes-generator":"^13.0.0","@vitejs/plugin-vue":"4.6.2","@vue/vue3-jest":"29.2.6","@xeokit/xeokit-sdk":"git+https://git@github.com/Amoki/xeokit-sdk.git#369bb4876e529995cd4c192bc7fda5e957f9634f","@zip.js/zip.js":"^2.7.40",async:"^3.2.5",autoprefixer:"^10.4.19","babel-core":"^7.0.0-bridge.0","babel-jest":"^29.7.0","conventional-changelog-eslint":"^5.0.0",cypress:"13.7.1",esbuild:"^0.20.2",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-cypress":"^2.15.1","eslint-plugin-jest":"^27.9.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-vue":"^9.24.0","form-data":"^4.0.0",html2canvas:"1.4.1","http-server":"^14.1.1",jest:"^29.7.0","jest-environment-jsdom":"^29.7.0","jest-extended":"^4.0.2",jspdf:"^2.5.1",lodash:"^4.17.21","node-fetch":"^3.3.2",postcss:"^8.4.38",prettier:"^3.2.5",querystring:"^0.2.0",sass:"^1.72.0","semantic-release":"^23.0.6",sinon:"^17.0.1","start-server-and-test":"2.0.3",vite:"4.5.2","vite-plugin-css-injected-by-js":"3.5.0",vue:"3.4.21","vue-eslint-parser":"^9.4.2","vue-i18n":"^9.10.2"},T8i={name:M8i,type:f8i,version:w8i,description:L8i,keywords:m8i,types:y8i,author:v8i,homepage:C8i,bugs:I8i,browserslist:j8i,main:b8i,module:x8i,scripts:N8i,files:D8i,devDependencies:S8i};class k8i{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.pluginManager=new e2i(e),this.windowManager=new i2i,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new sDi(i),this.globalContext=new y2e(this),this.state=LDi(this),this.shortcutManager=Nge(this.state),this.uiSettings=o||{},this.i18n=new L2e(r),this._contextMenu=null,this.layout=new g8i(this.uiSettings.resizable!==!1),this.localContext=null,window.$viewer=this}get version(){return T8i.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||bge}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function E8i(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const z8i=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),WM=Object.freeze({READ:"read",WRITE:"write"});function xde(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const P8i={token_scopes:[],usable_scopes:[],user_role:25};function Nde(t=P8i){var e,i,o,r,n,s;const a=xde(t.token_scopes),l=xde(t.usable_scopes);return{...VZ(t),tokenScopes:a,usableScopes:l,userRole:z8i[t.user_role],user:t.user?VZ(t.user):null,hasBcfReadPermission:((e=l.bcf)==null?void 0:e.includes(WM.READ))??!1,hasBcfWritePermission:((i=l.bcf)==null?void 0:i.includes(WM.WRITE))??!1,hasModelReadPermission:((o=l.model)==null?void 0:o.includes(WM.READ))??!1,hasModelWritePermission:((r=l.model)==null?void 0:r.includes(WM.WRITE))??!1,hasDocReadPermission:((n=l.document)==null?void 0:n.includes(WM.READ))??!1,hasDocWritePermission:((s=l.document)==null?void 0:s.includes(WM.WRITE))??!1}}const B8i={BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{goBackButton:"Zur\xFCck",title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t:",noPriority:"Keine",assignedTo:"Zugewiesen an :",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},O8i={BcfComponents:B8i},R8i={BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{goBackButton:"Back",title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority: ",noPriority:"None",assignedTo:"Assigned to: ",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},U8i={BcfComponents:R8i},Y8i={BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{goBackButton:"Volver",title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad :",noPriority:"Sin",assignedTo:"Asignado a :",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},F8i={BcfComponents:Y8i},Q8i={BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{goBackButton:"Retour",title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9 : ",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0 : ",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},G8i={BcfComponents:Q8i},H8i={BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{goBackButton:"Indietro",title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0:",noPriority:"Nessuno",assignedTo:"Assegnato a:",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},V8i={BcfComponents:H8i},Z8i={de:O8i,en:U8i,es:F8i,fr:G8i,it:V8i},J8i=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Ro.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(Z8i).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(H5e).forEach(([r,n])=>{o.component(r,n)})}}),W8i={props:{header:{type:Boolean,default:!1},pdf:{type:[Object,File]}},setup(t){const e=Xe(!1),i=Xe(null);return ai(()=>t.pdf,async o=>{if(e.value=!0,o.file)try{const r=await fetch(o.file).then(n=>n.blob());i.value=URL.createObjectURL(r)}catch(r){console.err("[BIMDataPDFViewer] Error fetching the pdf file.",r)}else i.value=URL.createObjectURL(o);e.value=!1},{immediate:!0}),{loading:e,pdfUrl:i}}},K8i={class:"pdf-viewer"},q8i={key:0,class:"pdf-viewer__header"},X8i={class:"pdf-viewer__header--left"},_8i={class:"pdf-viewer__header--title"},$8i={class:"pdf-viewer__header--right"},e6i=["data"];function t6i(t,e,i,o,r,n){const s=z("BIMDataLoading"),a=z("BIMDataTextbox");return D(),Y("div",K8i,[o.loading?(D(),se(s,{key:0})):(D(),Y(Mt,{key:1},[i.header?(D(),Y("div",q8i,[m("div",X8i,[jt(t.$slots,"header-left",{},void 0,!0)]),m("div",_8i,[O(a,{text:i.pdf.name},null,8,["text"])]),m("div",$8i,[jt(t.$slots,"header-right",{},void 0,!0)])])):ve("",!0),o.pdfUrl?(D(),Y("object",{key:1,width:"100%",height:"100%",type:"application/pdf",data:o.pdfUrl},null,8,e6i)):ve("",!0)],64))])}const Dde=K(W8i,[["render",t6i],["__scopeId","data-v-edf51369"]]),i6i={props:{color:{type:String,default:"currentColor"},progress:{type:Number,default:0,validator(t){return t>=0&&t<=100}}},data(){return{width:22,strokeWidth:3}},computed:{dashoffset(){return 63-this.progress/100*63}}},o6i={class:"bimdata-pie-progress-spinner"},r6i=["viewBox","width","height"],s6i=["cx","cy","r","stroke-width"],n6i=["cx","cy","r","stroke","stroke-width"];function a6i(t,e,i,o,r,n){return D(),Y("div",o6i,[(D(),Y("svg",{viewBox:`0 0 ${r.width} ${r.width}`,xmlns:"http://www.w3.org/2000/svg",fill:"transparent",width:r.width,height:r.width,style:{transform:"rotate(-90deg)"}},[m("circle",{class:"bimdata-pie-progress-spinner__path--back",cx:r.width/2,cy:r.width/2,r:(r.width-r.strokeWidth)/2,stroke:"lightgray","stroke-width":r.strokeWidth},null,8,s6i),m("circle",{class:"bimdata-pie-progress-spinner__path",cx:r.width/2,cy:r.width/2,r:(r.width-r.strokeWidth)/2,stroke:i.color,"stroke-width":r.strokeWidth,style:Ie(`--dashoffset: ${n.dashoffset};`)},null,12,n6i)],8,r6i))])}const l6i=K(i6i,[["render",a6i],["__scopeId","data-v-71eb6ae9"]]),c6i={props:{text:{type:String}}},u6i={class:"multi-line-textbox-tooltip"},d6i={class:"multi-line-textbox-tooltip__content"};function h6i(t,e,i,o,r,n){return D(),Y("div",u6i,[m("div",d6i,re(i.text),1)])}const A6i=K(c6i,[["render",h6i],["__scopeId","data-v-9e9877bb"]]),p6i={components:{Tooltip:A6i},props:{text:{type:String,default:""},lines:{type:Number,default:3},lineHeight:{type:Number,default:14}},data(){return{needEllipsis:!1,hover:!1}},computed:{style(){return{"--textbox-line-height":`${this.lineHeight}px`,"--textbox-lines":this.lines}},tooltipDisplayed(){return this.needEllipsis&&this.hover}},mounted(){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.$el)},destroyed(){this.resizeObserver&&this.resizeObserver.disconnect()},methods:{onResize(){if(!this.$refs.ghost)return;const t=this.lines*this.lineHeight,{height:e}=this.$refs.ghost.getBoundingClientRect();this.needEllipsis=e>t}}},g6i=t=>(rr("data-v-134a4e01"),t=t(),sr(),t),M6i={class:"multi-line-text-box__content"},f6i={class:"multi-line-text-box__content__head"},w6i={class:"multi-line-text-box__content__tail__text"},L6i=g6i(()=>m("div",{class:"multi-line-text-box__content__tail__ellipsis"},"...",-1)),m6i={key:1,class:"multi-line-text-box__content__full"};function y6i(t,e,i,o,r,n){const s=z("Tooltip");return D(),Y("div",{class:"multi-line-text-box",style:Ie(n.style),onMouseover:e[1]||(e[1]=a=>r.hover=!0),onMouseleave:e[2]||(e[2]=a=>r.hover=!1)},[m("div",M6i,[r.needEllipsis?(D(),Y(Mt,{key:0},[m("div",f6i,[m("span",null,re(i.text),1)]),m("div",{class:"multi-line-text-box__content__tail",style:Ie(`height:${i.lineHeight*(i.lines-1)}px`)},[m("div",w6i,[m("span",null,re(i.text),1)]),L6i],4)],64)):(D(),Y("span",m6i,re(i.text),1)),m("span",{class:"multi-line-text-box__ghost",ref:"ghost"},re(i.text),513)]),n.tooltipDisplayed?(D(),se(s,{key:0,onClick:e[0]||(e[0]=bt(()=>{},["stop"])),text:i.text,class:"multi-line-text-box__tooltip"},null,8,["text"])):ve("",!0)],36)}const v6i=K(p6i,[["render",y6i],["__scopeId","data-v-134a4e01"]]),C6i={components:{PieProgressSpinner:l6i,MultiLineTextBox:v6i},inject:["$translate"],props:{disabled:{type:Boolean,default:!1},writeAccess:{type:Boolean,default:!1},width:{type:String,default:"140px"},file:{type:Object,required:!0},projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiUrl:{type:String,required:!0},accessToken:{type:String,required:!0},select:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},multi:{type:Boolean,default:!1},success:{type:Boolean,default:!1},viewPdf:{type:Boolean,default:!1},pdfModelLoading:{type:Boolean,default:!1},pdfPage:{type:Object,default:null}},emits:["rename","download","edit","view","open-folder","toggle-select","loaded","load-error"],data(){return{menuDisplayed:!1,percentCompleted:0}},computed:{multiSelect(){return this.select&&this.multi},edit(){return!this.loading&&!this.select},isFolder(){return this.file.nature==="Folder"},loading(){return this.file.fileToLoad},initials(){return this.file.created_by&&`${this.file.created_by.firstname[0]||""}${this.file.created_by.lastname[0]||""}`.toUpperCase()}},async created(){if(document.addEventListener("keydown",this.onKeyDown),this.file.fileToLoad){const t=new FormData;t.append("file",this.file.fileToLoad),t.append("name",this.file.fileToLoad.name),t.append("parent_id",this.file.folder.id);const e=new XMLHttpRequest;e.open("POST",`${this.apiUrl}/cloud/${this.spaceId}/project/${this.projectId}/document`),e.setRequestHeader("authorization",`Bearer ${this.accessToken}`),e.addEventListener("progress",i=>{this.percentCompleted=i.loaded/i.total*100}),e.addEventListener("load",()=>{if(e.status===201){const i=JSON.parse(e.response);i.updated_at=new Date(i.updated_at),this.$emit("loaded",i)}else this.$emit("load-error",e.statusText)}),e.send(t)}},destroyed(){document.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown(t){t.key==="Escape"&&(this.menuDisplayed=!1)},onRenameClick(){this.menuDisplayed=!1,this.$emit("rename")},onDownloadClick(){this.menuDisplayed=!1,this.$emit("download")},onDeleteClick(){this.menuDisplayed=!1,this.$emit("delete")},onViewClick(){this.menuDisplayed=!1,this.$emit("view")},onClick(){this.isFolder?this.$emit("open-folder"):!this.success&&!this.disabled&&!this.loading&&this.select&&this.$emit("toggle-select",this.file)},toggleMenu(){this.menuDisplayed=!this.menuDisplayed},away(){setTimeout(()=>{this.menuDisplayed=!1})}}},I6i={class:"file-card__content__header"},j6i={class:"file-card__content__header__btn-menu"},b6i={key:3,class:"selection-box"},x6i={key:2,class:"selection-text"},N6i={key:0,class:"file-card__content__menu"},D6i={class:"file-card__content__footer"},S6i={class:"file-card__content__footer__date"},T6i={key:0,class:"file-card__content__footer__initials"};function k6i(t,e,i,o,r,n){const s=z("BIMDataIconSuccess"),a=z("PieProgressSpinner"),l=z("BIMDataIconEllipsis"),c=z("BIMDataButton"),u=z("BIMDataSpinner"),d=z("BIMDataCheckbox"),h=z("BIMDataRadio"),A=z("BIMDataIconFolder"),g=z("BIMDataFileIcon"),p=z("MultiLineTextBox"),M=Vi("click-away");return D(),Y("div",{class:"file-card",onClick:e[0]||(e[0]=(...f)=>n.onClick&&n.onClick(...f))},[m("div",{class:be(["file-card__content",{"file-card__content--selected":i.selected,"file-card__content--disabled":i.disabled,"file-card__content--hover":i.select&&!i.success&&!i.disabled||n.isFolder}])},[m("div",I6i,[m("div",j6i,[i.success?(D(),se(s,{key:0,size:"s",fill:"",color:"success",class:"file-card__content__header__btn-menu__success"})):n.loading&&!i.success?(D(),se(a,{key:1,progress:r.percentCompleted,class:"file-card__content__header__btn-menu__spinner"},null,8,["progress"])):n.edit?(D(),se(c,{key:2,ghost:"",rounded:"",icon:"",onClick:bt(n.toggleMenu,["stop"]),class:"file-card__content__header__btn-menu__edit",disabled:i.success},{default:W(()=>[O(l,{size:"l",fill:"",color:"granite-light"})]),_:1},8,["onClick","disabled"])):n.isFolder?ve("",!0):(D(),Y("div",b6i,[i.pdfModelLoading?(D(),se(u,{key:0,style:{margin:"6px"}})):(D(),Y(Mt,{key:1},[n.multiSelect?(D(),se(d,{key:0,disabled:i.disabled,modelValue:i.selected,class:"file-card__content__header__btn-menu__checkbox"},null,8,["disabled","modelValue"])):(D(),se(h,{key:1,disabled:i.disabled,big:"",modelValue:i.selected,name:"BIMDataFileCardRadio"},null,8,["disabled","modelValue"]))],64)),i.pdfPage?(D(),Y("div",x6i,re(`page ${i.pdfPage.page_number}`),1)):ve("",!0)]))]),i.file.nature==="Folder"?(D(),se(A,{key:0,size:"xl",fill:"",color:"primary"})):(D(),se(g,{key:1,fileName:i.file.file_name,size:25},null,8,["fileName"]))]),r.menuDisplayed?St((D(),Y("div",N6i,[i.viewPdf&&i.file.model_type==="PDF"?(D(),se(c,{key:0,color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onViewClick,["stop"])},{default:W(()=>[At(re(n.$translate("view")),1)]),_:1},8,["onClick"])):ve("",!0),O(c,{color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onRenameClick,["stop"])},{default:W(()=>[At(re(n.$translate("rename")),1)]),_:1},8,["onClick"]),O(c,{color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onDownloadClick,["stop"])},{default:W(()=>[At(re(n.$translate("download")),1)]),_:1},8,["onClick"]),i.writeAccess?(D(),se(c,{key:1,color:"high",ghost:"",radius:"",width:"100%",onClick:bt(n.onDeleteClick,["stop"])},{default:W(()=>[At(re(n.$translate("delete")),1)]),_:1},8,["onClick"])):ve("",!0)])),[[M,n.away]]):ve("",!0),m("div",D6i,[O(p,{class:"file-card__content__footer__name",text:i.file.name},null,8,["text"]),m("div",S6i,re(i.file.updated_at.toLocaleDateString()),1),n.initials?(D(),Y("div",T6i,re(n.initials),1)):ve("",!0)])],2)])}const E6i=K(C6i,[["render",k6i],["__scopeId","data-v-cf500c59"]]),z6i={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},folder:{type:Object,required:!0}},data(){return{name:"",hasError:!1,loading:!1}},created(){document.addEventListener("keydown",this.onKeyDown)},mounted(){this.timeoutId=setTimeout(()=>this.$refs.nameInput.focus(),200)},destroyed(){document.removeEventListener("keydown",this.onKeyDown),clearTimeout(this.timeoutId)},methods:{onKeyDown(t){t.key==="Enter"&&this.submit()},reset(){this.name="",this.hasError=!1},close(){this.reset(),this.$emit("close")},async submit(){if(this.name){this.loading=!0;try{const t={parent_id:this.folder.id,name:this.name},e=await this.apiClient.collaborationApi.createFolder(this.spaceId,this.projectId,t);this.$emit("success",e)}catch(t){this.$emit("error",t)}finally{this.reset(),this.loading=!1}}else this.$refs.nameInput.focus(),this.hasError=!0}}},P6i={class:"folder-creation-form"},B6i={class:"folder-creation-form__title"};function O6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFolder"),a=z("BIMDataInput"),l=z("BIMDataButton");return D(),Y("div",P6i,[m("div",B6i,[O(s,{size:"xs"}),m("span",null,re(n.$translate("creationFormTitle")),1)]),O(a,{ref:"nameInput",class:"folder-creation-form__input",placeholder:n.$translate("nameInputPlaceholder"),modelValue:r.name,"onUpdate:modelValue":e[0]||(e[0]=c=>r.name=c),error:r.hasError,errorMessage:n.$translate("nameInputErrorMessage"),onKeyup:[ri(bt(n.close,["stop"]),["esc"]),ri(bt(n.submit,["stop"]),["enter"])],margin:"24px 0px",loading:r.loading},null,8,["placeholder","modelValue","error","errorMessage","onKeyup","loading"]),O(l,{class:"folder-creation-form__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"])},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick"]),O(l,{class:"folder-creation-form__btn-submit",width:"80px",color:"primary",fill:"",radius:"",onClick:bt(n.submit,["stop"])},{default:W(()=>[At(re(n.$translate("submit")),1)]),_:1},8,["onClick"])])}const R6i=K(z6i,[["render",O6i],["__scopeId","data-v-6a3749ed"]]),U6i={components:{NewFolderForm:R6i},inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},height:{type:String,default:"32px"},folder:{type:Object},disabled:{type:Boolean,default:!1}},data(){return{showCreationForm:!1}},created(){document.addEventListener("keydown",this.onKeyDown)},destroyed(){document.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown(t){t.key==="Escape"&&this.close()},toggle(){this.showCreationForm=!this.showCreationForm},close(){this.showCreationForm=!1}}},Y6i={class:"folder-creation-button"};function F6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFolder"),a=z("BIMDataButton"),l=z("NewFolderForm"),c=Vi("click-away");return St((D(),Y("div",Y6i,[O(a,{width:"100%",height:i.height,color:"primary",fill:"",radius:"",disabled:i.disabled,onClick:n.toggle},{default:W(()=>[O(s,{size:"xs",margin:"0 6px 0 0"}),m("span",null,re(n.$translate("buttonText")),1)]),_:1},8,["height","disabled","onClick"]),O(oo,{name:"fade"},{default:W(()=>[r.showCreationForm?(D(),se(l,{key:0,class:"folder-creation-button__form",projectId:i.projectId,spaceId:i.spaceId,apiClient:i.apiClient,folder:i.folder,onClick:e[0]||(e[0]=bt(()=>{},["stop"])),onClose:n.close,onSuccess:e[1]||(e[1]=u=>{n.close(),t.$emit("success",u)}),onError:e[2]||(e[2]=u=>t.$emit("error",u))},null,8,["projectId","spaceId","apiClient","folder","onClose"])):ve("",!0)]),_:1})])),[[c,n.close]])}const Q6i=K(U6i,[["render",F6i],["__scopeId","data-v-302c3ec1"]]),G6i={inject:["$translate"],props:{width:{type:String,default:"32px"},height:{type:String,default:"32px"},multiple:{type:Boolean,default:!1},accept:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},methods:{selectFile(){this.$refs.fileInput.click()},uploadFile(t){const e=Array.from(t.target.files);e.length>0&&(this.$refs.fileInput.value="",this.$emit("upload",e))}}},H6i=["multiple","accept"];function V6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFile"),a=z("BIMDataButton");return D(),se(a,{class:"file-upload-button",width:i.width,height:i.height,color:"primary",fill:"",radius:"",disabled:i.disabled,onClick:n.selectFile},{default:W(()=>[jt(t.$slots,"default",{},()=>[O(s,{size:"xs",margin:"0 6px 0 0"}),m("span",null,re(n.$translate("addFileButtonText")),1)]),m("input",{hidden:"",ref:"fileInput",type:"file",multiple:i.multiple,accept:i.accept.join(","),onChange:e[0]||(e[0]=(...l)=>n.uploadFile&&n.uploadFile(...l))},null,40,H6i)]),_:3},8,["width","height","disabled","onClick"])}const Z6i=K(G6i,[["render",V6i]]),J6i={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},entity:{type:Object}},data(){return{name:"",hasError:!1,loading:!1}},mounted(){this.name=this.entity.name,setTimeout(()=>this.$refs.nameInput.focus(),200)},methods:{reset(){this.name="",this.hasError=!1},close(){this.reset(),this.$emit("close")},async submit(){if(this.name){this.loading=!0;try{await this.renameDocument(),this.entity.name=this.name,this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.reset(),this.loading=!1}}else this.$refs.nameInput.focus(),this.hasError=!0},renameDocument(){const t=[this.spaceId,this.entity.id,this.projectId,{name:this.name}];return this.entity.nature==="Folder"?this.apiClient.collaborationApi.updateFolder(...t):this.apiClient.collaborationApi.updateDocument(...t)}}},W6i={class:"rename-modal"},K6i={class:"rename-modal__content"},q6i={class:"rename-modal__content__title"},X6i={class:"rename-modal__content__btn"};function _6i(t,e,i,o,r,n){const s=z("BIMDataIconClose"),a=z("BIMDataButton"),l=z("BIMDataInput"),c=Vi("click-away");return St((D(),Y("div",W6i,[O(a,{class:"rename-modal__close",color:"default",icon:"",radius:"",ghost:"",width:"21px",height:"21px",onClick:n.close},{default:W(()=>[O(s)]),_:1},8,["onClick"]),m("div",K6i,[m("div",q6i,re(n.$translate("rename")),1),O(l,{ref:"nameInput",class:"rename-modal__content__input",placeholder:n.$translate("renameFormPlaceholder"),modelValue:r.name,"onUpdate:modelValue":e[0]||(e[0]=u=>r.name=u),error:r.hasError,errorMessage:n.$translate("nameInputErrorMessage"),onKeyup:[ri(bt(n.close,["stop"]),["esc"]),ri(bt(n.submit,["stop"]),["enter"])],margin:"30px 0px",loading:r.loading},null,8,["placeholder","modelValue","error","errorMessage","onKeyup","loading"]),m("div",X6i,[O(a,{class:"rename-modal__content__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"])},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick"]),O(a,{class:"rename-modal__content__btn-submit",width:"80px",color:"primary",fill:"",radius:"",onClick:bt(n.submit,["stop"])},{default:W(()=>[At(re(n.$translate("submit")),1)]),_:1},8,["onClick"])])])])),[[c,n.close]])}const $6i=K(J6i,[["render",_6i],["__scopeId","data-v-47dc7eb4"]]);function Sde(t){return[t,...Tde(t)]}function Tde(t){return t.children&&t.children.length>0?[...t.children,...t.children.flatMap(e=>Tde(e))]:[]}const eSi={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},entity:{type:Object}},data(){return{loading:!1}},computed:{flattenTree(){return Sde(this.entity)}},methods:{close(){this.loading||this.$emit("close")},async submit(){this.loading=!0;try{await this.deleteEntity(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.loading=!1}},deleteEntity(){const t=[this.spaceId,this.entity.id,this.projectId];return this.entity.nature==="Folder"?this.apiClient.collaborationApi.deleteFolder(...t):this.apiClient.collaborationApi.deleteDocument(...t)}}},tSi={class:"delete-modal"},iSi={class:"delete-modal__content"},oSi={class:"delete-modal__content__title"},rSi={class:"delete-modal__content__detail"},sSi={class:"delete-modal__content__btn"},nSi={key:1};function aSi(t,e,i,o,r,n){const s=z("BIMDataIconClose"),a=z("BIMDataButton"),l=z("BIMDataSpinner"),c=Vi("click-away");return St((D(),Y("div",tSi,[O(a,{class:"delete-modal__close",color:"default",icon:"",radius:"",ghost:"",width:"21px",height:"21px",onClick:n.close,disabled:r.loading},{default:W(()=>[O(s)]),_:1},8,["onClick","disabled"]),m("div",iSi,[m("div",oSi,re(n.$translate("deleteTitle")),1),m("div",rSi,re(n.$translate("deleteDetail"))+" : ",1),m("ul",null,[(D(!0),Y(Mt,null,ei(n.flattenTree,u=>(D(),Y("li",{key:u.id},' - "'+re(u.name)+'" ',1))),128))]),m("div",sSi,[O(a,{class:"delete-modal__content__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"]),disabled:r.loading},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick","disabled"]),O(a,{class:"delete-modal__content__btn-submit",width:"80px",color:"high",fill:"",radius:"",onClick:bt(n.submit,["stop"]),disabled:r.loading},{default:W(()=>[r.loading?(D(),se(l,{key:0})):(D(),Y("span",nSi,re(n.$translate("delete")),1))]),_:1},8,["onClick","disabled"])])])])),[[c,n.close]])}const lSi=K(eSi,[["render",aSi],["__scopeId","data-v-26cd84eb"]]),cSi={inject:["$translate"],props:{model:{type:Object,required:!0},modelSelectedPage:{type:Object,default:null}},emits:["select","close"],setup(t,e){const i=vt(()=>[t.model].concat(t.model.children??[])),o=Xe(null);return ai(()=>t.modelSelectedPage,r=>{r&&(o.value=r)},{immediate:!0}),{pages:i,selectedPage:o}}},uSi={class:"pdf-page-selector"},dSi={class:"head"},hSi={style:{"margin-left":"6px"}},ASi={class:"title"},pSi={class:"body"},gSi=["onClick"],MSi={class:"pdf-page__img"},fSi=["src","alt"],wSi={class:"pdf-page__num"},LSi={class:"foot"};function mSi(t,e,i,o,r,n){const s=z("BIMDataIconArrow"),a=z("BIMDataButton"),l=z("BIMDataIconFilePdfPolychrome"),c=z("BIMDataTextbox"),u=z("BIMDataIconClose"),d=z("BIMDataResponsiveGrid");return D(),Y("div",uSi,[m("div",dSi,[O(a,{ghost:"",radius:"",onClick:e[0]||(e[0]=h=>t.$emit("close"))},{default:W(()=>[O(s,{size:"xxs"}),m("span",hSi,re(n.$translate("back")),1)]),_:1}),m("span",ASi,[O(l,{size:"m",margin:"0 6px 0 0"}),O(c,{text:i.model.name},null,8,["text"])]),O(a,{ghost:"",rounded:"",icon:"",onClick:e[1]||(e[1]=h=>t.$emit("close"))},{default:W(()=>[O(u,{size:"xxs"})]),_:1})]),m("div",pSi,[O(d,{style:{width:"100%","justify-items":"center"},itemWidth:"157px",rowGap:"6px",columnGap:"6px"},{default:W(()=>[(D(!0),Y(Mt,null,ei(o.pages,h=>(D(),Y("div",{key:h.id,class:be(["pdf-page",{selected:o.selectedPage&&o.selectedPage.id===h.id}]),onClick:A=>o.selectedPage=o.selectedPage&&o.selectedPage.id===h.id?null:h},[m("div",MSi,[h.map_file?(D(),Y("img",{key:0,src:h.map_file,alt:`page ${h.page_number}`},null,8,fSi)):(D(),se(l,{key:1,size:"l"}))]),m("div",wSi,re(h.page_number),1)],10,gSi))),128))]),_:1})]),m("div",LSi,[O(a,{width:"100%",color:"primary",fill:"",radius:"",onClick:e[2]||(e[2]=h=>t.$emit("select",o.selectedPage))},{default:W(()=>[At(re(n.$translate("validate")),1)]),_:1})])])}const ySi=K(cSi,[["render",mSi],["__scopeId","data-v-22155996"]]),kde="Folder";function Ede(t){return new Promise(e=>setTimeout(e,t))}async function vSi({name:t,url:e}){const i=document.createElement("a");i.style.display="none",i.download=t,i.href=e,document.body.append(i),i.click(),await Ede(100),i.remove(),await Ede(500)}function CSi(t){const e=[],i=[];for(const o of t)o.nature===kde?e.push(o):i.push(o);return{folders:e,documents:i}}function ISi(t,e){const{projectId:i,spaceId:o,accessToken:r,apiUrl:n="https://api.bimdata.io"}=e,s=jSi(n),{folders:a,documents:l}=CSi(t);let c="";return(a.length>0||l.length>0)&&(c+=`${s}/cloud/${o}/project/${i}?`,c+=`accessToken=${r}&`,c+=a.map(u=>`folderId[]=${u.id}`).join("&"),c+=a.length>0&&l.length>0?"&":"",c+=l.map(u=>`documentId[]=${u.id}`).join("&")),c}function jSi(t){const e=new URL(t),i=e.hostname;let o="";const[r,...n]=i.split("."),s=n.join(".");return r.includes("-staging")?o="-staging":r.includes("-next")&&(o="-next"),e.protocol+"//archive"+o+"."+s}async function bSi(t,e={}){try{if(t.length===0)return;let i=null;const o=t[0].name;return t.length===1&&t[0].nature!==kde?i=t[0].file:i=ISi(t,e),await vSi({name:o,url:i})}catch(i){throw new Error(i)}}const xSi={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",cancel:"Cancel",submit:"Submit",buttonText:"New folder",addFileButtonText:"Upload a file",rename:"Rename",view:"View",download:"Download",delete:"Delete",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",validate:"Validate",back:"Back",pdfPageSelectorTitle:"Select a page"},NSi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",cancel:"Annuler",submit:"Valider",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",rename:"Renommer",view:"Voir",download:"T\xE9l\xE9charger",delete:"Supprimer",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",validate:"Valider",back:"Retour",pdfPageSelectorTitle:"S\xE9lectionner une page"},DSi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},SSi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},TSi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},zde={en:xSi,fr:NSi,es:DSi,de:SSi,it:TSi},Pde=398,Bde=468,Ode=800,kSi=3e3,ESi={components:{FileCard:E6i,NewFolderButton:Q6i,UploadFileButton:Z6i,RenameModal:$6i,DeleteModal:lSi,BIMDataPDFViewer:Dde,PdfPageSelector:ySi},provide(){return{$translate:this.translate}},props:{locale:{type:String,default:"en"},apiUrl:{type:String,default:"https://api.bimdata.io"},spaceId:{type:Number,required:!0},projectId:{type:Number,required:!0},accessToken:{type:String,required:!0},select:{type:Boolean,default:!1},multi:{type:Boolean,default:!1},searchColor:{type:String,default:"primary"},headerButtons:{type:Boolean,default:!0},headerSearch:{type:Boolean,default:!0},alreadySelectedIds:{type:Array,defaut:()=>[]},selectableFileTypes:{type:Array,default:()=>[]},viewPdf:{type:Boolean,default:!1},pdfPageSelect:{type:Boolean,default:!1}},data(){return{currentFolder:null,loadingFiles:[],searchText:"",selectedFiles:[],apiClient:null,fileStructure:null,width:0,entityRenown:!1,entityDeletable:!1,successFileIds:[],pdfToView:null,pdfModel:null,pdfModelSelectedPage:null,pdfModelLoading:null,pdfPageSelectorDisplayed:!1}},computed:{modalDisplayed(){return this.entityRenown||this.entityDeletable},navigationShown(){return this.currentFolder!==this.fileStructure},itemWidth(){return this.xsLayout?"100%":this.sLayout?"180px":"164px"},xsLayout(){return this.width<Pde},sLayout(){return this.width>=Pde&&this.width<Bde},mLayout(){return this.width>=Bde&&this.width<Ode},lLayout(){return this.width>=Ode},multiSelect(){return this.select&&this.multi},files(){let t=null;return this.searchText?t=(this.currentFolder&&this.currentFolder.children||[]).filter(e=>e.name.toLowerCase().includes(this.searchText)):t=this.currentFolder&&this.currentFolder.children||[],t.push(...this.loadingFiles.filter(e=>e.folder.id===this.currentFolder.id&&!t.find(i=>i.id===e.id))),t.sort((e,i)=>(e.name||"").localeCompare(i.name)),t.sort((e,i)=>{const o=e.nature==="Folder"?1:-1;return(i.nature==="Folder"?1:-1)-o}),t}},watch:{accessToken(t){this.apiClient.accessToken=t},multi(){this.selectedFiles=[],this.$emit("selection-change",this.selectedFiles)},select(){this.selectedFiles=[],this.$emit("selection-change",this.selectedFiles)}},mounted(){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.$el)},beforeDestroy(){this.resizeObserver&&this.resizeObserver.disconnect(),clearTimeout(this.timeoutId),document.removeEventListener("keydown",this.onKeyDown)},async created(){document.addEventListener("keydown",this.onKeyDown),this.loadingFileId=0;try{this.apiClient=Vj.makeBIMDataApiClient({apiUrl:this.apiUrl,accessToken:this.accessToken}),this.fileStructure=await this.apiClient.collaborationApi.getProjectDMSTree(this.spaceId,this.projectId)}catch(t){this.$emit("error",t)}this.currentFolder=this.fileStructure},methods:{isDisabled(t){var e;if(t.nature==="Folder")return!1;const i=(e=t.file_name)==null?void 0:e.match(/\.(\w+$)/),o=i&&i[1];return this.select&&this.selectableFileTypes.length>0&&!(o&&this.selectableFileTypes.includes(o))},onKeyDown(t){t.key==="Escape"&&(this.entityRenown=null,this.entityDeletable=null,this.$refs.search&&this.$refs.search.$refs.input===document.activeElement&&(this.searchText="",this.$refs.search.blur()))},translate(t){return(zde[this.locale]||zde.en)[t]},isFileSucess(t){return this.successFileIds.includes(t)||this.select&&this.alreadySelectedIds&&this.alreadySelectedIds.includes(t)},onFileLoaded(t,e){t.folder.children||this.$set(t.folder,"children",[]),t.folder.children=t.folder.children.filter(i=>i.id!==t.id),t.folder.children.push(e),this.loadingFiles=this.loadingFiles.filter(i=>i.id!==t.id),this.$emit("success",{type:"fileCreated",message:this.translate("newFileSuccess"),content:e}),this.successFileIds.push(e.id),this.timeoutId=setTimeout(()=>{this.successFileIds&&(this.successFileIds=this.successFileIds.filter(i=>i!==e.id))},kSi)},onDownload(t){try{bSi(Sde(t),{projectId:this.projectId,spaceId:this.spaceId,accessToken:this.accessToken,apiUrl:this.apiUrl})}catch(e){this.$emit("error",e)}},onDelete(t){this.entityDeletable=t},onDeleteSuccess(){const t=this.getParent(this.fileStructure,this.entityDeletable);t&&(t.children=t.children.filter(i=>i.id!==this.entityDeletable.id));const e=this.entityDeletable.nature==="Folder";this.$emit("success",{type:e?"folderDeleted":"fileDeleted",message:e?this.translate("deleteFolderSuccess"):this.translate("deleteFileSuccess"),content:this.entityDeletable}),this.entityDeletable=null},onRename(t){this.entityRenown=t},onRenameSuccess(){const t=this.entityRenown.nature==="Folder";this.$emit("success",{type:t?"folderRenamed":"fileRenamed",message:t?this.translate("renameFolderSuccess"):this.translate("renameFileSuccess"),content:this.entityRenown}),this.entityRenown=null},onView(t){this.pdfToView=t},onResize(t){t.forEach(e=>{this.width=e.target.clientWidth})},uploadFiles(t=[]){this.loadingFiles.push(...this.formatFiles(t))},formatFiles(t){return t.map(e=>({name:e.name,updated_at:new Date(e.lastModified),nature:"Document",id:`loadingfile-${this.loadingFileId++}`,fileToLoad:e,folder:this.currentFolder}))},onNewFolder(t){this.currentFolder.children||this.$set(this.currentFolder,"children",[]),this.currentFolder.children.push(t),this.$emit("success",{type:"folderCreated",message:this.translate("newFolderSuccess"),content:t})},async onToggleFileSelect(t){var e,i;let o=null;if(this.isFileSelected(t)){const r=this.selectedPdfPage(t);if(this.pdfPageSelect&&t.model_type==="PDF"&&r){this.selectedFiles=this.selectedFiles.filter(({document:s})=>s!==t),this.pdfModelLoading=t.id;const n=await this.apiClient.modelApi.getModel(this.spaceId,t.model_id,this.projectId);if(this.pdfModelLoading=null,((e=n.children)==null?void 0:e.length)>0&&(o=await this.openPdfPageSelector(n,r),!o))return;this.selectedFiles.push({document:t,pdfPage:o})}else this.selectedFiles=this.selectedFiles.filter(({document:n})=>n!==t)}else{if(this.multi||(this.selectedFiles=[]),this.pdfPageSelect&&t.model_type==="PDF"){this.pdfModelLoading=t.id;const r=await this.apiClient.modelApi.getModel(this.spaceId,t.model_id,this.projectId);if(this.pdfModelLoading=null,((i=r.children)==null?void 0:i.length)>0&&(o=await this.openPdfPageSelector(r),!o))return}this.selectedFiles.push({document:t,pdfPage:o})}this.$emit("selection-change",this.selectedFiles)},isFileSelected(t){return this.selectedFiles.some(({document:e})=>t===e)},async openPdfPageSelector(t,e){this.pdfModel=t,this.pdfModelSelectedPage=e,this.pdfPageSelectorDisplayed=!0;const i=await new Promise(o=>this.selectPdfPage=o);return this.pdfPageSelectorDisplayed=!1,this.pdfModelSelectedPage=null,this.pdfModel=null,i},selectedPdfPage(t){var e;return(e=this.selectedFiles.find(({document:i})=>t===i))==null?void 0:e.pdfPage},onBreadcrumClick(t){this.currentFolder=t},onBreadcrumBack(){const t=this.steps[this.steps.length-2];t&&(this.currentFolder=t)},openFolder(t){this.currentFolder=t},back(){const t=this.getParent(this.fileStructure,this.currentFolder);t?this.currentFolder=t:this.currentFolder=this.fileStructure},getParent(t,e){if(Array.isArray(t.children)){if(t.children.includes(e))return t;for(let i of t.children){const o=this.getParent(i,e);if(o)return o}}},getFolder(t,e=this.fileStructure){if(e.id===t)return e;for(let i of e.children||[]){const o=this.getFolder(t,i);if(o)return o}}}},zSi={class:"bimdata-file-manager"},PSi={class:"bimdata-file-manager__navigation"},BSi={key:0,class:"bimdata-file-manager__navigation__content"},OSi={key:1,class:"bimdata-file-manager__navigation__content--empty"},RSi={key:0,class:"bimdata-file-manager__container"},USi={key:1,class:"bimdata-file-manager__container--empty"},YSi={key:4,class:"bimdata-file-manager__pdf-page-selector"},FSi={key:5,class:"bimdata-file-manager__modal"};function QSi(t,e,i,o,r,n){const s=z("BIMDataIconArrow"),a=z("BIMDataButton"),l=z("BIMDataPDFViewer"),c=z("NewFolderButton"),u=z("UploadFileButton"),d=z("BIMDataSearch"),h=z("BIMDataTextbox"),A=z("FileCard"),g=z("BIMDataResponsiveGrid"),p=z("BIMDataIconFolderOpen"),M=z("BIMDataLoading"),f=z("PdfPageSelector"),w=z("RenameModal"),L=z("DeleteModal");return D(),Y("div",zSi,[r.pdfToView?(D(),se(l,{key:0,class:"bimdata-file-manager__pdf-viewer",pdf:r.pdfToView,header:""},{"header-left":W(()=>[O(a,{class:"m-l-12",width:"32px",height:"32px",color:"primary",ghost:"",radius:"",icon:"",onClick:e[0]||(e[0]=v=>r.pdfToView=null)},{default:W(()=>[O(s,{size:"xxs"})]),_:1})]),_:1},8,["pdf"])):ve("",!0),i.headerButtons||i.headerSearch?(D(),Y("div",{key:1,class:be(["bimdata-file-manager__header",{"bimdata-file-manager__header--xs":n.xsLayout,"bimdata-file-manager__header--s":n.sLayout,"bimdata-file-manager__header--m":n.mLayout,"bimdata-file-manager__header--l":n.lLayout}])},[i.headerButtons?(D(),Y(Mt,{key:0},[O(c,{disabled:!r.currentFolder||r.currentFolder.user_permission<100,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,folder:r.currentFolder,onSuccess:n.onNewFolder,onError:e[1]||(e[1]=v=>t.$emit("error",v))},null,8,["disabled","projectId","spaceId","apiClient","folder","onSuccess"]),O(u,{class:"bimdata-file-manager__header__upload",width:"25%",disabled:!r.currentFolder||r.currentFolder.user_permission<100,multiple:"",onUpload:n.uploadFiles},null,8,["disabled","onUpload"])],64)):ve("",!0),i.headerSearch?(D(),se(d,{key:1,color:i.searchColor,class:"bimdata-file-manager__search",width:"100%",placeholder:"Search",modelValue:r.searchText,"onUpdate:modelValue":e[2]||(e[2]=v=>r.searchText=v),ref:"search",clear:"",radius:""},null,8,["color","modelValue"])):ve("",!0)],2)):ve("",!0),m("div",PSi,[n.navigationShown?(D(),Y("div",BSi,[O(a,{ghost:"",radius:"",icon:"",onClick:n.back},{default:W(()=>[O(s,{size:"xxs"})]),_:1},8,["onClick"]),O(h,{text:r.currentFolder.name,cutPosition:"middle",tooltipPosition:"bottom",tooltipColor:"primary",width:"calc(100% - 45px)"},null,8,["text"])])):(D(),Y("div",OSi,re(n.translate("dmsRoot")),1))]),r.fileStructure?(D(),Y(Mt,{key:2},[n.files.length>0?(D(),Y("div",RSi,[O(g,{itemWidth:n.itemWidth,rowGap:"4px",columnGap:"6px"},{default:W(()=>[(D(!0),Y(Mt,null,ei(n.files,v=>(D(),se(A,{width:n.itemWidth,key:v.id,file:v,projectId:i.projectId,spaceId:i.spaceId,apiUrl:i.apiUrl,accessToken:i.accessToken,onOpenFolder:I=>n.openFolder(v),select:i.select,disabled:n.isDisabled(v),multi:i.multi,selected:n.isFileSelected(v),success:n.isFileSucess(v.id),onToggleSelect:I=>n.onToggleFileSelect(v),onRename:I=>n.onRename(v),onDelete:I=>n.onDelete(v),onView:I=>n.onView(v),onDownload:I=>n.onDownload(v),onLoaded:I=>n.onFileLoaded(v,I),writeAccess:r.currentFolder.user_permission>=100,viewPdf:i.viewPdf,pdfModelLoading:r.pdfModelLoading===v.id,pdfPage:n.selectedPdfPage(v)},null,8,["width","file","projectId","spaceId","apiUrl","accessToken","onOpenFolder","select","disabled","multi","selected","success","onToggleSelect","onRename","onDelete","onView","onDownload","onLoaded","writeAccess","viewPdf","pdfModelLoading","pdfPage"]))),128))]),_:1},8,["itemWidth"])])):(D(),Y("div",USi,[m("div",null,[O(p,{size:"xxxl",fill:"",color:"silver"}),m("span",null,re(n.translate("emptyFolder")),1)])]))],64)):(D(),se(M,{key:3})),r.pdfPageSelectorDisplayed?(D(),Y("div",YSi,[O(f,{model:r.pdfModel,modelSelectedPage:r.pdfModelSelectedPage,onSelect:t.selectPdfPage,onClose:t.selectPdfPage},null,8,["model","modelSelectedPage","onSelect","onClose"])])):ve("",!0),n.modalDisplayed?(D(),Y("div",FSi,[r.entityRenown?(D(),se(w,{key:0,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,entity:r.entityRenown,onClose:e[3]||(e[3]=v=>r.entityRenown=null),onSuccess:n.onRenameSuccess,onError:e[4]||(e[4]=v=>t.$emit("error",v))},null,8,["projectId","spaceId","apiClient","entity","onSuccess"])):r.entityDeletable?(D(),se(L,{key:1,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,entity:r.entityDeletable,onClose:e[5]||(e[5]=v=>r.entityDeletable=null),onSuccess:n.onDeleteSuccess,onError:e[6]||(e[6]=v=>t.$emit("error",v))},null,8,["projectId","spaceId","apiClient","entity","onSuccess"])):ve("",!0)])):ve("",!0)])}const GSi=K(ESi,[["render",QSi],["__scopeId","data-v-af1635b9"]]),T0=25;function Eb(t){let e,i,o,r;if(Array.isArray(t)){let n,s;t.map(a=>{const{x:l,y:c,width:u,height:d}=a.getBoundingClientRect();(!n||n<l+u)&&(n=l+u),(!s||s<c+d)&&(s=c+d),(!e||e>l)&&(e=l),(!i||i>c)&&(i=c),o=n-e,r=s-i})}else{const{x:n,y:s,width:a,height:l}=t.getBoundingClientRect();e=n,i=s,o=a,r=l}return{x:e,y:i,w:o,h:r}}function Rde(){return{wWindow:window.innerWidth,hWindow:window.innerHeight}}function HSi(){return{offsetXWindow:window.pageXOffset,offsetYWindow:window.pageYOffset}}function VSi(t){return Math.sign(t)===-1}async function ZSi(t,e){const{y:i,h:o}=Eb(t),{hWindow:r}=Rde(),n=e.offsetTop,s=e.scrollTop;VSi(i)&&e.scroll({top:s+i-T0}),i<n&&e.scroll({top:s+i-n-T0}),i+o>r&&e.scroll({top:i+o-r+s+T0})}function JSi(t,e,i,o=0,r=0){const{x:n,y:s,w:a,h:l}=Eb(t),{w:c,h:u}=Eb(e),{wWindow:d,hWindow:h}=Rde(),A=e.getElementsByClassName("tooltip__box__top")[0],{h:g}=Eb(A),{offsetXWindow:p,offsetYWindow:M}=HSi();let f,w,L=0;const v=p+n,I=c+T0,C=M+s,b=u+T0,x=d-(v+a)>I,T=v>I;if(x){f=v+a+T0,h-C-l<b-l?(l<g&&(L=g/2+l/-2),w=C+l-u+L,i.dataset.position="down-right"):(l<g&&(L=g/-2+l/2),w=C+L,i.dataset.position="up-right"),Object.assign(e.style,{left:`${f+r}px`,top:`${w+o}px`});return}if(T){f=v-I,h-C-l<b-l?(l<g&&(L=g/2+l/-2),w=C+l-u+L,i.dataset.position="down-left"):(l<g&&(L=g/-2+l/2),w=C+L,i.dataset.position="up-left"),Object.assign(e.style,{left:`${f+r}px`,top:`${w+o}px`});return}const B=b<C-T0,S=h-(C+l)>b;if(B){i.dataset.position="bottom",Object.assign(e.style,{left:`${v+r}px`,top:`${C-b+o}px`});return}if(S){i.dataset.position="top",Object.assign(e.style,{left:`${v+r}px`,top:`${C+l+T0+o}px`});return}i.dataset.position="hidden",Object.assign(e.style,{left:`${v+a-c+r}px`,top:`${C+l-u+o}px`})}const WSi={skip:"Skip",next:"Next",continue:"Continue"},KSi={skip:"Passer",next:"Suivant",continue:"Continuer"},Ude={en:WSi,fr:KSi},qSi={props:{locale:{type:String,default:"en"},tours:{type:Array,default:()=>[]},tourToDisplay:{type:String,default:()=>""},elementToObserve:{type:[Object,HTMLElement],default:()=>{}},zIndex:{type:Number,default:()=>1e4},transitionDuration:{type:Number,default:()=>.3}},emits:["set-completed-tour"],data(){return{steps:[],showGuidedTour:!1,currentTarget:null,showTooltip:!1,stepIndex:0}},computed:{currentStep(){return this.steps[this.stepIndex]},nextStep(){return this.steps[this.stepIndex+1]},centeredTooltip(){return this.currentStep&&!this.currentStep.target},isStepIntro(){return this.stepIndex===0},isStepOutro(){return this.stepIndex===this.steps.length-1}},watch:{steps(){this.stepIndex=0},async currentStep(t){var e;try{if(!t)return;if(this.currentTarget=null,t.target)this.currentTarget=this.getDomElements(t);else{this.showTooltip=!0;return}(e=t.action)==null||e.call(t,this.currentTarget.element.getAttribute("data-guide-param")),t.clickable&&this.clickListener(),ZSi(this.currentTarget.element,this.elementToObserve),JSi(this.currentTarget.element,this.$refs.tooltip,this.$refs.arrow,t.yOffset,t.xOffset),this.showTooltip=!0}catch{this.closeGuidedTour()}}},created(){this.mutationObserver=new MutationObserver(this.handleClickedStep)},mounted(){const t=this.tours.find(e=>e.name===this.tourToDisplay);t?this.openGuidedTour(t.steps):console.warn(`GuideTour: unknown tour ${this.tourToDisplay}`)},unmounted(){this.mutationObserver.disconnect()},destroyed(){this.mutationObserver.disconnect()},methods:{clickNext(){this.resetSettings(),setTimeout(()=>{this.currentStep.clickable?(this.currentTarget.elementToClick||this.currentTarget.element).click():this.next()},this.transitionDuration*1e3)},openGuidedTour(t){this.steps=t.map(e=>({...e,layout:e.layout?Object.freeze(e.layout):null})),this.showGuidedTour=!0},getDomElements(t,e=document){const{target:i,targetDetail:o,targetToClick:r,targetToClickDetail:n}=t;let s,a;return Array.isArray(i)?s=i.map(l=>e.querySelector(`[data-guide=${l}]`)):typeof i=="string"&&(s=e.querySelector(`[data-guide=${i}] ${o||""}`)),r&&(a=e.querySelector(`[data-guide-click=${r}] ${n||""}`)),{element:s,elementToClick:a}},closeGuidedTour(){this.showGuidedTour=!1,this.steps=[]},next(){this.stepIndex++},close(){this.showTooltip=!1,this.closeGuidedTour(),this.$emit("set-completed-tour",this.tourToDisplay)},resetSettings(){this.showTooltip=!1},clickListener(){(this.currentTarget.elementToClick||this.currentTarget.element).addEventListener("click",()=>{this.nextStep.target?this.mutationObserver.observe(this.elementToObserve,{childList:!0,subtree:!0}):this.next()},{once:!0})},handleClickedStep(){const{element:t}=this.getDomElements(this.nextStep,this.elementToObserve),e=t instanceof HTMLElement,i=Array.isArray(t)&&t.every(o=>o instanceof HTMLElement);(e||i)&&(this.next(),this.mutationObserver.disconnect())},translate(t){return(Ude[this.locale]||Ude.en)[t]}}},XSi={ref:"arrow",class:"arrow"},_Si={class:"tooltip__box"},$Si={class:"tooltip__box__top"},eTi={class:"tooltip__box__progress-bar"},tTi={class:"tooltip__box__bottom"},iTi={class:"tooltip__box__bottom__title"},oTi={class:"tooltip__box__bottom__text"},rTi={class:"tooltip__box__footer"},sTi={class:"tooltip__box__footer__step-counter"},nTi={key:0,class:"tooltip__box__footer__btn-skip"},aTi={key:1,class:"tooltip__box__footer__ghost-element"},lTi={key:2,class:"tooltip__box__footer__btn-start"},cTi={key:3,class:"tooltip__box__footer__btn-next"};function uTi(t,e,i,o,r,n){const s=z("BIMDataButton"),a=z("BIMDataIconChevron");return St((D(),Y("div",{ref:"guidedTourPortal",class:be(["guided-tour-portal",{centeredTooltip:n.centeredTooltip}]),style:Ie(`z-index: ${i.zIndex}`)},[n.currentStep?(D(),Y("div",{key:0,ref:"tooltip",class:"tooltip",style:Ie({opacity:r.showTooltip?1:0,transition:`opacity ${i.transitionDuration}s ease-in-out`})},[m("div",XSi,null,512),m("div",_Si,[m("div",$Si,[m("div",{class:"tooltip__box__top__image",style:Ie({background:`var(--platform-background) url(${n.currentStep.props.img}) no-repeat ${n.currentStep.props.imgPosition} / ${n.currentStep.props.imgSize}`})},null,4)]),m("div",eTi,[(D(!0),Y(Mt,null,ei(r.steps,(l,c)=>(D(),Y("div",{class:"tooltip__progress-bar__step",key:c,style:Ie({width:`calc(100% / ${r.steps.length})`,backgroundColor:r.steps.indexOf(n.currentStep)>=c?"var(--color-secondary)":""})},null,4))),128))]),m("div",tTi,[m("div",iTi,re(n.currentStep.props.title),1),m("div",oTi,re(n.currentStep.props.content),1)]),m("div",rTi,[m("div",sTi,[m("span",null,re(r.stepIndex+1),1),m("span",null,"/"+re(r.steps.length),1)]),n.isStepOutro?(D(),Y("div",aTi)):(D(),Y("div",nTi,[O(s,{width:"0px",height:"0px",color:"granite",onClick:n.close},{default:W(()=>[At(re(n.translate("skip")),1)]),_:1},8,["onClick"])])),n.isStepOutro?(D(),Y("div",lTi,[O(s,{width:"0px",height:"0px",color:"granite",onClick:n.close},{default:W(()=>[At(re(n.translate("continue")),1)]),_:1},8,["onClick"])])):(D(),Y("div",cTi,[O(s,{width:"0px",height:"0px",color:"primary",fill:"",radius:"",onClick:n.clickNext},{default:W(()=>[m("span",null,re(n.translate("next")),1),O(a,{size:"xxs",fill:"",color:"white"})]),_:1},8,["onClick"])]))])])],4)):ve("",!0)],6)),[[Mi,r.showGuidedTour]])}const dTi=K(qSi,[["render",uTi],["__scopeId","data-v-37f3ddef"]]),hTi={props:{width:{type:Number},height:{type:Number},previewUrl:{type:String},defaultUrl:{type:String},zoomFactor:{type:Number}},data(){return{hover:!1,zoomX:0,zoomY:0}},computed:{imgUrl(){return this.previewUrl||this.defaultUrl},zoomTransform(){return`
1865
+ `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[O(s,{ref:"modalManagerTemplateRef"},null,512),m("div",c8i,[o.windowPlugins.leftSidePanel?(D(),se(a,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):ve("",!0),m("div",u8i,[(D(!0),Y(Mt,null,ei(o.windowPlugins.free,h=>(D(),se(l,{key:h.name,style:{height:"100%"},plugin:h},null,8,["plugin"]))),128)),O(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),O(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(D(),se(a,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):ve("",!0)]),o.loading?(D(),Y("div",d8i,[o.spinner&&o.spinner.component?(D(),se(Ls(o.spinner.component),Pf(Ka({key:0},o.spinner.props)),null,16)):(D(),se(u,{key:1,size:"20px",border:"3px"}))])):ve("",!0),o.layoutSettingsDisplayed?(D(),Y("div",h8i,[O(d)])):ve("",!0)],36)}const p8i=K(l8i,[["render",A8i]]);class g8i{constructor(e=!0){const i=t9i(wQ,null,{resizable:e});i.registerContent("default",p8i),this.settings=Tl({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?i9i(e):null}copy(e){return o9i(this.areas.layout,e)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:s=null}={}){const a=r?{options:{windowName:r,windowState:n}}:null;return s===null?this.areas.splitLayout(e,i,o,a):this.areas.split(s,e,i,o,a)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}}const M8i="@bimdata/viewer",f8i="module",w8i="2.2.0-beta.5",L8i="A customizable BIM viewer.",m8i=["bim","viewer","bimdata","ifc","bcf"],y8i="./index.d.ts",v8i="BIMData.io",C8i="https://developers.bimdata.io/viewer/index.html",I8i={email:"support@bimdata.io"},j8i=["last 2 chrome version","last 2 firefox version"],b8i="dist/bimdata-viewer.esm.min.js",x8i="dist/bimdata-viewer.esm.min.js",N8i={build:"vite build && esbuild dist/bimdata-viewer.esm.min.js --minify --outfile=dist/bimdata-viewer.esm.min.js --allow-overwrite","build:split":"vite build -c vite.config.split.js && esbuild dist/bimdata-viewer-split.esm.min.js --minify --outfile=dist/bimdata-viewer-split.esm.min.js --allow-overwrite","cy:run":"cypress run","cy:open":"cypress open",dev:"vite",prebuild:"rm -rf dist",prepublishOnly:"npm run build","semantic-release":"semantic-release",serve:"http-server -c-1 --silent",test:"npm run test:unit & npm run build & npm run test:e2e","test:unit":"jest","test:e2e":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:run","test:e2e-dev":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:open",version:"echo $npm_package_version",ts:"tsc"},D8i=["dist/*","types/*","CHANGELOG.md","README.md","package.json","package-lock.json","index.d.ts"],S8i={"@babel/preset-env":"^7.24.3","@bimdata/2d-engine":"2.4.0","@bimdata/areas-next":"0.1.15","@bimdata/bcf-components":"6.2.1","@bimdata/building-maker":"3.0.3","@bimdata/components":"1.3.3","@bimdata/design-system":"2.1.0-rc.14","@bimdata/typescript-fetch-api-client":"10.1.0","@rollup/plugin-alias":"5.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-image":"^3.0.3","@rollup/plugin-replace":"^5.0.5","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^12.0.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^10.0.2","@semantic-release/npm":"^12.0.0","@semantic-release/release-notes-generator":"^13.0.0","@vitejs/plugin-vue":"4.6.2","@vue/vue3-jest":"29.2.6","@xeokit/xeokit-sdk":"git+https://git@github.com/Amoki/xeokit-sdk.git#369bb4876e529995cd4c192bc7fda5e957f9634f","@zip.js/zip.js":"^2.7.40",async:"^3.2.5",autoprefixer:"^10.4.19","babel-core":"^7.0.0-bridge.0","babel-jest":"^29.7.0","conventional-changelog-eslint":"^5.0.0",cypress:"13.7.1",esbuild:"^0.20.2",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-cypress":"^2.15.1","eslint-plugin-jest":"^27.9.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-vue":"^9.24.0","form-data":"^4.0.0",html2canvas:"1.4.1","http-server":"^14.1.1",jest:"^29.7.0","jest-environment-jsdom":"^29.7.0","jest-extended":"^4.0.2",jspdf:"^2.5.1",lodash:"^4.17.21","node-fetch":"^3.3.2",postcss:"^8.4.38",prettier:"^3.2.5",querystring:"^0.2.0",sass:"^1.72.0","semantic-release":"^23.0.6",sinon:"^17.0.1","start-server-and-test":"2.0.3",vite:"4.5.2","vite-plugin-css-injected-by-js":"3.5.0",vue:"3.4.21","vue-eslint-parser":"^9.4.2","vue-i18n":"^9.10.2"},T8i={name:M8i,type:f8i,version:w8i,description:L8i,keywords:m8i,types:y8i,author:v8i,homepage:C8i,bugs:I8i,browserslist:j8i,main:b8i,module:x8i,scripts:N8i,files:D8i,devDependencies:S8i};class k8i{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.pluginManager=new e2i(e),this.windowManager=new i2i,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new sDi(i),this.globalContext=new y2e(this),this.state=LDi(this),this.shortcutManager=Nge(this.state),this.uiSettings=o||{},this.i18n=new L2e(r),this._contextMenu=null,this.layout=new g8i(this.uiSettings.resizable!==!1),this.localContext=null,window.$viewer=this}get version(){return T8i.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||bge}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function E8i(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const z8i=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),WM=Object.freeze({READ:"read",WRITE:"write"});function xde(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const P8i={token_scopes:[],usable_scopes:[],user_role:25};function Nde(t=P8i){var e,i,o,r,n,s;const a=xde(t.token_scopes),l=xde(t.usable_scopes);return{...VZ(t),tokenScopes:a,usableScopes:l,userRole:z8i[t.user_role],user:t.user?VZ(t.user):null,hasBcfReadPermission:((e=l.bcf)==null?void 0:e.includes(WM.READ))??!1,hasBcfWritePermission:((i=l.bcf)==null?void 0:i.includes(WM.WRITE))??!1,hasModelReadPermission:((o=l.model)==null?void 0:o.includes(WM.READ))??!1,hasModelWritePermission:((r=l.model)==null?void 0:r.includes(WM.WRITE))??!1,hasDocReadPermission:((n=l.document)==null?void 0:n.includes(WM.READ))??!1,hasDocWritePermission:((s=l.document)==null?void 0:s.includes(WM.WRITE))??!1}}const B8i={BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{goBackButton:"Zur\xFCck",title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t:",noPriority:"Keine",assignedTo:"Zugewiesen an :",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},O8i={BcfComponents:B8i},R8i={BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{goBackButton:"Back",title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority: ",noPriority:"None",assignedTo:"Assigned to: ",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},U8i={BcfComponents:R8i},Y8i={BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{goBackButton:"Volver",title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad :",noPriority:"Sin",assignedTo:"Asignado a :",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},F8i={BcfComponents:Y8i},Q8i={BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{goBackButton:"Retour",title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9 : ",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0 : ",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},G8i={BcfComponents:Q8i},H8i={BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{goBackButton:"Indietro",title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0:",noPriority:"Nessuno",assignedTo:"Assegnato a:",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},V8i={BcfComponents:H8i},Z8i={de:O8i,en:U8i,es:F8i,fr:G8i,it:V8i},J8i=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Ro.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(Z8i).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(H5e).forEach(([r,n])=>{o.component(r,n)})}}),W8i={props:{header:{type:Boolean,default:!1},pdf:{type:[Object,File]}},setup(t){const e=Xe(!1),i=Xe(null);return ai(()=>t.pdf,async o=>{if(e.value=!0,o.file)try{const r=await fetch(o.file).then(n=>n.blob());i.value=URL.createObjectURL(r)}catch(r){console.err("[BIMDataPDFViewer] Error fetching the pdf file.",r)}else i.value=URL.createObjectURL(o);e.value=!1},{immediate:!0}),{loading:e,pdfUrl:i}}},K8i={class:"pdf-viewer"},q8i={key:0,class:"pdf-viewer__header"},X8i={class:"pdf-viewer__header--left"},_8i={class:"pdf-viewer__header--title"},$8i={class:"pdf-viewer__header--right"},e6i=["data"];function t6i(t,e,i,o,r,n){const s=z("BIMDataLoading"),a=z("BIMDataTextbox");return D(),Y("div",K8i,[o.loading?(D(),se(s,{key:0})):(D(),Y(Mt,{key:1},[i.header?(D(),Y("div",q8i,[m("div",X8i,[jt(t.$slots,"header-left",{},void 0,!0)]),m("div",_8i,[O(a,{text:i.pdf.name},null,8,["text"])]),m("div",$8i,[jt(t.$slots,"header-right",{},void 0,!0)])])):ve("",!0),o.pdfUrl?(D(),Y("object",{key:1,width:"100%",height:"100%",type:"application/pdf",data:o.pdfUrl},null,8,e6i)):ve("",!0)],64))])}const Dde=K(W8i,[["render",t6i],["__scopeId","data-v-edf51369"]]),i6i={props:{color:{type:String,default:"currentColor"},progress:{type:Number,default:0,validator(t){return t>=0&&t<=100}}},data(){return{width:22,strokeWidth:3}},computed:{dashoffset(){return 63-this.progress/100*63}}},o6i={class:"bimdata-pie-progress-spinner"},r6i=["viewBox","width","height"],s6i=["cx","cy","r","stroke-width"],n6i=["cx","cy","r","stroke","stroke-width"];function a6i(t,e,i,o,r,n){return D(),Y("div",o6i,[(D(),Y("svg",{viewBox:`0 0 ${r.width} ${r.width}`,xmlns:"http://www.w3.org/2000/svg",fill:"transparent",width:r.width,height:r.width,style:{transform:"rotate(-90deg)"}},[m("circle",{class:"bimdata-pie-progress-spinner__path--back",cx:r.width/2,cy:r.width/2,r:(r.width-r.strokeWidth)/2,stroke:"lightgray","stroke-width":r.strokeWidth},null,8,s6i),m("circle",{class:"bimdata-pie-progress-spinner__path",cx:r.width/2,cy:r.width/2,r:(r.width-r.strokeWidth)/2,stroke:i.color,"stroke-width":r.strokeWidth,style:Ie(`--dashoffset: ${n.dashoffset};`)},null,12,n6i)],8,r6i))])}const l6i=K(i6i,[["render",a6i],["__scopeId","data-v-71eb6ae9"]]),c6i={props:{text:{type:String}}},u6i={class:"multi-line-textbox-tooltip"},d6i={class:"multi-line-textbox-tooltip__content"};function h6i(t,e,i,o,r,n){return D(),Y("div",u6i,[m("div",d6i,re(i.text),1)])}const A6i=K(c6i,[["render",h6i],["__scopeId","data-v-9e9877bb"]]),p6i={components:{Tooltip:A6i},props:{text:{type:String,default:""},lines:{type:Number,default:3},lineHeight:{type:Number,default:14}},data(){return{needEllipsis:!1,hover:!1}},computed:{style(){return{"--textbox-line-height":`${this.lineHeight}px`,"--textbox-lines":this.lines}},tooltipDisplayed(){return this.needEllipsis&&this.hover}},mounted(){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.$el)},destroyed(){this.resizeObserver&&this.resizeObserver.disconnect()},methods:{onResize(){if(!this.$refs.ghost)return;const t=this.lines*this.lineHeight,{height:e}=this.$refs.ghost.getBoundingClientRect();this.needEllipsis=e>t}}},g6i=t=>(rr("data-v-134a4e01"),t=t(),sr(),t),M6i={class:"multi-line-text-box__content"},f6i={class:"multi-line-text-box__content__head"},w6i={class:"multi-line-text-box__content__tail__text"},L6i=g6i(()=>m("div",{class:"multi-line-text-box__content__tail__ellipsis"},"...",-1)),m6i={key:1,class:"multi-line-text-box__content__full"};function y6i(t,e,i,o,r,n){const s=z("Tooltip");return D(),Y("div",{class:"multi-line-text-box",style:Ie(n.style),onMouseover:e[1]||(e[1]=a=>r.hover=!0),onMouseleave:e[2]||(e[2]=a=>r.hover=!1)},[m("div",M6i,[r.needEllipsis?(D(),Y(Mt,{key:0},[m("div",f6i,[m("span",null,re(i.text),1)]),m("div",{class:"multi-line-text-box__content__tail",style:Ie(`height:${i.lineHeight*(i.lines-1)}px`)},[m("div",w6i,[m("span",null,re(i.text),1)]),L6i],4)],64)):(D(),Y("span",m6i,re(i.text),1)),m("span",{class:"multi-line-text-box__ghost",ref:"ghost"},re(i.text),513)]),n.tooltipDisplayed?(D(),se(s,{key:0,onClick:e[0]||(e[0]=bt(()=>{},["stop"])),text:i.text,class:"multi-line-text-box__tooltip"},null,8,["text"])):ve("",!0)],36)}const v6i=K(p6i,[["render",y6i],["__scopeId","data-v-134a4e01"]]),C6i={components:{PieProgressSpinner:l6i,MultiLineTextBox:v6i},inject:["$translate"],props:{disabled:{type:Boolean,default:!1},writeAccess:{type:Boolean,default:!1},width:{type:String,default:"140px"},file:{type:Object,required:!0},projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiUrl:{type:String,required:!0},accessToken:{type:String,required:!0},select:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},multi:{type:Boolean,default:!1},success:{type:Boolean,default:!1},viewPdf:{type:Boolean,default:!1},pdfModelLoading:{type:Boolean,default:!1},pdfPage:{type:Object,default:null}},emits:["rename","download","edit","view","open-folder","toggle-select","loaded","load-error"],data(){return{menuDisplayed:!1,percentCompleted:0}},computed:{multiSelect(){return this.select&&this.multi},edit(){return!this.loading&&!this.select},isFolder(){return this.file.nature==="Folder"},loading(){return this.file.fileToLoad},initials(){return this.file.created_by&&`${this.file.created_by.firstname[0]||""}${this.file.created_by.lastname[0]||""}`.toUpperCase()}},async created(){if(document.addEventListener("keydown",this.onKeyDown),this.file.fileToLoad){const t=new FormData;t.append("file",this.file.fileToLoad),t.append("name",this.file.fileToLoad.name),t.append("parent_id",this.file.folder.id);const e=new XMLHttpRequest;e.open("POST",`${this.apiUrl}/cloud/${this.spaceId}/project/${this.projectId}/document`),e.setRequestHeader("authorization",`Bearer ${this.accessToken}`),e.addEventListener("progress",i=>{this.percentCompleted=i.loaded/i.total*100}),e.addEventListener("load",()=>{if(e.status===201){const i=JSON.parse(e.response);i.updated_at=new Date(i.updated_at),this.$emit("loaded",i)}else this.$emit("load-error",e.statusText)}),e.send(t)}},destroyed(){document.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown(t){t.key==="Escape"&&(this.menuDisplayed=!1)},onRenameClick(){this.menuDisplayed=!1,this.$emit("rename")},onDownloadClick(){this.menuDisplayed=!1,this.$emit("download")},onDeleteClick(){this.menuDisplayed=!1,this.$emit("delete")},onViewClick(){this.menuDisplayed=!1,this.$emit("view")},onClick(){this.isFolder?this.$emit("open-folder"):!this.success&&!this.disabled&&!this.loading&&this.select&&this.$emit("toggle-select",this.file)},toggleMenu(){this.menuDisplayed=!this.menuDisplayed},away(){setTimeout(()=>{this.menuDisplayed=!1})}}},I6i={class:"file-card__content__header"},j6i={class:"file-card__content__header__btn-menu"},b6i={key:3,class:"selection-box"},x6i={key:2,class:"selection-text"},N6i={key:0,class:"file-card__content__menu"},D6i={class:"file-card__content__footer"},S6i={class:"file-card__content__footer__date"},T6i={key:0,class:"file-card__content__footer__initials"};function k6i(t,e,i,o,r,n){const s=z("BIMDataIconSuccess"),a=z("PieProgressSpinner"),l=z("BIMDataIconEllipsis"),c=z("BIMDataButton"),u=z("BIMDataSpinner"),d=z("BIMDataCheckbox"),h=z("BIMDataRadio"),A=z("BIMDataIconFolder"),g=z("BIMDataFileIcon"),p=z("MultiLineTextBox"),M=Vi("click-away");return D(),Y("div",{class:"file-card",onClick:e[0]||(e[0]=(...f)=>n.onClick&&n.onClick(...f))},[m("div",{class:be(["file-card__content",{"file-card__content--selected":i.selected,"file-card__content--disabled":i.disabled,"file-card__content--hover":i.select&&!i.success&&!i.disabled||n.isFolder}])},[m("div",I6i,[m("div",j6i,[i.success?(D(),se(s,{key:0,size:"s",fill:"",color:"success",class:"file-card__content__header__btn-menu__success"})):n.loading&&!i.success?(D(),se(a,{key:1,progress:r.percentCompleted,class:"file-card__content__header__btn-menu__spinner"},null,8,["progress"])):n.edit?(D(),se(c,{key:2,ghost:"",rounded:"",icon:"",onClick:bt(n.toggleMenu,["stop"]),class:"file-card__content__header__btn-menu__edit",disabled:i.success},{default:W(()=>[O(l,{size:"l",fill:"",color:"granite-light"})]),_:1},8,["onClick","disabled"])):n.isFolder?ve("",!0):(D(),Y("div",b6i,[i.pdfModelLoading?(D(),se(u,{key:0,style:{margin:"6px"}})):(D(),Y(Mt,{key:1},[n.multiSelect?(D(),se(d,{key:0,disabled:i.disabled,modelValue:i.selected,class:"file-card__content__header__btn-menu__checkbox"},null,8,["disabled","modelValue"])):(D(),se(h,{key:1,disabled:i.disabled,big:"",modelValue:i.selected,name:"BIMDataFileCardRadio"},null,8,["disabled","modelValue"]))],64)),i.pdfPage?(D(),Y("div",x6i,re(`page ${i.pdfPage.page_number}`),1)):ve("",!0)]))]),i.file.nature==="Folder"?(D(),se(A,{key:0,size:"xl",fill:"",color:"primary"})):(D(),se(g,{key:1,fileName:i.file.file_name,size:25},null,8,["fileName"]))]),r.menuDisplayed?St((D(),Y("div",N6i,[i.viewPdf&&i.file.model_type==="PDF"?(D(),se(c,{key:0,color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onViewClick,["stop"])},{default:W(()=>[At(re(n.$translate("view")),1)]),_:1},8,["onClick"])):ve("",!0),O(c,{color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onRenameClick,["stop"])},{default:W(()=>[At(re(n.$translate("rename")),1)]),_:1},8,["onClick"]),O(c,{color:"default",ghost:"",radius:"",width:"100%",onClick:bt(n.onDownloadClick,["stop"])},{default:W(()=>[At(re(n.$translate("download")),1)]),_:1},8,["onClick"]),i.writeAccess?(D(),se(c,{key:1,color:"high",ghost:"",radius:"",width:"100%",onClick:bt(n.onDeleteClick,["stop"])},{default:W(()=>[At(re(n.$translate("delete")),1)]),_:1},8,["onClick"])):ve("",!0)])),[[M,n.away]]):ve("",!0),m("div",D6i,[O(p,{class:"file-card__content__footer__name",text:i.file.name},null,8,["text"]),m("div",S6i,re(i.file.updated_at.toLocaleDateString()),1),n.initials?(D(),Y("div",T6i,re(n.initials),1)):ve("",!0)])],2)])}const E6i=K(C6i,[["render",k6i],["__scopeId","data-v-cf500c59"]]),z6i={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},folder:{type:Object,required:!0}},data(){return{name:"",hasError:!1,loading:!1}},created(){document.addEventListener("keydown",this.onKeyDown)},mounted(){this.timeoutId=setTimeout(()=>this.$refs.nameInput.focus(),200)},destroyed(){document.removeEventListener("keydown",this.onKeyDown),clearTimeout(this.timeoutId)},methods:{onKeyDown(t){t.key==="Enter"&&this.submit()},reset(){this.name="",this.hasError=!1},close(){this.reset(),this.$emit("close")},async submit(){if(this.name){this.loading=!0;try{const t={parent_id:this.folder.id,name:this.name},e=await this.apiClient.collaborationApi.createFolder(this.spaceId,this.projectId,t);this.$emit("success",e)}catch(t){this.$emit("error",t)}finally{this.reset(),this.loading=!1}}else this.$refs.nameInput.focus(),this.hasError=!0}}},P6i={class:"folder-creation-form"},B6i={class:"folder-creation-form__title"};function O6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFolder"),a=z("BIMDataInput"),l=z("BIMDataButton");return D(),Y("div",P6i,[m("div",B6i,[O(s,{size:"xs"}),m("span",null,re(n.$translate("creationFormTitle")),1)]),O(a,{ref:"nameInput",class:"folder-creation-form__input",placeholder:n.$translate("nameInputPlaceholder"),modelValue:r.name,"onUpdate:modelValue":e[0]||(e[0]=c=>r.name=c),error:r.hasError,errorMessage:n.$translate("nameInputErrorMessage"),onKeyup:[ri(bt(n.close,["stop"]),["esc"]),ri(bt(n.submit,["stop"]),["enter"])],margin:"24px 0px",loading:r.loading},null,8,["placeholder","modelValue","error","errorMessage","onKeyup","loading"]),O(l,{class:"folder-creation-form__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"])},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick"]),O(l,{class:"folder-creation-form__btn-submit",width:"80px",color:"primary",fill:"",radius:"",onClick:bt(n.submit,["stop"])},{default:W(()=>[At(re(n.$translate("submit")),1)]),_:1},8,["onClick"])])}const R6i=K(z6i,[["render",O6i],["__scopeId","data-v-6a3749ed"]]),U6i={components:{NewFolderForm:R6i},inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},height:{type:String,default:"32px"},folder:{type:Object},disabled:{type:Boolean,default:!1}},data(){return{showCreationForm:!1}},created(){document.addEventListener("keydown",this.onKeyDown)},destroyed(){document.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown(t){t.key==="Escape"&&this.close()},toggle(){this.showCreationForm=!this.showCreationForm},close(){this.showCreationForm=!1}}},Y6i={class:"folder-creation-button"};function F6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFolder"),a=z("BIMDataButton"),l=z("NewFolderForm"),c=Vi("click-away");return St((D(),Y("div",Y6i,[O(a,{width:"100%",height:i.height,color:"primary",fill:"",radius:"",disabled:i.disabled,onClick:n.toggle},{default:W(()=>[O(s,{size:"xs",margin:"0 6px 0 0"}),m("span",null,re(n.$translate("buttonText")),1)]),_:1},8,["height","disabled","onClick"]),O(oo,{name:"fade"},{default:W(()=>[r.showCreationForm?(D(),se(l,{key:0,class:"folder-creation-button__form",projectId:i.projectId,spaceId:i.spaceId,apiClient:i.apiClient,folder:i.folder,onClick:e[0]||(e[0]=bt(()=>{},["stop"])),onClose:n.close,onSuccess:e[1]||(e[1]=u=>{n.close(),t.$emit("success",u)}),onError:e[2]||(e[2]=u=>t.$emit("error",u))},null,8,["projectId","spaceId","apiClient","folder","onClose"])):ve("",!0)]),_:1})])),[[c,n.close]])}const Q6i=K(U6i,[["render",F6i],["__scopeId","data-v-302c3ec1"]]),G6i={inject:["$translate"],props:{width:{type:String,default:"32px"},height:{type:String,default:"32px"},multiple:{type:Boolean,default:!1},accept:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},methods:{selectFile(){this.$refs.fileInput.click()},uploadFile(t){const e=Array.from(t.target.files);e.length>0&&(this.$refs.fileInput.value="",this.$emit("upload",e))}}},H6i=["multiple","accept"];function V6i(t,e,i,o,r,n){const s=z("BIMDataIconAddFile"),a=z("BIMDataButton");return D(),se(a,{class:"file-upload-button",width:i.width,height:i.height,color:"primary",fill:"",radius:"",disabled:i.disabled,onClick:n.selectFile},{default:W(()=>[jt(t.$slots,"default",{},()=>[O(s,{size:"xs",margin:"0 6px 0 0"}),m("span",null,re(n.$translate("addFileButtonText")),1)]),m("input",{hidden:"",ref:"fileInput",type:"file",multiple:i.multiple,accept:i.accept.join(","),onChange:e[0]||(e[0]=(...l)=>n.uploadFile&&n.uploadFile(...l))},null,40,H6i)]),_:3},8,["width","height","disabled","onClick"])}const Z6i=K(G6i,[["render",V6i]]),J6i={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},entity:{type:Object}},data(){return{name:"",hasError:!1,loading:!1}},mounted(){this.name=this.entity.name,setTimeout(()=>this.$refs.nameInput.focus(),200)},methods:{reset(){this.name="",this.hasError=!1},close(){this.reset(),this.$emit("close")},async submit(){if(this.name){this.loading=!0;try{await this.renameDocument(),this.entity.name=this.name,this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.reset(),this.loading=!1}}else this.$refs.nameInput.focus(),this.hasError=!0},renameDocument(){const t=[this.spaceId,this.entity.id,this.projectId,{name:this.name}];return this.entity.nature==="Folder"?this.apiClient.collaborationApi.updateFolder(...t):this.apiClient.collaborationApi.updateDocument(...t)}}},W6i={class:"rename-modal"},K6i={class:"rename-modal__content"},q6i={class:"rename-modal__content__title"},X6i={class:"rename-modal__content__btn"};function _6i(t,e,i,o,r,n){const s=z("BIMDataIconClose"),a=z("BIMDataButton"),l=z("BIMDataInput"),c=Vi("click-away");return St((D(),Y("div",W6i,[O(a,{class:"rename-modal__close",color:"default",icon:"",radius:"",ghost:"",width:"21px",height:"21px",onClick:n.close},{default:W(()=>[O(s)]),_:1},8,["onClick"]),m("div",K6i,[m("div",q6i,re(n.$translate("rename")),1),O(l,{ref:"nameInput",class:"rename-modal__content__input",placeholder:n.$translate("renameFormPlaceholder"),modelValue:r.name,"onUpdate:modelValue":e[0]||(e[0]=u=>r.name=u),error:r.hasError,errorMessage:n.$translate("nameInputErrorMessage"),onKeyup:[ri(bt(n.close,["stop"]),["esc"]),ri(bt(n.submit,["stop"]),["enter"])],margin:"30px 0px",loading:r.loading},null,8,["placeholder","modelValue","error","errorMessage","onKeyup","loading"]),m("div",X6i,[O(a,{class:"rename-modal__content__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"])},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick"]),O(a,{class:"rename-modal__content__btn-submit",width:"80px",color:"primary",fill:"",radius:"",onClick:bt(n.submit,["stop"])},{default:W(()=>[At(re(n.$translate("submit")),1)]),_:1},8,["onClick"])])])])),[[c,n.close]])}const $6i=K(J6i,[["render",_6i],["__scopeId","data-v-47dc7eb4"]]);function Sde(t){return[t,...Tde(t)]}function Tde(t){return t.children&&t.children.length>0?[...t.children,...t.children.flatMap(e=>Tde(e))]:[]}const eSi={inject:["$translate"],props:{projectId:{type:Number,required:!0},spaceId:{type:Number,required:!0},apiClient:{type:Object,required:!0},entity:{type:Object}},data(){return{loading:!1}},computed:{flattenTree(){return Sde(this.entity)}},methods:{close(){this.loading||this.$emit("close")},async submit(){this.loading=!0;try{await this.deleteEntity(),this.$emit("success")}catch(t){this.$emit("error",t)}finally{this.loading=!1}},deleteEntity(){const t=[this.spaceId,this.entity.id,this.projectId];return this.entity.nature==="Folder"?this.apiClient.collaborationApi.deleteFolder(...t):this.apiClient.collaborationApi.deleteDocument(...t)}}},tSi={class:"delete-modal"},iSi={class:"delete-modal__content"},oSi={class:"delete-modal__content__title"},rSi={class:"delete-modal__content__detail"},sSi={class:"delete-modal__content__btn"},nSi={key:1};function aSi(t,e,i,o,r,n){const s=z("BIMDataIconClose"),a=z("BIMDataButton"),l=z("BIMDataSpinner"),c=Vi("click-away");return St((D(),Y("div",tSi,[O(a,{class:"delete-modal__close",color:"default",icon:"",radius:"",ghost:"",width:"21px",height:"21px",onClick:n.close,disabled:r.loading},{default:W(()=>[O(s)]),_:1},8,["onClick","disabled"]),m("div",iSi,[m("div",oSi,re(n.$translate("deleteTitle")),1),m("div",rSi,re(n.$translate("deleteDetail"))+" : ",1),m("ul",null,[(D(!0),Y(Mt,null,ei(n.flattenTree,u=>(D(),Y("li",{key:u.id},' - "'+re(u.name)+'" ',1))),128))]),m("div",sSi,[O(a,{class:"delete-modal__content__btn-cancel",width:"80px",ghost:"",radius:"",onClick:bt(n.close,["stop"]),disabled:r.loading},{default:W(()=>[At(re(n.$translate("cancel")),1)]),_:1},8,["onClick","disabled"]),O(a,{class:"delete-modal__content__btn-submit",width:"80px",color:"high",fill:"",radius:"",onClick:bt(n.submit,["stop"]),disabled:r.loading},{default:W(()=>[r.loading?(D(),se(l,{key:0})):(D(),Y("span",nSi,re(n.$translate("delete")),1))]),_:1},8,["onClick","disabled"])])])])),[[c,n.close]])}const lSi=K(eSi,[["render",aSi],["__scopeId","data-v-26cd84eb"]]),cSi={inject:["$translate"],props:{model:{type:Object,required:!0},modelSelectedPage:{type:Object,default:null}},emits:["select","close"],setup(t,e){const i=vt(()=>[t.model].concat(t.model.children??[])),o=Xe(null);return ai(()=>t.modelSelectedPage,r=>{r&&(o.value=r)},{immediate:!0}),{pages:i,selectedPage:o}}},uSi={class:"pdf-page-selector"},dSi={class:"head"},hSi={style:{"margin-left":"6px"}},ASi={class:"title"},pSi={class:"body"},gSi=["onClick"],MSi={class:"pdf-page__img"},fSi=["src","alt"],wSi={class:"pdf-page__num"},LSi={class:"foot"};function mSi(t,e,i,o,r,n){const s=z("BIMDataIconArrow"),a=z("BIMDataButton"),l=z("BIMDataIconFilePdfPolychrome"),c=z("BIMDataTextbox"),u=z("BIMDataIconClose"),d=z("BIMDataResponsiveGrid");return D(),Y("div",uSi,[m("div",dSi,[O(a,{ghost:"",radius:"",onClick:e[0]||(e[0]=h=>t.$emit("close"))},{default:W(()=>[O(s,{size:"xxs"}),m("span",hSi,re(n.$translate("back")),1)]),_:1}),m("span",ASi,[O(l,{size:"m",margin:"0 6px 0 0"}),O(c,{text:i.model.name},null,8,["text"])]),O(a,{ghost:"",rounded:"",icon:"",onClick:e[1]||(e[1]=h=>t.$emit("close"))},{default:W(()=>[O(u,{size:"xxs"})]),_:1})]),m("div",pSi,[O(d,{style:{width:"100%","justify-items":"center"},itemWidth:"157px",rowGap:"6px",columnGap:"6px"},{default:W(()=>[(D(!0),Y(Mt,null,ei(o.pages,h=>(D(),Y("div",{key:h.id,class:be(["pdf-page",{selected:o.selectedPage&&o.selectedPage.id===h.id}]),onClick:A=>o.selectedPage=o.selectedPage&&o.selectedPage.id===h.id?null:h},[m("div",MSi,[h.map_file?(D(),Y("img",{key:0,src:h.map_file,alt:`page ${h.page_number}`},null,8,fSi)):(D(),se(l,{key:1,size:"l"}))]),m("div",wSi,re(h.page_number),1)],10,gSi))),128))]),_:1})]),m("div",LSi,[O(a,{width:"100%",color:"primary",fill:"",radius:"",onClick:e[2]||(e[2]=h=>t.$emit("select",o.selectedPage))},{default:W(()=>[At(re(n.$translate("validate")),1)]),_:1})])])}const ySi=K(cSi,[["render",mSi],["__scopeId","data-v-22155996"]]),kde="Folder";function Ede(t){return new Promise(e=>setTimeout(e,t))}async function vSi({name:t,url:e}){const i=document.createElement("a");i.style.display="none",i.download=t,i.href=e,document.body.append(i),i.click(),await Ede(100),i.remove(),await Ede(500)}function CSi(t){const e=[],i=[];for(const o of t)o.nature===kde?e.push(o):i.push(o);return{folders:e,documents:i}}function ISi(t,e){const{projectId:i,spaceId:o,accessToken:r,apiUrl:n="https://api.bimdata.io"}=e,s=jSi(n),{folders:a,documents:l}=CSi(t);let c="";return(a.length>0||l.length>0)&&(c+=`${s}/cloud/${o}/project/${i}?`,c+=`accessToken=${r}&`,c+=a.map(u=>`folderId[]=${u.id}`).join("&"),c+=a.length>0&&l.length>0?"&":"",c+=l.map(u=>`documentId[]=${u.id}`).join("&")),c}function jSi(t){const e=new URL(t),i=e.hostname;let o="";const[r,...n]=i.split("."),s=n.join(".");return r.includes("-staging")?o="-staging":r.includes("-next")&&(o="-next"),e.protocol+"//archive"+o+"."+s}async function bSi(t,e={}){try{if(t.length===0)return;let i=null;const o=t[0].name;return t.length===1&&t[0].nature!==kde?i=t[0].file:i=ISi(t,e),await vSi({name:o,url:i})}catch(i){throw new Error(i)}}const xSi={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",cancel:"Cancel",submit:"Submit",buttonText:"New folder",addFileButtonText:"Upload a file",rename:"Rename",view:"View",download:"Download",delete:"Delete",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",validate:"Validate",back:"Back",pdfPageSelectorTitle:"Select a page"},NSi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",cancel:"Annuler",submit:"Valider",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",rename:"Renommer",view:"Voir",download:"T\xE9l\xE9charger",delete:"Supprimer",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",validate:"Valider",back:"Retour",pdfPageSelectorTitle:"S\xE9lectionner une page"},DSi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},SSi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},TSi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},zde={en:xSi,fr:NSi,es:DSi,de:SSi,it:TSi},Pde=398,Bde=468,Ode=800,kSi=3e3,ESi={components:{FileCard:E6i,NewFolderButton:Q6i,UploadFileButton:Z6i,RenameModal:$6i,DeleteModal:lSi,BIMDataPDFViewer:Dde,PdfPageSelector:ySi},provide(){return{$translate:this.translate}},props:{locale:{type:String,default:"en"},apiUrl:{type:String,default:"https://api.bimdata.io"},spaceId:{type:Number,required:!0},projectId:{type:Number,required:!0},accessToken:{type:String,required:!0},select:{type:Boolean,default:!1},multi:{type:Boolean,default:!1},searchColor:{type:String,default:"primary"},headerButtons:{type:Boolean,default:!0},headerSearch:{type:Boolean,default:!0},alreadySelectedIds:{type:Array,defaut:()=>[]},selectableFileTypes:{type:Array,default:()=>[]},viewPdf:{type:Boolean,default:!1},pdfPageSelect:{type:Boolean,default:!1}},data(){return{currentFolder:null,loadingFiles:[],searchText:"",selectedFiles:[],apiClient:null,fileStructure:null,width:0,entityRenown:!1,entityDeletable:!1,successFileIds:[],pdfToView:null,pdfModel:null,pdfModelSelectedPage:null,pdfModelLoading:null,pdfPageSelectorDisplayed:!1}},computed:{modalDisplayed(){return this.entityRenown||this.entityDeletable},navigationShown(){return this.currentFolder!==this.fileStructure},itemWidth(){return this.xsLayout?"100%":this.sLayout?"180px":"164px"},xsLayout(){return this.width<Pde},sLayout(){return this.width>=Pde&&this.width<Bde},mLayout(){return this.width>=Bde&&this.width<Ode},lLayout(){return this.width>=Ode},multiSelect(){return this.select&&this.multi},files(){let t=null;return this.searchText?t=(this.currentFolder&&this.currentFolder.children||[]).filter(e=>e.name.toLowerCase().includes(this.searchText)):t=this.currentFolder&&this.currentFolder.children||[],t.push(...this.loadingFiles.filter(e=>e.folder.id===this.currentFolder.id&&!t.find(i=>i.id===e.id))),t.sort((e,i)=>(e.name||"").localeCompare(i.name)),t.sort((e,i)=>{const o=e.nature==="Folder"?1:-1;return(i.nature==="Folder"?1:-1)-o}),t}},watch:{accessToken(t){this.apiClient.accessToken=t},multi(){this.selectedFiles=[],this.$emit("selection-change",this.selectedFiles)},select(){this.selectedFiles=[],this.$emit("selection-change",this.selectedFiles)}},mounted(){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.$el)},beforeDestroy(){this.resizeObserver&&this.resizeObserver.disconnect(),clearTimeout(this.timeoutId),document.removeEventListener("keydown",this.onKeyDown)},async created(){document.addEventListener("keydown",this.onKeyDown),this.loadingFileId=0;try{this.apiClient=Vj.makeBIMDataApiClient({apiUrl:this.apiUrl,accessToken:this.accessToken}),this.fileStructure=await this.apiClient.collaborationApi.getProjectDMSTree(this.spaceId,this.projectId)}catch(t){this.$emit("error",t)}this.currentFolder=this.fileStructure},methods:{isDisabled(t){var e;if(t.nature==="Folder")return!1;const i=(e=t.file_name)==null?void 0:e.match(/\.(\w+$)/),o=i&&i[1];return this.select&&this.selectableFileTypes.length>0&&!(o&&this.selectableFileTypes.includes(o))},onKeyDown(t){t.key==="Escape"&&(this.entityRenown=null,this.entityDeletable=null,this.$refs.search&&this.$refs.search.$refs.input===document.activeElement&&(this.searchText="",this.$refs.search.blur()))},translate(t){return(zde[this.locale]||zde.en)[t]},isFileSucess(t){return this.successFileIds.includes(t)||this.select&&this.alreadySelectedIds&&this.alreadySelectedIds.includes(t)},onFileLoaded(t,e){t.folder.children||this.$set(t.folder,"children",[]),t.folder.children=t.folder.children.filter(i=>i.id!==t.id),t.folder.children.push(e),this.loadingFiles=this.loadingFiles.filter(i=>i.id!==t.id),this.$emit("success",{type:"fileCreated",message:this.translate("newFileSuccess"),content:e}),this.successFileIds.push(e.id),this.timeoutId=setTimeout(()=>{this.successFileIds&&(this.successFileIds=this.successFileIds.filter(i=>i!==e.id))},kSi)},onDownload(t){try{bSi(Sde(t),{projectId:this.projectId,spaceId:this.spaceId,accessToken:this.accessToken,apiUrl:this.apiUrl})}catch(e){this.$emit("error",e)}},onDelete(t){this.entityDeletable=t},onDeleteSuccess(){const t=this.getParent(this.fileStructure,this.entityDeletable);t&&(t.children=t.children.filter(i=>i.id!==this.entityDeletable.id));const e=this.entityDeletable.nature==="Folder";this.$emit("success",{type:e?"folderDeleted":"fileDeleted",message:e?this.translate("deleteFolderSuccess"):this.translate("deleteFileSuccess"),content:this.entityDeletable}),this.entityDeletable=null},onRename(t){this.entityRenown=t},onRenameSuccess(){const t=this.entityRenown.nature==="Folder";this.$emit("success",{type:t?"folderRenamed":"fileRenamed",message:t?this.translate("renameFolderSuccess"):this.translate("renameFileSuccess"),content:this.entityRenown}),this.entityRenown=null},onView(t){this.pdfToView=t},onResize(t){t.forEach(e=>{this.width=e.target.clientWidth})},uploadFiles(t=[]){this.loadingFiles.push(...this.formatFiles(t))},formatFiles(t){return t.map(e=>({name:e.name,updated_at:new Date(e.lastModified),nature:"Document",id:`loadingfile-${this.loadingFileId++}`,fileToLoad:e,folder:this.currentFolder}))},onNewFolder(t){this.currentFolder.children||this.$set(this.currentFolder,"children",[]),this.currentFolder.children.push(t),this.$emit("success",{type:"folderCreated",message:this.translate("newFolderSuccess"),content:t})},async onToggleFileSelect(t){var e,i;let o=null;if(this.isFileSelected(t)){const r=this.selectedPdfPage(t);if(this.pdfPageSelect&&t.model_type==="PDF"&&r){this.selectedFiles=this.selectedFiles.filter(({document:s})=>s!==t),this.pdfModelLoading=t.id;const n=await this.apiClient.modelApi.getModel(this.spaceId,t.model_id,this.projectId);if(this.pdfModelLoading=null,((e=n.children)==null?void 0:e.length)>0&&(o=await this.openPdfPageSelector(n,r),!o))return;this.selectedFiles.push({document:t,pdfPage:o})}else this.selectedFiles=this.selectedFiles.filter(({document:n})=>n!==t)}else{if(this.multi||(this.selectedFiles=[]),this.pdfPageSelect&&t.model_type==="PDF"){this.pdfModelLoading=t.id;const r=await this.apiClient.modelApi.getModel(this.spaceId,t.model_id,this.projectId);if(this.pdfModelLoading=null,((i=r.children)==null?void 0:i.length)>0&&(o=await this.openPdfPageSelector(r),!o))return}this.selectedFiles.push({document:t,pdfPage:o})}this.$emit("selection-change",this.selectedFiles)},isFileSelected(t){return this.selectedFiles.some(({document:e})=>t===e)},async openPdfPageSelector(t,e){this.pdfModel=t,this.pdfModelSelectedPage=e,this.pdfPageSelectorDisplayed=!0;const i=await new Promise(o=>this.selectPdfPage=o);return this.pdfPageSelectorDisplayed=!1,this.pdfModelSelectedPage=null,this.pdfModel=null,i},selectedPdfPage(t){var e;return(e=this.selectedFiles.find(({document:i})=>t===i))==null?void 0:e.pdfPage},onBreadcrumClick(t){this.currentFolder=t},onBreadcrumBack(){const t=this.steps[this.steps.length-2];t&&(this.currentFolder=t)},openFolder(t){this.currentFolder=t},back(){const t=this.getParent(this.fileStructure,this.currentFolder);t?this.currentFolder=t:this.currentFolder=this.fileStructure},getParent(t,e){if(Array.isArray(t.children)){if(t.children.includes(e))return t;for(let i of t.children){const o=this.getParent(i,e);if(o)return o}}},getFolder(t,e=this.fileStructure){if(e.id===t)return e;for(let i of e.children||[]){const o=this.getFolder(t,i);if(o)return o}}}},zSi={class:"bimdata-file-manager"},PSi={class:"bimdata-file-manager__navigation"},BSi={key:0,class:"bimdata-file-manager__navigation__content"},OSi={key:1,class:"bimdata-file-manager__navigation__content--empty"},RSi={key:0,class:"bimdata-file-manager__container"},USi={key:1,class:"bimdata-file-manager__container--empty"},YSi={key:4,class:"bimdata-file-manager__pdf-page-selector"},FSi={key:5,class:"bimdata-file-manager__modal"};function QSi(t,e,i,o,r,n){const s=z("BIMDataIconArrow"),a=z("BIMDataButton"),l=z("BIMDataPDFViewer"),c=z("NewFolderButton"),u=z("UploadFileButton"),d=z("BIMDataSearch"),h=z("BIMDataTextbox"),A=z("FileCard"),g=z("BIMDataResponsiveGrid"),p=z("BIMDataIconFolderOpen"),M=z("BIMDataLoading"),f=z("PdfPageSelector"),w=z("RenameModal"),L=z("DeleteModal");return D(),Y("div",zSi,[r.pdfToView?(D(),se(l,{key:0,class:"bimdata-file-manager__pdf-viewer",pdf:r.pdfToView,header:""},{"header-left":W(()=>[O(a,{class:"m-l-12",width:"32px",height:"32px",color:"primary",ghost:"",radius:"",icon:"",onClick:e[0]||(e[0]=v=>r.pdfToView=null)},{default:W(()=>[O(s,{size:"xxs"})]),_:1})]),_:1},8,["pdf"])):ve("",!0),i.headerButtons||i.headerSearch?(D(),Y("div",{key:1,class:be(["bimdata-file-manager__header",{"bimdata-file-manager__header--xs":n.xsLayout,"bimdata-file-manager__header--s":n.sLayout,"bimdata-file-manager__header--m":n.mLayout,"bimdata-file-manager__header--l":n.lLayout}])},[i.headerButtons?(D(),Y(Mt,{key:0},[O(c,{disabled:!r.currentFolder||r.currentFolder.user_permission<100,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,folder:r.currentFolder,onSuccess:n.onNewFolder,onError:e[1]||(e[1]=v=>t.$emit("error",v))},null,8,["disabled","projectId","spaceId","apiClient","folder","onSuccess"]),O(u,{class:"bimdata-file-manager__header__upload",width:"25%",disabled:!r.currentFolder||r.currentFolder.user_permission<100,multiple:"",onUpload:n.uploadFiles},null,8,["disabled","onUpload"])],64)):ve("",!0),i.headerSearch?(D(),se(d,{key:1,color:i.searchColor,class:"bimdata-file-manager__search",width:"100%",placeholder:"Search",modelValue:r.searchText,"onUpdate:modelValue":e[2]||(e[2]=v=>r.searchText=v),ref:"search",clear:"",radius:""},null,8,["color","modelValue"])):ve("",!0)],2)):ve("",!0),m("div",PSi,[n.navigationShown?(D(),Y("div",BSi,[O(a,{ghost:"",radius:"",icon:"",onClick:n.back},{default:W(()=>[O(s,{size:"xxs"})]),_:1},8,["onClick"]),O(h,{text:r.currentFolder.name,cutPosition:"middle",tooltipPosition:"bottom",tooltipColor:"primary",width:"calc(100% - 45px)"},null,8,["text"])])):(D(),Y("div",OSi,re(n.translate("dmsRoot")),1))]),r.fileStructure?(D(),Y(Mt,{key:2},[n.files.length>0?(D(),Y("div",RSi,[O(g,{itemWidth:n.itemWidth,rowGap:"4px",columnGap:"6px"},{default:W(()=>[(D(!0),Y(Mt,null,ei(n.files,v=>(D(),se(A,{width:n.itemWidth,key:v.id,file:v,projectId:i.projectId,spaceId:i.spaceId,apiUrl:i.apiUrl,accessToken:i.accessToken,onOpenFolder:I=>n.openFolder(v),select:i.select,disabled:n.isDisabled(v),multi:i.multi,selected:n.isFileSelected(v),success:n.isFileSucess(v.id),onToggleSelect:I=>n.onToggleFileSelect(v),onRename:I=>n.onRename(v),onDelete:I=>n.onDelete(v),onView:I=>n.onView(v),onDownload:I=>n.onDownload(v),onLoaded:I=>n.onFileLoaded(v,I),writeAccess:r.currentFolder.user_permission>=100,viewPdf:i.viewPdf,pdfModelLoading:r.pdfModelLoading===v.id,pdfPage:n.selectedPdfPage(v)},null,8,["width","file","projectId","spaceId","apiUrl","accessToken","onOpenFolder","select","disabled","multi","selected","success","onToggleSelect","onRename","onDelete","onView","onDownload","onLoaded","writeAccess","viewPdf","pdfModelLoading","pdfPage"]))),128))]),_:1},8,["itemWidth"])])):(D(),Y("div",USi,[m("div",null,[O(p,{size:"xxxl",fill:"",color:"silver"}),m("span",null,re(n.translate("emptyFolder")),1)])]))],64)):(D(),se(M,{key:3})),r.pdfPageSelectorDisplayed?(D(),Y("div",YSi,[O(f,{model:r.pdfModel,modelSelectedPage:r.pdfModelSelectedPage,onSelect:t.selectPdfPage,onClose:t.selectPdfPage},null,8,["model","modelSelectedPage","onSelect","onClose"])])):ve("",!0),n.modalDisplayed?(D(),Y("div",FSi,[r.entityRenown?(D(),se(w,{key:0,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,entity:r.entityRenown,onClose:e[3]||(e[3]=v=>r.entityRenown=null),onSuccess:n.onRenameSuccess,onError:e[4]||(e[4]=v=>t.$emit("error",v))},null,8,["projectId","spaceId","apiClient","entity","onSuccess"])):r.entityDeletable?(D(),se(L,{key:1,projectId:i.projectId,spaceId:i.spaceId,apiClient:r.apiClient,entity:r.entityDeletable,onClose:e[5]||(e[5]=v=>r.entityDeletable=null),onSuccess:n.onDeleteSuccess,onError:e[6]||(e[6]=v=>t.$emit("error",v))},null,8,["projectId","spaceId","apiClient","entity","onSuccess"])):ve("",!0)])):ve("",!0)])}const GSi=K(ESi,[["render",QSi],["__scopeId","data-v-af1635b9"]]),T0=25;function Eb(t){let e,i,o,r;if(Array.isArray(t)){let n,s;t.map(a=>{const{x:l,y:c,width:u,height:d}=a.getBoundingClientRect();(!n||n<l+u)&&(n=l+u),(!s||s<c+d)&&(s=c+d),(!e||e>l)&&(e=l),(!i||i>c)&&(i=c),o=n-e,r=s-i})}else{const{x:n,y:s,width:a,height:l}=t.getBoundingClientRect();e=n,i=s,o=a,r=l}return{x:e,y:i,w:o,h:r}}function Rde(){return{wWindow:window.innerWidth,hWindow:window.innerHeight}}function HSi(){return{offsetXWindow:window.pageXOffset,offsetYWindow:window.pageYOffset}}function VSi(t){return Math.sign(t)===-1}async function ZSi(t,e){const{y:i,h:o}=Eb(t),{hWindow:r}=Rde(),n=e.offsetTop,s=e.scrollTop;VSi(i)&&e.scroll({top:s+i-T0}),i<n&&e.scroll({top:s+i-n-T0}),i+o>r&&e.scroll({top:i+o-r+s+T0})}function JSi(t,e,i,o=0,r=0){const{x:n,y:s,w:a,h:l}=Eb(t),{w:c,h:u}=Eb(e),{wWindow:d,hWindow:h}=Rde(),A=e.getElementsByClassName("tooltip__box__top")[0],{h:g}=Eb(A),{offsetXWindow:p,offsetYWindow:M}=HSi();let f,w,L=0;const v=p+n,I=c+T0,C=M+s,b=u+T0,x=d-(v+a)>I,T=v>I;if(x){f=v+a+T0,h-C-l<b-l?(l<g&&(L=g/2+l/-2),w=C+l-u+L,i.dataset.position="down-right"):(l<g&&(L=g/-2+l/2),w=C+L,i.dataset.position="up-right"),Object.assign(e.style,{left:`${f+r}px`,top:`${w+o}px`});return}if(T){f=v-I,h-C-l<b-l?(l<g&&(L=g/2+l/-2),w=C+l-u+L,i.dataset.position="down-left"):(l<g&&(L=g/-2+l/2),w=C+L,i.dataset.position="up-left"),Object.assign(e.style,{left:`${f+r}px`,top:`${w+o}px`});return}const B=b<C-T0,S=h-(C+l)>b;if(B){i.dataset.position="bottom",Object.assign(e.style,{left:`${v+r}px`,top:`${C-b+o}px`});return}if(S){i.dataset.position="top",Object.assign(e.style,{left:`${v+r}px`,top:`${C+l+T0+o}px`});return}i.dataset.position="hidden",Object.assign(e.style,{left:`${v+a-c+r}px`,top:`${C+l-u+o}px`})}const WSi={skip:"Skip",next:"Next",continue:"Continue"},KSi={skip:"Passer",next:"Suivant",continue:"Continuer"},Ude={en:WSi,fr:KSi},qSi={props:{locale:{type:String,default:"en"},tours:{type:Array,default:()=>[]},tourToDisplay:{type:String,default:()=>""},elementToObserve:{type:[Object,HTMLElement],default:()=>{}},zIndex:{type:Number,default:()=>1e4},transitionDuration:{type:Number,default:()=>.3}},emits:["set-completed-tour"],data(){return{steps:[],showGuidedTour:!1,currentTarget:null,showTooltip:!1,stepIndex:0}},computed:{currentStep(){return this.steps[this.stepIndex]},nextStep(){return this.steps[this.stepIndex+1]},centeredTooltip(){return this.currentStep&&!this.currentStep.target},isStepIntro(){return this.stepIndex===0},isStepOutro(){return this.stepIndex===this.steps.length-1}},watch:{steps(){this.stepIndex=0},async currentStep(t){var e;try{if(!t)return;if(this.currentTarget=null,t.target)this.currentTarget=this.getDomElements(t);else{this.showTooltip=!0;return}(e=t.action)==null||e.call(t,this.currentTarget.element.getAttribute("data-guide-param")),t.clickable&&this.clickListener(),ZSi(this.currentTarget.element,this.elementToObserve),JSi(this.currentTarget.element,this.$refs.tooltip,this.$refs.arrow,t.yOffset,t.xOffset),this.showTooltip=!0}catch{this.closeGuidedTour()}}},created(){this.mutationObserver=new MutationObserver(this.handleClickedStep)},mounted(){const t=this.tours.find(e=>e.name===this.tourToDisplay);t?this.openGuidedTour(t.steps):console.warn(`GuideTour: unknown tour ${this.tourToDisplay}`)},unmounted(){this.mutationObserver.disconnect()},destroyed(){this.mutationObserver.disconnect()},methods:{clickNext(){this.resetSettings(),setTimeout(()=>{this.currentStep.clickable?(this.currentTarget.elementToClick||this.currentTarget.element).click():this.next()},this.transitionDuration*1e3)},openGuidedTour(t){this.steps=t.map(e=>({...e,layout:e.layout?Object.freeze(e.layout):null})),this.showGuidedTour=!0},getDomElements(t,e=document){const{target:i,targetDetail:o,targetToClick:r,targetToClickDetail:n}=t;let s,a;return Array.isArray(i)?s=i.map(l=>e.querySelector(`[data-guide=${l}]`)):typeof i=="string"&&(s=e.querySelector(`[data-guide=${i}] ${o||""}`)),r&&(a=e.querySelector(`[data-guide-click=${r}] ${n||""}`)),{element:s,elementToClick:a}},closeGuidedTour(){this.showGuidedTour=!1,this.steps=[]},next(){this.stepIndex++},close(){this.showTooltip=!1,this.closeGuidedTour(),this.$emit("set-completed-tour",this.tourToDisplay)},resetSettings(){this.showTooltip=!1},clickListener(){(this.currentTarget.elementToClick||this.currentTarget.element).addEventListener("click",()=>{this.nextStep.target?this.mutationObserver.observe(this.elementToObserve,{childList:!0,subtree:!0}):this.next()},{once:!0})},handleClickedStep(){const{element:t}=this.getDomElements(this.nextStep,this.elementToObserve),e=t instanceof HTMLElement,i=Array.isArray(t)&&t.every(o=>o instanceof HTMLElement);(e||i)&&(this.next(),this.mutationObserver.disconnect())},translate(t){return(Ude[this.locale]||Ude.en)[t]}}},XSi={ref:"arrow",class:"arrow"},_Si={class:"tooltip__box"},$Si={class:"tooltip__box__top"},eTi={class:"tooltip__box__progress-bar"},tTi={class:"tooltip__box__bottom"},iTi={class:"tooltip__box__bottom__title"},oTi={class:"tooltip__box__bottom__text"},rTi={class:"tooltip__box__footer"},sTi={class:"tooltip__box__footer__step-counter"},nTi={key:0,class:"tooltip__box__footer__btn-skip"},aTi={key:1,class:"tooltip__box__footer__ghost-element"},lTi={key:2,class:"tooltip__box__footer__btn-start"},cTi={key:3,class:"tooltip__box__footer__btn-next"};function uTi(t,e,i,o,r,n){const s=z("BIMDataButton"),a=z("BIMDataIconChevron");return St((D(),Y("div",{ref:"guidedTourPortal",class:be(["guided-tour-portal",{centeredTooltip:n.centeredTooltip}]),style:Ie(`z-index: ${i.zIndex}`)},[n.currentStep?(D(),Y("div",{key:0,ref:"tooltip",class:"tooltip",style:Ie({opacity:r.showTooltip?1:0,transition:`opacity ${i.transitionDuration}s ease-in-out`})},[m("div",XSi,null,512),m("div",_Si,[m("div",$Si,[m("div",{class:"tooltip__box__top__image",style:Ie({background:`var(--platform-background) url(${n.currentStep.props.img}) no-repeat ${n.currentStep.props.imgPosition} / ${n.currentStep.props.imgSize}`})},null,4)]),m("div",eTi,[(D(!0),Y(Mt,null,ei(r.steps,(l,c)=>(D(),Y("div",{class:"tooltip__progress-bar__step",key:c,style:Ie({width:`calc(100% / ${r.steps.length})`,backgroundColor:r.steps.indexOf(n.currentStep)>=c?"var(--color-secondary)":""})},null,4))),128))]),m("div",tTi,[m("div",iTi,re(n.currentStep.props.title),1),m("div",oTi,re(n.currentStep.props.content),1)]),m("div",rTi,[m("div",sTi,[m("span",null,re(r.stepIndex+1),1),m("span",null,"/"+re(r.steps.length),1)]),n.isStepOutro?(D(),Y("div",aTi)):(D(),Y("div",nTi,[O(s,{width:"0px",height:"0px",color:"granite",onClick:n.close},{default:W(()=>[At(re(n.translate("skip")),1)]),_:1},8,["onClick"])])),n.isStepOutro?(D(),Y("div",lTi,[O(s,{width:"0px",height:"0px",color:"granite",onClick:n.close},{default:W(()=>[At(re(n.translate("continue")),1)]),_:1},8,["onClick"])])):(D(),Y("div",cTi,[O(s,{width:"0px",height:"0px",color:"primary",fill:"",radius:"",onClick:n.clickNext},{default:W(()=>[m("span",null,re(n.translate("next")),1),O(a,{size:"xxs",fill:"",color:"white"})]),_:1},8,["onClick"])]))])])],4)):ve("",!0)],6)),[[Mi,r.showGuidedTour]])}const dTi=K(qSi,[["render",uTi],["__scopeId","data-v-37f3ddef"]]),hTi={props:{width:{type:Number},height:{type:Number},previewUrl:{type:String},defaultUrl:{type:String},zoomFactor:{type:Number}},data(){return{hover:!1,zoomX:0,zoomY:0}},computed:{imgUrl(){return this.previewUrl||this.defaultUrl},zoomTransform(){return`
1866
1866
  translate(${this.zoomX}px, ${this.zoomY}px)
1867
1867
  `},zoomImageTransform(){return`
1868
1868
  scale(${this.zoomFactor})
package/index.d.ts CHANGED
@@ -1,15 +1,6 @@
1
1
  /// <reference types="./types/api"/>
2
- /// <reference types="./types/context-menu"/>
3
- /// <reference types="./types/events"/>
4
- /// <reference types="./types/global-context"/>
5
- /// <reference types="./types/local-context"/>
6
2
  /// <reference types="./types/models"/>
7
- /// <reference types="./types/plugins"/>
8
- /// <reference types="./types/shortcuts"/>
9
3
  /// <reference types="./types/state"/>
10
- /// <reference types="./types/windows"/>
11
- /// <reference types="./types/xeokit"/>
12
- /// <reference types="./types/$viewer"/>
13
4
 
14
5
  declare module "@bimdata/viewer" {
15
6
  export default function makeBIMDataViewer(cfg: BDV.ViewerConfig): BDV.Viewer;
@@ -25,9 +16,6 @@ declare namespace BDV {
25
16
  registerWindow(window: Object): void;
26
17
  unregisterWindow(name: string): void;
27
18
  loadModels(modelIds: number[]): Promise<StateModel[]>;
28
-
29
- /** @deprecated use `loadModels` instead */
30
- loadIfcs(ifcIds: number[]): Promise<StateModel[]>;
31
19
  }
32
20
 
33
21
  type ViewerLocale = "de" | "en" | "es" | "fr" | "it";
@@ -40,16 +28,40 @@ declare namespace BDV {
40
28
  }
41
29
 
42
30
  interface ViewerConfigUI {
43
- headerVisible?: boolean;
44
- windowManager?: boolean;
45
- version?: boolean;
46
31
  bimdataLogo?: boolean;
47
- contextMenu?: {
48
- defaultCommands?: boolean;
49
- };
32
+ contextMenu?: boolean;
33
+ header?: boolean;
34
+ resizable?: boolean;
50
35
  style?: {
51
36
  backgroundColor?: string;
37
+ colorPrimary?: string;
38
+ colorPrimaryLighter?: string;
39
+ colorPrimaryLight?: string;
40
+ colorPrimaryDark?: string;
41
+ colorSecondary?: string;
42
+ colorSecondaryLight?: string;
43
+ colorSecondaryLighter?: string;
44
+ colorSecondaryDark?: string;
45
+ colorSilverLight?: string;
46
+ colorSilver?: string;
47
+ colorSilverDark?: string;
48
+ colorGraniteLight?: string;
49
+ colorGranite?: string;
50
+ colorSuccess?: string;
51
+ colorSuccessLight?: string;
52
+ colorSuccessLighter?: string;
53
+ colorSuccessDark?: string;
54
+ colorWarning?: string;
55
+ colorWarningLight?: string;
56
+ colorWarningLighter?: string;
57
+ colorWarningDark?: string;
58
+ colorHigh?: string;
59
+ colorHighLight?: string;
60
+ colorHighLighter?: string;
61
+ colorHighDark?: string;
62
+ colorText?: string;
52
63
  };
64
+ version?: boolean;
53
65
  }
54
66
 
55
67
  interface ViewerConfigApi {
@@ -62,19 +74,12 @@ declare namespace BDV {
62
74
 
63
75
  offline?: {
64
76
  enabled: boolean;
65
- dataFile: string;
77
+ data: string;
66
78
  };
67
-
68
- /** @deprecated use `modelIds` instead */
69
- ifcIds?: number[];
70
79
  }
71
80
 
72
81
  interface ViewerConfigPlugins {
73
- // --- General config ---
74
- windowSelector?: boolean; // Enable/Disable window selector
75
-
76
- // --- Native plugins config ---
77
-
82
+ accessMarketplace: boolean;
78
83
  alerts?: boolean;
79
84
  bcf?:
80
85
  | boolean
@@ -99,7 +104,6 @@ declare namespace BDV {
99
104
  };
100
105
  fullscreen?: boolean;
101
106
  ged?: boolean;
102
- header?: boolean;
103
107
  measure2d?: boolean;
104
108
  measure3d?: boolean;
105
109
  navigationVersionsModel?: boolean;
@@ -178,6 +182,6 @@ declare namespace BDV {
178
182
  pivotMarker?: boolean;
179
183
  };
180
184
  "viewer3d-parameters"?: boolean;
181
- "window-split"?: boolean;
185
+ "window-manager"?: boolean;
182
186
  }
183
187
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bimdata/viewer",
3
3
  "type": "module",
4
- "version": "2.2.0-beta.3",
4
+ "version": "2.2.0-beta.5",
5
5
  "description": "A customizable BIM viewer.",
6
6
  "keywords": [
7
7
  "bim",
@@ -1,15 +0,0 @@
1
- declare namespace BDV {
2
- interface ContextMenuCommand {
3
- label: string;
4
- picto: string;
5
- execute(): void;
6
- predicate?(): boolean;
7
- }
8
-
9
- interface ContextMenu {
10
- preventDefault(): void;
11
- registerContextCommand(command: ContextMenuCommand): boolean;
12
- registerCommand(command: ContextMenuCommand): boolean;
13
- unregisterCommand(command: ContextMenuCommand): boolean;
14
- }
15
- }
@@ -1,23 +0,0 @@
1
- declare namespace BDV {
2
- interface Shortcut {
3
- name: string;
4
- context: GlobalContext | LocalContext;
5
- key: string;
6
- ctrlKey: boolean;
7
- shiftKey: boolean;
8
- altKey: boolean;
9
- execute(): void;
10
- }
11
-
12
- interface ShortcutManager {
13
- active: boolean;
14
- activeLocalContext?: LocalContext;
15
- shortcuts: Shortcut[];
16
-
17
- getShortcuts(context: GlobalContext | LocalContext): Shortcut[];
18
- getShortcut(name: string, context: GlobalContext | LocalContext): Shortcut;
19
- registerShortcut(shortcut: Shortcut, context: GlobalContext | LocalContext): boolean;
20
- unregisterShortcut(name: string, context: GlobalContext | LocalContext): boolean;
21
- destroy(): void;
22
- }
23
- }
package/types/xeokit.d.ts DELETED
@@ -1,3 +0,0 @@
1
- type XktViewer = any;
2
-
3
- type XktModel = any;