@26lights/orcha 0.37.24 → 0.37.25
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 +1 -1
- package/dist/orcha.es.js +1 -1
- package/dist/orcha.umd.js +1 -1
- package/package.json +2 -2
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=Ko(a):typeof a=="string"?t=Ko(`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 fo(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 xa(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 Ko(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 vo=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),xa("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),xa("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)}vo.render=dv;vo.__file="src/color/Saturation.vue";var ho=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)}ho.render=mv;ho.__file="src/color/Hue.vue";var Co=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=fo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),xa("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)}Co.render=fv;Co.__file="src/color/Alpha.vue";var go=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=fo(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")}go.render=vv;go.__file="src/color/Preview.vue";var _o=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,b]=d.data;b=parseFloat((b/255).toFixed(2));const y=this.suckerPreview.style;Object.assign(y,{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}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?y.display="":y.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,b,y]=p.data;y=parseFloat((y/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b,a:y})}))}}});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)])}_o.render=_v;_o.__file="src/color/Sucker.vue";var yo=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]])])}yo.render=wv;yo.__file="src/color/Box.vue";var bo=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=fo(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)])}bo.render=$v;bo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:vo,Hue:ho,Alpha:Co,Preview:go,Sucker:_o,Box:yo,Colors:bo},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=T(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"},Go=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 g;return(g=o.phases)==null?void 0:g.find(C=>C.id===o.phaseId)}),i=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(C=>C.milestones)}),r=e.computed(()=>{var g;return(g=i.value)==null?void 0:g.find(C=>C.id===o.milestoneId)}),l=e.computed(()=>{var g;return(g=r.value)==null?void 0:g.activities});e.watch(l,(g,C)=>{Me(g,C)});const c=g=>{t("close",g)},u=()=>{const{name:g,rank:C}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:g,rank:C,projectId:o.projectId})},d=g=>{t("updateActivity",g)},p=g=>{l.value&&"moved"in g&&t("updateActivity",{id:g.moved.element.id,rank:mt(l.value,g.moved.newIndex)})},m=e.computed({get:()=>{var g;return(g=r.value)==null?void 0:g.color},set:g=>{r.value&&t("updateMilestone",{id:r.value.id,color:g})}}),f=e.computed({get:()=>{var g;return((g=r==null?void 0:r.value)==null?void 0:g.deadline)??""},set:g=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:g!=null&&g.length?g:null})}}),b=g=>o.closedStatus?Ga(g,o.closedStatus):!1,y=e.computed(()=>{var g;return((g=o.users)==null?void 0:g.map(C=>({label:`${C.firstName} ${C.lastName}`,value:C.id,avatar:C.avatarUrl})))||[]}),_=e.computed({get(){var g,C;return(C=(g=r.value)==null?void 0:g.assignee)!=null&&C.id?[r.value.assignee.id]:[]},set(g){t("updateMilestone",{id:o.milestoneId,assigneeId:g[0]??null})}}),k=e.computed({get(){var g;return((g=r.value)==null?void 0:g.important)??!1},set(g){t("updateMilestone",{id:o.milestoneId,important:g})}});return(g,C)=>{var S;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:((S=r.value)==null?void 0:S.name)||g.milestoneId,level:5},null,8,["title"]),e.createVNode(za,{modelValue:k.value,"onUpdate:modelValue":C[0]||(C[0]=B=>k.value=B),modelModifiers:{lazy:!0},disabled:!g.isEditable,class:"ao-milestone__important",color:"danger",label:g.$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":C[1]||(C[1]=B=>f.value=B),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:_.value,"onUpdate:modelValue":C[2]||(C[2]=B=>_.value=B),options:y.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:g.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!g.isEditable,caret:g.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(we,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:I=>V(B,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Av,{color:m.value,"onUpdate:color":C[3]||(C[3]=B=>m.value=B)},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:!g.isEditable,"item-key":"id",group:"kanban"},g.$attrs,{onChange:p}),{item:e.withCtx(({element:B})=>{var V,I,L,P,E;return[e.createVNode(po,{id:B.id,name:B.name||B.id,"phase-name":(V=s.value)==null?void 0:V.name,"milestone-name":(I=r.value)==null?void 0:I.name,"milestone-color":(L=r.value)==null?void 0:L.color,deadline:B.deadline,important:B.important,users:g.users,assignee:B.assignee,slug:B.slug,comments:(P=B.comments)==null?void 0:P.length,attachments:(E=B.attachments)==null?void 0:E.length,tasks:B.tasks,"is-editable":g.isEditable,"is-private":B.private,"is-closed":b(B),onClick:H=>g.$router.push({name:e.unref(be).activity,params:{milestoneId:g.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[g.isEditable?{name:"secondary",fn:e.withCtx(()=>[g.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("archive"),onClick:e.withModifiers(()=>g.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),g.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>g.$emit("unarchiveActivity",{id:B.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"]),g.isEditable?(e.openBlock(),e.createElementBlock("div",Zv,[e.createVNode(We,{"icon-name":"Add",label:g.$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 _;return(_=o.phases)==null?void 0:_.find(k=>k.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(k=>k.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(k=>k.id===o.milestoneId)}),r=e.computed(()=>{var _;return(_=o.activities)==null?void 0:_.find(k=>k.id===o.activityId)}),l=_=>{t("update:activity",_)},c=_=>{t("addSubtask",_)},u=_=>{t("updateSubtask",_)},d=_=>{t("deleteSubtask",_)},p=_=>{t("addFiles",_)},m=_=>{t("removeFile",_)},f=_=>{t("addComment",_)},b=_=>{t("updateComment",_)},y=_=>{t("removeComment",_)};return(_,k)=>{var g,C;return r.value?(e.openBlock(),e.createBlock($a,{key:0,activity:r.value,"activity-types":_.activityTypes,"milestone-id":_.milestoneId,"template-activities":_.activities,"is-template":!1,users:_.users,"user-id":_.userId,"is-task-checkable":_.isTaskCheckable,statuses:_.statuses,breadcrumbs:`${(g=n.value)==null?void 0:g.name} / ${(C=i.value)==null?void 0:C.name}`,"is-editable":_.isEditable,"attachment-enabled":_.attachmentEnabled,projects:[_.project],onClose:_.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:b,onRemoveComment:y},{default:e.withCtx(S=>[e.renderSlot(_.$slots,"default",e.normalizeProps(e.guardReactiveProps(S)))]),_: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(pa,{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 ua(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=ua(a),u=ua(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 Ha(a){var t;const o=ua(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 b=ua(a);return(Array.isArray(b)?b:[b]).map(Ha).filter(Kv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Ha(n),p.value],([b,y])=>{if(d(),!p.value||!b.length)return;const _=new IntersectionObserver(t,{root:Ha(y),rootMargin:s,threshold:i});b.forEach(k=>k&&_.observe(k)),d=()=>{_.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,b,y,_,k,g,C,S,B;return[e.createVNode(po,{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":(b=m.project)==null?void 0:b.color,"phase-name":(_=(y=m.milestone)==null?void 0:y.phase)==null?void 0:_.name,"milestone-name":(k=m.milestone)==null?void 0:k.name,"milestone-color":(g=m.milestone)==null?void 0:g.color,deadline:m.deadline,rules:((C=m.rules)==null?void 0:C.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(S=m.comments)==null?void 0:S.length,attachments:(B=m.attachments)==null?void 0:B.length,users:d.users,assignee:m.assignee,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[V=>i(m)&&l(V),()=>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","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"},wo=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=Ra.useRoute(),i=Ra.useRouter();e.onMounted(()=>{console.log(s.matched),console.log(s.params);const h=s.params.activitySlug;if(console.log(h),h){const v=r.value.find($=>$.slug===h);console.log(JSON.stringify(v,null,2)),v&&(l(v.id),i.push({name:Tt.activity,params:{activitySlug:v.slug}}))}});const r=e.toRef(o,"activities"),l=async h=>{await t("selectActivity",h)},c=e.ref({}),u=e.ref(!1),d=e.ref(!1),p=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([h,v,$],[O,F])=>{c.value=Object.fromEntries(h.map(q=>[q.id,v.filter(U=>{var Y;return((Y=U.status)==null?void 0:Y.id)===q.id})])),$&&!u.value&&(l($),u.value=!0),d.value&&Me(v,F)},{immediate:!0});const m=e.computed(()=>{var h;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((h=o.selectedActivity.milestone.phase)==null?void 0:h.name)??""} / ${o.selectedActivity.milestone.name??""}`}),f=h=>{var q,U;const v=(q=o.activities)==null?void 0:q.at(-1),$=v?pe.LexoRank.parse(v.rank).genNext():pe.LexoRank.middle(),O=((U=o.activities)==null?void 0:U.length)??0,F={name:n("activity.defaultName",{idx:O+1}),rank:$.format(),statusId:h.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]),d.value=!0,t("addActivity",F)},b=(h,v)=>{d.value=!1,t("update:filters",{...o.filters,[h]:v})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(h=>({value:h.id,label:h.name}))),k=e.computed(()=>{var h;return(h=o.activityTypes)==null?void 0:h.map(v=>({value:v.id,label:v.name}))}),g=e.computed(()=>o.users.map(h=>({value:h.id,label:`${h.firstName} ${h.lastName}`,avatar:h.avatarUrl}))),C=h=>{o.selectedActivity&&t("update:activity",h)},S=h=>{t("update:activity",h)},B=h=>{t("archiveActivity",h)},V=h=>{t("unarchiveActivity",h)},I=h=>{d.value=!1,t("update:searchText",h)},L=h=>{d.value=!1,t("clear:searchText",h)},P=h=>{o.selectedActivity&&t("addSubtask",h)},E=h=>{o.selectedActivity&&t("updateSubtask",h)},H=h=>{o.selectedActivity&&t("deleteSubtask",h)},A=h=>{t("addFiles",h)},D=h=>{t("removeFile",h)},W=h=>{o.selectedActivity&&t("addComment",{...h,activityId:o.selectedActivity.id})},x=h=>{const{id:v}=o.selectedActivity||{};v&&t("updateComment",h)},Z=h=>{const{id:v}=o.selectedActivity||{};v&&t("removeComment",h)};return(h,v)=>{var $;return e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(ga,null,{primary:e.withCtx(()=>[e.createElementVNode("div",v9,[o.project?(e.openBlock(),e.createBlock(Rn,{key:0,"is-left":!1,"right-label":h.$t("project.switch.feed"),"left-label":h.$t("project.switch.overview"),"onUpdate:isLeft":v[0]||(v[0]=O=>{O&&h.$router.push({name:e.unref(be).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(p9,{"model-value":h.searchText,placeholder:h.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":I,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":h.filters[e.unref(Qe).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:h.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":v[1]||(v[1]=O=>b(e.unref(Qe).project,O))},null,8,["model-value","options","placeholder"])),k.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":h.filters[e.unref(Qe).type],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:h.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":v[2]||(v[2]=O=>b(e.unref(Qe).type,O))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),g.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":h.filters[e.unref(Qe).assignee],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:h.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":v[3]||(v[3]=O=>b(e.unref(Qe).assignee,O))},{tag:e.withCtx(({option:O,handleTagRemove:F})=>[e.createVNode(we,{"user-name":O.label,"avatar-url":O.avatar,"is-closable":!0,onClose:q=>F(O,q)},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":h.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":h.showsOnlyImportant,onClick:v[4]||(v[4]=O=>h.$emit("update:showsOnlyImportant",!h.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":h.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":h.showsArchivedActivities,onClick:v[5]||(v[5]=O=>h.$emit("update:showsArchivedActivities",!h.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",h9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.statuses,O=>(e.openBlock(),e.createBlock(d9,{key:O.id,status:O,list:c.value[O.id],title:O.name,"footer-label":h.$t("feed.activity.add"),users:h.users,"user-id":h.userId,"is-editable":h.isEditable,tagType:p.value,onAdd:()=>f(O),onSelectActivity:l,onArchiveActivity:B,onUnarchiveActivity:V,onUpdateActivity:S},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[h.selectedActivity?(e.openBlock(),e.createBlock($a,{key:0,activity:h.selectedActivity,"activity-types":h.activityTypes,"milestone-id":($=h.selectedActivity.milestone)==null?void 0:$.id,"template-activities":r.value,users:h.users,"user-id":h.userId,"is-task-checkable":h.isTaskCheckable,statuses:h.statuses,breadcrumbs:m.value,"is-editable":h.isEditable,"attachment-enabled":h.attachmentEnabled,projects:y.value,onClose:v[6]||(v[6]=()=>l(null)),"onUpdate:activity":C,onAddSubtask:P,onUpdateSubtask:E,onDeleteSubtask:H,onAddFiles:A,onRemoveFile:D,onAddComment:W,onUpdateComment:x,onRemoveComment:Z},{default:e.withCtx(O=>[e.renderSlot(h.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(O)))]),_: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}]}],be={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},g9=(a,t={})=>[{path:a,...t,redirect:{name:be.project},children:[{path:"",name:be.project,component:Pf,props:!0,children:[{path:":phaseId/:milestoneId",name:be.milestone,component:Go,props:!0},{path:":phaseId/:milestoneId/:activityId",name:be.activity,props:{default:!0,modal:!0},components:{default:Go,modal:zv}}]},{path:"feed",name:be.feed,component:wo,props:!0}]}],Tt={feed:"AoFeed",activity:"AoActivityDetails"},_9=(a,t={})=>[{path:a,redirect:{name:Tt.feed},...t,children:[{path:"",name:Tt.feed,component:wo,props:!0},{path:":activitySlug",name:Tt.activity,component:$a,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=Ft(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(ga,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=po;exports.AoCheckboxField=V9;exports.AoFeed=wo;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.activityFeedRoutes=Tt;exports.activityFeedStatus=s2;exports.durationTypes=n2;exports.feedFilterTypes=Qe;exports.getActivityFeedRoutes=_9;exports.getProjectOverviewRoutes=g9;exports.getTemplateRoutes=C9;exports.listUpdateTypes=r2;exports.milestoneStatus=oa;exports.projectOverviewRoutes=be;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=Ko(a):typeof a=="string"?t=Ko(`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 fo(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 xa(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 Ko(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 vo=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),xa("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),xa("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)}vo.render=dv;vo.__file="src/color/Saturation.vue";var ho=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)}ho.render=mv;ho.__file="src/color/Hue.vue";var Co=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=fo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),xa("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)}Co.render=fv;Co.__file="src/color/Alpha.vue";var go=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=fo(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")}go.render=vv;go.__file="src/color/Preview.vue";var _o=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,b]=d.data;b=parseFloat((b/255).toFixed(2));const y=this.suckerPreview.style;Object.assign(y,{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}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?y.display="":y.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,b,y]=p.data;y=parseFloat((y/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b,a:y})}))}}});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)])}_o.render=_v;_o.__file="src/color/Sucker.vue";var yo=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]])])}yo.render=wv;yo.__file="src/color/Box.vue";var bo=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=fo(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)])}bo.render=$v;bo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:vo,Hue:ho,Alpha:Co,Preview:go,Sucker:_o,Box:yo,Colors:bo},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=T(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"},Go=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 g;return(g=o.phases)==null?void 0:g.find(C=>C.id===o.phaseId)}),i=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(C=>C.milestones)}),r=e.computed(()=>{var g;return(g=i.value)==null?void 0:g.find(C=>C.id===o.milestoneId)}),l=e.computed(()=>{var g;return(g=r.value)==null?void 0:g.activities});e.watch(l,(g,C)=>{Me(g,C)});const c=g=>{t("close",g)},u=()=>{const{name:g,rank:C}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:g,rank:C,projectId:o.projectId})},d=g=>{t("updateActivity",g)},p=g=>{l.value&&"moved"in g&&t("updateActivity",{id:g.moved.element.id,rank:mt(l.value,g.moved.newIndex)})},m=e.computed({get:()=>{var g;return(g=r.value)==null?void 0:g.color},set:g=>{r.value&&t("updateMilestone",{id:r.value.id,color:g})}}),f=e.computed({get:()=>{var g;return((g=r==null?void 0:r.value)==null?void 0:g.deadline)??""},set:g=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:g!=null&&g.length?g:null})}}),b=g=>o.closedStatus?Ga(g,o.closedStatus):!1,y=e.computed(()=>{var g;return((g=o.users)==null?void 0:g.map(C=>({label:`${C.firstName} ${C.lastName}`,value:C.id,avatar:C.avatarUrl})))||[]}),_=e.computed({get(){var g,C;return(C=(g=r.value)==null?void 0:g.assignee)!=null&&C.id?[r.value.assignee.id]:[]},set(g){t("updateMilestone",{id:o.milestoneId,assigneeId:g[0]??null})}}),k=e.computed({get(){var g;return((g=r.value)==null?void 0:g.important)??!1},set(g){t("updateMilestone",{id:o.milestoneId,important:g})}});return(g,C)=>{var S;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:((S=r.value)==null?void 0:S.name)||g.milestoneId,level:5},null,8,["title"]),e.createVNode(za,{modelValue:k.value,"onUpdate:modelValue":C[0]||(C[0]=B=>k.value=B),modelModifiers:{lazy:!0},disabled:!g.isEditable,class:"ao-milestone__important",color:"danger",label:g.$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":C[1]||(C[1]=B=>f.value=B),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:_.value,"onUpdate:modelValue":C[2]||(C[2]=B=>_.value=B),options:y.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:g.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!g.isEditable,caret:g.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(we,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:I=>V(B,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Av,{color:m.value,"onUpdate:color":C[3]||(C[3]=B=>m.value=B)},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:!g.isEditable,"item-key":"id",group:"kanban"},g.$attrs,{onChange:p}),{item:e.withCtx(({element:B})=>{var V,I,L,P,E;return[e.createVNode(po,{id:B.id,name:B.name||B.id,"phase-name":(V=s.value)==null?void 0:V.name,"milestone-name":(I=r.value)==null?void 0:I.name,"milestone-color":(L=r.value)==null?void 0:L.color,deadline:B.deadline,important:B.important,users:g.users,assignee:B.assignee,slug:B.slug,comments:(P=B.comments)==null?void 0:P.length,attachments:(E=B.attachments)==null?void 0:E.length,tasks:B.tasks,"is-editable":g.isEditable,"is-private":B.private,"is-closed":b(B),onClick:H=>g.$router.push({name:e.unref(be).activity,params:{milestoneId:g.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[g.isEditable?{name:"secondary",fn:e.withCtx(()=>[g.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("archive"),onClick:e.withModifiers(()=>g.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),g.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>g.$emit("unarchiveActivity",{id:B.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"]),g.isEditable?(e.openBlock(),e.createElementBlock("div",Zv,[e.createVNode(We,{"icon-name":"Add",label:g.$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 _;return(_=o.phases)==null?void 0:_.find(k=>k.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(k=>k.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(k=>k.id===o.milestoneId)}),r=e.computed(()=>{var _;return(_=o.activities)==null?void 0:_.find(k=>k.id===o.activityId)}),l=_=>{t("update:activity",_)},c=_=>{t("addSubtask",_)},u=_=>{t("updateSubtask",_)},d=_=>{t("deleteSubtask",_)},p=_=>{t("addFiles",_)},m=_=>{t("removeFile",_)},f=_=>{t("addComment",_)},b=_=>{t("updateComment",_)},y=_=>{t("removeComment",_)};return(_,k)=>{var g,C;return r.value?(e.openBlock(),e.createBlock($a,{key:0,activity:r.value,"activity-types":_.activityTypes,"milestone-id":_.milestoneId,"template-activities":_.activities,"is-template":!1,users:_.users,"user-id":_.userId,"is-task-checkable":_.isTaskCheckable,statuses:_.statuses,breadcrumbs:`${(g=n.value)==null?void 0:g.name} / ${(C=i.value)==null?void 0:C.name}`,"is-editable":_.isEditable,"attachment-enabled":_.attachmentEnabled,projects:[_.project],onClose:_.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:b,onRemoveComment:y},{default:e.withCtx(S=>[e.renderSlot(_.$slots,"default",e.normalizeProps(e.guardReactiveProps(S)))]),_: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(pa,{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 ua(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=ua(a),u=ua(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 Ha(a){var t;const o=ua(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 b=ua(a);return(Array.isArray(b)?b:[b]).map(Ha).filter(Kv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Ha(n),p.value],([b,y])=>{if(d(),!p.value||!b.length)return;const _=new IntersectionObserver(t,{root:Ha(y),rootMargin:s,threshold:i});b.forEach(k=>k&&_.observe(k)),d=()=>{_.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,b,y,_,k,g,C,S,B;return[e.createVNode(po,{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":(b=m.project)==null?void 0:b.color,"phase-name":(_=(y=m.milestone)==null?void 0:y.phase)==null?void 0:_.name,"milestone-name":(k=m.milestone)==null?void 0:k.name,"milestone-color":(g=m.milestone)==null?void 0:g.color,deadline:m.deadline,rules:((C=m.rules)==null?void 0:C.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(S=m.comments)==null?void 0:S.length,attachments:(B=m.attachments)==null?void 0:B.length,users:d.users,assignee:m.assignee,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[V=>i(m)&&l(V),()=>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","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"},wo=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=Ra.useRoute(),i=Ra.useRouter();e.onMounted(()=>{console.log(s.matched),console.log(s.params);const h=s.params.id;if(console.log(h),h){const v=r.value.find($=>$.slug===h);console.log(JSON.stringify(v,null,2)),v&&(l(v.id),i.push({name:Tt.activity,params:{activitySlug:v.slug}}))}});const r=e.toRef(o,"activities"),l=async h=>{await t("selectActivity",h)},c=e.ref({}),u=e.ref(!1),d=e.ref(!1),p=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([h,v,$],[O,F])=>{c.value=Object.fromEntries(h.map(q=>[q.id,v.filter(U=>{var Y;return((Y=U.status)==null?void 0:Y.id)===q.id})])),$&&!u.value&&(l($),u.value=!0),d.value&&Me(v,F)},{immediate:!0});const m=e.computed(()=>{var h;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((h=o.selectedActivity.milestone.phase)==null?void 0:h.name)??""} / ${o.selectedActivity.milestone.name??""}`}),f=h=>{var q,U;const v=(q=o.activities)==null?void 0:q.at(-1),$=v?pe.LexoRank.parse(v.rank).genNext():pe.LexoRank.middle(),O=((U=o.activities)==null?void 0:U.length)??0,F={name:n("activity.defaultName",{idx:O+1}),rank:$.format(),statusId:h.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]),d.value=!0,t("addActivity",F)},b=(h,v)=>{d.value=!1,t("update:filters",{...o.filters,[h]:v})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(h=>({value:h.id,label:h.name}))),k=e.computed(()=>{var h;return(h=o.activityTypes)==null?void 0:h.map(v=>({value:v.id,label:v.name}))}),g=e.computed(()=>o.users.map(h=>({value:h.id,label:`${h.firstName} ${h.lastName}`,avatar:h.avatarUrl}))),C=h=>{o.selectedActivity&&t("update:activity",h)},S=h=>{t("update:activity",h)},B=h=>{t("archiveActivity",h)},V=h=>{t("unarchiveActivity",h)},I=h=>{d.value=!1,t("update:searchText",h)},L=h=>{d.value=!1,t("clear:searchText",h)},P=h=>{o.selectedActivity&&t("addSubtask",h)},E=h=>{o.selectedActivity&&t("updateSubtask",h)},H=h=>{o.selectedActivity&&t("deleteSubtask",h)},A=h=>{t("addFiles",h)},D=h=>{t("removeFile",h)},W=h=>{o.selectedActivity&&t("addComment",{...h,activityId:o.selectedActivity.id})},x=h=>{const{id:v}=o.selectedActivity||{};v&&t("updateComment",h)},Z=h=>{const{id:v}=o.selectedActivity||{};v&&t("removeComment",h)};return(h,v)=>{var $;return e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(ga,null,{primary:e.withCtx(()=>[e.createElementVNode("div",v9,[o.project?(e.openBlock(),e.createBlock(Rn,{key:0,"is-left":!1,"right-label":h.$t("project.switch.feed"),"left-label":h.$t("project.switch.overview"),"onUpdate:isLeft":v[0]||(v[0]=O=>{O&&h.$router.push({name:e.unref(be).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(p9,{"model-value":h.searchText,placeholder:h.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":I,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":h.filters[e.unref(Qe).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:h.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":v[1]||(v[1]=O=>b(e.unref(Qe).project,O))},null,8,["model-value","options","placeholder"])),k.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":h.filters[e.unref(Qe).type],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:h.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":v[2]||(v[2]=O=>b(e.unref(Qe).type,O))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),g.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":h.filters[e.unref(Qe).assignee],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:h.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":v[3]||(v[3]=O=>b(e.unref(Qe).assignee,O))},{tag:e.withCtx(({option:O,handleTagRemove:F})=>[e.createVNode(we,{"user-name":O.label,"avatar-url":O.avatar,"is-closable":!0,onClose:q=>F(O,q)},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":h.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":h.showsOnlyImportant,onClick:v[4]||(v[4]=O=>h.$emit("update:showsOnlyImportant",!h.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":h.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":h.showsArchivedActivities,onClick:v[5]||(v[5]=O=>h.$emit("update:showsArchivedActivities",!h.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",h9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.statuses,O=>(e.openBlock(),e.createBlock(d9,{key:O.id,status:O,list:c.value[O.id],title:O.name,"footer-label":h.$t("feed.activity.add"),users:h.users,"user-id":h.userId,"is-editable":h.isEditable,tagType:p.value,onAdd:()=>f(O),onSelectActivity:l,onArchiveActivity:B,onUnarchiveActivity:V,onUpdateActivity:S},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[h.selectedActivity?(e.openBlock(),e.createBlock($a,{key:0,activity:h.selectedActivity,"activity-types":h.activityTypes,"milestone-id":($=h.selectedActivity.milestone)==null?void 0:$.id,"template-activities":r.value,users:h.users,"user-id":h.userId,"is-task-checkable":h.isTaskCheckable,statuses:h.statuses,breadcrumbs:m.value,"is-editable":h.isEditable,"attachment-enabled":h.attachmentEnabled,projects:y.value,onClose:v[6]||(v[6]=()=>l(null)),"onUpdate:activity":C,onAddSubtask:P,onUpdateSubtask:E,onDeleteSubtask:H,onAddFiles:A,onRemoveFile:D,onAddComment:W,onUpdateComment:x,onRemoveComment:Z},{default:e.withCtx(O=>[e.renderSlot(h.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(O)))]),_: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}]}],be={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},g9=(a,t={})=>[{path:a,...t,redirect:{name:be.project},children:[{path:"",name:be.project,component:Pf,props:!0,children:[{path:":phaseId/:milestoneId",name:be.milestone,component:Go,props:!0},{path:":phaseId/:milestoneId/:activityId",name:be.activity,props:{default:!0,modal:!0},components:{default:Go,modal:zv}}]},{path:"feed",name:be.feed,component:wo,props:!0}]}],Tt={feed:"AoFeed",activity:"AoActivityDetails"},_9=(a,t={})=>[{path:a,redirect:{name:Tt.feed},...t,children:[{path:"",name:Tt.feed,component:wo,props:!0},{path:":activitySlug",name:Tt.activity,component:$a,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=Ft(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(ga,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=po;exports.AoCheckboxField=V9;exports.AoFeed=wo;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.activityFeedRoutes=Tt;exports.activityFeedStatus=s2;exports.durationTypes=n2;exports.feedFilterTypes=Qe;exports.getActivityFeedRoutes=_9;exports.getProjectOverviewRoutes=g9;exports.getTemplateRoutes=C9;exports.listUpdateTypes=r2;exports.milestoneStatus=oa;exports.projectOverviewRoutes=be;exports.ruleComparators=en;exports.ruleDurationUnits=an;exports.ruleTriggerTypes=tn;exports.templateItemType=J;exports.templateRouteNames=et;
|
package/dist/orcha.es.js
CHANGED
|
@@ -11976,7 +11976,7 @@ const t8 = { class: "ao-feed" }, a8 = { class: "ao-feed__filters" }, n8 = { clas
|
|
|
11976
11976
|
const a = t, { t: n } = Ot(), s = Fi(), o = Ui();
|
|
11977
11977
|
Mt(() => {
|
|
11978
11978
|
console.log(s.matched), console.log(s.params);
|
|
11979
|
-
const C = s.params.
|
|
11979
|
+
const C = s.params.id;
|
|
11980
11980
|
if (console.log(C), C) {
|
|
11981
11981
|
const m = i.value.find((E) => E.slug === C);
|
|
11982
11982
|
console.log(JSON.stringify(m, null, 2)), m && (r(m.id), o.push({
|
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 oo(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 ro(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 no=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),ro("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),ro("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)}no.render=Sf,no.__file="src/color/Saturation.vue";var io=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)}io.render=Nf,io.__file="src/color/Hue.vue";var so=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=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),ro("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)}so.render=Af,so.__file="src/color/Alpha.vue";var lo=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=oo(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")}lo.render=Tf,lo.__file="src/color/Preview.vue";var co=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,y]=d.data;y=parseFloat((y/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{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}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.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,y,b]=m.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b:y,a:b})}))}}});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)])}co.render=Df,co.__file="src/color/Sucker.vue";var uo=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]])])}uo.render=Hf,uo.__file="src/color/Box.vue";var po=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=oo(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)])}po.render=Ff,po.__file="src/color/Colors.vue";var vt=e.defineComponent({components:{Saturation:no,Hue:io,Alpha:so,Preview:lo,Sucker:co,Box:uo,Colors:po},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)}vt.render=Zf,vt.__file="src/color/ColorPicker.vue",vt.install=a=>{a.component(vt.name,vt)};const d4="",u4="",Wf={props:{color:{type:String,required:!0}},components:{ColorPicker:vt},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=A(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 v;return(v=o.phases)==null?void 0:v.find(_=>_.id===o.phaseId)}),s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(_=>_.milestones)}),i=e.computed(()=>{var v;return(v=s.value)==null?void 0:v.find(_=>_.id===o.milestoneId)}),l=e.computed(()=>{var v;return(v=i.value)==null?void 0:v.activities});e.watch(l,(v,_)=>{Ae(v,_)});const c=v=>{t("close",v)},u=()=>{const{name:v,rank:_}=_t(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:_,projectId:o.projectId})},d=v=>{t("updateActivity",v)},m=v=>{l.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:ct(l.value,v.moved.newIndex)})},p=e.computed({get:()=>{var v;return(v=i.value)==null?void 0:v.color},set:v=>{i.value&&t("updateMilestone",{id:i.value.id,color:v})}}),f=e.computed({get:()=>{var v;return((v=i==null?void 0:i.value)==null?void 0:v.deadline)??""},set:v=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:v!=null&&v.length?v:null})}}),y=v=>o.closedStatus?La(v,o.closedStatus):!1,b=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(_=>({label:`${_.firstName} ${_.lastName}`,value:_.id,avatar:_.avatarUrl})))||[]}),C=e.computed({get(){var v,_;return(_=(v=i.value)==null?void 0:v.assignee)!=null&&_.id?[i.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),k=e.computed({get(){var v;return((v=i.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}});return(v,_)=>{var S;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:((S=i.value)==null?void 0:S.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(Ja,{modelValue:k.value,"onUpdate:modelValue":_[0]||(_[0]=B=>k.value=B),modelModifiers:{lazy:!0},disabled:!v.isEditable,class:"ao-milestone__important",color:"danger",label:v.$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":_[1]||(_[1]=B=>f.value=B),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:C.value,"onUpdate:modelValue":_[2]||(_[2]=B=>C.value=B),options:b.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:v.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!v.isEditable,caret:v.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(be,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:O=>V(B,O)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Kf,{color:p.value,"onUpdate:color":_[3]||(_[3]=B=>p.value=B)},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:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,O,L,D,$;return[e.createVNode(ao,{id:B.id,name:B.name||B.id,"phase-name":(V=n.value)==null?void 0:V.name,"milestone-name":(O=i.value)==null?void 0:O.name,"milestone-color":(L=i.value)==null?void 0:L.color,deadline:B.deadline,important:B.important,users:v.users,assignee:B.assignee,slug:B.slug,comments:(D=B.comments)==null?void 0:D.length,attachments:($=B.attachments)==null?void 0:$.length,tasks:B.tasks,"is-editable":v.isEditable,"is-private":B.private,"is-closed":y(B),onClick:z=>v.$router.push({name:e.unref(Ee).activity,params:{milestoneId:v.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("archive"),onClick:e.withModifiers(()=>v.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>v.$emit("unarchiveActivity",{id:B.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"]),v.isEditable?(e.openBlock(),e.createElementBlock("div",s7,[e.createVNode(ze,{"icon-name":"Add",label:v.$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 C;return(C=o.phases)==null?void 0:C.find(k=>k.id===o.phaseId)}),n=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(k=>k.milestones)}),s=e.computed(()=>{var C;return(C=n.value)==null?void 0:C.find(k=>k.id===o.milestoneId)}),i=e.computed(()=>{var C;return(C=o.activities)==null?void 0:C.find(k=>k.id===o.activityId)}),l=C=>{t("update:activity",C)},c=C=>{t("addSubtask",C)},u=C=>{t("updateSubtask",C)},d=C=>{t("deleteSubtask",C)},m=C=>{t("addFiles",C)},p=C=>{t("removeFile",C)},f=C=>{t("addComment",C)},y=C=>{t("updateComment",C)},b=C=>{t("removeComment",C)};return(C,k)=>{var v,_;return i.value?(e.openBlock(),e.createBlock(Ca,{key:0,activity:i.value,"activity-types":C.activityTypes,"milestone-id":C.milestoneId,"template-activities":C.activities,"is-template":!1,users:C.users,"user-id":C.userId,"is-task-checkable":C.isTaskCheckable,statuses:C.statuses,breadcrumbs:`${(v=r.value)==null?void 0:v.name} / ${(_=s.value)==null?void 0:_.name}`,"is-editable":C.isEditable,"attachment-enabled":C.attachmentEnabled,projects:[C.project],onClose:C.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:y,onRemoveComment:b},{default:e.withCtx(S=>[e.renderSlot(C.$slots,"default",e.normalizeProps(e.guardReactiveProps(S)))]),_: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(Wt,{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 ba(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=ba(a),u=ba(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 mo(a){var t;const o=ba(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 y=ba(a);return(Array.isArray(y)?y:[y]).map(mo).filter(m7)});let d=Pt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,mo(r),m.value],([y,b])=>{if(d(),!m.value||!y.length)return;const C=new IntersectionObserver(t,{root:mo(b),rootMargin:n,threshold:s});y.forEach(k=>k&&C.observe(k)),d=()=>{C.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:ct(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:ct(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,y,b,C,k,v,_,S,B;return[e.createVNode(ao,{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":(y=p.project)==null?void 0:y.color,"phase-name":(C=(b=p.milestone)==null?void 0:b.phase)==null?void 0:C.name,"milestone-name":(k=p.milestone)==null?void 0:k.name,"milestone-color":(v=p.milestone)==null?void 0:v.color,deadline:p.deadline,rules:((_=p.rules)==null?void 0:_.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(S=p.comments)==null?void 0:S.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[V=>s(p)&&l(V),()=>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","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"},fo=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=it.useRoute(),s=it.useRouter();e.onMounted(()=>{console.log(n.matched),console.log(n.params);const g=n.params.activitySlug;if(console.log(g),g){const h=i.value.find(E=>E.slug===g);console.log(JSON.stringify(h,null,2)),h&&(l(h.id),s.push({name:Ht.activity,params:{activitySlug:h.slug}}))}});const i=e.toRef(o,"activities"),l=async g=>{await t("selectActivity",g)},c=e.ref({}),u=e.ref(!1),d=e.ref(!1),m=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([g,h,E],[T,j])=>{c.value=Object.fromEntries(g.map(q=>[q.id,h.filter(R=>{var Y;return((Y=R.status)==null?void 0:Y.id)===q.id})])),E&&!u.value&&(l(E),u.value=!0),d.value&&Ae(h,j)},{immediate:!0});const p=e.computed(()=>{var g;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((g=o.selectedActivity.milestone.phase)==null?void 0:g.name)??""} / ${o.selectedActivity.milestone.name??""}`}),f=g=>{var q,R;const h=(q=o.activities)==null?void 0:q.at(-1),E=h?ue.LexoRank.parse(h.rank).genNext():ue.LexoRank.middle(),T=((R=o.activities)==null?void 0:R.length)??0,j={name:r("activity.defaultName",{idx:T+1}),rank:E.format(),statusId:g.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]),d.value=!0,t("addActivity",j)},y=(g,h)=>{d.value=!1,t("update:filters",{...o.filters,[g]:h})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),C=e.computed(()=>b.value.map(g=>({value:g.id,label:g.name}))),k=e.computed(()=>{var g;return(g=o.activityTypes)==null?void 0:g.map(h=>({value:h.id,label:h.name}))}),v=e.computed(()=>o.users.map(g=>({value:g.id,label:`${g.firstName} ${g.lastName}`,avatar:g.avatarUrl}))),_=g=>{o.selectedActivity&&t("update:activity",g)},S=g=>{t("update:activity",g)},B=g=>{t("archiveActivity",g)},V=g=>{t("unarchiveActivity",g)},O=g=>{d.value=!1,t("update:searchText",g)},L=g=>{d.value=!1,t("clear:searchText",g)},D=g=>{o.selectedActivity&&t("addSubtask",g)},$=g=>{o.selectedActivity&&t("updateSubtask",g)},z=g=>{o.selectedActivity&&t("deleteSubtask",g)},M=g=>{t("addFiles",g)},I=g=>{t("removeFile",g)},W=g=>{o.selectedActivity&&t("addComment",{...g,activityId:o.selectedActivity.id})},Z=g=>{const{id:h}=o.selectedActivity||{};h&&t("updateComment",g)},F=g=>{const{id:h}=o.selectedActivity||{};h&&t("removeComment",g)};return(g,h)=>{var E;return e.openBlock(),e.createElementBlock("div",A7,[e.createVNode(ra,null,{primary:e.withCtx(()=>[e.createElementVNode("div",T7,[o.project?(e.openBlock(),e.createBlock(Nr,{key:0,"is-left":!1,"right-label":g.$t("project.switch.feed"),"left-label":g.$t("project.switch.overview"),"onUpdate:isLeft":h[0]||(h[0]=T=>{T&&g.$router.push({name:e.unref(Ee).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(M7,{"model-value":g.searchText,placeholder:g.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":O,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":g.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:g.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":h[1]||(h[1]=T=>y(e.unref(Ke).project,T))},null,8,["model-value","options","placeholder"])),k.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":g.filters[e.unref(Ke).type],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:g.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":h[2]||(h[2]=T=>y(e.unref(Ke).type,T))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":g.filters[e.unref(Ke).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:g.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":h[3]||(h[3]=T=>y(e.unref(Ke).assignee,T))},{tag:e.withCtx(({option:T,handleTagRemove:j})=>[e.createVNode(be,{"user-name":T.label,"avatar-url":T.avatar,"is-closable":!0,onClose:q=>j(T,q)},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":g.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":g.showsOnlyImportant,onClick:h[4]||(h[4]=T=>g.$emit("update:showsOnlyImportant",!g.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":g.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":g.showsArchivedActivities,onClick:h[5]||(h[5]=T=>g.$emit("update:showsArchivedActivities",!g.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",O7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.statuses,T=>(e.openBlock(),e.createBlock(S7,{key:T.id,status:T,list:c.value[T.id],title:T.name,"footer-label":g.$t("feed.activity.add"),users:g.users,"user-id":g.userId,"is-editable":g.isEditable,tagType:m.value,onAdd:()=>f(T),onSelectActivity:l,onArchiveActivity:B,onUnarchiveActivity:V,onUpdateActivity:S},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[g.selectedActivity?(e.openBlock(),e.createBlock(Ca,{key:0,activity:g.selectedActivity,"activity-types":g.activityTypes,"milestone-id":(E=g.selectedActivity.milestone)==null?void 0:E.id,"template-activities":i.value,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:p.value,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:b.value,onClose:h[6]||(h[6]=()=>l(null)),"onUpdate:activity":_,onAddSubtask:D,onUpdateSubtask:$,onDeleteSubtask:z,onAddFiles:M,onRemoveFile:I,onAddComment:W,onUpdateComment:Z,onRemoveComment:F},{default:e.withCtx(T=>[e.renderSlot(g.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(T)))]),_: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}]}],Ee={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},I7=(a,t={})=>[{path:a,...t,redirect:{name:Ee.project},children:[{path:"",name:Ee.project,component:ef,props:!0,children:[{path:":phaseId/:milestoneId",name:Ee.milestone,component:Ar,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ee.activity,props:{default:!0,modal:!0},components:{default:Ar,modal:l7}}]},{path:"feed",name:Ee.feed,component:fo,props:!0}]}],Ht={feed:"AoFeed",activity:"AoActivityDetails"},D7=(a,t={})=>[{path:a,redirect:{name:Ht.feed},...t,children:[{path:"",name:Ht.feed,component:fo,props:!0},{path:":activitySlug",name:Ht.activity,component:Ca,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(ra,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)]))}});G.AoAvatar=be,G.AoCardFeed=ao,G.AoCheckboxField=Z7,G.AoFeed=fo,G.AoField=Or,G.AoInputField=j7,G.AoMultiselect=ie,G.AoProjectPhases=xr,G.AoTemplateDetails=Sr,G.AoTemplates=Rr,G.AoTemplatesList=Tr,G.TemplateItemTypeEnum=No,G.activityFeedRoutes=Ht,G.activityFeedStatus=$d,G.durationTypes=kd,G.feedFilterTypes=Ke,G.getActivityFeedRoutes=D7,G.getProjectOverviewRoutes=I7,G.getTemplateRoutes=L7,G.listUpdateTypes=Ed,G.milestoneStatus=qt,G.projectOverviewRoutes=Ee,G.ruleComparators=Vo,G.ruleDurationUnits=xo,G.ruleTriggerTypes=So,G.templateItemType=ee,G.templateRouteNames=at,Object.defineProperty(G,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 oo(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 ro(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 no=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),ro("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),ro("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)}no.render=Sf,no.__file="src/color/Saturation.vue";var io=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)}io.render=Nf,io.__file="src/color/Hue.vue";var so=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=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),ro("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)}so.render=Af,so.__file="src/color/Alpha.vue";var lo=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=oo(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")}lo.render=Tf,lo.__file="src/color/Preview.vue";var co=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,y]=d.data;y=parseFloat((y/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{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}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.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,y,b]=m.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b:y,a:b})}))}}});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)])}co.render=Df,co.__file="src/color/Sucker.vue";var uo=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]])])}uo.render=Hf,uo.__file="src/color/Box.vue";var po=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=oo(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)])}po.render=Ff,po.__file="src/color/Colors.vue";var vt=e.defineComponent({components:{Saturation:no,Hue:io,Alpha:so,Preview:lo,Sucker:co,Box:uo,Colors:po},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)}vt.render=Zf,vt.__file="src/color/ColorPicker.vue",vt.install=a=>{a.component(vt.name,vt)};const d4="",u4="",Wf={props:{color:{type:String,required:!0}},components:{ColorPicker:vt},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=A(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 v;return(v=o.phases)==null?void 0:v.find(_=>_.id===o.phaseId)}),s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(_=>_.milestones)}),i=e.computed(()=>{var v;return(v=s.value)==null?void 0:v.find(_=>_.id===o.milestoneId)}),l=e.computed(()=>{var v;return(v=i.value)==null?void 0:v.activities});e.watch(l,(v,_)=>{Ae(v,_)});const c=v=>{t("close",v)},u=()=>{const{name:v,rank:_}=_t(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:_,projectId:o.projectId})},d=v=>{t("updateActivity",v)},m=v=>{l.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:ct(l.value,v.moved.newIndex)})},p=e.computed({get:()=>{var v;return(v=i.value)==null?void 0:v.color},set:v=>{i.value&&t("updateMilestone",{id:i.value.id,color:v})}}),f=e.computed({get:()=>{var v;return((v=i==null?void 0:i.value)==null?void 0:v.deadline)??""},set:v=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:v!=null&&v.length?v:null})}}),y=v=>o.closedStatus?La(v,o.closedStatus):!1,b=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(_=>({label:`${_.firstName} ${_.lastName}`,value:_.id,avatar:_.avatarUrl})))||[]}),C=e.computed({get(){var v,_;return(_=(v=i.value)==null?void 0:v.assignee)!=null&&_.id?[i.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),k=e.computed({get(){var v;return((v=i.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}});return(v,_)=>{var S;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:((S=i.value)==null?void 0:S.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(Ja,{modelValue:k.value,"onUpdate:modelValue":_[0]||(_[0]=B=>k.value=B),modelModifiers:{lazy:!0},disabled:!v.isEditable,class:"ao-milestone__important",color:"danger",label:v.$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":_[1]||(_[1]=B=>f.value=B),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:C.value,"onUpdate:modelValue":_[2]||(_[2]=B=>C.value=B),options:b.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:v.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!v.isEditable,caret:v.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(be,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:O=>V(B,O)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Kf,{color:p.value,"onUpdate:color":_[3]||(_[3]=B=>p.value=B)},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:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,O,L,D,$;return[e.createVNode(ao,{id:B.id,name:B.name||B.id,"phase-name":(V=n.value)==null?void 0:V.name,"milestone-name":(O=i.value)==null?void 0:O.name,"milestone-color":(L=i.value)==null?void 0:L.color,deadline:B.deadline,important:B.important,users:v.users,assignee:B.assignee,slug:B.slug,comments:(D=B.comments)==null?void 0:D.length,attachments:($=B.attachments)==null?void 0:$.length,tasks:B.tasks,"is-editable":v.isEditable,"is-private":B.private,"is-closed":y(B),onClick:z=>v.$router.push({name:e.unref(Ee).activity,params:{milestoneId:v.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("archive"),onClick:e.withModifiers(()=>v.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>v.$emit("unarchiveActivity",{id:B.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"]),v.isEditable?(e.openBlock(),e.createElementBlock("div",s7,[e.createVNode(ze,{"icon-name":"Add",label:v.$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 C;return(C=o.phases)==null?void 0:C.find(k=>k.id===o.phaseId)}),n=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(k=>k.milestones)}),s=e.computed(()=>{var C;return(C=n.value)==null?void 0:C.find(k=>k.id===o.milestoneId)}),i=e.computed(()=>{var C;return(C=o.activities)==null?void 0:C.find(k=>k.id===o.activityId)}),l=C=>{t("update:activity",C)},c=C=>{t("addSubtask",C)},u=C=>{t("updateSubtask",C)},d=C=>{t("deleteSubtask",C)},m=C=>{t("addFiles",C)},p=C=>{t("removeFile",C)},f=C=>{t("addComment",C)},y=C=>{t("updateComment",C)},b=C=>{t("removeComment",C)};return(C,k)=>{var v,_;return i.value?(e.openBlock(),e.createBlock(Ca,{key:0,activity:i.value,"activity-types":C.activityTypes,"milestone-id":C.milestoneId,"template-activities":C.activities,"is-template":!1,users:C.users,"user-id":C.userId,"is-task-checkable":C.isTaskCheckable,statuses:C.statuses,breadcrumbs:`${(v=r.value)==null?void 0:v.name} / ${(_=s.value)==null?void 0:_.name}`,"is-editable":C.isEditable,"attachment-enabled":C.attachmentEnabled,projects:[C.project],onClose:C.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:y,onRemoveComment:b},{default:e.withCtx(S=>[e.renderSlot(C.$slots,"default",e.normalizeProps(e.guardReactiveProps(S)))]),_: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(Wt,{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 ba(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=ba(a),u=ba(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 mo(a){var t;const o=ba(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 y=ba(a);return(Array.isArray(y)?y:[y]).map(mo).filter(m7)});let d=Pt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,mo(r),m.value],([y,b])=>{if(d(),!m.value||!y.length)return;const C=new IntersectionObserver(t,{root:mo(b),rootMargin:n,threshold:s});y.forEach(k=>k&&C.observe(k)),d=()=>{C.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:ct(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:ct(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,y,b,C,k,v,_,S,B;return[e.createVNode(ao,{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":(y=p.project)==null?void 0:y.color,"phase-name":(C=(b=p.milestone)==null?void 0:b.phase)==null?void 0:C.name,"milestone-name":(k=p.milestone)==null?void 0:k.name,"milestone-color":(v=p.milestone)==null?void 0:v.color,deadline:p.deadline,rules:((_=p.rules)==null?void 0:_.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(S=p.comments)==null?void 0:S.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[V=>s(p)&&l(V),()=>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","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"},fo=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=it.useRoute(),s=it.useRouter();e.onMounted(()=>{console.log(n.matched),console.log(n.params);const g=n.params.id;if(console.log(g),g){const h=i.value.find(E=>E.slug===g);console.log(JSON.stringify(h,null,2)),h&&(l(h.id),s.push({name:Ht.activity,params:{activitySlug:h.slug}}))}});const i=e.toRef(o,"activities"),l=async g=>{await t("selectActivity",g)},c=e.ref({}),u=e.ref(!1),d=e.ref(!1),m=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([g,h,E],[T,j])=>{c.value=Object.fromEntries(g.map(q=>[q.id,h.filter(R=>{var Y;return((Y=R.status)==null?void 0:Y.id)===q.id})])),E&&!u.value&&(l(E),u.value=!0),d.value&&Ae(h,j)},{immediate:!0});const p=e.computed(()=>{var g;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((g=o.selectedActivity.milestone.phase)==null?void 0:g.name)??""} / ${o.selectedActivity.milestone.name??""}`}),f=g=>{var q,R;const h=(q=o.activities)==null?void 0:q.at(-1),E=h?ue.LexoRank.parse(h.rank).genNext():ue.LexoRank.middle(),T=((R=o.activities)==null?void 0:R.length)??0,j={name:r("activity.defaultName",{idx:T+1}),rank:E.format(),statusId:g.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]),d.value=!0,t("addActivity",j)},y=(g,h)=>{d.value=!1,t("update:filters",{...o.filters,[g]:h})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),C=e.computed(()=>b.value.map(g=>({value:g.id,label:g.name}))),k=e.computed(()=>{var g;return(g=o.activityTypes)==null?void 0:g.map(h=>({value:h.id,label:h.name}))}),v=e.computed(()=>o.users.map(g=>({value:g.id,label:`${g.firstName} ${g.lastName}`,avatar:g.avatarUrl}))),_=g=>{o.selectedActivity&&t("update:activity",g)},S=g=>{t("update:activity",g)},B=g=>{t("archiveActivity",g)},V=g=>{t("unarchiveActivity",g)},O=g=>{d.value=!1,t("update:searchText",g)},L=g=>{d.value=!1,t("clear:searchText",g)},D=g=>{o.selectedActivity&&t("addSubtask",g)},$=g=>{o.selectedActivity&&t("updateSubtask",g)},z=g=>{o.selectedActivity&&t("deleteSubtask",g)},M=g=>{t("addFiles",g)},I=g=>{t("removeFile",g)},W=g=>{o.selectedActivity&&t("addComment",{...g,activityId:o.selectedActivity.id})},Z=g=>{const{id:h}=o.selectedActivity||{};h&&t("updateComment",g)},F=g=>{const{id:h}=o.selectedActivity||{};h&&t("removeComment",g)};return(g,h)=>{var E;return e.openBlock(),e.createElementBlock("div",A7,[e.createVNode(ra,null,{primary:e.withCtx(()=>[e.createElementVNode("div",T7,[o.project?(e.openBlock(),e.createBlock(Nr,{key:0,"is-left":!1,"right-label":g.$t("project.switch.feed"),"left-label":g.$t("project.switch.overview"),"onUpdate:isLeft":h[0]||(h[0]=T=>{T&&g.$router.push({name:e.unref(Ee).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(M7,{"model-value":g.searchText,placeholder:g.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":O,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":g.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:g.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":h[1]||(h[1]=T=>y(e.unref(Ke).project,T))},null,8,["model-value","options","placeholder"])),k.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":g.filters[e.unref(Ke).type],mode:"tags",options:k.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:g.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":h[2]||(h[2]=T=>y(e.unref(Ke).type,T))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":g.filters[e.unref(Ke).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:g.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":h[3]||(h[3]=T=>y(e.unref(Ke).assignee,T))},{tag:e.withCtx(({option:T,handleTagRemove:j})=>[e.createVNode(be,{"user-name":T.label,"avatar-url":T.avatar,"is-closable":!0,onClose:q=>j(T,q)},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":g.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":g.showsOnlyImportant,onClick:h[4]||(h[4]=T=>g.$emit("update:showsOnlyImportant",!g.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":g.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":g.showsArchivedActivities,onClick:h[5]||(h[5]=T=>g.$emit("update:showsArchivedActivities",!g.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",O7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.statuses,T=>(e.openBlock(),e.createBlock(S7,{key:T.id,status:T,list:c.value[T.id],title:T.name,"footer-label":g.$t("feed.activity.add"),users:g.users,"user-id":g.userId,"is-editable":g.isEditable,tagType:m.value,onAdd:()=>f(T),onSelectActivity:l,onArchiveActivity:B,onUnarchiveActivity:V,onUpdateActivity:S},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[g.selectedActivity?(e.openBlock(),e.createBlock(Ca,{key:0,activity:g.selectedActivity,"activity-types":g.activityTypes,"milestone-id":(E=g.selectedActivity.milestone)==null?void 0:E.id,"template-activities":i.value,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:p.value,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:b.value,onClose:h[6]||(h[6]=()=>l(null)),"onUpdate:activity":_,onAddSubtask:D,onUpdateSubtask:$,onDeleteSubtask:z,onAddFiles:M,onRemoveFile:I,onAddComment:W,onUpdateComment:Z,onRemoveComment:F},{default:e.withCtx(T=>[e.renderSlot(g.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(T)))]),_: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}]}],Ee={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},I7=(a,t={})=>[{path:a,...t,redirect:{name:Ee.project},children:[{path:"",name:Ee.project,component:ef,props:!0,children:[{path:":phaseId/:milestoneId",name:Ee.milestone,component:Ar,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ee.activity,props:{default:!0,modal:!0},components:{default:Ar,modal:l7}}]},{path:"feed",name:Ee.feed,component:fo,props:!0}]}],Ht={feed:"AoFeed",activity:"AoActivityDetails"},D7=(a,t={})=>[{path:a,redirect:{name:Ht.feed},...t,children:[{path:"",name:Ht.feed,component:fo,props:!0},{path:":activitySlug",name:Ht.activity,component:Ca,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(ra,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)]))}});G.AoAvatar=be,G.AoCardFeed=ao,G.AoCheckboxField=Z7,G.AoFeed=fo,G.AoField=Or,G.AoInputField=j7,G.AoMultiselect=ie,G.AoProjectPhases=xr,G.AoTemplateDetails=Sr,G.AoTemplates=Rr,G.AoTemplatesList=Tr,G.TemplateItemTypeEnum=No,G.activityFeedRoutes=Ht,G.activityFeedStatus=$d,G.durationTypes=kd,G.feedFilterTypes=Ke,G.getActivityFeedRoutes=D7,G.getProjectOverviewRoutes=I7,G.getTemplateRoutes=L7,G.listUpdateTypes=Ed,G.milestoneStatus=qt,G.projectOverviewRoutes=Ee,G.ruleComparators=Vo,G.ruleDurationUnits=xo,G.ruleTriggerTypes=So,G.templateItemType=ee,G.templateRouteNames=at,Object.defineProperty(G,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.
|
|
7
|
+
"version": "0.37.25",
|
|
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.
|
|
30
|
+
"@26lights/orcha": "^0.37.25",
|
|
31
31
|
"@floating-ui/dom": "^1.5.3",
|
|
32
32
|
"@vueform/multiselect": "^2.6.6",
|
|
33
33
|
"@vueuse/core": "^10.8.0",
|