vue-spear-tip 0.6.20 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +41 -41
- package/dist/{Button-CAJDF40j.cjs → Button-DL8dzhLs.cjs} +1 -1
- package/dist/{Button-vs70k3y-.js → Button-mNgrIBt0.js} +1 -1
- package/dist/{CodeHighlight-C5LisCU3.cjs → CodeHighlight-CWT9ljxW.cjs} +1 -1
- package/dist/{CodeHighlight-C-3pwzbK.js → CodeHighlight-eMrWWqjO.js} +1 -1
- package/dist/{DateField-CCjHobsM.cjs → DateField-276tU7dR.cjs} +1 -1
- package/dist/{DateField-QZ0RVuEI.js → DateField-DJgLEfuJ.js} +2 -2
- package/dist/{Draggable-Beja0hFj.cjs → Draggable-D9K46teR.cjs} +1 -1
- package/dist/{Draggable-Drzs2CPN.js → Draggable-xSaOZkIc.js} +1 -1
- package/dist/{Droppable-DrURkIH4.js → Droppable-DGc3gGXX.js} +1 -1
- package/dist/{Droppable-mZqnMqzB.cjs → Droppable-ozHn_LH7.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-DF1Q1YIa.js → FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-B-z2yOtA.cjs → FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs} +1 -1
- package/dist/{FilesArea-DCrFjTXo.js → FilesArea-C9z4gTb0.js} +2 -2
- package/dist/{FilesArea-ihfL0_JW.cjs → FilesArea-DZiv8wBT.cjs} +1 -1
- package/dist/{Scrollbar-B-5t6tsN.js → Scrollbar-CBCuild6.js} +1 -1
- package/dist/{Scrollbar-DKIMAMUs.cjs → Scrollbar-DpX61NhD.cjs} +1 -1
- package/dist/{SelectField-DWeh3qeQ.js → SelectField-BN765HUF.js} +108 -102
- package/dist/{SelectField-C5jCjz-H.cjs → SelectField-BTQ-c5YW.cjs} +2 -2
- package/dist/{StringField-xd5hAzKC.cjs → StringField-D4k0FAo8.cjs} +1 -1
- package/dist/{StringField-_2xWOAx7.js → StringField-DXuKHlpt.js} +2 -2
- package/dist/{SwitchField-Baz2nBD0.js → SwitchField-BdKQGeSb.js} +2 -2
- package/dist/{SwitchField-m0Hp4wHc.cjs → SwitchField-Dj2QpW85.cjs} +1 -1
- package/dist/{Tabs-D42K5MjE.js → Tabs-CAbUgriG.js} +1 -1
- package/dist/{Tabs-DUragp0z.cjs → Tabs-Dm8Aj2Y8.cjs} +1 -1
- package/dist/{TextField--CH2O_wo.js → TextField-BTofkhCU.js} +2 -2
- package/dist/{TextField-G7cNmIeJ.cjs → TextField-DJkk40xg.cjs} +1 -1
- package/dist/{index-CCc6hATh.js → index-Cd_DL4JD.js} +3 -3
- package/dist/{index-BgWRAiiR.cjs → index-DZjDh7FL.cjs} +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/{Button-D7mEEsUM.js → Button-8C6MeUM7.js} +1 -1
- package/docs/static/{CodeHighlight-C5z_7qJE.js → CodeHighlight-DFeMy3ki.js} +1 -1
- package/docs/static/{DateField-CyrKoUoT.js → DateField-Cf48x5xH.js} +1 -1
- package/docs/static/{Draggable-DvYh-Mq2.js → Draggable-CS4w2yK4.js} +1 -1
- package/docs/static/{Droppable-CjvR76y4.js → Droppable-wLX0xjMl.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-BGU29o43.js → FieldComponent.vue_vue_type_script_lang-Ig4MpRH0.js} +1 -1
- package/docs/static/{FilesArea-BuyraK7u.js → FilesArea-Cl92W6MM.js} +1 -1
- package/docs/static/{NoSymbolIcon-BFWxS8vy.js → NoSymbolIcon-NizHqgdb.js} +1 -1
- package/docs/static/{Scrollbar-B1RlHJdY.js → Scrollbar-l6hENTT0.js} +1 -1
- package/docs/static/{SelectField-Dm5Zy3ZA.js → SelectField-CC7fBKuR.js} +8 -8
- package/docs/static/{StringField-CN3dgDY_.js → StringField-2LaMICQ8.js} +1 -1
- package/docs/static/{SwitchField-CAWor2EI.js → SwitchField-DaP3PVMB.js} +1 -1
- package/docs/static/{Tabs-C1V64QTo.js → Tabs-CBsULMP9.js} +1 -1
- package/docs/static/{TextField-Sq7oBihL.js → TextField-DUq1jGAW.js} +1 -1
- package/docs/static/index-DpXxVeQv.js +2 -0
- package/docs/static/{main-A2tcl52U.js → main-BIpS3Kki.js} +3 -3
- package/package.json +1 -1
- package/docs/static/index-DlDPp_Nm.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var t=(c,i)=>r(c,"name",{value:i,configurable:!0});const d=require("./index-
|
|
1
|
+
"use strict";var r=Object.defineProperty;var t=(c,i)=>r(c,"name",{value:i,configurable:!0});const d=require("./index-DZjDh7FL.cjs"),s=class s extends d.FieldComponent{};t(s,"FieldComponentUnoCss");let e=s;exports.FieldComponentUnoCss=e;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Nt = Object.defineProperty;
|
|
2
2
|
var b = (s, l) => Nt(s, "name", { value: l, configurable: !0 });
|
|
3
|
-
import { a as Ge, e as vt, P as se, C as gt, _ as Re, V as lt, W as Ct, d as Pt } from "./index-
|
|
4
|
-
import { F as Rt } from "./FieldComponent.vue_vue_type_script_lang-
|
|
3
|
+
import { a as Ge, e as vt, P as se, C as gt, _ as Re, V as lt, W as Ct, d as Pt } from "./index-Cd_DL4JD.js";
|
|
4
|
+
import { F as Rt } from "./FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js";
|
|
5
5
|
import { resolveComponent as De, openBlock as J, createElementBlock as ne, normalizeClass as xe, withDirectives as Ne, createElementVNode as F, createVNode as ye, withCtx as ge, vShow as Pe, createTextVNode as Fe, toDisplayString as ve, createBlock as ke, createCommentVNode as be, normalizeStyle as Mt, defineComponent as Ft, ref as tt, computed as nt, watch as pt, onMounted as Et, unref as Ce, renderSlot as yt, withModifiers as Te, createStaticVNode as _t, resolveDynamicComponent as et, Fragment as Ut, renderList as jt, withKeys as xt } from "vue";
|
|
6
6
|
import { c as Qe, g as $t, a as Lt } from "./_commonjsHelpers-CO8R3Anj.js";
|
|
7
7
|
var Zt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Oe = /* @__PURE__ */ b((s, l, d, k) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var at=Object.defineProperty;var b=(a,d)=>at(a,"name",{value:d,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("./index-BgWRAiiR.cjs"),st=require("./FieldComponent.vue_vue_type_script_lang-B-z2yOtA.cjs"),t=require("vue"),xe=require("./_commonjsHelpers-BB06FEA1.cjs");var lt=Object.defineProperty,dt=Object.getOwnPropertyDescriptor,be=b((a,d,h,E)=>{for(var s=E>1?void 0:E?dt(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&<(d,h,s),s},"__decorateClass$6"),ze;let ve=(ze=class extends Q.BaseComponent{components={VSTButton:Q.VSTButton};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;areaKey="";isImage=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-title",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(d){if(!this.canChange)return d.preventDefault();this.$parent.isDragStarted=!0,d.dataTransfer.dropEffect="move",d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash,area:this.areaKey}))}dragOver(d){this.$parent.isDragStarted&&(d.preventDefault(),this.isDroppable=!0)}dragLeave(d){d.preventDefault(),this.isDroppable=!1}onDrop(d){this.isDroppable=!1;const h=decodeURI(d.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|");let E=d.dataTransfer.getData("itemID");const s={name:h[0],hash:h[1]?h[1]:null};typeof E=="string"&&E&&E!=JSON.stringify(s)&&(E=JSON.parse(E),this.$parent?.files?.some?.(l=>l.hash==E.hash)&&this.$emit("sort",E,s))}eURI(d){return encodeURI(d)}viewHover(d,h){let E=d.target;if(h&&E?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"){const s=E.querySelector(".file-view-text");s&&(s.style.display="block",s.style.cursor="zoom-in")}else{const s=E.querySelector(".file-view-text");s&&(s.style.display="none",s.style.cursor="auto")}}},b(ze,"FileItem"),ze);be([Q.Prop(Object)],ve.prototype,"file",2);be([Q.Prop(String)],ve.prototype,"fileName",2);be([Q.Prop(String)],ve.prototype,"fileUri",2);be([Q.Prop(String,null)],ve.prototype,"fileHash",2);be([Q.Prop(Boolean)],ve.prototype,"canChange",2);be([Q.Prop(Boolean)],ve.prototype,"onlyImages",2);be([Q.Prop(Boolean)],ve.prototype,"hasDeleted",2);be([Q.Prop(String)],ve.prototype,"areaKey",2);be([Q.Prop(Boolean)],ve.prototype,"isImage",2);ve=be([Q.Component],ve);const ht=["data-id","title"],ut={class:"file-deleted"},ft={class:"file-deleted",style:{"padding-top":"20px"}},ct={class:"file-deleted file-download"},pt={class:"file-title"},mt=["title"],vt={class:"absolute right--15px top-0 py0 text-neutral-600! uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},gt=["src"],wt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yt={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},bt={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_t={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kt={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},xt={class:"file-buttons absolute flex flex w100% bottom-5px"},Et={class:"file-loading-indicator"},zt={class:"text-center mt-2"},Nt={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},Ct=["data-value"],St={class:"text-center text-9px mt-2 pt3px"},Ft={key:0,class:"p-0 text-center"},Bt={key:1};function Vt(a,d,h,E,s,l){const i=t.resolveComponent("VSTButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["file-item",{"file-item-drop":a.isDroppable,"file-view-mode":!a.canChange,"only-images":a.onlyImages,"border-1px border-solid border-#e5e15e":!a.file?.new,"border-1px border-solid border-lightblue-300":a.file?.new}]),ref:"draggable",draggable:"true",onDrop:d[6]||(d[6]=o=>a.hasDeleted||!a.canChange?null:a.onDrop(o)),onDragstart:d[7]||(d[7]=o=>a.hasDeleted||!a.canChange?null:a.startDrag(o)),onDragover:d[8]||(d[8]=o=>a.hasDeleted||!a.canChange?null:a.dragOver(o)),onDragleave:d[9]||(d[9]=o=>a.hasDeleted||!a.canChange?null:a.dragLeave(o)),onDragend:d[10]||(d[10]=o=>a.$parent.isDragStarted=!1),"data-id":a.eURI(a.fileName+"|"+(a.fileHash?a.fileHash:"")),title:!a.onlyImages&&!a.VST.$reactive.isIphone&&!a.file.deleted?a.fileName:null},[a.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["file-container relative min-h92px",{}])},[t.withDirectives(t.createElementVNode("div",ut,[d[12]||(d[12]=t.createElementVNode("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),t.createVNode(i,{size:"sm",theme:"empty",onClickTap:d[0]||(d[0]=o=>a.$emit("restore",a.fileName,a.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:t.withCtx(()=>[...d[11]||(d[11]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),t.createElementVNode("path",{d:"M3 4.001v5h5"}),t.createElementVNode("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[t.vShow,a.file.deleted]]),t.withDirectives(t.createElementVNode("div",ft,[d[13]||(d[13]=t.createTextVNode("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),d[14]||(d[14]=t.createElementVNode("br",null,null,-1)),d[15]||(d[15]=t.createTextVNode()),t.createElementVNode("b",null,t.toDisplayString(a.fileName),1)],512),[[t.vShow,!a.file.found]]),t.withDirectives(t.createElementVNode("div",ct,[...d[16]||(d[16]=[t.createElementVNode("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[t.vShow,a.file.spin]]),t.createElementVNode("div",pt,[t.createElementVNode("div",{class:"cursor-text text-center",title:a.canChange&&!a.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[t.createElementVNode("b",null,t.toDisplayString(a.fileName.split(".").slice(0,-1).join(".")),1)],8,mt)]),t.createElementVNode("div",{class:"file-content",onMouseenter:d[2]||(d[2]=o=>a.viewHover(o,!0)),onMouseleave:d[3]||(d[3]=o=>a.viewHover(o,!1))},[t.createVNode(i,{size:"md",theme:"empty",onClickTap:d[1]||(d[1]=o=>a.$emit("view",a.fileName))},{default:t.withCtx(()=>[t.createElementVNode("div",vt,t.toDisplayString(a.file.ext),1),a.fileType=="image"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"max-w52px! max-h52px! rd-lg!",src:a.file.uri},null,8,gt)):a.fileType=="excel"?(t.openBlock(),t.createElementBlock("svg",wt,[...d[17]||(d[17]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),t.createElementVNode("path",{d:"M8 15h8"},null,-1),t.createElementVNode("path",{d:"M11 11v7"},null,-1)])])):a.fileType=="doc"?(t.openBlock(),t.createElementBlock("svg",yt,[...d[18]||(d[18]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):a.fileType=="video"?(t.openBlock(),t.createElementBlock("svg",bt,[...d[19]||(d[19]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),t.createElementVNode("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):a.fileExt=="pdf"?(t.openBlock(),t.createElementBlock("svg",_t,[...d[20]||(d[20]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),t.createElementVNode("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),t.createElementVNode("path",{d:"M17 18h2"},null,-1),t.createElementVNode("path",{d:"M20 15h-3v6"},null,-1),t.createElementVNode("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",kt,[...d[21]||(d[21]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M12 17v.01"},null,-1),t.createElementVNode("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),d[22]||(d[22]=t.createElementVNode("div",{class:"file-view-text z22!",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},[t.createElementVNode("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),t.createElementVNode("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),t.createElementVNode("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),t.createElementVNode("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),t.createElementVNode("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),t.createElementVNode("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),t.createElementVNode("path",{d:"M12 12h-.01"})])],-1))]),_:1})],32),t.createElementVNode("div",xt,[t.createVNode(i,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:d[4]||(d[4]=o=>a.$emit("download",a.fileName))},{default:t.withCtx(()=>[...d[23]||(d[23]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),t.createElementVNode("path",{d:"M12 13l0 9"}),t.createElementVNode("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),a.canChange?(t.openBlock(),t.createBlock(i,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:d[5]||(d[5]=o=>a.$emit("delete",a.fileName,a.file.deleted=!0))},{default:t.withCtx(()=>[...d[24]||(d[24]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 7h16"}),t.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),t.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),t.createElementVNode("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):t.createCommentVNode("",!0)])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["file-loading",{"only-images":a.onlyImages}])},[t.createElementVNode("div",Et,[t.createElementVNode("div",zt,[t.createElementVNode("b",null,t.toDisplayString(a.file.loaded)+"%",1)]),t.createElementVNode("div",Nt,[t.createElementVNode("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${a.file.loaded}%`,style:t.normalizeStyle(`width: ${a.file.loaded}%`)},null,12,Ct)]),t.createElementVNode("div",St,[t.createElementVNode("b",null,t.toDisplayString(a.file.loadedSize)+" / "+t.toDisplayString(a.file.sizeNamed),1)])])],2)),a.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["file-info relative",{"text-center":a.canChange&&!a.onlyImages,"bg-#e2df4463":!a.file?.new,"bg-lightblue-200/60":a.file?.new}])},[a.onlyImages?(t.openBlock(),t.createElementBlock("div",Ft,[t.createElementVNode("b",null," "+t.toDisplayString(a.file.sizeNamed),1)])):(t.openBlock(),t.createElementBlock("div",Bt,[d[25]||(d[25]=t.createTextVNode("Размер ",-1)),t.createElementVNode("b",null,t.toDisplayString(a.file.sizeNamed),1)]))],2)):t.createCommentVNode("",!0)],42,ht)}b(Vt,"render$6");const Dt=Q._export_sfc(ve,[["render",Vt],["__scopeId","data-v-4d776467"]]),It={class:"controll"},Ot={class:"controll__item controll__item--circle"},At={class:"controll__pan controll__item--circle__inner"},Pt={class:"controll__pan__up controll__item--circle__inner__up"},Tt={class:"controll__pan__right controll__item--circle__inner__right"},Rt={class:"controll__pan__down controll__item--circle__inner__down"},Mt={class:"controll__pan__left controll__item--circle__inner__left"},jt={class:"controll__home controll__item controll__item--list-item"},Ut={class:"controll__zoom-in controll__item controll__item--list-item"},$t={class:"controll__zoom-in controll__item controll__item--list-item"},Lt=t.defineComponent({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(a,{emit:d}){const h=d;function E(l,i){h("buttondown",{key:i})}b(E,"u");function s(l,i){h("buttonup",{key:i})}return b(s,"n"),(l,i)=>(t.openBlock(),t.createElementBlock("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:i[31]||(i[31]=t.withModifiers(()=>{},["stop"])),onMousedown:i[32]||(i[32]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("ul",It,[t.createElementVNode("li",Ot,[t.createElementVNode("ul",At,[t.createElementVNode("li",Pt,[t.createElementVNode("a",{onPointerdown:i[0]||(i[0]=o=>E(o,"pan-up")),onPointerup:i[1]||(i[1]=o=>s(o,"pan-up")),onPointercancel:i[2]||(i[2]=o=>s(o,"pan-up")),onPointerleave:i[3]||(i[3]=o=>s(o,"pan-up")),onContextmenu:i[4]||(i[4]=t.withModifiers(()=>{},["prevent"]))},i[33]||(i[33]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[t.createElementVNode("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),t.createElementVNode("li",Tt,[t.createElementVNode("a",{onPointerdown:i[5]||(i[5]=o=>E(o,"pan-right")),onPointerup:i[6]||(i[6]=o=>s(o,"pan-right")),onPointercancel:i[7]||(i[7]=o=>s(o,"pan-right")),onPointerleave:i[8]||(i[8]=o=>s(o,"pan-right")),onContextmenu:i[9]||(i[9]=t.withModifiers(()=>{},["prevent"]))},i[34]||(i[34]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[t.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),t.createElementVNode("li",Rt,[t.createElementVNode("a",{onPointerdown:i[10]||(i[10]=o=>E(o,"pan-down")),onPointerup:i[11]||(i[11]=o=>s(o,"pan-down")),onPointercancel:i[12]||(i[12]=o=>s(o,"pan-down")),onPointerleave:i[13]||(i[13]=o=>s(o,"pan-down")),onContextmenu:i[14]||(i[14]=t.withModifiers(()=>{},["prevent"]))},i[35]||(i[35]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[t.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),t.createElementVNode("li",Mt,[t.createElementVNode("a",{onPointerdown:i[15]||(i[15]=o=>E(o,"pan-left")),onPointercancel:i[16]||(i[16]=o=>s(o,"pan-left")),onPointerup:i[17]||(i[17]=o=>s(o,"pan-left")),onPointerleave:i[18]||(i[18]=o=>s(o,"pan-left")),onContextmenu:i[19]||(i[19]=t.withModifiers(()=>{},["prevent"]))},i[36]||(i[36]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[t.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),t.createElementVNode("li",jt,[t.createElementVNode("a",{onPointerdown:i[20]||(i[20]=o=>E(o,"home"))},i[37]||(i[37]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Ut,[t.createElementVNode("a",{onPointerdown:i[21]||(i[21]=o=>E(o,"zoom-in")),onPointerup:i[22]||(i[22]=o=>s(o,"zoom-in")),onPointercancel:i[23]||(i[23]=o=>s(o,"zoom-in")),onPointerleave:i[24]||(i[24]=o=>s(o,"zoom-in")),onContextmenu:i[25]||(i[25]=t.withModifiers(()=>{},["prevent"]))},i[38]||(i[38]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",$t,[t.createElementVNode("a",{onPointerdown:i[26]||(i[26]=o=>E(o,"zoom-out")),onPointerup:i[27]||(i[27]=o=>s(o,"zoom-out")),onPointercancel:i[28]||(i[28]=o=>s(o,"zoom-out")),onPointerleave:i[29]||(i[29]=o=>s(o,"zoom-out")),onContextmenu:i[30]||(i[30]=t.withModifiers(()=>{},["prevent"]))},i[39]||(i[39]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[t.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),t.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.createElementVNode("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),et=b((a,d)=>{const h=a.__vccOpts||a;for(const[E,s]of d)h[E]=s;return h},"C"),Zt=et(Lt,[["__scopeId","data-v-3ba139de"]]);function Ht(){let a=0;function d(E,s,l,i){E(),a=window.setTimeout(()=>{a=window.setInterval(()=>{s()},i)},l)}b(d,"i");function h(){a&&(window.clearInterval(a),a=0)}return b(h,"l"),{startHold:d,clearHold:h}}b(Ht,"R");const Te="control-btn";function Wt({props:a,transform:d}){let h=Ht();function E(m){h.startHold(()=>{d.changeZoom(m*a.buttonZoomStep*.5,Te)},()=>{d.changeZoom(m*a.buttonZoomStep*.5,Te)},300,50)}b(E,"u");function s(m){if(!a.disabled)switch(m.key){case"home":o();break;case"zoom-in":E(1);break;case"zoom-out":E(-1);break;case"pan-left":i({x:1,y:0});break;case"pan-right":i({x:-1,y:0});break;case"pan-up":i({x:0,y:1});break;case"pan-down":i({x:0,y:-1});break}}b(s,"n");function l(m){h.clearHold()}b(l,"a");function i(m){h.startHold(()=>{d.changePan(m.x*a.buttonPanStep,m.y*a.buttonPanStep,Te)},()=>{d.changePan(m.x*a.buttonPanStep,m.y*a.buttonPanStep,Te)},300,50)}b(i,"e");function o(){d.goHome(Te)}return b(o,"o"),{onButtonDown:s,onButtonUp:l}}b(Wt,"A");function Kt({props:a,transform:d}){let h={x:0,y:0};function E(i){a.disabled||i.pointerType!=="mouse"||!a.mouseEnabled||(h={x:i.clientX,y:i.clientY},document.addEventListener("pointermove",l,{passive:!1}),document.addEventListener("pointerup",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointerleave",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointercancel",function(o){document.removeEventListener("pointermove",l)}))}b(E,"u");function s(i){if(a.disabled||!a.dblClickEnabled||!a.zoomEnabled)return;const o={x:i.clientX,y:i.clientY};d.changeZoom(a.dblClickZoomStep,"dblClick",o)}b(s,"n");function l(i){if(a.disabled||!a.panEnabled||i.pointerType!=="mouse"||!a.mouseEnabled)return;let o={x:i.clientX-h.x,y:i.clientY-h.y};d.changePan(o.x,o.y,i.pointerType),h={x:i.clientX,y:i.clientY},i.preventDefault()}return b(l,"a"),{onPointerDown:E,onDblClick:s}}b(Kt,"F");function Gt({props:a,transform:d}){let h=t.ref({}),E=t.ref(0),s=null;function l(m){if(a.disabled||!a.touchEnabled||!a.panEnabled&&!a.zoomEnabled||(m.preventDefault(),m.touches.length<1))return;const w=m.touches.item(0);if(!w)return;let x=0,k={x:w.clientX,y:w.clientY};if(m.touches.length===2){const c=m.touches.item(1);let v=i({x:w?w.clientX:0,y:w?w.clientY:0},{x:c?c.clientX:0,y:c?c.clientY:0});E.value<=0?(E.value=v.distance,x=0):(x=v.distance/E.value*d.zoom.value-d.zoom.value,E.value=v.distance),k=v.center}if(a.zoomEnabled&&d.changeZoom(x,"touch",k),s===null){s={x:k.x,y:k.y};return}const C={x:k.x-s.x,y:k.y-s.y};a.panEnabled&&d.changePan(C.x,C.y,"touch"),s={x:k.x,y:k.y}}b(l,"a");function i(m,w){let x=Math.sqrt(Math.pow(m.x-w.x,2)+Math.pow(m.y-w.y,2)),k={x:(m.x+w.x)/2,y:(m.y+w.y)/2};return{distance:x,center:k}}b(i,"e");function o(m){a.disabled||!a.touchEnabled||(s=null,document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",function(w){m.touches.length<2&&(E.value=-1),document.removeEventListener("touchmove",l)}))}return b(o,"o"),{onTouchStart:o,touchCount:t.computed(()=>Object.keys(h.value).length)}}b(Gt,"G");function Yt({props:a,onChange:d,container:h,target:E}){const s=t.ref({x:0,y:0}),l=t.ref(0);t.onMounted(()=>{l.value=a.minZoom,s.value={x:a.pan!=null?a.pan.x:a.initialPanX,y:a.pan!=null?a.pan.y:a.initialPanY},a.zoom?l.value=a.zoom:a.initialZoom>=a.minZoom&&a.initialZoom<=a.maxZoom&&(l.value=a.initialZoom)}),t.watch(()=>a.zoom,()=>{isNaN(a.zoom)||(l.value=a.zoom)}),t.watch(()=>a.pan,()=>{a.pan&&(s.value.x=a.pan.x,s.value.y=a.pan.y)},{deep:!0});function i(w,x,k){if(isNaN(w)||w===0)return;const C=l.value;let c=l.value+w;if(c>a.maxZoom?c=a.maxZoom:c<a.minZoom&&(c=a.minZoom),Math.abs(C-c)<1e-4)return;if(l.value=c,a.zoomOrigin==="center"&&(k=Ge(h.value)),a.zoomOrigin!=="content-center"){k||(k=Ge(h.value));const u=Xt(h.value,s.value),y={x:(c-C)*((u.x-k.x)/C),y:(c-C)*((u.y-k.y)/C)};o(y.x,y.y,"zoom")}let v={zoom:c,delta:{zoom:w,pan:{x:0,y:0}},pan:{x:s.value.x,y:s.value.y,deltaX:0,deltaY:0},type:x};d("zoom",v)}b(i,"e");function o(w,x,k){isNaN(w)&&(w=0),isNaN(x)&&(x=0),s.value={x:s.value.x+w,y:s.value.y+x};let C={zoom:l.value,delta:{zoom:0,pan:{x:w,y:x}},pan:{x:s.value.x,y:s.value.y,deltaX:w,deltaY:x},type:k};d("panned",C)}b(o,"o");function m(w){l.value=a.initialZoom,d("zoom",{zoom:l.value,pan:{x:s.value.x,y:s.value.y,deltaX:0,deltaY:0},type:w});let x={x:a.initialPanX-s.value.x,y:a.initialPanY-s.value.y};s.value={x:a.initialPanX,y:a.initialPanY},d("panned",{zoom:l.value,pan:{x:s.value.x,y:s.value.y,deltaX:x.x,deltaY:x.y},type:w})}return b(m,"d"),{zoom:t.computed(()=>l.value),pan:t.computed(()=>s.value),setZoom:b(w=>{l.value=w},"setZoom"),setPan:b(w=>{s.value=w},"setPan"),changeZoom:i,changePan:o,goHome:m}}b(Yt,"J");function Ge(a){const d=a.getBoundingClientRect();return{x:d.left+d.width/2,y:d.top+d.height/2}}b(Ge,"B");function Xt(a,d){const h=Ge(a);return{x:h.x+d.x,y:h.y+d.y}}b(Xt,"Q");function qt({props:a,transform:d}){function h(E){if(a.disabled||!a.wheelEnabled||!a.zoomEnabled)return;const s=Math.abs(E.deltaY)>0?E.deltaY:E.deltaX,l=a.wheelZoomStep*-1*s/Math.abs(s),i={x:E.clientX,y:E.clientY};d.changeZoom(l,"wheel",i),E.preventDefault()}return b(h,"l"),{onWheel:h}}b(qt,"ee");function Jt({props:a,onChange:d,container:h,target:E}){const s=Yt({props:a,onChange:d,container:h,target:E}),l=Gt({props:a,transform:s}),i=qt({props:a,transform:s}),o=Kt({props:a,transform:s}),m=Wt({props:a,transform:s});return{zoom:s.zoom,pan:s.pan,setZoom:s.setZoom,setPan:s.setPan,onWheel:i.onWheel,onTouchStart:l.onTouchStart,onButtonUp:m.onButtonUp,onButtonDown:m.onButtonDown,onPointerDown:o.onPointerDown,onDblClick:o.onDblClick}}b(Jt,"te");const Qt=t.defineComponent({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(a,{emit:d}){let h=d,E=a,s=t.ref(),l=t.computed(()=>{var x;return(x=s.value)==null?void 0:x.querySelector(E.selector)}),i=Jt({props:E,onChange:o,container:s,target:l});function o(x,k){x==="zoom"?h("update:zoom",k.zoom):x==="panned"&&h("update:pan",k.pan),h(x,k)}b(o,"o");let m=t.computed(()=>`translate(${i.pan.value.x}px, ${i.pan.value.y}px) scale(${i.zoom.value})`);function w(){l.value&&(l.value.style.transform=m.value,l.value.style.transformOrigin="center center",l.value.style.transition="transform 0.07s ease-out",l.value.style.transformBox="fill-box")}return b(w,"s"),t.watch(m,()=>{w()},{flush:"post"}),t.onMounted(()=>{w()}),(x,k)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:s,class:t.normalizeClass(x.$style.container),onDblclick:k[0]||(k[0]=(...C)=>t.unref(i).onDblClick&&t.unref(i).onDblClick(...C)),onPointerdown:k[1]||(k[1]=(...C)=>t.unref(i).onPointerDown&&t.unref(i).onPointerDown(...C)),onWheel:k[2]||(k[2]=(...C)=>t.unref(i).onWheel&&t.unref(i).onWheel(...C)),onTouchstart:k[3]||(k[3]=(...C)=>t.unref(i).onTouchStart&&t.unref(i).onTouchStart(...C))},[t.renderSlot(x.$slots,"default",{},void 0,!0),t.renderSlot(x.$slots,"buttons",{},()=>[t.unref(E).enableControlButton?(t.openBlock(),t.createBlock(Zt,{key:0,onButtondown:t.unref(i).onButtonDown,onButtonup:t.unref(i).onButtonUp},null,8,["onButtondown","onButtonup"])):t.createCommentVNode("",!0)],!0)],34))}}),en="_container_irdvc_2",tn="_buttons_irdvc_11",nn={container:en,buttons:tn},rn={$style:nn},on=et(Qt,[["__cssModules",rn],["__scopeId","data-v-fce7d501"]]);var an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,Le=b((a,d,h,E)=>{for(var s=E>1?void 0:E?sn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&an(d,h,s),s},"__decorateClass$5"),Ne;let De=(Ne=class extends Q.BaseComponent{components={Zoomable:on};uri="";ext="";fileName="";beforeMount(){const d=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");d&&(d.style.display="none",this.hookWhenComponentDestroy(()=>d.style.display="flex"))}},b(Ne,"ImageViewerFilesField"),Ne);Le([Q.Prop(String)],De.prototype,"uri",2);Le([Q.Prop(String)],De.prototype,"ext",2);Le([Q.Prop(String)],De.prototype,"fileName",2);De=Le([Q.VST],De);const ln={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},dn={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},hn=["src"];function un(a,d,h,E,s,l){const i=t.resolveComponent("Zoomable");return t.openBlock(),t.createElementBlock("div",ln,[t.createElementVNode("div",dn,[t.createVNode(i,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(a.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:t.withCtx(()=>[t.createElementVNode("img",{class:"w100%",src:a.uri},null,8,hn)]),_:1},8,["pan"])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),null,{default:t.withCtx(()=>[...d[0]||(d[0]=[t.createTextVNode(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}b(un,"render$5");const fn=Q._export_sfc(De,[["render",un]]);var cn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,tt=b((a,d,h,E)=>{for(var s=E>1?void 0:E?pn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&cn(d,h,s),s},"__decorateClass$4"),Ce;let Ue=(Ce=class extends Q.BaseComponent{file={};mounted(){}},b(Ce,"ExcelViewerFilesField"),Ce);tt([Q.Prop(Object,null)],Ue.prototype,"file",2);Ue=tt([Q.VST],Ue);const mn={class:"mt150px",id:"excelView",ref:"excelView"};function vn(a,d,h,E,s,l){return t.openBlock(),t.createElementBlock("div",mn,"Скоро будет!",512)}b(vn,"render$4");const gn=Q._export_sfc(Ue,[["render",vn]]);var wn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,nt=b((a,d,h,E)=>{for(var s=E>1?void 0:E?yn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&wn(d,h,s),s},"__decorateClass$3"),Se;let $e=(Se=class extends Q.BaseComponent{file={}},b(Se,"DocxViewerFilesField"),Se);nt([Q.Prop(Object,null)],$e.prototype,"file",2);$e=nt([Q.VST],$e);const bn={class:"p15px mt150px"};function _n(a,d,h,E,s,l){return t.openBlock(),t.createElementBlock("div",bn,"Скоро")}b(_n,"render$3");const kn=Q._export_sfc($e,[["render",_n]]);var xn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,Ze=b((a,d,h,E)=>{for(var s=E>1?void 0:E?En(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&xn(d,h,s),s},"__decorateClass$2"),Fe;let Ie=(Fe=class extends Q.BaseComponent{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const d=await fetch(this.uri);if(!d.ok)throw new Error(`HTTP error ${d.status}`);const h=await d.blob(),E="application/pdf",s=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([h],s,{type:E})}catch(d){console.error("Failed to fetch the file:",d)}}async loadAndShowPdf(){const d=await this.fetchPdfFile();if(d){const E=`
|
|
1
|
+
"use strict";var at=Object.defineProperty;var b=(a,d)=>at(a,"name",{value:d,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("./index-DZjDh7FL.cjs"),st=require("./FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs"),t=require("vue"),xe=require("./_commonjsHelpers-BB06FEA1.cjs");var lt=Object.defineProperty,dt=Object.getOwnPropertyDescriptor,be=b((a,d,h,E)=>{for(var s=E>1?void 0:E?dt(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&<(d,h,s),s},"__decorateClass$6"),ze;let ve=(ze=class extends Q.BaseComponent{components={VSTButton:Q.VSTButton};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;areaKey="";isImage=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-title",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(d){if(!this.canChange)return d.preventDefault();this.$parent.isDragStarted=!0,d.dataTransfer.dropEffect="move",d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash,area:this.areaKey}))}dragOver(d){this.$parent.isDragStarted&&(d.preventDefault(),this.isDroppable=!0)}dragLeave(d){d.preventDefault(),this.isDroppable=!1}onDrop(d){this.isDroppable=!1;const h=decodeURI(d.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|");let E=d.dataTransfer.getData("itemID");const s={name:h[0],hash:h[1]?h[1]:null};typeof E=="string"&&E&&E!=JSON.stringify(s)&&(E=JSON.parse(E),this.$parent?.files?.some?.(l=>l.hash==E.hash)&&this.$emit("sort",E,s))}eURI(d){return encodeURI(d)}viewHover(d,h){let E=d.target;if(h&&E?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"){const s=E.querySelector(".file-view-text");s&&(s.style.display="block",s.style.cursor="zoom-in")}else{const s=E.querySelector(".file-view-text");s&&(s.style.display="none",s.style.cursor="auto")}}},b(ze,"FileItem"),ze);be([Q.Prop(Object)],ve.prototype,"file",2);be([Q.Prop(String)],ve.prototype,"fileName",2);be([Q.Prop(String)],ve.prototype,"fileUri",2);be([Q.Prop(String,null)],ve.prototype,"fileHash",2);be([Q.Prop(Boolean)],ve.prototype,"canChange",2);be([Q.Prop(Boolean)],ve.prototype,"onlyImages",2);be([Q.Prop(Boolean)],ve.prototype,"hasDeleted",2);be([Q.Prop(String)],ve.prototype,"areaKey",2);be([Q.Prop(Boolean)],ve.prototype,"isImage",2);ve=be([Q.Component],ve);const ht=["data-id","title"],ut={class:"file-deleted"},ft={class:"file-deleted",style:{"padding-top":"20px"}},ct={class:"file-deleted file-download"},pt={class:"file-title"},mt=["title"],vt={class:"absolute right--15px top-0 py0 text-neutral-600! uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},gt=["src"],wt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yt={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},bt={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_t={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kt={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},xt={class:"file-buttons absolute flex flex w100% bottom-5px"},Et={class:"file-loading-indicator"},zt={class:"text-center mt-2"},Nt={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},Ct=["data-value"],St={class:"text-center text-9px mt-2 pt3px"},Ft={key:0,class:"p-0 text-center"},Bt={key:1};function Vt(a,d,h,E,s,l){const i=t.resolveComponent("VSTButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["file-item",{"file-item-drop":a.isDroppable,"file-view-mode":!a.canChange,"only-images":a.onlyImages,"border-1px border-solid border-#e5e15e":!a.file?.new,"border-1px border-solid border-lightblue-300":a.file?.new}]),ref:"draggable",draggable:"true",onDrop:d[6]||(d[6]=o=>a.hasDeleted||!a.canChange?null:a.onDrop(o)),onDragstart:d[7]||(d[7]=o=>a.hasDeleted||!a.canChange?null:a.startDrag(o)),onDragover:d[8]||(d[8]=o=>a.hasDeleted||!a.canChange?null:a.dragOver(o)),onDragleave:d[9]||(d[9]=o=>a.hasDeleted||!a.canChange?null:a.dragLeave(o)),onDragend:d[10]||(d[10]=o=>a.$parent.isDragStarted=!1),"data-id":a.eURI(a.fileName+"|"+(a.fileHash?a.fileHash:"")),title:!a.onlyImages&&!a.VST.$reactive.isIphone&&!a.file.deleted?a.fileName:null},[a.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["file-container relative min-h92px",{}])},[t.withDirectives(t.createElementVNode("div",ut,[d[12]||(d[12]=t.createElementVNode("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),t.createVNode(i,{size:"sm",theme:"empty",onClickTap:d[0]||(d[0]=o=>a.$emit("restore",a.fileName,a.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:t.withCtx(()=>[...d[11]||(d[11]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),t.createElementVNode("path",{d:"M3 4.001v5h5"}),t.createElementVNode("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[t.vShow,a.file.deleted]]),t.withDirectives(t.createElementVNode("div",ft,[d[13]||(d[13]=t.createTextVNode("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),d[14]||(d[14]=t.createElementVNode("br",null,null,-1)),d[15]||(d[15]=t.createTextVNode()),t.createElementVNode("b",null,t.toDisplayString(a.fileName),1)],512),[[t.vShow,!a.file.found]]),t.withDirectives(t.createElementVNode("div",ct,[...d[16]||(d[16]=[t.createElementVNode("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[t.vShow,a.file.spin]]),t.createElementVNode("div",pt,[t.createElementVNode("div",{class:"cursor-text text-center",title:a.canChange&&!a.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[t.createElementVNode("b",null,t.toDisplayString(a.fileName.split(".").slice(0,-1).join(".")),1)],8,mt)]),t.createElementVNode("div",{class:"file-content",onMouseenter:d[2]||(d[2]=o=>a.viewHover(o,!0)),onMouseleave:d[3]||(d[3]=o=>a.viewHover(o,!1))},[t.createVNode(i,{size:"md",theme:"empty",onClickTap:d[1]||(d[1]=o=>a.$emit("view",a.fileName))},{default:t.withCtx(()=>[t.createElementVNode("div",vt,t.toDisplayString(a.file.ext),1),a.fileType=="image"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"max-w52px! max-h52px! rd-lg!",src:a.file.uri},null,8,gt)):a.fileType=="excel"?(t.openBlock(),t.createElementBlock("svg",wt,[...d[17]||(d[17]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),t.createElementVNode("path",{d:"M8 15h8"},null,-1),t.createElementVNode("path",{d:"M11 11v7"},null,-1)])])):a.fileType=="doc"?(t.openBlock(),t.createElementBlock("svg",yt,[...d[18]||(d[18]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):a.fileType=="video"?(t.openBlock(),t.createElementBlock("svg",bt,[...d[19]||(d[19]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),t.createElementVNode("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):a.fileExt=="pdf"?(t.openBlock(),t.createElementBlock("svg",_t,[...d[20]||(d[20]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),t.createElementVNode("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),t.createElementVNode("path",{d:"M17 18h2"},null,-1),t.createElementVNode("path",{d:"M20 15h-3v6"},null,-1),t.createElementVNode("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",kt,[...d[21]||(d[21]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M12 17v.01"},null,-1),t.createElementVNode("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),d[22]||(d[22]=t.createElementVNode("div",{class:"file-view-text z22!",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},[t.createElementVNode("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),t.createElementVNode("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),t.createElementVNode("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),t.createElementVNode("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),t.createElementVNode("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),t.createElementVNode("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),t.createElementVNode("path",{d:"M12 12h-.01"})])],-1))]),_:1})],32),t.createElementVNode("div",xt,[t.createVNode(i,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:d[4]||(d[4]=o=>a.$emit("download",a.fileName))},{default:t.withCtx(()=>[...d[23]||(d[23]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),t.createElementVNode("path",{d:"M12 13l0 9"}),t.createElementVNode("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),a.canChange?(t.openBlock(),t.createBlock(i,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:d[5]||(d[5]=o=>a.$emit("delete",a.fileName,a.file.deleted=!0))},{default:t.withCtx(()=>[...d[24]||(d[24]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 7h16"}),t.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),t.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),t.createElementVNode("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):t.createCommentVNode("",!0)])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["file-loading",{"only-images":a.onlyImages}])},[t.createElementVNode("div",Et,[t.createElementVNode("div",zt,[t.createElementVNode("b",null,t.toDisplayString(a.file.loaded)+"%",1)]),t.createElementVNode("div",Nt,[t.createElementVNode("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${a.file.loaded}%`,style:t.normalizeStyle(`width: ${a.file.loaded}%`)},null,12,Ct)]),t.createElementVNode("div",St,[t.createElementVNode("b",null,t.toDisplayString(a.file.loadedSize)+" / "+t.toDisplayString(a.file.sizeNamed),1)])])],2)),a.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["file-info relative",{"text-center":a.canChange&&!a.onlyImages,"bg-#e2df4463":!a.file?.new,"bg-lightblue-200/60":a.file?.new}])},[a.onlyImages?(t.openBlock(),t.createElementBlock("div",Ft,[t.createElementVNode("b",null," "+t.toDisplayString(a.file.sizeNamed),1)])):(t.openBlock(),t.createElementBlock("div",Bt,[d[25]||(d[25]=t.createTextVNode("Размер ",-1)),t.createElementVNode("b",null,t.toDisplayString(a.file.sizeNamed),1)]))],2)):t.createCommentVNode("",!0)],42,ht)}b(Vt,"render$6");const Dt=Q._export_sfc(ve,[["render",Vt],["__scopeId","data-v-4d776467"]]),It={class:"controll"},Ot={class:"controll__item controll__item--circle"},At={class:"controll__pan controll__item--circle__inner"},Pt={class:"controll__pan__up controll__item--circle__inner__up"},Tt={class:"controll__pan__right controll__item--circle__inner__right"},Rt={class:"controll__pan__down controll__item--circle__inner__down"},Mt={class:"controll__pan__left controll__item--circle__inner__left"},jt={class:"controll__home controll__item controll__item--list-item"},Ut={class:"controll__zoom-in controll__item controll__item--list-item"},$t={class:"controll__zoom-in controll__item controll__item--list-item"},Lt=t.defineComponent({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(a,{emit:d}){const h=d;function E(l,i){h("buttondown",{key:i})}b(E,"u");function s(l,i){h("buttonup",{key:i})}return b(s,"n"),(l,i)=>(t.openBlock(),t.createElementBlock("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:i[31]||(i[31]=t.withModifiers(()=>{},["stop"])),onMousedown:i[32]||(i[32]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("ul",It,[t.createElementVNode("li",Ot,[t.createElementVNode("ul",At,[t.createElementVNode("li",Pt,[t.createElementVNode("a",{onPointerdown:i[0]||(i[0]=o=>E(o,"pan-up")),onPointerup:i[1]||(i[1]=o=>s(o,"pan-up")),onPointercancel:i[2]||(i[2]=o=>s(o,"pan-up")),onPointerleave:i[3]||(i[3]=o=>s(o,"pan-up")),onContextmenu:i[4]||(i[4]=t.withModifiers(()=>{},["prevent"]))},i[33]||(i[33]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[t.createElementVNode("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),t.createElementVNode("li",Tt,[t.createElementVNode("a",{onPointerdown:i[5]||(i[5]=o=>E(o,"pan-right")),onPointerup:i[6]||(i[6]=o=>s(o,"pan-right")),onPointercancel:i[7]||(i[7]=o=>s(o,"pan-right")),onPointerleave:i[8]||(i[8]=o=>s(o,"pan-right")),onContextmenu:i[9]||(i[9]=t.withModifiers(()=>{},["prevent"]))},i[34]||(i[34]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[t.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),t.createElementVNode("li",Rt,[t.createElementVNode("a",{onPointerdown:i[10]||(i[10]=o=>E(o,"pan-down")),onPointerup:i[11]||(i[11]=o=>s(o,"pan-down")),onPointercancel:i[12]||(i[12]=o=>s(o,"pan-down")),onPointerleave:i[13]||(i[13]=o=>s(o,"pan-down")),onContextmenu:i[14]||(i[14]=t.withModifiers(()=>{},["prevent"]))},i[35]||(i[35]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[t.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),t.createElementVNode("li",Mt,[t.createElementVNode("a",{onPointerdown:i[15]||(i[15]=o=>E(o,"pan-left")),onPointercancel:i[16]||(i[16]=o=>s(o,"pan-left")),onPointerup:i[17]||(i[17]=o=>s(o,"pan-left")),onPointerleave:i[18]||(i[18]=o=>s(o,"pan-left")),onContextmenu:i[19]||(i[19]=t.withModifiers(()=>{},["prevent"]))},i[36]||(i[36]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[t.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),t.createElementVNode("li",jt,[t.createElementVNode("a",{onPointerdown:i[20]||(i[20]=o=>E(o,"home"))},i[37]||(i[37]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Ut,[t.createElementVNode("a",{onPointerdown:i[21]||(i[21]=o=>E(o,"zoom-in")),onPointerup:i[22]||(i[22]=o=>s(o,"zoom-in")),onPointercancel:i[23]||(i[23]=o=>s(o,"zoom-in")),onPointerleave:i[24]||(i[24]=o=>s(o,"zoom-in")),onContextmenu:i[25]||(i[25]=t.withModifiers(()=>{},["prevent"]))},i[38]||(i[38]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",$t,[t.createElementVNode("a",{onPointerdown:i[26]||(i[26]=o=>E(o,"zoom-out")),onPointerup:i[27]||(i[27]=o=>s(o,"zoom-out")),onPointercancel:i[28]||(i[28]=o=>s(o,"zoom-out")),onPointerleave:i[29]||(i[29]=o=>s(o,"zoom-out")),onContextmenu:i[30]||(i[30]=t.withModifiers(()=>{},["prevent"]))},i[39]||(i[39]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[t.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),t.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.createElementVNode("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),et=b((a,d)=>{const h=a.__vccOpts||a;for(const[E,s]of d)h[E]=s;return h},"C"),Zt=et(Lt,[["__scopeId","data-v-3ba139de"]]);function Ht(){let a=0;function d(E,s,l,i){E(),a=window.setTimeout(()=>{a=window.setInterval(()=>{s()},i)},l)}b(d,"i");function h(){a&&(window.clearInterval(a),a=0)}return b(h,"l"),{startHold:d,clearHold:h}}b(Ht,"R");const Te="control-btn";function Wt({props:a,transform:d}){let h=Ht();function E(m){h.startHold(()=>{d.changeZoom(m*a.buttonZoomStep*.5,Te)},()=>{d.changeZoom(m*a.buttonZoomStep*.5,Te)},300,50)}b(E,"u");function s(m){if(!a.disabled)switch(m.key){case"home":o();break;case"zoom-in":E(1);break;case"zoom-out":E(-1);break;case"pan-left":i({x:1,y:0});break;case"pan-right":i({x:-1,y:0});break;case"pan-up":i({x:0,y:1});break;case"pan-down":i({x:0,y:-1});break}}b(s,"n");function l(m){h.clearHold()}b(l,"a");function i(m){h.startHold(()=>{d.changePan(m.x*a.buttonPanStep,m.y*a.buttonPanStep,Te)},()=>{d.changePan(m.x*a.buttonPanStep,m.y*a.buttonPanStep,Te)},300,50)}b(i,"e");function o(){d.goHome(Te)}return b(o,"o"),{onButtonDown:s,onButtonUp:l}}b(Wt,"A");function Kt({props:a,transform:d}){let h={x:0,y:0};function E(i){a.disabled||i.pointerType!=="mouse"||!a.mouseEnabled||(h={x:i.clientX,y:i.clientY},document.addEventListener("pointermove",l,{passive:!1}),document.addEventListener("pointerup",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointerleave",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointercancel",function(o){document.removeEventListener("pointermove",l)}))}b(E,"u");function s(i){if(a.disabled||!a.dblClickEnabled||!a.zoomEnabled)return;const o={x:i.clientX,y:i.clientY};d.changeZoom(a.dblClickZoomStep,"dblClick",o)}b(s,"n");function l(i){if(a.disabled||!a.panEnabled||i.pointerType!=="mouse"||!a.mouseEnabled)return;let o={x:i.clientX-h.x,y:i.clientY-h.y};d.changePan(o.x,o.y,i.pointerType),h={x:i.clientX,y:i.clientY},i.preventDefault()}return b(l,"a"),{onPointerDown:E,onDblClick:s}}b(Kt,"F");function Gt({props:a,transform:d}){let h=t.ref({}),E=t.ref(0),s=null;function l(m){if(a.disabled||!a.touchEnabled||!a.panEnabled&&!a.zoomEnabled||(m.preventDefault(),m.touches.length<1))return;const w=m.touches.item(0);if(!w)return;let x=0,k={x:w.clientX,y:w.clientY};if(m.touches.length===2){const c=m.touches.item(1);let v=i({x:w?w.clientX:0,y:w?w.clientY:0},{x:c?c.clientX:0,y:c?c.clientY:0});E.value<=0?(E.value=v.distance,x=0):(x=v.distance/E.value*d.zoom.value-d.zoom.value,E.value=v.distance),k=v.center}if(a.zoomEnabled&&d.changeZoom(x,"touch",k),s===null){s={x:k.x,y:k.y};return}const C={x:k.x-s.x,y:k.y-s.y};a.panEnabled&&d.changePan(C.x,C.y,"touch"),s={x:k.x,y:k.y}}b(l,"a");function i(m,w){let x=Math.sqrt(Math.pow(m.x-w.x,2)+Math.pow(m.y-w.y,2)),k={x:(m.x+w.x)/2,y:(m.y+w.y)/2};return{distance:x,center:k}}b(i,"e");function o(m){a.disabled||!a.touchEnabled||(s=null,document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",function(w){m.touches.length<2&&(E.value=-1),document.removeEventListener("touchmove",l)}))}return b(o,"o"),{onTouchStart:o,touchCount:t.computed(()=>Object.keys(h.value).length)}}b(Gt,"G");function Yt({props:a,onChange:d,container:h,target:E}){const s=t.ref({x:0,y:0}),l=t.ref(0);t.onMounted(()=>{l.value=a.minZoom,s.value={x:a.pan!=null?a.pan.x:a.initialPanX,y:a.pan!=null?a.pan.y:a.initialPanY},a.zoom?l.value=a.zoom:a.initialZoom>=a.minZoom&&a.initialZoom<=a.maxZoom&&(l.value=a.initialZoom)}),t.watch(()=>a.zoom,()=>{isNaN(a.zoom)||(l.value=a.zoom)}),t.watch(()=>a.pan,()=>{a.pan&&(s.value.x=a.pan.x,s.value.y=a.pan.y)},{deep:!0});function i(w,x,k){if(isNaN(w)||w===0)return;const C=l.value;let c=l.value+w;if(c>a.maxZoom?c=a.maxZoom:c<a.minZoom&&(c=a.minZoom),Math.abs(C-c)<1e-4)return;if(l.value=c,a.zoomOrigin==="center"&&(k=Ge(h.value)),a.zoomOrigin!=="content-center"){k||(k=Ge(h.value));const u=Xt(h.value,s.value),y={x:(c-C)*((u.x-k.x)/C),y:(c-C)*((u.y-k.y)/C)};o(y.x,y.y,"zoom")}let v={zoom:c,delta:{zoom:w,pan:{x:0,y:0}},pan:{x:s.value.x,y:s.value.y,deltaX:0,deltaY:0},type:x};d("zoom",v)}b(i,"e");function o(w,x,k){isNaN(w)&&(w=0),isNaN(x)&&(x=0),s.value={x:s.value.x+w,y:s.value.y+x};let C={zoom:l.value,delta:{zoom:0,pan:{x:w,y:x}},pan:{x:s.value.x,y:s.value.y,deltaX:w,deltaY:x},type:k};d("panned",C)}b(o,"o");function m(w){l.value=a.initialZoom,d("zoom",{zoom:l.value,pan:{x:s.value.x,y:s.value.y,deltaX:0,deltaY:0},type:w});let x={x:a.initialPanX-s.value.x,y:a.initialPanY-s.value.y};s.value={x:a.initialPanX,y:a.initialPanY},d("panned",{zoom:l.value,pan:{x:s.value.x,y:s.value.y,deltaX:x.x,deltaY:x.y},type:w})}return b(m,"d"),{zoom:t.computed(()=>l.value),pan:t.computed(()=>s.value),setZoom:b(w=>{l.value=w},"setZoom"),setPan:b(w=>{s.value=w},"setPan"),changeZoom:i,changePan:o,goHome:m}}b(Yt,"J");function Ge(a){const d=a.getBoundingClientRect();return{x:d.left+d.width/2,y:d.top+d.height/2}}b(Ge,"B");function Xt(a,d){const h=Ge(a);return{x:h.x+d.x,y:h.y+d.y}}b(Xt,"Q");function qt({props:a,transform:d}){function h(E){if(a.disabled||!a.wheelEnabled||!a.zoomEnabled)return;const s=Math.abs(E.deltaY)>0?E.deltaY:E.deltaX,l=a.wheelZoomStep*-1*s/Math.abs(s),i={x:E.clientX,y:E.clientY};d.changeZoom(l,"wheel",i),E.preventDefault()}return b(h,"l"),{onWheel:h}}b(qt,"ee");function Jt({props:a,onChange:d,container:h,target:E}){const s=Yt({props:a,onChange:d,container:h,target:E}),l=Gt({props:a,transform:s}),i=qt({props:a,transform:s}),o=Kt({props:a,transform:s}),m=Wt({props:a,transform:s});return{zoom:s.zoom,pan:s.pan,setZoom:s.setZoom,setPan:s.setPan,onWheel:i.onWheel,onTouchStart:l.onTouchStart,onButtonUp:m.onButtonUp,onButtonDown:m.onButtonDown,onPointerDown:o.onPointerDown,onDblClick:o.onDblClick}}b(Jt,"te");const Qt=t.defineComponent({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(a,{emit:d}){let h=d,E=a,s=t.ref(),l=t.computed(()=>{var x;return(x=s.value)==null?void 0:x.querySelector(E.selector)}),i=Jt({props:E,onChange:o,container:s,target:l});function o(x,k){x==="zoom"?h("update:zoom",k.zoom):x==="panned"&&h("update:pan",k.pan),h(x,k)}b(o,"o");let m=t.computed(()=>`translate(${i.pan.value.x}px, ${i.pan.value.y}px) scale(${i.zoom.value})`);function w(){l.value&&(l.value.style.transform=m.value,l.value.style.transformOrigin="center center",l.value.style.transition="transform 0.07s ease-out",l.value.style.transformBox="fill-box")}return b(w,"s"),t.watch(m,()=>{w()},{flush:"post"}),t.onMounted(()=>{w()}),(x,k)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:s,class:t.normalizeClass(x.$style.container),onDblclick:k[0]||(k[0]=(...C)=>t.unref(i).onDblClick&&t.unref(i).onDblClick(...C)),onPointerdown:k[1]||(k[1]=(...C)=>t.unref(i).onPointerDown&&t.unref(i).onPointerDown(...C)),onWheel:k[2]||(k[2]=(...C)=>t.unref(i).onWheel&&t.unref(i).onWheel(...C)),onTouchstart:k[3]||(k[3]=(...C)=>t.unref(i).onTouchStart&&t.unref(i).onTouchStart(...C))},[t.renderSlot(x.$slots,"default",{},void 0,!0),t.renderSlot(x.$slots,"buttons",{},()=>[t.unref(E).enableControlButton?(t.openBlock(),t.createBlock(Zt,{key:0,onButtondown:t.unref(i).onButtonDown,onButtonup:t.unref(i).onButtonUp},null,8,["onButtondown","onButtonup"])):t.createCommentVNode("",!0)],!0)],34))}}),en="_container_irdvc_2",tn="_buttons_irdvc_11",nn={container:en,buttons:tn},rn={$style:nn},on=et(Qt,[["__cssModules",rn],["__scopeId","data-v-fce7d501"]]);var an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,Le=b((a,d,h,E)=>{for(var s=E>1?void 0:E?sn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&an(d,h,s),s},"__decorateClass$5"),Ne;let De=(Ne=class extends Q.BaseComponent{components={Zoomable:on};uri="";ext="";fileName="";beforeMount(){const d=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");d&&(d.style.display="none",this.hookWhenComponentDestroy(()=>d.style.display="flex"))}},b(Ne,"ImageViewerFilesField"),Ne);Le([Q.Prop(String)],De.prototype,"uri",2);Le([Q.Prop(String)],De.prototype,"ext",2);Le([Q.Prop(String)],De.prototype,"fileName",2);De=Le([Q.VST],De);const ln={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},dn={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},hn=["src"];function un(a,d,h,E,s,l){const i=t.resolveComponent("Zoomable");return t.openBlock(),t.createElementBlock("div",ln,[t.createElementVNode("div",dn,[t.createVNode(i,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(a.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:t.withCtx(()=>[t.createElementVNode("img",{class:"w100%",src:a.uri},null,8,hn)]),_:1},8,["pan"])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),null,{default:t.withCtx(()=>[...d[0]||(d[0]=[t.createTextVNode(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}b(un,"render$5");const fn=Q._export_sfc(De,[["render",un]]);var cn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,tt=b((a,d,h,E)=>{for(var s=E>1?void 0:E?pn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&cn(d,h,s),s},"__decorateClass$4"),Ce;let Ue=(Ce=class extends Q.BaseComponent{file={};mounted(){}},b(Ce,"ExcelViewerFilesField"),Ce);tt([Q.Prop(Object,null)],Ue.prototype,"file",2);Ue=tt([Q.VST],Ue);const mn={class:"mt150px",id:"excelView",ref:"excelView"};function vn(a,d,h,E,s,l){return t.openBlock(),t.createElementBlock("div",mn,"Скоро будет!",512)}b(vn,"render$4");const gn=Q._export_sfc(Ue,[["render",vn]]);var wn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,nt=b((a,d,h,E)=>{for(var s=E>1?void 0:E?yn(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&wn(d,h,s),s},"__decorateClass$3"),Se;let $e=(Se=class extends Q.BaseComponent{file={}},b(Se,"DocxViewerFilesField"),Se);nt([Q.Prop(Object,null)],$e.prototype,"file",2);$e=nt([Q.VST],$e);const bn={class:"p15px mt150px"};function _n(a,d,h,E,s,l){return t.openBlock(),t.createElementBlock("div",bn,"Скоро")}b(_n,"render$3");const kn=Q._export_sfc($e,[["render",_n]]);var xn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,Ze=b((a,d,h,E)=>{for(var s=E>1?void 0:E?En(d,h):d,l=a.length-1,i;l>=0;l--)(i=a[l])&&(s=(E?i(d,h,s):i(s))||s);return E&&s&&xn(d,h,s),s},"__decorateClass$2"),Fe;let Ie=(Fe=class extends Q.BaseComponent{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const d=await fetch(this.uri);if(!d.ok)throw new Error(`HTTP error ${d.status}`);const h=await d.blob(),E="application/pdf",s=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([h],s,{type:E})}catch(d){console.error("Failed to fetch the file:",d)}}async loadAndShowPdf(){const d=await this.fetchPdfFile();if(d){const E=`
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ue = Object.defineProperty;
|
|
2
2
|
var a = (i, t) => ue(i, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { a as de, P as R, V as fe, _ as pe } from "./index-
|
|
3
|
+
import { a as de, P as R, V as fe, _ as pe } from "./index-Cd_DL4JD.js";
|
|
4
4
|
import { openBlock as Z, createElementBlock as ve, normalizeClass as me, renderSlot as ge, createBlock as be, resolveDynamicComponent as ye, withCtx as Ee, createTextVNode as Se, toDisplayString as w } from "vue";
|
|
5
5
|
function P(i) {
|
|
6
6
|
var t = typeof i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty;var a=(i,t)=>he(i,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-BgWRAiiR.cjs"),f=require("vue");function j(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(j,"isObject");var ue=typeof global=="object"&&global&&global.Object===Object&&global,de=typeof self=="object"&&self&&self.Object===Object&&self,ie=ue||de||Function("return this")(),I=a(function(){return ie.Date.now()},"now"),fe=/\s/;function pe(i){for(var t=i.length;t--&&fe.test(i.charAt(t)););return t}a(pe,"trimmedEndIndex");var ve=/^\s+/;function me(i){return i&&i.slice(0,pe(i)+1).replace(ve,"")}a(me,"baseTrim");var V=ie.Symbol,re=Object.prototype,ge=re.hasOwnProperty,be=re.toString,R=V?V.toStringTag:void 0;function ye(i){var t=ge.call(i,R),r=i[R];try{i[R]=void 0;var e=!0}catch{}var s=be.call(i);return e&&(t?i[R]=r:delete i[R]),s}a(ye,"getRawTag");var Ee=Object.prototype,Se=Ee.toString;function Oe(i){return Se.call(i)}a(Oe,"objectToString");var xe="[object Null]",we="[object Undefined]",Z=V?V.toStringTag:void 0;function Ae(i){return i==null?i===void 0?we:xe:Z&&Z in Object(i)?ye(i):Oe(i)}a(Ae,"baseGetTag");function We(i){return i!=null&&typeof i=="object"}a(We,"isObjectLike");var ke="[object Symbol]";function Me(i){return typeof i=="symbol"||We(i)&&Ae(i)==ke}a(Me,"isSymbol");var K=NaN,Ce=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,ze=/^0o[0-7]+$/i,Le=parseInt;function J(i){if(typeof i=="number")return i;if(Me(i))return K;if(j(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=j(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=me(i);var r=Te.test(i);return r||ze.test(i)?Le(i.slice(2),r?2:8):Ce.test(i)?K:+i}a(J,"toNumber");var _e="Expected a function",Ne=Math.max,De=Math.min;function B(i,t,r){var e,s,l,o,n,c,h=0,m=!1,d=!1,g=!0;if(typeof i!="function")throw new TypeError(_e);t=J(t)||0,j(r)&&(m=!!r.leading,d="maxWait"in r,l=d?Ne(J(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g);function p(u){var E=e,S=s;return e=s=void 0,h=u,o=i.apply(S,E),o}a(p,"invokeFunc");function T(u){return h=u,n=setTimeout(y,t),m?p(u):o}a(T,"leadingEdge");function x(u){var E=u-c,S=u-h,G=t-E;return d?De(G,l-S):G}a(x,"remainingWait");function O(u){var E=u-c,S=u-h;return c===void 0||E>=t||E<0||d&&S>=l}a(O,"shouldInvoke");function y(){var u=I();if(O(u))return w(u);n=setTimeout(y,x(u))}a(y,"timerExpired");function w(u){return n=void 0,g&&e?p(u):(e=s=void 0,o)}a(w,"trailingEdge");function P(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(P,"cancel");function $(){return n===void 0?o:w(I())}a($,"flush");function D(){var u=I(),E=O(u);if(e=arguments,s=this,c=u,E){if(n===void 0)return T(c);if(d)return clearTimeout(n),n=setTimeout(y,t),p(c)}return n===void 0&&(n=setTimeout(y,t)),o}return a(D,"debounced"),D.cancel=P,D.flush=$,D}a(B,"debounce");var Re="Expected a function";function Pe(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Re);return j(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),B(i,t,{leading:e,maxWait:t,trailing:s})}a(Pe,"throttle");var L=a(function(){return L=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),L.apply(this,arguments)},"__assign");function se(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(se,"getElementWindow$1");function le(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(le,"getElementDocument$1");var oe=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ne(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ne,"addClasses$1");function ae(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ae,"removeClasses$1");function ce(i){return".".concat(i.split(" ").join("."))}a(ce,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Be=Object.freeze({__proto__:null,addClasses:ne,canUseDOM:U,classNamesToQuery:ce,getElementDocument:le,getElementWindow:se,getOptions:oe,removeClasses:ae}),z=null,ee=null;U&&window.addEventListener("resize",function(){ee!==window.devicePixelRatio&&(ee=window.devicePixelRatio,z=null)});function te(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(te,"scrollbarWidth");var A=se,X=le,He=oe,W=ne,k=ae,v=ce,H=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,m,d,g,p,T,x;if(!(!e.draggedAxis||!e.contentWrapperEl)){var O,y=e.axis[e.draggedAxis].track,w=(o=(l=y.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,P=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,D=parseInt((m=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&m!==void 0?m:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?O=s.pageY:O=s.pageX;var u=O-((g=(d=y.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&g!==void 0?g:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((T=(p=y.rect)===null||p===void 0?void 0:p[e.axis[e.draggedAxis].sizeAttr])!==null&&T!==void 0?T:0)-P.size-u:u;var E=u/(w-P.size),S=E*($-D);e.draggedAxis==="x"&&e.isRtl&&(S=!((x=i.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-S:S),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=S}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=L(L({},i.defaultOptions),r),this.classNames=L(L({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=Pe(this._onMouseMove,64),this.onWindowResize=B(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=B(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=B(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:te()}catch{return te()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(v(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(v(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(v(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(v(this.classNames.offset)),this.maskEl=this.el.querySelector(v(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,v(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(v(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(v(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(v(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(v(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var m=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>m,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,g=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-g,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>m-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var m=h/(o-c),d=~~((n-l.size)*m);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var m=this.axis[r].scrollbar,d=(l=(s=m.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,g=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),p=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],T=r==="y"?this.mouseY-d:this.mouseX-d,x=T<0?-1:1,O=x===-1?p-g:p+g,y=40,w=a(function(){e.contentWrapperEl&&(x===-1?p>O&&(p-=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)):p<O&&(p+=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)))},"scrollTo");w()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=He,i.helpers=Be,i})(),Y=a(function(i,t){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},Y(i,t)},"extendStatics");function je(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(je,"__extends");var Q=H.helpers,q=Q.getOptions,b=Q.addClasses,Ve=Q.canUseDOM,F=(function(i){je(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,q(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),b(this.wrapperEl,this.classNames.wrapper),b(this.contentWrapperEl,this.classNames.contentWrapper),b(this.offsetEl,this.classNames.offset),b(this.maskEl,this.classNames.mask),b(this.contentEl,this.classNames.contentEl),b(this.placeholderEl,this.classNames.placeholder),b(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),b(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");b(o,this.classNames.track),b(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),b(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),b(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}H.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){H.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,q(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,q(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(H);Ve&&F.initHtmlApi();var $e=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?Ie(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&$e(t,r,s),s},"__decorateClass"),_;let M=(_=class extends C.BaseComponent{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(_,"Scrollbar"),_);N([C.Prop(Boolean)],M.prototype,"autoHide",2);N([C.Prop(String)],M.prototype,"color",2);N([C.Prop(String)],M.prototype,"margin",2);N([C.Prop(String)],M.prototype,"width",2);N([C.Prop(String)],M.prototype,"direction",2);M=N([C.VST],M);const Xe=["data-simplebar-auto-hide","data-simplebar-direction"];function qe(i,t,r,e,s,l){return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[f.renderSlot(i.$slots,"default"),(f.openBlock(),f.createBlock(f.resolveDynamicComponent("style"),null,{default:f.withCtx(()=>[f.createTextVNode("."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grabbing !important; width: "+f.toDisplayString(i.width)+" !important; } ."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grab !important; width: "+f.toDisplayString(i.width)+" !important; }",1)]),_:1}))],10,Xe)}a(qe,"render");const Ye=C._export_sfc(M,[["render",qe]]);exports.default=Ye;
|
|
1
|
+
"use strict";var he=Object.defineProperty;var a=(i,t)=>he(i,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-DZjDh7FL.cjs"),f=require("vue");function j(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(j,"isObject");var ue=typeof global=="object"&&global&&global.Object===Object&&global,de=typeof self=="object"&&self&&self.Object===Object&&self,ie=ue||de||Function("return this")(),I=a(function(){return ie.Date.now()},"now"),fe=/\s/;function pe(i){for(var t=i.length;t--&&fe.test(i.charAt(t)););return t}a(pe,"trimmedEndIndex");var ve=/^\s+/;function me(i){return i&&i.slice(0,pe(i)+1).replace(ve,"")}a(me,"baseTrim");var V=ie.Symbol,re=Object.prototype,ge=re.hasOwnProperty,be=re.toString,R=V?V.toStringTag:void 0;function ye(i){var t=ge.call(i,R),r=i[R];try{i[R]=void 0;var e=!0}catch{}var s=be.call(i);return e&&(t?i[R]=r:delete i[R]),s}a(ye,"getRawTag");var Ee=Object.prototype,Se=Ee.toString;function Oe(i){return Se.call(i)}a(Oe,"objectToString");var xe="[object Null]",we="[object Undefined]",Z=V?V.toStringTag:void 0;function Ae(i){return i==null?i===void 0?we:xe:Z&&Z in Object(i)?ye(i):Oe(i)}a(Ae,"baseGetTag");function We(i){return i!=null&&typeof i=="object"}a(We,"isObjectLike");var ke="[object Symbol]";function Me(i){return typeof i=="symbol"||We(i)&&Ae(i)==ke}a(Me,"isSymbol");var K=NaN,Ce=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,ze=/^0o[0-7]+$/i,Le=parseInt;function J(i){if(typeof i=="number")return i;if(Me(i))return K;if(j(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=j(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=me(i);var r=Te.test(i);return r||ze.test(i)?Le(i.slice(2),r?2:8):Ce.test(i)?K:+i}a(J,"toNumber");var _e="Expected a function",Ne=Math.max,De=Math.min;function B(i,t,r){var e,s,l,o,n,c,h=0,m=!1,d=!1,g=!0;if(typeof i!="function")throw new TypeError(_e);t=J(t)||0,j(r)&&(m=!!r.leading,d="maxWait"in r,l=d?Ne(J(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g);function p(u){var E=e,S=s;return e=s=void 0,h=u,o=i.apply(S,E),o}a(p,"invokeFunc");function T(u){return h=u,n=setTimeout(y,t),m?p(u):o}a(T,"leadingEdge");function x(u){var E=u-c,S=u-h,G=t-E;return d?De(G,l-S):G}a(x,"remainingWait");function O(u){var E=u-c,S=u-h;return c===void 0||E>=t||E<0||d&&S>=l}a(O,"shouldInvoke");function y(){var u=I();if(O(u))return w(u);n=setTimeout(y,x(u))}a(y,"timerExpired");function w(u){return n=void 0,g&&e?p(u):(e=s=void 0,o)}a(w,"trailingEdge");function P(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(P,"cancel");function $(){return n===void 0?o:w(I())}a($,"flush");function D(){var u=I(),E=O(u);if(e=arguments,s=this,c=u,E){if(n===void 0)return T(c);if(d)return clearTimeout(n),n=setTimeout(y,t),p(c)}return n===void 0&&(n=setTimeout(y,t)),o}return a(D,"debounced"),D.cancel=P,D.flush=$,D}a(B,"debounce");var Re="Expected a function";function Pe(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Re);return j(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),B(i,t,{leading:e,maxWait:t,trailing:s})}a(Pe,"throttle");var L=a(function(){return L=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),L.apply(this,arguments)},"__assign");function se(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(se,"getElementWindow$1");function le(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(le,"getElementDocument$1");var oe=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ne(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ne,"addClasses$1");function ae(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ae,"removeClasses$1");function ce(i){return".".concat(i.split(" ").join("."))}a(ce,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Be=Object.freeze({__proto__:null,addClasses:ne,canUseDOM:U,classNamesToQuery:ce,getElementDocument:le,getElementWindow:se,getOptions:oe,removeClasses:ae}),z=null,ee=null;U&&window.addEventListener("resize",function(){ee!==window.devicePixelRatio&&(ee=window.devicePixelRatio,z=null)});function te(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(te,"scrollbarWidth");var A=se,X=le,He=oe,W=ne,k=ae,v=ce,H=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,m,d,g,p,T,x;if(!(!e.draggedAxis||!e.contentWrapperEl)){var O,y=e.axis[e.draggedAxis].track,w=(o=(l=y.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,P=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,D=parseInt((m=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&m!==void 0?m:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?O=s.pageY:O=s.pageX;var u=O-((g=(d=y.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&g!==void 0?g:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((T=(p=y.rect)===null||p===void 0?void 0:p[e.axis[e.draggedAxis].sizeAttr])!==null&&T!==void 0?T:0)-P.size-u:u;var E=u/(w-P.size),S=E*($-D);e.draggedAxis==="x"&&e.isRtl&&(S=!((x=i.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-S:S),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=S}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=L(L({},i.defaultOptions),r),this.classNames=L(L({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=Pe(this._onMouseMove,64),this.onWindowResize=B(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=B(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=B(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:te()}catch{return te()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(v(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(v(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(v(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(v(this.classNames.offset)),this.maskEl=this.el.querySelector(v(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,v(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(v(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(v(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(v(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(v(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var m=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>m,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,g=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-g,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>m-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var m=h/(o-c),d=~~((n-l.size)*m);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var m=this.axis[r].scrollbar,d=(l=(s=m.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,g=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),p=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],T=r==="y"?this.mouseY-d:this.mouseX-d,x=T<0?-1:1,O=x===-1?p-g:p+g,y=40,w=a(function(){e.contentWrapperEl&&(x===-1?p>O&&(p-=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)):p<O&&(p+=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)))},"scrollTo");w()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=He,i.helpers=Be,i})(),Y=a(function(i,t){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},Y(i,t)},"extendStatics");function je(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(je,"__extends");var Q=H.helpers,q=Q.getOptions,b=Q.addClasses,Ve=Q.canUseDOM,F=(function(i){je(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,q(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),b(this.wrapperEl,this.classNames.wrapper),b(this.contentWrapperEl,this.classNames.contentWrapper),b(this.offsetEl,this.classNames.offset),b(this.maskEl,this.classNames.mask),b(this.contentEl,this.classNames.contentEl),b(this.placeholderEl,this.classNames.placeholder),b(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),b(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");b(o,this.classNames.track),b(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),b(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),b(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}H.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){H.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,q(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,q(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(H);Ve&&F.initHtmlApi();var $e=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?Ie(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&$e(t,r,s),s},"__decorateClass"),_;let M=(_=class extends C.BaseComponent{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(_,"Scrollbar"),_);N([C.Prop(Boolean)],M.prototype,"autoHide",2);N([C.Prop(String)],M.prototype,"color",2);N([C.Prop(String)],M.prototype,"margin",2);N([C.Prop(String)],M.prototype,"width",2);N([C.Prop(String)],M.prototype,"direction",2);M=N([C.VST],M);const Xe=["data-simplebar-auto-hide","data-simplebar-direction"];function qe(i,t,r,e,s,l){return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[f.renderSlot(i.$slots,"default"),(f.openBlock(),f.createBlock(f.resolveDynamicComponent("style"),null,{default:f.withCtx(()=>[f.createTextVNode("."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grabbing !important; width: "+f.toDisplayString(i.width)+" !important; } ."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grab !important; width: "+f.toDisplayString(i.width)+" !important; }",1)]),_:1}))],10,Xe)}a(qe,"render");const Ye=C._export_sfc(M,[["render",qe]]);exports.default=Ye;
|