PageSourceSearch

https://iflat.io/js/chunk/1093.43551e9fa5205e65.js

js iflat.io collected 2026-09-24 12:16:11 UTC 98,445 bytes, 2 lines download raw bytes

1/*! For license information please see 1093.43551e9fa5205e65.js.LICENSE.txt */
2"use strict";(self.webpackChunkiflat_main=self.webpackChunkiflat_main||[]).push([[1093],{62321(e,t,i){i.d(t,{A:()=>o});var n=i(58605),a=i(71508),o={async createItem({file:e,name:t,collection:i,is_visible_for_client:a,data:o},{ownerType:r,ownerId:s}){let l=o;return o||(l=new FormData,l.append("file",e,t),i&&l.append("collection",i),a&&l.append("is_visible_for_client",a)),(await(0,n.bE)(`/owners/${r}/${s}/attachments`,l)).data},updateItem:async(e,t,{ownerType:i,ownerId:a})=>(t.append("_method","PUT"),(await(0,n.bE)(`/owners/${i}/${a}/attachments/${e}`,t)).data),deleteItem:(e,{ownerType:t,ownerId:i})=>(0,n.PQ)(`/owners/${t}/${i}/attachments/${e}`),createAudioToText:async e=>(await(0,n.bE)("/speechToText",e)).data,async exportFile(e,t){let i=await(0,n.bE)(null,{filters:t},{url:e});o.getItem(i.data.file)},getItem(e){(0,a.Im)(e)||(0,a.GB)(`/tempFiles/${e}`)},getItems:async({ownerType:e,ownerId:t,...i})=>(await(0,n.Jt)(`/owners/${e}/${t}/attachments`,{params:{embed:"user,document_type",...i}})).data,async exportEntity(e,t,i){let a=await(0,n.Jt)(`/export/entities/${e}/${t}/templates/${i}`);o.getItem(a.data?.file)},async getPrivateFileUrl(e){let t=await(0,n.Jk)({url:e,responseType:"blob"}),i=new Blob([t.data],{type:t.headers["content-type"]});return window.URL.createObjectURL(i)}}},70254(e,t,i){i.d(t,{A:()=>v});var n=i(30944),a=i(71508),o=i(33956),r=i(23543),s=i(78503),l=i(97906),h=i(31495),c=.25,d=e=>({id:e,value:100*e+"%"}),u=i(6301);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-70fa4fbd]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-70fa4fbd]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-70fa4fbd]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-70fa4fbd]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-70fa4fbd]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-70fa4fbd]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-70fa4fbd]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-70fa4fbd]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-70fa4fbd]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-70fa4fbd]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-70fa4fbd]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-70fa4fbd]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-70fa4fbd]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-70fa4fbd]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-70fa4fbd]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-70fa4fbd]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-70fa4fbd]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-70fa4fbd]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-70fa4fbd]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-70fa4fbd]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-70fa4fbd]{font-size:12px;font-weight:700;line-height:18px}.ui-content-viewer__wrapper[data-v-70fa4fbd]{transition:all .3s ease-in-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ui-content-viewer__content[data-v-70fa4fbd]{transform-origin:50%;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;transition:transform .3s ease-in-out;display:flex;position:relative}.ui-content-viewer__content._min-size[data-v-70fa4fbd]{min-width:80vw}.ui-content-viewer__content._min-size[data-v-70fa4fbd]>*{flex:1}.ui-content-viewer__loading[data-v-70fa4fbd]{background-color:#0000;position:absolute}.ui-content-viewer__toolbar[data-v-70fa4fbd]{justify-content:flex-start;align-items:center;display:flex;position:absolute;bottom:40px;left:50%;transform:translate(-50%)}.ui-content-viewer__toolbar[data-v-70fa4fbd] .ui-button{background-color:#fff;border:1px solid #e1e2e5;box-shadow:0 4px 10px #00000040}.ui-content-viewer__toolbar[data-v-70fa4fbd] .ui-select-container__icon-list{fill:#828282}.ui-content-viewer__toolbar[data-v-70fa4fbd]>*{margin-right:12px}.ui-content-viewer__toolbar[data-v-70fa4fbd]>:last-child{margin-right:0}.ui-content-viewer-scale[data-v-70fa4fbd]{justify-content:flex-start;align-items:center;display:flex}.ui-content-viewer-scale__select[data-v-70fa4fbd]{border-radius:6px;width:98px;box-shadow:0 4px 10px #00000040}.ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-input-container{padding:8px 8px 8px 12px}.ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-select-container__option-container{top:unset;bottom:100%}.ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-input-container__title{color:#333}.ui-content-viewer-scale[data-v-70fa4fbd]>*{margin-right:8px}.ui-content-viewer-scale[data-v-70fa4fbd]>:last-child{margin-right:0}@media screen and (width<=768px){.ui-content-viewer .ui-content-viewer__toolbar[data-v-70fa4fbd] .ui-button{width:32px;height:32px}.ui-content-viewer .ui-content-viewer__toolbar[data-v-70fa4fbd]>*{margin-right:4px}.ui-content-viewer .ui-content-viewer__toolbar .ui-content-viewer-scale__select[data-v-70fa4fbd]{width:88px}.ui-content-viewer .ui-content-viewer__toolbar .ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-input-container{height:32px;min-height:32px}:is(.ui-content-viewer .ui-content-viewer__toolbar .ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-input-container :deep(.ui-input-container__value),.ui-content-viewer .ui-content-viewer__toolbar .ui-content-viewer-scale__select[data-v-70fa4fbd] .ui-input-container :deep(.ui-input-container__title)){font-size:12px}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var p={name:"UiContentViewer",components:{UiLoading:r.A,UiSelect:l.default,UiButton:s.A},props:{isCustomScale:Boolean,loading:{type:Boolean,default:!1},hasEditButton:{type:Boolean,default:!1},hasRotate:{type:Boolean,default:!1},hasDrag:{type:Boolean,default:!0},hasUndo:{type:Boolean,default:!1},hasRedo:{type:Boolean,default:!1},hasClear:{type:Boolean,default:!1},autoScale:{type:Boolean,default:!0},deleteElementTitle:{type:String,default:"Метки"},disabledUndo:{type:Boolean,default:!1},disabledRedo:{type:Boolean,default:!1},contentSize:{type:Object,default:()=>({width:0,height:0})},isDisableClick:Boolean},emits:["change-content","update:scale","set-point","clear","undo","redo"],data:()=>({scale:1,rotate:0,left:0,top:0,lastX:0,lastY:0,isDragging:!1,isProgress:!1,isResetStyle:!1,isClick:!1,requestAnimationFrame:null,contentClass:""}),computed:{initScaleTitle(){return`${(100*this.scale).toFixed()}%`},scaleList:()=>((e=.25,t=.25,i=3)=>{let n=[];for(let i=1;i>=t;i-=e)n.unshift(d(i));for(let t=1+e;t<=i;t+=e)n.push(d(t));return n})(),rotateStyleCss(){if(this.rotate)return{transform:`rotate(${this.rotate}deg)`}},imageContainerStyleCss(){return{transform:`translate(-50%, -50%) scale(${this.isCu
2stomScale?null:this.scale})`,top:`calc(50% + ${this.top}px)`,left:`calc(50% + ${this.left}px)`,transition:this.isDragging?"none":"",cursor:this.hasDrag?"move":""}},changeButtonTitle(){return this.$root.isMobile?"":"Изменить"},loadingColor:()=>o.A.gray2,scaleValues(){return this.scaleList.map(e=>e.id)}},beforeUnmount(){this.removeListeners()},watch:{autoScale:{handler(e){e&&this.setInitScale()},immediate:!0},hasDrag:{handler(e){e?this.addListeners():this.removeListeners()},immediate:!0}},methods:{init(){this.resetOptions()},addListeners(){document.addEventListener("mouseup",this.endDrag),document.addEventListener("mousemove",this.drag),document.addEventListener("touchend",this.endDrag),document.addEventListener("touchmove",this.touchDrag)},removeListeners(){document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("mousemove",this.drag),document.removeEventListener("touchend",this.endDrag),document.removeEventListener("touchmove",this.touchDrag)},handleDragStart(e){this.hasDrag&&this.startDrag(e)},handleTouchStart(e){this.hasDrag&&this.touchStartDrag(e)},emitChangeContent(){this.$emit("change-content")},setScale(e){e<.25||e>3||(this.scale=e,this.emitScale(e))},emitScale(e){this.$emit("update:scale",e)},increaseScale(){let e=(0,a.Os)(this.scaleValues,this.scale+c);this.setScale(e)},decreaseScale(){let e=(0,a.Os)(this.scaleValues,this.scale-c);this.setScale(e)},rotateImage(){this.rotate+=-90},setInitScale(){this.$nextTick(()=>{this.calculateContentScale()})},calculateContentScale(e=1){let t=this.$refs.contentContainer?.getBoundingClientRect();if(!t)return;let i=this.contentSize.width||t?.width/this.scale,n=this.contentSize.height||t?.height/this.scale;if(!this.$refs.wrapperContainer)return;let{width:a,height:o}=this.$refs.wrapperContainer.getBoundingClientRect();if(!n)return;let r=Math.min(a/i,o/n);this.setScale(r*e)},setOffsetSize(){this.$refs.contentContainer?.offsetWidth||(this.contentClass="_min-size")},resetOptions(){this.isResetStyle=!0,this.setScale(1),this.rotate=0,this.top=0,this.left=0,this.$nextTick(()=>{this.isResetStyle=!1})},startDrag(e,t){if(!(0,h.V9)(e)&&!t)return;let{clientX:i,clientY:n}=e;this.lastX=i,this.lastY=n,this.isDragging=!0,this.isClick=!0,e.stopPropagation?.()},endDrag(){cancelAnimationFrame(this.requestAnimationFrame),this.isDragging=!1,this.isProgress=!1,this.isClick=!1,this.lastX=this.lastY=0},drag(e){if(!this.isProgress&&this.isDragging){let{clientX:t,clientY:i}=e;if(Math.abs(t-this.lastX)<=3&&Math.abs(i-this.lastY)<=3)return;this.isProgress=!0,this.isClick=!1,this.requestAnimationFrame=requestAnimationFrame(()=>{this.top=this.top-this.lastY+i,this.left=this.left-this.lastX+t,this.lastX=t,this.lastY=i,this.isProgress=!1})}e.stopPropagation?.()},touchStartDrag(e){this.startDrag((0,a.b_)(e),!0)},touchDrag(e){this.drag((0,a.b_)(e))},setPoint(e){this.isDisableClick||this.readOnly||this.$nextTick(()=>{if(!(0,a.dS)(e)||!this.isClick)return;let{height:t,width:i}=this.$refs.contentContainer.getBoundingClientRect(),n={x:(100*e.offsetX/i*this.scale).toFixed(2),y:(100*e.offsetY/t*this.scale).toFixed(2),pointX:e.offsetX,pointY:t/this.scale-e.offsetY};this.$emit("set-point",n)})},async clearAll(){this.$openConfirmModal(`Удалить все ${this.deleteElementTitle.toLowerCase()}?`,`Будут удалены все ${this.deleteElementTitle.toLowerCase()}`,()=>this.$emit("clear"),null,"Удалить",null,"warning")}}},f={ref:"wrapperContainer",class:"ui-content-viewer"},g={class:"ui-content-viewer__toolbar"},m={class:"ui-content-viewer-scale"};var v=(0,n.A)(p,[["render",function(e,t,i,n,a,o){let r=(0,u.resolveComponent)("ui-loading"),s=(0,u.resolveComponent)("ui-button"),l=(0,u.resolveComponent)("ui-select");return(0,u.openBlock)(),(0,u.createElementBlock)("div",f,[(0,u.createVNode)(u.Transition,{name:"fade",mode:"out-in"},{default:(0,u.withCtx)(()=>[i.loading||a.isResetStyle?(0,u.createCommentVNode)("",!0):((0,u.openBlock)(),(0,u.createElementBlock)("div",{key:0,style:(0,u.normalizeStyle)(o.imageContainerStyleCss),class:"ui-content-viewer__wrapper"},[(0,u.createElementVNode)("div",{ref:"contentContainer",style:(0,u.normalizeStyle)(o.rotateStyleCss),draggable:"false",class:(0,u.normalizeClass)(["ui-content-viewer__content",a.contentClass]),onMouseup:t[0]||=(...e)=>o.setPoint&&o.setPoint(...e),onMousedown:t[1]||=(...e)=>o.handleDragStart&&o.handleDragStart(...e),onTouchstart:t[2]||=(...e)=>o.handleTouchStart&&o.handleTouchStart(...e)}
2,[(0,u.renderSlot)(e.$slots,"content",{isClick:a.isClick},void 0,!0),(0,u.renderSlot)(e.$slots,"after-content",{},void 0,!0)],38)],4))]),_:3}),(0,u.createVNode)(r,{"is-open":i.loading,color:o.loadingColor,class:"ui-content-viewer__loading"},null,8,["is-open","color"]),(0,u.createElementVNode)("div",g,[(0,u.renderSlot)(e.$slots,"before-tooltips",{},void 0,!0),i.hasUndo?((0,u.openBlock)(),(0,u.createBlock)(s,{key:0,"icon-size":16,disabled:i.disabledUndo,type:"secondary",icon:"undo",rounded:"",onClick:t[3]||=t=>e.$emit("undo")},null,8,["disabled"])):(0,u.createCommentVNode)("",!0),i.hasRedo?((0,u.openBlock)(),(0,u.createBlock)(s,{key:1,"icon-size":16,disabled:i.disabledRedo,type:"secondary",icon:"redo",rounded:"",onClick:t[4]||=t=>e.$emit("redo")},null,8,["disabled"])):(0,u.createCommentVNode)("",!0),i.hasClear?((0,u.openBlock)(),(0,u.createBlock)(s,{key:2,icon:"uiTrash",type:"secondary",rounded:"",onClick:o.clearAll},null,8,["onClick"])):(0,u.createCommentVNode)("",!0),i.hasRotate?((0,u.openBlock)(),(0,u.createBlock)(s,{key:3,type:"secondary",icon:"uiSync",rounded:"",onClick:(0,u.withModifiers)(o.rotateImage,["stop"])},null,8,["onClick"])):(0,u.createCommentVNode)("",!0),(0,u.createElementVNode)("div",m,[(0,u.createVNode)(l,{"model-value":a.scale,list:o.scaleList,title:o.initScaleTitle,"title-field-name":"value",small:"",class:"ui-content-viewer-scale__select","onUpdate:modelValue":o.setScale},null,8,["model-value","list","title","onUpdate:modelValue"]),(0,u.createVNode)(s,{type:"secondary",icon:"uiPlus",rounded:"",onClick:(0,u.withModifiers)(o.increaseScale,["stop"])},null,8,["onClick"]),(0,u.createVNode)(s,{type:"secondary",icon:"uiMinus",rounded:"",onClick:(0,u.withModifiers)(o.decreaseScale,["stop"])}
2,null,8,["onClick"])]),i.hasEditButton?((0,u.openBlock)(),(0,u.createBlock)(s,{key:4,"icon-size":24,type:"secondary",icon:"uiEdit",title:o.changeButtonTitle,onClick:o.emitChangeContent},null,8,["title","onClick"])):(0,u.createCommentVNode)("",!0),(0,u.renderSlot)(e.$slots,"after-tooltips",{},void 0,!0)])],512)}],["__scopeId","data-v-70fa4fbd"]])},84256(e,t,i){i.d(t,{A:()=>C});var n=i(30944),a=i(28451),o=i(78503),r=i(24729),s=i(31495),l=i(46114),h=i(62321),c=i(70254),d=i(72630),u=i(80863),p=i(48350),f=i(98574),g=i(6301);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-fc22dc6d]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-fc22dc6d]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-fc22dc6d]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-fc22dc6d]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-fc22dc6d]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-fc22dc6d]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-fc22dc6d]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-fc22dc6d]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-fc22dc6d]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-fc22dc6d]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-fc22dc6d]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-fc22dc6d]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-fc22dc6d]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-fc22dc6d]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-fc22dc6d]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-fc22dc6d]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-fc22dc6d]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-fc22dc6d]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-fc22dc6d]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-fc22dc6d]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-fc22dc6d]{font-size:12px;font-weight:700;line-height:18px}.ui-paint-modal[data-v-fc22dc6d] .ui-modal__window{width:80%;max-width:1200px;max-height:950px}.ui-paint-modal__paint[data-v-fc22dc6d]{flex-grow:1;padding-bottom:24px}@media screen and (width<=768px){.ui-paint-modal[data-v-fc22dc6d] .ui-modal{width:100%;height:100%;max-height:initial;padding:16px}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var m={name:"UiPaintModal",components:{UiPaint:f.A,UiModal:d.A},mixins:[r.A],props:{image:String,ownerType:String,ownerId:[String,Number],imageId:Number,isLocalImage:Boolean},emits:["save"],data:()=>({globalModalsStore:(0,p.o)(),windowStore:(0,u.j)()}),computed:{modalSize(){return this.windowStore.isMediaMaxMd?"full-page":"full-height"}},methods:{save(e){this.$emit("save",e),this.close()},confirmClose(){this.globalModalsStore.openConfirmModal("Выйти без сохранения изменений?",null,this.close)}}};var v=(0,n.A)(m,[["render",function(e,t,i,n,a,o){let r=(0,g.resolveComponent)("ui-paint"),s=(0,g.resolveComponent)("ui-modal");return(0,g.openBlock)(),(0,g.createBlock)(s,{class:"ui-paint-modal","is-open":e.innerIsOpen,size:o.modalSize,"has-footer":!1,title:"Редактировать","is-custom-close":"",onClose:o.confirmClose},{default:(0,g.withCtx)(()=>[(0,g.createVNode)(r,{image:i.image,"owner-id":i.ownerId,"owner-type":i.ownerType,"image-id":i.imageId,"is-local-image":i.isLocalImage,class:"ui-paint-modal__paint",onCancel:o.confirmClose,onSave:o.save},null,8,["image","owner-id","owner-type","image-id","is-local-image","onCancel","onSave"])]),_:1},8,["is-open","size","onClose"])}],["__scopeId","data-v-fc22dc6d"]]);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-84d16316]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-84d16316]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-84d16316]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-84d16316]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-84d16316]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-84d16316]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-84d16316]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-84d16316]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-84d16316]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-84d16316]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-84d16316]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-84d16316]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-84d16316]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-84d16316]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-84d16316]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-84d16316]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-84d16316]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-84d16316]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-84d16316]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-84d16316]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-84d16316]{font-size:12px;font-weight:700;line-height:18px}.ui-lightbox[data-v-84d16316]{z-index:9999;-webkit-user-select:none;user-select:none;background:#00000040;margin:0;position:fixed;inset:0}.ui-lightbox[data-v-84d16316] .ui-lightbox__close{background-color:#fff;justify-content:center;align-items:center;display:flex;position:absolute;top:40px;right:40px}.ui-lightbox__image[data-v-84d16316]{vertical-align:middle;-webkit-user-select:none;user-select:none;background-color:#fff;border-radius:6px;max-width:80vw;max-height:80vh;position:relative;box-shadow:0 4px 20px #00000040}.ui-lightbox__arrow[data-v-84d16316]{cursor:pointer;fill:#fff;transition:all .15s linear;position:absolute;top:50%;transform:translateY(-50%)}.ui-lightbox__arrow[data-v-84d16316]:hover{filter:drop-shadow(0 4px 20px #00000040)}.ui-lightbox__arrow._prev[data-v-84d16316]{left:64px}.ui-lightbox__arrow._next[data-v-84d16316]{right:64px}.ui-lightbox__arrow._disabled[data-v-84d16316]{opacity:.4;cursor:default}@media screen and (width<=576px){.ui-lightbox__arrow._prev[data-v-84d16316]{left:0}.ui-lightbox__arrow._next[data-v-84d16316]{right:0}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var b={name:"UiLightbox",components:{UiContentViewer:c.A,UiPaintModal:v,UiButton:o.A,UiIcon:a.A},directives:{autofocus:l.A},mixins:[r.A],props:{images:{type:[Array,Object],default:()=>[]},imageIndex:Number,ownerType:String,ownerId:[String,Number],readOnly:{type:Boolean,default:!0}},emits:["update:image-index","update-file"],data:()=>({activeImageIndex:0,isOpenPaintModal:!1,handlers:[],activeImageSrc:null}
2),computed:{imageList(){return Array.isArray(this.images)?this.images:[this.images]},innerActiveImageIndex:{get(){return this.imageIndex??this.activeImageIndex},set(e){this.activeImageIndex=e,this.$emit("update:image-index",e)}},hasArrow(){return this.imageList.length>1},activeImage(){return this.imageList[this.innerActiveImageIndex]??{}},activeImageId(){return this.activeImage.id},imagesLength(){return this.imageList.length},isPrevDisabled(){return this.innerActiveImageIndex<=0},isNextDisabled(){return this.innerActiveImageIndex>=this.imagesLength-1},prevArrowClass(){return{_disabled:this.isPrevDisabled}},nextArrowClass(){return{_disabled:this.isNextDisabled}},arrowIconSize(){return this.$root.isMobile?48:72},isLocalImage(){return!!this.activeImage.fileData}},beforeUnmount(){this.removeKeyListeners()},methods:{setKeyListeners(){this.handlers=[(0,s.rG)(this,this.$refs.modal,this.close,27),(0,s.rG)(this,this.$refs.modal,this.prevImage,37),(0,s.rG)(this,this.$refs.modal,this.nextImage,39)]},onEndLoad(){this.loading=!1,this.$refs.contentViewer?.setOffsetSize()},init(){this.setActiveImageIndex(this.innerActiveImageIndex),this.setKeyListeners()},removeKeyListeners(){this.handlers.forEach(e=>e?.())},clear(){this.removeKeyListeners()},prevImage(){this.setActiveImageIndex(this.innerActiveImageIndex-1)},nextImage(){this.setActiveImageIndex(this.innerActiveImageIndex+1)},async setActiveImageIndex(e){e<0||e>this.imagesLength-1||(this.loading=!0,this.resetOptions(),this.innerActiveImageIndex=e,await this.getImageSrc(e),this.imageList[this.innerActiveImageIndex].id===this.imageList[e].id&&this.$nextTick(()=>{this.loading=!1}))},resetOptions(){this.$refs.contentViewer?.resetOptions()},openPaintModal(){this.close(),this.$nextTick(()=>{this.isOpenPaintModal=!0})},updateFile(e){this.$emit("update-file",e)},async getImageSrc(e){let t=this.imageList[e];try{this.loading=!0,this.activeImageSrc=t?.private?await h.A.getPrivateFileUrl(t.url):t.url}finally{this.loading=!1}}}},x=["src"],w=["src"],y={class:"ui-lightbox-actions"};var C=(0,n.A)(b,[["render",function(e,t,i,n,a,o){let r=(0,g.resolveComponent)("ui-content-viewer"),s=(0,g.resolveComponent)("ui-button"),l=(0,g.resolveComponent)("ui-icon"),h=(0,g.resolveComponent)("ui-paint-modal"),c=(0,g.resolveDirective)("autofocus");return(0,g.openBlock)(),(0,g.createElementBlock)("div",null,[(0,g.createVNode)(g.Transition,{name:"fade"},{default:(0,g.withCtx)(()=>[e.isOpen?(0,g.withDirectives)(((0,g.openBlock)(),(0,g.createElementBlock)("div",{key:0,class:"ui-lightbox",tabindex:"1",onClick:t[1]||=(0,g.withModifiers)((...t)=>e.close&&e.close(...t),["self"])},[(0,g.createVNode)(r,{ref:"contentViewer",loading:e.loading,"auto-scale":!1,"has-rotate":!0,"has-edit-button":!i.readOnly,onChangeContent:o.openPaintModal},{content:(0,g.withCtx)(()=>[(0,g.createElementVNode)("img",{class:"ui-lightbox__image",alt:"",draggable:"false",src:a.activeImageSrc},null,8,x)]),_:1},8,["loading","has-edit-button","onChangeContent"]),(0,g.withDirectives)((0,g.createElementVNode)("img",{src:a.activeImageSrc,onLoad:t[0]||=(...e)=>o.onEndLoad&&o.onEndLoad(...e)},null,40,w),[[g.vShow,!1]]),(0,g.createElementVNode)("div",y,[(0,g.createVNode)(s,{type:"secondary","icon-size":24,icon:"uiClose",rounded:"",class:"ui-lightbox__close",onClick:e.close},null,8,["onClick"]),o.hasArrow?((0,g.openBlock)(),(0,g.createBlock)(l,{key:0,name:"uiChevronLeft",class:(0,g.normalizeClass)(["ui-lightbox__arrow _prev",o.prevArrowClass]),size:o.arrowIconSize,onClick:o.prevImage},null,8,["class","size","onClick"])):(0,g.createCommentVNode)("",!0),o.hasArrow?((0,g.openBlock)(),(0,g.createBlock)(l,{key:1,name:"uiChevronRight",class:(0,g.normalizeClass)(["ui-lightbox__arrow _next",o.nextArrowClass]),size:o.arrowIconSize,onClick:o.nextImage},null,8,["class","size","onClick"])):(0,g.createCommentVNode)("",!0)])])),[[c]]):(0,g.createCommentVNode)("",!0)]),_:1}),i.readOnly?(0,g.createCommentVNode)("",!0):((0,g.openBlock)(),(0,g.createBlock)(h,{key:0,"is-open":a.isOpenPaintModal,"onUpdate:isOpen":t[2]||=e=>a.isOpenPaintModal=e,image:a.activeImageSrc,"owner-id":i.ownerId,"owner-type":i.ownerType,"image-id":o.activeImageId,"is-local-image":o.isLocalImage,onSave:o.updateFile},null,8,["is-open","image","owner-id","owner-type","image-id","is-local-image","onSave"]))])}],["__scopeId","data-v-84d16316"]])},98574(e,t,i){i.d(t,{A:()=>S});var n=i(30944),a=i(23543),o=i(78503),r=i(80863),s=i(44628),l=i(54593),h=i(70254),c=i(71508),d="round",u="image/jpeg",p=["#fff","#F98A8A","#F75C5C","#FAE107","#FCBC83","#FC9336","#CE9CE1","#BB6BD9","#70ADFF","#2984FF","#67D686","#17C147","#A5A5A5","#4F4F4F","#000000"],f=class{constructor(e,t={}){this.canvas=e,this.ctx=e.getContext("2d"),this.isDiabled=!1,this.isDrawing=!1,this.imageSrc=t.imageSrc,this.image=null,this.lineWidth=t.lineWidth||5,this.lineColor=t.lineColor||"#F75C5C",this.lineOpacity=t.lineOpacity||1,this.changeScale(t.scale),this.initImageCallback=t.initImageCallback,this.readOnly=t.readOnly,this.history=[],this.historyStep=-1,this.linePoints=[],this.tmpCanvasData=null,this.init()}init=async()=>{this.image=await this.initImage(this.imageSrc),!this.readOnly&&(this.addListeners(),this.imageSrc||this.initCanvasOptions(),this.addItemHistory())};initCanvasOptions=()=>{this.changeWidth(this.lineWidth),this.changeColor(this.lineColor)};setCanvasOffset=()=>{let e=this.canvas.getBoundingClientRect();this.canvasOffsetTop=e.top,this.canvasOffsetLeft=e.left};addListeners=()=>{document.addEventListener("mouseup",this.stopDrawing),this.canvas.addEventListener("mousedown",this.startDrawing),this.canvas.addEventListener("mousemove",this.draw),this.canvas.addEventListener("mouseover",this.enterCanvas),this.canvas.addEventListener("touchmove",this.touchDraw),this.canvas.addEventListener("touchstart",this.startDrawing),this.canvas.addEventListener("touchend",this.stopDrawing)};removeListeners=()=>{document.removeEventListener("mouseup",this.stopDrawing),this.canvas.removeEventListener("mousedown",this.startDrawing),this.canvas.removeEventListener("mousemove",this.draw),this.canvas.removeEventListener("mouseover",this.enterCanvas),this.canvas.removeEventListener("touchmove",this.touchDraw),this.canvas.removeEventListener("touchstart",this.startDrawing),this.canvas.removeEventListener("touchend",this.stopDrawing)};resizeCanvas=(e,t)=>{this.canvas.width=e,this.canvas.height=t};initImage=e=>{let t=e;if(t)return new Promise((e,i)=>{let n=new Image;n.src=t,n.crossOrigin="Anonymous",n.onload=()=>{let{width:t,height:i}=this.getRelativeImageSize(n);this.resizeCanvas(t,i),this.drawImage(n,t,i),this.initCanvasOptions(),this.initImageCallback?.(),e(n)},n.onerror=i})};getRelativeImageSize=({width:e,height:t})=>{let i=2e3;if(e<i&&t<i)return{width:e,height:t};let n=i/e,a=i/t,o=Math.min(n,a);return{width:e*o,height:t*o}};getCoordinates=e=>[(e.clientX-this.canvasOffsetLeft)/this.scale,(e.clientY-this.canvasOffsetTop)/this.scale];drawImage=(e=this.image,t,i)=>{this.ctx.drawImage(e,0,0,t,i)};startDrawing=e=>{this.setCanvasOffset(),this.isDrawing=!0,this.ctx.lineCap=d,this.ctx.lineJoin=d;let[t,i]=this.getCoordinates(e);this.linePoints.push({x:t,y:i}),this.ctx.moveTo(t,i),this.tmpCanvasData=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height)};stopDrawing=()=>{this.isDrawing&&(this.isDrawing=!1,this.linePoints=[],this.tmpCanvasData=null,this.addItemHistory())};draw=e=>{if(!this.isDrawing)return;this.ctx.putImageData(this.tmpCanvasData,0,0);let[t,i]=this.getCoordinates(e);this.linePoints.push({x:t,y:i}),this.ctx.beginPath(),this.ctx.moveTo(this.linePoints[0].x,this.linePoints[0].y);let n=null;
2this.linePoints.slice(1).forEach(e=>{this.ctx.lineTo(e.x,e.y),n=e}),n&&this.ctx.moveTo(n.x,n.y),this.ctx.stroke(),this.ctx.closePath()};touchDraw=e=>{this.draw((0,c.b_)(e))};enterCanvas=()=>{this.ctx.beginPath()};setDrawDisabled=e=>{this.isDiabled=e,this.isDiabled?this.removeListeners():this.addListeners()};changeColor=(e=this.lineColor)=>{e&&(this.ctx.strokeStyle=(0,c.j5)(e,this.lineOpacity),this.lineColor=e)};changeWidth=e=>{e&&(this.ctx.lineWidth=e,this.lineWidth=e)};clearCanvas=()=>{this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawImage(this.image,this.canvas.width,this.canvas.height),this.addItemHistory()};changeScale=(e=1)=>{this.scale=e};addItemHistory=()=>{this.historyStep+=1;let e=this.getBase64FromCanvas();this.history.push(e)};undo=()=>{this.historyStep>0&&(--this.historyStep,this.initImage(this.history[this.historyStep]),this.history.pop())};getBase64FromCanvas=()=>this.canvas.toDataURL();async canvasToFile(){return await new Promise((e,t)=>{try{this.canvas.toBlob(t=>{e(new File([t],"canvas.jpg",{type:u}))},u,1)}catch(e){t(e)}})}destroy(){this.removeListeners(),this.ctx=null,this.canvas=null,this.image=null,this.imageSrc=null}},g=i(6301);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-71b763a1]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-71b763a1]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-71b763a1]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-71b763a1]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-71b763a1]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-71b763a1]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-71b763a1]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-71b763a1]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-71b763a1]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-71b763a1]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-71b763a1]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-71b763a1]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-71b763a1]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-71b763a1]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-71b763a1]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-71b763a1]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-71b763a1]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-71b763a1]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-71b763a1]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-71b763a1]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-71b763a1]{font-size:12px;font-weight:700;line-height:18px}.ui-paint[data-v-71b763a1]{width:100%;height:inherit;flex-direction:column;display:flex;position:relative}.ui-paint__header[data-v-71b763a1]{justify-content:space-between;align-items:flex-end;margin-bottom:16px;display:flex}.ui-paint__tools[data-v-71b763a1]{flex-wrap:wrap;margin:-16px;display:flex}.ui-paint__tools[data-v-71b763a1]>*{margin:16px}.ui-paint__tools[data-v-71b763a1]{width:100%}.ui-paint__content-viewer[data-v-71b763a1]{border-radius:6px;flex:1;position:relative;overflow:hidden}.ui-paint__buttons[data-v-71b763a1]{gap:12px;display:flex}.ui-paint__tools[data-v-71b763a1],.ui-paint__buttons[data-v-71b763a1]{align-items:center;display:flex}.ui-paint__tool-label[data-v-71b763a1]{margin-bottom:4px}.ui-paint__tool-width[data-v-71b763a1]{flex:1;min-width:250px;max-width:300px}.ui-paint__loading[data-v-71b763a1]{position:absolute}.ui-paint[data-v-71b763a1] .ui-paint-toggle-draw__button{transition:all .2s}.ui-paint[data-v-71b763a1] .ui-paint-toggle-draw__button._is-draw{fill:#0060e1;background-color:#e6f0ff;border-color:#0060e1}@media screen and (width<=768px){.ui-paint__tools[data-v-71b763a1]{flex-wrap:initial;flex:1;align-items:flex-start;width:100%;display:flex}.ui-paint__tools[data-v-71b763a1]>*{margin-bottom:8px}
2.ui-paint__tool-width .ui-paint__tool-label[data-v-71b763a1]{margin-bottom:16px}.ui-paint__tool-color .ui-paint__tool-label[data-v-71b763a1]{margin-bottom:8px}.ui-paint__content-viewer[data-v-71b763a1]{margin-bottom:16px}.ui-paint__pallet[data-v-71b763a1]{flex-wrap:nowrap}.ui-paint__pallet[data-v-71b763a1] .ui-palette-picker-any-color{position:initial}.ui-paint__pallet[data-v-71b763a1] .ui-palette-picker-any-color .right-position{right:20px}.ui-paint[data-v-71b763a1] .ui-paint__buttons>*{flex:1}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var m={name:"UiPaint",components:{UiLoading:a.A,UiContentViewer:h.A,UiButton:o.A,UiSliderInput:s.A,UiPalettePicker:l.A},inject:{ApiFactory:{default:()=>({})}},props:{image:String,ownerType:String,ownerId:Number,imageId:Number,isLocalImage:Boolean,readOnly:Boolean,hasButtons:{type:Boolean,default:!0},initWidth:Number,initOpacity:Number,initColor:String,initLoading:Boolean},emits:["cancel","save"],data(){return{windowStore:(0,r.j)(),color:this.initColor||"#F75C5C",width:this.initWidth||5,canvas:null,isDraw:!1,autoScale:!1,loading:!1,scale:1,opacity:this.initOpacity||1,paletteColors:p}},computed:{api(){return(new this.ApiFactory).create("File")},toggleDrawButtonClass(){return{"_is-draw":this.isDraw}},hasHistory(){return this.canvas.history?.length>1}},mounted(){this.init()},watch:{image(){this.canvas.destroy(),this.init()}},methods:{init(){this.canvas=new f(this.$refs.canvas,{imageSrc:this.image,lineWidth:this.width,lineColor:this.color,lineOpacity:this.opacity,initImageCallback:this.setAutoScale,readOnly:this.readOnly,scale:this.scale})},toggleIsDraw(){this.isDraw=!this.isDraw,this.canvas.setDrawDisabled(this.isDraw)},clearCanvas(){this.$openConfirmModal("Очистить рисунок?",null,()=>this.canvas.clearCanvas(),null,"Удалить",null,"warning")},changeColor(e){this.canvas.changeColor(e)},changeWidth(e){this.canvas.changeWidth(e)},changeScale(e){this.scale=e,this.canvas.changeScale(e)},undoStep(){this.canvas.undo()},setAutoScale(){this.autoScale=!0,this.$nextTick(()=>{this.autoScale=!1})},cancel(){this.$emit("cancel")},async getPaintedFile(){return this.hasHistory?{file:await this.canvas.canvasToFile(),url:await this.canvas.getBase64FromCanvas()}:null},async save(){try{this.loading=!0;let e=await this.getPaintedFile();if(this.isLocalImage)this.emitSave({...e,local:!0});else{await this.api.deleteItem(this.imageId,{ownerType:this.ownerType,ownerId:this.ownerId});let t=await this.api.createItem({file:e.file,name:e.file?.name},{ownerType:this.ownerType,ownerId:this.ownerId});this.emitSave(t)}}finally{this.loading=!1}},emitSave(e){this.$emit("save",e)}}},v={class:"ui-paint"},b={key:0,class:"ui-paint__header"},x={class:"ui-paint__tools"},w={class:"ui-paint__tool-color ui-column ui-position-center-left"},y={class:"ui-paint__pallet-wrapper"},C={class:"ui-paint__tool-width"},k={key:0,class:"ui-paint__buttons"},_={ref:"canvas",class:"ui-paint__canvas"},z={key:1,class:"ui-paint__buttons"};var S=(0,n.A)(m,[["render",function(e,t,i,n,a,o){let r=(0,g.resolveComponent)("ui-palette-picker"),s=(0,g.resolveComponent)("ui-slider-input"),l=(0,g.resolveComponent)("ui-button"),h=(0,g.resolveComponent)("ui-content-viewer"),c=(0,g.resolveComponent)("ui-loading");return(0,g.openBlock)(),(0,g.createElementBlock)("div",v,[i.readOnly?(0,g.createCommentVNode)("",!0):((0,g.openBlock)(),(0,g.createElementBlock)("div",b,[(0,g.createElementVNode)("div",x,[(0,g.createElementVNode)("div",w,[t[2]||=(0,g.createElementVNode)("p",{class:"ui-paint__tool-label"},"Цвет",-1),(0,g.createElementVNode)("div",y,[(0,g.createVNode)(r,{modelValue:a.color,"onUpdate:modelValue":[t[0]||=e=>a.color=e,o.changeColor],"is-modal":a.windowStore.isMediaMaxMd,colors:a.paletteColors,class:"ui-paint__pallet"},null,8,["modelValue","is-modal","colors","onUpdate:modelValue"])])]),(0,g.createElementVNode)("div",C,[t[3]||=(0,g.createElementVNode)("p",{class:"ui-paint__tool-label"},"Толщина кисти",-1),(0,g.createVNode)(s,{modelValue:a.width,"onUpdate:modelValue":[t[1]||=e=>a.width=e,o.changeWidth],type:"range",max:14,min:2,step:1}
2,null,8,["modelValue","onUpdate:modelValue"])])]),!a.windowStore.isMediaMaxMd&&i.hasButtons?((0,g.openBlock)(),(0,g.createElementBlock)("div",k,[(0,g.createVNode)(l,{type:"secondary",size:"l",title:"Отменить",onClick:o.cancel},null,8,["onClick"]),(0,g.createVNode)(l,{type:"primary",size:"l",title:"Сохранить",onClick:o.save},null,8,["onClick"])])):(0,g.createCommentVNode)("",!0)])),(0,g.createVNode)(h,{"has-drag":a.isDraw||i.readOnly,"auto-scale":a.autoScale,class:"ui-paint__content-viewer","onUpdate:scale":o.changeScale},{content:(0,g.withCtx)(()=>[(0,g.createElementVNode)("canvas",_,null,512)]),"before-tooltips":(0,g.withCtx)(()=>[i.readOnly?(0,g.createCommentVNode)("",!0):((0,g.openBlock)(),(0,g.createBlock)(l,{key:0,type:"secondary","icon-width":20,"icon-height":20,icon:"uiReturn",rounded:"",onClick:o.undoStep},null,8,["onClick"])),i.readOnly?(0,g.createCommentVNode)("",!0):((0,g.openBlock)(),(0,g.createBlock)(l,{key:1,type:"secondary","icon-size":20,icon:"uiTrash",rounded:"",onClick:o.clearCanvas},null,8,["onClick"]))]),"after-tooltips":(0,g.withCtx)(()=>[i.readOnly?(0,g.createCommentVNode)("",!0):((0,g.openBlock)(),(0,g.createBlock)(l,{key:0,type:"secondary","icon-size":20,icon:"uiArrowExpand",class:(0,g.normalizeClass)([o.toggleDrawButtonClass,"ui-paint-toggle-draw__button"]),rounded:"",onClick:o.toggleIsDraw},null,8,["class","onClick"]))]),_:1},8,["has-drag","auto-scale","onUpdate:scale"]),a.windowStore.isMediaMaxMd?((0,g.openBlock)(),(0,g.createElementBlock)("div",z,[(0,g.createVNode)(l,{type:"secondary",size:"l",title:"Отменить",onClick:o.cancel},null,8,["onClick"]),(0,g.createVNode)(l,{type:"primary",size:"l",title:"Сохранить",onClick:o.save},null,8,["onClick"])])):(0,g.createCommentVNode)("",!0),(0,g.createVNode)(c,{"is-open":a.loading||i.initLoading,class:"ui-paint__loading"},null,8,["is-open"])])}],["__scopeId","data-v-71b763a1"]])},60907(e,t,i){i.d(t,{A:()=>c});var n=i(30944),a=i(28451),o=i(35334),r=i(33956),s=i(6301);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-c60046b5]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-c60046b5]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-c60046b5]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-c60046b5]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-c60046b5]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-c60046b5]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-c60046b5]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-c60046b5]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-c60046b5]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-c60046b5]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-c60046b5]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-c60046b5]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-c60046b5]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-c60046b5]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-c60046b5]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-c60046b5]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-c60046b5]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-c60046b5]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-c60046b5]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-c60046b5]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-c60046b5]{font-size:12px;font-weight:700;line-height:18px}.ui-color-palette[data-v-c60046b5]{flex-wrap:wrap;align-items:center;display:flex}.ui-color-palette--size-s[data-v-c60046b5]{gap:3px}.ui-color-palette--size-l[data-v-c60046b5]{gap:10px 7px}.ui-color-palette__circle[data-v-c60046b5]{fill:#fff;cursor:pointer;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex}.ui-color-palette--size-s .ui-color-palette__circle[data-v-c60046b5]{width:6px;height:6px}.ui-color-palette--size-l .ui-color-palette__circle[data-v-c60046b5]{width:22px;height:22px}.ui-color-palette__circle--is-white[data-v-c60046b5]{fill:#000;border:1px solid #e0e0e0}.ui-color-palette__circle--is-active[data-v-c60046b5]{width:26px;height:26px}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var l={name:"UiColorPalette",components:{UiIcon:a.A},props:{modelValue:{type:String,default:""},colors:{type:Array,default:()=>[]},size:{type:String,default:o.F0.L,validator:e=>!e||[o.F0.S,o.F0.L].includes(e)},hasBiggerCircle:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{iconWidth(){return this.size===o.F0.S?3:10}},methods:{isActiveColor(e){return this.modelValue===e},isWhiteColor:e=>e===r.A.white,isEmptyColor:e=>null===e,getStyleColor:e=>`background-color: ${e}`,setColor(e){this.$emit("update:modelValue",e)},getTooltipParamsByColor(e){return this.isEmptyColor(e)?"Без цвета":null}}},h=["onClick"];var c=(0,n.A)(l,[["render",function(e,t,i,n,a,o){let r=(0,s.resolveComponent)("ui-icon"),l=(0,s.resolveDirective)("tooltip");return(0,s.openBlock)(),(0,s.createElementBlock)("div",{class:(0,s.normalizeClass)(["ui-color-palette",{[`ui-color-palette--size-${i.size}`]:!!i.size}])},[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(i.colors,e=>(0,s.withDirectives)(((0,s.openBlock)(),(0,s.createElementBlock)("div",{key:`color-${e}`,class:(0,s.normalizeClass)(["ui-color-palette__circle",{"ui-color-palette__circle--is-white":o.isWhiteColor(e)||o.isEmptyColor(e),"ui-color-palette__circle--is-active":i.hasBiggerCircle&&o.isActiveColor(e)}]),style:(0,s.normalizeStyle)(o.getStyleColor(e)),onClick:t=>o.setColor(e)},[o.isActiveColor(e)?((0,s.openBlock)(),(0,s.createBlock)(r,{key:0,name:"check",width:o.iconWidth},null,8,["width"])):(0,s.createCommentVNode)("",!0)],14,h)),[[l,o.getTooltipParamsByColor(e)]])),128))],2)}],["__scopeId","data-v-c60046b5"]])},54593(e,t,i){i.d(t,{A:()=>Ve});var n=i(30944),a=i(28451),o=i(71508),r=i(60907),s=i(6301);function l(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var i=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function h(e){return Math.min(1,Math.max(0,e))}function c(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function d(e){return e<=1?"".concat(100*Number(e),"%"):e}function u(e){return 1===e.length?"0"+e:String(e)}function p(e,t,i){e=l(e,255),t=l(t,255),i=l(i,255);var n=Math.max(e,t,i),a=Math.min(e,t,i),o=0,r=0,s=(n+a)/2;if(n===a)r=0,o=0;else{var h=n-a;switch(r=s>.5?h/(2-n-a):h/(n+a),n){case e:o=(t-i)/h+(t<i?6:0);break;case t:o=(i-e)/h+2;break;case i:o=(e-t)/h+4}o/=6}return{h:o,s:r,l:s}}function f(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*i*(t-e):i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function g(e,t,i){e=l(e,255),t=l(t,255),i=l(i,255);var n=Math.max(e,t,i),a=Math.min(e,t,i),o=0,r=n,s=n-a,h=0===n?0:s/n;if(n===a)o=0;else{switch(n){case e:o=(t-i)/s+(t<i?6:0);break;case t:o=(i-e)/s+2;break;case i:o=(e-t)/s+4}o/=6}return{h:o,s:h,v:r}}function m(e,t,i,n){var a=[u(Math.round(e).toString(16)),u(Math.round(t).toString(16)),u(Math.round(i).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function v(e){return Math.round(255*parseFloat(e)).toString(16)}function b(e){return x(e)/255}function x(e){return parseInt(e,16)}var w={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
2almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function y(e){var t={r:0,g:0,b:0},i=1,n=null,a=null,o=null,r=!1,s=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(w[e])e=w[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var i=z.rgb.exec(e);if(i)return{r:i[1],g:i[2],b:i[3]};if(i=z.rgba.exec(e),i)return{r:i[1],g:i[2],b:i[3],a:i[4]};if(i=z.hsl.exec(e),i)return{h:i[1],s:i[2],l:i[3]};if(i=z.hsla.exec(e),i)return{h:i[1],s:i[2],l:i[3],a:i[4]};if(i=z.hsv.exec(e),i)return{h:i[1],s:i[2],v:i[3]};if(i=z.hsva.exec(e),i)return{h:i[1],s:i[2],v:i[3],a:i[4]};if(i=z.hex8.exec(e),i)return{r:x(i[1]),g:x(i[2]),b:x(i[3]),a:b(i[4]),format:t?"name":"hex8"};if(i=z.hex6.exec(e),i)return{r:x(i[1]),g:x(i[2]),b:x(i[3]),format:t?"name":"hex"};if(i=z.hex4.exec(e),i)return{r:x(i[1]+i[1]),g:x(i[2]+i[2]),b:x(i[3]+i[3]),a:b(i[4]+i[4]),format:t?"name":"hex8"};if(i=z.hex3.exec(e),i)return{r:x(i[1]+i[1]),g:x(i[2]+i[2]),b:x(i[3]+i[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(S(e.r)&&S(e.g)&&S(e.b)?(t=function(e,t,i){return{r:255*l(e,255),g:255*l(t,255),b:255*l(i,255)}}(e.r,e.g,e.b),r=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):S(e.h)&&S(e.s)&&S(e.v)?(n=d(e.s),a=d(e.v),t=function(e,t,i){e=6*l(e,360),t=l(t,100),i=l(i,100);var n=Math.floor(e),a=e-n,o=i*(1-t),r=i*(1-a*t),s=i*(1-(1-a)*t),h=n%6;return{r:255*[i,r,o,o,s,i][h],g:255*[s,i,i,r,o,o][h],b:255*[o,o,s,i,i,r][h]}}(e.h,n,a),r=!0,s="hsv"):S(e.h)&&S(e.s)&&S(e.l)&&(n=d(e.s),o=d(e.l),t=function(e,t,i){var n,a,o;if(e=l(e,360),t=l(t,100),i=l(i,100),0===t)a=i,o=i,n=i;else{var r=i<.5?i*(1+t):i+t-i*t,s=2*i-r;n=f(s,r,e+1/3),a=f(s,r,e),o=f(s,r,e-1/3)}return{r:255*n,g:255*a,b:255*o}}(e.h,n,o),r=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=c(i),{ok:r,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:i}}var C="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),k="[\\s|\\(]+(".concat(C,")[,|\\s]+(").concat(C,")[,|\\s]+(").concat(C,")\\s*\\)?"),_="[\\s|\\(]+(".concat(C,")[,|\\s]+(").concat(C,")[,|\\s]+(").concat(C,")[,|\\s]+(").concat(C,")\\s*\\)?"),z={CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+k),rgba:new RegExp("rgba"+_),hsl:new RegExp("hsl"+k),hsla:new RegExp("hsla"+_),hsv:new RegExp("hsv"+k),hsva:new RegExp("hsva"
2+_),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function S(e){return Boolean(z.CSS_UNIT.exec(String(e)))}var E=function(){function e(t,i){var n;if(void 0===t&&(t=""),void 0===i&&(i={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var a=y(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(n=i.format)&&void 0!==n?n:a.format,this.gradientType=i.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,i=e.g/255,n=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=c(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=g(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=g(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),n=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(i,"%, ").concat(n,"%)"):"hsva(".concat(t,", ").concat(i,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=p(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=p(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),n=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(i,"%, ").concat(n,"%)"):"hsla(".concat(t,", ").concat(i,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),m(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,i,n,a){var o=[u(Math.round(e).toString(16)),u(Math.round(t).toString(16)),u(Math.round(i).toString(16)),u(v(n))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),i=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(i,")"):"rgba(".concat(e,", ").concat(t,", ").concat(i,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*l(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*l(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+m(this.r,this.g,this.b,!1),t=0,i=Object.entries(w);t<i.length;t++){var n=i[t],a=n[0];if(e===n[1])return a}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var i=!1,n=this.a<1&&this.a>=0;
2return t||!n||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(i=this.toRgbString()),"prgb"===e&&(i=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(i=this.toHexString()),"hex3"===e&&(i=this.toHexString(!0)),"hex4"===e&&(i=this.toHex8String(!0)),"hex8"===e&&(i=this.toHex8String()),"name"===e&&(i=this.toName()),"hsl"===e&&(i=this.toHslString()),"hsv"===e&&(i=this.toHsvString()),i||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.l+=t/100,i.l=h(i.l),new e(i)},e.prototype.brighten=function(t){void 0===t&&(t=10);var i=this.toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(-t/100*255))),i.g=Math.max(0,Math.min(255,i.g-Math.round(-t/100*255))),i.b=Math.max(0,Math.min(255,i.b-Math.round(-t/100*255))),new e(i)},e.prototype.darken=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.l-=t/100,i.l=h(i.l),new e(i)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.s-=t/100,i.s=h(i.s),new e(i)},e.prototype.saturate=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.s+=t/100,i.s=h(i.s),new e(i)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var i=this.toHsl(),n=(i.h+t)%360;return i.h=n<0?360+n:n,new e(i)},e.prototype.mix=function(t,i){void 0===i&&(i=50);var n=this.toRgb(),a=new e(t).toRgb(),o=i/100;return new e({r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a})},e.prototype.analogous=function(t,i){void 0===t&&(t=6),void 0===i&&(i=30);var n=this.toHsl(),a=360/i,o=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var i=this.toHsv(),n=i.h,a=i.s,o=i.v,r=[],s=1/t;t--;)r.push(new e({h:n,s:a,v:o})),o=(o+s)%1;return r},e.prototype.splitcomplement=function(){var t=this.toHsl(),i=t.h;return[this,new e({h:(i+72)%360,s:t.s,l:t.l}),new e({h:(i+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var i=this.toRgb(),n=new e(t).toRgb(),a=i.a+n.a*(1-i.a);return new e({r:(i.r*i.a+n.r*n.a*(1-i.a))/a,g:(i.g*i.a+n.g*n.a*(1-i.a))/a,b:(i.b*i.a+n.b*n.a*(1-i.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var i=this.toHsl(),n=i.h,a=[this],o=360/t,r=1;r<t;r++)a.push(new e({h:(n+r*o)%360,s:i.s,l:i.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function V(...e){return new E(...e)}function B(e,t){const i=e&&e.a;let n;n=e&&e.hsl?V(e.hsl):e&&e.hex&&e.hex.length>0?V(e.hex):e&&e.hsv?V(e.hsv):e&&e.rgba?V(e.rgba):e&&e.rgb?V(e.rgb):V(e),!n||void 0!==n._a&&null!==n._a||n.setAlpha(i||n.getAlpha());const a=n.toHsl(),o=n.toHsv();return 0===a.s&&(o.h=a.h=e.h||e.hsl&&e.hsl.h||t||0),o.v<.0164&&(o.h=e.h||e.hsv&&e.hsv.h||0,o.s=e.s||e.hsv&&e.hsv.s||0),a.l<.01&&(a.h=e.h||e.hsl&&e.hsl.h||0,a.s=e.s||e.hsl&&e.hsl.s||0),{hsl:a,hex:n.toHexString().toUpperCase(),hex8:n.toHex8String().toUpperCase(),rgba:n.toRgb(),hsv:o,oldHue:e.h||t||a.h,source:e.source,a:n.getAlpha()}}var N={model:{prop:"modelValue",event:"update:modelValue"},props:["modelValue"],data(){return{val:B(this.modelValue)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit("update:modelValue",e)}}},watch:{modelValue(e){this.val=B(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=B(e,t||this.oldHue)},isValidHex:e=>V(e).isValid,simpleCheckForValidColor(e){const t=["r","g","b","a","h","s","l","v"];let i=0,n=0;for(let a=0;a<t.length;a++){const o=t[a];e[o]&&(i++,isNaN(e[o])||n++)}if(i===n)return e},paletteUpperCase:e=>e.map(e=>e.toUpperCase()),isTransparent:e=>0===V(e).getAlpha()}};function M(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}const I="",D=function(e,t){const{componentPrefix:i=I}=t||{};e.component(`${i}${this.name}`,this)};var A={name:"EditableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(!(void 0!==this.max&&+e>this.max))return e;this.$refs.input.value=this.max}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){const t={};t[this.label]=e,(void 0===t.hex&&void 0===t["#"]||e.length>5)&&this.$emit("change",t)},handleKeyDown(e){let{val:t}=this;const i=Number(t);if(i){const n=this.arrowOffset||1;38===e.keyCode&&(t=i+n,this.handleChange(t),e.preventDefault()),40===e.keyCode&&(t=i-n,this.handleChange(t),e.preventDefault())}}}};const L={class:"vc-editable-input"},$=["aria-labelledby"],O=["id","for"],T={class:"vc-input__desc"};function P(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e}M(".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}"),A.render=function(e,t,i,n,a,o){return(0,s.openBlock)(),(0,s.createElementBlock)("div",L,[(0,s.withDirectives)((0,s.createElementVNode)("input",{ref:"input","onUpdate:modelValue":t[0]||(t[0]=e=>o.val=e),"aria-labelledby":o.labelId,class:"vc-input__input",onKeydown:t[1]||(t[1]=(...e)=>o.handleKeyDown&&o.handleKeyDown(...e)),onInput:t[2]||(t[2]=(...e)=>o.update&&o.update(...e))},null,40,$),[[s.vModelText,o.val]]),(0,s.createElementVNode)("span",{id:o.labelId,for:i.label,class:"vc-input__label"},(0,s.toDisplayString)(o.labelSpanText),9,O),(0,s.createElementVNode)("span",T,(0,s.toDisplayString)(i.desc),1)])},A.__file="src/components/editable-input/editable-input.vue",A.install=D;var F={name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return-100*this.colors.hsv.v+1+100+"%"},pointerLeft(){return 100*this.colors.hsv.s+"%"}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:i}=this.$refs;if(!i)return;
2const n=i.clientWidth,a=i.clientHeight,o=i.getBoundingClientRect().left+window.pageXOffset,r=i.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),h=P(s-o,0,n),c=P(l-r,0,a),d=h/n,u=P(-c/a+1,0,1);this.onChange({h:this.colors.hsv.h,s:d,v:u,a:this.colors.hsv.a,source:"hsva"})},onChange(e){this.$emit("change",e)},handleMouseDown(e){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const H=(0,s.createElementVNode)("div",{class:"vc-saturation--white"},null,-1),U=(0,s.createElementVNode)("div",{class:"vc-saturation--black"},null,-1),R=[(0,s.createElementVNode)("div",{class:"vc-saturation-circle"},null,-1)];M(".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}"),F.render=function(e,t,i,n,a,o){return(0,s.openBlock)(),(0,s.createElementBlock)("div",{ref:"container",class:"vc-saturation",style:(0,s.normalizeStyle)({background:o.bgColor}),onMousedown:t[0]||(t[0]=(...e)=>o.handleMouseDown&&o.handleMouseDown(...e)),onTouchmove:t[1]||(t[1]=(...e)=>o.handleChange&&o.handleChange(...e)),onTouchstart:t[2]||(t[2]=(...e)=>o.handleChange&&o.handleChange(...e))},[H,U,(0,s.createElementVNode)("div",{class:"vc-saturation-pointer",style:(0,s.normalizeStyle)({top:o.pointerTop,left:o.pointerLeft})},R,4)],36)},F.__file="src/components/saturation/saturation.vue",F.install=D;var j={name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data:()=>({oldHue:0,pullDirection:""}),computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":"horizontal"===this.direction,"vc-hue--vertical":"vertical"===this.direction}},pointerTop(){return"vertical"===this.direction?0===this.colors.hsl.h&&"right"===this.pullDirection?0:-100*this.colors.hsl.h/360+100+"%":0},pointerLeft(){return"vertical"===this.direction?0:0===this.colors.hsl.h&&"right"===this.pullDirection?"100%":100*this.colors.hsl.h/360+"%"}},watch:{value:{handler(e,t){const{h:i}=e.hsl;0!==i&&i-this.oldHue>0&&(this.pullDirection="right"),0!==i&&i-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=i},deep:!0,immediate:!0}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:i}=this.$refs;if(!i)return;const n=i.clientWidth,a=i.clientHeight,o=i.getBoundingClientRect().left+window.pageXOffset,r=i.getBoundingClientRect().top+window.pageYOffset,s=(e.pageX||(e.touches?e.touches[0].pageX:0))-o,l=(e.pageY||(e.touches?e.touches[0].pageY:0))-r;let h,c;"vertical"===this.direction?(l<0?h=360:l>a?h=0:(c=-100*l/a+100,h=360*c/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(s<0?h=0:s>n?h=360:(c=100*s/n,h=360*c/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const W=["aria-valuenow"],X=[(0,s.createElementVNode)("div",{class:"vc-hue-picker"},null,-1)];M(".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}
2.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}"),j.render=function(e,t,i,n,a,o){return(0,s.openBlock)(),(0,s.createElementBlock)("div",{class:(0,s.normalizeClass)(["vc-hue",[o.directionClass]])},[(0,s.createElementVNode)("div",{ref:"container",class:"vc-hue-container",role:"slider","aria-valuenow":o.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",onMousedown:t[0]||(t[0]=(...e)=>o.handleMouseDown&&o.handleMouseDown(...e)),onTouchmove:t[1]||(t[1]=(...e)=>o.handleChange&&o.handleChange(...e)),onTouchstart:t[2]||(t[2]=(...e)=>o.handleChange&&o.handleChange(...e))},[(0,s.createElementVNode)("div",{class:"vc-hue-pointer",style:(0,s.normalizeStyle)({top:o.pointerTop,left:o.pointerLeft}),role:"presentation"},X,4)],40,W)],2)},j.__file="src/components/hue/hue.vue",j.install=D;const Y={};var q={name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":`url(${G(this.white,this.grey,this.size)})`}}}};function G(e,t,i){const n=`${e},${t},${i}`;if(Y[n])return Y[n];const a=function(e,t,i){if("undefined"==typeof document)return null;const n=document.createElement("canvas");n.width=n.height=2*i;const a=n.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,n.width,n.height),a.fillStyle=t,a.fillRect(0,0,i,i),a.translate(i,i),a.fillRect(0,0,i,i),n.toDataURL()):null}(e,t,i);return Y[n]=a,a}M(".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}"),q.render=function(e,t,i,n,a,o){return(0,s.openBlock)(),(0,s.createElementBlock)("div",{class:"vc-checkerboard",style:(0,s.normalizeStyle)(o.bgStyle)},null,4)},q.__file="src/components/checkboard/checkboard.vue",q.install=D;var K={name:"Alpha",components:{Checkboard:q},props:{value:Object,onChange:Function},computed:{colors(){return this.value},gradientColor(){const{rgba:e}=this.colors,t=[e.r,e.g,e.b].join(",");return`linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:i}=this.$refs;if(!i)return;const n=i.clientWidth,a=i.getBoundingClientRect().left+window.pageXOffset,o=(e.pageX||(e.touches?e.touches[0].pageX:0))-a;let r;r=o<0?0:o>n?1:Math.round(100*o/n)/100,this.colors.a!==r&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:r,source:"rgba"})},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const J={class:"vc-alpha"},Q={class:"vc-alpha-checkboard-wrap"},Z=[(0,s.createElementVNode)("div",{class:"vc-alpha-picker"},null,-1)];M(".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}"),K.render=function(e,t,i,n,a,o){const r=(0,s.resolveComponent)("Checkboard");return(0,s.openBlock)(),(0,s.createElementBlock)("div",J,[(0,s.createElementVNode)("div",Q,[(0,s.createVNode)(r)]),(0,s.createElementVNode)("div",{class:"vc-alpha-gradient",style:(0,s.normalizeStyle)({background:o.gradientColor})},null,4),(0,s.createElementVNode)("div",{ref:"container",class:"vc-alpha-container",onMousedown:t[0]||(t[0]=(...e)=>o.handleMouseDown&&o.handleMouseDown(...e)),onTouchmove:t[1]||(t[1]=(...e)=>o.handleChange&&o.handleChange(...e)),onTouchstart:t[2]||(t[2]=(...e)=>o.handleChange&&o.handleChange(...e))},[(0,s.createElementVNode)("div",{class:"vc-alpha-pointer",style:(0,s.normalizeStyle)({left:100*o.colors.a+"%"})},Z,4)],544)])}
2,K.__file="src/components/alpha/alpha.vue",K.install=D;var ee={name:"Chrome",components:{Saturation:F,Hue:j,Alpha:K,EdIn:A,Checkboard:q},mixins:[N],props:{disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1},format:{type:String,default:"hex"}},data:()=>({fieldsIndex:"hex",highlight:!1}),computed:{hsl(){const{h:e,s:t,l:i}=this.colors.hsl;return{h:e.toFixed(),s:`${(100*t).toFixed()}%`,l:`${(100*i).toFixed()}%`}},activeColor(){const{rgba:e}=this.colors;return`rgba(${[e.r,e.g,e.b,e.a].join(",")})`},hasAlpha(){return this.colors.a<1}},watch:{format:{handler(e){this.fieldsIndex=e},immediate:!0}},methods:{childChange(e){this.colorChange(e)},inputChange(e){if(e)if(e.hex)this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:"hex"});else if(e.r||e.g||e.b||e.a)this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:"rgba"});else if(e.h||e.s||e.l){const t=e.s?e.s.replace("%","")/100:this.colors.hsl.s,i=e.l?e.l.replace("%","")/100:this.colors.hsl.l;this.colorChange({h:e.h||this.colors.hsl.h,s:t,l:i,source:"hsl"})}},toggleViews(){switch(this.fieldsIndex){case"hex":this.fieldsIndex="rgb"+(this.disableAlpha?"":"a");break;case"rgb":case"rgba":this.fieldsIndex="hsl"+(this.disableAlpha?"":"a");break;default:this.fieldsIndex="hex"}this.$emit("update:format",this.fieldsIndex)},showHighlight(){this.highlight=!0},hideHighlight(){this.highlight=!1}}};const te={class:"vc-chrome-saturation-wrap"},ie={class:"vc-chrome-body"},ne={class:"vc-chrome-controls"},ae={class:"vc-chrome-color-wrap"},oe=["aria-label"],re={class:"vc-chrome-sliders"},se={class:"vc-chrome-hue-wrap"},le={key:0,class:"vc-chrome-alpha-wrap"},he={key:0,class:"vc-chrome-fields-wrap"},ce={class:"vc-chrome-fields"},de={class:"vc-chrome-field"},ue={class:"vc-chrome-fields"},pe={class:"vc-chrome-field"},fe={class:"vc-chrome-field"},ge={class:"vc-chrome-field"},me={key:0,class:"vc-chrome-field"},ve={class:"vc-chrome-fields"},be={class:"vc-chrome-field"},xe={class:"vc-chrome-field"},we={class:"vc-chrome-field"},ye={key:0,class:"vc-chrome-field"},Ce={class:"vc-chrome-toggle-icon"},ke=[(0,s.createElementVNode)("path",{fill:"#333",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"},null,-1)],_e={class:"vc-chrome-toggle-icon-highlight"};M(".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}"),ee.render=function(e,t,i,n,a,o){const r=(0,s.resolveComponent)("Saturation"),l=(0,s.resolveComponent)("Checkboard"),h=(0,s.resolveComponent)("Hue"),c=(0,s.resolveComponent)("Alpha"),d=(0,s.resolveComponent)("EdIn");return(0,s.openBlock)(),(0,s.createElementBlock)("div",{role:"application","aria-label":"Chrome color picker",class:(0,s.normalizeClass)(["vc-chrome",[i.disableAlpha?"vc-chrome__disable-alpha":""]])},[(0,s.createElementVNode)("div",te,[(0,s.createVNode)(r,{value:e.colors,onChange:o.childCh
2ange},null,8,["value","onChange"])]),(0,s.createElementVNode)("div",ie,[(0,s.createElementVNode)("div",ne,[(0,s.createElementVNode)("div",ae,[(0,s.createElementVNode)("div",{"aria-label":`current color is ${e.colors.hex}`,class:"vc-chrome-active-color",style:(0,s.normalizeStyle)({background:o.activeColor})},null,12,oe),i.disableAlpha?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createBlock)(l,{key:0}))]),(0,s.createElementVNode)("div",re,[(0,s.createElementVNode)("div",se,[(0,s.createVNode)(h,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]),i.disableAlpha?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createElementBlock)("div",le,[(0,s.createVNode)(c,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]))])]),i.disableFields?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createElementBlock)("div",he,[(0,s.withDirectives)((0,s.createElementVNode)("div",ce,[(0,s.createCommentVNode)(" hex "),(0,s.createElementVNode)("div",de,[o.hasAlpha?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createBlock)(d,{key:0,label:"hex",value:e.colors.hex,onChange:o.inputChange},null,8,["value","onChange"])),o.hasAlpha?((0,s.openBlock)(),(0,s.createBlock)(d,{key:1,label:"hex",value:e.colors.hex8,onChange:o.inputChange},null,8,["value","onChange"])):(0,s.createCommentVNode)("v-if",!0)])],512),[[s.vShow,"hex"===a.fieldsIndex]]),(0,s.withDirectives)((0,s.createElementVNode)("div",ue,[(0,s.createCommentVNode)(" rgba "),(0,s.createElementVNode)("div",pe,[(0,s.createVNode)(d,{label:"r",value:e.colors.rgba.r,onChange:o.inputChange},null,8,["value","onChange"])]),(0,s.createElementVNode)("div",fe,[(0,s.createVNode)(d,{label:"g",value:e.colors.rgba.g,onChange:o.inputChange},null,8,["value","onChange"])]),(0,s.createElementVNode)("div",ge,[(0,s.createVNode)(d,{label:"b",value:e.colors.rgba.b,onChange:o.inputChange},null,8,["value","onChange"])]),i.disableAlpha?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createElementBlock)("div",me,[(0,s.createVNode)(d,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[s.vShow,["rgb","rgba"].includes(a.fieldsIndex)]]),(0,s.withDirectives)((0,s.createElementVNode)("div",ve,[(0,s.createCommentVNode)(" hsla "),(0,s.createElementVNode)("div",be,[(0,s.createVNode)(d,{label:"h",value:o.hsl.h,onChange:o.inputChange},null,8,["value","onChange"])]),(0,s.createElementVNode)("div",xe,[(0,s.createVNode)(d,{label:"s",value:o.hsl.s,onChange:o.inputChange},null,8,["value","onChange"])]),(0,s.createElementVNode)("div",we,[(0,s.createVNode)(d,{label:"l",value:o.hsl.l,onChange:o.inputChange},null,8,["value","onChange"])]),i.disableAlpha?(0,s.createCommentVNode)("v-if",!0):((0,s.openBlock)(),(0,s.createElementBlock)("div",ye,[(0,s.createVNode)(d,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[s.vShow,["hsl","hsla"].includes(a.fieldsIndex)]]),(0,s.createCommentVNode)(" btn "),(0,s.createElementVNode)("div",{class:"vc-chrome-toggle-btn",role:"button","aria-label":"Change another color definition",onClick:t[3]||(t[3]=(...e)=>o.toggleViews&&o.toggleViews(...e))},[(0,s.createElementVNode)("div",Ce,[((0,s.openBlock)(),(0,s.createElementBlock)("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",onMouseover:t[0]||(t[0]=(...e)=>o.showHighlight&&o.showHighlight(...e)),onMouseenter:t[1]||(t[1]=(...e)=>o.showHighlight&&o.showHighlight(...e)),onMouseout:t[2]||(t[2]=(...e)=>o.hideHighlight&&o.hideHighlight(...e))},ke,32))]),(0,s.withDirectives)((0,s.createElementVNode)("div",_e,null,512),[[s.vShow,a.highlight]])]),(0,s.createCommentVNode)(" btn ")]))])],2)},ee.__file="src/components/chrome/chrome.vue",ee.install=D,function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ui-font-h1-regular[data-v-58cfe5eb]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-58cfe5eb]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-58cfe5eb]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-58cfe5eb]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-58cfe5eb]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-58cfe5eb]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-58cfe5eb]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-58cfe5eb]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-58cfe5eb]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-58cfe5eb]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-58cfe5eb]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-58cfe5eb]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-58cfe5eb]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-58cfe5eb]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-58cfe5eb]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-58cfe5eb]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-58cfe5eb]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-58cfe5eb]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-58cfe5eb]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-58cfe5eb]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-58cfe5eb]{font-size:12px;font-weight:700;line-height:18px}
2.ui-palette-picker[data-v-58cfe5eb]{display:flex}.ui-palette-picker__modal[data-v-58cfe5eb]{flex-wrap:wrap;align-items:center;gap:10px 7px;display:flex}.ui-palette-picker.is-modal .ui-palette-picker__modal[data-v-58cfe5eb]{grid-column-gap:16px;grid-row-gap:16px;grid-template-columns:repeat(5,minmax(0,1fr));display:grid}.ui-palette-picker.is-modal .ui-palette-picker__modal._reverse-gap[data-v-58cfe5eb]{grid-column-gap:16px;grid-row-gap:16px}.ui-palette-picker.is-modal .ui-palette-picker__modal[data-v-58cfe5eb]{z-index:1;background-color:#fff;border:1px solid #e1e2e5;border-radius:6px;margin-bottom:0;padding:9px;position:absolute;top:74px}.ui-palette-picker-circle[data-v-58cfe5eb]{fill:#fff;cursor:pointer;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:22px;height:22px;display:flex}.ui-palette-picker-circle[data-v-58cfe5eb]:first-child{fill:#000;border:1px solid #e0e0e0}.ui-palette-picker-circle[data-v-58cfe5eb]:last-child{margin-right:0}.ui-palette-picker-circle.gradient[data-v-58cfe5eb]{background:conic-gradient(red,#ff0,#0f0,#0ff,#00f,#f0f,red);margin-right:0}.ui-palette-picker-circle.is-active[data-v-58cfe5eb]{width:26px;height:26px}.right-position[data-v-58cfe5eb]{right:0}.ui-palette-picker-any-color[data-v-58cfe5eb]{position:relative}.ui-palette-picker-any-color__picker[data-v-58cfe5eb]{z-index:2;margin-top:10px;position:absolute}@media screen and (width<=576px){.ui-palette-picker.is-modal .ui-palette-picker-circle[data-v-58cfe5eb]{width:32px;height:32px;margin:0}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var ze={name:"UiPalettePicker",components:{UiIcon:a.A,UiColorPalette:r.A,"color-picker":ee},props:{modelValue:{type:String,default:""},hasBiggerCircle:{type:Boolean,default:!1},disableAlpha:{type:Boolean,default:!0},colors:{type:Array,default:()=>[]},isModal:Boolean},emits:["update:modelValue"],data:()=>({isOpenModal:!1,openColorPicker:!1,rightPosition:!1,resizeHandler:null}),computed:{activeColor:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},hasColor(){return-1===this.colors.indexOf(this.activeColor)},modalClass(){return{"is-modal":this.isModal}},clickOutsideEvent(){return{handler:this.closeModal,events:["click"],isActive:this.isOpenModal}}},mounted(){this.getPosition(),this.resizeHandler=(0,o.nF)(this.getPosition,50),window.addEventListener("resize",this.resizeHandler)},beforeUnmount(){this.resizeHandler&&=(window.removeEventListener("resize",this.resizeHandler),null)},methods:{openModal(){this.isOpenModal=!0},closeModal(){this.isOpenModal=!1},setColor(e){this.activeColor=e},isActiveColor(e){return this.activeColor===e},getStyleColor:e=>`background-color: ${e}`,setColorPicker(e){this.activeColor=this.disableAlpha?e.hex:e.hex8},getPosition(){this.$refs.picker&&(this.rightPosition=document.documentElement.clientWidth-this.$refs.picker.getBoundingClientRect().right<225)},setOpenColorPicker(){this.openColorPicker=!0},close(){this.openColorPicker=!1}}},Se={key:1,class:"ui-palette-picker__modal"},Ee={class:"ui-palette-picker-any-color"};var Ve=(0,n.A)(ze,[["render",function(e,t,i,n,a,o){let r=(0,s.resolveComponent)("ui-color-palette"),l=(0,s.resolveComponent)("ui-icon"),h=(0,s.resolveComponent)("color-picker"),c=(0,s.resolveDirective)("click-outside");return(0,s.openBlock)(),(0,s.createElementBlock)("div",{class:(0,s.normalizeClass)(["ui-palette-picker",o.modalClass])},[i.isModal?((0,s.openBlock)(),(0,s.createElementBlock)("div",{key:0,class:"ui-palette-picker-circle",style:(0,s.normalizeStyle)(o.getStyleColor(this.activeColor)),onClick:t[0]||=(0,s.withModifiers)((...e)=>o.openModal&&o.openModal(...e),["stop"])},null,4)):(0,s.createCommentVNode)("",!0),!i.isModal||a.isOpenModal?(0,s.withDirectives)(((0,s.openBlock)(),(0,s.createElementBlock)("div",Se,[(0,s.createVNode)(r,{modelValue:o.activeColor,"onUpdate:modelValue":t[1]||=e=>o.activeColor=e,colors:i.colors,"has-bigger-bircle":i.hasBiggerCircle},null,8,["modelValue","colors","has-bigger-bircle"]),(0,s.createElementVNode)("div",Ee,[(0,s.createElementVNode)("div",{ref:"picker",class:"ui-palette-picker-circle gradient",onClick:t[2]||=(...e)=>o.setOpenColorPicker&&o.setOpenColorPicker(...e)},[o.hasColor?((0,s.openBlock)(),(0,s.createBlock)(l,{key:0,name:"check",width:10})):(0,s.createCommentVNode)("",!0)],512),a.openColorPicker?(0,s.withDirectives)(((0,s.openBlock)(),(0,s.createBlock)(h,{key:0,"model-value":o.activeColor,"disable-alpha":i.disableAlpha,class:(0,s.normalizeClass)(["ui-palette-picker-any-color__picker",{"right-position":a.rightPosition}]),"onUpdate:modelValue":o.setColorPicker},null,8,["model-value","disable-alpha","class","onUpdate:modelValue"])),[[c,{handler:o.close,events:["mousedown"],isActive:a.openColorPicker}]]):(0,s.createCommentVNode)("",!0)])])),[[c,o.clickOutsideEvent]]):(0,s.createCommentVNode)("",!0)],2)}],["__scopeId","data-v-58cfe5eb"]])},44628(e,t,i){i.d(t,{A:()=>s});var n=i(30944),a=i(6301);!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ui-font-h1-regular[data-v-f1b443c2]{font-size:44px;font-weight:400;line-height:53px}.ui-font-h2-regular[data-v-f1b443c2]{font-size:32px;font-weight:400;line-height:39px}.ui-font-h3-regular[data-v-f1b443c2]{font-size:24px;font-weight:400;line-height:36px}.ui-font-h4-regular[data-v-f1b443c2]{font-size:18px;font-weight:400;line-height:27px}.ui-font-body-regular[data-v-f1b443c2]{font-size:16px;font-weight:400;line-height:24px}.ui-font-subtitle-regular[data-v-f1b443c2]{font-size:14px;font-weight:400;line-height:21px}.ui-font-caption-regular[data-v-f1b443c2]{font-size:12px;font-weight:400;line-height:18px}.ui-font-h1-medium[data-v-f1b443c2]{font-size:44px;font-weight:500;line-height:53px}.ui-font-h2-medium[data-v-f1b443c2]{font-size:32px;font-weight:500;line-height:39px}.ui-font-h3-medium[data-v-f1b443c2]{font-size:24px;font-weight:500;line-height:36px}.ui-font-h4-medium[data-v-f1b443c2]{font-size:18px;font-weight:500;line-height:27px}.ui-font-body-medium[data-v-f1b443c2]{font-size:16px;font-weight:500;line-height:24px}.ui-font-subtitle-medium[data-v-f1b443c2]{font-size:14px;font-weight:500;line-height:21px}.ui-font-caption-medium[data-v-f1b443c2]{font-size:12px;font-weight:500;line-height:18px}.ui-font-h1-bold[data-v-f1b443c2]{font-size:44px;font-weight:700;line-height:53px}.ui-font-h2-bold[data-v-f1b443c2]{font-size:32px;font-weight:700;line-height:39px}.ui-font-h3-bold[data-v-f1b443c2]{font-size:24px;font-weight:700;line-height:36px}.ui-font-h4-bold[data-v-f1b443c2]{font-size:18px;font-weight:700;line-height:27px}.ui-font-body-bold[data-v-f1b443c2]{font-size:16px;font-weight:700;line-height:24px}.ui-font-subtitle-bold[data-v-f1b443c2]{font-size:14px;font-weight:700;line-height:21px}.ui-font-caption-bold[data-v-f1b443c2]{font-size:12px;font-weight:700;line-height:18px}.ui-slider-input[data-v-f1b443c2]{width:100%}.ui-slider-input-rail[data-v-f1b443c2]{height:16px;position:relative}.ui-slider-input-rail[data-v-f1b443c2]:before{content:"";background-color:#e0e0e0;border-radius:4px;width:100%;height:4px;display:block;position:absolute;top:50%;transform:translateY(-50%)}.ui-slider-input-rail-value[data-v-f1b443c2]{content:"";background-color:#0060e1;border-radius:4px;width:100%;height:4px;display:block;position:absolute;top:50%;transform:translateY(-50%)}.ui-slider-input-knob[data-v-f1b443c2]{cursor:grab;appearance:none;background-color:#0000;border:none;border-radius:100%;outline:none;width:16px;height:16px;padding:0;transition:none;position:absolute;
2left:0}.ui-slider-input-knob[data-v-f1b443c2]:before,.ui-slider-input-knob[data-v-f1b443c2]:after{content:"";background-color:#fff;border:2px solid #0060e1;border-radius:50%;width:100%;height:100%;position:absolute;top:0;left:0}.ui-slider-input-knob[data-v-f1b443c2]:active{cursor:grabbing}.is-animated .ui-slider-input-rail-value[data-v-f1b443c2]{will-change:width;transition:width .3s linear}.is-animated .ui-slider-input-knob[data-v-f1b443c2]{will-change:transform;transition:transform .3s linear}')),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var o={name:"UiSliderInput",props:{max:{type:Number,required:!0},min:{type:Number,required:!0},modelValue:{type:Number,required:!0},step:{type:Number,default:1}},emits:["update:modelValue"],data:()=>({isDragging:!1,shouldAnimate:!0,dimensions:{railWidth:0,railOffset:0,knobWidth:0}}),computed:{sliderValue:{get(){return this.modelValue},set(e){this.checkValueBounds(),this.$emit("update:modelValue",e)}},railValueOffset(){return this.valueOffset+this.dimensions.knobWidth-1},sliderWidth(){return this.dimensions.railWidth-this.dimensions.knobWidth},valueOffset(){return Math.round(this.sliderWidth*((Math.min(Math.max(this.sliderValue,this.min),this.max)-this.min)/(this.max-this.min)))}},watch:{isDragging(e){e?this.bindDocumentEvents():this.unbindDocumentEvents()},max(){this.checkValueBounds()},min(){this.checkValueBounds()}},mounted(){window.addEventListener("resize",this.updateDimensions),this.updateDimensions()},beforeUnmount(){window.removeEventListener("resize",this.updateDimensions),this.unbindDocumentEvents()},methods:{bindDocumentEvents(){document.addEventListener("mouseup",this.endDragging,{once:!0}),document.addEventListener("mousemove",this.drag),document.addEventListener("touchend",this.endDragging,{once:!0}),document.addEventListener("touchmove",this.drag,{passive:!1})},checkValueBounds(){this.sliderValue>this.max&&(this.sliderValue=this.max),this.sliderValue<this.min&&(this.sliderValue=this.min)},drag(e){if(!this.isDragging)return!1;this.shouldAnimate=!1,this.positionChange(e)},endDragging(){this.isDragging=!1},positionChange(e){e.preventDefault();let t=-1;switch(e.type){case"touchmove":t=1===e.targetTouches.length?e.targetTouches[0].pageX:-1;break;case"click":case"mousemove":t=e.pageX}if(-1===t)return;let i=t-this.dimensions.railOffset-this.$refs.knob.offsetWidth/2,n=Math.round(Math.max(0,Math.min(this.sliderWidth,i)))/this.sliderWidth;this.sliderValue=Math.round((n*(this.max-this.min)+this.min)/this.step)*this.step},railClick(e){this.shouldAnimate=!0,this.positionChange(e)},startDragging(){this.isDragging=!0},unbindDocumentEvents(){document.removeEventListener("mouseup",this.endDragging),document.removeEventListener("mousemove",this.drag),document.removeEventListener("touchend",this.endDragging),document.removeEventListener("touchmove",this.drag)},updateDimensions(){this.$nextTick(()=>{let e=this.$refs.rail.getBoundingClientRect(),t=e.width,i=e.x||e.left;this.dimensions.railWidth=Math.ceil(t),this.dimensions.railOffset=Math.ceil(i),this.dimensions.knobWidth=Math.ceil(this.$refs.knob.getBoundingClientRect().width)})}}},r={class:"ui-slider-input"};var s=(0,n.A)(o,[["render",function(e,t,i,n,o,s){return(0,a.openBlock)(),(0,a.createElementBlock)("div",r,[(0,a.createElementVNode)("div",{ref:"rail",class:(0,a.normalizeClass)(["ui-slider-input-rail",{"is-animated":o.shouldAnimate}]),onClick:t[2]||=(...e)=>s.railClick&&s.railClick(...e)},[(0,a.createElementVNode)("span",{class:"ui-slider-input-rail-value",style:(0,a.normalizeStyle)({width:`${s.railValueOffset}px`})},null,4),(0,a.createElementVNode)("button",{ref:"knob",class:"ui-slider-input-knob",style:(0,a.normalizeStyle)({transform:`translateX(${s.valueOffset}px)`}),onMousedown:t[0]||=(...e)=>s.startDragging&&s.startDragging(...e),onTouchstart:t[1]||=(...e)=>s.startDragging&&s.startDragging(...e)},null,36)],2)])}],["__scopeId","data-v-f1b443c2"]])},31495(e,t,i){i.d(t,{V9:()=>a,rG:()=>n});var n=(e,t,i)=>{let n=e=>{((e.key||e.keyCode)===i||e.keyCode===i)&&t()},a=e&&"function"==typeof e.addEventListener?e:document;return a.addEventListener("keyup",n),()=>{a.removeEventListener("keyup",n)}},a=e=>1===(e.which||e.button)},24729(e,t,i){i.d(t,{A:()=>n});var n={props:{isOpen:{type:Boolean,default:!1}},emits:["update:is-open","close","open"],data:()=>({loading:!1,isInitModal:!1}),computed:{innerIsOpen:{get(){return this.isOpen},set(e){e?this.open():this.close()}}},watch:{isOpen:{handler(e){e?(this.isInitModal||this.firstInit?.(),this.init?.(),this.isInitModal=!0):this.clear?.()},immediate:!0}},methods:{close(){this.$emit("update:is-open",!1),this.$emit("close")},open(){this.$emit("update:is-open",!0),this.$emit("open")}}}},41093(e,t,i){i.r(t),i.d(t,{default:()=>f});var n=i(6301),a={key:0,class:"qt-block-ui qt-block-ui-absolute"},o={key:0},r=["data-id"],s={key:1};function l(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function o(i,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return h(c,"_invoke",function(i,n,a){var o,s,l,h=0,c=a||[],d=!1,u={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,i){return o=t,s=0,l=e,u.n=i,r}};function p(i,n){for(s=i,l=n,t=0;!d&&h&&!a&&t<c.length;t++){var a,o=c[t],p=u.p,f=o[2];i>3?(a=f===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((a=i<2&&p<o[1])?(s=0,u.v=n,u.n=o[1]):p<f&&(a=i<3||o[0]>n||n>f)&&(o[4]=i,o[5]=n,u.n=f,s=0))}if(a||i>1)return r;throw d=!0,n}return function(a,c,f){if(h>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),s=c,l=f;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(u.n=-1),p(s,l)):u.n=l:u.v=l);try{if(h=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=u.n<0)?l:i.call(n,u))!==r)break}catch(t){o=e,s=1,l=t}finally{h=1}}return{value:t,done:d}}}(i,a,o),!0),c}var r={};function s(){}function c(){}function d(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(h(t={},n,function(){return this}),t),p=d.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,h(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,h(p,"constructor",d),h(d,"constructor",c),c.displayName="GeneratorFunction",h(d,a,"GeneratorFunction"),h(p),h(p,a,"Generator"),h(p,n,function(){return this}),h(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:f}})()}function h(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}h=function(e,t,i,n){function o(t,i){h(e,t,function(e){return this._invoke(t,i,e)})}t?a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(o("next",0),o("throw",1),o("return",2))},h(e,t,i,n)}function c(e,t,i,n,a,o,r){try{var s=e[o](r),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function d(e){return function(){var t=this,i=arguments;return new Promise(function(n,a){var o=e.apply(t,i);function r(e){c(o,n,a,r,s,"next",e)}function s(e){c(o,n,a,r,s,"throw",e)}r(void 0)})}}const u={components:{UiLightbox:i(84256).A},props:["owner_id","owner_type","collection","max_width","max_height","file","thumb_height"],data:function(){return{fileData:this.file||{},loader:!1}},methods:{photoChange:function(){var e=this;return d(l().m(function t(){var i,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(i=Array.from(event.target.files),!(n=i[0])){t.n=2;break}return e.loader=!0,t.n=1,e.uploadPhoto(n);case 1:e.loader=!1;case 2:return t.a(2)}},t)}))()},uploadPhoto:function(e){var t=this;return d(l().m(function i(){var n;return l().w(function(i){for(;;)switch(i.n){case 0:return(n=new FormData).append("collection",t.collection||""),n.append("maxWidth",t.max_width||0),n.append("maxHeight",t.max_height||0),n.append("file",e),i.n=1,axios.post("/api/v1/owners/".concat(t.owner_type,"/").concat(t.owner_id,"/attachments"),n).then(function(e){t.fileData=e.data});case 1:return i.a(2)}},i)}))()},confirmDeletePhoto:function(){var e=this;this.$openConfirmModal("Удалить изображение?",null,function(){return e.deletePhoto()},null,"Удалить")},deletePhoto:function(){var e,t=this;null!==(e=this.fileData)&&void 0!==e&&e.id&&(this.loader=!0,axios.delete("/api/v1/owners/".concat(this.owner_type,"/").concat(this.owner_id,"/attachments/").concat(this.fileData.id)).then(function(){t.loader=!1,t.fileData={}}))}}};const p=(0,i(66262).A)(u,[["render",function(e,t,i,l,h,c){var d=(0,n.resolveComponent)("ui-lightbox");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createVNode)(n.Transition,{name:"fade"},{default:(0,n.withCtx)(function(){return[h.loader?((0,n.openBlock)(),(0,n.createElementBlock)("div",a)):(0,n.createCommentVNode)("",!0)]}),_:1}),h.fileData.url?((0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(d,{images:h.fileData},null,8,["images"]),(0,n.createElementVNode)("a",{href:"#","data-id":h.fileData.id,class:"btn btn-light btn-outline btn-sm mt-3",onClick:t[0]||(t[0]=(0,n.withModifiers)(function(){return c.confirmDeletePhoto&&c.confirmDeletePhoto.apply(c,arguments)},["prevent"]))},"Удалить",8,r)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",s,[(0,n.createElementVNode)("input",{id:"img_upload",type:"file",name:"img_upload",accept:"image/*",class:"input-file",onChange:t[1]||(t[1]=function(){return c.photoChange&&c.photoChange.apply(c,arguments)})},null,32),t[2]||(t[2]=(0,n.createElementVNode)("label",{for:"img_upload",class:"btn btn-light btn-outline btn-sm"},[(0,n.createElementVNode)("i",{class:"la la-level-up font-size-18"}),(0,n.createTextVNode)(" Выбрать файл ")],-1))]))])}]]),f=p}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.