@26lights/orcha 0.37.19 → 0.37.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/orcha.cjs.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * vue-color-kit v1.0.6
3
3
  * (c) 2023
4
4
  * @license MIT
5
- */function Xe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=iv(a):/rgb/.test(a)?t=Yo(a):typeof a=="string"?t=Yo(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:r,s:l,v:c}=lv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:r,s:l,v:c}}function po(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Za(a,t,o,n,s,i){const r=a==="l",l=t.createLinearGradient(0,0,r?o:0,r?0:n);l.addColorStop(.01,s),l.addColorStop(.99,i),t.fillStyle=l,t.fillRect(0,0,o,n)}function rv({r:a,g:t,b:o},n){const s=r=>("0"+Number(r).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function iv(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Yo(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function lv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),i=n-s;let r=0;n===s?r=0:n===a?t>=o?r=60*(t-o)/i:r=60*(t-o)/i+360:n===t?r=60*(o-a)/i+120:n===o&&(r=60*(a-t)/i+240),r=Math.floor(r);let l=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:r,s:l,v:c}}var fo=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),Za("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Za("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),n=a.target.getContext("2d"),s=r=>{let l=r.clientX-o,c=r.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const cv={ref:"canvasSaturation"};function dv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectSaturation&&a.selectSaturation(...r),["prevent","stop"]))},[e.createVNode("canvas",cv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}fo.render=dv;fo.__file="src/color/Saturation.vue";var vo=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),n=i=>{let r=i.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height),this.slideHueStyle={top:r-2+"px"};const l=o.getImageData(0,Math.min(r,this.height-1),1,1),[c,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const uv={ref:"canvasHue"};function mv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectHue&&a.selectHue(...r),["prevent","stop"]))},[e.createVNode("canvas",uv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}vo.render=mv;vo.__file="src/color/Hue.vue";var ho=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,n=this.alphaSize,s=po(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),Za("p",i,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height);let r=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",r)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const pv={ref:"canvasAlpha"};function fv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectAlpha&&a.selectAlpha(...r),["prevent","stop"]))},[e.createVNode("canvas",pv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=fv;ho.__file="src/color/Alpha.vue";var Co=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,n=this.alphaSize,s=po(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),i.fillStyle=this.color,i.fillRect(0,0,t,o)}}});function vv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}Co.render=vv;Co.__file="src/color/Preview.vue";var go=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:n,left:s,width:i,height:r}=this.suckerCanvas.getBoundingClientRect(),l=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,i-1),Math.min(c,r-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:n}=t,{top:s,left:i,width:r,height:l}=a.getBoundingClientRect(),c=o-i,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,r-1),Math.min(u,l-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const hv=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Cv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},gv=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function _v(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...r)=>a.openSucker&&a.openSucker(...r))},[hv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Cv,[gv])):e.createCommentVNode("v-if",!0)])}go.render=_v;go.__file="src/color/Sucker.vue";var _o=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(i){t("inputColor",i)}}),handleFocus:i=>{t("inputFocus",i)},handleBlur:i=>{t("inputBlur",i)}}}});const yv={class:"color-type"},bv={class:"name"};function wv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",yv,[e.createVNode("span",bv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>a.modelColor=r),class:"value",onFocus:t[2]||(t[2]=(...r)=>a.handleFocus&&a.handleFocus(...r)),onBlur:t[3]||(t[3]=(...r)=>a.handleBlur&&a.handleBlur(...r))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=wv;_o.__file="src/color/Box.vue";var yo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=po(4).toDataURL(),e.onUnmounted(()=>{i(o.value)});function i(l){if(!l)return;const c=n.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function r(l){t("selectColor",l)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:r}}});const kv={class:"colors"},Ev={key:0,class:"colors history"};function $v(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",kv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Ev,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=$v;yo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:fo,Hue:vo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return rv(this.rgba,!0)}},created(){Object.assign(this,Xe(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:n,h:s,s:i,v:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:i,v:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Bv={class:"color-set"};function Vv(a,t,o,n,s,i){const r=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Bv,[e.createVNode(r,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}ut.render=Vv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Sv={props:{color:{type:String,required:!0}},components:{ColorPicker:ut},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:n,a:s}=a.rgba,i=`rgba(${t}, ${o}, ${n}, ${s})`;this.$emit("update:color",i)}}},Nv={class:"color-picker-wrapper"};function Mv(a,t,o,n,s,i){const r=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Nv,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>i.togglePicker&&i.togglePicker(...l))},null,4),s.showPicker?(e.openBlock(),e.createBlock(r,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Av=O(Sv,[["render",Mv]]),Tv={class:"ao-project-milestone"},Ov={class:"ao-project-milestone__header"},Iv={class:"ao-project-milestone__header_line"},Lv={class:"ao-project-milestone__header_line"},Dv={class:"ao-project-milestone__title"},Pv={key:0,class:"ao-fieldset ao-milestone__fieldset"},Hv={class:"ao-field__row ao-milestone__field-row"},Rv={class:"ao-field ao-field--inline"},jv={class:"ao-field__row ao-milestone__field-row"},Fv={class:"ao-field ao-milestone__field-multiselect"},Uv={class:"ao-project-milestone__body"},Zv={key:0,class:"ao-project-milestone__footer"},Ko=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(h=>h.id===o.phaseId)}),i=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(h=>h.milestones)}),r=e.computed(()=>{var C;return(C=i.value)==null?void 0:C.find(h=>h.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=r.value)==null?void 0:C.activities});e.watch(l,(C,h)=>{Me(C,h)});const c=C=>{t("close",C)},u=()=>{const{name:C,rank:h}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:C,rank:h,projectId:o.projectId})},d=C=>{t("updateActivity",C)},p=C=>{l.value&&"moved"in C&&t("updateActivity",{id:C.moved.element.id,rank:mt(l.value,C.moved.newIndex)})},m=e.computed({get:()=>{var C;return(C=r.value)==null?void 0:C.color},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,color:C})}}),f=e.computed({get:()=>{var C;return((C=r==null?void 0:r.value)==null?void 0:C.deadline)??""},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:C!=null&&C.length?C:null})}}),y=C=>o.closedStatus?Ka(C,o.closedStatus):!1,_=e.computed(()=>{var C;return((C=o.users)==null?void 0:C.map(h=>({label:`${h.firstName} ${h.lastName}`,value:h.id,avatar:h.avatarUrl})))||[]}),g=e.computed({get(){var C,h;return(h=(C=r.value)==null?void 0:C.assignee)!=null&&h.id?[r.value.assignee.id]:[]},set(C){t("updateMilestone",{id:o.milestoneId,assigneeId:C[0]??null})}}),k=e.computed({get(){var C;return((C=r.value)==null?void 0:C.important)??!1},set(C){t("updateMilestone",{id:o.milestoneId,important:C})}});return(C,h)=>{var N;return e.openBlock(),e.createElementBlock("div",Tv,[e.createElementVNode("header",Ov,[e.createElementVNode("div",Iv,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Lv,[e.createElementVNode("div",Dv,[e.createVNode(oe,{title:((N=r.value)==null?void 0:N.name)||C.milestoneId,level:5},null,8,["title"]),e.createVNode(Ua,{modelValue:k.value,"onUpdate:modelValue":h[0]||(h[0]=V=>k.value=V),modelModifiers:{lazy:!0},disabled:!C.isEditable,class:"ao-milestone__important",color:"danger",label:C.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",Pv,[e.createElementVNode("div",Hv,[e.createElementVNode("label",Rv,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[1]||(h[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",jv,[e.createElementVNode("label",Fv,[e.createVNode(se,{modelValue:g.value,"onUpdate:modelValue":h[2]||(h[2]=V=>g.value=V),options:_.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:C.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!C.isEditable,caret:C.isEditable},{tag:e.withCtx(({option:V,handleTagRemove:S})=>[e.createVNode(we,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:I=>S(V,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Av,{color:m.value,"onUpdate:color":h[3]||(h[3]=V=>m.value=V)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Uv,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!C.isEditable,"item-key":"id",group:"kanban"},C.$attrs,{onChange:p}),{item:e.withCtx(({element:V})=>{var S,I,L,P,B;return[e.createVNode(mo,{id:V.id,name:V.name||V.id,"phase-name":(S=s.value)==null?void 0:S.name,"milestone-name":(I=r.value)==null?void 0:I.name,"milestone-color":(L=r.value)==null?void 0:L.color,deadline:V.deadline,important:V.important,users:C.users,assignee:V.assignee,slug:V.slug,comments:(P=V.comments)==null?void 0:P.length,attachments:(B=V.attachments)==null?void 0:B.length,tasks:V.tasks,"is-editable":C.isEditable,"is-private":V.private,"is-closed":y(V),onClick:H=>C.$router.push({name:e.unref(ge).activity,params:{milestoneId:C.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[C.isEditable?{name:"secondary",fn:e.withCtx(()=>[C.isEditable&&V.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("archive"),onClick:e.withModifiers(()=>C.$emit("archiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),C.isEditable&&!V.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>C.$emit("unarchiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),C.isEditable?(e.openBlock(),e.createElementBlock("div",Zv,[e.createVNode(We,{"icon-name":"Add",label:C.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const zv=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(k=>k.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(k=>k.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(k=>k.id===o.milestoneId)}),r=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(k=>k.id===o.activityId)}),l=g=>{t("update:activity",g)},c=g=>{t("addSubtask",g)},u=g=>{t("updateSubtask",g)},d=g=>{t("deleteSubtask",g)},p=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},f=g=>{t("addComment",g)},y=g=>{t("updateComment",g)},_=g=>{t("removeComment",g)};return(g,k)=>{var C,h;return r.value?(e.openBlock(),e.createBlock(Ea,{key:0,activity:r.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(C=n.value)==null?void 0:C.name} / ${(h=i.value)==null?void 0:h.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(g.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),xv={class:"ao-col-header"},Wv=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",xv,[e.createVNode(oe,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(ma,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function qv(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function da(a){return typeof a=="function"?a():e.unref(a)}const Yv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Kv=a=>a!=null,At=()=>{};function Gv(a,t){function o(...n){return new Promise((s,i)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return o}function Xv(a,t={}){let o,n,s=At;const i=l=>{clearTimeout(l),s(),s=At};return l=>{const c=da(a),u=da(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(l())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function Qv(a,t=200,o={}){return Gv(Xv(t,o),a)}function Pa(a){var t;const o=da(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Jv=Yv?window:void 0;function e9(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function t9(a){const t=e9();return e.computed(()=>(t.value,!!a()))}function a9(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:r=Jv,immediate:l=!0}=o,c=t9(()=>r&&"IntersectionObserver"in r),u=e.computed(()=>{const y=da(a);return(Array.isArray(y)?y:[y]).map(Pa).filter(Kv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Pa(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const g=new IntersectionObserver(t,{root:Pa(_),rootMargin:s,threshold:i});y.forEach(k=>k&&g.observe(k)),d=()=>{g.disconnect(),d=At}},{immediate:l,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return qv(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const o9={class:e.normalizeClass(["ao-list-kanban"])},n9={class:"ao-list-kanban__header"},s9={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},r9={key:1,class:"ao-list-kanban__end"},i9={key:0,class:"ao-list-kanban__no-more"},l9={key:1,class:"ao-list-kanban__divider"},c9={key:1,class:"ao-list-kanban__footer"},d9=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);a9(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},r=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:mt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:mt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",o9,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",n9,[d.title?(e.openBlock(),e.createBlock(Wv,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,g,k,C,h,N,V;return[e.createVNode(mo,{class:e.normalizeClass(i(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(g=(_=m.milestone)==null?void 0:_.phase)==null?void 0:g.name,"milestone-name":(k=m.milestone)==null?void 0:k.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((h=m.rules)==null?void 0:h.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(V=m.attachments)==null?void 0:V.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[S=>i(m)&&l(S),()=>i(m)&&l],onClick:()=>r(m.id),onRemoveAssignee:()=>i(m)&&l({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(m)&&m.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(m)&&!m.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",s9,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",r9,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",i9,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",l9)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",c9,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const u9={class:"ao-field ao-search-field"},m9=["value","placeholder","onKeypress"],p9=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async r=>{const c=r.target.value;t("update:modelValue",c,r)},s=Qv(n,o.delay),i=r=>{t("clear",r)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",u9,[e.createElementVNode("input",{value:r.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:r.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,m9),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${r.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${r.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const f9={class:"ao-feed"},v9={class:"ao-feed__filters"},h9={class:"ao-feed__body"},bo=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=Go.useRoute();e.onMounted(()=>{const E=s.params.activitySlug;if(console.log(E),E){const w=i.value.find(v=>v.slug===E);console.log(JSON.stringify(w,null,2)),w&&r(w.id)}});const i=e.toRef(o,"activities"),r=async E=>{await t("selectActivity",E)},l=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([E,w,v],[$,F])=>{l.value=Object.fromEntries(E.map(U=>[U.id,w.filter(Y=>{var Z;return((Z=Y.status)==null?void 0:Z.id)===U.id})])),v&&!c.value&&(r(v),c.value=!0),u.value&&Me(w,F)},{immediate:!0});const p=e.computed(()=>{var E;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((E=o.selectedActivity.milestone.phase)==null?void 0:E.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=E=>{var U,Y;const w=(U=o.activities)==null?void 0:U.at(-1),v=w?pe.LexoRank.parse(w.rank).genNext():pe.LexoRank.middle(),$=((Y=o.activities)==null?void 0:Y.length)??0,F={name:n("activity.defaultName",{idx:$+1}),rank:v.format(),statusId:E.id};o.filters.assigneeId.length>0&&(F.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(F.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(F.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",F)},f=(E,w)=>{u.value=!1,t("update:filters",{...o.filters,[E]:w})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(E=>({value:E.id,label:E.name}))),g=e.computed(()=>{var E;return(E=o.activityTypes)==null?void 0:E.map(w=>({value:w.id,label:w.name}))}),k=e.computed(()=>o.users.map(E=>({value:E.id,label:`${E.firstName} ${E.lastName}`,avatar:E.avatarUrl}))),C=E=>{o.selectedActivity&&t("update:activity",E)},h=E=>{t("update:activity",E)},N=E=>{t("archiveActivity",E)},V=E=>{t("unarchiveActivity",E)},S=E=>{u.value=!1,t("update:searchText",E)},I=E=>{u.value=!1,t("clear:searchText",E)},L=E=>{o.selectedActivity&&t("addSubtask",E)},P=E=>{o.selectedActivity&&t("updateSubtask",E)},B=E=>{o.selectedActivity&&t("deleteSubtask",E)},H=E=>{t("addFiles",E)},T=E=>{t("removeFile",E)},D=E=>{o.selectedActivity&&t("addComment",{...E,activityId:o.selectedActivity.id})},W=E=>{const{id:w}=o.selectedActivity||{};w&&t("updateComment",E)},x=E=>{const{id:w}=o.selectedActivity||{};w&&t("removeComment",E)};return(E,w)=>{var v;return e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(Ca,null,{primary:e.withCtx(()=>[e.createElementVNode("div",v9,[o.project?(e.openBlock(),e.createBlock(Rn,{key:0,"is-left":!1,"right-label":E.$t("project.switch.feed"),"left-label":E.$t("project.switch.overview"),"onUpdate:isLeft":w[0]||(w[0]=$=>{$&&E.$router.push({name:e.unref(ge).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(p9,{"model-value":E.searchText,placeholder:E.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":S,onClear:I},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":E.filters[e.unref(Qe).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:E.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":w[1]||(w[1]=$=>f(e.unref(Qe).project,$))},null,8,["model-value","options","placeholder"])),g.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":E.filters[e.unref(Qe).type],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:E.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":w[2]||(w[2]=$=>f(e.unref(Qe).type,$))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),k.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":E.filters[e.unref(Qe).assignee],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:E.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":w[3]||(w[3]=$=>f(e.unref(Qe).assignee,$))},{tag:e.withCtx(({option:$,handleTagRemove:F})=>[e.createVNode(we,{"user-name":$.label,"avatar-url":$.avatar,"is-closable":!0,onClose:U=>F($,U)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":E.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":E.showsOnlyImportant,onClick:w[4]||(w[4]=$=>E.$emit("update:showsOnlyImportant",!E.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":E.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":E.showsArchivedActivities,onClick:w[5]||(w[5]=$=>E.$emit("update:showsArchivedActivities",!E.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",h9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.statuses,$=>(e.openBlock(),e.createBlock(d9,{key:$.id,status:$,list:l.value[$.id],title:$.name,"footer-label":E.$t("feed.activity.add"),users:E.users,"user-id":E.userId,"is-editable":E.isEditable,tagType:d.value,onAdd:()=>m($),onSelectActivity:r,onArchiveActivity:N,onUnarchiveActivity:V,onUpdateActivity:h},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[E.selectedActivity?(e.openBlock(),e.createBlock(Ea,{key:0,activity:E.selectedActivity,"activity-types":E.activityTypes,"milestone-id":(v=E.selectedActivity.milestone)==null?void 0:v.id,"template-activities":i.value,users:E.users,"user-id":E.userId,"is-task-checkable":E.isTaskCheckable,statuses:E.statuses,breadcrumbs:p.value,"is-editable":E.isEditable,"attachment-enabled":E.attachmentEnabled,projects:y.value,onClose:w[6]||(w[6]=()=>r(null)),"onUpdate:activity":C,onAddSubtask:L,onUpdateSubtask:P,onDeleteSubtask:B,onAddFiles:H,onRemoveFile:T,onAddComment:D,onUpdateComment:W,onRemoveComment:x},{default:e.withCtx($=>[e.renderSlot(E.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps($)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const et={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},C9=(a,t={})=>[{path:a,name:et.TEMPLATES,redirect:{name:et.TEMPLATES_LIST},...t,children:[{path:"",name:et.TEMPLATES_LIST,component:jn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:et.TEMPLATE_DETAILS,component:Pn,props:!0}]}],ge={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},g9=(a,t={})=>[{path:a,...t,redirect:{name:ge.project},children:[{path:"",name:ge.project,component:Pf,props:!0,children:[{path:":phaseId/:milestoneId",name:ge.milestone,component:Ko,props:!0},{path:":phaseId/:milestoneId/:activityId",name:ge.activity,props:{default:!0,modal:!0},components:{default:Ko,modal:zv}}]},{path:"feed",name:ge.feed,component:bo,props:!0}]}],za={feed:"AoFeed",activityDetail:"AoActivityDetail"},_9=(a,t={})=>[{path:a,...t,children:[{path:"",name:za.feed,component:bo,props:!0},{path:":activitySlug",name:za.activityDetail,component:Ea,props:!0}]}],y9={class:"ao-templates"},jn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:n}=nt();e.watch(()=>o.templates,(l,c)=>{Me(l,c)});const s=()=>{var p,m;const l=(p=o.templates)==null?void 0:p.at(-1),c=l?pe.LexoRank.parse(l.rank).genNext():pe.LexoRank.middle(),u=((m=o.templates)==null?void 0:m.length)??0,d={name:n("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},i=(l,c)=>{t("updateItem",{itemType:J.TEMPLATES,id:l,templateId:l,data:{name:c}})},r=l=>{if(l.moved){const c=jt(l,o.templates??[]);t("updateItem",{itemType:J.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",y9,[e.createVNode(Ca,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(C3,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(z0)(u.phases):0,activities:u.phases?e.unref(x0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:p=>i(u.id,p),onClick:p=>l.$router.push({name:e.unref(et).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const b9={class:"ao-field__label"},Fn=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",b9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),w9=["type","value","disabled","readonly"],k9=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=i=>{o.modelModifiers.number&&(i=Number(i)),t("update:modelValue",i)};return(i,r)=>(e.openBlock(),e.createBlock(Fn,{label:i.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:i.type,value:i.modelValue,disabled:i.isDisabled,readonly:i.isReadonly},{[e.toHandlerKey(n.value)]:r[0]||(r[0]=l=>s(l.target.value))}),null,16,w9)]),_:1},8,["label"]))}}),E9={class:"ao-field"},$9={class:"ao-field__label"},B9=["checked","disabled"],V9=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",E9,[e.createElementVNode("span",$9,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,B9)]))}});exports.AoAvatar=we;exports.AoCardFeed=mo;exports.AoCheckboxField=V9;exports.AoFeed=bo;exports.AoField=Fn;exports.AoInputField=k9;exports.AoMultiselect=se;exports.AoProjectPhases=Hn;exports.AoTemplateDetails=Pn;exports.AoTemplates=ss;exports.AoTemplatesList=jn;exports.TemplateItemTypeEnum=on;exports.activityFeedRoute=za;exports.activityFeedStatus=s2;exports.durationTypes=n2;exports.feedFilterTypes=Qe;exports.getActivityFeedRoutes=_9;exports.getProjectOverviewRoutes=g9;exports.getTemplateRoutes=C9;exports.listUpdateTypes=r2;exports.milestoneStatus=aa;exports.projectOverviewRoutes=ge;exports.ruleComparators=en;exports.ruleDurationUnits=an;exports.ruleTriggerTypes=tn;exports.templateItemType=J;exports.templateRouteNames=et;
5
+ */function Xe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=iv(a):/rgb/.test(a)?t=Yo(a):typeof a=="string"?t=Yo(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:r,s:l,v:c}=lv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:r,s:l,v:c}}function po(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Za(a,t,o,n,s,i){const r=a==="l",l=t.createLinearGradient(0,0,r?o:0,r?0:n);l.addColorStop(.01,s),l.addColorStop(.99,i),t.fillStyle=l,t.fillRect(0,0,o,n)}function rv({r:a,g:t,b:o},n){const s=r=>("0"+Number(r).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function iv(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Yo(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function lv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),i=n-s;let r=0;n===s?r=0:n===a?t>=o?r=60*(t-o)/i:r=60*(t-o)/i+360:n===t?r=60*(o-a)/i+120:n===o&&(r=60*(a-t)/i+240),r=Math.floor(r);let l=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:r,s:l,v:c}}var fo=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),Za("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Za("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),n=a.target.getContext("2d"),s=r=>{let l=r.clientX-o,c=r.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const cv={ref:"canvasSaturation"};function dv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectSaturation&&a.selectSaturation(...r),["prevent","stop"]))},[e.createVNode("canvas",cv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}fo.render=dv;fo.__file="src/color/Saturation.vue";var vo=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),n=i=>{let r=i.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height),this.slideHueStyle={top:r-2+"px"};const l=o.getImageData(0,Math.min(r,this.height-1),1,1),[c,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const uv={ref:"canvasHue"};function mv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectHue&&a.selectHue(...r),["prevent","stop"]))},[e.createVNode("canvas",uv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}vo.render=mv;vo.__file="src/color/Hue.vue";var ho=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,n=this.alphaSize,s=po(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),Za("p",i,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height);let r=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",r)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const pv={ref:"canvasAlpha"};function fv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectAlpha&&a.selectAlpha(...r),["prevent","stop"]))},[e.createVNode("canvas",pv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=fv;ho.__file="src/color/Alpha.vue";var Co=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,n=this.alphaSize,s=po(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),i.fillStyle=this.color,i.fillRect(0,0,t,o)}}});function vv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}Co.render=vv;Co.__file="src/color/Preview.vue";var go=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:n,left:s,width:i,height:r}=this.suckerCanvas.getBoundingClientRect(),l=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,i-1),Math.min(c,r-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:n}=t,{top:s,left:i,width:r,height:l}=a.getBoundingClientRect(),c=o-i,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,r-1),Math.min(u,l-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const hv=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Cv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},gv=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function _v(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...r)=>a.openSucker&&a.openSucker(...r))},[hv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Cv,[gv])):e.createCommentVNode("v-if",!0)])}go.render=_v;go.__file="src/color/Sucker.vue";var _o=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(i){t("inputColor",i)}}),handleFocus:i=>{t("inputFocus",i)},handleBlur:i=>{t("inputBlur",i)}}}});const yv={class:"color-type"},bv={class:"name"};function wv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",yv,[e.createVNode("span",bv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>a.modelColor=r),class:"value",onFocus:t[2]||(t[2]=(...r)=>a.handleFocus&&a.handleFocus(...r)),onBlur:t[3]||(t[3]=(...r)=>a.handleBlur&&a.handleBlur(...r))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=wv;_o.__file="src/color/Box.vue";var yo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=po(4).toDataURL(),e.onUnmounted(()=>{i(o.value)});function i(l){if(!l)return;const c=n.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function r(l){t("selectColor",l)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:r}}});const kv={class:"colors"},Ev={key:0,class:"colors history"};function $v(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",kv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Ev,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=$v;yo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:fo,Hue:vo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return rv(this.rgba,!0)}},created(){Object.assign(this,Xe(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:n,h:s,s:i,v:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:i,v:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Bv={class:"color-set"};function Vv(a,t,o,n,s,i){const r=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Bv,[e.createVNode(r,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}ut.render=Vv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Sv={props:{color:{type:String,required:!0}},components:{ColorPicker:ut},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:n,a:s}=a.rgba,i=`rgba(${t}, ${o}, ${n}, ${s})`;this.$emit("update:color",i)}}},Nv={class:"color-picker-wrapper"};function Mv(a,t,o,n,s,i){const r=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Nv,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>i.togglePicker&&i.togglePicker(...l))},null,4),s.showPicker?(e.openBlock(),e.createBlock(r,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Av=O(Sv,[["render",Mv]]),Tv={class:"ao-project-milestone"},Ov={class:"ao-project-milestone__header"},Iv={class:"ao-project-milestone__header_line"},Lv={class:"ao-project-milestone__header_line"},Dv={class:"ao-project-milestone__title"},Pv={key:0,class:"ao-fieldset ao-milestone__fieldset"},Hv={class:"ao-field__row ao-milestone__field-row"},Rv={class:"ao-field ao-field--inline"},jv={class:"ao-field__row ao-milestone__field-row"},Fv={class:"ao-field ao-milestone__field-multiselect"},Uv={class:"ao-project-milestone__body"},Zv={key:0,class:"ao-project-milestone__footer"},Ko=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(h=>h.id===o.phaseId)}),i=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(h=>h.milestones)}),r=e.computed(()=>{var C;return(C=i.value)==null?void 0:C.find(h=>h.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=r.value)==null?void 0:C.activities});e.watch(l,(C,h)=>{Me(C,h)});const c=C=>{t("close",C)},u=()=>{const{name:C,rank:h}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:C,rank:h,projectId:o.projectId})},d=C=>{t("updateActivity",C)},p=C=>{l.value&&"moved"in C&&t("updateActivity",{id:C.moved.element.id,rank:mt(l.value,C.moved.newIndex)})},m=e.computed({get:()=>{var C;return(C=r.value)==null?void 0:C.color},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,color:C})}}),f=e.computed({get:()=>{var C;return((C=r==null?void 0:r.value)==null?void 0:C.deadline)??""},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:C!=null&&C.length?C:null})}}),y=C=>o.closedStatus?Ka(C,o.closedStatus):!1,_=e.computed(()=>{var C;return((C=o.users)==null?void 0:C.map(h=>({label:`${h.firstName} ${h.lastName}`,value:h.id,avatar:h.avatarUrl})))||[]}),g=e.computed({get(){var C,h;return(h=(C=r.value)==null?void 0:C.assignee)!=null&&h.id?[r.value.assignee.id]:[]},set(C){t("updateMilestone",{id:o.milestoneId,assigneeId:C[0]??null})}}),k=e.computed({get(){var C;return((C=r.value)==null?void 0:C.important)??!1},set(C){t("updateMilestone",{id:o.milestoneId,important:C})}});return(C,h)=>{var N;return e.openBlock(),e.createElementBlock("div",Tv,[e.createElementVNode("header",Ov,[e.createElementVNode("div",Iv,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Lv,[e.createElementVNode("div",Dv,[e.createVNode(oe,{title:((N=r.value)==null?void 0:N.name)||C.milestoneId,level:5},null,8,["title"]),e.createVNode(Ua,{modelValue:k.value,"onUpdate:modelValue":h[0]||(h[0]=V=>k.value=V),modelModifiers:{lazy:!0},disabled:!C.isEditable,class:"ao-milestone__important",color:"danger",label:C.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",Pv,[e.createElementVNode("div",Hv,[e.createElementVNode("label",Rv,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[1]||(h[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",jv,[e.createElementVNode("label",Fv,[e.createVNode(se,{modelValue:g.value,"onUpdate:modelValue":h[2]||(h[2]=V=>g.value=V),options:_.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:C.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!C.isEditable,caret:C.isEditable},{tag:e.withCtx(({option:V,handleTagRemove:S})=>[e.createVNode(we,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:I=>S(V,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Av,{color:m.value,"onUpdate:color":h[3]||(h[3]=V=>m.value=V)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Uv,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!C.isEditable,"item-key":"id",group:"kanban"},C.$attrs,{onChange:p}),{item:e.withCtx(({element:V})=>{var S,I,L,P,B;return[e.createVNode(mo,{id:V.id,name:V.name||V.id,"phase-name":(S=s.value)==null?void 0:S.name,"milestone-name":(I=r.value)==null?void 0:I.name,"milestone-color":(L=r.value)==null?void 0:L.color,deadline:V.deadline,important:V.important,users:C.users,assignee:V.assignee,slug:V.slug,comments:(P=V.comments)==null?void 0:P.length,attachments:(B=V.attachments)==null?void 0:B.length,tasks:V.tasks,"is-editable":C.isEditable,"is-private":V.private,"is-closed":y(V),onClick:H=>C.$router.push({name:e.unref(ge).activity,params:{milestoneId:C.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[C.isEditable?{name:"secondary",fn:e.withCtx(()=>[C.isEditable&&V.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("archive"),onClick:e.withModifiers(()=>C.$emit("archiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),C.isEditable&&!V.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>C.$emit("unarchiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),C.isEditable?(e.openBlock(),e.createElementBlock("div",Zv,[e.createVNode(We,{"icon-name":"Add",label:C.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const zv=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(k=>k.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(k=>k.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(k=>k.id===o.milestoneId)}),r=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(k=>k.id===o.activityId)}),l=g=>{t("update:activity",g)},c=g=>{t("addSubtask",g)},u=g=>{t("updateSubtask",g)},d=g=>{t("deleteSubtask",g)},p=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},f=g=>{t("addComment",g)},y=g=>{t("updateComment",g)},_=g=>{t("removeComment",g)};return(g,k)=>{var C,h;return r.value?(e.openBlock(),e.createBlock(Ea,{key:0,activity:r.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(C=n.value)==null?void 0:C.name} / ${(h=i.value)==null?void 0:h.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(g.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),xv={class:"ao-col-header"},Wv=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",xv,[e.createVNode(oe,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(ma,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function qv(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function da(a){return typeof a=="function"?a():e.unref(a)}const Yv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Kv=a=>a!=null,At=()=>{};function Gv(a,t){function o(...n){return new Promise((s,i)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return o}function Xv(a,t={}){let o,n,s=At;const i=l=>{clearTimeout(l),s(),s=At};return l=>{const c=da(a),u=da(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(l())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function Qv(a,t=200,o={}){return Gv(Xv(t,o),a)}function Pa(a){var t;const o=da(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Jv=Yv?window:void 0;function e9(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function t9(a){const t=e9();return e.computed(()=>(t.value,!!a()))}function a9(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:r=Jv,immediate:l=!0}=o,c=t9(()=>r&&"IntersectionObserver"in r),u=e.computed(()=>{const y=da(a);return(Array.isArray(y)?y:[y]).map(Pa).filter(Kv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Pa(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const g=new IntersectionObserver(t,{root:Pa(_),rootMargin:s,threshold:i});y.forEach(k=>k&&g.observe(k)),d=()=>{g.disconnect(),d=At}},{immediate:l,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return qv(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const o9={class:e.normalizeClass(["ao-list-kanban"])},n9={class:"ao-list-kanban__header"},s9={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},r9={key:1,class:"ao-list-kanban__end"},i9={key:0,class:"ao-list-kanban__no-more"},l9={key:1,class:"ao-list-kanban__divider"},c9={key:1,class:"ao-list-kanban__footer"},d9=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);a9(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},r=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:mt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:mt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",o9,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",n9,[d.title?(e.openBlock(),e.createBlock(Wv,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,g,k,C,h,N,V;return[e.createVNode(mo,{class:e.normalizeClass(i(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(g=(_=m.milestone)==null?void 0:_.phase)==null?void 0:g.name,"milestone-name":(k=m.milestone)==null?void 0:k.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((h=m.rules)==null?void 0:h.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(V=m.attachments)==null?void 0:V.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[S=>i(m)&&l(S),()=>i(m)&&l],onClick:()=>r(m.id),onRemoveAssignee:()=>i(m)&&l({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(m)&&m.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(m)&&!m.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",s9,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",r9,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",i9,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",l9)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",c9,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const u9={class:"ao-field ao-search-field"},m9=["value","placeholder","onKeypress"],p9=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async r=>{const c=r.target.value;t("update:modelValue",c,r)},s=Qv(n,o.delay),i=r=>{t("clear",r)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",u9,[e.createElementVNode("input",{value:r.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:r.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,m9),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${r.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${r.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const f9={class:"ao-feed"},v9={class:"ao-feed__filters"},h9={class:"ao-feed__body"},bo=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=Go.useRoute();e.onMounted(()=>{console.log(s),console.log(s.params);const E=s.params.activitySlug;if(console.log(E),E){const w=i.value.find(v=>v.slug===E);console.log(JSON.stringify(w,null,2)),w&&r(w.id)}});const i=e.toRef(o,"activities"),r=async E=>{await t("selectActivity",E)},l=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([E,w,v],[$,F])=>{l.value=Object.fromEntries(E.map(U=>[U.id,w.filter(Y=>{var Z;return((Z=Y.status)==null?void 0:Z.id)===U.id})])),v&&!c.value&&(r(v),c.value=!0),u.value&&Me(w,F)},{immediate:!0});const p=e.computed(()=>{var E;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((E=o.selectedActivity.milestone.phase)==null?void 0:E.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=E=>{var U,Y;const w=(U=o.activities)==null?void 0:U.at(-1),v=w?pe.LexoRank.parse(w.rank).genNext():pe.LexoRank.middle(),$=((Y=o.activities)==null?void 0:Y.length)??0,F={name:n("activity.defaultName",{idx:$+1}),rank:v.format(),statusId:E.id};o.filters.assigneeId.length>0&&(F.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(F.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(F.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",F)},f=(E,w)=>{u.value=!1,t("update:filters",{...o.filters,[E]:w})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(E=>({value:E.id,label:E.name}))),g=e.computed(()=>{var E;return(E=o.activityTypes)==null?void 0:E.map(w=>({value:w.id,label:w.name}))}),k=e.computed(()=>o.users.map(E=>({value:E.id,label:`${E.firstName} ${E.lastName}`,avatar:E.avatarUrl}))),C=E=>{o.selectedActivity&&t("update:activity",E)},h=E=>{t("update:activity",E)},N=E=>{t("archiveActivity",E)},V=E=>{t("unarchiveActivity",E)},S=E=>{u.value=!1,t("update:searchText",E)},I=E=>{u.value=!1,t("clear:searchText",E)},L=E=>{o.selectedActivity&&t("addSubtask",E)},P=E=>{o.selectedActivity&&t("updateSubtask",E)},B=E=>{o.selectedActivity&&t("deleteSubtask",E)},H=E=>{t("addFiles",E)},T=E=>{t("removeFile",E)},D=E=>{o.selectedActivity&&t("addComment",{...E,activityId:o.selectedActivity.id})},W=E=>{const{id:w}=o.selectedActivity||{};w&&t("updateComment",E)},x=E=>{const{id:w}=o.selectedActivity||{};w&&t("removeComment",E)};return(E,w)=>{var v;return e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(Ca,null,{primary:e.withCtx(()=>[e.createElementVNode("div",v9,[o.project?(e.openBlock(),e.createBlock(Rn,{key:0,"is-left":!1,"right-label":E.$t("project.switch.feed"),"left-label":E.$t("project.switch.overview"),"onUpdate:isLeft":w[0]||(w[0]=$=>{$&&E.$router.push({name:e.unref(ge).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(p9,{"model-value":E.searchText,placeholder:E.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":S,onClear:I},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":E.filters[e.unref(Qe).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:E.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":w[1]||(w[1]=$=>f(e.unref(Qe).project,$))},null,8,["model-value","options","placeholder"])),g.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":E.filters[e.unref(Qe).type],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:E.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":w[2]||(w[2]=$=>f(e.unref(Qe).type,$))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),k.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":E.filters[e.unref(Qe).assignee],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:E.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":w[3]||(w[3]=$=>f(e.unref(Qe).assignee,$))},{tag:e.withCtx(({option:$,handleTagRemove:F})=>[e.createVNode(we,{"user-name":$.label,"avatar-url":$.avatar,"is-closable":!0,onClose:U=>F($,U)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":E.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":E.showsOnlyImportant,onClick:w[4]||(w[4]=$=>E.$emit("update:showsOnlyImportant",!E.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":E.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":E.showsArchivedActivities,onClick:w[5]||(w[5]=$=>E.$emit("update:showsArchivedActivities",!E.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",h9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.statuses,$=>(e.openBlock(),e.createBlock(d9,{key:$.id,status:$,list:l.value[$.id],title:$.name,"footer-label":E.$t("feed.activity.add"),users:E.users,"user-id":E.userId,"is-editable":E.isEditable,tagType:d.value,onAdd:()=>m($),onSelectActivity:r,onArchiveActivity:N,onUnarchiveActivity:V,onUpdateActivity:h},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[E.selectedActivity?(e.openBlock(),e.createBlock(Ea,{key:0,activity:E.selectedActivity,"activity-types":E.activityTypes,"milestone-id":(v=E.selectedActivity.milestone)==null?void 0:v.id,"template-activities":i.value,users:E.users,"user-id":E.userId,"is-task-checkable":E.isTaskCheckable,statuses:E.statuses,breadcrumbs:p.value,"is-editable":E.isEditable,"attachment-enabled":E.attachmentEnabled,projects:y.value,onClose:w[6]||(w[6]=()=>r(null)),"onUpdate:activity":C,onAddSubtask:L,onUpdateSubtask:P,onDeleteSubtask:B,onAddFiles:H,onRemoveFile:T,onAddComment:D,onUpdateComment:W,onRemoveComment:x},{default:e.withCtx($=>[e.renderSlot(E.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps($)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const et={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},C9=(a,t={})=>[{path:a,name:et.TEMPLATES,redirect:{name:et.TEMPLATES_LIST},...t,children:[{path:"",name:et.TEMPLATES_LIST,component:jn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:et.TEMPLATE_DETAILS,component:Pn,props:!0}]}],ge={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},g9=(a,t={})=>[{path:a,...t,redirect:{name:ge.project},children:[{path:"",name:ge.project,component:Pf,props:!0,children:[{path:":phaseId/:milestoneId",name:ge.milestone,component:Ko,props:!0},{path:":phaseId/:milestoneId/:activityId",name:ge.activity,props:{default:!0,modal:!0},components:{default:Ko,modal:zv}}]},{path:"feed",name:ge.feed,component:bo,props:!0}]}],za={feed:"AoFeed",activityDetail:"AoActivityDetails"},_9=(a,t={})=>[{path:a,...t,children:[{path:"",name:za.feed,component:bo,props:!0},{path:":activitySlug",name:za.activityDetail,component:Ea,props:!0}]}],y9={class:"ao-templates"},jn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:n}=nt();e.watch(()=>o.templates,(l,c)=>{Me(l,c)});const s=()=>{var p,m;const l=(p=o.templates)==null?void 0:p.at(-1),c=l?pe.LexoRank.parse(l.rank).genNext():pe.LexoRank.middle(),u=((m=o.templates)==null?void 0:m.length)??0,d={name:n("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},i=(l,c)=>{t("updateItem",{itemType:J.TEMPLATES,id:l,templateId:l,data:{name:c}})},r=l=>{if(l.moved){const c=jt(l,o.templates??[]);t("updateItem",{itemType:J.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",y9,[e.createVNode(Ca,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(C3,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(z0)(u.phases):0,activities:u.phases?e.unref(x0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:p=>i(u.id,p),onClick:p=>l.$router.push({name:e.unref(et).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const b9={class:"ao-field__label"},Fn=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",b9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),w9=["type","value","disabled","readonly"],k9=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=i=>{o.modelModifiers.number&&(i=Number(i)),t("update:modelValue",i)};return(i,r)=>(e.openBlock(),e.createBlock(Fn,{label:i.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:i.type,value:i.modelValue,disabled:i.isDisabled,readonly:i.isReadonly},{[e.toHandlerKey(n.value)]:r[0]||(r[0]=l=>s(l.target.value))}),null,16,w9)]),_:1},8,["label"]))}}),E9={class:"ao-field"},$9={class:"ao-field__label"},B9=["checked","disabled"],V9=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",E9,[e.createElementVNode("span",$9,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,B9)]))}});exports.AoAvatar=we;exports.AoCardFeed=mo;exports.AoCheckboxField=V9;exports.AoFeed=bo;exports.AoField=Fn;exports.AoInputField=k9;exports.AoMultiselect=se;exports.AoProjectPhases=Hn;exports.AoTemplateDetails=Pn;exports.AoTemplates=ss;exports.AoTemplatesList=jn;exports.TemplateItemTypeEnum=on;exports.activityFeedRoute=za;exports.activityFeedStatus=s2;exports.durationTypes=n2;exports.feedFilterTypes=Qe;exports.getActivityFeedRoutes=_9;exports.getProjectOverviewRoutes=g9;exports.getTemplateRoutes=C9;exports.listUpdateTypes=r2;exports.milestoneStatus=aa;exports.projectOverviewRoutes=ge;exports.ruleComparators=en;exports.ruleDurationUnits=an;exports.ruleTriggerTypes=tn;exports.templateItemType=J;exports.templateRouteNames=et;
package/dist/orcha.es.js CHANGED
@@ -11976,6 +11976,7 @@ const e8 = { class: "ao-feed" }, t8 = { class: "ao-feed__filters" }, a8 = { clas
11976
11976
  setup(t, { emit: e }) {
11977
11977
  const a = t, { t: n } = Ot(), s = Fi();
11978
11978
  Mt(() => {
11979
+ console.log(s), console.log(s.params);
11979
11980
  const T = s.params.activitySlug;
11980
11981
  if (console.log(T), T) {
11981
11982
  const k = o.value.find((m) => m.slug === T);
@@ -12281,7 +12282,7 @@ const Pt = {
12281
12282
  }
12282
12283
  ], Ts = {
12283
12284
  feed: "AoFeed",
12284
- activityDetail: "AoActivityDetail"
12285
+ activityDetail: "AoActivityDetails"
12285
12286
  }, b8 = (t, e = {}) => [
12286
12287
  {
12287
12288
  path: t,
package/dist/orcha.umd.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * vue-color-kit v1.0.6
4
4
  * (c) 2023
5
5
  * @license MIT
6
- */function tt(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Ef(a):/rgb/.test(a)?t=Mr(a):typeof a=="string"?t=Mr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:c}=Bf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:c}}function ao(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function oo(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function $f({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Ef(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Mr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Bf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),c=parseFloat(r.toFixed(2));return{h:i,s:l,v:c}}var ro=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),oo("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),oo("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,c=i.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const u=r.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,m,p]=u.data;this.$emit("selectSaturation",{r:d,g:m,b:p})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Vf={ref:"canvasSaturation"};function Sf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Vf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=Sf,ro.__file="src/color/Saturation.vue";var no=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[c,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const xf={ref:"canvasHue"};function Nf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",xf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=Nf,no.__file="src/color/Hue.vue";var io=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),oo("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Mf={ref:"canvasAlpha"};function Af(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Mf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Af,io.__file="src/color/Alpha.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Tf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Tf,so.__file="src/color/Preview.vue";var lo=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,c=o-r,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(c,i-1),1,1);let[m,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const C=this.suckerPreview.style;Object.assign(C,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${p}, ${f}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?C.display="":C.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),c=o-s,u=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(u,l-1),1,1);let[p,f,b,C]=m.data;C=parseFloat((C/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:C})}))}}});const Of=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Lf={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},If=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Df(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[Of],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Lf,[If])):e.createCommentVNode("v-if",!0)])}lo.render=Df,lo.__file="src/color/Sucker.vue";var co=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const zf={class:"color-type"},Pf={class:"name"};function Hf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",zf,[e.createVNode("span",Pf,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}co.render=Hf,co.__file="src/color/Box.vue";var uo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=ao(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const c=r.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),r.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const jf={class:"colors"},Rf={key:0,class:"colors history"};function Ff(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",jf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Rf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}uo.render=Ff,uo.__file="src/color/Colors.vue";var _t=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:uo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return $f(this.rgba,!0)}},created(){Object.assign(this,tt(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=tt(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=tt(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Uf={class:"color-set"};function Zf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),p=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Uf,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}_t.render=Zf,_t.__file="src/color/ColorPicker.vue",_t.install=a=>{a.component(_t.name,_t)};const d4="",u4="",Wf={props:{color:{type:String,required:!0}},components:{ColorPicker:_t},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:r,a:n}=a.rgba,s=`rgba(${t}, ${o}, ${r}, ${n})`;this.$emit("update:color",s)}}},qf={class:"color-picker-wrapper"};function Yf(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",qf,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>s.togglePicker&&s.togglePicker(...l))},null,4),n.showPicker?(e.openBlock(),e.createBlock(i,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:s.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Kf=T(Wf,[["render",Yf]]),Gf={class:"ao-project-milestone"},Xf={class:"ao-project-milestone__header"},Qf={class:"ao-project-milestone__header_line"},Jf={class:"ao-project-milestone__header_line"},e7={class:"ao-project-milestone__title"},t7={key:0,class:"ao-fieldset ao-milestone__fieldset"},a7={class:"ao-field__row ao-milestone__field-row"},o7={class:"ao-field ao-field--inline"},r7={class:"ao-field__row ao-milestone__field-row"},n7={class:"ao-field ao-milestone__field-multiselect"},i7={class:"ao-project-milestone__body"},s7={key:0,class:"ao-project-milestone__footer"},Ar=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(g=>g.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(g=>g.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(g=>g.id===o.milestoneId)}),l=e.computed(()=>{var _;return(_=i.value)==null?void 0:_.activities});e.watch(l,(_,g)=>{Ae(_,g)});const c=_=>{t("close",_)},u=()=>{const{name:_,rank:g}=gt(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:_,rank:g,projectId:o.projectId})},d=_=>{t("updateActivity",_)},m=_=>{l.value&&"moved"in _&&t("updateActivity",{id:_.moved.element.id,rank:lt(l.value,_.moved.newIndex)})},p=e.computed({get:()=>{var _;return(_=i.value)==null?void 0:_.color},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,color:_})}}),f=e.computed({get:()=>{var _;return((_=i==null?void 0:i.value)==null?void 0:_.deadline)??""},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:_!=null&&_.length?_:null})}}),b=_=>o.closedStatus?Oa(_,o.closedStatus):!1,C=e.computed(()=>{var _;return((_=o.users)==null?void 0:_.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),v=e.computed({get(){var _,g;return(g=(_=i.value)==null?void 0:_.assignee)!=null&&g.id?[i.value.assignee.id]:[]},set(_){t("updateMilestone",{id:o.milestoneId,assigneeId:_[0]??null})}}),k=e.computed({get(){var _;return((_=i.value)==null?void 0:_.important)??!1},set(_){t("updateMilestone",{id:o.milestoneId,important:_})}});return(_,g)=>{var x;return e.openBlock(),e.createElementBlock("div",Gf,[e.createElementVNode("header",Xf,[e.createElementVNode("div",Qf,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Jf,[e.createElementVNode("div",e7,[e.createVNode(re,{title:((x=i.value)==null?void 0:x.name)||_.milestoneId,level:5},null,8,["title"]),e.createVNode(Qa,{modelValue:k.value,"onUpdate:modelValue":g[0]||(g[0]=V=>k.value=V),modelModifiers:{lazy:!0},disabled:!_.isEditable,class:"ao-milestone__important",color:"danger",label:_.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",t7,[e.createElementVNode("div",a7,[e.createElementVNode("label",o7,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[1]||(g[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",r7,[e.createElementVNode("label",n7,[e.createVNode(ie,{modelValue:v.value,"onUpdate:modelValue":g[2]||(g[2]=V=>v.value=V),options:C.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:_.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!_.isEditable,caret:_.isEditable},{tag:e.withCtx(({option:V,handleTagRemove:S})=>[e.createVNode(ye,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:O=>S(V,O)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Kf,{color:p.value,"onUpdate:color":g[3]||(g[3]=V=>p.value=V)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",i7,[e.createVNode(e.unref(Ie),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:m}),{item:e.withCtx(({element:V})=>{var S,O,L,D,B;return[e.createVNode(to,{id:V.id,name:V.name||V.id,"phase-name":(S=n.value)==null?void 0:S.name,"milestone-name":(O=i.value)==null?void 0:O.name,"milestone-color":(L=i.value)==null?void 0:L.color,deadline:V.deadline,important:V.important,users:_.users,assignee:V.assignee,slug:V.slug,comments:(D=V.comments)==null?void 0:D.length,attachments:(B=V.attachments)==null?void 0:B.length,tasks:V.tasks,"is-editable":_.isEditable,"is-private":V.private,"is-closed":b(V),onClick:z=>_.$router.push({name:e.unref(Ce).activity,params:{milestoneId:_.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[_.isEditable?{name:"secondary",fn:e.withCtx(()=>[_.isEditable&&V.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("archive"),onClick:e.withModifiers(()=>_.$emit("archiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),_.isEditable&&!V.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>_.$emit("unarchiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),_.isEditable?(e.openBlock(),e.createElementBlock("div",s7,[e.createVNode(ze,{"icon-name":"Add",label:_.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),p4="",l7=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(k=>k.id===o.phaseId)}),n=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(k=>k.milestones)}),s=e.computed(()=>{var v;return(v=n.value)==null?void 0:v.find(k=>k.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=o.activities)==null?void 0:v.find(k=>k.id===o.activityId)}),l=v=>{t("update:activity",v)},c=v=>{t("addSubtask",v)},u=v=>{t("updateSubtask",v)},d=v=>{t("deleteSubtask",v)},m=v=>{t("addFiles",v)},p=v=>{t("removeFile",v)},f=v=>{t("addComment",v)},b=v=>{t("updateComment",v)},C=v=>{t("removeComment",v)};return(v,k)=>{var _,g;return i.value?(e.openBlock(),e.createBlock(va,{key:0,activity:i.value,"activity-types":v.activityTypes,"milestone-id":v.milestoneId,"template-activities":v.activities,"is-template":!1,users:v.users,"user-id":v.userId,"is-task-checkable":v.isTaskCheckable,statuses:v.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(g=s.value)==null?void 0:g.name}`,"is-editable":v.isEditable,"attachment-enabled":v.attachmentEnabled,projects:[v.project],onClose:v.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:C},{default:e.withCtx(x=>[e.renderSlot(v.$slots,"default",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),c7={class:"ao-col-header"},d7=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",c7,[e.createVNode(re,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Zt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),m4="";function u7(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function Ca(a){return typeof a=="function"?a():e.unref(a)}const p7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const m7=a=>a!=null,Pt=()=>{};function f7(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function h7(a,t={}){let o,r,n=Pt;const s=l=>{clearTimeout(l),n(),n=Pt};return l=>{const c=Ca(a),u=Ca(t.maxWait);return o&&s(o),c<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,u&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},u)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function g7(a,t=200,o={}){return f7(h7(t,o),a)}function po(a){var t;const o=Ca(a);return(t=o==null?void 0:o.$el)!=null?t:o}const _7=p7?window:void 0;function v7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function C7(a){const t=v7();return e.computed(()=>(t.value,!!a()))}function b7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=_7,immediate:l=!0}=o,c=C7(()=>i&&"IntersectionObserver"in i),u=e.computed(()=>{const b=Ca(a);return(Array.isArray(b)?b:[b]).map(po).filter(m7)});let d=Pt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,po(r),m.value],([b,C])=>{if(d(),!m.value||!b.length)return;const v=new IntersectionObserver(t,{root:po(C),rootMargin:n,threshold:s});b.forEach(k=>k&&v.observe(k)),d=()=>{v.disconnect(),d=Pt}},{immediate:l,flush:"post"}):Pt,f=()=>{d(),p(),m.value=!1};return u7(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const y7={class:e.normalizeClass(["ao-list-kanban"])},w7={class:"ao-list-kanban__header"},k7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},$7={key:1,class:"ao-list-kanban__end"},E7={key:0,class:"ao-list-kanban__no-more"},B7={key:1,class:"ao-list-kanban__divider"},V7={key:1,class:"ao-list-kanban__footer"},S7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);b7(n,([{isIntersecting:d}])=>{r.value=d}),e.watch(r,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},i=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:lt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:lt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",y7,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",w7,[d.title?(e.openBlock(),e.createBlock(d7,{key:0,title:d.title,level:3,items:(p=d.list)==null?void 0:p.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(Ie),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=p=>u.value=!0),onEnd:m[1]||(m[1]=p=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:p})=>{var f,b,C,v,k,_,g,x,V;return[e.createVNode(to,{class:e.normalizeClass(s(p)?"ao-list-draggable":""),id:p.id,name:p.name,"project-name":(f=p.project)==null?void 0:f.name,"project-color":(b=p.project)==null?void 0:b.color,"phase-name":(v=(C=p.milestone)==null?void 0:C.phase)==null?void 0:v.name,"milestone-name":(k=p.milestone)==null?void 0:k.name,"milestone-color":(_=p.milestone)==null?void 0:_.color,deadline:p.deadline,rules:((g=p.rules)==null?void 0:g.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(x=p.comments)==null?void 0:x.length,attachments:(V=p.attachments)==null?void 0:V.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[S=>s(p)&&l(S),()=>s(p)&&l],onClick:()=>i(p.id),onRemoveAssignee:()=>s(p)&&l({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(p)&&p.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(p)&&!p.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",k7,[e.createVNode(J,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",$7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",E7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",B7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",V7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(ze,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=p=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),f4="",x7={class:"ao-field ao-search-field"},N7=["value","placeholder","onKeypress"],M7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const c=i.target.value;t("update:modelValue",c,i)},n=g7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",x7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(n)&&e.unref(n)(...c)),onKeypress:e.withKeys(r,["enter"])},null,40,N7),e.createVNode(J,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),h4="",A7={class:"ao-feed"},T7={class:"ao-feed__filters"},O7={class:"ao-feed__body"},mo=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=yt.useRoute();e.onMounted(()=>{const $=n.params.activitySlug;if(console.log($),$){const w=s.value.find(h=>h.slug===$);console.log(JSON.stringify(w,null,2)),w&&i(w.id)}});const s=e.toRef(o,"activities"),i=async $=>{await t("selectActivity",$)},l=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([$,w,h],[E,j])=>{l.value=Object.fromEntries($.map(R=>[R.id,w.filter(K=>{var F;return((F=K.status)==null?void 0:F.id)===R.id})])),h&&!c.value&&(i(h),c.value=!0),u.value&&Ae(w,j)},{immediate:!0});const m=e.computed(()=>{var $;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${(($=o.selectedActivity.milestone.phase)==null?void 0:$.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=$=>{var R,K;const w=(R=o.activities)==null?void 0:R.at(-1),h=w?ue.LexoRank.parse(w.rank).genNext():ue.LexoRank.middle(),E=((K=o.activities)==null?void 0:K.length)??0,j={name:r("activity.defaultName",{idx:E+1}),rank:h.format(),statusId:$.id};o.filters.assigneeId.length>0&&(j.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(j.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(j.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",j)},f=($,w)=>{u.value=!1,t("update:filters",{...o.filters,[$]:w})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),C=e.computed(()=>b.value.map($=>({value:$.id,label:$.name}))),v=e.computed(()=>{var $;return($=o.activityTypes)==null?void 0:$.map(w=>({value:w.id,label:w.name}))}),k=e.computed(()=>o.users.map($=>({value:$.id,label:`${$.firstName} ${$.lastName}`,avatar:$.avatarUrl}))),_=$=>{o.selectedActivity&&t("update:activity",$)},g=$=>{t("update:activity",$)},x=$=>{t("archiveActivity",$)},V=$=>{t("unarchiveActivity",$)},S=$=>{u.value=!1,t("update:searchText",$)},O=$=>{u.value=!1,t("clear:searchText",$)},L=$=>{o.selectedActivity&&t("addSubtask",$)},D=$=>{o.selectedActivity&&t("updateSubtask",$)},B=$=>{o.selectedActivity&&t("deleteSubtask",$)},z=$=>{t("addFiles",$)},A=$=>{t("removeFile",$)},I=$=>{o.selectedActivity&&t("addComment",{...$,activityId:o.selectedActivity.id})},W=$=>{const{id:w}=o.selectedActivity||{};w&&t("updateComment",$)},Z=$=>{const{id:w}=o.selectedActivity||{};w&&t("removeComment",$)};return($,w)=>{var h;return e.openBlock(),e.createElementBlock("div",A7,[e.createVNode(oa,null,{primary:e.withCtx(()=>[e.createElementVNode("div",T7,[o.project?(e.openBlock(),e.createBlock(Nr,{key:0,"is-left":!1,"right-label":$.$t("project.switch.feed"),"left-label":$.$t("project.switch.overview"),"onUpdate:isLeft":w[0]||(w[0]=E=>{E&&$.$router.push({name:e.unref(Ce).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(M7,{"model-value":$.searchText,placeholder:$.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":S,onClear:O},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":$.filters[e.unref(Ke).project],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:$.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":w[1]||(w[1]=E=>f(e.unref(Ke).project,E))},null,8,["model-value","options","placeholder"])),v.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":$.filters[e.unref(Ke).type],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:$.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":w[2]||(w[2]=E=>f(e.unref(Ke).type,E))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),k.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":$.filters[e.unref(Ke).assignee],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:$.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":w[3]||(w[3]=E=>f(e.unref(Ke).assignee,E))},{tag:e.withCtx(({option:E,handleTagRemove:j})=>[e.createVNode(ye,{"user-name":E.label,"avatar-url":E.avatar,"is-closable":!0,onClose:R=>j(E,R)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":$.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":$.showsOnlyImportant,onClick:w[4]||(w[4]=E=>$.$emit("update:showsOnlyImportant",!$.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":$.showsArchivedActivities,onClick:w[5]||(w[5]=E=>$.$emit("update:showsArchivedActivities",!$.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",O7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.statuses,E=>(e.openBlock(),e.createBlock(S7,{key:E.id,status:E,list:l.value[E.id],title:E.name,"footer-label":$.$t("feed.activity.add"),users:$.users,"user-id":$.userId,"is-editable":$.isEditable,tagType:d.value,onAdd:()=>p(E),onSelectActivity:i,onArchiveActivity:x,onUnarchiveActivity:V,onUpdateActivity:g},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.selectedActivity?(e.openBlock(),e.createBlock(va,{key:0,activity:$.selectedActivity,"activity-types":$.activityTypes,"milestone-id":(h=$.selectedActivity.milestone)==null?void 0:h.id,"template-activities":s.value,users:$.users,"user-id":$.userId,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,breadcrumbs:m.value,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,projects:b.value,onClose:w[6]||(w[6]=()=>i(null)),"onUpdate:activity":_,onAddSubtask:L,onUpdateSubtask:D,onDeleteSubtask:B,onAddFiles:z,onRemoveFile:A,onAddComment:I,onUpdateComment:W,onRemoveComment:Z},{default:e.withCtx(E=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(E)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}}),g4="",at={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},L7=(a,t={})=>[{path:a,name:at.TEMPLATES,redirect:{name:at.TEMPLATES_LIST},...t,children:[{path:"",name:at.TEMPLATES_LIST,component:Tr},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:at.TEMPLATE_DETAILS,component:Sr,props:!0}]}],Ce={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},I7=(a,t={})=>[{path:a,...t,redirect:{name:Ce.project},children:[{path:"",name:Ce.project,component:ef,props:!0,children:[{path:":phaseId/:milestoneId",name:Ce.milestone,component:Ar,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ce.activity,props:{default:!0,modal:!0},components:{default:Ar,modal:l7}}]},{path:"feed",name:Ce.feed,component:mo,props:!0}]}],fo={feed:"AoFeed",activityDetail:"AoActivityDetail"},D7=(a,t={})=>[{path:a,...t,children:[{path:"",name:fo.feed,component:mo,props:!0},{path:":activitySlug",name:fo.activityDetail,component:va,props:!0}]}],z7={class:"ao-templates"},Tr=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:r}=et();e.watch(()=>o.templates,(l,c)=>{Ae(l,c)});const n=()=>{var m,p;const l=(m=o.templates)==null?void 0:m.at(-1),c=l?ue.LexoRank.parse(l.rank).genNext():ue.LexoRank.middle(),u=((p=o.templates)==null?void 0:p.length)??0,d={name:r("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},s=(l,c)=>{t("updateItem",{itemType:ee.TEMPLATES,id:l,templateId:l,data:{name:c}})},i=l=>{if(l.moved){const c=At(l,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",z7,[e.createVNode(oa,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(Ie),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(L0,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(l0)(u.phases):0,activities:u.phases?e.unref(c0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:m=>s(u.id,m),onClick:m=>l.$router.push({name:e.unref(at).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),_4="",P7={class:"ao-field__label"},Or=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",P7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),H7=["type","value","disabled","readonly"],j7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(Or,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,H7)]),_:1},8,["label"]))}}),R7={class:"ao-field"},F7={class:"ao-field__label"},U7=["checked","disabled"],Z7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",R7,[e.createElementVNode("span",F7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,U7)]))}});Y.AoAvatar=ye,Y.AoCardFeed=to,Y.AoCheckboxField=Z7,Y.AoFeed=mo,Y.AoField=Or,Y.AoInputField=j7,Y.AoMultiselect=ie,Y.AoProjectPhases=xr,Y.AoTemplateDetails=Sr,Y.AoTemplates=Rr,Y.AoTemplatesList=Tr,Y.TemplateItemTypeEnum=No,Y.activityFeedRoute=fo,Y.activityFeedStatus=$d,Y.durationTypes=kd,Y.feedFilterTypes=Ke,Y.getActivityFeedRoutes=D7,Y.getProjectOverviewRoutes=I7,Y.getTemplateRoutes=L7,Y.listUpdateTypes=Ed,Y.milestoneStatus=Wt,Y.projectOverviewRoutes=Ce,Y.ruleComparators=Vo,Y.ruleDurationUnits=xo,Y.ruleTriggerTypes=So,Y.templateItemType=ee,Y.templateRouteNames=at,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
6
+ */function tt(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Ef(a):/rgb/.test(a)?t=Mr(a):typeof a=="string"?t=Mr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:c}=Bf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:c}}function ao(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function oo(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function $f({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Ef(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Mr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Bf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),c=parseFloat(r.toFixed(2));return{h:i,s:l,v:c}}var ro=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),oo("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),oo("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,c=i.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const u=r.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,m,p]=u.data;this.$emit("selectSaturation",{r:d,g:m,b:p})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Vf={ref:"canvasSaturation"};function Sf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Vf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=Sf,ro.__file="src/color/Saturation.vue";var no=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[c,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const xf={ref:"canvasHue"};function Nf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",xf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=Nf,no.__file="src/color/Hue.vue";var io=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),oo("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Mf={ref:"canvasAlpha"};function Af(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Mf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Af,io.__file="src/color/Alpha.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Tf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Tf,so.__file="src/color/Preview.vue";var lo=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,c=o-r,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(c,i-1),1,1);let[m,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const C=this.suckerPreview.style;Object.assign(C,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${p}, ${f}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?C.display="":C.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),c=o-s,u=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(u,l-1),1,1);let[p,f,b,C]=m.data;C=parseFloat((C/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:C})}))}}});const Of=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Lf={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},If=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Df(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[Of],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Lf,[If])):e.createCommentVNode("v-if",!0)])}lo.render=Df,lo.__file="src/color/Sucker.vue";var co=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const zf={class:"color-type"},Pf={class:"name"};function Hf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",zf,[e.createVNode("span",Pf,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}co.render=Hf,co.__file="src/color/Box.vue";var uo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=ao(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const c=r.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),r.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const jf={class:"colors"},Rf={key:0,class:"colors history"};function Ff(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",jf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Rf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}uo.render=Ff,uo.__file="src/color/Colors.vue";var _t=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:uo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return $f(this.rgba,!0)}},created(){Object.assign(this,tt(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=tt(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=tt(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=tt(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Uf={class:"color-set"};function Zf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),p=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Uf,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}_t.render=Zf,_t.__file="src/color/ColorPicker.vue",_t.install=a=>{a.component(_t.name,_t)};const d4="",u4="",Wf={props:{color:{type:String,required:!0}},components:{ColorPicker:_t},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:r,a:n}=a.rgba,s=`rgba(${t}, ${o}, ${r}, ${n})`;this.$emit("update:color",s)}}},qf={class:"color-picker-wrapper"};function Yf(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",qf,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>s.togglePicker&&s.togglePicker(...l))},null,4),n.showPicker?(e.openBlock(),e.createBlock(i,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:s.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Kf=T(Wf,[["render",Yf]]),Gf={class:"ao-project-milestone"},Xf={class:"ao-project-milestone__header"},Qf={class:"ao-project-milestone__header_line"},Jf={class:"ao-project-milestone__header_line"},e7={class:"ao-project-milestone__title"},t7={key:0,class:"ao-fieldset ao-milestone__fieldset"},a7={class:"ao-field__row ao-milestone__field-row"},o7={class:"ao-field ao-field--inline"},r7={class:"ao-field__row ao-milestone__field-row"},n7={class:"ao-field ao-milestone__field-multiselect"},i7={class:"ao-project-milestone__body"},s7={key:0,class:"ao-project-milestone__footer"},Ar=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(g=>g.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(g=>g.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(g=>g.id===o.milestoneId)}),l=e.computed(()=>{var _;return(_=i.value)==null?void 0:_.activities});e.watch(l,(_,g)=>{Ae(_,g)});const c=_=>{t("close",_)},u=()=>{const{name:_,rank:g}=gt(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:_,rank:g,projectId:o.projectId})},d=_=>{t("updateActivity",_)},m=_=>{l.value&&"moved"in _&&t("updateActivity",{id:_.moved.element.id,rank:lt(l.value,_.moved.newIndex)})},p=e.computed({get:()=>{var _;return(_=i.value)==null?void 0:_.color},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,color:_})}}),f=e.computed({get:()=>{var _;return((_=i==null?void 0:i.value)==null?void 0:_.deadline)??""},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:_!=null&&_.length?_:null})}}),b=_=>o.closedStatus?Oa(_,o.closedStatus):!1,C=e.computed(()=>{var _;return((_=o.users)==null?void 0:_.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),v=e.computed({get(){var _,g;return(g=(_=i.value)==null?void 0:_.assignee)!=null&&g.id?[i.value.assignee.id]:[]},set(_){t("updateMilestone",{id:o.milestoneId,assigneeId:_[0]??null})}}),k=e.computed({get(){var _;return((_=i.value)==null?void 0:_.important)??!1},set(_){t("updateMilestone",{id:o.milestoneId,important:_})}});return(_,g)=>{var x;return e.openBlock(),e.createElementBlock("div",Gf,[e.createElementVNode("header",Xf,[e.createElementVNode("div",Qf,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Jf,[e.createElementVNode("div",e7,[e.createVNode(re,{title:((x=i.value)==null?void 0:x.name)||_.milestoneId,level:5},null,8,["title"]),e.createVNode(Qa,{modelValue:k.value,"onUpdate:modelValue":g[0]||(g[0]=V=>k.value=V),modelModifiers:{lazy:!0},disabled:!_.isEditable,class:"ao-milestone__important",color:"danger",label:_.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",t7,[e.createElementVNode("div",a7,[e.createElementVNode("label",o7,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[1]||(g[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",r7,[e.createElementVNode("label",n7,[e.createVNode(ie,{modelValue:v.value,"onUpdate:modelValue":g[2]||(g[2]=V=>v.value=V),options:C.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:_.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!_.isEditable,caret:_.isEditable},{tag:e.withCtx(({option:V,handleTagRemove:S})=>[e.createVNode(ye,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:O=>S(V,O)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Kf,{color:p.value,"onUpdate:color":g[3]||(g[3]=V=>p.value=V)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",i7,[e.createVNode(e.unref(Ie),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:m}),{item:e.withCtx(({element:V})=>{var S,O,L,D,B;return[e.createVNode(to,{id:V.id,name:V.name||V.id,"phase-name":(S=n.value)==null?void 0:S.name,"milestone-name":(O=i.value)==null?void 0:O.name,"milestone-color":(L=i.value)==null?void 0:L.color,deadline:V.deadline,important:V.important,users:_.users,assignee:V.assignee,slug:V.slug,comments:(D=V.comments)==null?void 0:D.length,attachments:(B=V.attachments)==null?void 0:B.length,tasks:V.tasks,"is-editable":_.isEditable,"is-private":V.private,"is-closed":b(V),onClick:z=>_.$router.push({name:e.unref(Ce).activity,params:{milestoneId:_.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[_.isEditable?{name:"secondary",fn:e.withCtx(()=>[_.isEditable&&V.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("archive"),onClick:e.withModifiers(()=>_.$emit("archiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),_.isEditable&&!V.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>_.$emit("unarchiveActivity",{id:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),_.isEditable?(e.openBlock(),e.createElementBlock("div",s7,[e.createVNode(ze,{"icon-name":"Add",label:_.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),p4="",l7=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(k=>k.id===o.phaseId)}),n=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(k=>k.milestones)}),s=e.computed(()=>{var v;return(v=n.value)==null?void 0:v.find(k=>k.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=o.activities)==null?void 0:v.find(k=>k.id===o.activityId)}),l=v=>{t("update:activity",v)},c=v=>{t("addSubtask",v)},u=v=>{t("updateSubtask",v)},d=v=>{t("deleteSubtask",v)},m=v=>{t("addFiles",v)},p=v=>{t("removeFile",v)},f=v=>{t("addComment",v)},b=v=>{t("updateComment",v)},C=v=>{t("removeComment",v)};return(v,k)=>{var _,g;return i.value?(e.openBlock(),e.createBlock(va,{key:0,activity:i.value,"activity-types":v.activityTypes,"milestone-id":v.milestoneId,"template-activities":v.activities,"is-template":!1,users:v.users,"user-id":v.userId,"is-task-checkable":v.isTaskCheckable,statuses:v.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(g=s.value)==null?void 0:g.name}`,"is-editable":v.isEditable,"attachment-enabled":v.attachmentEnabled,projects:[v.project],onClose:v.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:C},{default:e.withCtx(x=>[e.renderSlot(v.$slots,"default",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),c7={class:"ao-col-header"},d7=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",c7,[e.createVNode(re,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Zt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),m4="";function u7(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function Ca(a){return typeof a=="function"?a():e.unref(a)}const p7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const m7=a=>a!=null,Pt=()=>{};function f7(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function h7(a,t={}){let o,r,n=Pt;const s=l=>{clearTimeout(l),n(),n=Pt};return l=>{const c=Ca(a),u=Ca(t.maxWait);return o&&s(o),c<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,u&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},u)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function g7(a,t=200,o={}){return f7(h7(t,o),a)}function po(a){var t;const o=Ca(a);return(t=o==null?void 0:o.$el)!=null?t:o}const _7=p7?window:void 0;function v7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function C7(a){const t=v7();return e.computed(()=>(t.value,!!a()))}function b7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=_7,immediate:l=!0}=o,c=C7(()=>i&&"IntersectionObserver"in i),u=e.computed(()=>{const b=Ca(a);return(Array.isArray(b)?b:[b]).map(po).filter(m7)});let d=Pt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,po(r),m.value],([b,C])=>{if(d(),!m.value||!b.length)return;const v=new IntersectionObserver(t,{root:po(C),rootMargin:n,threshold:s});b.forEach(k=>k&&v.observe(k)),d=()=>{v.disconnect(),d=Pt}},{immediate:l,flush:"post"}):Pt,f=()=>{d(),p(),m.value=!1};return u7(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const y7={class:e.normalizeClass(["ao-list-kanban"])},w7={class:"ao-list-kanban__header"},k7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},$7={key:1,class:"ao-list-kanban__end"},E7={key:0,class:"ao-list-kanban__no-more"},B7={key:1,class:"ao-list-kanban__divider"},V7={key:1,class:"ao-list-kanban__footer"},S7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);b7(n,([{isIntersecting:d}])=>{r.value=d}),e.watch(r,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},i=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:lt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:lt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",y7,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",w7,[d.title?(e.openBlock(),e.createBlock(d7,{key:0,title:d.title,level:3,items:(p=d.list)==null?void 0:p.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(Ie),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=p=>u.value=!0),onEnd:m[1]||(m[1]=p=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:p})=>{var f,b,C,v,k,_,g,x,V;return[e.createVNode(to,{class:e.normalizeClass(s(p)?"ao-list-draggable":""),id:p.id,name:p.name,"project-name":(f=p.project)==null?void 0:f.name,"project-color":(b=p.project)==null?void 0:b.color,"phase-name":(v=(C=p.milestone)==null?void 0:C.phase)==null?void 0:v.name,"milestone-name":(k=p.milestone)==null?void 0:k.name,"milestone-color":(_=p.milestone)==null?void 0:_.color,deadline:p.deadline,rules:((g=p.rules)==null?void 0:g.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(x=p.comments)==null?void 0:x.length,attachments:(V=p.attachments)==null?void 0:V.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[S=>s(p)&&l(S),()=>s(p)&&l],onClick:()=>i(p.id),onRemoveAssignee:()=>s(p)&&l({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(p)&&p.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(p)&&!p.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",k7,[e.createVNode(J,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",$7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",E7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",B7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",V7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(ze,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=p=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),f4="",x7={class:"ao-field ao-search-field"},N7=["value","placeholder","onKeypress"],M7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const c=i.target.value;t("update:modelValue",c,i)},n=g7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",x7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(n)&&e.unref(n)(...c)),onKeypress:e.withKeys(r,["enter"])},null,40,N7),e.createVNode(J,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),h4="",A7={class:"ao-feed"},T7={class:"ao-feed__filters"},O7={class:"ao-feed__body"},mo=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=yt.useRoute();e.onMounted(()=>{console.log(n),console.log(n.params);const $=n.params.activitySlug;if(console.log($),$){const w=s.value.find(h=>h.slug===$);console.log(JSON.stringify(w,null,2)),w&&i(w.id)}});const s=e.toRef(o,"activities"),i=async $=>{await t("selectActivity",$)},l=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([$,w,h],[E,j])=>{l.value=Object.fromEntries($.map(R=>[R.id,w.filter(K=>{var F;return((F=K.status)==null?void 0:F.id)===R.id})])),h&&!c.value&&(i(h),c.value=!0),u.value&&Ae(w,j)},{immediate:!0});const m=e.computed(()=>{var $;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${(($=o.selectedActivity.milestone.phase)==null?void 0:$.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=$=>{var R,K;const w=(R=o.activities)==null?void 0:R.at(-1),h=w?ue.LexoRank.parse(w.rank).genNext():ue.LexoRank.middle(),E=((K=o.activities)==null?void 0:K.length)??0,j={name:r("activity.defaultName",{idx:E+1}),rank:h.format(),statusId:$.id};o.filters.assigneeId.length>0&&(j.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(j.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(j.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",j)},f=($,w)=>{u.value=!1,t("update:filters",{...o.filters,[$]:w})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),C=e.computed(()=>b.value.map($=>({value:$.id,label:$.name}))),v=e.computed(()=>{var $;return($=o.activityTypes)==null?void 0:$.map(w=>({value:w.id,label:w.name}))}),k=e.computed(()=>o.users.map($=>({value:$.id,label:`${$.firstName} ${$.lastName}`,avatar:$.avatarUrl}))),_=$=>{o.selectedActivity&&t("update:activity",$)},g=$=>{t("update:activity",$)},x=$=>{t("archiveActivity",$)},V=$=>{t("unarchiveActivity",$)},S=$=>{u.value=!1,t("update:searchText",$)},O=$=>{u.value=!1,t("clear:searchText",$)},L=$=>{o.selectedActivity&&t("addSubtask",$)},D=$=>{o.selectedActivity&&t("updateSubtask",$)},B=$=>{o.selectedActivity&&t("deleteSubtask",$)},z=$=>{t("addFiles",$)},A=$=>{t("removeFile",$)},I=$=>{o.selectedActivity&&t("addComment",{...$,activityId:o.selectedActivity.id})},W=$=>{const{id:w}=o.selectedActivity||{};w&&t("updateComment",$)},Z=$=>{const{id:w}=o.selectedActivity||{};w&&t("removeComment",$)};return($,w)=>{var h;return e.openBlock(),e.createElementBlock("div",A7,[e.createVNode(oa,null,{primary:e.withCtx(()=>[e.createElementVNode("div",T7,[o.project?(e.openBlock(),e.createBlock(Nr,{key:0,"is-left":!1,"right-label":$.$t("project.switch.feed"),"left-label":$.$t("project.switch.overview"),"onUpdate:isLeft":w[0]||(w[0]=E=>{E&&$.$router.push({name:e.unref(Ce).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(M7,{"model-value":$.searchText,placeholder:$.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":S,onClear:O},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":$.filters[e.unref(Ke).project],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:$.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":w[1]||(w[1]=E=>f(e.unref(Ke).project,E))},null,8,["model-value","options","placeholder"])),v.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":$.filters[e.unref(Ke).type],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:$.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":w[2]||(w[2]=E=>f(e.unref(Ke).type,E))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),k.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":$.filters[e.unref(Ke).assignee],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:$.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":w[3]||(w[3]=E=>f(e.unref(Ke).assignee,E))},{tag:e.withCtx(({option:E,handleTagRemove:j})=>[e.createVNode(ye,{"user-name":E.label,"avatar-url":E.avatar,"is-closable":!0,onClose:R=>j(E,R)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":$.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":$.showsOnlyImportant,onClick:w[4]||(w[4]=E=>$.$emit("update:showsOnlyImportant",!$.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":$.showsArchivedActivities,onClick:w[5]||(w[5]=E=>$.$emit("update:showsArchivedActivities",!$.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",O7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.statuses,E=>(e.openBlock(),e.createBlock(S7,{key:E.id,status:E,list:l.value[E.id],title:E.name,"footer-label":$.$t("feed.activity.add"),users:$.users,"user-id":$.userId,"is-editable":$.isEditable,tagType:d.value,onAdd:()=>p(E),onSelectActivity:i,onArchiveActivity:x,onUnarchiveActivity:V,onUpdateActivity:g},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.selectedActivity?(e.openBlock(),e.createBlock(va,{key:0,activity:$.selectedActivity,"activity-types":$.activityTypes,"milestone-id":(h=$.selectedActivity.milestone)==null?void 0:h.id,"template-activities":s.value,users:$.users,"user-id":$.userId,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,breadcrumbs:m.value,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,projects:b.value,onClose:w[6]||(w[6]=()=>i(null)),"onUpdate:activity":_,onAddSubtask:L,onUpdateSubtask:D,onDeleteSubtask:B,onAddFiles:z,onRemoveFile:A,onAddComment:I,onUpdateComment:W,onRemoveComment:Z},{default:e.withCtx(E=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(E)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}}),g4="",at={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},L7=(a,t={})=>[{path:a,name:at.TEMPLATES,redirect:{name:at.TEMPLATES_LIST},...t,children:[{path:"",name:at.TEMPLATES_LIST,component:Tr},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:at.TEMPLATE_DETAILS,component:Sr,props:!0}]}],Ce={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},I7=(a,t={})=>[{path:a,...t,redirect:{name:Ce.project},children:[{path:"",name:Ce.project,component:ef,props:!0,children:[{path:":phaseId/:milestoneId",name:Ce.milestone,component:Ar,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ce.activity,props:{default:!0,modal:!0},components:{default:Ar,modal:l7}}]},{path:"feed",name:Ce.feed,component:mo,props:!0}]}],fo={feed:"AoFeed",activityDetail:"AoActivityDetails"},D7=(a,t={})=>[{path:a,...t,children:[{path:"",name:fo.feed,component:mo,props:!0},{path:":activitySlug",name:fo.activityDetail,component:va,props:!0}]}],z7={class:"ao-templates"},Tr=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:r}=et();e.watch(()=>o.templates,(l,c)=>{Ae(l,c)});const n=()=>{var m,p;const l=(m=o.templates)==null?void 0:m.at(-1),c=l?ue.LexoRank.parse(l.rank).genNext():ue.LexoRank.middle(),u=((p=o.templates)==null?void 0:p.length)??0,d={name:r("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},s=(l,c)=>{t("updateItem",{itemType:ee.TEMPLATES,id:l,templateId:l,data:{name:c}})},i=l=>{if(l.moved){const c=At(l,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",z7,[e.createVNode(oa,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(Ie),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(L0,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(l0)(u.phases):0,activities:u.phases?e.unref(c0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:m=>s(u.id,m),onClick:m=>l.$router.push({name:e.unref(at).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),_4="",P7={class:"ao-field__label"},Or=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",P7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),H7=["type","value","disabled","readonly"],j7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(Or,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,H7)]),_:1},8,["label"]))}}),R7={class:"ao-field"},F7={class:"ao-field__label"},U7=["checked","disabled"],Z7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",R7,[e.createElementVNode("span",F7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,U7)]))}});Y.AoAvatar=ye,Y.AoCardFeed=to,Y.AoCheckboxField=Z7,Y.AoFeed=mo,Y.AoField=Or,Y.AoInputField=j7,Y.AoMultiselect=ie,Y.AoProjectPhases=xr,Y.AoTemplateDetails=Sr,Y.AoTemplates=Rr,Y.AoTemplatesList=Tr,Y.TemplateItemTypeEnum=No,Y.activityFeedRoute=fo,Y.activityFeedStatus=$d,Y.durationTypes=kd,Y.feedFilterTypes=Ke,Y.getActivityFeedRoutes=D7,Y.getProjectOverviewRoutes=I7,Y.getTemplateRoutes=L7,Y.listUpdateTypes=Ed,Y.milestoneStatus=Wt,Y.projectOverviewRoutes=Ce,Y.ruleComparators=Vo,Y.ruleDurationUnits=xo,Y.ruleTriggerTypes=So,Y.templateItemType=ee,Y.templateRouteNames=at,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-ND-4.0",
6
6
  "author": "26lights <dev@26lights.com> (https://www.26lights.com)",
7
- "version": "0.37.19",
7
+ "version": "0.37.20",
8
8
  "workspaces": [
9
9
  "packages/*"
10
10
  ],
@@ -27,7 +27,7 @@
27
27
  "vuedraggable": "~4.1.0"
28
28
  },
29
29
  "dependencies": {
30
- "@26lights/orcha": "^0.37.19",
30
+ "@26lights/orcha": "^0.37.20",
31
31
  "@floating-ui/dom": "^1.5.3",
32
32
  "@vueform/multiselect": "^2.6.6",
33
33
  "@vueuse/core": "^10.8.0",