@amsom-habitat/ui 2.20.11 → 2.20.12

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.
Files changed (3) hide show
  1. package/dist/ui.js +543 -542
  2. package/dist/ui.umd.cjs +4 -4
  3. package/package.json +11 -11
package/dist/ui.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(V,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("@fortawesome/vue-fontawesome"),require("@fortawesome/fontawesome-svg-core"),require("@fortawesome/free-solid-svg-icons"),require("vue"),require("@amsom-habitat/file-utils"),require("vue-draggable-next"),require("moment-timezone"),require("@amsom-habitat/date-utils"),require("pdf-merger-js")):typeof define=="function"&&define.amd?define(["exports","@fortawesome/vue-fontawesome","@fortawesome/fontawesome-svg-core","@fortawesome/free-solid-svg-icons","vue","@amsom-habitat/file-utils","vue-draggable-next","moment-timezone","@amsom-habitat/date-utils","pdf-merger-js"],j):(V=typeof globalThis<"u"?globalThis:V||self,j(V.AmsomUI={},V.FontAwesomeVue,V.FontAwesomeCore,V.FontAwesomeSolid,V.Vue,V.AmsomFileUtils,V.VueDraggableNext,V.moment,V.AmsomDateUtils,V.PDFMerger))})(this,function(V,j,me,T,n,R,nn,ee,rn,an){"use strict";const on=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r};me.library.add(T.faTimes);const ln={name:"AmsomModalComponent",components:{FontAwesomeIcon:j.FontAwesomeIcon},props:{closeOption:{type:Boolean,default:!1},size:{type:String,default:"md",validator(a){return["xxs","xs","sm","md","lg","xl"].includes(a)}},position:{type:String,default:"center",validator(a){return["top","center","bottom"].includes(a)}},title:{type:String,default:""},reducible:{type:Boolean,default:!1},classTitle:{type:String,default:"h4 text-center"}},emits:["close"],data(){return{alreadyHidden:!1,modalId:this.$options.modalManager.generateModalId(),reduced:!1,mouseDownOnBackdrop:!1}},modalManager:{openModals:[],baseZIndex:1e4,zIndexIncrement:10,modalCounter:0,sizes:{xxs:"col-12 col-md-3",xs:"col-12 col-md-4",sm:"col-12 col-md-6",md:"col-12 col-md-8",lg:"col-12 col-md-10",xl:"col-12"},generateModalId(){return`modal-${Date.now()}-${++this.modalCounter}`},register(a){this.openModals.push(a)},unregister(a){const o=this.openModals.indexOf(a);o>-1&&this.openModals.splice(o,1)},getTopModal(){return this.openModals[this.openModals.length-1]},clear(){this.openModals.length=0}},computed:{modalZIndex(){const a=this.$options.modalManager.openModals.indexOf(this.modalId);return this.$options.modalManager.baseZIndex+(a>=0?a*this.$options.modalManager.zIndexIncrement:0)},modalSize(){return this.$options.modalManager.sizes[this.size]||this.$options.modalManager.sizes.md},alignmentClass(){return{top:"flex-start",center:"center",bottom:"flex-end"}[this.position]||"center"}},mounted(){this.$options.modalManager.register(this.modalId),this.$options.modalManager.openModals.length===1&&this.lockBodyScroll(),this.closeOption&&document.addEventListener("keydown",this.closeEsc)},beforeUnmount(){this.$options.modalManager.unregister(this.modalId),this.$options.modalManager.openModals.length===0&&this.unlockBodyScroll(),this.closeOption&&document.removeEventListener("keydown",this.closeEsc)},methods:{lockBodyScroll(){if(window.getComputedStyle(document.body).overflow==="hidden"){this.alreadyHidden=!0;return}document.body.style.overflow="hidden"},unlockBodyScroll(){this.alreadyHidden||(document.body.style.overflow="")},handleBackdropMouseDown(a){a.target===a.currentTarget&&(this.mouseDownOnBackdrop=!0)},handleModalMouseDown(){this.mouseDownOnBackdrop=!1},handleModalMouseUp(){this.mouseDownOnBackdrop=!1},handleBackdropClick(a){a.target===a.currentTarget&&this.mouseDownOnBackdrop&&this.closeOption&&this.$emit("close"),this.mouseDownOnBackdrop=!1},closeEsc(a){a.key==="Escape"&&this.$options.modalManager.getTopModal()===this.modalId&&this.$emit("close")}}},dn=["id"],cn={class:"amsom-modal-body mt-2"},un=n.createElementVNode("p",null," Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. ",-1),mn={key:0,class:"position-fixed bottom-0 end-0 mb-3 me-3"},hn={key:0,class:"position-fixed bottom-0 end-0 mb-3 me-3"};function fn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[n.createElementVNode("div",{class:n.normalizeClass(["p-2 m-0 bg-black bg-opacity-25 position-fixed overflow-y-auto",{"d-none":m.reduced}]),style:n.normalizeStyle({zIndex:u.modalZIndex,inset:0}),onMousedown:o[7]||(o[7]=(...g)=>u.handleBackdropMouseDown&&u.handleBackdropMouseDown(...g)),onClick:o[8]||(o[8]=(...g)=>u.handleBackdropClick&&u.handleBackdropClick(...g))},[n.createElementVNode("div",{class:"d-flex justify-content-center",style:n.normalizeStyle({minHeight:"100%",alignItems:u.alignmentClass,paddingTop:r.position==="center"?"2rem":"1rem",paddingBottom:r.position==="center"?"2rem":"1rem"}),onMousedown:o[4]||(o[4]=(...g)=>u.handleBackdropMouseDown&&u.handleBackdropMouseDown(...g)),onClick:o[5]||(o[5]=(...g)=>u.handleBackdropClick&&u.handleBackdropClick(...g))},[n.createElementVNode("div",{id:m.modalId,class:n.normalizeClass(["container-fluid bg-white rounded-4 p-3 position-relative d-flex flex-column",u.modalSize]),style:{minHeight:"auto",maxHeight:"none"},onClick:o[1]||(o[1]=n.withModifiers(()=>{},["stop"])),onMousedown:o[2]||(o[2]=(...g)=>u.handleModalMouseDown&&u.handleModalMouseDown(...g)),onMouseup:o[3]||(o[3]=(...g)=>u.handleModalMouseUp&&u.handleModalMouseUp(...g))},[r.closeOption?(n.openBlock(),n.createBlock(p,{key:0,icon:"fa-solid fa-times",role:"button",class:"position-absolute top-0 end-0 m-3 translate-middle-y",size:"lg",onClick:o[0]||(o[0]=g=>a.$emit("close"))})):n.createCommentVNode("",!0),n.createElementVNode("div",cn,[n.renderSlot(a.$slots,"title",{},()=>[r.title?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(r.classTitle)},n.toDisplayString(r.title),3)):n.createCommentVNode("",!0)]),n.renderSlot(a.$slots,"default",{},()=>[un])])],42,dn)],36),r.reducible?(n.openBlock(),n.createElementBlock("div",mn,[n.createElementVNode("button",{class:"btn btn-primary",onClick:o[6]||(o[6]=g=>m.reduced=!m.reduced)}," Réduire la fenêtre ")])):n.createCommentVNode("",!0)],38),r.reducible&&m.reduced?(n.openBlock(),n.createElementBlock("div",hn,[n.createElementVNode("button",{class:"btn btn-primary",onClick:o[9]||(o[9]=g=>m.reduced=!m.reduced)}," Restaurer la fenêtre ")])):n.createCommentVNode("",!0)])}const dt=on(ln,[["render",fn]]),Z=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r},gn={name:"AmsomCard",props:{title:{type:String,default:null},bgImage:{type:String,default:null},bgOpacity:{type:Number,default:.25,validator:a=>a>=0&&a<=1},bubbleTitle:{type:Boolean,default:!1},bubbleTitleClass:{type:String,default:"bg-primary text-white"},noBody:{type:Boolean,default:!1},header:{type:Boolean,default:!1},headerClass:{type:String,default:""},cardClass:{type:String,default:""},cardStyle:{type:String,default:""},footer:{type:Boolean,default:!1},footerClass:{type:String,default:""}}},yn={class:"position-relative"},pn={key:0,class:"card-title"},kn=["src"];function _n(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",yn,[r.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["card card-header",r.headerClass])},[n.renderSlot(a.$slots,"header")],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["card position-relative h-100",[{"rounded-top-0":r.header,"rounded-bottom-0":r.footer},r.cardClass]])},[n.createElementVNode("div",{class:"position-relative overflow-y-auto h-100",style:n.normalizeStyle(r.cardStyle)},[n.createElementVNode("div",{class:n.normalizeClass([{"card-body":!r.noBody}]),style:{position:"relative","z-index":"1"}},[n.renderSlot(a.$slots,"title",{},()=>[r.title&&!r.bubbleTitle?(n.openBlock(),n.createElementBlock("h4",pn,n.toDisplayString(r.title),1)):n.createCommentVNode("",!0)]),n.renderSlot(a.$slots,"default")],2)],4),r.bgImage?(n.openBlock(),n.createElementBlock("img",{key:0,src:r.bgImage,class:n.normalizeClass(["img img-fluid bg-white object-fit-cover h-100 w-100 position-absolute top-0 start-0",[{"rounded-top-0":r.header,"rounded-bottom-0":r.footer}]]),alt:"Image de fond du widget",style:n.normalizeStyle({opacity:r.bgOpacity,zIndex:0,borderRadius:"inherit"})},null,14,kn)):n.createCommentVNode("",!0)],2),r.title&&r.bubbleTitle?(n.openBlock(),n.createElementBlock("span",{key:1,id:"bubble-title",class:n.normalizeClass(["position-absolute top-0 start-0 translate-middle-y rounded-pill shadow px-1",r.bubbleTitleClass]),style:{"z-index":"2"}},n.toDisplayString(r.title),3)):n.createCommentVNode("",!0),r.footer?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["card card-footer",r.footerClass])},[n.renderSlot(a.$slots,"footer")],2)):n.createCommentVNode("",!0)])}const qt=Z(gn,[["render",_n]]),Sn={name:"AmsomOverlay",props:{loading:{type:Boolean,default:!1,required:!0},opacity:{type:Number,default:60,required:!1,validator:a=>a>=0&&a<=100}}},bn={class:"position-relative"},wn={class:"position-sticky sticky-top text-center"};function Cn(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",bn,[r.loading?(n.openBlock(),n.createElementBlock("div",{key:0,class:"position-absolute w-100 h-100 d-flex align-items-center justify-content-center rounded",style:n.normalizeStyle({backgroundColor:"rgba(193, 193, 193,"+r.opacity/100+")",boxShadow:"inset 0 0 0 10px rgba(193, 193, 193, 0.5)",zIndex:1090})},[n.renderSlot(a.$slots,"loading",{},()=>[n.createElementVNode("div",wn,[o[0]||(o[0]=n.createElementVNode("div",{class:"spinner-border text-primary",role:"status"},[n.createElementVNode("span",{class:"sr-only visually-hidden"},"Chargement...")],-1)),n.renderSlot(a.$slots,"loading-sub-message")])])],4)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"default")])}const ct=Z(Sn,[["render",Cn]]);me.library.add(T.faCheck);const xn={name:"WorkflowAssuranceBlock",components:{FontAwesomeIcon:j.FontAwesomeIcon},props:{steps:{type:Array,required:!0,default:()=>[{numero:1,texte:"Step 1"},{numero:2,texte:"Step 2"},{numero:3,texte:"Step 3"}]},currentStep:{type:Number,required:!1,default:1},size:{type:String,required:!1,default:"md"},checkPassedStep:{type:Boolean,required:!1,default:!0},passedStepBgColor:{type:String,required:!1,default:"success"},currentStepBgColor:{type:String,required:!1,default:"primary"},futureStepBgColor:{type:String,required:!1,default:"secondary"},passedStepCss:{type:String,required:!1,default:"text-white"},currentStepCss:{type:String,required:!1,default:"text-white fw-bold"},futureStepCss:{type:String,required:!1,default:"text-white"},passedStepTextCss:{type:String,required:!1,default:"white"},currentStepTextCss:{type:String,required:!1,default:"white"},futureStepTextCss:{type:String,required:!1,default:"white"},hideText:{type:Boolean,required:!1,default:!1}},emits:["clickStep"],computed:{fontSize(){return this.bubbleSize/2},bubbleSize(){switch(this.size){case"sm":return 2;case"lg":return 4;default:return 3}}}},Mn={class:"d-flex flex-column align-items-center"},Dn=["onClick"],Pn={key:0,class:"line h-100",style:{height:"30px","min-height":"30px"}};function Nn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.steps,(g,k)=>(n.openBlock(),n.createElementBlock("div",{key:g.numero,class:"d-flex mb-1"},[n.createElementVNode("div",Mn,[n.createElementVNode("div",{style:n.normalizeStyle({width:u.bubbleSize+"rem",minHeight:u.bubbleSize+"rem",height:u.bubbleSize+"rem",lineHeight:u.bubbleSize+"rem",fontSize:u.fontSize+"rem"}),class:n.normalizeClass(["d-inline-block rounded-circle text-center mb-1",["bg-"+(k+1<r.currentStep?r.passedStepBgColor:k+1===r.currentStep?r.currentStepBgColor:r.futureStepBgColor),k+1<r.currentStep?r.passedStepCss:k+1===r.currentStep?r.currentStepCss:r.futureStepCss]]),onClick:h=>a.$emit("clickStep",g.numero)},[k+1<r.currentStep&&r.checkPassedStep?(n.openBlock(),n.createBlock(p,{key:0,icon:["fas","check"]})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(g.numero),1)],64))],14,Dn),k<r.steps.length-1?(n.openBlock(),n.createElementBlock("div",Pn)):n.createCommentVNode("",!0)]),r.hideText?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(["ms-1",[k+1<r.currentStep?r.passedStepTextCss:k+1===r.currentStep?r.currentStepTextCss:r.futureStepTextCss]]),style:n.normalizeStyle({minHeight:u.bubbleSize+"rem",lineHeight:u.bubbleSize+"rem"})},[n.renderSlot(a.$slots,"stepContent",{step:g},()=>[n.createTextVNode(n.toDisplayString(g.texte),1)],!0)],6))]))),128)}const Bn=Z(xn,[["render",Nn],["__scopeId","data-v-5eab4376"]]);me.library.add(T.faCheck);const ut={name:"AmsomHorizontalStepper",components:{FontAwesomeIcon:j.FontAwesomeIcon},props:{currentStep:{type:Number,required:!0,default:1},steps:{type:Array,required:!0,default:()=>[{numero:1,texte:"Step 1"},{numero:2,texte:"Step 2"},{numero:3,texte:"Step 3"}]},size:{type:String,required:!1,default:"md",validator:function(a){return["sm","md","lg"].indexOf(a)!==-1}},checkPassedStep:{type:Boolean,required:!1,default:!0},passedStepBgColor:{type:String,required:!1,default:"success"},currentStepBgColor:{type:String,required:!1,default:"primary"},futureStepBgColor:{type:String,required:!1,default:"secondary"},passedStepCss:{type:String,required:!1,default:"text-white"},currentStepCss:{type:String,required:!1,default:"text-white fw-bold"},futureStepCss:{type:String,required:!1,default:"text-white"},passedStepTextCss:{type:String,required:!1,default:""},currentStepTextCss:{type:String,required:!1,default:"fw-bold"},futureStepTextCss:{type:String,required:!1,default:""},hideText:{type:Boolean,required:!1,default:!1}},emits:["clickStep"],computed:{fontSizeText(){return this.bubbleSize/2.5},fontSizeStep(){return this.bubbleSize/2},bubbleSize(){switch(this.size){case"sm":return 2;case"lg":return 4;default:return 3}},passedStepBgColorCss(){return"var(--bs-"+this.passedStepBgColor+")"},futureStepBgColorCss(){return"var(--bs-"+this.futureStepBgColor+")"},currentStepBgColorCss(){return"var(--bs-"+this.currentStepBgColor+")"},lineTopCss(){return"calc("+this.bubbleSize+"/ 2)"}}},vt=()=>{n.useCssVars(a=>({v31536048:a.futureStepBgColorCss,dac29eac:a.bubbleSize+"rem",a3a0806e:a.passedStepBgColorCss,de0182ca:a.fontSizeStep+"rem"}))},Gt=ut.setup;ut.setup=Gt?(a,o)=>(vt(),Gt(a,o)):vt;const Tn={class:"d-flex justify-content-between"},En=["role","onClick"];function Vn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(),n.createElementBlock("div",Tn,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.steps,(g,k)=>(n.openBlock(),n.createElementBlock("div",{key:g.numero,role:g.numero<r.currentStep?"button":"none",class:n.normalizeClass(["stepper-item",[{active:g.numero===r.currentStep,completed:g.numero<r.currentStep}]]),onClick:h=>a.$emit("clickStep",g.numero)},[n.createElementVNode("div",{class:n.normalizeClass(["step-counter",["bg-"+(k+1<r.currentStep?r.passedStepBgColor:k+1===r.currentStep?r.currentStepBgColor:r.futureStepBgColor),k+1<r.currentStep?r.passedStepCss:k+1===r.currentStep?r.currentStepCss:r.futureStepCss]]),style:n.normalizeStyle({fontSize:u.fontSizeStep+"rem"})},[k+1<r.currentStep&&r.checkPassedStep?(n.openBlock(),n.createBlock(p,{key:0,icon:["fas","check"]})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(g.numero),1)],64))],6),r.hideText?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["step-name",[k+1<r.currentStep?r.passedStepTextCss:k+1===r.currentStep?r.currentStepTextCss:r.futureStepTextCss]]),style:n.normalizeStyle({fontSize:u.fontSizeText+"rem"})},n.toDisplayString(g.texte),7))],10,En))),128))])}const Yn=Z(ut,[["render",Vn]]);me.library.add(T.faCamera,T.faTrash,T.faArrowRight,T.faArrowLeft);const In={name:"PhotoComponent",components:{AmsomModal:dt,FontAwesomeIcon:j.FontAwesomeIcon},props:{images:{type:Array,default:()=>[]},imageSizeWidth:{type:String,default:"50px"},imageSizeHeight:{type:String,default:"50px"},imagesLimit:{type:Number,default:-1},capture:{type:String,default:"file"}},emits:["update:images"],data(){return{showModal:!1,selectedPhotoIndex:0}},computed:{canAddImage(){return this.imagesLimit===-1?!0:this.imagesLimit!==-1&&this.images.length<this.imagesLimit}},methods:{triggerFileInput(){this.$refs.fileInput.click()},openPhoto(a){this.selectedPhotoIndex=this.images.findIndex(o=>o===a),this.showModal=!0},closeModal(){this.showModal=!1},changeIndex(a){a===0?this.selectedPhotoIndex=this.selectedPhotoIndex===0?0:this.selectedPhotoIndex-1:this.selectedPhotoIndex=this.selectedPhotoIndex===this.images.length-1?0:this.selectedPhotoIndex+1},deleteImage(){this.$emit("update:images",this.images.filter((a,o)=>o!==this.selectedPhotoIndex)),this.images.length-1===0?this.closeModal():this.changeIndex(0)},getDataFiles(a){let o=a.target.files;if(o){this.imagesLimit!==-1&&(o=Array.from(o),o=o.slice(0,this.imagesLimit));for(let r of o)R.isImage(r)&&R.resizeImage({file:r,maxWidth:this.maxWidth,maxHeigth:this.maxHeigth}).then(c=>{R.handleFile(R.base64ToBlob(c),r.type.split("/")[1]).then(m=>{m.nomFichier=r.name,this.$emit("update:images",[...this.images,m])})})}}}},On={class:"border border-1 border-grey rounded-4 p-2 d-flex align-items-center"},Ln=["disabled"],An=["capture"],Fn={key:0,class:"d-flex overflow-x-auto w-100"},zn=["onClick"],Rn=["src","alt"],Hn={key:1,class:"fs-7"},jn={class:"row w-100 mx-auto"},Wn={class:"col-12 mb-3"},Un=["src","alt"],qn={class:"col-12 d-flex justify-content-center"};function vn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon"),g=n.resolveComponent("amsom-modal");return n.openBlock(),n.createElementBlock("div",On,[n.createElementVNode("button",{type:"button",class:"btn rounded-4 me-1 d-flex justify-content-center align-items-center",style:n.normalizeStyle({width:r.imageSizeWidth,minWidth:r.imageSizeWidth,height:r.imageSizeHeight,minHeight:r.imageSizeHeight,backgroundColor:"#a4a228"}),disabled:!u.canAddImage,onClick:o[2]||(o[2]=(...k)=>u.triggerFileInput&&u.triggerFileInput(...k))},[n.createVNode(p,{icon:"fa-solid fa-camera",size:"lg",class:"text-white"}),r.capture==="file"?(n.openBlock(),n.createElementBlock("input",{key:0,id:"file",ref:"fileInput",type:"file",class:"form-control",accept:"image/*",style:{display:"none"},multiple:"",onInput:o[0]||(o[0]=(...k)=>u.getDataFiles&&u.getDataFiles(...k))},null,544)):(n.openBlock(),n.createElementBlock("input",{key:1,id:"file",ref:"fileInput",type:"file",class:"form-control",style:{display:"none"},accept:"image/*",multiple:"",capture:r.capture,onInput:o[1]||(o[1]=(...k)=>u.getDataFiles&&u.getDataFiles(...k))},null,40,An))],12,Ln),r.images.length>0?(n.openBlock(),n.createElementBlock("div",Fn,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.images,k=>(n.openBlock(),n.createElementBlock("button",{key:k,type:"button",class:"btn p-0 mx-1 rounded-1",style:n.normalizeStyle({minWidth:r.imageSizeWidth,width:r.imageSizeWidth,minHeight:r.imageSizeHeight,height:r.imageSizeHeight}),onClick:h=>u.openPhoto(k)},[n.createElementVNode("img",{src:"data:"+(k==null?void 0:k.type)+";base64,"+(k==null?void 0:k.file),class:"h-100 w-100 rounded-1",alt:k==null?void 0:k.nomFichier},null,8,Rn)],12,zn))),128))])):(n.openBlock(),n.createElementBlock("div",Hn," Ajouter une image ")),m.showModal?(n.openBlock(),n.createBlock(g,{key:2,size:"sm","close-option":"",onClose:u.closeModal},{default:n.withCtx(()=>{var k,h,B;return[n.createElementVNode("div",jn,[n.createElementVNode("div",Wn,[n.createElementVNode("img",{src:"data:"+((k=r.images[m.selectedPhotoIndex])==null?void 0:k.type)+";base64,"+((h=r.images[m.selectedPhotoIndex])==null?void 0:h.file),alt:(B=r.images[m.selectedPhotoIndex])==null?void 0:B.nomFichier,class:"h-100 w-100"},null,8,Un)]),n.createElementVNode("div",qn,[n.createElementVNode("button",{type:"button",class:"btn btn-primary mx-1",onClick:o[3]||(o[3]=b=>u.changeIndex(0))},[n.createVNode(p,{icon:"fa-arrow-left",size:"lg"})]),n.createElementVNode("button",{type:"button",class:"btn btn-primary mx-1",onClick:o[4]||(o[4]=b=>u.changeIndex(1))},[n.createVNode(p,{icon:"fa-arrow-right",size:"lg"})]),n.createElementVNode("button",{type:"button",class:"btn btn-danger ms-auto",onClick:o[5]||(o[5]=(...b)=>u.deleteImage&&u.deleteImage(...b))},[n.createVNode(p,{icon:"fa-trash",size:"lg"})])])])]}),_:1},8,["onClose"])):n.createCommentVNode("",!0)])}const Gn=Z(In,[["render",vn]]);var $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zt(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Kt={exports:{}},Jt;function $n(){return Jt||(Jt=1,function(a,o){(function(r,c){a.exports=c()})($t,function(){var r;function c(){return r.apply(null,arguments)}function m(e){r=e}function u(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function p(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function k(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(g(e,t))return!1;return!0}function h(e){return e===void 0}function B(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function b(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function te(e,t){var s=[],i,l=e.length;for(i=0;i<l;++i)s.push(t(e[i],i));return s}function se(e,t){for(var s in t)g(t,s)&&(e[s]=t[s]);return g(t,"toString")&&(e.toString=t.toString),g(t,"valueOf")&&(e.valueOf=t.valueOf),e}function K(e,t,s,i){return Is(e,t,s,i,!0).utc()}function Fr(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function x(e){return e._pf==null&&(e._pf=Fr()),e._pf}var ht;Array.prototype.some?ht=Array.prototype.some:ht=function(e){var t=Object(this),s=t.length>>>0,i;for(i=0;i<s;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};function ft(e){var t=null,s=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(t=x(e),s=ht.call(t.parsedDateParts,function(l){return l!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),e._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i;return e._isValid}function je(e){var t=K(NaN);return e!=null?se(x(t),e):x(t).userInvalidated=!0,t}var ls=c.momentProperties=[],gt=!1;function yt(e,t){var s,i,l,d=ls.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=x(t)),h(t._locale)||(e._locale=t._locale),d>0)for(s=0;s<d;s++)i=ls[s],l=t[i],h(l)||(e[i]=l);return e}function Ee(e){yt(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),gt===!1&&(gt=!0,c.updateOffset(this),gt=!1)}function v(e){return e instanceof Ee||e!=null&&e._isAMomentObject!=null}function ds(e){c.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function W(e,t){var s=!0;return se(function(){if(c.deprecationHandler!=null&&c.deprecationHandler(null,e),s){var i=[],l,d,f,_=arguments.length;for(d=0;d<_;d++){if(l="",typeof arguments[d]=="object"){l+=`
1
+ (function(V,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("@fortawesome/vue-fontawesome"),require("@fortawesome/fontawesome-svg-core"),require("@fortawesome/free-solid-svg-icons"),require("vue"),require("@amsom-habitat/file-utils"),require("vue-draggable-next"),require("moment-timezone"),require("@amsom-habitat/date-utils"),require("pdf-merger-js")):typeof define=="function"&&define.amd?define(["exports","@fortawesome/vue-fontawesome","@fortawesome/fontawesome-svg-core","@fortawesome/free-solid-svg-icons","vue","@amsom-habitat/file-utils","vue-draggable-next","moment-timezone","@amsom-habitat/date-utils","pdf-merger-js"],W):(V=typeof globalThis<"u"?globalThis:V||self,W(V.AmsomUI={},V.FontAwesomeVue,V.FontAwesomeCore,V.FontAwesomeSolid,V.Vue,V.AmsomFileUtils,V.VueDraggableNext,V.moment,V.AmsomDateUtils,V.PDFMerger))})(this,function(V,W,me,T,n,j,nn,te,rn,an){"use strict";const on=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r};me.library.add(T.faTimes);const ln={name:"AmsomModalComponent",components:{FontAwesomeIcon:W.FontAwesomeIcon},props:{closeOption:{type:Boolean,default:!1},size:{type:String,default:"md",validator(a){return["xxs","xs","sm","md","lg","xl"].includes(a)}},position:{type:String,default:"center",validator(a){return["top","center","bottom"].includes(a)}},title:{type:String,default:""},reducible:{type:Boolean,default:!1},classTitle:{type:String,default:"h4 text-center"}},emits:["close"],data(){return{alreadyHidden:!1,modalId:this.$options.modalManager.generateModalId(),reduced:!1,mouseDownOnBackdrop:!1}},modalManager:{openModals:[],baseZIndex:1050,zIndexIncrement:20,modalCounter:0,sizes:{xxs:"col-12 col-md-3",xs:"col-12 col-md-4",sm:"col-12 col-md-6",md:"col-12 col-md-8",lg:"col-12 col-md-10",xl:"col-12"},generateModalId(){return`modal-${Date.now()}-${++this.modalCounter}`},register(a){this.openModals.push(a)},unregister(a){const o=this.openModals.indexOf(a);o>-1&&this.openModals.splice(o,1)},getTopModal(){return this.openModals[this.openModals.length-1]},clear(){this.openModals.length=0}},computed:{modalZIndex(){const a=this.$options.modalManager.openModals.indexOf(this.modalId);return this.$options.modalManager.baseZIndex+(a>=0?a*this.$options.modalManager.zIndexIncrement:0)},modalSize(){return this.$options.modalManager.sizes[this.size]||this.$options.modalManager.sizes.md},alignmentClass(){return{top:"flex-start",center:"center",bottom:"flex-end"}[this.position]||"center"}},mounted(){this.$options.modalManager.register(this.modalId),this.$options.modalManager.openModals.length===1&&this.lockBodyScroll(),this.closeOption&&document.addEventListener("keydown",this.closeEsc)},beforeUnmount(){this.$options.modalManager.unregister(this.modalId),this.$options.modalManager.openModals.length===0&&this.unlockBodyScroll(),this.closeOption&&document.removeEventListener("keydown",this.closeEsc)},methods:{lockBodyScroll(){if(window.getComputedStyle(document.body).overflow==="hidden"){this.alreadyHidden=!0;return}document.body.style.overflow="hidden"},unlockBodyScroll(){this.alreadyHidden||(document.body.style.overflow="")},handleBackdropMouseDown(a){a.target===a.currentTarget&&(this.mouseDownOnBackdrop=!0)},handleModalMouseDown(){this.mouseDownOnBackdrop=!1},handleModalMouseUp(){this.mouseDownOnBackdrop=!1},handleBackdropClick(a){a.target===a.currentTarget&&this.mouseDownOnBackdrop&&this.closeOption&&this.$emit("close"),this.mouseDownOnBackdrop=!1},closeEsc(a){a.key==="Escape"&&this.$options.modalManager.getTopModal()===this.modalId&&this.$emit("close")}}},dn=["id"],cn={class:"amsom-modal-body mt-2"},un={key:0,class:"position-fixed bottom-0 end-0 mb-3 me-3"},mn={key:0,class:"position-fixed bottom-0 end-0 mb-3 me-3"};function hn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[n.createElementVNode("div",{class:n.normalizeClass(["p-2 m-0 bg-black bg-opacity-25 position-fixed overflow-y-auto",{"d-none":m.reduced}]),style:n.normalizeStyle({zIndex:u.modalZIndex,inset:0}),onMousedown:o[7]||(o[7]=(...g)=>u.handleBackdropMouseDown&&u.handleBackdropMouseDown(...g)),onClick:o[8]||(o[8]=(...g)=>u.handleBackdropClick&&u.handleBackdropClick(...g))},[n.createElementVNode("div",{class:"d-flex justify-content-center",style:n.normalizeStyle({minHeight:"100%",alignItems:u.alignmentClass,paddingTop:r.position==="center"?"2rem":"1rem",paddingBottom:r.position==="center"?"2rem":"1rem"}),onMousedown:o[4]||(o[4]=(...g)=>u.handleBackdropMouseDown&&u.handleBackdropMouseDown(...g)),onClick:o[5]||(o[5]=(...g)=>u.handleBackdropClick&&u.handleBackdropClick(...g))},[n.createElementVNode("div",{id:m.modalId,class:n.normalizeClass(["container-fluid bg-white rounded-4 p-3 position-relative d-flex flex-column",u.modalSize]),style:{minHeight:"auto",maxHeight:"none"},onClick:o[1]||(o[1]=n.withModifiers(()=>{},["stop"])),onMousedown:o[2]||(o[2]=(...g)=>u.handleModalMouseDown&&u.handleModalMouseDown(...g)),onMouseup:o[3]||(o[3]=(...g)=>u.handleModalMouseUp&&u.handleModalMouseUp(...g))},[r.closeOption?(n.openBlock(),n.createBlock(p,{key:0,icon:"fa-solid fa-times",role:"button",class:"position-absolute top-0 end-0 m-3 translate-middle-y",size:"lg",onClick:o[0]||(o[0]=g=>a.$emit("close"))})):n.createCommentVNode("",!0),n.createElementVNode("div",cn,[n.renderSlot(a.$slots,"title",{},()=>[r.title?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(r.classTitle)},n.toDisplayString(r.title),3)):n.createCommentVNode("",!0)]),n.renderSlot(a.$slots,"default",{},()=>[o[10]||(o[10]=n.createElementVNode("p",null," Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. ",-1))])])],42,dn)],36),r.reducible?(n.openBlock(),n.createElementBlock("div",un,[n.createElementVNode("button",{class:"btn btn-primary",onClick:o[6]||(o[6]=g=>m.reduced=!m.reduced)},"Réduire la fenêtre")])):n.createCommentVNode("",!0)],38),r.reducible&&m.reduced?(n.openBlock(),n.createElementBlock("div",mn,[n.createElementVNode("button",{class:"btn btn-primary",onClick:o[9]||(o[9]=g=>m.reduced=!m.reduced)},"Restaurer la fenêtre")])):n.createCommentVNode("",!0)])}const dt=on(ln,[["render",hn]]),K=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r},fn={name:"AmsomCard",props:{title:{type:String,default:null},bgImage:{type:String,default:null},bgOpacity:{type:Number,default:.25,validator:a=>a>=0&&a<=1},bubbleTitle:{type:Boolean,default:!1},bubbleTitleClass:{type:String,default:"bg-primary text-white"},noBody:{type:Boolean,default:!1},header:{type:Boolean,default:!1},headerClass:{type:String,default:""},cardClass:{type:String,default:""},cardStyle:{type:String,default:""},footer:{type:Boolean,default:!1},footerClass:{type:String,default:""}}},gn={class:"position-relative"},yn={key:0,class:"card-title"},pn=["src"];function kn(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",gn,[r.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["card card-header",r.headerClass])},[n.renderSlot(a.$slots,"header")],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["card position-relative h-100",[{"rounded-top-0":r.header,"rounded-bottom-0":r.footer},r.cardClass]])},[n.createElementVNode("div",{class:"position-relative overflow-y-auto h-100",style:n.normalizeStyle(r.cardStyle)},[n.createElementVNode("div",{class:n.normalizeClass([{"card-body":!r.noBody}]),style:{position:"relative","z-index":"1"}},[n.renderSlot(a.$slots,"title",{},()=>[r.title&&!r.bubbleTitle?(n.openBlock(),n.createElementBlock("h4",yn,n.toDisplayString(r.title),1)):n.createCommentVNode("",!0)]),n.renderSlot(a.$slots,"default")],2)],4),r.bgImage?(n.openBlock(),n.createElementBlock("img",{key:0,src:r.bgImage,class:n.normalizeClass(["img img-fluid bg-white object-fit-cover h-100 w-100 position-absolute top-0 start-0",[{"rounded-top-0":r.header,"rounded-bottom-0":r.footer}]]),alt:"Image de fond du widget",style:n.normalizeStyle({opacity:r.bgOpacity,zIndex:0,borderRadius:"inherit"})},null,14,pn)):n.createCommentVNode("",!0)],2),r.title&&r.bubbleTitle?(n.openBlock(),n.createElementBlock("span",{key:1,id:"bubble-title",class:n.normalizeClass(["position-absolute top-0 start-0 translate-middle-y rounded-pill shadow px-1",r.bubbleTitleClass]),style:{"z-index":"2"}},n.toDisplayString(r.title),3)):n.createCommentVNode("",!0),r.footer?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["card card-footer",r.footerClass])},[n.renderSlot(a.$slots,"footer")],2)):n.createCommentVNode("",!0)])}const vt=K(fn,[["render",kn]]),_n={name:"AmsomOverlay",props:{loading:{type:Boolean,default:!1,required:!0},opacity:{type:Number,default:60,required:!1,validator:a=>a>=0&&a<=100}}},Sn={class:"position-relative"},bn={class:"position-sticky sticky-top text-center"};function wn(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",Sn,[r.loading?(n.openBlock(),n.createElementBlock("div",{key:0,class:"position-absolute w-100 h-100 d-flex align-items-center justify-content-center rounded",style:n.normalizeStyle({backgroundColor:"rgba(193, 193, 193,"+r.opacity/100+")",boxShadow:"inset 0 0 0 10px rgba(193, 193, 193, 0.5)",zIndex:900})},[n.renderSlot(a.$slots,"loading",{},()=>[n.createElementVNode("div",bn,[o[0]||(o[0]=n.createElementVNode("div",{class:"spinner-border text-primary",role:"status"},[n.createElementVNode("span",{class:"sr-only visually-hidden"},"Chargement...")],-1)),n.renderSlot(a.$slots,"loading-sub-message")])])],4)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"default")])}const ct=K(_n,[["render",wn]]);me.library.add(T.faCheck);const Cn={name:"WorkflowAssuranceBlock",components:{FontAwesomeIcon:W.FontAwesomeIcon},props:{steps:{type:Array,required:!0,default:()=>[{numero:1,texte:"Step 1"},{numero:2,texte:"Step 2"},{numero:3,texte:"Step 3"}]},currentStep:{type:Number,required:!1,default:1},size:{type:String,required:!1,default:"md"},checkPassedStep:{type:Boolean,required:!1,default:!0},passedStepBgColor:{type:String,required:!1,default:"success"},currentStepBgColor:{type:String,required:!1,default:"primary"},futureStepBgColor:{type:String,required:!1,default:"secondary"},passedStepCss:{type:String,required:!1,default:"text-white"},currentStepCss:{type:String,required:!1,default:"text-white fw-bold"},futureStepCss:{type:String,required:!1,default:"text-white"},passedStepTextCss:{type:String,required:!1,default:"white"},currentStepTextCss:{type:String,required:!1,default:"white"},futureStepTextCss:{type:String,required:!1,default:"white"},hideText:{type:Boolean,required:!1,default:!1}},emits:["clickStep"],computed:{fontSize(){return this.bubbleSize/2},bubbleSize(){switch(this.size){case"sm":return 2;case"lg":return 4;default:return 3}}}},xn={class:"d-flex flex-column align-items-center"},Mn=["onClick"],Dn={key:0,class:"line h-100",style:{height:"30px","min-height":"30px"}};function Pn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.steps,(g,k)=>(n.openBlock(),n.createElementBlock("div",{key:g.numero,class:"d-flex mb-1"},[n.createElementVNode("div",xn,[n.createElementVNode("div",{style:n.normalizeStyle({width:u.bubbleSize+"rem",minHeight:u.bubbleSize+"rem",height:u.bubbleSize+"rem",lineHeight:u.bubbleSize+"rem",fontSize:u.fontSize+"rem"}),class:n.normalizeClass(["d-inline-block rounded-circle text-center mb-1",["bg-"+(k+1<r.currentStep?r.passedStepBgColor:k+1===r.currentStep?r.currentStepBgColor:r.futureStepBgColor),k+1<r.currentStep?r.passedStepCss:k+1===r.currentStep?r.currentStepCss:r.futureStepCss]]),onClick:h=>a.$emit("clickStep",g.numero)},[k+1<r.currentStep&&r.checkPassedStep?(n.openBlock(),n.createBlock(p,{key:0,icon:["fas","check"]})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(g.numero),1)],64))],14,Mn),k<r.steps.length-1?(n.openBlock(),n.createElementBlock("div",Dn)):n.createCommentVNode("",!0)]),r.hideText?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(["ms-1",[k+1<r.currentStep?r.passedStepTextCss:k+1===r.currentStep?r.currentStepTextCss:r.futureStepTextCss]]),style:n.normalizeStyle({minHeight:u.bubbleSize+"rem",lineHeight:u.bubbleSize+"rem"})},[n.renderSlot(a.$slots,"stepContent",{step:g},()=>[n.createTextVNode(n.toDisplayString(g.texte),1)],!0)],6))]))),128)}const Nn=K(Cn,[["render",Pn],["__scopeId","data-v-5eab4376"]]);me.library.add(T.faCheck);const ut={name:"AmsomHorizontalStepper",components:{FontAwesomeIcon:W.FontAwesomeIcon},props:{currentStep:{type:Number,required:!0,default:1},steps:{type:Array,required:!0,default:()=>[{numero:1,texte:"Step 1"},{numero:2,texte:"Step 2"},{numero:3,texte:"Step 3"}]},size:{type:String,required:!1,default:"md",validator:function(a){return["sm","md","lg"].indexOf(a)!==-1}},checkPassedStep:{type:Boolean,required:!1,default:!0},passedStepBgColor:{type:String,required:!1,default:"success"},currentStepBgColor:{type:String,required:!1,default:"primary"},futureStepBgColor:{type:String,required:!1,default:"secondary"},passedStepCss:{type:String,required:!1,default:"text-white"},currentStepCss:{type:String,required:!1,default:"text-white fw-bold"},futureStepCss:{type:String,required:!1,default:"text-white"},passedStepTextCss:{type:String,required:!1,default:""},currentStepTextCss:{type:String,required:!1,default:"fw-bold"},futureStepTextCss:{type:String,required:!1,default:""},hideText:{type:Boolean,required:!1,default:!1}},emits:["clickStep"],computed:{fontSizeText(){return this.bubbleSize/2.5},fontSizeStep(){return this.bubbleSize/2},bubbleSize(){switch(this.size){case"sm":return 2;case"lg":return 4;default:return 3}},passedStepBgColorCss(){return"var(--bs-"+this.passedStepBgColor+")"},futureStepBgColorCss(){return"var(--bs-"+this.futureStepBgColor+")"},currentStepBgColorCss(){return"var(--bs-"+this.currentStepBgColor+")"},lineTopCss(){return"calc("+this.bubbleSize+"/ 2)"}}},qt=()=>{n.useCssVars(a=>({v31536048:a.futureStepBgColorCss,dac29eac:a.bubbleSize+"rem",a3a0806e:a.passedStepBgColorCss,de0182ca:a.fontSizeStep+"rem"}))},Gt=ut.setup;ut.setup=Gt?(a,o)=>(qt(),Gt(a,o)):qt;const Bn={class:"d-flex justify-content-between"},Tn=["role","onClick"];function En(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return n.openBlock(),n.createElementBlock("div",Bn,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.steps,(g,k)=>(n.openBlock(),n.createElementBlock("div",{key:g.numero,role:g.numero<r.currentStep?"button":"none",class:n.normalizeClass(["stepper-item",[{active:g.numero===r.currentStep,completed:g.numero<r.currentStep}]]),onClick:h=>a.$emit("clickStep",g.numero)},[n.createElementVNode("div",{class:n.normalizeClass(["step-counter",["bg-"+(k+1<r.currentStep?r.passedStepBgColor:k+1===r.currentStep?r.currentStepBgColor:r.futureStepBgColor),k+1<r.currentStep?r.passedStepCss:k+1===r.currentStep?r.currentStepCss:r.futureStepCss]]),style:n.normalizeStyle({fontSize:u.fontSizeStep+"rem"})},[k+1<r.currentStep&&r.checkPassedStep?(n.openBlock(),n.createBlock(p,{key:0,icon:["fas","check"]})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(g.numero),1)],64))],6),r.hideText?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["step-name",[k+1<r.currentStep?r.passedStepTextCss:k+1===r.currentStep?r.currentStepTextCss:r.futureStepTextCss]]),style:n.normalizeStyle({fontSize:u.fontSizeText+"rem"})},n.toDisplayString(g.texte),7))],10,Tn))),128))])}const Vn=K(ut,[["render",En]]);me.library.add(T.faCamera,T.faTrash,T.faArrowRight,T.faArrowLeft);const Yn={name:"PhotoComponent",components:{AmsomModal:dt,FontAwesomeIcon:W.FontAwesomeIcon},props:{images:{type:Array,default:()=>[]},imageSizeWidth:{type:String,default:"50px"},imageSizeHeight:{type:String,default:"50px"},imagesLimit:{type:Number,default:-1},capture:{type:String,default:"file"}},emits:["update:images"],data(){return{showModal:!1,selectedPhotoIndex:0}},computed:{canAddImage(){return this.imagesLimit===-1?!0:this.imagesLimit!==-1&&this.images.length<this.imagesLimit}},methods:{triggerFileInput(){this.$refs.fileInput.click()},openPhoto(a){this.selectedPhotoIndex=this.images.findIndex(o=>o===a),this.showModal=!0},closeModal(){this.showModal=!1},changeIndex(a){a===0?this.selectedPhotoIndex=this.selectedPhotoIndex===0?0:this.selectedPhotoIndex-1:this.selectedPhotoIndex=this.selectedPhotoIndex===this.images.length-1?0:this.selectedPhotoIndex+1},deleteImage(){this.$emit("update:images",this.images.filter((a,o)=>o!==this.selectedPhotoIndex)),this.images.length-1===0?this.closeModal():this.changeIndex(0)},getDataFiles(a){let o=a.target.files;if(o){this.imagesLimit!==-1&&(o=Array.from(o),o=o.slice(0,this.imagesLimit));for(let r of o)j.isImage(r)&&j.resizeImage({file:r,maxWidth:this.maxWidth,maxHeigth:this.maxHeigth}).then(c=>{j.handleFile(j.base64ToBlob(c),r.type.split("/")[1]).then(m=>{m.nomFichier=r.name,this.$emit("update:images",[...this.images,m])})})}}}},In={class:"border border-1 border-grey rounded-4 p-2 d-flex align-items-center"},On=["disabled"],Ln=["capture"],An={key:0,class:"d-flex overflow-x-auto w-100"},Fn=["onClick"],zn=["src","alt"],Rn={key:1,class:"fs-7"},jn={class:"row w-100 mx-auto"},Hn={class:"col-12 mb-3"},Wn=["src","alt"],Un={class:"col-12 d-flex justify-content-center"};function vn(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon"),g=n.resolveComponent("amsom-modal");return n.openBlock(),n.createElementBlock("div",In,[n.createElementVNode("button",{type:"button",class:"btn rounded-4 me-1 d-flex justify-content-center align-items-center",style:n.normalizeStyle({width:r.imageSizeWidth,minWidth:r.imageSizeWidth,height:r.imageSizeHeight,minHeight:r.imageSizeHeight,backgroundColor:"#a4a228"}),disabled:!u.canAddImage,onClick:o[2]||(o[2]=(...k)=>u.triggerFileInput&&u.triggerFileInput(...k))},[n.createVNode(p,{icon:"fa-solid fa-camera",size:"lg",class:"text-white"}),r.capture==="file"?(n.openBlock(),n.createElementBlock("input",{key:0,id:"file",ref:"fileInput",type:"file",class:"form-control",accept:"image/*",style:{display:"none"},multiple:"",onInput:o[0]||(o[0]=(...k)=>u.getDataFiles&&u.getDataFiles(...k))},null,544)):(n.openBlock(),n.createElementBlock("input",{key:1,id:"file",ref:"fileInput",type:"file",class:"form-control",style:{display:"none"},accept:"image/*",multiple:"",capture:r.capture,onInput:o[1]||(o[1]=(...k)=>u.getDataFiles&&u.getDataFiles(...k))},null,40,Ln))],12,On),r.images.length>0?(n.openBlock(),n.createElementBlock("div",An,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.images,k=>(n.openBlock(),n.createElementBlock("button",{key:k,type:"button",class:"btn p-0 mx-1 rounded-1",style:n.normalizeStyle({minWidth:r.imageSizeWidth,width:r.imageSizeWidth,minHeight:r.imageSizeHeight,height:r.imageSizeHeight}),onClick:h=>u.openPhoto(k)},[n.createElementVNode("img",{src:"data:"+(k==null?void 0:k.type)+";base64,"+(k==null?void 0:k.file),class:"h-100 w-100 rounded-1",alt:k==null?void 0:k.nomFichier},null,8,zn)],12,Fn))),128))])):(n.openBlock(),n.createElementBlock("div",Rn," Ajouter une image ")),m.showModal?(n.openBlock(),n.createBlock(g,{key:2,size:"sm","close-option":"",onClose:u.closeModal},{default:n.withCtx(()=>{var k,h,N;return[n.createElementVNode("div",jn,[n.createElementVNode("div",Hn,[n.createElementVNode("img",{src:"data:"+((k=r.images[m.selectedPhotoIndex])==null?void 0:k.type)+";base64,"+((h=r.images[m.selectedPhotoIndex])==null?void 0:h.file),alt:(N=r.images[m.selectedPhotoIndex])==null?void 0:N.nomFichier,class:"h-100 w-100"},null,8,Wn)]),n.createElementVNode("div",Un,[n.createElementVNode("button",{type:"button",class:"btn btn-primary mx-1",onClick:o[3]||(o[3]=_=>u.changeIndex(0))},[n.createVNode(p,{icon:"fa-arrow-left",size:"lg"})]),n.createElementVNode("button",{type:"button",class:"btn btn-primary mx-1",onClick:o[4]||(o[4]=_=>u.changeIndex(1))},[n.createVNode(p,{icon:"fa-arrow-right",size:"lg"})]),n.createElementVNode("button",{type:"button",class:"btn btn-danger ms-auto",onClick:o[5]||(o[5]=(..._)=>u.deleteImage&&u.deleteImage(..._))},[n.createVNode(p,{icon:"fa-trash",size:"lg"})])])])]}),_:1},8,["onClose"])):n.createCommentVNode("",!0)])}const qn=K(Yn,[["render",vn]]);var $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zt(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Kt={exports:{}},Jt;function Gn(){return Jt||(Jt=1,function(a,o){(function(r,c){a.exports=c()})($t,function(){var r;function c(){return r.apply(null,arguments)}function m(e){r=e}function u(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function p(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function k(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(g(e,t))return!1;return!0}function h(e){return e===void 0}function N(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function _(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function z(e,t){var s=[],i,l=e.length;for(i=0;i<l;++i)s.push(t(e[i],i));return s}function se(e,t){for(var s in t)g(t,s)&&(e[s]=t[s]);return g(t,"toString")&&(e.toString=t.toString),g(t,"valueOf")&&(e.valueOf=t.valueOf),e}function J(e,t,s,i){return Is(e,t,s,i,!0).utc()}function Ar(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function x(e){return e._pf==null&&(e._pf=Ar()),e._pf}var ht;Array.prototype.some?ht=Array.prototype.some:ht=function(e){var t=Object(this),s=t.length>>>0,i;for(i=0;i<s;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};function ft(e){var t=null,s=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(t=x(e),s=ht.call(t.parsedDateParts,function(l){return l!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),e._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i;return e._isValid}function He(e){var t=J(NaN);return e!=null?se(x(t),e):x(t).userInvalidated=!0,t}var ls=c.momentProperties=[],gt=!1;function yt(e,t){var s,i,l,d=ls.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=x(t)),h(t._locale)||(e._locale=t._locale),d>0)for(s=0;s<d;s++)i=ls[s],l=t[i],h(l)||(e[i]=l);return e}function Ee(e){yt(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),gt===!1&&(gt=!0,c.updateOffset(this),gt=!1)}function G(e){return e instanceof Ee||e!=null&&e._isAMomentObject!=null}function ds(e){c.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function U(e,t){var s=!0;return se(function(){if(c.deprecationHandler!=null&&c.deprecationHandler(null,e),s){var i=[],l,d,f,S=arguments.length;for(d=0;d<S;d++){if(l="",typeof arguments[d]=="object"){l+=`
2
2
  [`+d+"] ";for(f in arguments[0])g(arguments[0],f)&&(l+=f+": "+arguments[0][f]+", ");l=l.slice(0,-2)}else l=arguments[d];i.push(l)}ds(e+`
3
3
  Arguments: `+Array.prototype.slice.call(i).join("")+`
4
- `+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var cs={};function us(e,t){c.deprecationHandler!=null&&c.deprecationHandler(e,t),cs[e]||(ds(t),cs[e]=!0)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null;function J(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function zr(e){var t,s;for(s in e)g(e,s)&&(t=e[s],J(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function pt(e,t){var s=se({},e),i;for(i in t)g(t,i)&&(p(e[i])&&p(t[i])?(s[i]={},se(s[i],e[i]),se(s[i],t[i])):t[i]!=null?s[i]=t[i]:delete s[i]);for(i in e)g(e,i)&&!g(t,i)&&p(e[i])&&(s[i]=se({},s[i]));return s}function kt(e){e!=null&&this.set(e)}var _t;Object.keys?_t=Object.keys:_t=function(e){var t,s=[];for(t in e)g(e,t)&&s.push(t);return s};var Rr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Hr(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return J(i)?i.call(t,s):i}function Q(e,t,s){var i=""+Math.abs(e),l=t-i.length,d=e>=0;return(d?s?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+i}var St=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,We=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bt={},we={};function w(e,t,s,i){var l=i;typeof i=="string"&&(l=function(){return this[i]()}),e&&(we[e]=l),t&&(we[t[0]]=function(){return Q(l.apply(this,arguments),t[1],t[2])}),s&&(we[s]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function jr(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Wr(e){var t=e.match(St),s,i;for(s=0,i=t.length;s<i;s++)we[t[s]]?t[s]=we[t[s]]:t[s]=jr(t[s]);return function(l){var d="",f;for(f=0;f<i;f++)d+=J(t[f])?t[f].call(l,e):t[f];return d}}function Ue(e,t){return e.isValid()?(t=ms(t,e.localeData()),bt[t]=bt[t]||Wr(t),bt[t](e)):e.localeData().invalidDate()}function ms(e,t){var s=5;function i(l){return t.longDateFormat(l)||l}for(We.lastIndex=0;s>=0&&We.test(e);)e=e.replace(We,i),We.lastIndex=0,s-=1;return e}var Ur={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function qr(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(St).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var vr="Invalid date";function Gr(){return this._invalidDate}var $r="%d",Zr=/\d{1,2}/;function Kr(e){return this._ordinal.replace("%d",e)}var Jr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Qr(e,t,s,i){var l=this._relativeTime[s];return J(l)?l(e,t,s,i):l.replace(/%d/i,e)}function Xr(e,t){var s=this._relativeTime[e>0?"future":"past"];return J(s)?s(t):s.replace(/%s/i,t)}var hs={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function U(e){return typeof e=="string"?hs[e]||hs[e.toLowerCase()]:void 0}function wt(e){var t={},s,i;for(i in e)g(e,i)&&(s=U(i),s&&(t[s]=e[i]));return t}var ea={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ta(e){var t=[],s;for(s in e)g(e,s)&&t.push({unit:s,priority:ea[s]});return t.sort(function(i,l){return i.priority-l.priority}),t}var fs=/\d/,H=/\d\d/,gs=/\d{3}/,Ct=/\d{4}/,qe=/[+-]?\d{6}/,Y=/\d\d?/,ys=/\d\d\d\d?/,ps=/\d\d\d\d\d\d?/,ve=/\d{1,3}/,xt=/\d{1,4}/,Ge=/[+-]?\d{1,6}/,Ce=/\d+/,$e=/[+-]?\d+/,sa=/Z|[+-]\d\d:?\d\d/gi,Ze=/Z|[+-]\d\d(?::?\d\d)?/gi,na=/[+-]?\d+(\.\d{1,3})?/,Ve=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,xe=/^[1-9]\d?/,Mt=/^([1-9]\d|\d)/,Ke;Ke={};function S(e,t,s){Ke[e]=J(t)?t:function(i,l){return i&&s?s:t}}function ia(e,t){return g(Ke,e)?Ke[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,i,l,d){return s||i||l||d}))}function ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=q(t)),s}var Dt={};function E(e,t){var s,i=t,l;for(typeof e=="string"&&(e=[e]),B(t)&&(i=function(d,f){f[t]=M(d)}),l=e.length,s=0;s<l;s++)Dt[e[s]]=i}function Ye(e,t){E(e,function(s,i,l,d){l._w=l._w||{},t(s,l._w,l,d)})}function aa(e,t,s){t!=null&&g(Dt,e)&&Dt[e](t,s._a,s,e)}function Je(e){return e%4===0&&e%100!==0||e%400===0}var F=0,ie=1,X=2,A=3,G=4,re=5,ke=6,oa=7,la=8;w("Y",0,0,function(){var e=this.year();return e<=9999?Q(e,4):"+"+e}),w(0,["YY",2],0,function(){return this.year()%100}),w(0,["YYYY",4],0,"year"),w(0,["YYYYY",5],0,"year"),w(0,["YYYYYY",6,!0],0,"year"),S("Y",$e),S("YY",Y,H),S("YYYY",xt,Ct),S("YYYYY",Ge,qe),S("YYYYYY",Ge,qe),E(["YYYYY","YYYYYY"],F),E("YYYY",function(e,t){t[F]=e.length===2?c.parseTwoDigitYear(e):M(e)}),E("YY",function(e,t){t[F]=c.parseTwoDigitYear(e)}),E("Y",function(e,t){t[F]=parseInt(e,10)});function Ie(e){return Je(e)?366:365}c.parseTwoDigitYear=function(e){return M(e)+(M(e)>68?1900:2e3)};var ks=Me("FullYear",!0);function da(){return Je(this.year())}function Me(e,t){return function(s){return s!=null?(_s(this,e,s),c.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){if(!e.isValid())return NaN;var s=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return i?s.getUTCSeconds():s.getSeconds();case"Minutes":return i?s.getUTCMinutes():s.getMinutes();case"Hours":return i?s.getUTCHours():s.getHours();case"Date":return i?s.getUTCDate():s.getDate();case"Day":return i?s.getUTCDay():s.getDay();case"Month":return i?s.getUTCMonth():s.getMonth();case"FullYear":return i?s.getUTCFullYear():s.getFullYear();default:return NaN}}function _s(e,t,s){var i,l,d,f,_;if(!(!e.isValid()||isNaN(s))){switch(i=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?i.setUTCMilliseconds(s):i.setMilliseconds(s));case"Seconds":return void(l?i.setUTCSeconds(s):i.setSeconds(s));case"Minutes":return void(l?i.setUTCMinutes(s):i.setMinutes(s));case"Hours":return void(l?i.setUTCHours(s):i.setHours(s));case"Date":return void(l?i.setUTCDate(s):i.setDate(s));case"FullYear":break;default:return}d=s,f=e.month(),_=e.date(),_=_===29&&f===1&&!Je(d)?28:_,l?i.setUTCFullYear(d,f,_):i.setFullYear(d,f,_)}}function ca(e){return e=U(e),J(this[e])?this[e]():this}function ua(e,t){if(typeof e=="object"){e=wt(e);var s=ta(e),i,l=s.length;for(i=0;i<l;i++)this[s[i].unit](e[s[i].unit])}else if(e=U(e),J(this[e]))return this[e](t);return this}function ma(e,t){return(e%t+t)%t}var L;Array.prototype.indexOf?L=Array.prototype.indexOf:L=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Pt(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=ma(t,12);return e+=(t-s)/12,s===1?Je(e)?29:28:31-s%7%2}w("M",["MM",2],"Mo",function(){return this.month()+1}),w("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),w("MMMM",0,0,function(e){return this.localeData().months(this,e)}),S("M",Y,xe),S("MM",Y,H),S("MMM",function(e,t){return t.monthsShortRegex(e)}),S("MMMM",function(e,t){return t.monthsRegex(e)}),E(["M","MM"],function(e,t){t[ie]=M(e)-1}),E(["MMM","MMMM"],function(e,t,s,i){var l=s._locale.monthsParse(e,i,s._strict);l!=null?t[ie]=l:x(s).invalidMonth=e});var ha="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ss="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bs=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fa=Ve,ga=Ve;function ya(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||bs).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone}function pa(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[bs.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ka(e,t,s){var i,l,d,f=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)d=K([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(d,"").toLocaleLowerCase();return s?t==="MMM"?(l=L.call(this._shortMonthsParse,f),l!==-1?l:null):(l=L.call(this._longMonthsParse,f),l!==-1?l:null):t==="MMM"?(l=L.call(this._shortMonthsParse,f),l!==-1?l:(l=L.call(this._longMonthsParse,f),l!==-1?l:null)):(l=L.call(this._longMonthsParse,f),l!==-1?l:(l=L.call(this._shortMonthsParse,f),l!==-1?l:null))}function _a(e,t,s){var i,l,d;if(this._monthsParseExact)return ka.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++)if(l=K([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!s&&!this._monthsParse[i]&&(d="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[i]=new RegExp(d.replace(".",""),"i")),s&&t==="MMMM"&&this._longMonthsParse[i].test(e)||s&&t==="MMM"&&this._shortMonthsParse[i].test(e)||!s&&this._monthsParse[i].test(e))return i}function ws(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!B(t))return e}var s=t,i=e.date();return i=i<29?i:Math.min(i,Pt(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,i):e._d.setMonth(s,i),e}function Cs(e){return e!=null?(ws(this,e),c.updateOffset(this,!0),this):Oe(this,"Month")}function Sa(){return Pt(this.year(),this.month())}function ba(e){return this._monthsParseExact?(g(this,"_monthsRegex")||xs.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(g(this,"_monthsShortRegex")||(this._monthsShortRegex=fa),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function wa(e){return this._monthsParseExact?(g(this,"_monthsRegex")||xs.call(this),e?this._monthsStrictRegex:this._monthsRegex):(g(this,"_monthsRegex")||(this._monthsRegex=ga),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function xs(){function e(C,D){return D.length-C.length}var t=[],s=[],i=[],l,d,f,_;for(l=0;l<12;l++)d=K([2e3,l]),f=ne(this.monthsShort(d,"")),_=ne(this.months(d,"")),t.push(f),s.push(_),i.push(_),i.push(f);t.sort(e),s.sort(e),i.sort(e),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ca(e,t,s,i,l,d,f){var _;return e<100&&e>=0?(_=new Date(e+400,t,s,i,l,d,f),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,t,s,i,l,d,f),_}function Le(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Qe(e,t,s){var i=7+t-s,l=(7+Le(e,0,i).getUTCDay()-t)%7;return-l+i-1}function Ms(e,t,s,i,l){var d=(7+s-i)%7,f=Qe(e,i,l),_=1+7*(t-1)+d+f,C,D;return _<=0?(C=e-1,D=Ie(C)+_):_>Ie(e)?(C=e+1,D=_-Ie(e)):(C=e,D=_),{year:C,dayOfYear:D}}function Ae(e,t,s){var i=Qe(e.year(),t,s),l=Math.floor((e.dayOfYear()-i-1)/7)+1,d,f;return l<1?(f=e.year()-1,d=l+ae(f,t,s)):l>ae(e.year(),t,s)?(d=l-ae(e.year(),t,s),f=e.year()+1):(f=e.year(),d=l),{week:d,year:f}}function ae(e,t,s){var i=Qe(e,t,s),l=Qe(e+1,t,s);return(Ie(e)-i+l)/7}w("w",["ww",2],"wo","week"),w("W",["WW",2],"Wo","isoWeek"),S("w",Y,xe),S("ww",Y,H),S("W",Y,xe),S("WW",Y,H),Ye(["w","ww","W","WW"],function(e,t,s,i){t[i.substr(0,1)]=M(e)});function xa(e){return Ae(e,this._week.dow,this._week.doy).week}var Ma={dow:0,doy:6};function Da(){return this._week.dow}function Pa(){return this._week.doy}function Na(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ba(e){var t=Ae(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}w("d",0,"do","day"),w("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),w("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),w("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),w("e",0,0,"weekday"),w("E",0,0,"isoWeekday"),S("d",Y),S("e",Y),S("E",Y),S("dd",function(e,t){return t.weekdaysMinRegex(e)}),S("ddd",function(e,t){return t.weekdaysShortRegex(e)}),S("dddd",function(e,t){return t.weekdaysRegex(e)}),Ye(["dd","ddd","dddd"],function(e,t,s,i){var l=s._locale.weekdaysParse(e,i,s._strict);l!=null?t.d=l:x(s).invalidWeekday=e}),Ye(["d","e","E"],function(e,t,s,i){t[i]=M(e)});function Ta(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ea(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Va="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ds="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ya="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ia=Ve,Oa=Ve,La=Ve;function Aa(e,t){var s=u(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Nt(s,this._week.dow):e?s[e.day()]:s}function Fa(e){return e===!0?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function za(e){return e===!0?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ra(e,t,s){var i,l,d,f=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)d=K([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(d,"").toLocaleLowerCase();return s?t==="dddd"?(l=L.call(this._weekdaysParse,f),l!==-1?l:null):t==="ddd"?(l=L.call(this._shortWeekdaysParse,f),l!==-1?l:null):(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null):t==="dddd"?(l=L.call(this._weekdaysParse,f),l!==-1||(l=L.call(this._shortWeekdaysParse,f),l!==-1)?l:(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null)):t==="ddd"?(l=L.call(this._shortWeekdaysParse,f),l!==-1||(l=L.call(this._weekdaysParse,f),l!==-1)?l:(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null)):(l=L.call(this._minWeekdaysParse,f),l!==-1||(l=L.call(this._weekdaysParse,f),l!==-1)?l:(l=L.call(this._shortWeekdaysParse,f),l!==-1?l:null))}function Ha(e,t,s){var i,l,d;if(this._weekdaysParseExact)return Ra.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++)if(l=K([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(d="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[i]=new RegExp(d.replace(".",""),"i")),s&&t==="dddd"&&this._fullWeekdaysParse[i].test(e)||s&&t==="ddd"&&this._shortWeekdaysParse[i].test(e)||s&&t==="dd"&&this._minWeekdaysParse[i].test(e)||!s&&this._weekdaysParse[i].test(e))return i}function ja(e){if(!this.isValid())return e!=null?this:NaN;var t=Oe(this,"Day");return e!=null?(e=Ta(e,this.localeData()),this.add(e-t,"d")):t}function Wa(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Ua(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Ea(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function qa(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(g(this,"_weekdaysRegex")||(this._weekdaysRegex=Ia),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function va(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(g(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Oa),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ga(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(g(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=La),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Bt(){function e(z,ue){return ue.length-z.length}var t=[],s=[],i=[],l=[],d,f,_,C,D;for(d=0;d<7;d++)f=K([2e3,1]).day(d),_=ne(this.weekdaysMin(f,"")),C=ne(this.weekdaysShort(f,"")),D=ne(this.weekdays(f,"")),t.push(_),s.push(C),i.push(D),l.push(_),l.push(C),l.push(D);t.sort(e),s.sort(e),i.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Tt(){return this.hours()%12||12}function $a(){return this.hours()||24}w("H",["HH",2],0,"hour"),w("h",["hh",2],0,Tt),w("k",["kk",2],0,$a),w("hmm",0,0,function(){return""+Tt.apply(this)+Q(this.minutes(),2)}),w("hmmss",0,0,function(){return""+Tt.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),w("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),w("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)});function Ps(e,t){w(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ps("a",!0),Ps("A",!1);function Ns(e,t){return t._meridiemParse}S("a",Ns),S("A",Ns),S("H",Y,Mt),S("h",Y,xe),S("k",Y,xe),S("HH",Y,H),S("hh",Y,H),S("kk",Y,H),S("hmm",ys),S("hmmss",ps),S("Hmm",ys),S("Hmmss",ps),E(["H","HH"],A),E(["k","kk"],function(e,t,s){var i=M(e);t[A]=i===24?0:i}),E(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e}),E(["h","hh"],function(e,t,s){t[A]=M(e),x(s).bigHour=!0}),E("hmm",function(e,t,s){var i=e.length-2;t[A]=M(e.substr(0,i)),t[G]=M(e.substr(i)),x(s).bigHour=!0}),E("hmmss",function(e,t,s){var i=e.length-4,l=e.length-2;t[A]=M(e.substr(0,i)),t[G]=M(e.substr(i,2)),t[re]=M(e.substr(l)),x(s).bigHour=!0}),E("Hmm",function(e,t,s){var i=e.length-2;t[A]=M(e.substr(0,i)),t[G]=M(e.substr(i))}),E("Hmmss",function(e,t,s){var i=e.length-4,l=e.length-2;t[A]=M(e.substr(0,i)),t[G]=M(e.substr(i,2)),t[re]=M(e.substr(l))});function Za(e){return(e+"").toLowerCase().charAt(0)==="p"}var Ka=/[ap]\.?m?\.?/i,Ja=Me("Hours",!0);function Qa(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var Bs={calendar:Rr,longDateFormat:Ur,invalidDate:vr,ordinal:$r,dayOfMonthOrdinalParse:Zr,relativeTime:Jr,months:ha,monthsShort:Ss,week:Ma,weekdays:Va,weekdaysMin:Ya,weekdaysShort:Ds,meridiemParse:Ka},O={},Fe={},ze;function Xa(e,t){var s,i=Math.min(e.length,t.length);for(s=0;s<i;s+=1)if(e[s]!==t[s])return s;return i}function Ts(e){return e&&e.toLowerCase().replace("_","-")}function eo(e){for(var t=0,s,i,l,d;t<e.length;){for(d=Ts(e[t]).split("-"),s=d.length,i=Ts(e[t+1]),i=i?i.split("-"):null;s>0;){if(l=Xe(d.slice(0,s).join("-")),l)return l;if(i&&i.length>=s&&Xa(d,i)>=s-1)break;s--}t++}return ze}function to(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Xe(e){var t=null,s;if(O[e]===void 0&&a&&a.exports&&to(e))try{t=ze._abbr,s=Zt,s("./locale/"+e),he(t)}catch{O[e]=null}return O[e]}function he(e,t){var s;return e&&(h(t)?s=oe(e):s=Et(e,t),s?ze=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ze._abbr}function Et(e,t){if(t!==null){var s,i=Bs;if(t.abbr=e,O[e]!=null)us("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=O[e]._config;else if(t.parentLocale!=null)if(O[t.parentLocale]!=null)i=O[t.parentLocale]._config;else if(s=Xe(t.parentLocale),s!=null)i=s._config;else return Fe[t.parentLocale]||(Fe[t.parentLocale]=[]),Fe[t.parentLocale].push({name:e,config:t}),null;return O[e]=new kt(pt(i,t)),Fe[e]&&Fe[e].forEach(function(l){Et(l.name,l.config)}),he(e),O[e]}else return delete O[e],null}function so(e,t){if(t!=null){var s,i,l=Bs;O[e]!=null&&O[e].parentLocale!=null?O[e].set(pt(O[e]._config,t)):(i=Xe(e),i!=null&&(l=i._config),t=pt(l,t),i==null&&(t.abbr=e),s=new kt(t),s.parentLocale=O[e],O[e]=s),he(e)}else O[e]!=null&&(O[e].parentLocale!=null?(O[e]=O[e].parentLocale,e===he()&&he(e)):O[e]!=null&&delete O[e]);return O[e]}function oe(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ze;if(!u(e)){if(t=Xe(e),t)return t;e=[e]}return eo(e)}function no(){return _t(O)}function Vt(e){var t,s=e._a;return s&&x(e).overflow===-2&&(t=s[ie]<0||s[ie]>11?ie:s[X]<1||s[X]>Pt(s[F],s[ie])?X:s[A]<0||s[A]>24||s[A]===24&&(s[G]!==0||s[re]!==0||s[ke]!==0)?A:s[G]<0||s[G]>59?G:s[re]<0||s[re]>59?re:s[ke]<0||s[ke]>999?ke:-1,x(e)._overflowDayOfYear&&(t<F||t>X)&&(t=X),x(e)._overflowWeeks&&t===-1&&(t=oa),x(e)._overflowWeekday&&t===-1&&(t=la),x(e).overflow=t),e}var io=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ro=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ao=/Z|[+-]\d\d(?::?\d\d)?/,et=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Yt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],oo=/^\/?Date\((-?\d+)/i,lo=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,co={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Es(e){var t,s,i=e._i,l=io.exec(i)||ro.exec(i),d,f,_,C,D=et.length,z=Yt.length;if(l){for(x(e).iso=!0,t=0,s=D;t<s;t++)if(et[t][1].exec(l[1])){f=et[t][0],d=et[t][2]!==!1;break}if(f==null){e._isValid=!1;return}if(l[3]){for(t=0,s=z;t<s;t++)if(Yt[t][1].exec(l[3])){_=(l[2]||" ")+Yt[t][0];break}if(_==null){e._isValid=!1;return}}if(!d&&_!=null){e._isValid=!1;return}if(l[4])if(ao.exec(l[4]))C="Z";else{e._isValid=!1;return}e._f=f+(_||"")+(C||""),Ot(e)}else e._isValid=!1}function uo(e,t,s,i,l,d){var f=[mo(e),Ss.indexOf(t),parseInt(s,10),parseInt(i,10),parseInt(l,10)];return d&&f.push(parseInt(d,10)),f}function mo(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function ho(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function fo(e,t,s){if(e){var i=Ds.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(i!==l)return x(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function go(e,t,s){if(e)return co[e];if(t)return 0;var i=parseInt(s,10),l=i%100,d=(i-l)/100;return d*60+l}function Vs(e){var t=lo.exec(ho(e._i)),s;if(t){if(s=uo(t[4],t[3],t[2],t[5],t[6],t[7]),!fo(t[1],s,e))return;e._a=s,e._tzm=go(t[8],t[9],t[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),x(e).rfc2822=!0}else e._isValid=!1}function yo(e){var t=oo.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Es(e),e._isValid===!1)delete e._isValid;else return;if(Vs(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:c.createFromInputFallback(e)}c.createFromInputFallback=W("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function De(e,t,s){return e??t??s}function po(e){var t=new Date(c.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function It(e){var t,s,i=[],l,d,f;if(!e._d){for(l=po(e),e._w&&e._a[X]==null&&e._a[ie]==null&&ko(e),e._dayOfYear!=null&&(f=De(e._a[F],l[F]),(e._dayOfYear>Ie(f)||e._dayOfYear===0)&&(x(e)._overflowDayOfYear=!0),s=Le(f,0,e._dayOfYear),e._a[ie]=s.getUTCMonth(),e._a[X]=s.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=i[t]=l[t];for(;t<7;t++)e._a[t]=i[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[A]===24&&e._a[G]===0&&e._a[re]===0&&e._a[ke]===0&&(e._nextDay=!0,e._a[A]=0),e._d=(e._useUTC?Le:Ca).apply(null,i),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[A]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==d&&(x(e).weekdayMismatch=!0)}}function ko(e){var t,s,i,l,d,f,_,C,D;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(d=1,f=4,s=De(t.GG,e._a[F],Ae(I(),1,4).year),i=De(t.W,1),l=De(t.E,1),(l<1||l>7)&&(C=!0)):(d=e._locale._week.dow,f=e._locale._week.doy,D=Ae(I(),d,f),s=De(t.gg,e._a[F],D.year),i=De(t.w,D.week),t.d!=null?(l=t.d,(l<0||l>6)&&(C=!0)):t.e!=null?(l=t.e+d,(t.e<0||t.e>6)&&(C=!0)):l=d),i<1||i>ae(s,d,f)?x(e)._overflowWeeks=!0:C!=null?x(e)._overflowWeekday=!0:(_=Ms(s,i,l,d,f),e._a[F]=_.year,e._dayOfYear=_.dayOfYear)}c.ISO_8601=function(){},c.RFC_2822=function(){};function Ot(e){if(e._f===c.ISO_8601){Es(e);return}if(e._f===c.RFC_2822){Vs(e);return}e._a=[],x(e).empty=!0;var t=""+e._i,s,i,l,d,f,_=t.length,C=0,D,z;for(l=ms(e._f,e._locale).match(St)||[],z=l.length,s=0;s<z;s++)d=l[s],i=(t.match(ia(d,e))||[])[0],i&&(f=t.substr(0,t.indexOf(i)),f.length>0&&x(e).unusedInput.push(f),t=t.slice(t.indexOf(i)+i.length),C+=i.length),we[d]?(i?x(e).empty=!1:x(e).unusedTokens.push(d),aa(d,i,e)):e._strict&&!i&&x(e).unusedTokens.push(d);x(e).charsLeftOver=_-C,t.length>0&&x(e).unusedInput.push(t),e._a[A]<=12&&x(e).bigHour===!0&&e._a[A]>0&&(x(e).bigHour=void 0),x(e).parsedDateParts=e._a.slice(0),x(e).meridiem=e._meridiem,e._a[A]=_o(e._locale,e._a[A],e._meridiem),D=x(e).era,D!==null&&(e._a[F]=e._locale.erasConvertYear(D,e._a[F])),It(e),Vt(e)}function _o(e,t,s){var i;return s==null?t:e.meridiemHour!=null?e.meridiemHour(t,s):(e.isPM!=null&&(i=e.isPM(s),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function So(e){var t,s,i,l,d,f,_=!1,C=e._f.length;if(C===0){x(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<C;l++)d=0,f=!1,t=yt({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ot(t),ft(t)&&(f=!0),d+=x(t).charsLeftOver,d+=x(t).unusedTokens.length*10,x(t).score=d,_?d<i&&(i=d,s=t):(i==null||d<i||f)&&(i=d,s=t,f&&(_=!0));se(e,s||t)}function bo(e){if(!e._d){var t=wt(e._i),s=t.day===void 0?t.date:t.day;e._a=te([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),It(e)}}function wo(e){var t=new Ee(Vt(Ys(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ys(e){var t=e._i,s=e._f;return e._locale=e._locale||oe(e._l),t===null||s===void 0&&t===""?je({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),v(t)?new Ee(Vt(t)):(b(t)?e._d=t:u(s)?So(e):s?Ot(e):Co(e),ft(e)||(e._d=null),e))}function Co(e){var t=e._i;h(t)?e._d=new Date(c.now()):b(t)?e._d=new Date(t.valueOf()):typeof t=="string"?yo(e):u(t)?(e._a=te(t.slice(0),function(s){return parseInt(s,10)}),It(e)):p(t)?bo(e):B(t)?e._d=new Date(t):c.createFromInputFallback(e)}function Is(e,t,s,i,l){var d={};return(t===!0||t===!1)&&(i=t,t=void 0),(s===!0||s===!1)&&(i=s,s=void 0),(p(e)&&k(e)||u(e)&&e.length===0)&&(e=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=l,d._l=s,d._i=e,d._f=t,d._strict=i,wo(d)}function I(e,t,s,i){return Is(e,t,s,i,!1)}var xo=W("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:je()}),Mo=W("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:je()});function Os(e,t){var s,i;if(t.length===1&&u(t[0])&&(t=t[0]),!t.length)return I();for(s=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](s))&&(s=t[i]);return s}function Do(){var e=[].slice.call(arguments,0);return Os("isBefore",e)}function Po(){var e=[].slice.call(arguments,0);return Os("isAfter",e)}var No=function(){return Date.now?Date.now():+new Date},Re=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bo(e){var t,s=!1,i,l=Re.length;for(t in e)if(g(e,t)&&!(L.call(Re,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<l;++i)if(e[Re[i]]){if(s)return!1;parseFloat(e[Re[i]])!==M(e[Re[i]])&&(s=!0)}return!0}function To(){return this._isValid}function Eo(){return $(NaN)}function tt(e){var t=wt(e),s=t.year||0,i=t.quarter||0,l=t.month||0,d=t.week||t.isoWeek||0,f=t.day||0,_=t.hour||0,C=t.minute||0,D=t.second||0,z=t.millisecond||0;this._isValid=Bo(t),this._milliseconds=+z+D*1e3+C*6e4+_*1e3*60*60,this._days=+f+d*7,this._months=+l+i*3+s*12,this._data={},this._locale=oe(),this._bubble()}function st(e){return e instanceof tt}function Lt(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Vo(e,t,s){var i=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),d=0,f;for(f=0;f<i;f++)M(e[f])!==M(t[f])&&d++;return d+l}function Ls(e,t){w(e,0,0,function(){var s=this.utcOffset(),i="+";return s<0&&(s=-s,i="-"),i+Q(~~(s/60),2)+t+Q(~~s%60,2)})}Ls("Z",":"),Ls("ZZ",""),S("Z",Ze),S("ZZ",Ze),E(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=At(Ze,e)});var Yo=/([\+\-]|\d\d)/gi;function At(e,t){var s=(t||"").match(e),i,l,d;return s===null?null:(i=s[s.length-1]||[],l=(i+"").match(Yo)||["-",0,0],d=+(l[1]*60)+M(l[2]),d===0?0:l[0]==="+"?d:-d)}function Ft(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(v(e)||b(e)?e.valueOf():I(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),c.updateOffset(s,!1),s):I(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}c.updateOffset=function(){};function Io(e,t,s){var i=this._offset||0,l;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=At(Ze,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(l=zt(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),i!==e&&(!t||this._changeInProgress?Rs(this,$(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:zt(this)}function Oo(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Lo(e){return this.utcOffset(0,e)}function Ao(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this}function Fo(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=At(sa,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function zo(e){return this.isValid()?(e=e?I(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Ro(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ho(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e={},t;return yt(e,this),e=Ys(e),e._a?(t=e._isUTC?K(e._a):I(e._a),this._isDSTShifted=this.isValid()&&Vo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jo(){return this.isValid()?!this._isUTC:!1}function Wo(){return this.isValid()?this._isUTC:!1}function As(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Uo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $(e,t){var s=e,i=null,l,d,f;return st(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:B(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=Uo.exec(e))?(l=i[1]==="-"?-1:1,s={y:0,d:M(i[X])*l,h:M(i[A])*l,m:M(i[G])*l,s:M(i[re])*l,ms:M(Lt(i[ke]*1e3))*l}):(i=qo.exec(e))?(l=i[1]==="-"?-1:1,s={y:_e(i[2],l),M:_e(i[3],l),w:_e(i[4],l),d:_e(i[5],l),h:_e(i[6],l),m:_e(i[7],l),s:_e(i[8],l)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(f=vo(I(s.from),I(s.to)),s={},s.ms=f.milliseconds,s.M=f.months),d=new tt(s),st(e)&&g(e,"_locale")&&(d._locale=e._locale),st(e)&&g(e,"_isValid")&&(d._isValid=e._isValid),d}$.fn=tt.prototype,$.invalid=Eo;function _e(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Fs(e,t){var s={};return s.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function vo(e,t){var s;return e.isValid()&&t.isValid()?(t=Ft(t,e),e.isBefore(t)?s=Fs(e,t):(s=Fs(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function zs(e,t){return function(s,i){var l,d;return i!==null&&!isNaN(+i)&&(us(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=s,s=i,i=d),l=$(s,i),Rs(this,l,e),this}}function Rs(e,t,s,i){var l=t._milliseconds,d=Lt(t._days),f=Lt(t._months);e.isValid()&&(i=i??!0,f&&ws(e,Oe(e,"Month")+f*s),d&&_s(e,"Date",Oe(e,"Date")+d*s),l&&e._d.setTime(e._d.valueOf()+l*s),i&&c.updateOffset(e,d||f))}var Go=zs(1,"add"),$o=zs(-1,"subtract");function Hs(e){return typeof e=="string"||e instanceof String}function Zo(e){return v(e)||b(e)||Hs(e)||B(e)||Jo(e)||Ko(e)||e===null||e===void 0}function Ko(e){var t=p(e)&&!k(e),s=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,d,f=i.length;for(l=0;l<f;l+=1)d=i[l],s=s||g(e,d);return t&&s}function Jo(e){var t=u(e),s=!1;return t&&(s=e.filter(function(i){return!B(i)&&Hs(e)}).length===0),t&&s}function Qo(e){var t=p(e)&&!k(e),s=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,d;for(l=0;l<i.length;l+=1)d=i[l],s=s||g(e,d);return t&&s}function Xo(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function el(e,t){arguments.length===1&&(arguments[0]?Zo(arguments[0])?(e=arguments[0],t=void 0):Qo(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||I(),i=Ft(s,this).startOf("day"),l=c.calendarFormat(this,i)||"sameElse",d=t&&(J(t[l])?t[l].call(this,s):t[l]);return this.format(d||this.localeData().calendar(l,this,I(s)))}function tl(){return new Ee(this)}function sl(e,t){var s=v(e)?e:I(e);return this.isValid()&&s.isValid()?(t=U(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function nl(e,t){var s=v(e)?e:I(e);return this.isValid()&&s.isValid()?(t=U(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function il(e,t,s,i){var l=v(e)?e:I(e),d=v(t)?t:I(t);return this.isValid()&&l.isValid()&&d.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(l,s):!this.isBefore(l,s))&&(i[1]===")"?this.isBefore(d,s):!this.isAfter(d,s))):!1}function rl(e,t){var s=v(e)?e:I(e),i;return this.isValid()&&s.isValid()?(t=U(t)||"millisecond",t==="millisecond"?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function al(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function ol(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ll(e,t,s){var i,l,d;if(!this.isValid())return NaN;if(i=Ft(e,this),!i.isValid())return NaN;switch(l=(i.utcOffset()-this.utcOffset())*6e4,t=U(t),t){case"year":d=nt(this,i)/12;break;case"month":d=nt(this,i);break;case"quarter":d=nt(this,i)/3;break;case"second":d=(this-i)/1e3;break;case"minute":d=(this-i)/6e4;break;case"hour":d=(this-i)/36e5;break;case"day":d=(this-i-l)/864e5;break;case"week":d=(this-i-l)/6048e5;break;default:d=this-i}return s?d:q(d)}function nt(e,t){if(e.date()<t.date())return-nt(t,e);var s=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(s,"months"),l,d;return t-i<0?(l=e.clone().add(s-1,"months"),d=(t-i)/(i-l)):(l=e.clone().add(s+1,"months"),d=(t-i)/(l-i)),-(s+d)||0}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function dl(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function cl(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Ue(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):J(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ue(s,"Z")):Ue(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ul(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",s,i,l,d;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),s="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",d=t+'[")]',this.format(s+i+l+d)}function ml(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=Ue(this,e);return this.localeData().postformat(t)}function hl(e,t){return this.isValid()&&(v(e)&&e.isValid()||I(e).isValid())?$({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fl(e){return this.from(I(),e)}function gl(e,t){return this.isValid()&&(v(e)&&e.isValid()||I(e).isValid())?$({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function yl(e){return this.to(I(),e)}function js(e){var t;return e===void 0?this._locale._abbr:(t=oe(e),t!=null&&(this._locale=t),this)}var Ws=W("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Us(){return this._locale}var it=1e3,Pe=60*it,rt=60*Pe,qs=(365*400+97)*24*rt;function Ne(e,t){return(e%t+t)%t}function vs(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-qs:new Date(e,t,s).valueOf()}function Gs(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-qs:Date.UTC(e,t,s)}function pl(e){var t,s;if(e=U(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Gs:vs,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ne(t+(this._isUTC?0:this.utcOffset()*Pe),rt);break;case"minute":t=this._d.valueOf(),t-=Ne(t,Pe);break;case"second":t=this._d.valueOf(),t-=Ne(t,it);break}return this._d.setTime(t),c.updateOffset(this,!0),this}function kl(e){var t,s;if(e=U(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Gs:vs,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rt-Ne(t+(this._isUTC?0:this.utcOffset()*Pe),rt)-1;break;case"minute":t=this._d.valueOf(),t+=Pe-Ne(t,Pe)-1;break;case"second":t=this._d.valueOf(),t+=it-Ne(t,it)-1;break}return this._d.setTime(t),c.updateOffset(this,!0),this}function _l(){return this._d.valueOf()-(this._offset||0)*6e4}function Sl(){return Math.floor(this.valueOf()/1e3)}function bl(){return new Date(this.valueOf())}function wl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Cl(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xl(){return this.isValid()?this.toISOString():null}function Ml(){return ft(this)}function Dl(){return se({},x(this))}function Pl(){return x(this).overflow}function Nl(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}w("N",0,0,"eraAbbr"),w("NN",0,0,"eraAbbr"),w("NNN",0,0,"eraAbbr"),w("NNNN",0,0,"eraName"),w("NNNNN",0,0,"eraNarrow"),w("y",["y",1],"yo","eraYear"),w("y",["yy",2],0,"eraYear"),w("y",["yyy",3],0,"eraYear"),w("y",["yyyy",4],0,"eraYear"),S("N",Rt),S("NN",Rt),S("NNN",Rt),S("NNNN",zl),S("NNNNN",Rl),E(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,i){var l=s._locale.erasParse(e,i,s._strict);l?x(s).era=l:x(s).invalidEra=e}),S("y",Ce),S("yy",Ce),S("yyy",Ce),S("yyyy",Ce),S("yo",Hl),E(["y","yy","yyy","yyyy"],F),E(["yo"],function(e,t,s,i){var l;s._locale._eraYearOrdinalRegex&&(l=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[F]=s._locale.eraYearOrdinalParse(e,l):t[F]=parseInt(e,10)});function Bl(e,t){var s,i,l,d=this._eras||oe("en")._eras;for(s=0,i=d.length;s<i;++s){switch(typeof d[s].since){case"string":l=c(d[s].since).startOf("day"),d[s].since=l.valueOf();break}switch(typeof d[s].until){case"undefined":d[s].until=1/0;break;case"string":l=c(d[s].until).startOf("day").valueOf(),d[s].until=l.valueOf();break}}return d}function Tl(e,t,s){var i,l,d=this.eras(),f,_,C;for(e=e.toUpperCase(),i=0,l=d.length;i<l;++i)if(f=d[i].name.toUpperCase(),_=d[i].abbr.toUpperCase(),C=d[i].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(_===e)return d[i];break;case"NNNN":if(f===e)return d[i];break;case"NNNNN":if(C===e)return d[i];break}else if([f,_,C].indexOf(e)>=0)return d[i]}function El(e,t){var s=e.since<=e.until?1:-1;return t===void 0?c(e.since).year():c(e.since).year()+(t-e.offset)*s}function Vl(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].name;return""}function Yl(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].narrow;return""}function Il(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].abbr;return""}function Ol(){var e,t,s,i,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(s=l[e].since<=l[e].until?1:-1,i=this.clone().startOf("day").valueOf(),l[e].since<=i&&i<=l[e].until||l[e].until<=i&&i<=l[e].since)return(this.year()-c(l[e].since).year())*s+l[e].offset;return this.year()}function Ll(e){return g(this,"_erasNameRegex")||Ht.call(this),e?this._erasNameRegex:this._erasRegex}function Al(e){return g(this,"_erasAbbrRegex")||Ht.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fl(e){return g(this,"_erasNarrowRegex")||Ht.call(this),e?this._erasNarrowRegex:this._erasRegex}function Rt(e,t){return t.erasAbbrRegex(e)}function zl(e,t){return t.erasNameRegex(e)}function Rl(e,t){return t.erasNarrowRegex(e)}function Hl(e,t){return t._eraYearOrdinalRegex||Ce}function Ht(){var e=[],t=[],s=[],i=[],l,d,f,_,C,D=this.eras();for(l=0,d=D.length;l<d;++l)f=ne(D[l].name),_=ne(D[l].abbr),C=ne(D[l].narrow),t.push(f),e.push(_),s.push(C),i.push(f),i.push(_),i.push(C);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}w(0,["gg",2],0,function(){return this.weekYear()%100}),w(0,["GG",2],0,function(){return this.isoWeekYear()%100});function at(e,t){w(0,[e,e.length],0,t)}at("gggg","weekYear"),at("ggggg","weekYear"),at("GGGG","isoWeekYear"),at("GGGGG","isoWeekYear"),S("G",$e),S("g",$e),S("GG",Y,H),S("gg",Y,H),S("GGGG",xt,Ct),S("gggg",xt,Ct),S("GGGGG",Ge,qe),S("ggggg",Ge,qe),Ye(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,i){t[i.substr(0,2)]=M(e)}),Ye(["gg","GG"],function(e,t,s,i){t[i]=c.parseTwoDigitYear(e)});function jl(e){return $s.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Wl(e){return $s.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Ul(){return ae(this.year(),1,4)}function ql(){return ae(this.isoWeekYear(),1,4)}function vl(){var e=this.localeData()._week;return ae(this.year(),e.dow,e.doy)}function Gl(){var e=this.localeData()._week;return ae(this.weekYear(),e.dow,e.doy)}function $s(e,t,s,i,l){var d;return e==null?Ae(this,i,l).year:(d=ae(e,i,l),t>d&&(t=d),$l.call(this,e,t,s,i,l))}function $l(e,t,s,i,l){var d=Ms(e,t,s,i,l),f=Le(d.year,0,d.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}w("Q",0,"Qo","quarter"),S("Q",fs),E("Q",function(e,t){t[ie]=(M(e)-1)*3});function Zl(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}w("D",["DD",2],"Do","date"),S("D",Y,xe),S("DD",Y,H),S("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),E(["D","DD"],X),E("Do",function(e,t){t[X]=M(e.match(Y)[0])});var Zs=Me("Date",!0);w("DDD",["DDDD",3],"DDDo","dayOfYear"),S("DDD",ve),S("DDDD",gs),E(["DDD","DDDD"],function(e,t,s){s._dayOfYear=M(e)});function Kl(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}w("m",["mm",2],0,"minute"),S("m",Y,Mt),S("mm",Y,H),E(["m","mm"],G);var Jl=Me("Minutes",!1);w("s",["ss",2],0,"second"),S("s",Y,Mt),S("ss",Y,H),E(["s","ss"],re);var Ql=Me("Seconds",!1);w("S",0,0,function(){return~~(this.millisecond()/100)}),w(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),w(0,["SSS",3],0,"millisecond"),w(0,["SSSS",4],0,function(){return this.millisecond()*10}),w(0,["SSSSS",5],0,function(){return this.millisecond()*100}),w(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),w(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),w(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),w(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),S("S",ve,fs),S("SS",ve,H),S("SSS",ve,gs);var fe,Ks;for(fe="SSSS";fe.length<=9;fe+="S")S(fe,Ce);function Xl(e,t){t[ke]=M(("0."+e)*1e3)}for(fe="S";fe.length<=9;fe+="S")E(fe,Xl);Ks=Me("Milliseconds",!1),w("z",0,0,"zoneAbbr"),w("zz",0,0,"zoneName");function ed(){return this._isUTC?"UTC":""}function td(){return this._isUTC?"Coordinated Universal Time":""}var y=Ee.prototype;y.add=Go,y.calendar=el,y.clone=tl,y.diff=ll,y.endOf=kl,y.format=ml,y.from=hl,y.fromNow=fl,y.to=gl,y.toNow=yl,y.get=ca,y.invalidAt=Pl,y.isAfter=sl,y.isBefore=nl,y.isBetween=il,y.isSame=rl,y.isSameOrAfter=al,y.isSameOrBefore=ol,y.isValid=Ml,y.lang=Ws,y.locale=js,y.localeData=Us,y.max=Mo,y.min=xo,y.parsingFlags=Dl,y.set=ua,y.startOf=pl,y.subtract=$o,y.toArray=wl,y.toObject=Cl,y.toDate=bl,y.toISOString=cl,y.inspect=ul,typeof Symbol<"u"&&Symbol.for!=null&&(y[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),y.toJSON=xl,y.toString=dl,y.unix=Sl,y.valueOf=_l,y.creationData=Nl,y.eraName=Vl,y.eraNarrow=Yl,y.eraAbbr=Il,y.eraYear=Ol,y.year=ks,y.isLeapYear=da,y.weekYear=jl,y.isoWeekYear=Wl,y.quarter=y.quarters=Zl,y.month=Cs,y.daysInMonth=Sa,y.week=y.weeks=Na,y.isoWeek=y.isoWeeks=Ba,y.weeksInYear=vl,y.weeksInWeekYear=Gl,y.isoWeeksInYear=Ul,y.isoWeeksInISOWeekYear=ql,y.date=Zs,y.day=y.days=ja,y.weekday=Wa,y.isoWeekday=Ua,y.dayOfYear=Kl,y.hour=y.hours=Ja,y.minute=y.minutes=Jl,y.second=y.seconds=Ql,y.millisecond=y.milliseconds=Ks,y.utcOffset=Io,y.utc=Lo,y.local=Ao,y.parseZone=Fo,y.hasAlignedHourOffset=zo,y.isDST=Ro,y.isLocal=jo,y.isUtcOffset=Wo,y.isUtc=As,y.isUTC=As,y.zoneAbbr=ed,y.zoneName=td,y.dates=W("dates accessor is deprecated. Use date instead.",Zs),y.months=W("months accessor is deprecated. Use month instead",Cs),y.years=W("years accessor is deprecated. Use year instead",ks),y.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Oo),y.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ho);function sd(e){return I(e*1e3)}function nd(){return I.apply(null,arguments).parseZone()}function Js(e){return e}var N=kt.prototype;N.calendar=Hr,N.longDateFormat=qr,N.invalidDate=Gr,N.ordinal=Kr,N.preparse=Js,N.postformat=Js,N.relativeTime=Qr,N.pastFuture=Xr,N.set=zr,N.eras=Bl,N.erasParse=Tl,N.erasConvertYear=El,N.erasAbbrRegex=Al,N.erasNameRegex=Ll,N.erasNarrowRegex=Fl,N.months=ya,N.monthsShort=pa,N.monthsParse=_a,N.monthsRegex=wa,N.monthsShortRegex=ba,N.week=xa,N.firstDayOfYear=Pa,N.firstDayOfWeek=Da,N.weekdays=Aa,N.weekdaysMin=za,N.weekdaysShort=Fa,N.weekdaysParse=Ha,N.weekdaysRegex=qa,N.weekdaysShortRegex=va,N.weekdaysMinRegex=Ga,N.isPM=Za,N.meridiem=Qa;function ot(e,t,s,i){var l=oe(),d=K().set(i,t);return l[s](d,e)}function Qs(e,t,s){if(B(e)&&(t=e,e=void 0),e=e||"",t!=null)return ot(e,t,s,"month");var i,l=[];for(i=0;i<12;i++)l[i]=ot(e,i,s,"month");return l}function jt(e,t,s,i){typeof e=="boolean"?(B(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,B(t)&&(s=t,t=void 0),t=t||"");var l=oe(),d=e?l._week.dow:0,f,_=[];if(s!=null)return ot(t,(s+d)%7,i,"day");for(f=0;f<7;f++)_[f]=ot(t,(f+d)%7,i,"day");return _}function id(e,t){return Qs(e,t,"months")}function rd(e,t){return Qs(e,t,"monthsShort")}function ad(e,t,s){return jt(e,t,s,"weekdays")}function od(e,t,s){return jt(e,t,s,"weekdaysShort")}function ld(e,t,s){return jt(e,t,s,"weekdaysMin")}he("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=M(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}}),c.lang=W("moment.lang is deprecated. Use moment.locale instead.",he),c.langData=W("moment.langData is deprecated. Use moment.localeData instead.",oe);var le=Math.abs;function dd(){var e=this._data;return this._milliseconds=le(this._milliseconds),this._days=le(this._days),this._months=le(this._months),e.milliseconds=le(e.milliseconds),e.seconds=le(e.seconds),e.minutes=le(e.minutes),e.hours=le(e.hours),e.months=le(e.months),e.years=le(e.years),this}function Xs(e,t,s,i){var l=$(t,s);return e._milliseconds+=i*l._milliseconds,e._days+=i*l._days,e._months+=i*l._months,e._bubble()}function cd(e,t){return Xs(this,e,t,1)}function ud(e,t){return Xs(this,e,t,-1)}function en(e){return e<0?Math.floor(e):Math.ceil(e)}function md(){var e=this._milliseconds,t=this._days,s=this._months,i=this._data,l,d,f,_,C;return e>=0&&t>=0&&s>=0||e<=0&&t<=0&&s<=0||(e+=en(Wt(s)+t)*864e5,t=0,s=0),i.milliseconds=e%1e3,l=q(e/1e3),i.seconds=l%60,d=q(l/60),i.minutes=d%60,f=q(d/60),i.hours=f%24,t+=q(f/24),C=q(tn(t)),s+=C,t-=en(Wt(C)),_=q(s/12),s%=12,i.days=t,i.months=s,i.years=_,this}function tn(e){return e*4800/146097}function Wt(e){return e*146097/4800}function hd(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if(e=U(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,s=this._months+tn(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(Wt(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function de(e){return function(){return this.as(e)}}var sn=de("ms"),fd=de("s"),gd=de("m"),yd=de("h"),pd=de("d"),kd=de("w"),_d=de("M"),Sd=de("Q"),bd=de("y"),wd=sn;function Cd(){return $(this)}function xd(e){return e=U(e),this.isValid()?this[e+"s"]():NaN}function Se(e){return function(){return this.isValid()?this._data[e]:NaN}}var Md=Se("milliseconds"),Dd=Se("seconds"),Pd=Se("minutes"),Nd=Se("hours"),Bd=Se("days"),Td=Se("months"),Ed=Se("years");function Vd(){return q(this.days()/7)}var ce=Math.round,Be={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yd(e,t,s,i,l){return l.relativeTime(t||1,!!s,e,i)}function Id(e,t,s,i){var l=$(e).abs(),d=ce(l.as("s")),f=ce(l.as("m")),_=ce(l.as("h")),C=ce(l.as("d")),D=ce(l.as("M")),z=ce(l.as("w")),ue=ce(l.as("y")),ge=d<=s.ss&&["s",d]||d<s.s&&["ss",d]||f<=1&&["m"]||f<s.m&&["mm",f]||_<=1&&["h"]||_<s.h&&["hh",_]||C<=1&&["d"]||C<s.d&&["dd",C];return s.w!=null&&(ge=ge||z<=1&&["w"]||z<s.w&&["ww",z]),ge=ge||D<=1&&["M"]||D<s.M&&["MM",D]||ue<=1&&["y"]||["yy",ue],ge[2]=t,ge[3]=+e>0,ge[4]=i,Yd.apply(null,ge)}function Od(e){return e===void 0?ce:typeof e=="function"?(ce=e,!0):!1}function Ld(e,t){return Be[e]===void 0?!1:t===void 0?Be[e]:(Be[e]=t,e==="s"&&(Be.ss=t-1),!0)}function Ad(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,i=Be,l,d;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(i=Object.assign({},Be,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),l=this.localeData(),d=Id(this,!s,i,l),s&&(d=l.pastFuture(+this,d)),l.postformat(d)}var Ut=Math.abs;function Te(e){return(e>0)-(e<0)||+e}function lt(){if(!this.isValid())return this.localeData().invalidDate();var e=Ut(this._milliseconds)/1e3,t=Ut(this._days),s=Ut(this._months),i,l,d,f,_=this.asSeconds(),C,D,z,ue;return _?(i=q(e/60),l=q(i/60),e%=60,i%=60,d=q(s/12),s%=12,f=e?e.toFixed(3).replace(/\.?0+$/,""):"",C=_<0?"-":"",D=Te(this._months)!==Te(_)?"-":"",z=Te(this._days)!==Te(_)?"-":"",ue=Te(this._milliseconds)!==Te(_)?"-":"",C+"P"+(d?D+d+"Y":"")+(s?D+s+"M":"")+(t?z+t+"D":"")+(l||i||e?"T":"")+(l?ue+l+"H":"")+(i?ue+i+"M":"")+(e?ue+f+"S":"")):"P0D"}var P=tt.prototype;P.isValid=To,P.abs=dd,P.add=cd,P.subtract=ud,P.as=hd,P.asMilliseconds=sn,P.asSeconds=fd,P.asMinutes=gd,P.asHours=yd,P.asDays=pd,P.asWeeks=kd,P.asMonths=_d,P.asQuarters=Sd,P.asYears=bd,P.valueOf=wd,P._bubble=md,P.clone=Cd,P.get=xd,P.milliseconds=Md,P.seconds=Dd,P.minutes=Pd,P.hours=Nd,P.days=Bd,P.weeks=Vd,P.months=Td,P.years=Ed,P.humanize=Ad,P.toISOString=lt,P.toString=lt,P.toJSON=lt,P.locale=js,P.localeData=Us,P.toIsoString=W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lt),P.lang=Ws,w("X",0,0,"unix"),w("x",0,0,"valueOf"),S("x",$e),S("X",na),E("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)}),E("x",function(e,t,s){s._d=new Date(M(e))});//! moment.js
5
- return c.version="2.30.1",m(I),c.fn=y,c.min=Do,c.max=Po,c.now=No,c.utc=K,c.unix=sd,c.months=id,c.isDate=b,c.locale=he,c.invalid=je,c.duration=$,c.isMoment=v,c.weekdays=ad,c.parseZone=nd,c.localeData=oe,c.isDuration=st,c.monthsShort=rd,c.weekdaysMin=ld,c.defineLocale=Et,c.updateLocale=so,c.locales=no,c.weekdaysShort=od,c.normalizeUnits=U,c.relativeTimeRounding=Od,c.relativeTimeThreshold=Ld,c.calendarFormat=Xo,c.prototype=y,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},c})}(Kt)),Kt.exports}(function(a,o){(function(r,c){c(typeof Zt=="function"?$n():r.moment)})($t,function(r){//! moment.js locale configuration
6
- var c=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,m=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,u=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,p=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],g=r.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:u,monthsShortRegex:u,monthsStrictRegex:c,monthsShortStrictRegex:m,monthsParse:p,longMonthsParse:p,shortMonthsParse:p,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(k,h){switch(h){case"D":return k+(k===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return k+(k===1?"er":"e");case"w":case"W":return k+(k===1?"re":"e")}},week:{dow:1,doy:4}});return g})})();function ye(a,o=!0){if(!a)return null;let r=a.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return o?r.toLowerCase():r}function Qt(a){return a?a==null?void 0:a.toLocaleString("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}):"0 €"}function mt(a,o="DD/MM/YYYY"){return!a||!ee.unix(a).isValid()?a:ee.unix(a).format(o)}function Xt(a,o="DD/MM/YYYY à HH:mm"){return mt(a,o)}const es=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)?$/;function Zn(a,o){const r=a.replace(/\d+/g,m=>(+m+1e5).toString()),c=o.replace(/\d+/g,m=>(+m+1e5).toString());return r.localeCompare(c)}function ts(a){return a!=null&&a!==""&&!isNaN(a)}function ss(a){return a&&ee(a,"DD/MM/YYYY",!0).isValid()}function ns(a){return typeof a=="boolean"}function Kn(a,o,r){const c=(a?1:0)-(o?1:0);return r?-c:c}function Jn(a,o){const r=(a==null||a==="")&&typeof a!="boolean",c=(o==null||o==="")&&typeof o!="boolean";return r&&c?0:r?1:c?-1:null}function is(a){return typeof a=="string"&&a.includes("€")}function Qn(a,o,r){const c=parseFloat(a.replace("€","").replace(",",".").replace(/\s/g,"").trim()),m=parseFloat(o.replace("€","").replace(",",".").replace(/\s/g,"").trim());if(isNaN(c)&&isNaN(m))return 0;if(isNaN(c))return 1;if(isNaN(m))return-1;const u=c-m;return r?u:-u}function He(a,o,r){const c=Jn(a,o);if(c!==null)return c;if(ns(a)&&ns(o))return Kn(a,o,r);if(es.test(a)&&es.test(o)){const g=Zn(a,o);return r?g:-g}if(ts(a)&&ts(o)){const g=parseFloat(a),k=parseFloat(o);return r?g-k:k-g}if(ss(a)&&ss(o)){const g=ee(a,"DD/MM/YYYY").unix(),k=ee(o,"DD/MM/YYYY").unix();return r?g-k:k-g}if(is(a)&&is(o))return Qn(a,o,r);const m=typeof a=="string"?ye(a).toLowerCase():ye(String(a)).toLowerCase(),u=typeof o=="string"?ye(o).toLowerCase():ye(String(o)).toLowerCase(),p=m.localeCompare(u,void 0,{numeric:!0,sensitivity:"base"});return r?p:-p}function Xn(a,o,r=!1){return!a||!Array.isArray(a)?a:a.sort((c,m)=>{const u=c==null?void 0:c[o],p=m==null?void 0:m[o];return He(u,p,r)})}function rs(a,o=!1,r){return!a||!Array.isArray(a)?a:a.sort((c,m)=>r(c,m,o))}function as(a,o){let r=pe(a);if(!r)r={columns:o};else if(!r.columns)r.columns=o;else{let c=o.filter(function(u){return!r.columns.some(function(p){return p.id===u.id})});r.columns=r.columns.concat(c);let m=r.columns.filter(function(u){return!o.some(function(p){return u.id===p.id})});r.columns=r.columns.filter(function(u){return!m.some(function(p){return u.id===p.id})}),r.columns.filter(u=>{for(let p of o)p.id===u.id&&p.libelle!==u.libelle&&(u.libelle=p.libelle)})}be(a,r)}function ei(a,o,r=null){let c=pe(a);c?r&&!c[r]&&(c[r]=o):r?(c={},c[r]=o):c=o,be(a,c)}function pe(a){return JSON.parse(window.localStorage.getItem(a))}function be(a,o,r=null){let c=pe(a);return r?c[r]=o:c=o,window.localStorage.setItem(a,JSON.stringify(c))}const ti=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r};me.library.add(T.faEye,T.faEyeSlash,T.faArrowDownWideShort,T.faArrowDownShortWide,T.faTrash,T.faPlus,T.faXmark,T.faGreaterThan,T.faFilter);const si={name:"AmsomTableDraggable",components:{VueDraggableNext:nn.VueDraggableNext,FontAwesomeIcon:j.FontAwesomeIcon},props:{tableId:{type:String,default:"table-draggable",require:!0},defaultColumns:{type:Array,require:!0,default:null},dynamicColumns:{type:Array,default:null},localStorageItemName:{type:String,default:null},localStorageMaxItemPerPageName:{type:String,default:null},tdItemsList:{type:[Array,Object],require:!0,default:null},search:{type:String,default:null},pickedDate:{type:Array,default:null},columnNameDateFilter:{type:Array,default:null},maxItemPerPage:{type:Number,default:-1},infiniteScroll:{type:Boolean,default:!1},infiniteScrollIncrement:{type:Number,default:null},maxItemPerPageList:{type:Array,default:()=>[{value:5,text:"5"},{value:10,text:"10"},{value:15,text:"15"},{value:25,text:"25"},{value:50,text:"50"},{value:100,text:"100"},{value:500,text:"500"},{value:1e3,text:"1000"},{value:-1,text:"Tous"}]},tdClass:{type:String,default:""},showMaxItemPerPageBtn:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},showModifyColumnsBtn:{type:Boolean,default:!1},showLineNumber:{type:Boolean,default:!1},ghostClass:{type:String,default:"bg-success"},headerBgColor:{type:String,default:"bg-white"},headerTextColor:{type:String,default:"text-primary"},lineEditMode:{type:Boolean,default:!1},border:{type:Boolean,default:!1},tableSm:{type:Boolean,default:!1},deepSorts:{type:Boolean,default:!1},deepSortsListPreset:{type:Array,default:null},ckSelectedItems:{type:Array,default:null},lineStatesList:{type:Array,default:()=>[{state:"add",class:"addLineState"},{state:"delete",class:"deleteLineState"},{state:"update",class:"updateLineState"}]},stickyScrollbarHorizontal:{type:Boolean,default:!1},paginationPosition:{type:String,default:"left",validator(a){return["left","center","right"].includes(a)}},trFontSize:{type:String,default:"fs-6"},trHeightPx:{type:Number,default:60},noValueText:{type:String,default:"Aucune valeur"}},emits:["changeSubject","lineEditModeAddNewLine","update:ckSelectedItems","update:dynamicColumns","update:deepSortsListPreset","contextmenu"],data(){return{checkAllCheckBox:!1,isDragging:!1,sortKey:null,sortAsc:!1,currentPage:1,previousCurrentPage:1,selectedItems:[],currentHeaderSort:null,headerEditMode:!1,totalPages:null,columns:this.copyDefaultColumns(),maxItemsPerPage:this.getDefaultMaxItemPerPage(),forceTableUpdateIndex:0,resizeObserver:null,showScrollbar:!1,tableContainer:null,deepSortsList:[],isInternalUpdate:!1,currentVisibleItems:0,scrollTimeout:null,stickyColumnsUpdateTimeout:null,normalizedItemsCache:new Map,deepSortCache:null,deepSortCacheKey:"",stickyColumnsAnimationFrame:null}},computed:{currentDisplayPagination(){let a=[];return this.totalPages<=1?a:(this.currentPage===1?a=[1,2,3]:this.currentPage===this.totalPages?a=[this.totalPages-2,this.totalPages-1,this.totalPages]:a=[this.currentPage-1,this.currentPage,this.currentPage+1],a.filter(o=>o>=1&&o<=this.totalPages))},items(){return this.tdItemsList?this.tdItemsList:[]},showItemsLinesNumber(){return this.showeditems.length},dateFilterBounds(){return!this.pickedDate||!this.pickedDate[0]||!this.pickedDate[1]?null:{deb:ee(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:ee(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?ye(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},visibleColumns(){return this.columns.filter(a=>a.show&&(!a.onlyOnEditMode||this.lineEditMode))},filtereditems(){var a,o;return this.items?this.items.filter(r=>{const c=this.filterBy(r,this.normalizedSearch);if(this.hasDateFilter){const m=this.columnNameDateFilter.some(u=>{const p=r[u];if(p){const g=ee(p,"DD/MM/YYYY").unix();return g>=this.dateFilterBounds.deb&&g<=this.dateFilterBounds.fin}return!1});return c&&m}return c}):[]`${this.normalizedSearch}_${this.hasDateFilter}_${(a=this.dateFilterBounds)==null?void 0:a.deb}_${(o=this.dateFilterBounds)==null?void 0:o.fin}`},sortedItems(){if(!this.filtereditems)return[];if(!this.sortKey&&(!this.deepSorts||this.deepSortsList.length===0))return this.filtereditems;const a=this.columns.find(o=>o.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):a!=null&&a.customSort?rs([...this.filtereditems],this.sortAsc,a.customSort):a!=null&&a.formatter||a!=null&&a.type?rs([...this.filtereditems],this.sortAsc,(o,r,c)=>{const m=this.formatColumnValue(o,a),u=this.formatColumnValue(r,a);return He(m,u,c)}):this.sortKey?Xn([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const a=this.sortedItems;if(this.infiniteScroll)return a.slice(0,this.currentVisibleItems);if(this.maxItemsPerPage===-1)return a;const o=(this.currentPage-1)*this.maxItemsPerPage,r=this.currentPage*this.maxItemsPerPage;return a.slice(o,r)},tableMaxHeight(){if(!this.infiniteScroll)return"auto";const a=this.trHeightPx||60,o=50,r=this.maxItemPerPage;return`${o+r*a}px`},deepSortsListComputed(){return this.deepSortsList}},watch:{ckSelectedItems:{handler(a){a&&(this.selectedItems=a)},immediate:!0},dynamicColumns:{handler(a){a&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.columns=this.getColumnsById(a,this.defaultColumns),this.$nextTick(()=>{this.isInternalUpdate=!1}))},immediate:!0},columns:{handler(a){this.localStorageItemName!==null&&be(this.localStorageItemName,this.getRefactoColumns(a),"columns"),this.dynamicColumns&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.$emit("update:dynamicColumns",this.getRefactoColumns(a)),this.$nextTick(()=>{this.isInternalUpdate=!1})),this.forceTableUpdateIndex+=1}},headerEditMode:{handler(a){var o;if(a)this.maxItemsPerPage=3;else{const r=this.localStorageMaxItemPerPageName!==null?pe(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(o=pe(this.localStorageItemName))==null?void 0:o.maxItemPerPage:this.maxItemPerPage;this.maxItemsPerPage=r??this.maxItemPerPage}}},sortedItems:{handler(a){if(this.infiniteScroll){const o=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems===0?this.currentVisibleItems=Math.min(this.maxItemPerPage+o,a.length):this.currentVisibleItems=Math.min(this.currentVisibleItems,a.length)}this.infiniteScroll||(this.totalPages=this.newTotalPage(a.length))},immediate:!0},filtereditems:{handler(a,o){if(this.infiniteScroll&&o&&a.length!==o.length)if(a.length>o.length&&this.currentVisibleItems<a.length){const r=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+r,a.length)}else a.length<o.length&&this.currentVisibleItems>a.length&&(this.currentVisibleItems=Math.min(this.currentVisibleItems,a.length))},immediate:!1},maxItemPerPage:{handler(a){a!==this.maxItemsPerPage&&(this.maxItemsPerPage=a)},immediate:!0},maxItemsPerPage:{handler(a){if(!this.headerEditMode){if(this.localStorageItemName!==null&&be(this.localStorageItemName,a,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&be(this.localStorageMaxItemPerPageName,a),this.infiniteScroll){const o=this.infiniteScrollIncrement||a;this.currentVisibleItems=Math.min(a+o,this.sortedItems.length)}this.currentPage!==1&&!this.infiniteScroll&&(this.currentPage=1),this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length))}}},search:{handler(a,o){a!==o&&(this.normalizedItemsCache.clear(),this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()}),this.infiniteScroll&&this.$nextTick(()=>{const r=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+r,this.filtereditems.length)}))},immediate:!1},showeditems:{handler(a,o){a!==o&&(this.shouldAdjustPage(a)&&this.adjustPageAfterSearch(),a.length>0?this.checkAllCheckBox=a.every(r=>this.selectedItems.includes(r.id)):this.checkAllCheckBox=!1,this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length)),this.columns.some(r=>r.stickyLeft||r.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()}))},flush:"post"},deepSortsList:{handler(a){a&&a.length>0&&this.$emit("update:deepSortsListPreset",a),this.infiniteScroll&&this.currentVisibleItems>0&&this.$nextTick(()=>{const o=this.currentVisibleItems;this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},deep:!0},deepSortsListPreset:{handler(a){a&&a.length>0&&JSON.stringify(a)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=a.map(o=>{const r=this.columns.find(c=>c.id===o.id);return{...o,customSort:(r==null?void 0:r.customSort)||o.customSort||null}}))},deep:!0,immediate:!0},tdItemsList:{handler(a,o){a!==o&&this.columns.some(r=>r.stickyLeft||r.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()})},deep:!0,immediate:!1}},mounted(){var a;if(this.localStorageItemName!==null){as(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),ei(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let o=pe(this.localStorageItemName);o&&(this.columns=this.getColumnsById(o.columns,this.defaultColumns),this.maxItemsPerPage=o.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let o=pe(this.localStorageMaxItemPerPageName);o&&(this.maxItemsPerPage=o)}if(this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.infiniteScroll){const o=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+o,this.filtereditems.length)}else this.totalPages=this.newTotalPage(this.filtereditems.length);if(this.initResizeObserver(),!this.deepSorts){const o=this.columns.find(r=>r.isSorted!==null&&r.isSorted!==void 0);o&&(this.sortKey=o.id,this.sortAsc=o.isSorted,this.currentHeaderSort=o)}this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset.map(o=>{const r=this.columns.find(c=>c.id===o.id);return{...o,customSort:(r==null?void 0:r.customSort)||o.customSort||null}})),this.stickyScrollbarHorizontal&&(this.checkTableOverflow(),window.addEventListener("resize",this.checkTableOverflow),window.addEventListener("scroll",this.handleTableScroll)),this.tableContainer=(a=this.$refs.table)==null?void 0:a.closest(".overflow-x-auto"),this.infiniteScroll&&this.$nextTick(()=>{this.$refs.scrollContainer})},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.stickyColumnsUpdateTimeout&&(clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=null),this.stickyColumnsAnimationFrame&&(cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=null),this.normalizedItemsCache.clear(),this.deepSortCache=null},methods:{moment:ee,unixToDateString:mt,unixToDateTimeString:Xt,toCurrencyEUR:Qt,formatColumnValue(a,o){const r=a[o.id];if(o.formatter&&typeof o.formatter=="function")return o.formatter(r,a);if(o.type)switch(o.type){case"unixDate":return r?mt(r):"";case"unixDateTime":return r?Xt(r):"";case"currency":return r!=null?Qt(r):"";default:return r}return r},shouldAdjustPage(a){return a.length===0&&this.filtereditems.length>0&&this.currentPage>1&&!this.infiniteScroll},getRefactoColumns(a){return a.map(o=>({id:o.id,show:o.show}))},getColumnsById(a,o){return a.map(r=>({...o.find(c=>c.id===r.id),show:r.show}))},adjustPageAfterSearch(){if(this.filtereditems.length>0&&this.showeditems.length===0){const a=Math.ceil(this.filtereditems.length/this.maxItemsPerPage);a>0&&a!==this.currentPage&&(this.currentPage=a)}else this.filtereditems.length===0&&(this.currentPage=1)},initResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.updateStickyColumns()});const a=this.$refs.table;a&&this.resizeObserver.observe(a)},handleTableScroll(){this.tableContainer&&(Math.ceil(window.scrollY+window.innerHeight)>=this.tableContainer.scrollHeight?this.showScrollbar=!1:this.checkTableOverflow())},checkTableOverflow(){this.$nextTick(()=>{const a=document.querySelector(`#${this.tableId}-bottom-scrollbar`);if(this.tableContainer&&a){const o=this.tableContainer.scrollHeight,r=window.innerHeight;this.showScrollbar=o>r,this.showScrollbar&&(document.querySelector(`#${this.tableId}-bottom-scrollbar .scrollbar-content`).style.width=this.tableContainer.scrollWidth+"px",a.addEventListener("scroll",()=>{this.tableContainer.scrollLeft=a.scrollLeft}),this.tableContainer.addEventListener("scroll",()=>{a.scrollLeft=this.tableContainer.scrollLeft}))}})},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},updateStickyColumns(){!this.columns.some(a=>a.stickyLeft||a.stickyRight)||!document.getElementById(this.tableId)||(this.stickyColumnsAnimationFrame&&cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=requestAnimationFrame(()=>{const a=[];this.columns.forEach((c,m)=>{if(!c.stickyLeft&&!c.stickyRight)return;const u=document.getElementById(`${this.tableId}-${c.id}-th-${m}`);if(!u)return;const p=document.querySelectorAll(`#${this.tableId} [data-column-id="${c.id}"]`),g=u.getBoundingClientRect().width;let k=0;p.forEach(h=>{const B=h.getBoundingClientRect().width;B>k&&(k=B)}),a.push({column:c,thElement:u,tdElements:p,width:Math.max(k,g)-1})});let o=0,r=0;a.forEach(({column:c,thElement:m,tdElements:u,width:p})=>{if(c.stickyLeft){const g=`${o}px`;m.style.left=g,u.forEach(k=>{k.style.left=g}),o+=p}if(c.stickyRight){const g=`${r}px`;m.style.right=g,u.forEach(k=>{k.style.right=g}),r+=p}}),this.stickyColumnsAnimationFrame=null}))},newTotalPage(a){return Math.ceil(a/this.maxItemsPerPage)},lineStateClass(a){const o=this.lineStatesList.find(r=>r.state===a);return o?o.class:""},checkItem(a){const o=this.selectedItems.indexOf(a);if(o!==-1)this.selectedItems.splice(o,1),this.checkAllCheckBox=!1;else if(this.selectedItems.push(a),!this.checkAllCheckBox){const r=this.showeditems.map(c=>c.id);this.checkAllCheckBox=r.every(c=>this.selectedItems.includes(c))}this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const a=this.showeditems.map(o=>o.id);if(this.checkAllCheckBox)this.selectedItems=this.selectedItems.filter(o=>!a.includes(o)),this.checkAllCheckBox=!1;else{const o=new Set([...this.selectedItems,...a]);this.selectedItems=Array.from(o),this.checkAllCheckBox=!0}this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(a){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=null);const o=this.infiniteScroll?this.currentVisibleItems:null;this.updateSortitems(a.id),a.isSorted=this.sortAsc,this.currentHeaderSort=a,this.infiniteScroll&&o&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},checkMove(a){const o=this.columns.reduce((r,c,m)=>(c.fixed&&r.push(m),r),[]);return!o.includes(a.draggedContext.index)&&!o.includes(a.relatedContext.index)},filterBy(a,o){if(!o)return!0;const r=`${a.id}_${o}`;if(this.normalizedItemsCache.has(r))return this.normalizedItemsCache.get(r);const c=this.visibleColumns.some(m=>{if(m.customSearch&&typeof m.customSearch=="function")return m.customSearch(a,o);const u=a[m.id];if(m.type||m.formatter){const p=this.formatColumnValue(a,m);if(p&&ye(p.toString()).includes(o))return!0}return u&&ye(u.toString()).includes(o)});return this.normalizedItemsCache.size>1e3&&this.normalizedItemsCache.clear(),this.normalizedItemsCache.set(r,c),c},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return this.defaultColumns.map(a=>{const o={};for(const r in a)if(a.hasOwnProperty(r)){const c=a[r];typeof c=="function"||c===null||c===void 0?o[r]=c:Array.isArray(c)?o[r]=[...c]:typeof c=="object"?o[r]={...c}:o[r]=c}return o})},getTableContent(){return this.items},getColumns(){return this.columns},getNbLines(){return this.showeditems.length},updateSortitems(a){this.items&&(this.sortKey===a?this.sortAsc=!this.sortAsc:(this.sortAsc=!0,this.sortKey=a))},selectSubject(a){this.$emit("changeSubject",a)},saveTablePreferences(){this.localStorageItemName!==null&&be(this.localStorageItemName,this.getRefactoColumns(this.columns),"columns"),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.headerEditMode=!1,this.currentPage=this.previousCurrentPage},resetTablePreferences(){this.columns=this.copyDefaultColumns(),this.localStorageItemName!==null&&as(this.localStorageItemName,this.getRefactoColumns(this.columns)),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.currentPage=this.previousCurrentPage},editTablePreferences(){this.headerEditMode=!0,this.previousCurrentPage=this.currentPage,this.currentPage=1},addDeepSort(a){const o=this.infiniteScroll?this.currentVisibleItems:null;this.deepSortCache=null,this.deepSortCacheKey="",this.deepSortsList.push({id:a.id,libelle:a.libelle,asc:!0,customSort:a.customSort||null}),this.infiniteScroll&&o&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},toggleDeepSortDirection(a){this.deepSortCache=null,this.deepSortCacheKey="",a.asc=!a.asc},deepSortsColumnList(a,o){if(!a||a.length===0)return o;const r=JSON.stringify(a.map(c=>({id:c.id,asc:c.asc})));return this.deepSortCache&&this.deepSortCacheKey===r?o.sort((c,m)=>{for(const u of a){let p;if(u.customSort)p=u.customSort(c,m,u.asc);else{const g=c[u.id],k=m[u.id];p=He(g,k,u.asc)}if(p!==0)return p}return 0}):(this.deepSortCacheKey=r,this.deepSortCache=!0,o.sort((c,m)=>{for(const u of a){let p;if(u.customSort)p=u.customSort(c,m,u.asc);else{const g=c[u.id],k=m[u.id];p=He(g,k,u.asc)}if(p!==0)return p}return 0}))},handleScrollEvent(a){if(this.infiniteScroll){if(this.scrollTimeout)return;this.scrollTimeout=setTimeout(()=>{this.handleInfiniteScroll(a),this.scrollTimeout=null},50)}},handleInfiniteScroll(a){const{target:o}=a;if(o.scrollTop+o.clientHeight>=o.scrollHeight-10&&this.currentVisibleItems<this.sortedItems.length){const r=this.infiniteScrollIncrement||this.maxItemPerPage,c=Math.min(this.currentVisibleItems+r,this.sortedItems.length);c>this.currentVisibleItems&&(this.currentVisibleItems=c)}},handleContextMenu(a,o){let r=null;const c=a.target.closest("td");if(c){const m=c.getAttribute("data-column-id");m&&(r=this.columns.find(u=>u.id===m))}this.$emit("contextmenu",{event:a,item:o,column:r})},refreshStickyColumns(){this.columns.some(a=>a.stickyLeft||a.stickyRight)&&this.$nextTick(()=>{this.updateStickyColumns()})},debouncedUpdateStickyColumns(){this.stickyColumnsUpdateTimeout&&clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=setTimeout(()=>{this.updateStickyColumns(),this.stickyColumnsUpdateTimeout=null},50)}}},ni={key:0,class:"mb-3 text-center"},ii={key:1,class:"row mb-1 mx-auto"},ri={key:0,class:"btn btn-sm btn-outline-secondary cursor-default align-self-center bg-transparent text-secondary border-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1",style:{height:"20px"}},ai={class:"text-nowrap"},oi={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},li={key:0,class:"text-nowrap",style:{height:"20px"}},di=["value"],ci={key:1,class:"d-flex align-items-center text-nowrap"},ui={key:0,class:"d-flex ms-2"},mi={class:"row mx-auto mb-3 rounded-0"},hi=["id"],fi=["id"],gi=["id","onDragstart","onDragend"],yi={class:"d-flex flex-column align-items-center"},pi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},ki={class:"d-inline-flex text-nowrap"},_i={key:0,class:"ms-2 float-end"},Si={key:1,class:"ms-2"},bi={key:1},wi=["id"],Ci=["id"],xi={class:"d-inline-flex text-nowrap"},Mi={key:1,class:"ms-2 hoverable"},Di={key:0},Pi=["colspan"],Ni=["id"],Bi=["onClick","onContextmenu"],Ti=["data-column-id","onClick"],Ei=["id","value"],Vi=["data-column-id"],Yi={class:"row ms-auto mb-2"},Ii={class:"m-0 pagination pagination-sm"},Oi={class:"page-item hoverable"},Li={class:"page-item hoverable"},Ai=["onClick"],Fi={class:"page-item hoverable"},zi={class:"page-item hoverable"},Ri=["id"];function Hi(a,o,r,c,m,u){var p;const g=n.resolveComponent("font-awesome-icon"),k=n.resolveComponent("vue-draggable-next");return n.openBlock(),n.createElementBlock(n.Fragment,null,[r.lineEditMode?(n.openBlock(),n.createElementBlock("div",ni,[n.createElementVNode("button",{type:"button",class:"btn btn-success rounded-5 m-0 p-0",style:{height:"45px",width:"45px"},onClick:o[0]||(o[0]=h=>a.$emit("lineEditModeAddNewLine"))},[n.createVNode(g,{icon:"fa-solid fa-plus",size:"xl"})])])):n.createCommentVNode("",!0),r.showLineNumber||r.showModifyColumnsBtn||r.showMaxItemPerPageBtn||r.deepSorts?(n.openBlock(),n.createElementBlock("div",ii,[n.createElementVNode("div",{class:n.normalizeClass(["d-flex justify-content-start p-0",r.deepSorts&&m.deepSortsList.length>0&&r.showModifyColumnsBtn?"col-12 col-sm-8 col-lg-9 col-xl-10":"col"])},[r.showLineNumber?(n.openBlock(),n.createElementBlock("div",ri,[n.createElementVNode("b",ai,n.toDisplayString(u.showItemsLinesNumber+" / "+u.filtereditems.length),1),o[20]||(o[20]=n.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):n.createCommentVNode("",!0),r.deepSorts&&m.deepSortsList.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":r.showLineNumber}])},[o[21]||(o[21]=n.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),n.createVNode(k,{modelValue:m.deepSortsList,"onUpdate:modelValue":o[1]||(o[1]=h=>m.deepSortsList=h),tag:"div",group:"deepSorts",class:"d-flex flex-wrap","ghost-class":"deep-filter-ghost-class"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.deepSortsList,(h,B)=>(n.openBlock(),n.createElementBlock("div",{key:h.id,class:"d-flex align-items-center border border-secondary hoverable-grab text-secondary rounded-1 fs-7 px-2 py-0 me-2 mb-1 mb-lg-0",style:{height:"20px"}},[n.createVNode(g,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:b=>m.deepSortsList.splice(B,1)},null,8,["onClick"]),n.createElementVNode("div",oi,[n.createElementVNode("span",null,n.toDisplayString(h.libelle),1)]),n.createVNode(g,{class:"hoverable",icon:h.asc?"fa-solid fa-arrow-down-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:b=>u.toggleDeepSortDirection(h)},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):n.createCommentVNode("",!0)],2),r.showMaxItemPerPageBtn||r.showModifyColumnsBtn?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["d-flex align-items-center justify-content-end p-0",r.deepSorts&&m.deepSortsList.length>0?"col-12 col-sm-4 col-lg-3 col-xl-2 mt-1 mt-sm-0":"col"])},[r.showMaxItemPerPageBtn&&!m.headerEditMode?(n.openBlock(),n.createElementBlock("div",li,[r.maxItemPerPageList.length>0?n.withDirectives((n.openBlock(),n.createElementBlock("select",{key:0,"onUpdate:modelValue":o[2]||(o[2]=h=>m.maxItemsPerPage=h),class:"form-select d-flex justify-content-center align-items-center ms-auto py-0 rounded-3 select-max-item-per-page"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.maxItemPerPageList,h=>(n.openBlock(),n.createElementBlock("option",{key:h.value,value:h.value},n.toDisplayString(h.text),9,di))),128))],512)),[[n.vModelSelect,m.maxItemsPerPage]]):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),r.showModifyColumnsBtn?(n.openBlock(),n.createElementBlock("div",ci,[m.headerEditMode?(n.openBlock(),n.createElementBlock("div",ui,[n.createElementVNode("button",{id:"btn-save-table",class:"btn btn-sm btn-success d-flex justify-content-center align-items-center ms-auto me-2 px-2 py-0 rounded-3",type:"button",onClick:o[3]||(o[3]=(...h)=>u.saveTablePreferences&&u.saveTablePreferences(...h))}," Sauvegarder "),n.createElementVNode("button",{id:"btn-reset-table",class:"btn btn-sm btn-outline-danger d-flex justify-content-center align-items-center px-2 py-0 rounded-3",type:"button",onClick:o[4]||(o[4]=(...h)=>u.resetTablePreferences&&u.resetTablePreferences(...h))}," Réinitialiser le tableau ")])):(n.openBlock(),n.createElementBlock("button",{key:1,id:"btn-edit-table",class:"btn btn-sm btn-outline-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-3 ms-2",style:{height:"20px"},type:"button",onClick:o[5]||(o[5]=(...h)=>u.editTablePreferences&&u.editTablePreferences(...h))}," Modifier colonnes "))])):n.createCommentVNode("",!0)],2)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",mi,[n.createElementVNode("div",{ref:"scrollContainer",class:n.normalizeClass(["col-12 p-0 overflow-x-auto mb-2",{border:r.infiniteScroll,"infinite-scroll-container":r.infiniteScroll}]),style:n.normalizeStyle(r.infiniteScroll?{maxHeight:u.tableMaxHeight,overflowY:"auto",borderRadius:"10px"}:{borderRadius:"10px !important"}),onScroll:o[15]||(o[15]=(...h)=>u.handleScrollEvent&&u.handleScrollEvent(...h))},[(n.openBlock(),n.createElementBlock("table",{id:r.tableId,ref:"table",key:m.forceTableUpdateIndex,class:n.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative m-0",[r.border?"table-bordered":"table-borderless",r.tableSm?"table-sm":""]]),style:n.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:r.border?"":"1px solid #ddd",borderRight:r.border?"":"1px solid #ddd"}])},[n.createElementVNode("thead",null,[m.headerEditMode?(n.openBlock(),n.createBlock(k,{key:0,modelValue:m.columns,"onUpdate:modelValue":o[9]||(o[9]=h=>m.columns=h),"ghost-class":r.ghostClass,"drag-class":r.ghostClass,tag:"tr",move:u.checkMove,group:"columns"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,(h,B)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:h.id},[h.id==="checkBox"?(n.openBlock(),n.createElementBlock("th",{key:0,id:`${r.tableId}-${h.id}-th-${B}`,class:n.normalizeClass(["text-center",[r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:o[8]||(o[8]=n.withModifiers((...b)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(...b),["stop"]))},[n.withDirectives(n.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":o[6]||(o[6]=b=>m.checkAllCheckBox=b),class:"form-check-input",type:"checkbox",onClick:o[7]||(o[7]=n.withModifiers((...b)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(...b),["stop"]))},null,512),[[n.vModelCheckbox,m.checkAllCheckBox]])],10,fi)):(h.show||m.headerEditMode)&&(!h.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("th",{key:1,id:`${r.tableId}-${h.id}-th-${B}`,scope:"col",class:n.normalizeClass(["text-center",[h.isDragging?"hoverable-grabbing":r.headerBgColor+" hoverable-grab",h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.headerTextColor,r.infiniteScroll?"sticky-top":"",{"table-danger":!h.show}]]),onDragstart:b=>h.isDragging=!0,onDragend:b=>h.isDragging=!1},[n.createElementVNode("div",yi,[m.headerEditMode&&!h.keepShow?(n.openBlock(),n.createElementBlock("div",pi,[h.show?(n.openBlock(),n.createBlock(g,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:b=>h.show=!1},null,8,["onClick"])):(n.openBlock(),n.createBlock(g,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:b=>h.show=!0},null,8,["onClick"]))])):n.createCommentVNode("",!0),n.createElementVNode("div",ki,[n.renderSlot(a.$slots,"tableHeaderTh",{header:h},void 0,!0),h.isSortable&&!r.deepSorts?(n.openBlock(),n.createElementBlock("div",_i,[n.createVNode(g,{icon:m.sortKey!==h.id||m.sortKey===h.id&&!m.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",class:"hoverable",onClick:b=>u.updateCurrentSort(h)},null,8,["icon","onClick"])])):r.deepSorts&&!m.deepSortsList.some(b=>b.id===h.id)&&h.isSortable?(n.openBlock(),n.createElementBlock("div",Si,[n.createVNode(g,{icon:"fa-solid fa-filter",onClick:b=>u.addDeepSort(h)},null,8,["onClick"])])):n.createCommentVNode("",!0)])])],42,gi)):n.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(n.openBlock(),n.createElementBlock("tr",bi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,(h,B)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:h.id},[h.id==="checkBox"?(n.openBlock(),n.createElementBlock("th",{key:0,id:`${r.tableId}-${h.id}-th-${B}`,class:n.normalizeClass(["text-center",[r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:o[12]||(o[12]=n.withModifiers((...b)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(...b),["stop"]))},[n.withDirectives(n.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":o[10]||(o[10]=b=>m.checkAllCheckBox=b),class:"form-check-input",type:"checkbox",onClick:o[11]||(o[11]=n.withModifiers((...b)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(...b),["stop"]))},null,512),[[n.vModelCheckbox,m.checkAllCheckBox]])],10,wi)):h.show&&(!h.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("th",{key:1,id:`${r.tableId}-${h.id}-th-${B}`,scope:"col",class:n.normalizeClass(["text-center",[h.isDragging?"":r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.headerTextColor,r.infiniteScroll?"sticky-top":""]])},[n.createElementVNode("div",xi,[n.renderSlot(a.$slots,"tableHeaderTh",{header:h},void 0,!0),h.isSortable&&!r.deepSorts?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["ms-2 float-end hoverable",{"opacity-50":m.sortKey!==h.id}])},[n.createVNode(g,{icon:m.sortKey!==h.id||m.sortKey===h.id&&!m.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",onClick:b=>u.updateCurrentSort(h)},null,8,["icon","onClick"])],2)):r.deepSorts&&!m.deepSortsList.some(b=>b.id===h.id)&&h.isSortable?(n.openBlock(),n.createElementBlock("div",Mi,[n.createVNode(g,{icon:"fa-solid fa-filter",onClick:b=>u.addDeepSort(h)},null,8,["onClick"])])):n.createCommentVNode("",!0)])],10,Ci)):n.createCommentVNode("",!0)],64))),128))]))]),n.createElementVNode("tbody",null,[((p=u.showeditems)==null?void 0:p.length)===0?(n.openBlock(),n.createElementBlock("tr",Di,[n.createElementVNode("th",{colspan:m.columns.length,class:"text-center",style:{"border-top-left-radius":"0px !important","border-top-right-radius":"0px !important"}},[n.createElementVNode("span",{id:`${r.tableId}-no-value`,class:"text-danger fs-5"},n.toDisplayString(r.noValueText),9,Ni)],8,Pi)])):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(u.showeditems,(h,B)=>(n.openBlock(),n.createElementBlock("tr",{key:h.id,class:n.normalizeClass([{hoverable:r.clickable&&!m.headerEditMode,"hoverable-no-drop":r.clickable&&m.headerEditMode},r.trFontSize]),style:n.normalizeStyle({height:r.trHeightPx+"px"}),onClick:b=>r.clickable&&!m.headerEditMode?u.selectSubject(h):null,onContextmenu:b=>u.handleContextMenu(b,h)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,b=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:b.id},[b.id==="checkBox"?(n.openBlock(),n.createElementBlock("td",{key:0,"data-column-id":b.id,class:n.normalizeClass(["text-center",[r.tdClass,h.lineState?u.lineStateClass(h.lineState):"",b.stickyLeft?"sticky-column-left":"",b.stickyRight?"sticky-column-right":""]]),onClick:n.withModifiers(te=>u.checkItem(h.id),["stop"])},[n.withDirectives(n.createElementVNode("input",{id:`${r.tableId}-checkbox-${B}`,"onUpdate:modelValue":o[13]||(o[13]=te=>m.selectedItems=te),type:"checkbox",class:"form-check-input hoverable",value:h.id,onClick:o[14]||(o[14]=n.withModifiers(()=>{},["stop"]))},null,8,Ei),[[n.vModelCheckbox,m.selectedItems]])],10,Ti)):(b.show||m.headerEditMode)&&(!b.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("td",{key:1,"data-column-id":b.id,class:n.normalizeClass([[r.tdClass,b.show?"":"table-danger",!r.deepSorts&&b.isSorted!==null&&b.isSorted!==void 0?"bg-gray-200":"",h.lineState?u.lineStateClass(h.lineState):"",b.stickyLeft?"sticky-column-left":"",b.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[n.renderSlot(a.$slots,"tableBodyTd",{header:b,item:h,formattedValue:u.formatColumnValue(h,b)},()=>[n.createTextVNode(n.toDisplayString(u.formatColumnValue(h,b)),1)],!0)],10,Vi)):n.createCommentVNode("",!0)],64))),128))],46,Bi))),128))])],14,hi))],38)]),n.createElementVNode("div",Yi,[!r.infiniteScroll&&m.totalPages&&m.totalPages>1?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["col p-0 me-3 d-flex",{"justify-content-center":r.paginationPosition==="center","justify-content-end":r.paginationPosition==="right","justify-content-start":r.paginationPosition==="left"}])},[n.createElementVNode("ul",Ii,[n.createElementVNode("li",Oi,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===1}]),onClick:o[16]||(o[16]=h=>m.currentPage=1)}," « ",2)]),n.createElementVNode("li",Li,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===1}]),onClick:o[17]||(o[17]=h=>m.currentPage-=1)}," < ",2)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.currentDisplayPagination,h=>(n.openBlock(),n.createElementBlock("li",{key:h,class:n.normalizeClass(["page-item hoverable",{active:m.currentPage===h}])},[n.createElementVNode("a",{class:"page-link",onClick:B=>m.currentPage=h},n.toDisplayString(h),9,Ai)],2))),128)),n.createElementVNode("li",Fi,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===m.totalPages}]),onClick:o[18]||(o[18]=h=>m.currentPage+=1)}," > ",2)]),n.createElementVNode("li",zi,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===m.totalPages}]),onClick:o[19]||(o[19]=h=>m.currentPage=m.totalPages)}," » ",2)])])],2)):n.createCommentVNode("",!0),r.stickyScrollbarHorizontal?(n.openBlock(),n.createElementBlock("div",{key:1,id:`${r.tableId}-bottom-scrollbar`,class:n.normalizeClass(["bottom-scrollbar",{visible:m.showScrollbar}])},[...o[22]||(o[22]=[n.createElementVNode("div",{class:"scrollbar-content"},null,-1)])],10,Ri)):n.createCommentVNode("",!0)])],64)}const ji=ti(si,[["render",Hi],["__scopeId","data-v-f3204e33"]]);me.library.add(T.faAnglesLeft,T.faAngleLeft,T.faAngleRight,T.faAnglesRight);const Wi={name:"AmsomPagination",components:{FontAwesomeIcon:j.FontAwesomeIcon},props:{modelValue:{type:Number,required:!0},totalPages:{type:Number,required:!0},totalDisplayPages:{type:Number,default:5}},emits:["update:modelValue"],methods:{goNextPage(){this.goToPage(this.modelValue+1)},goPreviousPage(){this.goToPage(this.modelValue-1)},goFirstPage(){this.goToPage(1)},goLastPage(){this.goToPage(this.totalPages)},goToPage(a){this.$emit("update:modelValue",a)}},computed:{toDisplayPagination(){let a=[];if(this.totalPages<=this.totalDisplayPages)a=this.totalPages;else{let o,r;this.totalDisplayPages%2===0?(o=this.modelValue-Math.floor(this.totalDisplayPages/2)+1,r=this.modelValue+Math.floor(this.totalDisplayPages/2)):(o=this.modelValue-Math.floor(this.totalDisplayPages/2),r=this.modelValue+Math.floor(this.totalDisplayPages/2)),o<1&&(o=1,r=this.totalDisplayPages),r>this.totalPages&&(r=this.totalPages,o=this.totalPages-this.totalDisplayPages+1);for(let c=o;c<=r;c++)a.push(c)}return a}}},Ui={key:0,class:"w-100 user-select-none"},qi={class:"pagination pagination mb-0"},vi={class:"page-item"},Gi={class:"page-item"},$i=["onClick"],Zi={class:"page-item"},Ki={class:"page-item"};function Ji(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return r.totalPages&&r.totalPages>1?(n.openBlock(),n.createElementBlock("div",Ui,[n.createElementVNode("ul",qi,[n.createElementVNode("li",vi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===1}]),onClick:o[0]||(o[0]=(...g)=>u.goFirstPage&&u.goFirstPage(...g))},[n.createVNode(p,{icon:"fa-angles-left"})],2)]),n.createElementVNode("li",Gi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===1}]),onClick:o[1]||(o[1]=(...g)=>u.goPreviousPage&&u.goPreviousPage(...g))},[n.createVNode(p,{icon:"fa-angle-left"})],2)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.toDisplayPagination,g=>(n.openBlock(),n.createElementBlock("li",{key:g,class:n.normalizeClass(["page-item",{active:r.modelValue===g}])},[n.createElementVNode("span",{role:"button",class:"page-link",onClick:k=>u.goToPage(g)},n.toDisplayString(g),9,$i)],2))),128)),n.createElementVNode("li",Zi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===r.totalPages}]),onClick:o[2]||(o[2]=(...g)=>u.goNextPage&&u.goNextPage(...g))},[n.createVNode(p,{icon:"fa-angle-right"})],2)]),n.createElementVNode("li",Ki,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===r.totalPages}]),onClick:o[3]||(o[3]=(...g)=>u.goLastPage&&u.goLastPage(...g))},[n.createVNode(p,{icon:"fa-angles-right"})],2)])])])):n.createCommentVNode("",!0)}const Qi=Z(Wi,[["render",Ji]]),Xi={name:"AmsomSkeleton",props:{config:{type:Array,default:()=>[8,10,12]},rowClass:{type:String,default:""},loaderClass:{type:String,default:"text-gray rounded-2"}}};function er(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["container row placeholder-wave",r.rowClass])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.config,(p,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(["placeholder mt-1",[r.loaderClass,"col-"+p]])},null,2))),128))],2)}const os=Z(Xi,[["render",er]]);me.library.add(T.faCloudArrowDown,T.faEye);const tr={name:"AmsomDocumentList",components:{AmsomSkeleton:os,AmsomOverlay:ct,AmsomCard:qt,FontAwesomeIcon:j.FontAwesomeIcon},props:{title:{type:String,default:"Mes documents"},loading:{type:Boolean,default:!1},documentList:{type:Array,required:!0,validator:a=>a.every(o=>o.categorie&&o.dateFichier)},anonym:{type:Boolean,default:!1},getDocumentBlob:{type:Function,required:!0},clickAction:{type:String,default:"download",validator:a=>["download","view"].includes(a)}},data(){return{processing:!1}},methods:{unixToDateString:rn.unixToDateString,handleClick(a,o){this.clickAction==="download"?this.downloadFile(a,o):this.viewFile(a)},async downloadFile(a,o){this.processing=!0;let r=this.anonym?"Document "+(o+1):(a==null?void 0:a.titre)??"Document",c=await this.getDocumentBlob(a);R.downloadBlob(c,r),this.processing=!1},async viewFile(a){this.processing=!0;let o=await this.getDocumentBlob(a);R.openFileBlob(o),this.processing=!1}}},sr={key:0},nr={class:"d-flex justify-content-between text-primary"},ir={class:"mb-0"},rr={class:"mb-0"},ar=["onClick"],or={role:"button",class:"d-flex justify-content-between align-items-center p-2 px-3 text-secondary"},lr={key:0},dr={key:1};function cr(a,o,r,c,m,u){const p=n.resolveComponent("amsom-skeleton"),g=n.resolveComponent("font-awesome-icon"),k=n.resolveComponent("amsom-card"),h=n.resolveComponent("amsom-overlay");return n.openBlock(),n.createBlock(h,{loading:m.processing},{default:n.withCtx(()=>[n.createVNode(k,null,{default:n.withCtx(()=>{var B;return[n.createElementVNode("h5",null,n.toDisplayString(r.title),1),r.loading?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(p,{config:[3,3],"row-class":"justify-content-between"}),n.createVNode(p,{config:[12]})],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[(B=r.documentList)!=null&&B.length?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(r.documentList,(b,te)=>(n.openBlock(),n.createElementBlock("div",{key:te,class:"document-item pt-2"},[n.createElementVNode("div",nr,[n.createElementVNode("p",ir,n.toDisplayString(b.categorie),1),n.createElementVNode("p",rr,n.toDisplayString(u.unixToDateString(b.dateFichier)),1)]),n.createElementVNode("div",{class:"bg-primary bg-opacity-25 mt-0 rounded-3",onClick:se=>u.handleClick(b,te)},[n.createElementVNode("div",or,[r.anonym?(n.openBlock(),n.createElementBlock("strong",dr,"Document "+n.toDisplayString(te+1),1)):(n.openBlock(),n.createElementBlock("strong",lr,n.toDisplayString(b.titre),1)),r.clickAction==="download"?(n.openBlock(),n.createBlock(g,{key:2,icon:"fa-solid fa-cloud-arrow-down"})):r.clickAction==="view"?(n.openBlock(),n.createBlock(g,{key:3,icon:"fa-solid fa-eye"})):n.createCommentVNode("",!0)])],8,ar)]))),128)):(n.openBlock(),n.createElementBlock("div",sr,[...o[0]||(o[0]=[n.createElementVNode("p",null,"Aucun document",-1)])]))],64))]}),_:1})]),_:1},8,["loading"])}const ur=Z(tr,[["render",cr]]);me.library.add(T.faTriangleExclamation,T.faEye,T.faEyeSlash,T.faCloudArrowUp,T.faPaperclip,T.faFileCirclePlus);const mr=window.File_native??window.File,hr={name:"AmsomUploadFile",components:{FontAwesomeIcon:j.FontAwesomeIcon,AmsomOverlay:ct},props:["name","pjName","fileName","subText","title","required","label","modelValue","gedFile","readStatus","readOnly","rejectStatus","clickFileHandler"],data(){return{fileToUpload:[],fileLoading:!1,finalFile:null,fileDragged:!1}},computed:{},watch:{gedFile:function(){this.handleGedFile()},fileName:function(a){this.finalFile!==null&&(this.finalFile.name=a,this.emitFile())}},mounted(){var a;(a=this.modelValue)!=null&&a.file?this.finalFile=this.modelValue:this.gedFile&&this.handleGedFile()},methods:{clickAddPj(){document.getElementById("fileUpload-"+this.name).click()},handleGedFile(){this.fileToUpload=[this.gedFile],this.uploadImage()},async addPj(a){this.fileDragged=!1;const o=a.dataTransfer?[...a.dataTransfer.files]:[...a.target.files];let r=!0;for(let c of o)if(!await R.isImage(c)&&!await R.isPdf(c)){r=!1;break}if(!r){alert("Les documents doivent être de type PDF et/ou des images"),document.getElementById("input-pj-"+this.name).value=null;return}this.fileToUpload.push(...o),this.uploadImage()},clickFile(a){this.clickFileHandler?this.clickFileHandler(a):this.openFile(a)},openFile(a){if(!a){alert("Aucun fichier");return}R.openFileBase64(a)},async uploadImage(){this.$emit("fileLoading",!0),this.fileLoading=!0;let a=new an,o=this.fileToUpload;for(let u of o)if(await R.isImage(u)){let p=await R.resizeImage({file:u,maxWidth:795,maxHeigth:1125}),g=R.imageToPDF(p);await a.add(g)}else await a.add(u);let r=await a.saveAsBlob(),c=new mr([r],"doc.pdf",{type:"application/pdf"}),m=await R.handleFile(c,"pdf");m.name=this.fileName,this.finalFile=m,this.emitFile(),this.$emit("fileLoading",!1),this.fileLoading=!1},emitFile(){this.$emit("update:modelValue",this.finalFile)},deletePj(){this.finalFile=null,this.emitFile(),this.$emit("deleteFile"),this.fileToUpload=[]}}},fr={class:"position-relative"},gr=["id"],yr=["id","for"],pr={class:""},kr={class:"flex-grow-1"},_r={class:"fs-6 fw-bold"},Sr={class:"text-primary form-text fst-italic",style:{"font-size":"smaller"}},br=["id","required","name"],wr={key:1,class:"w-100"},Cr={key:0,class:"text-decoration-underline"},xr={class:"p-2 d-flex align-items-center"},Mr={key:3,class:"text-muted"},Dr={key:0,class:"me-2"},Pr=["id"],Nr=["id"],Br={key:1},Tr=["id"];function Er(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon"),g=n.resolveComponent("amsom-overlay");return n.openBlock(),n.createBlock(g,{loading:m.fileLoading},{default:n.withCtx(()=>{var k;return[n.createElementVNode("div",fr,[(k=m.finalFile)!=null&&k.file?(n.openBlock(),n.createElementBlock("div",wr,[r.title?(n.openBlock(),n.createElementBlock("h5",Cr,n.toDisplayString(r.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",xr,[n.createElementVNode("div",{role:"button",class:"hoverable flex-grow-1",onClick:o[8]||(o[8]=h=>u.clickFile(m.finalFile.file))},[r.rejectStatus?(n.openBlock(),n.createBlock(p,{key:0,icon:"fa-solid fa-exclamation-triangle",class:"text-danger me-1"})):n.createCommentVNode("",!0),r.readStatus==="read"?(n.openBlock(),n.createBlock(p,{key:1,icon:"fa-solid fa-eye",class:"text-amsom-green me-1"})):n.createCommentVNode("",!0),r.readStatus==="unread"?(n.openBlock(),n.createBlock(p,{key:2,icon:"fa-solid fa-eye-slash",class:"text-warning me-1"})):n.createCommentVNode("",!0),n.createVNode(p,{icon:"fa-solid fa-solid fa-paperclip"}),n.createTextVNode(" "+n.toDisplayString(r.pjName),1),m.fileToUpload.length>1?(n.openBlock(),n.createElementBlock("small",Mr," ("+n.toDisplayString(m.fileToUpload.length)+" Fichiers)",1)):n.createCommentVNode("",!0)]),r.readOnly?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",Dr,[n.createElementVNode("input",{id:"fileUpload-"+r.name,type:"file",style:{opacity:"0",position:"absolute",top:"0","z-index":"-1"},accept:"image/png, image/jpeg, application/pdf",hidden:"",multiple:"",onChange:o[9]||(o[9]=(...h)=>u.addPj&&u.addPj(...h))},null,40,Pr),n.createElementVNode("button",{id:"add-field-"+r.name,type:"button",class:"btn btn-primary rounded-5 fs-7 py-0 me-1",onClick:o[10]||(o[10]=(...h)=>u.clickAddPj&&u.clickAddPj(...h))},[n.createVNode(p,{icon:"fa-solid fa-file-circle-plus",class:"me-1"}),o[14]||(o[14]=n.createElementVNode("span",null,[n.createTextVNode(" Ajouter"),n.createElementVNode("span",{class:"d-none d-md-block"}," un document")],-1))],8,Nr)],512)),[[n.vShow,m.fileToUpload.length>0]]),r.readOnly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Br,[n.createElementVNode("button",{id:"delete-all-pj-"+r.name,type:"button",class:"btn btn-link text-danger hoverable text-decoration-underline p-0",onClick:o[11]||(o[11]=(...h)=>u.deletePj&&u.deletePj(...h))}," Supprimer ",8,Tr)]))])])):(n.openBlock(),n.createElementBlock("div",{key:0,id:"input-group-pj-"+r.name,role:"group"},[n.createElementVNode("label",{id:"label-pj-"+r.name,for:"input-pj-"+r.name,role:"button",class:n.normalizeClass(["m-0 px-1 py-2 d-block text-center text-secondary rounded-4 border-2 pj-label",{"border border-solid shadow":m.fileDragged}]),style:{"border-color":"var(--bs-gray-400)","border-style":"dashed"},onDrop:o[1]||(o[1]=n.withModifiers((...h)=>u.addPj&&u.addPj(...h),["prevent","stop"])),onDrag:o[2]||(o[2]=n.withModifiers(()=>{},["prevent","stop"])),onDragstart:o[3]||(o[3]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragend:o[4]||(o[4]=n.withModifiers(h=>m.fileDragged=!1,["prevent","stop"])),onDragover:o[5]||(o[5]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragenter:o[6]||(o[6]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragleave:o[7]||(o[7]=n.withModifiers(h=>m.fileDragged=!1,["prevent","stop"]))},[n.createElementVNode("div",pr,[n.createVNode(p,{icon:["fas","cloud-arrow-up"],size:"3x","beat-fade":m.fileDragged},null,8,["beat-fade"])]),n.createElementVNode("div",kr,[n.createElementVNode("div",_r,n.toDisplayString(r.label??r.pjName),1),n.createElementVNode("small",Sr,n.toDisplayString(r.subText),1),o[12]||(o[12]=n.createElementVNode("hr",{class:"mx-auto w-50 m-0 mb-1"},null,-1)),o[13]||(o[13]=n.createElementVNode("small",{class:"d-block text-muted",style:{"font-size":"0.8em"}},[n.createElementVNode("u",null,"Glissez"),n.createTextVNode(" vos fichiers ici ou "),n.createElementVNode("u",null,"cliquez"),n.createTextVNode(" pour les sélectionner ")],-1))]),n.createElementVNode("input",{id:"input-pj-"+r.name,class:"form-control",type:"file",style:{opacity:"0",position:"absolute",top:"0","z-index":"-1"},accept:"image/png, image/jpeg, application/pdf",multiple:"",required:r.required,name:"pj"+r.name,onChange:o[0]||(o[0]=(...h)=>u.addPj&&u.addPj(...h))},null,40,br)],42,yr)],8,gr))])]}),_:1},8,["loading"])}const Vr=Z(hr,[["render",Er]]),Yr={name:"SliderSwitch",props:{listSection:{type:Array,default:()=>[{id:1,name:"Slider 1"},{id:2,name:"Slider 2"},{id:3,name:"Slider 3"}]},containerClass:{type:String,default:"bg-secondary-subtle"},itemClass:{type:String,default:"fs-6"},bubbleClass:{type:String,default:"bg-light"},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],mounted(){this.updateSliderPosition(),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize)},methods:{updateSliderPosition(){this.$nextTick(()=>{const a=this.$el.querySelector(`#switch-section-${this.modelValue}`);if(!a){const r=this.$el.querySelector("#switch-section-1");if(!r)return;const c=this.$el.querySelector(".slider");if(!c)return;c.style.width=`${r.offsetWidth}px`,c.style.height=`${r.offsetHeight}px`,c.style.left=`${r.offsetLeft}px`;return}const o=this.$el.querySelector(".slider");o&&(o.style.width=`${a.offsetWidth}px`,o.style.height=`${a.offsetHeight}px`,o.style.left=`${a.offsetLeft}px`)})},handleResize(){this.updateSliderPosition()},switchSection(a){if(this.disabled)return;this.$emit("update:modelValue",a);const o=this.$el.querySelector(".slider"),r=this.$el.querySelector(`#switch-section-${a}`);o.style.width=r.clientWidth+"px",o.style.left=r.offsetLeft+"px"}}},Ir={class:"d-flex align-items-center justify-content-center mb-2 w-100 p-0",style:{"border-radius":"1em"}},Or=["id","onClick"];function Lr(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",Ir,[n.createElementVNode("ul",{id:"switch-section",class:n.normalizeClass(["d-flex justify-content-center rounded-5 p-2 m-0 position-relative w-100",[r.containerClass,{disabled:r.disabled}]])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.listSection,p=>(n.openBlock(),n.createElementBlock("li",{id:"switch-section-"+p.id,key:p.id,class:n.normalizeClass(["rounded-5 px-4 py-2 w-100 text-center",[r.itemClass,{hoverable:!r.disabled,"cursor-not-allowed":r.disabled}]]),role:"button",onClick:g=>u.switchSection(p.id)},n.toDisplayString(p.name),11,Or))),128)),n.createElementVNode("span",{class:n.normalizeClass(["slider position-absolute",r.bubbleClass])},null,2)],2)])}const Ar=Z(Yr,[["render",Lr],["__scopeId","data-v-02559b82"]]);V.AmsomCard=qt,V.AmsomDocumentList=ur,V.AmsomHorizontalStepper=Yn,V.AmsomImage=Gn,V.AmsomModal=dt,V.AmsomOverlay=ct,V.AmsomPagination=Qi,V.AmsomSkeleton=os,V.AmsomSliderSwitch=Ar,V.AmsomTableDraggable=ji,V.AmsomUploadFile=Vr,V.AmsomVerticalStepper=Bn,V.default=dt,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
4
+ `+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var cs={};function us(e,t){c.deprecationHandler!=null&&c.deprecationHandler(e,t),cs[e]||(ds(t),cs[e]=!0)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null;function Q(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Fr(e){var t,s;for(s in e)g(e,s)&&(t=e[s],Q(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function pt(e,t){var s=se({},e),i;for(i in t)g(t,i)&&(p(e[i])&&p(t[i])?(s[i]={},se(s[i],e[i]),se(s[i],t[i])):t[i]!=null?s[i]=t[i]:delete s[i]);for(i in e)g(e,i)&&!g(t,i)&&p(e[i])&&(s[i]=se({},s[i]));return s}function kt(e){e!=null&&this.set(e)}var _t;Object.keys?_t=Object.keys:_t=function(e){var t,s=[];for(t in e)g(e,t)&&s.push(t);return s};var zr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Rr(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return Q(i)?i.call(t,s):i}function X(e,t,s){var i=""+Math.abs(e),l=t-i.length,d=e>=0;return(d?s?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+i}var St=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,We=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bt={},we={};function w(e,t,s,i){var l=i;typeof i=="string"&&(l=function(){return this[i]()}),e&&(we[e]=l),t&&(we[t[0]]=function(){return X(l.apply(this,arguments),t[1],t[2])}),s&&(we[s]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function jr(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Hr(e){var t=e.match(St),s,i;for(s=0,i=t.length;s<i;s++)we[t[s]]?t[s]=we[t[s]]:t[s]=jr(t[s]);return function(l){var d="",f;for(f=0;f<i;f++)d+=Q(t[f])?t[f].call(l,e):t[f];return d}}function Ue(e,t){return e.isValid()?(t=ms(t,e.localeData()),bt[t]=bt[t]||Hr(t),bt[t](e)):e.localeData().invalidDate()}function ms(e,t){var s=5;function i(l){return t.longDateFormat(l)||l}for(We.lastIndex=0;s>=0&&We.test(e);)e=e.replace(We,i),We.lastIndex=0,s-=1;return e}var Wr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Ur(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(St).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var vr="Invalid date";function qr(){return this._invalidDate}var Gr="%d",$r=/\d{1,2}/;function Zr(e){return this._ordinal.replace("%d",e)}var Kr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Jr(e,t,s,i){var l=this._relativeTime[s];return Q(l)?l(e,t,s,i):l.replace(/%d/i,e)}function Qr(e,t){var s=this._relativeTime[e>0?"future":"past"];return Q(s)?s(t):s.replace(/%s/i,t)}var hs={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function v(e){return typeof e=="string"?hs[e]||hs[e.toLowerCase()]:void 0}function wt(e){var t={},s,i;for(i in e)g(e,i)&&(s=v(i),s&&(t[s]=e[i]));return t}var Xr={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ea(e){var t=[],s;for(s in e)g(e,s)&&t.push({unit:s,priority:Xr[s]});return t.sort(function(i,l){return i.priority-l.priority}),t}var fs=/\d/,H=/\d\d/,gs=/\d{3}/,Ct=/\d{4}/,ve=/[+-]?\d{6}/,Y=/\d\d?/,ys=/\d\d\d\d?/,ps=/\d\d\d\d\d\d?/,qe=/\d{1,3}/,xt=/\d{1,4}/,Ge=/[+-]?\d{1,6}/,Ce=/\d+/,$e=/[+-]?\d+/,ta=/Z|[+-]\d\d:?\d\d/gi,Ze=/Z|[+-]\d\d(?::?\d\d)?/gi,sa=/[+-]?\d+(\.\d{1,3})?/,Ve=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,xe=/^[1-9]\d?/,Mt=/^([1-9]\d|\d)/,Ke;Ke={};function b(e,t,s){Ke[e]=Q(t)?t:function(i,l){return i&&s?s:t}}function na(e,t){return g(Ke,e)?Ke[e](t._strict,t._locale):new RegExp(ia(e))}function ia(e){return ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,i,l,d){return s||i||l||d}))}function ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=q(t)),s}var Dt={};function E(e,t){var s,i=t,l;for(typeof e=="string"&&(e=[e]),N(t)&&(i=function(d,f){f[t]=M(d)}),l=e.length,s=0;s<l;s++)Dt[e[s]]=i}function Ye(e,t){E(e,function(s,i,l,d){l._w=l._w||{},t(s,l._w,l,d)})}function ra(e,t,s){t!=null&&g(Dt,e)&&Dt[e](t,s._a,s,e)}function Je(e){return e%4===0&&e%100!==0||e%400===0}var F=0,ie=1,ee=2,A=3,$=4,re=5,ke=6,aa=7,oa=8;w("Y",0,0,function(){var e=this.year();return e<=9999?X(e,4):"+"+e}),w(0,["YY",2],0,function(){return this.year()%100}),w(0,["YYYY",4],0,"year"),w(0,["YYYYY",5],0,"year"),w(0,["YYYYYY",6,!0],0,"year"),b("Y",$e),b("YY",Y,H),b("YYYY",xt,Ct),b("YYYYY",Ge,ve),b("YYYYYY",Ge,ve),E(["YYYYY","YYYYYY"],F),E("YYYY",function(e,t){t[F]=e.length===2?c.parseTwoDigitYear(e):M(e)}),E("YY",function(e,t){t[F]=c.parseTwoDigitYear(e)}),E("Y",function(e,t){t[F]=parseInt(e,10)});function Ie(e){return Je(e)?366:365}c.parseTwoDigitYear=function(e){return M(e)+(M(e)>68?1900:2e3)};var ks=Me("FullYear",!0);function la(){return Je(this.year())}function Me(e,t){return function(s){return s!=null?(_s(this,e,s),c.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){if(!e.isValid())return NaN;var s=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return i?s.getUTCSeconds():s.getSeconds();case"Minutes":return i?s.getUTCMinutes():s.getMinutes();case"Hours":return i?s.getUTCHours():s.getHours();case"Date":return i?s.getUTCDate():s.getDate();case"Day":return i?s.getUTCDay():s.getDay();case"Month":return i?s.getUTCMonth():s.getMonth();case"FullYear":return i?s.getUTCFullYear():s.getFullYear();default:return NaN}}function _s(e,t,s){var i,l,d,f,S;if(!(!e.isValid()||isNaN(s))){switch(i=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?i.setUTCMilliseconds(s):i.setMilliseconds(s));case"Seconds":return void(l?i.setUTCSeconds(s):i.setSeconds(s));case"Minutes":return void(l?i.setUTCMinutes(s):i.setMinutes(s));case"Hours":return void(l?i.setUTCHours(s):i.setHours(s));case"Date":return void(l?i.setUTCDate(s):i.setDate(s));case"FullYear":break;default:return}d=s,f=e.month(),S=e.date(),S=S===29&&f===1&&!Je(d)?28:S,l?i.setUTCFullYear(d,f,S):i.setFullYear(d,f,S)}}function da(e){return e=v(e),Q(this[e])?this[e]():this}function ca(e,t){if(typeof e=="object"){e=wt(e);var s=ea(e),i,l=s.length;for(i=0;i<l;i++)this[s[i].unit](e[s[i].unit])}else if(e=v(e),Q(this[e]))return this[e](t);return this}function ua(e,t){return(e%t+t)%t}var L;Array.prototype.indexOf?L=Array.prototype.indexOf:L=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Pt(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=ua(t,12);return e+=(t-s)/12,s===1?Je(e)?29:28:31-s%7%2}w("M",["MM",2],"Mo",function(){return this.month()+1}),w("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),w("MMMM",0,0,function(e){return this.localeData().months(this,e)}),b("M",Y,xe),b("MM",Y,H),b("MMM",function(e,t){return t.monthsShortRegex(e)}),b("MMMM",function(e,t){return t.monthsRegex(e)}),E(["M","MM"],function(e,t){t[ie]=M(e)-1}),E(["MMM","MMMM"],function(e,t,s,i){var l=s._locale.monthsParse(e,i,s._strict);l!=null?t[ie]=l:x(s).invalidMonth=e});var ma="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ss="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bs=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ha=Ve,fa=Ve;function ga(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||bs).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone}function ya(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[bs.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function pa(e,t,s){var i,l,d,f=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)d=J([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(d,"").toLocaleLowerCase();return s?t==="MMM"?(l=L.call(this._shortMonthsParse,f),l!==-1?l:null):(l=L.call(this._longMonthsParse,f),l!==-1?l:null):t==="MMM"?(l=L.call(this._shortMonthsParse,f),l!==-1?l:(l=L.call(this._longMonthsParse,f),l!==-1?l:null)):(l=L.call(this._longMonthsParse,f),l!==-1?l:(l=L.call(this._shortMonthsParse,f),l!==-1?l:null))}function ka(e,t,s){var i,l,d;if(this._monthsParseExact)return pa.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++)if(l=J([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!s&&!this._monthsParse[i]&&(d="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[i]=new RegExp(d.replace(".",""),"i")),s&&t==="MMMM"&&this._longMonthsParse[i].test(e)||s&&t==="MMM"&&this._shortMonthsParse[i].test(e)||!s&&this._monthsParse[i].test(e))return i}function ws(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!N(t))return e}var s=t,i=e.date();return i=i<29?i:Math.min(i,Pt(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,i):e._d.setMonth(s,i),e}function Cs(e){return e!=null?(ws(this,e),c.updateOffset(this,!0),this):Oe(this,"Month")}function _a(){return Pt(this.year(),this.month())}function Sa(e){return this._monthsParseExact?(g(this,"_monthsRegex")||xs.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(g(this,"_monthsShortRegex")||(this._monthsShortRegex=ha),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ba(e){return this._monthsParseExact?(g(this,"_monthsRegex")||xs.call(this),e?this._monthsStrictRegex:this._monthsRegex):(g(this,"_monthsRegex")||(this._monthsRegex=fa),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function xs(){function e(C,D){return D.length-C.length}var t=[],s=[],i=[],l,d,f,S;for(l=0;l<12;l++)d=J([2e3,l]),f=ne(this.monthsShort(d,"")),S=ne(this.months(d,"")),t.push(f),s.push(S),i.push(S),i.push(f);t.sort(e),s.sort(e),i.sort(e),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function wa(e,t,s,i,l,d,f){var S;return e<100&&e>=0?(S=new Date(e+400,t,s,i,l,d,f),isFinite(S.getFullYear())&&S.setFullYear(e)):S=new Date(e,t,s,i,l,d,f),S}function Le(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Qe(e,t,s){var i=7+t-s,l=(7+Le(e,0,i).getUTCDay()-t)%7;return-l+i-1}function Ms(e,t,s,i,l){var d=(7+s-i)%7,f=Qe(e,i,l),S=1+7*(t-1)+d+f,C,D;return S<=0?(C=e-1,D=Ie(C)+S):S>Ie(e)?(C=e+1,D=S-Ie(e)):(C=e,D=S),{year:C,dayOfYear:D}}function Ae(e,t,s){var i=Qe(e.year(),t,s),l=Math.floor((e.dayOfYear()-i-1)/7)+1,d,f;return l<1?(f=e.year()-1,d=l+ae(f,t,s)):l>ae(e.year(),t,s)?(d=l-ae(e.year(),t,s),f=e.year()+1):(f=e.year(),d=l),{week:d,year:f}}function ae(e,t,s){var i=Qe(e,t,s),l=Qe(e+1,t,s);return(Ie(e)-i+l)/7}w("w",["ww",2],"wo","week"),w("W",["WW",2],"Wo","isoWeek"),b("w",Y,xe),b("ww",Y,H),b("W",Y,xe),b("WW",Y,H),Ye(["w","ww","W","WW"],function(e,t,s,i){t[i.substr(0,1)]=M(e)});function Ca(e){return Ae(e,this._week.dow,this._week.doy).week}var xa={dow:0,doy:6};function Ma(){return this._week.dow}function Da(){return this._week.doy}function Pa(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Na(e){var t=Ae(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}w("d",0,"do","day"),w("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),w("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),w("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),w("e",0,0,"weekday"),w("E",0,0,"isoWeekday"),b("d",Y),b("e",Y),b("E",Y),b("dd",function(e,t){return t.weekdaysMinRegex(e)}),b("ddd",function(e,t){return t.weekdaysShortRegex(e)}),b("dddd",function(e,t){return t.weekdaysRegex(e)}),Ye(["dd","ddd","dddd"],function(e,t,s,i){var l=s._locale.weekdaysParse(e,i,s._strict);l!=null?t.d=l:x(s).invalidWeekday=e}),Ye(["d","e","E"],function(e,t,s,i){t[i]=M(e)});function Ba(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ta(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Ea="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ds="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Va="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ya=Ve,Ia=Ve,Oa=Ve;function La(e,t){var s=u(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Nt(s,this._week.dow):e?s[e.day()]:s}function Aa(e){return e===!0?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Fa(e){return e===!0?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function za(e,t,s){var i,l,d,f=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)d=J([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(d,"").toLocaleLowerCase();return s?t==="dddd"?(l=L.call(this._weekdaysParse,f),l!==-1?l:null):t==="ddd"?(l=L.call(this._shortWeekdaysParse,f),l!==-1?l:null):(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null):t==="dddd"?(l=L.call(this._weekdaysParse,f),l!==-1||(l=L.call(this._shortWeekdaysParse,f),l!==-1)?l:(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null)):t==="ddd"?(l=L.call(this._shortWeekdaysParse,f),l!==-1||(l=L.call(this._weekdaysParse,f),l!==-1)?l:(l=L.call(this._minWeekdaysParse,f),l!==-1?l:null)):(l=L.call(this._minWeekdaysParse,f),l!==-1||(l=L.call(this._weekdaysParse,f),l!==-1)?l:(l=L.call(this._shortWeekdaysParse,f),l!==-1?l:null))}function Ra(e,t,s){var i,l,d;if(this._weekdaysParseExact)return za.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++)if(l=J([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(d="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[i]=new RegExp(d.replace(".",""),"i")),s&&t==="dddd"&&this._fullWeekdaysParse[i].test(e)||s&&t==="ddd"&&this._shortWeekdaysParse[i].test(e)||s&&t==="dd"&&this._minWeekdaysParse[i].test(e)||!s&&this._weekdaysParse[i].test(e))return i}function ja(e){if(!this.isValid())return e!=null?this:NaN;var t=Oe(this,"Day");return e!=null?(e=Ba(e,this.localeData()),this.add(e-t,"d")):t}function Ha(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Wa(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Ta(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Ua(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(g(this,"_weekdaysRegex")||(this._weekdaysRegex=Ya),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function va(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(g(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ia),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qa(e){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Bt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(g(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Oa),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Bt(){function e(R,ue){return ue.length-R.length}var t=[],s=[],i=[],l=[],d,f,S,C,D;for(d=0;d<7;d++)f=J([2e3,1]).day(d),S=ne(this.weekdaysMin(f,"")),C=ne(this.weekdaysShort(f,"")),D=ne(this.weekdays(f,"")),t.push(S),s.push(C),i.push(D),l.push(S),l.push(C),l.push(D);t.sort(e),s.sort(e),i.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Tt(){return this.hours()%12||12}function Ga(){return this.hours()||24}w("H",["HH",2],0,"hour"),w("h",["hh",2],0,Tt),w("k",["kk",2],0,Ga),w("hmm",0,0,function(){return""+Tt.apply(this)+X(this.minutes(),2)}),w("hmmss",0,0,function(){return""+Tt.apply(this)+X(this.minutes(),2)+X(this.seconds(),2)}),w("Hmm",0,0,function(){return""+this.hours()+X(this.minutes(),2)}),w("Hmmss",0,0,function(){return""+this.hours()+X(this.minutes(),2)+X(this.seconds(),2)});function Ps(e,t){w(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ps("a",!0),Ps("A",!1);function Ns(e,t){return t._meridiemParse}b("a",Ns),b("A",Ns),b("H",Y,Mt),b("h",Y,xe),b("k",Y,xe),b("HH",Y,H),b("hh",Y,H),b("kk",Y,H),b("hmm",ys),b("hmmss",ps),b("Hmm",ys),b("Hmmss",ps),E(["H","HH"],A),E(["k","kk"],function(e,t,s){var i=M(e);t[A]=i===24?0:i}),E(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e}),E(["h","hh"],function(e,t,s){t[A]=M(e),x(s).bigHour=!0}),E("hmm",function(e,t,s){var i=e.length-2;t[A]=M(e.substr(0,i)),t[$]=M(e.substr(i)),x(s).bigHour=!0}),E("hmmss",function(e,t,s){var i=e.length-4,l=e.length-2;t[A]=M(e.substr(0,i)),t[$]=M(e.substr(i,2)),t[re]=M(e.substr(l)),x(s).bigHour=!0}),E("Hmm",function(e,t,s){var i=e.length-2;t[A]=M(e.substr(0,i)),t[$]=M(e.substr(i))}),E("Hmmss",function(e,t,s){var i=e.length-4,l=e.length-2;t[A]=M(e.substr(0,i)),t[$]=M(e.substr(i,2)),t[re]=M(e.substr(l))});function $a(e){return(e+"").toLowerCase().charAt(0)==="p"}var Za=/[ap]\.?m?\.?/i,Ka=Me("Hours",!0);function Ja(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var Bs={calendar:zr,longDateFormat:Wr,invalidDate:vr,ordinal:Gr,dayOfMonthOrdinalParse:$r,relativeTime:Kr,months:ma,monthsShort:Ss,week:xa,weekdays:Ea,weekdaysMin:Va,weekdaysShort:Ds,meridiemParse:Za},O={},Fe={},ze;function Qa(e,t){var s,i=Math.min(e.length,t.length);for(s=0;s<i;s+=1)if(e[s]!==t[s])return s;return i}function Ts(e){return e&&e.toLowerCase().replace("_","-")}function Xa(e){for(var t=0,s,i,l,d;t<e.length;){for(d=Ts(e[t]).split("-"),s=d.length,i=Ts(e[t+1]),i=i?i.split("-"):null;s>0;){if(l=Xe(d.slice(0,s).join("-")),l)return l;if(i&&i.length>=s&&Qa(d,i)>=s-1)break;s--}t++}return ze}function eo(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Xe(e){var t=null,s;if(O[e]===void 0&&a&&a.exports&&eo(e))try{t=ze._abbr,s=Zt,s("./locale/"+e),he(t)}catch{O[e]=null}return O[e]}function he(e,t){var s;return e&&(h(t)?s=oe(e):s=Et(e,t),s?ze=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ze._abbr}function Et(e,t){if(t!==null){var s,i=Bs;if(t.abbr=e,O[e]!=null)us("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=O[e]._config;else if(t.parentLocale!=null)if(O[t.parentLocale]!=null)i=O[t.parentLocale]._config;else if(s=Xe(t.parentLocale),s!=null)i=s._config;else return Fe[t.parentLocale]||(Fe[t.parentLocale]=[]),Fe[t.parentLocale].push({name:e,config:t}),null;return O[e]=new kt(pt(i,t)),Fe[e]&&Fe[e].forEach(function(l){Et(l.name,l.config)}),he(e),O[e]}else return delete O[e],null}function to(e,t){if(t!=null){var s,i,l=Bs;O[e]!=null&&O[e].parentLocale!=null?O[e].set(pt(O[e]._config,t)):(i=Xe(e),i!=null&&(l=i._config),t=pt(l,t),i==null&&(t.abbr=e),s=new kt(t),s.parentLocale=O[e],O[e]=s),he(e)}else O[e]!=null&&(O[e].parentLocale!=null?(O[e]=O[e].parentLocale,e===he()&&he(e)):O[e]!=null&&delete O[e]);return O[e]}function oe(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ze;if(!u(e)){if(t=Xe(e),t)return t;e=[e]}return Xa(e)}function so(){return _t(O)}function Vt(e){var t,s=e._a;return s&&x(e).overflow===-2&&(t=s[ie]<0||s[ie]>11?ie:s[ee]<1||s[ee]>Pt(s[F],s[ie])?ee:s[A]<0||s[A]>24||s[A]===24&&(s[$]!==0||s[re]!==0||s[ke]!==0)?A:s[$]<0||s[$]>59?$:s[re]<0||s[re]>59?re:s[ke]<0||s[ke]>999?ke:-1,x(e)._overflowDayOfYear&&(t<F||t>ee)&&(t=ee),x(e)._overflowWeeks&&t===-1&&(t=aa),x(e)._overflowWeekday&&t===-1&&(t=oa),x(e).overflow=t),e}var no=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,io=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ro=/Z|[+-]\d\d(?::?\d\d)?/,et=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Yt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ao=/^\/?Date\((-?\d+)/i,oo=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,lo={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Es(e){var t,s,i=e._i,l=no.exec(i)||io.exec(i),d,f,S,C,D=et.length,R=Yt.length;if(l){for(x(e).iso=!0,t=0,s=D;t<s;t++)if(et[t][1].exec(l[1])){f=et[t][0],d=et[t][2]!==!1;break}if(f==null){e._isValid=!1;return}if(l[3]){for(t=0,s=R;t<s;t++)if(Yt[t][1].exec(l[3])){S=(l[2]||" ")+Yt[t][0];break}if(S==null){e._isValid=!1;return}}if(!d&&S!=null){e._isValid=!1;return}if(l[4])if(ro.exec(l[4]))C="Z";else{e._isValid=!1;return}e._f=f+(S||"")+(C||""),Ot(e)}else e._isValid=!1}function co(e,t,s,i,l,d){var f=[uo(e),Ss.indexOf(t),parseInt(s,10),parseInt(i,10),parseInt(l,10)];return d&&f.push(parseInt(d,10)),f}function uo(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function mo(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ho(e,t,s){if(e){var i=Ds.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(i!==l)return x(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function fo(e,t,s){if(e)return lo[e];if(t)return 0;var i=parseInt(s,10),l=i%100,d=(i-l)/100;return d*60+l}function Vs(e){var t=oo.exec(mo(e._i)),s;if(t){if(s=co(t[4],t[3],t[2],t[5],t[6],t[7]),!ho(t[1],s,e))return;e._a=s,e._tzm=fo(t[8],t[9],t[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),x(e).rfc2822=!0}else e._isValid=!1}function go(e){var t=ao.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Es(e),e._isValid===!1)delete e._isValid;else return;if(Vs(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:c.createFromInputFallback(e)}c.createFromInputFallback=U("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function De(e,t,s){return e??t??s}function yo(e){var t=new Date(c.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function It(e){var t,s,i=[],l,d,f;if(!e._d){for(l=yo(e),e._w&&e._a[ee]==null&&e._a[ie]==null&&po(e),e._dayOfYear!=null&&(f=De(e._a[F],l[F]),(e._dayOfYear>Ie(f)||e._dayOfYear===0)&&(x(e)._overflowDayOfYear=!0),s=Le(f,0,e._dayOfYear),e._a[ie]=s.getUTCMonth(),e._a[ee]=s.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=i[t]=l[t];for(;t<7;t++)e._a[t]=i[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[A]===24&&e._a[$]===0&&e._a[re]===0&&e._a[ke]===0&&(e._nextDay=!0,e._a[A]=0),e._d=(e._useUTC?Le:wa).apply(null,i),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[A]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==d&&(x(e).weekdayMismatch=!0)}}function po(e){var t,s,i,l,d,f,S,C,D;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(d=1,f=4,s=De(t.GG,e._a[F],Ae(I(),1,4).year),i=De(t.W,1),l=De(t.E,1),(l<1||l>7)&&(C=!0)):(d=e._locale._week.dow,f=e._locale._week.doy,D=Ae(I(),d,f),s=De(t.gg,e._a[F],D.year),i=De(t.w,D.week),t.d!=null?(l=t.d,(l<0||l>6)&&(C=!0)):t.e!=null?(l=t.e+d,(t.e<0||t.e>6)&&(C=!0)):l=d),i<1||i>ae(s,d,f)?x(e)._overflowWeeks=!0:C!=null?x(e)._overflowWeekday=!0:(S=Ms(s,i,l,d,f),e._a[F]=S.year,e._dayOfYear=S.dayOfYear)}c.ISO_8601=function(){},c.RFC_2822=function(){};function Ot(e){if(e._f===c.ISO_8601){Es(e);return}if(e._f===c.RFC_2822){Vs(e);return}e._a=[],x(e).empty=!0;var t=""+e._i,s,i,l,d,f,S=t.length,C=0,D,R;for(l=ms(e._f,e._locale).match(St)||[],R=l.length,s=0;s<R;s++)d=l[s],i=(t.match(na(d,e))||[])[0],i&&(f=t.substr(0,t.indexOf(i)),f.length>0&&x(e).unusedInput.push(f),t=t.slice(t.indexOf(i)+i.length),C+=i.length),we[d]?(i?x(e).empty=!1:x(e).unusedTokens.push(d),ra(d,i,e)):e._strict&&!i&&x(e).unusedTokens.push(d);x(e).charsLeftOver=S-C,t.length>0&&x(e).unusedInput.push(t),e._a[A]<=12&&x(e).bigHour===!0&&e._a[A]>0&&(x(e).bigHour=void 0),x(e).parsedDateParts=e._a.slice(0),x(e).meridiem=e._meridiem,e._a[A]=ko(e._locale,e._a[A],e._meridiem),D=x(e).era,D!==null&&(e._a[F]=e._locale.erasConvertYear(D,e._a[F])),It(e),Vt(e)}function ko(e,t,s){var i;return s==null?t:e.meridiemHour!=null?e.meridiemHour(t,s):(e.isPM!=null&&(i=e.isPM(s),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function _o(e){var t,s,i,l,d,f,S=!1,C=e._f.length;if(C===0){x(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<C;l++)d=0,f=!1,t=yt({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ot(t),ft(t)&&(f=!0),d+=x(t).charsLeftOver,d+=x(t).unusedTokens.length*10,x(t).score=d,S?d<i&&(i=d,s=t):(i==null||d<i||f)&&(i=d,s=t,f&&(S=!0));se(e,s||t)}function So(e){if(!e._d){var t=wt(e._i),s=t.day===void 0?t.date:t.day;e._a=z([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),It(e)}}function bo(e){var t=new Ee(Vt(Ys(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ys(e){var t=e._i,s=e._f;return e._locale=e._locale||oe(e._l),t===null||s===void 0&&t===""?He({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),G(t)?new Ee(Vt(t)):(_(t)?e._d=t:u(s)?_o(e):s?Ot(e):wo(e),ft(e)||(e._d=null),e))}function wo(e){var t=e._i;h(t)?e._d=new Date(c.now()):_(t)?e._d=new Date(t.valueOf()):typeof t=="string"?go(e):u(t)?(e._a=z(t.slice(0),function(s){return parseInt(s,10)}),It(e)):p(t)?So(e):N(t)?e._d=new Date(t):c.createFromInputFallback(e)}function Is(e,t,s,i,l){var d={};return(t===!0||t===!1)&&(i=t,t=void 0),(s===!0||s===!1)&&(i=s,s=void 0),(p(e)&&k(e)||u(e)&&e.length===0)&&(e=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=l,d._l=s,d._i=e,d._f=t,d._strict=i,bo(d)}function I(e,t,s,i){return Is(e,t,s,i,!1)}var Co=U("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:He()}),xo=U("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:He()});function Os(e,t){var s,i;if(t.length===1&&u(t[0])&&(t=t[0]),!t.length)return I();for(s=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](s))&&(s=t[i]);return s}function Mo(){var e=[].slice.call(arguments,0);return Os("isBefore",e)}function Do(){var e=[].slice.call(arguments,0);return Os("isAfter",e)}var Po=function(){return Date.now?Date.now():+new Date},Re=["year","quarter","month","week","day","hour","minute","second","millisecond"];function No(e){var t,s=!1,i,l=Re.length;for(t in e)if(g(e,t)&&!(L.call(Re,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<l;++i)if(e[Re[i]]){if(s)return!1;parseFloat(e[Re[i]])!==M(e[Re[i]])&&(s=!0)}return!0}function Bo(){return this._isValid}function To(){return Z(NaN)}function tt(e){var t=wt(e),s=t.year||0,i=t.quarter||0,l=t.month||0,d=t.week||t.isoWeek||0,f=t.day||0,S=t.hour||0,C=t.minute||0,D=t.second||0,R=t.millisecond||0;this._isValid=No(t),this._milliseconds=+R+D*1e3+C*6e4+S*1e3*60*60,this._days=+f+d*7,this._months=+l+i*3+s*12,this._data={},this._locale=oe(),this._bubble()}function st(e){return e instanceof tt}function Lt(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Eo(e,t,s){var i=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),d=0,f;for(f=0;f<i;f++)M(e[f])!==M(t[f])&&d++;return d+l}function Ls(e,t){w(e,0,0,function(){var s=this.utcOffset(),i="+";return s<0&&(s=-s,i="-"),i+X(~~(s/60),2)+t+X(~~s%60,2)})}Ls("Z",":"),Ls("ZZ",""),b("Z",Ze),b("ZZ",Ze),E(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=At(Ze,e)});var Vo=/([\+\-]|\d\d)/gi;function At(e,t){var s=(t||"").match(e),i,l,d;return s===null?null:(i=s[s.length-1]||[],l=(i+"").match(Vo)||["-",0,0],d=+(l[1]*60)+M(l[2]),d===0?0:l[0]==="+"?d:-d)}function Ft(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(G(e)||_(e)?e.valueOf():I(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),c.updateOffset(s,!1),s):I(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}c.updateOffset=function(){};function Yo(e,t,s){var i=this._offset||0,l;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=At(Ze,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(l=zt(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),i!==e&&(!t||this._changeInProgress?Rs(this,Z(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:zt(this)}function Io(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Oo(e){return this.utcOffset(0,e)}function Lo(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this}function Ao(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=At(ta,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Fo(e){return this.isValid()?(e=e?I(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function zo(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ro(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e={},t;return yt(e,this),e=Ys(e),e._a?(t=e._isUTC?J(e._a):I(e._a),this._isDSTShifted=this.isValid()&&Eo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jo(){return this.isValid()?!this._isUTC:!1}function Ho(){return this.isValid()?this._isUTC:!1}function As(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Wo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Uo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Z(e,t){var s=e,i=null,l,d,f;return st(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:N(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=Wo.exec(e))?(l=i[1]==="-"?-1:1,s={y:0,d:M(i[ee])*l,h:M(i[A])*l,m:M(i[$])*l,s:M(i[re])*l,ms:M(Lt(i[ke]*1e3))*l}):(i=Uo.exec(e))?(l=i[1]==="-"?-1:1,s={y:_e(i[2],l),M:_e(i[3],l),w:_e(i[4],l),d:_e(i[5],l),h:_e(i[6],l),m:_e(i[7],l),s:_e(i[8],l)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(f=vo(I(s.from),I(s.to)),s={},s.ms=f.milliseconds,s.M=f.months),d=new tt(s),st(e)&&g(e,"_locale")&&(d._locale=e._locale),st(e)&&g(e,"_isValid")&&(d._isValid=e._isValid),d}Z.fn=tt.prototype,Z.invalid=To;function _e(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Fs(e,t){var s={};return s.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function vo(e,t){var s;return e.isValid()&&t.isValid()?(t=Ft(t,e),e.isBefore(t)?s=Fs(e,t):(s=Fs(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function zs(e,t){return function(s,i){var l,d;return i!==null&&!isNaN(+i)&&(us(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=s,s=i,i=d),l=Z(s,i),Rs(this,l,e),this}}function Rs(e,t,s,i){var l=t._milliseconds,d=Lt(t._days),f=Lt(t._months);e.isValid()&&(i=i??!0,f&&ws(e,Oe(e,"Month")+f*s),d&&_s(e,"Date",Oe(e,"Date")+d*s),l&&e._d.setTime(e._d.valueOf()+l*s),i&&c.updateOffset(e,d||f))}var qo=zs(1,"add"),Go=zs(-1,"subtract");function js(e){return typeof e=="string"||e instanceof String}function $o(e){return G(e)||_(e)||js(e)||N(e)||Ko(e)||Zo(e)||e===null||e===void 0}function Zo(e){var t=p(e)&&!k(e),s=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,d,f=i.length;for(l=0;l<f;l+=1)d=i[l],s=s||g(e,d);return t&&s}function Ko(e){var t=u(e),s=!1;return t&&(s=e.filter(function(i){return!N(i)&&js(e)}).length===0),t&&s}function Jo(e){var t=p(e)&&!k(e),s=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,d;for(l=0;l<i.length;l+=1)d=i[l],s=s||g(e,d);return t&&s}function Qo(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function Xo(e,t){arguments.length===1&&(arguments[0]?$o(arguments[0])?(e=arguments[0],t=void 0):Jo(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||I(),i=Ft(s,this).startOf("day"),l=c.calendarFormat(this,i)||"sameElse",d=t&&(Q(t[l])?t[l].call(this,s):t[l]);return this.format(d||this.localeData().calendar(l,this,I(s)))}function el(){return new Ee(this)}function tl(e,t){var s=G(e)?e:I(e);return this.isValid()&&s.isValid()?(t=v(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function sl(e,t){var s=G(e)?e:I(e);return this.isValid()&&s.isValid()?(t=v(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function nl(e,t,s,i){var l=G(e)?e:I(e),d=G(t)?t:I(t);return this.isValid()&&l.isValid()&&d.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(l,s):!this.isBefore(l,s))&&(i[1]===")"?this.isBefore(d,s):!this.isAfter(d,s))):!1}function il(e,t){var s=G(e)?e:I(e),i;return this.isValid()&&s.isValid()?(t=v(t)||"millisecond",t==="millisecond"?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function rl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function al(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ol(e,t,s){var i,l,d;if(!this.isValid())return NaN;if(i=Ft(e,this),!i.isValid())return NaN;switch(l=(i.utcOffset()-this.utcOffset())*6e4,t=v(t),t){case"year":d=nt(this,i)/12;break;case"month":d=nt(this,i);break;case"quarter":d=nt(this,i)/3;break;case"second":d=(this-i)/1e3;break;case"minute":d=(this-i)/6e4;break;case"hour":d=(this-i)/36e5;break;case"day":d=(this-i-l)/864e5;break;case"week":d=(this-i-l)/6048e5;break;default:d=this-i}return s?d:q(d)}function nt(e,t){if(e.date()<t.date())return-nt(t,e);var s=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(s,"months"),l,d;return t-i<0?(l=e.clone().add(s-1,"months"),d=(t-i)/(i-l)):(l=e.clone().add(s+1,"months"),d=(t-i)/(l-i)),-(s+d)||0}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ll(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dl(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Ue(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Q(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ue(s,"Z")):Ue(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cl(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",s,i,l,d;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),s="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",d=t+'[")]',this.format(s+i+l+d)}function ul(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=Ue(this,e);return this.localeData().postformat(t)}function ml(e,t){return this.isValid()&&(G(e)&&e.isValid()||I(e).isValid())?Z({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function hl(e){return this.from(I(),e)}function fl(e,t){return this.isValid()&&(G(e)&&e.isValid()||I(e).isValid())?Z({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gl(e){return this.to(I(),e)}function Hs(e){var t;return e===void 0?this._locale._abbr:(t=oe(e),t!=null&&(this._locale=t),this)}var Ws=U("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Us(){return this._locale}var it=1e3,Pe=60*it,rt=60*Pe,vs=(365*400+97)*24*rt;function Ne(e,t){return(e%t+t)%t}function qs(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-vs:new Date(e,t,s).valueOf()}function Gs(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-vs:Date.UTC(e,t,s)}function yl(e){var t,s;if(e=v(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Gs:qs,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ne(t+(this._isUTC?0:this.utcOffset()*Pe),rt);break;case"minute":t=this._d.valueOf(),t-=Ne(t,Pe);break;case"second":t=this._d.valueOf(),t-=Ne(t,it);break}return this._d.setTime(t),c.updateOffset(this,!0),this}function pl(e){var t,s;if(e=v(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Gs:qs,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rt-Ne(t+(this._isUTC?0:this.utcOffset()*Pe),rt)-1;break;case"minute":t=this._d.valueOf(),t+=Pe-Ne(t,Pe)-1;break;case"second":t=this._d.valueOf(),t+=it-Ne(t,it)-1;break}return this._d.setTime(t),c.updateOffset(this,!0),this}function kl(){return this._d.valueOf()-(this._offset||0)*6e4}function _l(){return Math.floor(this.valueOf()/1e3)}function Sl(){return new Date(this.valueOf())}function bl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wl(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Cl(){return this.isValid()?this.toISOString():null}function xl(){return ft(this)}function Ml(){return se({},x(this))}function Dl(){return x(this).overflow}function Pl(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}w("N",0,0,"eraAbbr"),w("NN",0,0,"eraAbbr"),w("NNN",0,0,"eraAbbr"),w("NNNN",0,0,"eraName"),w("NNNNN",0,0,"eraNarrow"),w("y",["y",1],"yo","eraYear"),w("y",["yy",2],0,"eraYear"),w("y",["yyy",3],0,"eraYear"),w("y",["yyyy",4],0,"eraYear"),b("N",Rt),b("NN",Rt),b("NNN",Rt),b("NNNN",Fl),b("NNNNN",zl),E(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,i){var l=s._locale.erasParse(e,i,s._strict);l?x(s).era=l:x(s).invalidEra=e}),b("y",Ce),b("yy",Ce),b("yyy",Ce),b("yyyy",Ce),b("yo",Rl),E(["y","yy","yyy","yyyy"],F),E(["yo"],function(e,t,s,i){var l;s._locale._eraYearOrdinalRegex&&(l=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[F]=s._locale.eraYearOrdinalParse(e,l):t[F]=parseInt(e,10)});function Nl(e,t){var s,i,l,d=this._eras||oe("en")._eras;for(s=0,i=d.length;s<i;++s){switch(typeof d[s].since){case"string":l=c(d[s].since).startOf("day"),d[s].since=l.valueOf();break}switch(typeof d[s].until){case"undefined":d[s].until=1/0;break;case"string":l=c(d[s].until).startOf("day").valueOf(),d[s].until=l.valueOf();break}}return d}function Bl(e,t,s){var i,l,d=this.eras(),f,S,C;for(e=e.toUpperCase(),i=0,l=d.length;i<l;++i)if(f=d[i].name.toUpperCase(),S=d[i].abbr.toUpperCase(),C=d[i].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(S===e)return d[i];break;case"NNNN":if(f===e)return d[i];break;case"NNNNN":if(C===e)return d[i];break}else if([f,S,C].indexOf(e)>=0)return d[i]}function Tl(e,t){var s=e.since<=e.until?1:-1;return t===void 0?c(e.since).year():c(e.since).year()+(t-e.offset)*s}function El(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].name;return""}function Vl(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].narrow;return""}function Yl(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].abbr;return""}function Il(){var e,t,s,i,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(s=l[e].since<=l[e].until?1:-1,i=this.clone().startOf("day").valueOf(),l[e].since<=i&&i<=l[e].until||l[e].until<=i&&i<=l[e].since)return(this.year()-c(l[e].since).year())*s+l[e].offset;return this.year()}function Ol(e){return g(this,"_erasNameRegex")||jt.call(this),e?this._erasNameRegex:this._erasRegex}function Ll(e){return g(this,"_erasAbbrRegex")||jt.call(this),e?this._erasAbbrRegex:this._erasRegex}function Al(e){return g(this,"_erasNarrowRegex")||jt.call(this),e?this._erasNarrowRegex:this._erasRegex}function Rt(e,t){return t.erasAbbrRegex(e)}function Fl(e,t){return t.erasNameRegex(e)}function zl(e,t){return t.erasNarrowRegex(e)}function Rl(e,t){return t._eraYearOrdinalRegex||Ce}function jt(){var e=[],t=[],s=[],i=[],l,d,f,S,C,D=this.eras();for(l=0,d=D.length;l<d;++l)f=ne(D[l].name),S=ne(D[l].abbr),C=ne(D[l].narrow),t.push(f),e.push(S),s.push(C),i.push(f),i.push(S),i.push(C);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}w(0,["gg",2],0,function(){return this.weekYear()%100}),w(0,["GG",2],0,function(){return this.isoWeekYear()%100});function at(e,t){w(0,[e,e.length],0,t)}at("gggg","weekYear"),at("ggggg","weekYear"),at("GGGG","isoWeekYear"),at("GGGGG","isoWeekYear"),b("G",$e),b("g",$e),b("GG",Y,H),b("gg",Y,H),b("GGGG",xt,Ct),b("gggg",xt,Ct),b("GGGGG",Ge,ve),b("ggggg",Ge,ve),Ye(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,i){t[i.substr(0,2)]=M(e)}),Ye(["gg","GG"],function(e,t,s,i){t[i]=c.parseTwoDigitYear(e)});function jl(e){return $s.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Hl(e){return $s.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Wl(){return ae(this.year(),1,4)}function Ul(){return ae(this.isoWeekYear(),1,4)}function vl(){var e=this.localeData()._week;return ae(this.year(),e.dow,e.doy)}function ql(){var e=this.localeData()._week;return ae(this.weekYear(),e.dow,e.doy)}function $s(e,t,s,i,l){var d;return e==null?Ae(this,i,l).year:(d=ae(e,i,l),t>d&&(t=d),Gl.call(this,e,t,s,i,l))}function Gl(e,t,s,i,l){var d=Ms(e,t,s,i,l),f=Le(d.year,0,d.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}w("Q",0,"Qo","quarter"),b("Q",fs),E("Q",function(e,t){t[ie]=(M(e)-1)*3});function $l(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}w("D",["DD",2],"Do","date"),b("D",Y,xe),b("DD",Y,H),b("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),E(["D","DD"],ee),E("Do",function(e,t){t[ee]=M(e.match(Y)[0])});var Zs=Me("Date",!0);w("DDD",["DDDD",3],"DDDo","dayOfYear"),b("DDD",qe),b("DDDD",gs),E(["DDD","DDDD"],function(e,t,s){s._dayOfYear=M(e)});function Zl(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}w("m",["mm",2],0,"minute"),b("m",Y,Mt),b("mm",Y,H),E(["m","mm"],$);var Kl=Me("Minutes",!1);w("s",["ss",2],0,"second"),b("s",Y,Mt),b("ss",Y,H),E(["s","ss"],re);var Jl=Me("Seconds",!1);w("S",0,0,function(){return~~(this.millisecond()/100)}),w(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),w(0,["SSS",3],0,"millisecond"),w(0,["SSSS",4],0,function(){return this.millisecond()*10}),w(0,["SSSSS",5],0,function(){return this.millisecond()*100}),w(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),w(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),w(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),w(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),b("S",qe,fs),b("SS",qe,H),b("SSS",qe,gs);var fe,Ks;for(fe="SSSS";fe.length<=9;fe+="S")b(fe,Ce);function Ql(e,t){t[ke]=M(("0."+e)*1e3)}for(fe="S";fe.length<=9;fe+="S")E(fe,Ql);Ks=Me("Milliseconds",!1),w("z",0,0,"zoneAbbr"),w("zz",0,0,"zoneName");function Xl(){return this._isUTC?"UTC":""}function ed(){return this._isUTC?"Coordinated Universal Time":""}var y=Ee.prototype;y.add=qo,y.calendar=Xo,y.clone=el,y.diff=ol,y.endOf=pl,y.format=ul,y.from=ml,y.fromNow=hl,y.to=fl,y.toNow=gl,y.get=da,y.invalidAt=Dl,y.isAfter=tl,y.isBefore=sl,y.isBetween=nl,y.isSame=il,y.isSameOrAfter=rl,y.isSameOrBefore=al,y.isValid=xl,y.lang=Ws,y.locale=Hs,y.localeData=Us,y.max=xo,y.min=Co,y.parsingFlags=Ml,y.set=ca,y.startOf=yl,y.subtract=Go,y.toArray=bl,y.toObject=wl,y.toDate=Sl,y.toISOString=dl,y.inspect=cl,typeof Symbol<"u"&&Symbol.for!=null&&(y[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),y.toJSON=Cl,y.toString=ll,y.unix=_l,y.valueOf=kl,y.creationData=Pl,y.eraName=El,y.eraNarrow=Vl,y.eraAbbr=Yl,y.eraYear=Il,y.year=ks,y.isLeapYear=la,y.weekYear=jl,y.isoWeekYear=Hl,y.quarter=y.quarters=$l,y.month=Cs,y.daysInMonth=_a,y.week=y.weeks=Pa,y.isoWeek=y.isoWeeks=Na,y.weeksInYear=vl,y.weeksInWeekYear=ql,y.isoWeeksInYear=Wl,y.isoWeeksInISOWeekYear=Ul,y.date=Zs,y.day=y.days=ja,y.weekday=Ha,y.isoWeekday=Wa,y.dayOfYear=Zl,y.hour=y.hours=Ka,y.minute=y.minutes=Kl,y.second=y.seconds=Jl,y.millisecond=y.milliseconds=Ks,y.utcOffset=Yo,y.utc=Oo,y.local=Lo,y.parseZone=Ao,y.hasAlignedHourOffset=Fo,y.isDST=zo,y.isLocal=jo,y.isUtcOffset=Ho,y.isUtc=As,y.isUTC=As,y.zoneAbbr=Xl,y.zoneName=ed,y.dates=U("dates accessor is deprecated. Use date instead.",Zs),y.months=U("months accessor is deprecated. Use month instead",Cs),y.years=U("years accessor is deprecated. Use year instead",ks),y.zone=U("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Io),y.isDSTShifted=U("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ro);function td(e){return I(e*1e3)}function sd(){return I.apply(null,arguments).parseZone()}function Js(e){return e}var B=kt.prototype;B.calendar=Rr,B.longDateFormat=Ur,B.invalidDate=qr,B.ordinal=Zr,B.preparse=Js,B.postformat=Js,B.relativeTime=Jr,B.pastFuture=Qr,B.set=Fr,B.eras=Nl,B.erasParse=Bl,B.erasConvertYear=Tl,B.erasAbbrRegex=Ll,B.erasNameRegex=Ol,B.erasNarrowRegex=Al,B.months=ga,B.monthsShort=ya,B.monthsParse=ka,B.monthsRegex=ba,B.monthsShortRegex=Sa,B.week=Ca,B.firstDayOfYear=Da,B.firstDayOfWeek=Ma,B.weekdays=La,B.weekdaysMin=Fa,B.weekdaysShort=Aa,B.weekdaysParse=Ra,B.weekdaysRegex=Ua,B.weekdaysShortRegex=va,B.weekdaysMinRegex=qa,B.isPM=$a,B.meridiem=Ja;function ot(e,t,s,i){var l=oe(),d=J().set(i,t);return l[s](d,e)}function Qs(e,t,s){if(N(e)&&(t=e,e=void 0),e=e||"",t!=null)return ot(e,t,s,"month");var i,l=[];for(i=0;i<12;i++)l[i]=ot(e,i,s,"month");return l}function Ht(e,t,s,i){typeof e=="boolean"?(N(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,N(t)&&(s=t,t=void 0),t=t||"");var l=oe(),d=e?l._week.dow:0,f,S=[];if(s!=null)return ot(t,(s+d)%7,i,"day");for(f=0;f<7;f++)S[f]=ot(t,(f+d)%7,i,"day");return S}function nd(e,t){return Qs(e,t,"months")}function id(e,t){return Qs(e,t,"monthsShort")}function rd(e,t,s){return Ht(e,t,s,"weekdays")}function ad(e,t,s){return Ht(e,t,s,"weekdaysShort")}function od(e,t,s){return Ht(e,t,s,"weekdaysMin")}he("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=M(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}}),c.lang=U("moment.lang is deprecated. Use moment.locale instead.",he),c.langData=U("moment.langData is deprecated. Use moment.localeData instead.",oe);var le=Math.abs;function ld(){var e=this._data;return this._milliseconds=le(this._milliseconds),this._days=le(this._days),this._months=le(this._months),e.milliseconds=le(e.milliseconds),e.seconds=le(e.seconds),e.minutes=le(e.minutes),e.hours=le(e.hours),e.months=le(e.months),e.years=le(e.years),this}function Xs(e,t,s,i){var l=Z(t,s);return e._milliseconds+=i*l._milliseconds,e._days+=i*l._days,e._months+=i*l._months,e._bubble()}function dd(e,t){return Xs(this,e,t,1)}function cd(e,t){return Xs(this,e,t,-1)}function en(e){return e<0?Math.floor(e):Math.ceil(e)}function ud(){var e=this._milliseconds,t=this._days,s=this._months,i=this._data,l,d,f,S,C;return e>=0&&t>=0&&s>=0||e<=0&&t<=0&&s<=0||(e+=en(Wt(s)+t)*864e5,t=0,s=0),i.milliseconds=e%1e3,l=q(e/1e3),i.seconds=l%60,d=q(l/60),i.minutes=d%60,f=q(d/60),i.hours=f%24,t+=q(f/24),C=q(tn(t)),s+=C,t-=en(Wt(C)),S=q(s/12),s%=12,i.days=t,i.months=s,i.years=S,this}function tn(e){return e*4800/146097}function Wt(e){return e*146097/4800}function md(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if(e=v(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,s=this._months+tn(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(Wt(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function de(e){return function(){return this.as(e)}}var sn=de("ms"),hd=de("s"),fd=de("m"),gd=de("h"),yd=de("d"),pd=de("w"),kd=de("M"),_d=de("Q"),Sd=de("y"),bd=sn;function wd(){return Z(this)}function Cd(e){return e=v(e),this.isValid()?this[e+"s"]():NaN}function Se(e){return function(){return this.isValid()?this._data[e]:NaN}}var xd=Se("milliseconds"),Md=Se("seconds"),Dd=Se("minutes"),Pd=Se("hours"),Nd=Se("days"),Bd=Se("months"),Td=Se("years");function Ed(){return q(this.days()/7)}var ce=Math.round,Be={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Vd(e,t,s,i,l){return l.relativeTime(t||1,!!s,e,i)}function Yd(e,t,s,i){var l=Z(e).abs(),d=ce(l.as("s")),f=ce(l.as("m")),S=ce(l.as("h")),C=ce(l.as("d")),D=ce(l.as("M")),R=ce(l.as("w")),ue=ce(l.as("y")),ge=d<=s.ss&&["s",d]||d<s.s&&["ss",d]||f<=1&&["m"]||f<s.m&&["mm",f]||S<=1&&["h"]||S<s.h&&["hh",S]||C<=1&&["d"]||C<s.d&&["dd",C];return s.w!=null&&(ge=ge||R<=1&&["w"]||R<s.w&&["ww",R]),ge=ge||D<=1&&["M"]||D<s.M&&["MM",D]||ue<=1&&["y"]||["yy",ue],ge[2]=t,ge[3]=+e>0,ge[4]=i,Vd.apply(null,ge)}function Id(e){return e===void 0?ce:typeof e=="function"?(ce=e,!0):!1}function Od(e,t){return Be[e]===void 0?!1:t===void 0?Be[e]:(Be[e]=t,e==="s"&&(Be.ss=t-1),!0)}function Ld(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,i=Be,l,d;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(i=Object.assign({},Be,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),l=this.localeData(),d=Yd(this,!s,i,l),s&&(d=l.pastFuture(+this,d)),l.postformat(d)}var Ut=Math.abs;function Te(e){return(e>0)-(e<0)||+e}function lt(){if(!this.isValid())return this.localeData().invalidDate();var e=Ut(this._milliseconds)/1e3,t=Ut(this._days),s=Ut(this._months),i,l,d,f,S=this.asSeconds(),C,D,R,ue;return S?(i=q(e/60),l=q(i/60),e%=60,i%=60,d=q(s/12),s%=12,f=e?e.toFixed(3).replace(/\.?0+$/,""):"",C=S<0?"-":"",D=Te(this._months)!==Te(S)?"-":"",R=Te(this._days)!==Te(S)?"-":"",ue=Te(this._milliseconds)!==Te(S)?"-":"",C+"P"+(d?D+d+"Y":"")+(s?D+s+"M":"")+(t?R+t+"D":"")+(l||i||e?"T":"")+(l?ue+l+"H":"")+(i?ue+i+"M":"")+(e?ue+f+"S":"")):"P0D"}var P=tt.prototype;P.isValid=Bo,P.abs=ld,P.add=dd,P.subtract=cd,P.as=md,P.asMilliseconds=sn,P.asSeconds=hd,P.asMinutes=fd,P.asHours=gd,P.asDays=yd,P.asWeeks=pd,P.asMonths=kd,P.asQuarters=_d,P.asYears=Sd,P.valueOf=bd,P._bubble=ud,P.clone=wd,P.get=Cd,P.milliseconds=xd,P.seconds=Md,P.minutes=Dd,P.hours=Pd,P.days=Nd,P.weeks=Ed,P.months=Bd,P.years=Td,P.humanize=Ld,P.toISOString=lt,P.toString=lt,P.toJSON=lt,P.locale=Hs,P.localeData=Us,P.toIsoString=U("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lt),P.lang=Ws,w("X",0,0,"unix"),w("x",0,0,"valueOf"),b("x",$e),b("X",sa),E("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)}),E("x",function(e,t,s){s._d=new Date(M(e))});//! moment.js
5
+ return c.version="2.30.1",m(I),c.fn=y,c.min=Mo,c.max=Do,c.now=Po,c.utc=J,c.unix=td,c.months=nd,c.isDate=_,c.locale=he,c.invalid=He,c.duration=Z,c.isMoment=G,c.weekdays=rd,c.parseZone=sd,c.localeData=oe,c.isDuration=st,c.monthsShort=id,c.weekdaysMin=od,c.defineLocale=Et,c.updateLocale=to,c.locales=so,c.weekdaysShort=ad,c.normalizeUnits=v,c.relativeTimeRounding=Id,c.relativeTimeThreshold=Od,c.calendarFormat=Qo,c.prototype=y,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},c})}(Kt)),Kt.exports}(function(a,o){(function(r,c){c(typeof Zt=="function"?Gn():r.moment)})($t,function(r){//! moment.js locale configuration
6
+ var c=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,m=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,u=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,p=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],g=r.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:u,monthsShortRegex:u,monthsStrictRegex:c,monthsShortStrictRegex:m,monthsParse:p,longMonthsParse:p,shortMonthsParse:p,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(k,h){switch(h){case"D":return k+(k===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return k+(k===1?"er":"e");case"w":case"W":return k+(k===1?"re":"e")}},week:{dow:1,doy:4}});return g})})();function ye(a,o=!0){if(!a)return null;let r=a.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return o?r.toLowerCase():r}function Qt(a){return a?a==null?void 0:a.toLocaleString("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}):"0 €"}function mt(a,o="DD/MM/YYYY"){return!a||!te.unix(a).isValid()?a:te.unix(a).format(o)}function Xt(a,o="DD/MM/YYYY à HH:mm"){return mt(a,o)}const es=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)?$/;function $n(a,o){const r=a.replace(/\d+/g,m=>(+m+1e5).toString()),c=o.replace(/\d+/g,m=>(+m+1e5).toString());return r.localeCompare(c)}function ts(a){return a!=null&&a!==""&&!isNaN(a)}function ss(a){return a&&te(a,"DD/MM/YYYY",!0).isValid()}function ns(a){return typeof a=="boolean"}function Zn(a,o,r){const c=(a?1:0)-(o?1:0);return r?-c:c}function Kn(a,o){const r=(a==null||a==="")&&typeof a!="boolean",c=(o==null||o==="")&&typeof o!="boolean";return r&&c?0:r?1:c?-1:null}function is(a){return typeof a=="string"&&a.includes("€")}function Jn(a,o,r){const c=parseFloat(a.replace("€","").replace(",",".").replace(/\s/g,"").trim()),m=parseFloat(o.replace("€","").replace(",",".").replace(/\s/g,"").trim());if(isNaN(c)&&isNaN(m))return 0;if(isNaN(c))return 1;if(isNaN(m))return-1;const u=c-m;return r?u:-u}function je(a,o,r){var c,m,u,p;const g=Kn(a,o);if(g!==null)return g;if(ns(a)&&ns(o))return Zn(a,o,r);if(es.test(a)&&es.test(o)){const _=$n(a,o);return r?_:-_}if(ts(a)&&ts(o)){const _=parseFloat(a),z=parseFloat(o);return r?_-z:z-_}if(ss(a)&&ss(o)){const _=te(a,"DD/MM/YYYY").unix(),z=te(o,"DD/MM/YYYY").unix();return r?_-z:z-_}if(is(a)&&is(o))return Jn(a,o,r);const k=typeof a=="string"?(c=ye(a))==null?void 0:c.toLowerCase():(m=ye(String(a)))==null?void 0:m.toLowerCase(),h=typeof o=="string"?(u=ye(o))==null?void 0:u.toLowerCase():(p=ye(String(o)))==null?void 0:p.toLowerCase(),N=k==null?void 0:k.localeCompare(h,void 0,{numeric:!0,sensitivity:"base"});return r?N:-N}function Qn(a,o,r=!1){return!a||!Array.isArray(a)?a:a.sort((c,m)=>{const u=c==null?void 0:c[o],p=m==null?void 0:m[o];return je(u,p,r)})}function rs(a,o=!1,r){return!a||!Array.isArray(a)?a:a.sort((c,m)=>r(c,m,o))}function as(a,o){let r=pe(a);if(!r)r={columns:o};else if(!r.columns)r.columns=o;else{let c=o.filter(function(u){return!r.columns.some(function(p){return p.id===u.id})});r.columns=r.columns.concat(c);let m=r.columns.filter(function(u){return!o.some(function(p){return u.id===p.id})});r.columns=r.columns.filter(function(u){return!m.some(function(p){return u.id===p.id})}),r.columns.filter(u=>{for(let p of o)p.id===u.id&&p.libelle!==u.libelle&&(u.libelle=p.libelle)})}be(a,r)}function Xn(a,o,r=null){let c=pe(a);c?r&&!c[r]&&(c[r]=o):r?(c={},c[r]=o):c=o,be(a,c)}function pe(a){return JSON.parse(window.localStorage.getItem(a))}function be(a,o,r=null){let c=pe(a);return r?c[r]=o:c=o,window.localStorage.setItem(a,JSON.stringify(c))}const ei=(a,o)=>{const r=a.__vccOpts||a;for(const[c,m]of o)r[c]=m;return r};me.library.add(T.faEye,T.faEyeSlash,T.faArrowDownWideShort,T.faArrowDownShortWide,T.faTrash,T.faPlus,T.faXmark,T.faGreaterThan,T.faFilter);const ti={name:"AmsomTableDraggable",components:{VueDraggableNext:nn.VueDraggableNext,FontAwesomeIcon:W.FontAwesomeIcon},props:{tableId:{type:String,default:"table-draggable",require:!0},defaultColumns:{type:Array,require:!0,default:null},dynamicColumns:{type:Array,default:null},localStorageItemName:{type:String,default:null},localStorageMaxItemPerPageName:{type:String,default:null},tdItemsList:{type:[Array,Object],require:!0,default:null},search:{type:String,default:null},pickedDate:{type:Array,default:null},columnNameDateFilter:{type:Array,default:null},maxItemPerPage:{type:Number,default:-1},infiniteScroll:{type:Boolean,default:!1},infiniteScrollIncrement:{type:Number,default:null},maxItemPerPageList:{type:Array,default:()=>[{value:5,text:"5"},{value:10,text:"10"},{value:15,text:"15"},{value:25,text:"25"},{value:50,text:"50"},{value:100,text:"100"},{value:500,text:"500"},{value:1e3,text:"1000"},{value:-1,text:"Tous"}]},tdClass:{type:String,default:""},showMaxItemPerPageBtn:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},showModifyColumnsBtn:{type:Boolean,default:!1},showLineNumber:{type:Boolean,default:!1},ghostClass:{type:String,default:"bg-success"},headerBgColor:{type:String,default:"bg-white"},headerTextColor:{type:String,default:"text-primary"},lineEditMode:{type:Boolean,default:!1},border:{type:Boolean,default:!1},tableSm:{type:Boolean,default:!1},deepSorts:{type:Boolean,default:!1},deepSortsListPreset:{type:Array,default:null},ckSelectedItems:{type:Array,default:null},lineStatesList:{type:Array,default:()=>[{state:"add",class:"addLineState"},{state:"delete",class:"deleteLineState"},{state:"update",class:"updateLineState"}]},stickyScrollbarHorizontal:{type:Boolean,default:!1},paginationPosition:{type:String,default:"left",validator(a){return["left","center","right"].includes(a)}},trFontSize:{type:String,default:"fs-6"},trHeightPx:{type:Number,default:60},noValueText:{type:String,default:"Aucune valeur"}},emits:["changeSubject","lineEditModeAddNewLine","update:ckSelectedItems","update:dynamicColumns","update:deepSortsListPreset","contextmenu"],data(){return{checkAllCheckBox:!1,isDragging:!1,sortKey:null,sortAsc:!1,currentPage:1,previousCurrentPage:1,selectedItems:[],currentHeaderSort:null,headerEditMode:!1,totalPages:null,columns:this.copyDefaultColumns(),maxItemsPerPage:this.getDefaultMaxItemPerPage(),forceTableUpdateIndex:0,resizeObserver:null,showScrollbar:!1,tableContainer:null,deepSortsList:[],isInternalUpdate:!1,currentVisibleItems:0,scrollTimeout:null,stickyColumnsUpdateTimeout:null,normalizedItemsCache:new Map,deepSortCache:null,deepSortCacheKey:"",stickyColumnsAnimationFrame:null}},computed:{currentDisplayPagination(){let a=[];return this.totalPages<=1?a:(this.currentPage===1?a=[1,2,3]:this.currentPage===this.totalPages?a=[this.totalPages-2,this.totalPages-1,this.totalPages]:a=[this.currentPage-1,this.currentPage,this.currentPage+1],a.filter(o=>o>=1&&o<=this.totalPages))},items(){return this.tdItemsList?this.tdItemsList:[]},showItemsLinesNumber(){return this.showeditems.length},dateFilterBounds(){return!this.pickedDate||!this.pickedDate[0]||!this.pickedDate[1]?null:{deb:te(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:te(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?ye(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},visibleColumns(){return this.columns.filter(a=>a.show&&(!a.onlyOnEditMode||this.lineEditMode))},filtereditems(){var a,o;return this.items?this.items.filter(r=>{const c=this.filterBy(r,this.normalizedSearch);if(this.hasDateFilter){const m=this.columnNameDateFilter.some(u=>{const p=r[u];if(p){const g=te(p,"DD/MM/YYYY").unix();return g>=this.dateFilterBounds.deb&&g<=this.dateFilterBounds.fin}return!1});return c&&m}return c}):[]`${this.normalizedSearch}_${this.hasDateFilter}_${(a=this.dateFilterBounds)==null?void 0:a.deb}_${(o=this.dateFilterBounds)==null?void 0:o.fin}`},sortedItems(){if(!this.filtereditems)return[];if(!this.sortKey&&(!this.deepSorts||this.deepSortsList.length===0))return this.filtereditems;const a=this.columns.find(o=>o.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):a!=null&&a.customSort?rs([...this.filtereditems],this.sortAsc,a.customSort):a!=null&&a.formatter||a!=null&&a.type?rs([...this.filtereditems],this.sortAsc,(o,r,c)=>{const m=this.formatColumnValue(o,a),u=this.formatColumnValue(r,a);return je(m,u,c)}):this.sortKey?Qn([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const a=this.sortedItems;if(this.infiniteScroll)return a.slice(0,this.currentVisibleItems);if(this.maxItemsPerPage===-1)return a;const o=(this.currentPage-1)*this.maxItemsPerPage,r=this.currentPage*this.maxItemsPerPage;return a.slice(o,r)},tableMaxHeight(){if(!this.infiniteScroll)return"auto";const a=this.trHeightPx||60,o=50,r=this.maxItemPerPage;return`${o+r*a}px`},deepSortsListComputed(){return this.deepSortsList}},watch:{ckSelectedItems:{handler(a){a&&(this.selectedItems=a)},immediate:!0},dynamicColumns:{handler(a){a&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.columns=this.getColumnsById(a,this.defaultColumns),this.$nextTick(()=>{this.isInternalUpdate=!1}))},immediate:!0},columns:{handler(a){this.localStorageItemName!==null&&be(this.localStorageItemName,this.getRefactoColumns(a),"columns"),this.dynamicColumns&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.$emit("update:dynamicColumns",this.getRefactoColumns(a)),this.$nextTick(()=>{this.isInternalUpdate=!1})),this.forceTableUpdateIndex+=1}},headerEditMode:{handler(a){var o;if(a)this.maxItemsPerPage=3;else{const r=this.localStorageMaxItemPerPageName!==null?pe(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(o=pe(this.localStorageItemName))==null?void 0:o.maxItemPerPage:this.maxItemPerPage;this.maxItemsPerPage=r??this.maxItemPerPage}}},sortedItems:{handler(a){if(this.infiniteScroll){const o=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems===0?this.currentVisibleItems=Math.min(this.maxItemPerPage+o,a.length):this.currentVisibleItems=Math.min(this.currentVisibleItems,a.length)}this.infiniteScroll||(this.totalPages=this.newTotalPage(a.length))},immediate:!0},filtereditems:{handler(a,o){if(this.infiniteScroll&&o&&a.length!==o.length)if(a.length>o.length&&this.currentVisibleItems<a.length){const r=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+r,a.length)}else a.length<o.length&&this.currentVisibleItems>a.length&&(this.currentVisibleItems=Math.min(this.currentVisibleItems,a.length))},immediate:!1},maxItemPerPage:{handler(a){a!==this.maxItemsPerPage&&(this.maxItemsPerPage=a)},immediate:!0},maxItemsPerPage:{handler(a){if(!this.headerEditMode){if(this.localStorageItemName!==null&&be(this.localStorageItemName,a,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&be(this.localStorageMaxItemPerPageName,a),this.infiniteScroll){const o=this.infiniteScrollIncrement||a;this.currentVisibleItems=Math.min(a+o,this.sortedItems.length)}this.currentPage!==1&&!this.infiniteScroll&&(this.currentPage=1),this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length))}}},search:{handler(a,o){a!==o&&(this.normalizedItemsCache.clear(),this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()}),this.infiniteScroll&&this.$nextTick(()=>{const r=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+r,this.filtereditems.length)}))},immediate:!1},showeditems:{handler(a,o){a!==o&&(this.shouldAdjustPage(a)&&this.adjustPageAfterSearch(),a.length>0?this.checkAllCheckBox=a.every(r=>this.selectedItems.includes(r.id)):this.checkAllCheckBox=!1,this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length)),this.columns.some(r=>r.stickyLeft||r.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()}))},flush:"post"},deepSortsList:{handler(a){a&&a.length>0&&this.$emit("update:deepSortsListPreset",a),this.infiniteScroll&&this.currentVisibleItems>0&&this.$nextTick(()=>{const o=this.currentVisibleItems;this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},deep:!0},deepSortsListPreset:{handler(a){a&&a.length>0&&JSON.stringify(a)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=a.map(o=>{const r=this.columns.find(c=>c.id===o.id);return{...o,customSort:(r==null?void 0:r.customSort)||o.customSort||null}}))},deep:!0,immediate:!0},tdItemsList:{handler(a,o){a!==o&&this.columns.some(r=>r.stickyLeft||r.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()})},deep:!0,immediate:!1}},mounted(){var a;if(this.localStorageItemName!==null){as(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),Xn(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let o=pe(this.localStorageItemName);o&&(this.columns=this.getColumnsById(o.columns,this.defaultColumns),this.maxItemsPerPage=o.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let o=pe(this.localStorageMaxItemPerPageName);o&&(this.maxItemsPerPage=o)}if(this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.infiniteScroll){const o=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+o,this.filtereditems.length)}else this.totalPages=this.newTotalPage(this.filtereditems.length);if(this.initResizeObserver(),!this.deepSorts){const o=this.columns.find(r=>r.isSorted!==null&&r.isSorted!==void 0);o&&(this.sortKey=o.id,this.sortAsc=o.isSorted,this.currentHeaderSort=o)}this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset.map(o=>{const r=this.columns.find(c=>c.id===o.id);return{...o,customSort:(r==null?void 0:r.customSort)||o.customSort||null}})),this.stickyScrollbarHorizontal&&(this.checkTableOverflow(),window.addEventListener("resize",this.checkTableOverflow),window.addEventListener("scroll",this.handleTableScroll)),this.tableContainer=(a=this.$refs.table)==null?void 0:a.closest(".overflow-x-auto"),this.infiniteScroll&&this.$nextTick(()=>{this.$refs.scrollContainer})},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.stickyColumnsUpdateTimeout&&(clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=null),this.stickyColumnsAnimationFrame&&(cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=null),this.normalizedItemsCache.clear(),this.deepSortCache=null},methods:{moment:te,unixToDateString:mt,unixToDateTimeString:Xt,toCurrencyEUR:Qt,formatColumnValue(a,o){const r=a[o.id];if(o.formatter&&typeof o.formatter=="function")return o.formatter(r,a);if(o.type)switch(o.type){case"unixDate":return r?mt(r):"";case"unixDateTime":return r?Xt(r):"";case"currency":return r!=null?Qt(r):"";default:return r}return r},shouldAdjustPage(a){return a.length===0&&this.filtereditems.length>0&&this.currentPage>1&&!this.infiniteScroll},getRefactoColumns(a){return a.map(o=>({id:o.id,show:o.show}))},getColumnsById(a,o){return a.map(r=>({...o.find(c=>c.id===r.id),show:r.show}))},adjustPageAfterSearch(){if(this.filtereditems.length>0&&this.showeditems.length===0){const a=Math.ceil(this.filtereditems.length/this.maxItemsPerPage);a>0&&a!==this.currentPage&&(this.currentPage=a)}else this.filtereditems.length===0&&(this.currentPage=1)},initResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.updateStickyColumns()});const a=this.$refs.table;a&&this.resizeObserver.observe(a)},handleTableScroll(){this.tableContainer&&(Math.ceil(window.scrollY+window.innerHeight)>=this.tableContainer.scrollHeight?this.showScrollbar=!1:this.checkTableOverflow())},checkTableOverflow(){this.$nextTick(()=>{const a=document.querySelector(`#${this.tableId}-bottom-scrollbar`);if(this.tableContainer&&a){const o=this.tableContainer.scrollHeight,r=window.innerHeight;this.showScrollbar=o>r,this.showScrollbar&&(document.querySelector(`#${this.tableId}-bottom-scrollbar .scrollbar-content`).style.width=this.tableContainer.scrollWidth+"px",a.addEventListener("scroll",()=>{this.tableContainer.scrollLeft=a.scrollLeft}),this.tableContainer.addEventListener("scroll",()=>{a.scrollLeft=this.tableContainer.scrollLeft}))}})},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},updateStickyColumns(){!this.columns.some(a=>a.stickyLeft||a.stickyRight)||!document.getElementById(this.tableId)||(this.stickyColumnsAnimationFrame&&cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=requestAnimationFrame(()=>{const a=[];this.columns.forEach((c,m)=>{if(!c.stickyLeft&&!c.stickyRight)return;const u=document.getElementById(`${this.tableId}-${c.id}-th-${m}`);if(!u)return;const p=document.querySelectorAll(`#${this.tableId} [data-column-id="${c.id}"]`),g=u.getBoundingClientRect().width;let k=0;p.forEach(h=>{const N=h.getBoundingClientRect().width;N>k&&(k=N)}),a.push({column:c,thElement:u,tdElements:p,width:Math.max(k,g)-1})});let o=0,r=0;a.forEach(({column:c,thElement:m,tdElements:u,width:p})=>{if(c.stickyLeft){const g=`${o}px`;m.style.left=g,u.forEach(k=>{k.style.left=g}),o+=p}if(c.stickyRight){const g=`${r}px`;m.style.right=g,u.forEach(k=>{k.style.right=g}),r+=p}}),this.stickyColumnsAnimationFrame=null}))},newTotalPage(a){return Math.ceil(a/this.maxItemsPerPage)},lineStateClass(a){const o=this.lineStatesList.find(r=>r.state===a);return o?o.class:""},checkItem(a){const o=this.selectedItems.indexOf(a);if(o!==-1)this.selectedItems.splice(o,1),this.checkAllCheckBox=!1;else if(this.selectedItems.push(a),!this.checkAllCheckBox){const r=this.showeditems.map(c=>c.id);this.checkAllCheckBox=r.every(c=>this.selectedItems.includes(c))}this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const a=this.showeditems.map(o=>o.id);if(this.checkAllCheckBox)this.selectedItems=this.selectedItems.filter(o=>!a.includes(o)),this.checkAllCheckBox=!1;else{const o=new Set([...this.selectedItems,...a]);this.selectedItems=Array.from(o),this.checkAllCheckBox=!0}this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(a){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=null);const o=this.infiniteScroll?this.currentVisibleItems:null;this.updateSortitems(a.id),a.isSorted=this.sortAsc,this.currentHeaderSort=a,this.infiniteScroll&&o&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},checkMove(a){const o=this.columns.reduce((r,c,m)=>(c.fixed&&r.push(m),r),[]);return!o.includes(a.draggedContext.index)&&!o.includes(a.relatedContext.index)},filterBy(a,o){if(!o)return!0;const r=`${a.id}_${o}`;if(this.normalizedItemsCache.has(r))return this.normalizedItemsCache.get(r);const c=this.visibleColumns.some(m=>{if(m.customSearch&&typeof m.customSearch=="function")return m.customSearch(a,o);const u=a[m.id];if(m.type||m.formatter){const p=this.formatColumnValue(a,m);if(p&&ye(p.toString()).includes(o))return!0}return u&&ye(u.toString()).includes(o)});return this.normalizedItemsCache.size>1e3&&this.normalizedItemsCache.clear(),this.normalizedItemsCache.set(r,c),c},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return this.defaultColumns.map(a=>{const o={};for(const r in a)if(a.hasOwnProperty(r)){const c=a[r];typeof c=="function"||c===null||c===void 0?o[r]=c:Array.isArray(c)?o[r]=[...c]:typeof c=="object"?o[r]={...c}:o[r]=c}return o})},getTableContent(){return this.items},getColumns(){return this.columns},getNbLines(){return this.showeditems.length},updateSortitems(a){this.items&&(this.sortKey===a?this.sortAsc=!this.sortAsc:(this.sortAsc=!0,this.sortKey=a))},selectSubject(a){this.$emit("changeSubject",a)},saveTablePreferences(){this.localStorageItemName!==null&&be(this.localStorageItemName,this.getRefactoColumns(this.columns),"columns"),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.headerEditMode=!1,this.currentPage=this.previousCurrentPage},resetTablePreferences(){this.columns=this.copyDefaultColumns(),this.localStorageItemName!==null&&as(this.localStorageItemName,this.getRefactoColumns(this.columns)),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.currentPage=this.previousCurrentPage},editTablePreferences(){this.headerEditMode=!0,this.previousCurrentPage=this.currentPage,this.currentPage=1},addDeepSort(a){const o=this.infiniteScroll?this.currentVisibleItems:null;this.deepSortCache=null,this.deepSortCacheKey="",this.deepSortsList.push({id:a.id,libelle:a.libelle,asc:!0,customSort:a.customSort||null}),this.infiniteScroll&&o&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(o,this.sortedItems.length)})},toggleDeepSortDirection(a){this.deepSortCache=null,this.deepSortCacheKey="",a.asc=!a.asc},deepSortsColumnList(a,o){if(!a||a.length===0)return o;const r=JSON.stringify(a.map(c=>({id:c.id,asc:c.asc})));return this.deepSortCache&&this.deepSortCacheKey===r?o.sort((c,m)=>{for(const u of a){let p;if(u.customSort)p=u.customSort(c,m,u.asc);else{const g=c[u.id],k=m[u.id];p=je(g,k,u.asc)}if(p!==0)return p}return 0}):(this.deepSortCacheKey=r,this.deepSortCache=!0,o.sort((c,m)=>{for(const u of a){let p;if(u.customSort)p=u.customSort(c,m,u.asc);else{const g=c[u.id],k=m[u.id];p=je(g,k,u.asc)}if(p!==0)return p}return 0}))},handleScrollEvent(a){if(this.infiniteScroll){if(this.scrollTimeout)return;this.scrollTimeout=setTimeout(()=>{this.handleInfiniteScroll(a),this.scrollTimeout=null},50)}},handleInfiniteScroll(a){const{target:o}=a;if(o.scrollTop+o.clientHeight>=o.scrollHeight-10&&this.currentVisibleItems<this.sortedItems.length){const r=this.infiniteScrollIncrement||this.maxItemPerPage,c=Math.min(this.currentVisibleItems+r,this.sortedItems.length);c>this.currentVisibleItems&&(this.currentVisibleItems=c)}},handleContextMenu(a,o){let r=null;const c=a.target.closest("td");if(c){const m=c.getAttribute("data-column-id");m&&(r=this.columns.find(u=>u.id===m))}this.$emit("contextmenu",{event:a,item:o,column:r})},refreshStickyColumns(){this.columns.some(a=>a.stickyLeft||a.stickyRight)&&this.$nextTick(()=>{this.updateStickyColumns()})},debouncedUpdateStickyColumns(){this.stickyColumnsUpdateTimeout&&clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=setTimeout(()=>{this.updateStickyColumns(),this.stickyColumnsUpdateTimeout=null},50)}}},si={key:0,class:"mb-3 text-center"},ni={key:1,class:"row mb-1 mx-auto"},ii={key:0,class:"btn btn-sm btn-outline-secondary cursor-default align-self-center bg-transparent text-secondary border-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1",style:{height:"20px"}},ri={class:"text-nowrap"},ai={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},oi={key:0,class:"text-nowrap",style:{height:"20px"}},li=["value"],di={key:1,class:"d-flex align-items-center text-nowrap"},ci={key:0,class:"d-flex ms-2"},ui={class:"row mx-auto mb-3 rounded-0"},mi=["id"],hi=["id"],fi=["id","onDragstart","onDragend"],gi={class:"d-flex flex-column align-items-center"},yi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},pi={class:"d-inline-flex text-nowrap"},ki={key:0,class:"ms-2 float-end"},_i={key:1,class:"ms-2"},Si={key:1},bi=["id"],wi=["id"],Ci={class:"d-inline-flex text-nowrap"},xi={key:1,class:"ms-2 hoverable"},Mi={key:0},Di=["colspan"],Pi=["id"],Ni=["onClick","onContextmenu"],Bi=["data-column-id","onClick"],Ti=["id","value"],Ei=["data-column-id"],Vi={class:"row ms-auto mb-2"},Yi={class:"m-0 pagination pagination-sm"},Ii={class:"page-item hoverable"},Oi={class:"page-item hoverable"},Li=["onClick"],Ai={class:"page-item hoverable"},Fi={class:"page-item hoverable"},zi=["id"];function Ri(a,o,r,c,m,u){var p;const g=n.resolveComponent("font-awesome-icon"),k=n.resolveComponent("vue-draggable-next");return n.openBlock(),n.createElementBlock(n.Fragment,null,[r.lineEditMode?(n.openBlock(),n.createElementBlock("div",si,[n.createElementVNode("button",{type:"button",class:"btn btn-success rounded-5 m-0 p-0",style:{height:"45px",width:"45px"},onClick:o[0]||(o[0]=h=>a.$emit("lineEditModeAddNewLine"))},[n.createVNode(g,{icon:"fa-solid fa-plus",size:"xl"})])])):n.createCommentVNode("",!0),r.showLineNumber||r.showModifyColumnsBtn||r.showMaxItemPerPageBtn||r.deepSorts?(n.openBlock(),n.createElementBlock("div",ni,[n.createElementVNode("div",{class:n.normalizeClass(["d-flex justify-content-start p-0",r.deepSorts&&m.deepSortsList.length>0&&r.showModifyColumnsBtn?"col-12 col-sm-8 col-lg-9 col-xl-10":"col"])},[r.showLineNumber?(n.openBlock(),n.createElementBlock("div",ii,[n.createElementVNode("b",ri,n.toDisplayString(u.showItemsLinesNumber+" / "+u.filtereditems.length),1),o[20]||(o[20]=n.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):n.createCommentVNode("",!0),r.deepSorts&&m.deepSortsList.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":r.showLineNumber}])},[o[21]||(o[21]=n.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),n.createVNode(k,{modelValue:m.deepSortsList,"onUpdate:modelValue":o[1]||(o[1]=h=>m.deepSortsList=h),tag:"div",group:"deepSorts",class:"d-flex flex-wrap","ghost-class":"deep-filter-ghost-class"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.deepSortsList,(h,N)=>(n.openBlock(),n.createElementBlock("div",{key:h.id,class:"d-flex align-items-center border border-secondary hoverable-grab text-secondary rounded-1 fs-7 px-2 py-0 me-2 mb-1 mb-lg-0",style:{height:"20px"}},[n.createVNode(g,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:_=>m.deepSortsList.splice(N,1)},null,8,["onClick"]),n.createElementVNode("div",ai,[n.createElementVNode("span",null,n.toDisplayString(h.libelle),1)]),n.createVNode(g,{class:"hoverable",icon:h.asc?"fa-solid fa-arrow-down-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:_=>u.toggleDeepSortDirection(h)},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):n.createCommentVNode("",!0)],2),r.showMaxItemPerPageBtn||r.showModifyColumnsBtn?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["d-flex align-items-center justify-content-end p-0",r.deepSorts&&m.deepSortsList.length>0?"col-12 col-sm-4 col-lg-3 col-xl-2 mt-1 mt-sm-0":"col"])},[r.showMaxItemPerPageBtn&&!m.headerEditMode?(n.openBlock(),n.createElementBlock("div",oi,[r.maxItemPerPageList.length>0?n.withDirectives((n.openBlock(),n.createElementBlock("select",{key:0,"onUpdate:modelValue":o[2]||(o[2]=h=>m.maxItemsPerPage=h),class:"form-select d-flex justify-content-center align-items-center ms-auto py-0 rounded-3 select-max-item-per-page"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.maxItemPerPageList,h=>(n.openBlock(),n.createElementBlock("option",{key:h.value,value:h.value},n.toDisplayString(h.text),9,li))),128))],512)),[[n.vModelSelect,m.maxItemsPerPage]]):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),r.showModifyColumnsBtn?(n.openBlock(),n.createElementBlock("div",di,[m.headerEditMode?(n.openBlock(),n.createElementBlock("div",ci,[n.createElementVNode("button",{id:"btn-save-table",class:"btn btn-sm btn-success d-flex justify-content-center align-items-center ms-auto me-2 px-2 py-0 rounded-3",type:"button",onClick:o[3]||(o[3]=(...h)=>u.saveTablePreferences&&u.saveTablePreferences(...h))}," Sauvegarder "),n.createElementVNode("button",{id:"btn-reset-table",class:"btn btn-sm btn-outline-danger d-flex justify-content-center align-items-center px-2 py-0 rounded-3",type:"button",onClick:o[4]||(o[4]=(...h)=>u.resetTablePreferences&&u.resetTablePreferences(...h))}," Réinitialiser le tableau ")])):(n.openBlock(),n.createElementBlock("button",{key:1,id:"btn-edit-table",class:"btn btn-sm btn-outline-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-3 ms-2",style:{height:"20px"},type:"button",onClick:o[5]||(o[5]=(...h)=>u.editTablePreferences&&u.editTablePreferences(...h))}," Modifier colonnes "))])):n.createCommentVNode("",!0)],2)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",ui,[n.createElementVNode("div",{ref:"scrollContainer",class:n.normalizeClass(["col-12 p-0 overflow-x-auto mb-2",{border:r.infiniteScroll,"infinite-scroll-container":r.infiniteScroll}]),style:n.normalizeStyle(r.infiniteScroll?{maxHeight:u.tableMaxHeight,overflowY:"auto",borderRadius:"10px"}:{borderRadius:"10px !important"}),onScroll:o[15]||(o[15]=(...h)=>u.handleScrollEvent&&u.handleScrollEvent(...h))},[(n.openBlock(),n.createElementBlock("table",{id:r.tableId,ref:"table",key:m.forceTableUpdateIndex,class:n.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative m-0",[r.border?"table-bordered":"table-borderless",r.tableSm?"table-sm":""]]),style:n.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:r.border?"":"1px solid #ddd",borderRight:r.border?"":"1px solid #ddd"}])},[n.createElementVNode("thead",null,[m.headerEditMode?(n.openBlock(),n.createBlock(k,{key:0,modelValue:m.columns,"onUpdate:modelValue":o[9]||(o[9]=h=>m.columns=h),"ghost-class":r.ghostClass,"drag-class":r.ghostClass,tag:"tr",move:u.checkMove,group:"columns"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,(h,N)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:h.id},[h.id==="checkBox"?(n.openBlock(),n.createElementBlock("th",{key:0,id:`${r.tableId}-${h.id}-th-${N}`,class:n.normalizeClass(["text-center",[r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:o[8]||(o[8]=n.withModifiers((..._)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(..._),["stop"]))},[n.withDirectives(n.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":o[6]||(o[6]=_=>m.checkAllCheckBox=_),class:"form-check-input",type:"checkbox",onClick:o[7]||(o[7]=n.withModifiers((..._)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(..._),["stop"]))},null,512),[[n.vModelCheckbox,m.checkAllCheckBox]])],10,hi)):(h.show||m.headerEditMode)&&(!h.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("th",{key:1,id:`${r.tableId}-${h.id}-th-${N}`,scope:"col",class:n.normalizeClass(["text-center",[h.isDragging?"hoverable-grabbing":r.headerBgColor+" hoverable-grab",h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.headerTextColor,r.infiniteScroll?"sticky-top":"",{"table-danger":!h.show}]]),onDragstart:_=>h.isDragging=!0,onDragend:_=>h.isDragging=!1},[n.createElementVNode("div",gi,[m.headerEditMode&&!h.keepShow?(n.openBlock(),n.createElementBlock("div",yi,[h.show?(n.openBlock(),n.createBlock(g,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:_=>h.show=!1},null,8,["onClick"])):(n.openBlock(),n.createBlock(g,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:_=>h.show=!0},null,8,["onClick"]))])):n.createCommentVNode("",!0),n.createElementVNode("div",pi,[n.renderSlot(a.$slots,"tableHeaderTh",{header:h},void 0,!0),h.isSortable&&!r.deepSorts?(n.openBlock(),n.createElementBlock("div",ki,[n.createVNode(g,{icon:m.sortKey!==h.id||m.sortKey===h.id&&!m.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",class:"hoverable",onClick:_=>u.updateCurrentSort(h)},null,8,["icon","onClick"])])):r.deepSorts&&!m.deepSortsList.some(_=>_.id===h.id)&&h.isSortable?(n.openBlock(),n.createElementBlock("div",_i,[n.createVNode(g,{icon:"fa-solid fa-filter",onClick:_=>u.addDeepSort(h)},null,8,["onClick"])])):n.createCommentVNode("",!0)])])],42,fi)):n.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(n.openBlock(),n.createElementBlock("tr",Si,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,(h,N)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:h.id},[h.id==="checkBox"?(n.openBlock(),n.createElementBlock("th",{key:0,id:`${r.tableId}-${h.id}-th-${N}`,class:n.normalizeClass(["text-center",[r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:o[12]||(o[12]=n.withModifiers((..._)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(..._),["stop"]))},[n.withDirectives(n.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":o[10]||(o[10]=_=>m.checkAllCheckBox=_),class:"form-check-input",type:"checkbox",onClick:o[11]||(o[11]=n.withModifiers((..._)=>u.toggleAllCheckBox&&u.toggleAllCheckBox(..._),["stop"]))},null,512),[[n.vModelCheckbox,m.checkAllCheckBox]])],10,bi)):h.show&&(!h.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("th",{key:1,id:`${r.tableId}-${h.id}-th-${N}`,scope:"col",class:n.normalizeClass(["text-center",[h.isDragging?"":r.headerBgColor,h.stickyLeft?"sticky-column-left":"",h.stickyRight?"sticky-column-right":"",r.headerTextColor,r.infiniteScroll?"sticky-top":""]])},[n.createElementVNode("div",Ci,[n.renderSlot(a.$slots,"tableHeaderTh",{header:h},void 0,!0),h.isSortable&&!r.deepSorts?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["ms-2 float-end hoverable",{"opacity-50":m.sortKey!==h.id}])},[n.createVNode(g,{icon:m.sortKey!==h.id||m.sortKey===h.id&&!m.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",onClick:_=>u.updateCurrentSort(h)},null,8,["icon","onClick"])],2)):r.deepSorts&&!m.deepSortsList.some(_=>_.id===h.id)&&h.isSortable?(n.openBlock(),n.createElementBlock("div",xi,[n.createVNode(g,{icon:"fa-solid fa-filter",onClick:_=>u.addDeepSort(h)},null,8,["onClick"])])):n.createCommentVNode("",!0)])],10,wi)):n.createCommentVNode("",!0)],64))),128))]))]),n.createElementVNode("tbody",null,[((p=u.showeditems)==null?void 0:p.length)===0?(n.openBlock(),n.createElementBlock("tr",Mi,[n.createElementVNode("th",{colspan:m.columns.length,class:"text-center",style:{"border-top-left-radius":"0px !important","border-top-right-radius":"0px !important"}},[n.createElementVNode("span",{id:`${r.tableId}-no-value`,class:"text-danger fs-5"},n.toDisplayString(r.noValueText),9,Pi)],8,Di)])):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(u.showeditems,(h,N)=>(n.openBlock(),n.createElementBlock("tr",{key:h.id,class:n.normalizeClass([{hoverable:r.clickable&&!m.headerEditMode,"hoverable-no-drop":r.clickable&&m.headerEditMode},r.trFontSize]),style:n.normalizeStyle({height:r.trHeightPx+"px"}),onClick:_=>r.clickable&&!m.headerEditMode?u.selectSubject(h):null,onContextmenu:_=>u.handleContextMenu(_,h)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.columns,_=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:_.id},[_.id==="checkBox"?(n.openBlock(),n.createElementBlock("td",{key:0,"data-column-id":_.id,class:n.normalizeClass(["text-center",[r.tdClass,h.lineState?u.lineStateClass(h.lineState):"",_.stickyLeft?"sticky-column-left":"",_.stickyRight?"sticky-column-right":""]]),onClick:n.withModifiers(z=>u.checkItem(h.id),["stop"])},[n.withDirectives(n.createElementVNode("input",{id:`${r.tableId}-checkbox-${N}`,"onUpdate:modelValue":o[13]||(o[13]=z=>m.selectedItems=z),type:"checkbox",class:"form-check-input hoverable",value:h.id,onClick:o[14]||(o[14]=n.withModifiers(()=>{},["stop"]))},null,8,Ti),[[n.vModelCheckbox,m.selectedItems]])],10,Bi)):(_.show||m.headerEditMode)&&(!_.onlyOnEditMode||r.lineEditMode)?(n.openBlock(),n.createElementBlock("td",{key:1,"data-column-id":_.id,class:n.normalizeClass([[r.tdClass,_.show?"":"table-danger",!r.deepSorts&&_.isSorted!==null&&_.isSorted!==void 0?"bg-gray-200":"",h.lineState?u.lineStateClass(h.lineState):"",_.stickyLeft?"sticky-column-left":"",_.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[n.renderSlot(a.$slots,"tableBodyTd",{header:_,item:h,formattedValue:u.formatColumnValue(h,_)},()=>[n.createTextVNode(n.toDisplayString(u.formatColumnValue(h,_)),1)],!0)],10,Ei)):n.createCommentVNode("",!0)],64))),128))],46,Ni))),128))])],14,mi))],38)]),n.createElementVNode("div",Vi,[!r.infiniteScroll&&m.totalPages&&m.totalPages>1?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["col p-0 me-3 d-flex",{"justify-content-center":r.paginationPosition==="center","justify-content-end":r.paginationPosition==="right","justify-content-start":r.paginationPosition==="left"}])},[n.createElementVNode("ul",Yi,[n.createElementVNode("li",Ii,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===1}]),onClick:o[16]||(o[16]=h=>m.currentPage=1)}," « ",2)]),n.createElementVNode("li",Oi,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===1}]),onClick:o[17]||(o[17]=h=>m.currentPage-=1)}," < ",2)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.currentDisplayPagination,h=>(n.openBlock(),n.createElementBlock("li",{key:h,class:n.normalizeClass(["page-item hoverable",{active:m.currentPage===h}])},[n.createElementVNode("a",{class:"page-link",onClick:N=>m.currentPage=h},n.toDisplayString(h),9,Li)],2))),128)),n.createElementVNode("li",Ai,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===m.totalPages}]),onClick:o[18]||(o[18]=h=>m.currentPage+=1)}," > ",2)]),n.createElementVNode("li",Fi,[n.createElementVNode("a",{class:n.normalizeClass(["page-link",{disabled:m.currentPage===m.totalPages}]),onClick:o[19]||(o[19]=h=>m.currentPage=m.totalPages)}," » ",2)])])],2)):n.createCommentVNode("",!0),r.stickyScrollbarHorizontal?(n.openBlock(),n.createElementBlock("div",{key:1,id:`${r.tableId}-bottom-scrollbar`,class:n.normalizeClass(["bottom-scrollbar",{visible:m.showScrollbar}])},[...o[22]||(o[22]=[n.createElementVNode("div",{class:"scrollbar-content"},null,-1)])],10,zi)):n.createCommentVNode("",!0)])],64)}const ji=ei(ti,[["render",Ri],["__scopeId","data-v-f3204e33"]]);me.library.add(T.faAnglesLeft,T.faAngleLeft,T.faAngleRight,T.faAnglesRight);const Hi={name:"AmsomPagination",components:{FontAwesomeIcon:W.FontAwesomeIcon},props:{modelValue:{type:Number,required:!0},totalPages:{type:Number,required:!0},totalDisplayPages:{type:Number,default:5}},emits:["update:modelValue"],methods:{goNextPage(){this.goToPage(this.modelValue+1)},goPreviousPage(){this.goToPage(this.modelValue-1)},goFirstPage(){this.goToPage(1)},goLastPage(){this.goToPage(this.totalPages)},goToPage(a){this.$emit("update:modelValue",a)}},computed:{toDisplayPagination(){let a=[];if(this.totalPages<=this.totalDisplayPages)a=this.totalPages;else{let o,r;this.totalDisplayPages%2===0?(o=this.modelValue-Math.floor(this.totalDisplayPages/2)+1,r=this.modelValue+Math.floor(this.totalDisplayPages/2)):(o=this.modelValue-Math.floor(this.totalDisplayPages/2),r=this.modelValue+Math.floor(this.totalDisplayPages/2)),o<1&&(o=1,r=this.totalDisplayPages),r>this.totalPages&&(r=this.totalPages,o=this.totalPages-this.totalDisplayPages+1);for(let c=o;c<=r;c++)a.push(c)}return a}}},Wi={key:0,class:"w-100 user-select-none"},Ui={class:"pagination pagination mb-0"},vi={class:"page-item"},qi={class:"page-item"},Gi=["onClick"],$i={class:"page-item"},Zi={class:"page-item"};function Ki(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon");return r.totalPages&&r.totalPages>1?(n.openBlock(),n.createElementBlock("div",Wi,[n.createElementVNode("ul",Ui,[n.createElementVNode("li",vi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===1}]),onClick:o[0]||(o[0]=(...g)=>u.goFirstPage&&u.goFirstPage(...g))},[n.createVNode(p,{icon:"fa-angles-left"})],2)]),n.createElementVNode("li",qi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===1}]),onClick:o[1]||(o[1]=(...g)=>u.goPreviousPage&&u.goPreviousPage(...g))},[n.createVNode(p,{icon:"fa-angle-left"})],2)]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.toDisplayPagination,g=>(n.openBlock(),n.createElementBlock("li",{key:g,class:n.normalizeClass(["page-item",{active:r.modelValue===g}])},[n.createElementVNode("span",{role:"button",class:"page-link",onClick:k=>u.goToPage(g)},n.toDisplayString(g),9,Gi)],2))),128)),n.createElementVNode("li",$i,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===r.totalPages}]),onClick:o[2]||(o[2]=(...g)=>u.goNextPage&&u.goNextPage(...g))},[n.createVNode(p,{icon:"fa-angle-right"})],2)]),n.createElementVNode("li",Zi,[n.createElementVNode("span",{role:"button",class:n.normalizeClass(["page-link",{disabled:r.modelValue===r.totalPages}]),onClick:o[3]||(o[3]=(...g)=>u.goLastPage&&u.goLastPage(...g))},[n.createVNode(p,{icon:"fa-angles-right"})],2)])])])):n.createCommentVNode("",!0)}const Ji=K(Hi,[["render",Ki]]),Qi={name:"AmsomSkeleton",props:{config:{type:Array,default:()=>[8,10,12]},rowClass:{type:String,default:""},loaderClass:{type:String,default:"text-gray rounded-2"}}};function Xi(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["container row placeholder-wave",r.rowClass])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.config,(p,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(["placeholder mt-1",[r.loaderClass,"col-"+p]])},null,2))),128))],2)}const os=K(Qi,[["render",Xi]]);me.library.add(T.faCloudArrowDown,T.faEye);const er={name:"AmsomDocumentList",components:{AmsomSkeleton:os,AmsomOverlay:ct,AmsomCard:vt,FontAwesomeIcon:W.FontAwesomeIcon},props:{title:{type:String,default:"Mes documents"},loading:{type:Boolean,default:!1},documentList:{type:Array,required:!0,validator:a=>a.every(o=>o.categorie&&o.dateFichier)},anonym:{type:Boolean,default:!1},getDocumentBlob:{type:Function,required:!0},clickAction:{type:String,default:"download",validator:a=>["download","view"].includes(a)}},data(){return{processing:!1}},methods:{unixToDateString:rn.unixToDateString,handleClick(a,o){this.clickAction==="download"?this.downloadFile(a,o):this.viewFile(a)},async downloadFile(a,o){this.processing=!0;let r=this.anonym?"Document "+(o+1):(a==null?void 0:a.titre)??"Document",c=await this.getDocumentBlob(a);j.downloadBlob(c,r),this.processing=!1},async viewFile(a){this.processing=!0;let o=await this.getDocumentBlob(a);j.openFileBlob(o),this.processing=!1}}},tr={key:0},sr={class:"d-flex justify-content-between text-primary"},nr={class:"mb-0"},ir={class:"mb-0"},rr=["onClick"],ar={role:"button",class:"d-flex justify-content-between align-items-center p-2 px-3 text-secondary"},or={key:0},lr={key:1};function dr(a,o,r,c,m,u){const p=n.resolveComponent("amsom-skeleton"),g=n.resolveComponent("font-awesome-icon"),k=n.resolveComponent("amsom-card"),h=n.resolveComponent("amsom-overlay");return n.openBlock(),n.createBlock(h,{loading:m.processing},{default:n.withCtx(()=>[n.createVNode(k,null,{default:n.withCtx(()=>{var N;return[n.createElementVNode("h5",null,n.toDisplayString(r.title),1),r.loading?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(p,{config:[3,3],"row-class":"justify-content-between"}),n.createVNode(p,{config:[12]})],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[(N=r.documentList)!=null&&N.length?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(r.documentList,(_,z)=>(n.openBlock(),n.createElementBlock("div",{key:z,class:"document-item pt-2"},[n.createElementVNode("div",sr,[n.createElementVNode("p",nr,n.toDisplayString(_.categorie),1),n.createElementVNode("p",ir,n.toDisplayString(u.unixToDateString(_.dateFichier)),1)]),n.createElementVNode("div",{class:"bg-primary bg-opacity-25 mt-0 rounded-3",onClick:se=>u.handleClick(_,z)},[n.createElementVNode("div",ar,[r.anonym?(n.openBlock(),n.createElementBlock("strong",lr,"Document "+n.toDisplayString(z+1),1)):(n.openBlock(),n.createElementBlock("strong",or,n.toDisplayString(_.titre),1)),r.clickAction==="download"?(n.openBlock(),n.createBlock(g,{key:2,icon:"fa-solid fa-cloud-arrow-down"})):r.clickAction==="view"?(n.openBlock(),n.createBlock(g,{key:3,icon:"fa-solid fa-eye"})):n.createCommentVNode("",!0)])],8,rr)]))),128)):(n.openBlock(),n.createElementBlock("div",tr,[...o[0]||(o[0]=[n.createElementVNode("p",null,"Aucun document",-1)])]))],64))]}),_:1})]),_:1},8,["loading"])}const cr=K(er,[["render",dr]]);me.library.add(T.faTriangleExclamation,T.faEye,T.faEyeSlash,T.faCloudArrowUp,T.faPaperclip,T.faFileCirclePlus);const ur=window.File_native??window.File,mr={name:"AmsomUploadFile",components:{FontAwesomeIcon:W.FontAwesomeIcon,AmsomOverlay:ct},props:["name","pjName","fileName","subText","title","required","label","modelValue","gedFile","readStatus","readOnly","rejectStatus","clickFileHandler"],data(){return{fileToUpload:[],fileLoading:!1,finalFile:null,fileDragged:!1}},computed:{},watch:{gedFile:function(){this.handleGedFile()},fileName:function(a){this.finalFile!==null&&(this.finalFile.name=a,this.emitFile())}},mounted(){var a;(a=this.modelValue)!=null&&a.file?this.finalFile=this.modelValue:this.gedFile&&this.handleGedFile()},methods:{clickAddPj(){document.getElementById("fileUpload-"+this.name).click()},handleGedFile(){this.fileToUpload=[this.gedFile],this.uploadImage()},async addPj(a){this.fileDragged=!1;const o=a.dataTransfer?[...a.dataTransfer.files]:[...a.target.files];let r=!0;for(let c of o)if(!await j.isImage(c)&&!await j.isPdf(c)){r=!1;break}if(!r){alert("Les documents doivent être de type PDF et/ou des images"),document.getElementById("input-pj-"+this.name).value=null;return}this.fileToUpload.push(...o),this.uploadImage()},clickFile(a){this.clickFileHandler?this.clickFileHandler(a):this.openFile(a)},openFile(a){if(!a){alert("Aucun fichier");return}j.openFileBase64(a)},async uploadImage(){this.$emit("fileLoading",!0),this.fileLoading=!0;let a=new an,o=this.fileToUpload;for(let u of o)if(await j.isImage(u)){let p=await j.resizeImage({file:u,maxWidth:795,maxHeigth:1125}),g=j.imageToPDF(p);await a.add(g)}else await a.add(u);let r=await a.saveAsBlob(),c=new ur([r],"doc.pdf",{type:"application/pdf"}),m=await j.handleFile(c,"pdf");m.name=this.fileName,this.finalFile=m,this.emitFile(),this.$emit("fileLoading",!1),this.fileLoading=!1},emitFile(){this.$emit("update:modelValue",this.finalFile)},deletePj(){this.finalFile=null,this.emitFile(),this.$emit("deleteFile"),this.fileToUpload=[]}}},hr={class:"position-relative"},fr=["id"],gr=["id","for"],yr={class:""},pr={class:"flex-grow-1"},kr={class:"fs-6 fw-bold"},_r={class:"text-primary form-text fst-italic",style:{"font-size":"smaller"}},Sr=["id","required","name"],br={key:1,class:"w-100"},wr={key:0,class:"text-decoration-underline"},Cr={class:"p-2 d-flex align-items-center"},xr={key:3,class:"text-muted"},Mr={key:0,class:"me-2"},Dr=["id"],Pr=["id"],Nr={key:1},Br=["id"];function Tr(a,o,r,c,m,u){const p=n.resolveComponent("font-awesome-icon"),g=n.resolveComponent("amsom-overlay");return n.openBlock(),n.createBlock(g,{loading:m.fileLoading},{default:n.withCtx(()=>{var k;return[n.createElementVNode("div",hr,[(k=m.finalFile)!=null&&k.file?(n.openBlock(),n.createElementBlock("div",br,[r.title?(n.openBlock(),n.createElementBlock("h5",wr,n.toDisplayString(r.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",Cr,[n.createElementVNode("div",{role:"button",class:"hoverable flex-grow-1",onClick:o[8]||(o[8]=h=>u.clickFile(m.finalFile.file))},[r.rejectStatus?(n.openBlock(),n.createBlock(p,{key:0,icon:"fa-solid fa-exclamation-triangle",class:"text-danger me-1"})):n.createCommentVNode("",!0),r.readStatus==="read"?(n.openBlock(),n.createBlock(p,{key:1,icon:"fa-solid fa-eye",class:"text-amsom-green me-1"})):n.createCommentVNode("",!0),r.readStatus==="unread"?(n.openBlock(),n.createBlock(p,{key:2,icon:"fa-solid fa-eye-slash",class:"text-warning me-1"})):n.createCommentVNode("",!0),n.createVNode(p,{icon:"fa-solid fa-solid fa-paperclip"}),n.createTextVNode(" "+n.toDisplayString(r.pjName),1),m.fileToUpload.length>1?(n.openBlock(),n.createElementBlock("small",xr," ("+n.toDisplayString(m.fileToUpload.length)+" Fichiers)",1)):n.createCommentVNode("",!0)]),r.readOnly?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",Mr,[n.createElementVNode("input",{id:"fileUpload-"+r.name,type:"file",style:{opacity:"0",position:"absolute",top:"0","z-index":"-1"},accept:"image/png, image/jpeg, application/pdf",hidden:"",multiple:"",onChange:o[9]||(o[9]=(...h)=>u.addPj&&u.addPj(...h))},null,40,Dr),n.createElementVNode("button",{id:"add-field-"+r.name,type:"button",class:"btn btn-primary rounded-5 fs-7 py-0 me-1",onClick:o[10]||(o[10]=(...h)=>u.clickAddPj&&u.clickAddPj(...h))},[n.createVNode(p,{icon:"fa-solid fa-file-circle-plus",class:"me-1"}),o[14]||(o[14]=n.createElementVNode("span",null,[n.createTextVNode(" Ajouter"),n.createElementVNode("span",{class:"d-none d-md-block"}," un document")],-1))],8,Pr)],512)),[[n.vShow,m.fileToUpload.length>0]]),r.readOnly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Nr,[n.createElementVNode("button",{id:"delete-all-pj-"+r.name,type:"button",class:"btn btn-link text-danger hoverable text-decoration-underline p-0",onClick:o[11]||(o[11]=(...h)=>u.deletePj&&u.deletePj(...h))}," Supprimer ",8,Br)]))])])):(n.openBlock(),n.createElementBlock("div",{key:0,id:"input-group-pj-"+r.name,role:"group"},[n.createElementVNode("label",{id:"label-pj-"+r.name,for:"input-pj-"+r.name,role:"button",class:n.normalizeClass(["m-0 px-1 py-2 d-block text-center text-secondary rounded-4 border-2 pj-label",{"border border-solid shadow":m.fileDragged}]),style:{"border-color":"var(--bs-gray-400)","border-style":"dashed"},onDrop:o[1]||(o[1]=n.withModifiers((...h)=>u.addPj&&u.addPj(...h),["prevent","stop"])),onDrag:o[2]||(o[2]=n.withModifiers(()=>{},["prevent","stop"])),onDragstart:o[3]||(o[3]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragend:o[4]||(o[4]=n.withModifiers(h=>m.fileDragged=!1,["prevent","stop"])),onDragover:o[5]||(o[5]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragenter:o[6]||(o[6]=n.withModifiers(h=>m.fileDragged=!0,["prevent","stop"])),onDragleave:o[7]||(o[7]=n.withModifiers(h=>m.fileDragged=!1,["prevent","stop"]))},[n.createElementVNode("div",yr,[n.createVNode(p,{icon:["fas","cloud-arrow-up"],size:"3x","beat-fade":m.fileDragged},null,8,["beat-fade"])]),n.createElementVNode("div",pr,[n.createElementVNode("div",kr,n.toDisplayString(r.label??r.pjName),1),n.createElementVNode("small",_r,n.toDisplayString(r.subText),1),o[12]||(o[12]=n.createElementVNode("hr",{class:"mx-auto w-50 m-0 mb-1"},null,-1)),o[13]||(o[13]=n.createElementVNode("small",{class:"d-block text-muted",style:{"font-size":"0.8em"}},[n.createElementVNode("u",null,"Glissez"),n.createTextVNode(" vos fichiers ici ou "),n.createElementVNode("u",null,"cliquez"),n.createTextVNode(" pour les sélectionner ")],-1))]),n.createElementVNode("input",{id:"input-pj-"+r.name,class:"form-control",type:"file",style:{opacity:"0",position:"absolute",top:"0","z-index":"-1"},accept:"image/png, image/jpeg, application/pdf",multiple:"",required:r.required,name:"pj"+r.name,onChange:o[0]||(o[0]=(...h)=>u.addPj&&u.addPj(...h))},null,40,Sr)],42,gr)],8,fr))])]}),_:1},8,["loading"])}const Er=K(mr,[["render",Tr]]),Vr={name:"SliderSwitch",props:{listSection:{type:Array,default:()=>[{id:1,name:"Slider 1"},{id:2,name:"Slider 2"},{id:3,name:"Slider 3"}]},containerClass:{type:String,default:"bg-secondary-subtle"},itemClass:{type:String,default:"fs-6"},bubbleClass:{type:String,default:"bg-light"},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],mounted(){this.updateSliderPosition(),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize)},methods:{updateSliderPosition(){this.$nextTick(()=>{const a=this.$el.querySelector(`#switch-section-${this.modelValue}`);if(!a){const r=this.$el.querySelector("#switch-section-1");if(!r)return;const c=this.$el.querySelector(".slider");if(!c)return;c.style.width=`${r.offsetWidth}px`,c.style.height=`${r.offsetHeight}px`,c.style.left=`${r.offsetLeft}px`;return}const o=this.$el.querySelector(".slider");o&&(o.style.width=`${a.offsetWidth}px`,o.style.height=`${a.offsetHeight}px`,o.style.left=`${a.offsetLeft}px`)})},handleResize(){this.updateSliderPosition()},switchSection(a){if(this.disabled)return;this.$emit("update:modelValue",a);const o=this.$el.querySelector(".slider"),r=this.$el.querySelector(`#switch-section-${a}`);o.style.width=r.clientWidth+"px",o.style.left=r.offsetLeft+"px"}}},Yr={class:"d-flex align-items-center justify-content-center mb-2 w-100 p-0",style:{"border-radius":"1em"}},Ir=["id","onClick"];function Or(a,o,r,c,m,u){return n.openBlock(),n.createElementBlock("div",Yr,[n.createElementVNode("ul",{id:"switch-section",class:n.normalizeClass(["d-flex justify-content-center rounded-5 p-2 m-0 position-relative w-100",[r.containerClass,{disabled:r.disabled}]])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.listSection,p=>(n.openBlock(),n.createElementBlock("li",{id:"switch-section-"+p.id,key:p.id,class:n.normalizeClass(["rounded-5 px-4 py-2 w-100 text-center",[r.itemClass,{hoverable:!r.disabled,"cursor-not-allowed":r.disabled}]]),role:"button",onClick:g=>u.switchSection(p.id)},n.toDisplayString(p.name),11,Ir))),128)),n.createElementVNode("span",{class:n.normalizeClass(["slider position-absolute",r.bubbleClass])},null,2)],2)])}const Lr=K(Vr,[["render",Or],["__scopeId","data-v-02559b82"]]);V.AmsomCard=vt,V.AmsomDocumentList=cr,V.AmsomHorizontalStepper=Vn,V.AmsomImage=qn,V.AmsomModal=dt,V.AmsomOverlay=ct,V.AmsomPagination=Ji,V.AmsomSkeleton=os,V.AmsomSliderSwitch=Lr,V.AmsomTableDraggable=ji,V.AmsomUploadFile=Er,V.AmsomVerticalStepper=Nn,V.default=dt,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});