@pksep/yui 0.1.324 → 0.1.325
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/sep-yui.mjs +2 -1
- package/dist/sep-yui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/sep-yui.mjs
CHANGED
|
@@ -79792,6 +79792,7 @@ const qgI = ["data-testid"], $gI = ["src", "alt"], gII = {
|
|
|
79792
79792
|
modelValue: i.value,
|
|
79793
79793
|
"onUpdate:modelValue": r[0] || (r[0] = (p) => i.value = p),
|
|
79794
79794
|
disabled: "",
|
|
79795
|
+
theme: "minor",
|
|
79795
79796
|
onChange: s
|
|
79796
79797
|
}, null, 8, ["modelValue"])) : Bg("", !0)
|
|
79797
79798
|
]),
|
|
@@ -79810,7 +79811,7 @@ const qgI = ["data-testid"], $gI = ["src", "alt"], gII = {
|
|
|
79810
79811
|
]);
|
|
79811
79812
|
};
|
|
79812
79813
|
}
|
|
79813
|
-
}), aII = /* @__PURE__ */ CI(oII, [["__scopeId", "data-v-
|
|
79814
|
+
}), aII = /* @__PURE__ */ CI(oII, [["__scopeId", "data-v-fc5df63a"]]), dII = ["data-testid"], cII = { class: "menu-yui-kit__wrapper" }, mII = { class: "menu-yui-kit__names" }, rII = { class: "menu-yui-kit__name" }, uII = { class: "menu-yui-kit__role" }, ZII = {
|
|
79814
79815
|
key: 0,
|
|
79815
79816
|
class: "menu-yui-kit__dropdown"
|
|
79816
79817
|
}, bII = /* @__PURE__ */ wg({
|
package/dist/sep-yui.umd.cjs
CHANGED
|
@@ -1681,7 +1681,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
1681
1681
|
* perfect-scrollbar v1.5.6
|
|
1682
1682
|
* Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
|
|
1683
1683
|
* Licensed under MIT
|
|
1684
|
-
*/function _l(e){return getComputedStyle(e)}function Ei(e,g){for(var I in g){var C=g[I];typeof C=="number"&&(C=C+"px"),e.style[I]=C}return e}function $1(e){var g=document.createElement("div");return g.className=e,g}var FK=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Sa(e,g){if(!FK)throw new Error("No element matching method supported");return FK.call(e,g)}function pZ(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function KK(e,g){return Array.prototype.filter.call(e.children,function(I){return Sa(I,g)})}var fC={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},zK={x:null,y:null};function JK(e,g){var I=e.element.classList,C=fC.state.scrolling(g);I.contains(C)?clearTimeout(zK[g]):I.add(C)}function xK(e,g){zK[g]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(fC.state.scrolling(g))},e.settings.scrollingThreshold)}function HEg(e,g){JK(e,g),xK(e,g)}var nh=function(g){this.element=g,this.handlers={}},TK={isEmpty:{configurable:!0}};nh.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},nh.prototype.unbind=function(g,I){var C=this;this.handlers[g]=this.handlers[g].filter(function(t){return I&&t!==I?!0:(C.element.removeEventListener(g,t,!1),!1)})},nh.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},TK.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(g){return e.handlers[g].length===0})},Object.defineProperties(nh.prototype,TK);var BZ=function(){this.eventElements=[]};BZ.prototype.eventElement=function(g){var I=this.eventElements.filter(function(C){return C.element===g})[0];return I||(I=new nh(g),this.eventElements.push(I)),I},BZ.prototype.bind=function(g,I,C){this.eventElement(g).bind(I,C)},BZ.prototype.unbind=function(g,I,C){var t=this.eventElement(g);t.unbind(I,C),t.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(t),1)},BZ.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},BZ.prototype.once=function(g,I,C){var t=this.eventElement(g),i=function(n){t.unbind(I,i),C(n)};t.bind(I,i)};function gp(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);var g=document.createEvent("CustomEvent");return g.initCustomEvent(e,!1,!1,void 0),g}function Ip(e,g,I,C,t){C===void 0&&(C=!0),t===void 0&&(t=!1);var i;if(g==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(g==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");fEg(e,I,i,C,t)}function fEg(e,g,I,C,t){var i=I[0],n=I[1],A=I[2],s=I[3],o=I[4],a=I[5];C===void 0&&(C=!0),t===void 0&&(t=!1);var d=e.element;e.reach[s]=null,d[A]<1&&(e.reach[s]="start"),d[A]>e[i]-e[n]-1&&(e.reach[s]="end"),g&&(d.dispatchEvent(gp("ps-scroll-"+s)),g<0?d.dispatchEvent(gp("ps-scroll-"+o)):g>0&&d.dispatchEvent(gp("ps-scroll-"+a)),C&&HEg(e,s)),e.reach[s]&&(g||t)&&d.dispatchEvent(gp("ps-"+s+"-reach-"+e.reach[s]))}function Pe(e){return parseInt(e,10)||0}function SEg(e){return Sa(e,"input,[contenteditable]")||Sa(e,"select,[contenteditable]")||Sa(e,"textarea,[contenteditable]")||Sa(e,"button,[contenteditable]")}function DEg(e){var g=_l(e);return Pe(g.width)+Pe(g.paddingLeft)+Pe(g.paddingRight)+Pe(g.borderLeftWidth)+Pe(g.borderRightWidth)}var YZ={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function Ps(e){var g=e.element,I=Math.floor(g.scrollTop),C=g.getBoundingClientRect();e.containerWidth=Math.floor(C.width),e.containerHeight=Math.floor(C.height),e.contentWidth=g.scrollWidth,e.contentHeight=g.scrollHeight,g.contains(e.scrollbarXRail)||(KK(g,fC.element.rail("x")).forEach(function(t){return pZ(t)}),g.appendChild(e.scrollbarXRail)),g.contains(e.scrollbarYRail)||(KK(g,fC.element.rail("y")).forEach(function(t){return pZ(t)}),g.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=LK(e,Pe(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Pe((e.negativeScrollAdjustment+g.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=LK(e,Pe(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=Pe(I*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),kEg(g,e),e.scrollbarXActive?g.classList.add(fC.state.active("x")):(g.classList.remove(fC.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,g.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?g.classList.add(fC.state.active("y")):(g.classList.remove(fC.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,g.scrollTop=0)}function LK(e,g){return e.settings.minScrollbarLength&&(g=Math.max(g,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(g=Math.min(g,e.settings.maxScrollbarLength)),g}function kEg(e,g){var I={width:g.railXWidth},C=Math.floor(e.scrollTop);g.isRtl?I.left=g.negativeScrollAdjustment+e.scrollLeft+g.containerWidth-g.contentWidth:I.left=e.scrollLeft,g.isScrollbarXUsingBottom?I.bottom=g.scrollbarXBottom-C:I.top=g.scrollbarXTop+C,Ei(g.scrollbarXRail,I);var t={top:C,height:g.railYHeight};g.isScrollbarYUsingRight?g.isRtl?t.right=g.contentWidth-(g.negativeScrollAdjustment+e.scrollLeft)-g.scrollbarYRight-g.scrollbarYOuterWidth-9:t.right=g.scrollbarYRight-e.scrollLeft:g.isRtl?t.left=g.negativeScrollAdjustment+e.scrollLeft+g.containerWidth*2-g.contentWidth-g.scrollbarYLeft-g.scrollbarYOuterWidth:t.left=g.scrollbarYLeft+e.scrollLeft,Ei(g.scrollbarYRail,t),Ei(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),Ei(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function FEg(e){e.event.bind(e.scrollbarY,"mousedown",function(g){return g.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(g){var I=g.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,C=I>e.scrollbarYTop?1:-1;e.element.scrollTop+=C*e.containerHeight,Ps(e),g.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(g){return g.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(g){var I=g.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left,C=I>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=C*e.containerWidth,Ps(e),g.stopPropagation()})}var ep=null;function KEg(e){vK(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),vK(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function vK(e,g){var I=g[0],C=g[1],t=g[2],i=g[3],n=g[4],A=g[5],s=g[6],o=g[7],a=g[8],d=e.element,m=null,Z=null,b=null;function h(W){W.touches&&W.touches[0]&&(W[t]=W.touches[0]["page"+o.toUpperCase()]),ep===n&&(d[s]=m+b*(W[t]-Z),JK(e,o),Ps(e),W.stopPropagation(),W.preventDefault())}function G(){xK(e,o),e[a].classList.remove(fC.state.clicking),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",h),document.removeEventListener("touchend",G),ep=null}function w(W){ep===null&&(ep=n,m=d[s],W.touches&&(W[t]=W.touches[0]["page"+o.toUpperCase()]),Z=W[t],b=(e[C]-e[I])/(e[i]-e[A]),W.touches?(document.addEventListener("touchmove",h,{passive:!1}),document.addEventListener("touchend",G)):(document.addEventListener("mousemove",h),document.addEventListener("mouseup",G)),e[a].classList.add(fC.state.clicking)),W.stopPropagation(),W.cancelable&&W.preventDefault()}e[n].addEventListener("mousedown",w),e[n].addEventListener("touchstart",w)}function zEg(e){var g=e.element,I=function(){return Sa(g,":hover")},C=function(){return Sa(e.scrollbarX,":focus")||Sa(e.scrollbarY,":focus")};function t(i,n){var A=Math.floor(g.scrollTop);if(i===0){if(!e.scrollbarYActive)return!1;if(A===0&&n>0||A>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}var s=g.scrollLeft;if(n===0){if(!e.scrollbarXActive)return!1;if(s===0&&i<0||s>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}e.event.bind(e.ownerDocument,"keydown",function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&!(!I()&&!C())){var n=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(n){if(n.tagName==="IFRAME")n=n.contentDocument.activeElement;else for(;n.shadowRoot;)n=n.shadowRoot.activeElement;if(SEg(n))return}var A=0,s=0;switch(i.which){case 37:i.metaKey?A=-e.contentWidth:i.altKey?A=-e.containerWidth:A=-30;break;case 38:i.metaKey?s=e.contentHeight:i.altKey?s=e.containerHeight:s=30;break;case 39:i.metaKey?A=e.contentWidth:i.altKey?A=e.containerWidth:A=30;break;case 40:i.metaKey?s=-e.contentHeight:i.altKey?s=-e.containerHeight:s=-30;break;case 32:i.shiftKey?s=e.containerHeight:s=-e.containerHeight;break;case 33:s=e.containerHeight;break;case 34:s=-e.containerHeight;break;case 36:s=e.contentHeight;break;case 35:s=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&A!==0||e.settings.suppressScrollY&&s!==0||(g.scrollTop-=s,g.scrollLeft+=A,Ps(e),t(A,s)&&i.preventDefault())}})}function JEg(e){var g=e.element;function I(n,A){var s=Math.floor(g.scrollTop),o=g.scrollTop===0,a=s+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,m=g.scrollLeft+g.offsetWidth===g.scrollWidth,Z;return Math.abs(A)>Math.abs(n)?Z=o||a:Z=d||m,Z?!e.settings.wheelPropagation:!0}function C(n){var A=n.deltaX,s=-1*n.deltaY;return(typeof A>"u"||typeof s>"u")&&(A=-1*n.wheelDeltaX/6,s=n.wheelDeltaY/6),n.deltaMode&&n.deltaMode===1&&(A*=10,s*=10),A!==A&&s!==s&&(A=0,s=n.wheelDelta),n.shiftKey?[-s,-A]:[A,s]}function t(n,A,s){if(!YZ.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(n))return!1;for(var o=n;o&&o!==g;){if(o.classList.contains(fC.element.consuming))return!0;var a=_l(o);if(s&&a.overflowY.match(/(scroll|auto)/)){var d=o.scrollHeight-o.clientHeight;if(d>0&&(o.scrollTop>0&&s<0||o.scrollTop<d&&s>0))return!0}if(A&&a.overflowX.match(/(scroll|auto)/)){var m=o.scrollWidth-o.clientWidth;if(m>0&&(o.scrollLeft>0&&A<0||o.scrollLeft<m&&A>0))return!0}o=o.parentNode}return!1}function i(n){var A=C(n),s=A[0],o=A[1];if(!t(n.target,s,o)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(o?g.scrollTop-=o*e.settings.wheelSpeed:g.scrollTop+=s*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?g.scrollLeft+=s*e.settings.wheelSpeed:g.scrollLeft-=o*e.settings.wheelSpeed,a=!0):(g.scrollTop-=o*e.settings.wheelSpeed,g.scrollLeft+=s*e.settings.wheelSpeed),Ps(e),a=a||I(s,o),a&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}typeof window.onwheel<"u"?e.event.bind(g,"wheel",i):typeof window.onmousewheel<"u"&&e.event.bind(g,"mousewheel",i)}function xEg(e){if(!YZ.supportsTouch&&!YZ.supportsIePointer)return;var g=e.element,I={startOffset:{},startTime:0,speed:{},easingLoop:null};function C(d,m){var Z=Math.floor(g.scrollTop),b=g.scrollLeft,h=Math.abs(d),G=Math.abs(m);if(G>h){if(m<0&&Z===e.contentHeight-e.containerHeight||m>0&&Z===0)return window.scrollY===0&&m>0&&YZ.isChrome}else if(h>G&&(d<0&&b===e.contentWidth-e.containerWidth||d>0&&b===0))return!0;return!0}function t(d,m){g.scrollTop-=m,g.scrollLeft-=d,Ps(e)}function i(d){return d.targetTouches?d.targetTouches[0]:d}function n(d){return d.target===e.scrollbarX||d.target===e.scrollbarY||d.pointerType&&d.pointerType==="pen"&&d.buttons===0?!1:!!(d.targetTouches&&d.targetTouches.length===1||d.pointerType&&d.pointerType!=="mouse"&&d.pointerType!==d.MSPOINTER_TYPE_MOUSE)}function A(d){if(n(d)){var m=i(d);I.startOffset.pageX=m.pageX,I.startOffset.pageY=m.pageY,I.startTime=new Date().getTime(),I.easingLoop!==null&&clearInterval(I.easingLoop)}}function s(d,m,Z){if(!g.contains(d))return!1;for(var b=d;b&&b!==g;){if(b.classList.contains(fC.element.consuming))return!0;var h=_l(b);if(Z&&h.overflowY.match(/(scroll|auto)/)){var G=b.scrollHeight-b.clientHeight;if(G>0&&(b.scrollTop>0&&Z<0||b.scrollTop<G&&Z>0))return!0}if(m&&h.overflowX.match(/(scroll|auto)/)){var w=b.scrollWidth-b.clientWidth;if(w>0&&(b.scrollLeft>0&&m<0||b.scrollLeft<w&&m>0))return!0}b=b.parentNode}return!1}function o(d){if(n(d)){var m=i(d),Z={pageX:m.pageX,pageY:m.pageY},b=Z.pageX-I.startOffset.pageX,h=Z.pageY-I.startOffset.pageY;if(s(d.target,b,h))return;t(b,h),I.startOffset=Z;var G=new Date().getTime(),w=G-I.startTime;w>0&&(I.speed.x=b/w,I.speed.y=h/w,I.startTime=G),C(b,h)&&d.cancelable&&d.preventDefault()}}function a(){e.settings.swipeEasing&&(clearInterval(I.easingLoop),I.easingLoop=setInterval(function(){if(e.isInitialized){clearInterval(I.easingLoop);return}if(!I.speed.x&&!I.speed.y){clearInterval(I.easingLoop);return}if(Math.abs(I.speed.x)<.01&&Math.abs(I.speed.y)<.01){clearInterval(I.easingLoop);return}t(I.speed.x*30,I.speed.y*30),I.speed.x*=.8,I.speed.y*=.8},10))}YZ.supportsTouch?(e.event.bind(g,"touchstart",A),e.event.bind(g,"touchmove",o),e.event.bind(g,"touchend",a)):YZ.supportsIePointer&&(window.PointerEvent?(e.event.bind(g,"pointerdown",A),e.event.bind(g,"pointermove",o),e.event.bind(g,"pointerup",a)):window.MSPointerEvent&&(e.event.bind(g,"MSPointerDown",A),e.event.bind(g,"MSPointerMove",o),e.event.bind(g,"MSPointerUp",a)))}var TEg=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},LEg={"click-rail":FEg,"drag-thumb":KEg,keyboard:zEg,wheel:JEg,touch:xEg},Ah=function(g,I){var C=this;if(I===void 0&&(I={}),typeof g=="string"&&(g=document.querySelector(g)),!g||!g.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=g,g.classList.add(fC.main),this.settings=TEg();for(var t in I)this.settings[t]=I[t];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var i=function(){return g.classList.add(fC.state.focus)},n=function(){return g.classList.remove(fC.state.focus)};this.isRtl=_l(g).direction==="rtl",this.isRtl===!0&&g.classList.add(fC.rtl),this.isNegativeScroll=function(){var o=g.scrollLeft,a=null;return g.scrollLeft=-1,a=g.scrollLeft<0,g.scrollLeft=o,a}(),this.negativeScrollAdjustment=this.isNegativeScroll?g.scrollWidth-g.clientWidth:0,this.event=new BZ,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=$1(fC.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=$1(fC.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",n),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var A=_l(this.scrollbarXRail);this.scrollbarXBottom=parseInt(A.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Pe(A.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Pe(A.borderLeftWidth)+Pe(A.borderRightWidth),Ei(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Pe(A.marginLeft)+Pe(A.marginRight),Ei(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=$1(fC.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=$1(fC.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",n),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var s=_l(this.scrollbarYRail);this.scrollbarYRight=parseInt(s.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Pe(s.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?DEg(this.scrollbarY):null,this.railBorderYWidth=Pe(s.borderTopWidth)+Pe(s.borderBottomWidth),Ei(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Pe(s.marginTop)+Pe(s.marginBottom),Ei(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:g.scrollLeft<=0?"start":g.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:g.scrollTop<=0?"start":g.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(o){return LEg[o](C)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(o){return C.onScroll(o)}),Ps(this)};Ah.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Ei(this.scrollbarXRail,{display:"block"}),Ei(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Pe(_l(this.scrollbarXRail).marginLeft)+Pe(_l(this.scrollbarXRail).marginRight),this.railYMarginHeight=Pe(_l(this.scrollbarYRail).marginTop)+Pe(_l(this.scrollbarYRail).marginBottom),Ei(this.scrollbarXRail,{display:"none"}),Ei(this.scrollbarYRail,{display:"none"}),Ps(this),Ip(this,"top",0,!1,!0),Ip(this,"left",0,!1,!0),Ei(this.scrollbarXRail,{display:""}),Ei(this.scrollbarYRail,{display:""}))},Ah.prototype.onScroll=function(g){this.isAlive&&(Ps(this),Ip(this,"top",this.element.scrollTop-this.lastScrollTop),Ip(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Ah.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),pZ(this.scrollbarX),pZ(this.scrollbarY),pZ(this.scrollbarXRail),pZ(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Ah.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const vEg=l.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:g,emit:I}){const C=e,t=I,i=l.ref(null),n=l.ref(null);l.watch(()=>C.options,()=>{s(),A()},{deep:!0}),l.onMounted(()=>{i.value&&A()}),l.onBeforeUnmount(()=>{s()});function A(){i.value&&(n.value=new Ah(i.value,C.options),d())}function s(){n.value&&(d(!1),n.value.destroy(),n.value=null)}const o={scroll:a("scroll"),"ps-scroll-y":a("ps-scroll-y"),"ps-scroll-x":a("ps-scroll-x"),"ps-scroll-up":a("ps-scroll-up"),"ps-scroll-down":a("ps-scroll-down"),"ps-scroll-left":a("ps-scroll-left"),"ps-scroll-right":a("ps-scroll-right"),"ps-y-reach-start":a("ps-y-reach-start"),"ps-y-reach-end":a("ps-y-reach-end"),"ps-x-reach-start":a("ps-x-reach-start"),"ps-x-reach-end":a("ps-x-reach-end")};function a(m){return function(Z){t(m,Z)}}function d(m=!0){var Z;(Z=n.value)!=null&&Z.element&&Object.entries(o).forEach(([b,h])=>{var G,w;m?(G=n.value)==null||G.element.addEventListener(b,h):(w=n.value)==null||w.element.removeEventListener(b,h)})}return g({ps:n}),(m,Z)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"default")]),_:3},512))}}),jEg=["data-testid"],m9=l.defineComponent({__name:"Scrollbar",props:{options:{},tag:{},class:{},style:{},thrumbStyle:{},railStyle:{},dataTestid:{default:"ScrollBar"}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:g,emit:I}){const C=e,t=l.ref(null),i=I,n=d=>{i("scroll",d)},A={attributes:!0,attributeFilter:["style"]},s=(d,m)=>Z=>{for(const b of Z)b.type==="attributes"&&b.attributeName==="style"&&d.style.right!==m&&(d.style.right=m)},o=()=>{var w,W,B,Y,y,X,V,S,f,K,x,L,O,Ig,q,J,_,ug,ag,bg,Vg,yg,Bg,Fg;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),m=t.value.querySelector(".ps__thumb-x"),Z=t.value.querySelector(".ps__rail-y"),b=t.value.querySelector(".ps__rail-x");d.style.background=((W=(w=C.thrumbStyle)==null?void 0:w.y)==null?void 0:W.background)||"var(--text-brand)",d.style.width=((Y=(B=C.thrumbStyle)==null?void 0:B.y)==null?void 0:Y.width)||"6px",d.style.right="0px",m.style.background=((X=(y=C.thrumbStyle)==null?void 0:y.x)==null?void 0:X.background)||"var(--text-brand)",m.style.width=((S=(V=C.thrumbStyle)==null?void 0:V.x)==null?void 0:S.width)||"6px",m.style.right="0px",Z.style.background=((K=(f=C.railStyle)==null?void 0:f.y)==null?void 0:K.background)||"var(--button-neutral-color)",Z.style.width=((L=(x=C.thrumbStyle)==null?void 0:x.y)==null?void 0:L.width)||"6px",Z.style.right=((Ig=(O=C.railStyle)==null?void 0:O.y)==null?void 0:Ig.right)||"0px",b.style.background=((J=(q=C.railStyle)==null?void 0:q.x)==null?void 0:J.background)||"var(--button-neutral-color)",b.style.width=((ug=(_=C.thrumbStyle)==null?void 0:_.x)==null?void 0:ug.width)||"6px",b.style.right=((bg=(ag=C.railStyle)==null?void 0:ag.x)==null?void 0:bg.right)||"0px";const h=new MutationObserver(s(Z,((yg=(Vg=C.railStyle)==null?void 0:Vg.y)==null?void 0:yg.right)||"0px")),G=new MutationObserver(s(b,((Fg=(Bg=C.railStyle)==null?void 0:Bg.x)==null?void 0:Fg.right)||"0px"));h.observe(Z,A),G.observe(b,A)};return l.watch(()=>C,()=>{o()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),l.onMounted(()=>{o()}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":C.dataTestid},[l.createVNode(l.unref(vEg),{onScroll:n,options:C.options,tag:C.tag,class:l.normalizeClass(C.class),style:l.normalizeStyle(C.style),"data-testid":`${C.dataTestid}-Scroll`,ref_key:"scrollbar",ref:t},{default:l.withCtx(()=>[l.renderSlot(d.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,jEg))}});var Cp=(e=>(e.small="small",e.medium="medium",e.big="big",e))(Cp||{}),tp=(e=>(e.circled="circled",e.rounded="rounded",e))(tp||{}),jK=(e=>(e.blue="blue",e.red="red",e))(jK||{});const QEg=["data-testid","checked","disabled"],OEg=l.defineComponent({__name:"Checkbox",props:{size:{default:Cp.medium},circular:{default:tp.rounded},color:{default:jK.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({isChecked:I.modelValue});l.watchEffect(()=>{t.isChecked=I.modelValue});const i=()=>{t.isChecked=!t.isChecked,C("change",t.isChecked),C("update:modelValue",t.isChecked)};return(n,A)=>(l.openBlock(),l.createElementBlock("label",{class:l.normalizeClass(`label-checkbox checkbox-yui-kit_${I.size} checkbox-yui-kit_${I.circular} checkbox-yui-kit_${I.color}`)},[l.createElementVNode("input",{type:"checkbox",class:l.normalizeClass("checkbox-yui-kit "),"data-testid":`${I.dataTestid}`,tabindex:"0",onChange:i,checked:t.isChecked,disabled:I.disabled,onKeyup:l.withKeys(i,["enter"])},null,40,QEg),l.createVNode(Xg,{class:"checkbox__icon",name:l.unref(cg).checked},null,8,["name"])],2))}}),r9=Tg(OEg,[["__scopeId","data-v-ab59c827"]]);var he=(e=>(e.profile="profile",e.theme="theme",e.options="options",e.exit="exit",e.qrAuth="qr-auth",e.downloadChat="download-chat",e.help="help",e))(he||{});const UEg=["data-testid"],EEg=["src","alt"],PEg={key:1,class:"avatar-yui-kit__fallback"},_Eg=["src"],qEg={key:1,class:"avatar-yui-kit__text"},Z9=new Set,u9=new Set,lh=Tg(l.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},isOnline:{type:Boolean},dataTestid:{}},setup(e){const g=e,I=l.ref(null),C=l.ref(!1),t=l.ref(!1),i=l.computed(()=>g.initials?g.initials.charAt(0).toUpperCase():""),n=["var(--error-color)","var(--orange4)","var(--green2)","var(--blue24)","var(--blue22)","var(--blue4)","var(--violet2)","var(--pink-color)"],A=l.computed(()=>{if(g.defaultImage||g.url)return"transparent";if(!i.value)return n[0];const d=i.value.charCodeAt(0);return n[d%n.length]}),s=l.computed(()=>!g.url||!C.value||t.value),o=()=>{g.url&&(Z9.add(g.url),u9.delete(g.url)),C.value=!0,t.value=!1},a=()=>{g.url&&(u9.add(g.url),Z9.delete(g.url)),t.value=!0,C.value=!1};return l.watch(()=>g.url,async d=>{var m;if(C.value=!1,t.value=!1,!!d){if(Z9.has(d)){C.value=!0;return}if(u9.has(d)){t.value=!0;return}await l.nextTick(),(m=I.value)!=null&&m.complete&&I.value.naturalWidth>0&&(C.value=!0)}},{immediate:!0}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":g.dataTestid,class:l.normalizeClass(["avatar-yui-kit",{"is-online":g.isOnline}]),style:l.normalizeStyle({backgroundColor:A.value})},[g.url?(l.openBlock(),l.createElementBlock("img",{key:0,ref_key:"imageRef",ref:I,src:g.url,alt:g.alt,class:l.normalizeClass(["avatar-yui-kit__image",{"is-visible":C.value}]),onLoad:o,onError:a},null,42,EEg)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock("div",PEg,[g.defaultImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:g.defaultImage,class:"avatar-yui-kit__image avatar-yui-kit__image--default is-visible"},null,8,_Eg)):(l.openBlock(),l.createElementBlock("div",qEg,l.toDisplayString(i.value),1))])):l.createCommentVNode("",!0)],14,UEg))}}),[["__scopeId","data-v-2d7459af"]]),$Eg=["data-testid"],gPg={class:"list-yui-kit__item-text"},IPg=Tg(l.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(e,{emit:g}){const I=g,C=()=>{e.disabled||I("click",e.menuType)};return(t,i)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":e.disabled,"list-yui-kit__item--active":e.active}]),onClick:C,"data-testid":e.dataTestid},[l.createVNode(Xg,{name:e.iconName},null,8,["name"]),l.createElementVNode("span",gPg,l.toDisplayString(e.text),1),l.renderSlot(t.$slots,"default",{},void 0,!0)],10,$Eg))}}),[["__scopeId","data-v-41917df3"]]),ePg={class:"menu-yui-kit__list"},CPg={class:"list-yui-kit"},tPg=Tg(l.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean,default:!1},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(e,{emit:g}){const I=e,C=g,t=l.ref(null),i=l.ref(I.isBlackTheme);l.watch(()=>I.menuOpen,m=>{m||(t.value=null)});const n=m=>{if(m===he.qrAuth){C("unmount-qr-auth");return}C("click",m),m===he.theme&&(i.value=!i.value,C("theme-change"))},A=m=>{C("languageSwitch",m)},s=()=>{C("theme-change")},o=m=>({[he.profile]:"Profile",[he.qrAuth]:"Auth with QR",[he.downloadChat]:"Auth with QR",[he.theme]:"Theme",[he.options]:"Settings",[he.exit]:"Log Out",[he.help]:"Help"})[m]??"",a=m=>({[he.profile]:cg.profile,[he.qrAuth]:cg.qrCode,[he.downloadChat]:cg.download,[he.theme]:cg.darkThemeSwitcher,[he.options]:cg.settings,[he.exit]:cg.logout,[he.help]:cg.help})[m]??cg.profile,d=m=>({[he.profile]:"Profile",[he.qrAuth]:"QR",[he.downloadChat]:"Chat",[he.theme]:"Theme",[he.options]:"Settings",[he.exit]:"Exit",[he.help]:"Help"})[m]??m;return(m,Z)=>{var b,h,G;return l.openBlock(),l.createElementBlock("div",ePg,[l.createElementVNode("ul",CPg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.categories,w=>{var W;return l.openBlock(),l.createBlock(IPg,{key:w,"data-testid":`${I.dataTestid}-${d(w)}-Item`,iconName:a(w),text:((W=I.texts)==null?void 0:W[w])??o(w),menuType:w,active:t.value===w,onClick:()=>n(w)},{default:l.withCtx(()=>[w===l.unref(he).theme?(l.openBlock(),l.createBlock(q1,{key:0,modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=B=>i.value=B),disabled:"",onChange:s},null,8,["modelValue"])):l.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","active","onClick"])}),128))]),(b=I.languages)!=null&&b.items?(l.openBlock(),l.createBlock(pW,{key:0,items:(h=I.languages)==null?void 0:h.items,theme:"contrast","default-value":(G=I.languages)==null?void 0:G.defaultValue,onChange:A,"data-testid":`${I.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c94f4f0a"]]),iPg=["data-testid"],nPg={class:"menu-yui-kit__wrapper"},APg={class:"menu-yui-kit__names"},lPg={class:"menu-yui-kit__name"},sPg={class:"menu-yui-kit__role"},oPg={key:0,class:"menu-yui-kit__dropdown"},b9=Tg(l.defineComponent({__name:"UserMenu",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenu"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(e,{emit:g}){const I=e,C=l.reactive({isShow:!1,isBlackTheme:I.isBlackTheme??!1}),t=g,i=l.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":C.isShow}));function n(Z){t("click",Z),Z!==he.theme&&I.closeAfterClick&&(C.isShow=!1)}const A=l.computed(()=>C.isShow?cg.chevronUp:cg.chevronDown),s=()=>{C.isShow=!C.isShow},o=()=>{C.isShow=!1};function a(){C.isBlackTheme=!C.isBlackTheme,t("theme-change",C.isBlackTheme)}const d=Z=>{I.closeAfterClick&&(C.isShow=!1),t("languageSwitch",Z)},m=()=>{I.closeAfterClick&&(C.isShow=!1),t("unmount-qr-auth")};return(Z,b)=>{var h,G,w;return l.openBlock(),l.createElementBlock("div",{class:"menu-yui-kit","data-testid":I.dataTestid},[l.withDirectives((l.openBlock(),l.createElementBlock("div",nPg,[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:s},[l.createVNode(lh,{class:"menu-yui-kit__avatar",url:(h=I.user)==null?void 0:h.avatar,alt:"user-avatar","data-testid":`${I.dataTestid}-Avatar`},null,8,["url","data-testid"]),l.createElementVNode("div",APg,[l.createElementVNode("p",lPg,l.toDisplayString((G=I.user)==null?void 0:G.name),1),l.createElementVNode("p",sPg,l.toDisplayString((w=I.user)==null?void 0:w.role),1)]),l.createVNode(oI,{type:l.unref(tI).ghost,class:"menu-yui-kit__button","data-testid":`${I.dataTestid}-Toggle`},{default:l.withCtx(()=>[l.createVNode(Xg,{class:"menu-yui-kit__button-icon",name:A.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2),C.isShow?(l.openBlock(),l.createElementBlock("div",oPg,[l.createVNode(tPg,{"data-testid":`${I.dataTestid}-List`,"is-black-theme":C.isBlackTheme,"menu-open":C.isShow,languages:I.languages,categories:I.categories,texts:I.texts,onClick:n,onThemeChange:a,onLanguageSwitch:d,onUnmountQrAuth:m},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])])):l.createCommentVNode("",!0)])),[[l.unref(zs),o,void 0,{bubble:!0}]])],8,iPg)}}}),[["__scopeId","data-v-03bcfc9d"]]);var ip=(e=>(e.default="default",e.minor="minor",e))(ip||{});const aPg=["data-testid"],dPg=["data-testid"],cPg=["data-testid"],mPg=["data-testid","placeholder","required","maxlength","readonly"],rPg=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:ip.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({isPressed:!1,inputElement:I.modelValue}),i=l.computed(()=>[{pressed:t.isPressed,readonly:I.readonly,[I.type]:!0}]),n=()=>{C("update:modelValue",t.inputElement)},A=()=>{I.readonly||(t.isPressed=!0)},s=()=>{t.isPressed=!1};return l.watch(()=>I.modelValue,o=>{t.inputElement=o}),(o,a)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",i.value]),onFocusout:s,"data-testid":I.dataTestid},[I.inputMessage?(l.openBlock(),l.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${I.dataTestid}-Legend`},[l.createTextVNode(l.toDisplayString(I.inputMessage)+" ",1),I.required?(l.openBlock(),l.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${I.dataTestid}-Legend-Star`},"*",8,cPg)):l.createCommentVNode("",!0)],8,dPg)):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=d=>t.inputElement=d),onFocus:A,onInput:n,"data-testid":`${I.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:I.placeholder,required:I.required,maxlength:I.maxlength,readonly:I.readonly},null,40,mPg),[[l.vModelText,t.inputElement]])],42,aPg))}}),h9=Tg(rPg,[["__scopeId","data-v-0fe11b1b"]]);var G9=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(G9||{});const ZPg=["data-testid"],uPg=["data-testid"],bPg=["src","alt","data-testid"],hPg=["src","data-testid"],GPg=["data-testid"],wPg=["data-testid"],WPg=["data-testid"],w9=Tg(l.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(e){const g=e,I=l.reactive({isLoad:!1,isError:!1}),C=l.computed(()=>I.isError?!1:!g.url||!g.type||g.type==G9.img?!0:uZ(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},n=()=>{I.isLoad=!1,I.isError=!1};return l.watch(()=>g.url,()=>{n()}),(A,s)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==l.unref(G9).img?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${g.dataTestid}-Picture`},[!I.isError&&g.url?(l.openBlock(),l.createElementBlock("img",{key:0,class:"picture-yui-kit__picture_image",src:g.url,alt:g.alt,"data-testid":`${g.dataTestid}-Picture-Img`,onLoad:t,onError:i},null,40,bPg)):(l.openBlock(),l.createElementBlock("img",{key:1,src:l.unref(vs),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,hPg))],8,uPg),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},l.toDisplayString(g.caption),9,GPg)],64)):l.unref(uZ)(g.url)?(l.openBlock(),l.createBlock(Es,{key:1,class:"picture-yui-kit__picture_image",src:g.url,page:1,dataTestid:`${g.dataTestid}-PdfPreview`,onLoad:t},null,8,["src","dataTestid"])):(l.openBlock(),l.createElementBlock("div",{key:2,class:"picture-yui-kit__caption","data-testid":`${g.dataTestid}-Caption-Box`},[l.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${g.dataTestid}-Caption-Title`},l.toDisplayString(g.caption),9,WPg)],8,wPg)),!I.isLoad&&C.value?(l.openBlock(),l.createBlock(th,{key:3,class:"picture-yui-kit__loader"})):l.createCommentVNode("",!0)],8,ZPg))}}),[["__scopeId","data-v-bfca9915"]]);var np=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(np||{}),QK=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(QK||{}),OK=(e=>(e[e.success=cg.checkbox]="success",e[e.warning=cg.alertTriangle]="warning",e[e.error=cg.exitCircle]="error",e[e.info=cg.info]="info",e))(OK||{});const pPg=["id","data-testid"],BPg=["data-testid"],YPg=["data-testid"],yPg=["data-testid"],NPg=["data-testid"],VPg=l.defineComponent({__name:"Notification",props:{type:{default:np.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(e,{expose:g,emit:I}){const C=e,t=I,i=l.ref(null);Gg(i,"toggle",()=>{C.timeout>0&&setTimeout(()=>{var o;return(o=i.value)==null?void 0:o.hidePopover()},C.timeout*1e3)});const n=()=>(t("close"),"hide"),A=()=>{var o;(o=i.value)==null||o.showPopover()},s=l.reactive({message:{icon:OK[C.type],title:C.title||QK[C.type],description:C.description}});return l.onMounted(()=>{var o;C.showPopover&&((o=i.value)==null||o.showPopover())}),g({showPopover:A}),(o,a)=>(l.openBlock(),l.createElementBlock("div",{popover:"manual",id:C.pushKey.toString(),class:l.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${C.type}`),"data-testid":C.dataTestid,ref_key:"popover",ref:i},[l.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${C.dataTestid}-Notification`},[l.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${C.dataTestid}-Notification-Block`},[l.createVNode(Xg,{name:s.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),l.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${C.dataTestid}-Notification-Title`},l.toDisplayString(s.message.title),9,yPg),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${C.dataTestid}-Notification-Description`},l.toDisplayString(s.message.description),9,NPg)],8,YPg),l.createVNode(oI,{class:"notification-yui-kit__exit",type:l.unref(tI).ghost,popovertarget:C.pushKey.toString(),popovertargetaction:n,"data-testid":`${C.dataTestid}-Notification-Button`},{default:l.withCtx(()=>[l.createVNode(Xg,{name:l.unref(cg).crossSmall,"data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,BPg)],10,pPg))}}),W9=Tg(VPg,[["__scopeId","data-v-053cfa20"]]),p9=l.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(e){const g=e,I=()=>{const C=g.content,t=document.createElement("textarea");t.value=C;const i=document.querySelectorAll("dialog[open]"),n=i.length?i[i.length-1]:null;n?n.append(t):document.body.append(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()};return(C,t)=>(l.openBlock(),l.createBlock(Xg,{class:"copy-icon-yui-kit",name:l.unref(cg).copy,"data-testid":g.dataTestid,onClick:I},null,8,["name","data-testid"]))}}),XPg=["data-testid"],RPg=["data-testid"],MPg=["data-testid"],HPg=["data-testid"],fPg=["data-testid"],SPg=["data-testid"],DPg=["data-testid"],kPg=["data-testid"],FPg=["data-testid"],KPg=["data-testid"],zPg=["data-testid"],JPg=["data-testid"],xPg=["data-testid"],TPg=["data-testid"],LPg=l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:cg.filter},options:{default:()=>[]},defaultValue:{default:"Все"},selectedValues:{default:()=>[]},multiply:{type:Boolean,default:!0},maxShowCount:{default:5},showClearButton:{type:Boolean,default:!1},disallowNull:{type:Boolean,default:!1},dataTestid:{default:"FilterTag"}},emits:["change"],setup(e,{emit:g}){const I=e,C=l.reactive({isShow:!1,options:[]}),t=g,i=l.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":C.isShow})),n=()=>C.isShow=!C.isShow,A=()=>{C.isShow=!1},s=l.computed(()=>C.options.filter(Z=>Z.chose)),o=l.computed(()=>C.options.filter(Z=>!Z.chose)),a=Z=>{I.disallowNull&&Z.chose||(Z.chose=!Z.chose,I.multiply||(C.options=C.options.map(b=>({...b,chose:Z.value===b.value&&Z.chose}))),C.options.every(b=>b.chose)&&(C.options=C.options.map(b=>({...b,chose:!1}))),t("change",s.value.map(b=>b.value)),C.isShow=!1)},d=()=>{C.options=C.options.map(Z=>({...Z,chose:!1})),C.isShow=!1,t("change",[])},m=()=>{C.options=I.options.map(Z=>({...Z,chose:I.selectedValues.includes(Z.value)})),C.options.every(Z=>Z.chose)&&(C.options=C.options.map(Z=>({...Z,chose:!1})))};return l.watch(()=>[I.options,I.selectedValues],m),l.watch(()=>I.selectedValues,m),l.onMounted(m),(Z,b)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"filter-yui-kit","data-testid":I.dataTestid},[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:n,"data-testid":`${I.dataTestid}-Wrapper`},[I.iconName?(l.openBlock(),l.createBlock(Xg,{key:0,name:I.iconName,"data-testid":`${I.dataTestid}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),I.title?(l.openBlock(),l.createElementBlock("span",{key:1,"data-testid":`${I.dataTestid}-Title`},l.toDisplayString(I.title),9,MPg)):l.createCommentVNode("",!0),!s.value.length&&!I.disallowNull?(l.openBlock(),l.createBlock(dt,{key:2,disabled:"",text:I.defaultValue,"data-testid":`${I.dataTestid}-Badges-All`},null,8,["text","data-testid"])):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:3},l.renderList(s.value.filter((h,G)=>G<I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(dt,{key:h.value,type:h.type,disabled:"","data-testid":`${I.dataTestid}-Badges${G}`,text:h.label},null,8,["type","data-testid","text"]))),128)),I.maxShowCount<s.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(s.value.length-I.maxShowCount)+" ",1),l.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${I.dataTestid}-MaxShowCount-Content`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.filter((h,G)=>G>=I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(dt,{key:h.value,type:h.type,disabled:"",text:h.label,"data-testid":`${I.dataTestid}-MaxShow-Badges${G}`},null,8,["type","text","data-testid"]))),128))],8,fPg)],8,HPg)):l.createCommentVNode("",!0),I.showClearButton&&s.value.length>0?(l.openBlock(),l.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:l.withModifiers(d,["stop"]),"data-testid":`${I.dataTestid}-Filter-CloseButton`},[l.createVNode(Xg,{name:l.unref(cg).crossSmall,"data-testid":`${I.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,SPg)):l.createCommentVNode("",!0)],10,RPg),C.isShow?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${I.dataTestid}-Select-Wrapper`},[l.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${I.dataTestid}-Select-List`},[s.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[l.createVNode(dt,{disabled:"",text:I.defaultValue,"data-testid":`${I.dataTestid}-Select-Badges`},null,8,["text","data-testid"])],8,FPg)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-Item${G}`},[l.createVNode(dt,{disabled:!0,choosed:!I.disallowNull&&h.chose,type:h.type,onClick:w=>a(h),text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`},null,8,["choosed","type","onClick","text","data-testid"])],8,KPg))),128))],8,kPg),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,zPg),C.isShow?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${I.dataTestid}-Select-List`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-List${G}`},[l.createVNode(dt,{disabled:!0,choosed:!1,type:h.type,text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`,onClick:w=>a(h)},null,8,["type","text","data-testid","onClick"])],8,xPg))),128)),e.disallowNull?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[s.value.length?(l.openBlock(),l.createBlock(dt,{key:0,disabled:"","data-testid":`${I.dataTestid}-Select-Badges`,text:I.defaultValue,onClick:d},null,8,["data-testid","text"])):l.createCommentVNode("",!0)],8,TPg))],8,JPg)):l.createCommentVNode("",!0)],8,DPg)):l.createCommentVNode("",!0)],8,XPg)),[[l.unref(zs),A,void 0,{bubble:!0}]])}}),B9=Tg(LPg,[["__scopeId","data-v-364736f4"]]),vPg=["data-testid"],jPg=["data-testid"],QPg=["data-testid"],OPg=["data-testid"],Y9=Tg(l.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(e){const g=e,I=()=>{const C=Math.min(Math.max(g.percent,0),100),t=C/100*360;if(C<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${t-90}deg)) 0,calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(C<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${t-90}deg)), calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(C<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
|
|
1684
|
+
*/function _l(e){return getComputedStyle(e)}function Ei(e,g){for(var I in g){var C=g[I];typeof C=="number"&&(C=C+"px"),e.style[I]=C}return e}function $1(e){var g=document.createElement("div");return g.className=e,g}var FK=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Sa(e,g){if(!FK)throw new Error("No element matching method supported");return FK.call(e,g)}function pZ(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function KK(e,g){return Array.prototype.filter.call(e.children,function(I){return Sa(I,g)})}var fC={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},zK={x:null,y:null};function JK(e,g){var I=e.element.classList,C=fC.state.scrolling(g);I.contains(C)?clearTimeout(zK[g]):I.add(C)}function xK(e,g){zK[g]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(fC.state.scrolling(g))},e.settings.scrollingThreshold)}function HEg(e,g){JK(e,g),xK(e,g)}var nh=function(g){this.element=g,this.handlers={}},TK={isEmpty:{configurable:!0}};nh.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},nh.prototype.unbind=function(g,I){var C=this;this.handlers[g]=this.handlers[g].filter(function(t){return I&&t!==I?!0:(C.element.removeEventListener(g,t,!1),!1)})},nh.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},TK.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(g){return e.handlers[g].length===0})},Object.defineProperties(nh.prototype,TK);var BZ=function(){this.eventElements=[]};BZ.prototype.eventElement=function(g){var I=this.eventElements.filter(function(C){return C.element===g})[0];return I||(I=new nh(g),this.eventElements.push(I)),I},BZ.prototype.bind=function(g,I,C){this.eventElement(g).bind(I,C)},BZ.prototype.unbind=function(g,I,C){var t=this.eventElement(g);t.unbind(I,C),t.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(t),1)},BZ.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},BZ.prototype.once=function(g,I,C){var t=this.eventElement(g),i=function(n){t.unbind(I,i),C(n)};t.bind(I,i)};function gp(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);var g=document.createEvent("CustomEvent");return g.initCustomEvent(e,!1,!1,void 0),g}function Ip(e,g,I,C,t){C===void 0&&(C=!0),t===void 0&&(t=!1);var i;if(g==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(g==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");fEg(e,I,i,C,t)}function fEg(e,g,I,C,t){var i=I[0],n=I[1],A=I[2],s=I[3],o=I[4],a=I[5];C===void 0&&(C=!0),t===void 0&&(t=!1);var d=e.element;e.reach[s]=null,d[A]<1&&(e.reach[s]="start"),d[A]>e[i]-e[n]-1&&(e.reach[s]="end"),g&&(d.dispatchEvent(gp("ps-scroll-"+s)),g<0?d.dispatchEvent(gp("ps-scroll-"+o)):g>0&&d.dispatchEvent(gp("ps-scroll-"+a)),C&&HEg(e,s)),e.reach[s]&&(g||t)&&d.dispatchEvent(gp("ps-"+s+"-reach-"+e.reach[s]))}function Pe(e){return parseInt(e,10)||0}function SEg(e){return Sa(e,"input,[contenteditable]")||Sa(e,"select,[contenteditable]")||Sa(e,"textarea,[contenteditable]")||Sa(e,"button,[contenteditable]")}function DEg(e){var g=_l(e);return Pe(g.width)+Pe(g.paddingLeft)+Pe(g.paddingRight)+Pe(g.borderLeftWidth)+Pe(g.borderRightWidth)}var YZ={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function Ps(e){var g=e.element,I=Math.floor(g.scrollTop),C=g.getBoundingClientRect();e.containerWidth=Math.floor(C.width),e.containerHeight=Math.floor(C.height),e.contentWidth=g.scrollWidth,e.contentHeight=g.scrollHeight,g.contains(e.scrollbarXRail)||(KK(g,fC.element.rail("x")).forEach(function(t){return pZ(t)}),g.appendChild(e.scrollbarXRail)),g.contains(e.scrollbarYRail)||(KK(g,fC.element.rail("y")).forEach(function(t){return pZ(t)}),g.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=LK(e,Pe(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Pe((e.negativeScrollAdjustment+g.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=LK(e,Pe(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=Pe(I*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),kEg(g,e),e.scrollbarXActive?g.classList.add(fC.state.active("x")):(g.classList.remove(fC.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,g.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?g.classList.add(fC.state.active("y")):(g.classList.remove(fC.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,g.scrollTop=0)}function LK(e,g){return e.settings.minScrollbarLength&&(g=Math.max(g,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(g=Math.min(g,e.settings.maxScrollbarLength)),g}function kEg(e,g){var I={width:g.railXWidth},C=Math.floor(e.scrollTop);g.isRtl?I.left=g.negativeScrollAdjustment+e.scrollLeft+g.containerWidth-g.contentWidth:I.left=e.scrollLeft,g.isScrollbarXUsingBottom?I.bottom=g.scrollbarXBottom-C:I.top=g.scrollbarXTop+C,Ei(g.scrollbarXRail,I);var t={top:C,height:g.railYHeight};g.isScrollbarYUsingRight?g.isRtl?t.right=g.contentWidth-(g.negativeScrollAdjustment+e.scrollLeft)-g.scrollbarYRight-g.scrollbarYOuterWidth-9:t.right=g.scrollbarYRight-e.scrollLeft:g.isRtl?t.left=g.negativeScrollAdjustment+e.scrollLeft+g.containerWidth*2-g.contentWidth-g.scrollbarYLeft-g.scrollbarYOuterWidth:t.left=g.scrollbarYLeft+e.scrollLeft,Ei(g.scrollbarYRail,t),Ei(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),Ei(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function FEg(e){e.event.bind(e.scrollbarY,"mousedown",function(g){return g.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(g){var I=g.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,C=I>e.scrollbarYTop?1:-1;e.element.scrollTop+=C*e.containerHeight,Ps(e),g.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(g){return g.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(g){var I=g.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left,C=I>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=C*e.containerWidth,Ps(e),g.stopPropagation()})}var ep=null;function KEg(e){vK(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),vK(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function vK(e,g){var I=g[0],C=g[1],t=g[2],i=g[3],n=g[4],A=g[5],s=g[6],o=g[7],a=g[8],d=e.element,m=null,Z=null,b=null;function h(W){W.touches&&W.touches[0]&&(W[t]=W.touches[0]["page"+o.toUpperCase()]),ep===n&&(d[s]=m+b*(W[t]-Z),JK(e,o),Ps(e),W.stopPropagation(),W.preventDefault())}function G(){xK(e,o),e[a].classList.remove(fC.state.clicking),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",h),document.removeEventListener("touchend",G),ep=null}function w(W){ep===null&&(ep=n,m=d[s],W.touches&&(W[t]=W.touches[0]["page"+o.toUpperCase()]),Z=W[t],b=(e[C]-e[I])/(e[i]-e[A]),W.touches?(document.addEventListener("touchmove",h,{passive:!1}),document.addEventListener("touchend",G)):(document.addEventListener("mousemove",h),document.addEventListener("mouseup",G)),e[a].classList.add(fC.state.clicking)),W.stopPropagation(),W.cancelable&&W.preventDefault()}e[n].addEventListener("mousedown",w),e[n].addEventListener("touchstart",w)}function zEg(e){var g=e.element,I=function(){return Sa(g,":hover")},C=function(){return Sa(e.scrollbarX,":focus")||Sa(e.scrollbarY,":focus")};function t(i,n){var A=Math.floor(g.scrollTop);if(i===0){if(!e.scrollbarYActive)return!1;if(A===0&&n>0||A>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}var s=g.scrollLeft;if(n===0){if(!e.scrollbarXActive)return!1;if(s===0&&i<0||s>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}e.event.bind(e.ownerDocument,"keydown",function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&!(!I()&&!C())){var n=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(n){if(n.tagName==="IFRAME")n=n.contentDocument.activeElement;else for(;n.shadowRoot;)n=n.shadowRoot.activeElement;if(SEg(n))return}var A=0,s=0;switch(i.which){case 37:i.metaKey?A=-e.contentWidth:i.altKey?A=-e.containerWidth:A=-30;break;case 38:i.metaKey?s=e.contentHeight:i.altKey?s=e.containerHeight:s=30;break;case 39:i.metaKey?A=e.contentWidth:i.altKey?A=e.containerWidth:A=30;break;case 40:i.metaKey?s=-e.contentHeight:i.altKey?s=-e.containerHeight:s=-30;break;case 32:i.shiftKey?s=e.containerHeight:s=-e.containerHeight;break;case 33:s=e.containerHeight;break;case 34:s=-e.containerHeight;break;case 36:s=e.contentHeight;break;case 35:s=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&A!==0||e.settings.suppressScrollY&&s!==0||(g.scrollTop-=s,g.scrollLeft+=A,Ps(e),t(A,s)&&i.preventDefault())}})}function JEg(e){var g=e.element;function I(n,A){var s=Math.floor(g.scrollTop),o=g.scrollTop===0,a=s+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,m=g.scrollLeft+g.offsetWidth===g.scrollWidth,Z;return Math.abs(A)>Math.abs(n)?Z=o||a:Z=d||m,Z?!e.settings.wheelPropagation:!0}function C(n){var A=n.deltaX,s=-1*n.deltaY;return(typeof A>"u"||typeof s>"u")&&(A=-1*n.wheelDeltaX/6,s=n.wheelDeltaY/6),n.deltaMode&&n.deltaMode===1&&(A*=10,s*=10),A!==A&&s!==s&&(A=0,s=n.wheelDelta),n.shiftKey?[-s,-A]:[A,s]}function t(n,A,s){if(!YZ.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(n))return!1;for(var o=n;o&&o!==g;){if(o.classList.contains(fC.element.consuming))return!0;var a=_l(o);if(s&&a.overflowY.match(/(scroll|auto)/)){var d=o.scrollHeight-o.clientHeight;if(d>0&&(o.scrollTop>0&&s<0||o.scrollTop<d&&s>0))return!0}if(A&&a.overflowX.match(/(scroll|auto)/)){var m=o.scrollWidth-o.clientWidth;if(m>0&&(o.scrollLeft>0&&A<0||o.scrollLeft<m&&A>0))return!0}o=o.parentNode}return!1}function i(n){var A=C(n),s=A[0],o=A[1];if(!t(n.target,s,o)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(o?g.scrollTop-=o*e.settings.wheelSpeed:g.scrollTop+=s*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?g.scrollLeft+=s*e.settings.wheelSpeed:g.scrollLeft-=o*e.settings.wheelSpeed,a=!0):(g.scrollTop-=o*e.settings.wheelSpeed,g.scrollLeft+=s*e.settings.wheelSpeed),Ps(e),a=a||I(s,o),a&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}typeof window.onwheel<"u"?e.event.bind(g,"wheel",i):typeof window.onmousewheel<"u"&&e.event.bind(g,"mousewheel",i)}function xEg(e){if(!YZ.supportsTouch&&!YZ.supportsIePointer)return;var g=e.element,I={startOffset:{},startTime:0,speed:{},easingLoop:null};function C(d,m){var Z=Math.floor(g.scrollTop),b=g.scrollLeft,h=Math.abs(d),G=Math.abs(m);if(G>h){if(m<0&&Z===e.contentHeight-e.containerHeight||m>0&&Z===0)return window.scrollY===0&&m>0&&YZ.isChrome}else if(h>G&&(d<0&&b===e.contentWidth-e.containerWidth||d>0&&b===0))return!0;return!0}function t(d,m){g.scrollTop-=m,g.scrollLeft-=d,Ps(e)}function i(d){return d.targetTouches?d.targetTouches[0]:d}function n(d){return d.target===e.scrollbarX||d.target===e.scrollbarY||d.pointerType&&d.pointerType==="pen"&&d.buttons===0?!1:!!(d.targetTouches&&d.targetTouches.length===1||d.pointerType&&d.pointerType!=="mouse"&&d.pointerType!==d.MSPOINTER_TYPE_MOUSE)}function A(d){if(n(d)){var m=i(d);I.startOffset.pageX=m.pageX,I.startOffset.pageY=m.pageY,I.startTime=new Date().getTime(),I.easingLoop!==null&&clearInterval(I.easingLoop)}}function s(d,m,Z){if(!g.contains(d))return!1;for(var b=d;b&&b!==g;){if(b.classList.contains(fC.element.consuming))return!0;var h=_l(b);if(Z&&h.overflowY.match(/(scroll|auto)/)){var G=b.scrollHeight-b.clientHeight;if(G>0&&(b.scrollTop>0&&Z<0||b.scrollTop<G&&Z>0))return!0}if(m&&h.overflowX.match(/(scroll|auto)/)){var w=b.scrollWidth-b.clientWidth;if(w>0&&(b.scrollLeft>0&&m<0||b.scrollLeft<w&&m>0))return!0}b=b.parentNode}return!1}function o(d){if(n(d)){var m=i(d),Z={pageX:m.pageX,pageY:m.pageY},b=Z.pageX-I.startOffset.pageX,h=Z.pageY-I.startOffset.pageY;if(s(d.target,b,h))return;t(b,h),I.startOffset=Z;var G=new Date().getTime(),w=G-I.startTime;w>0&&(I.speed.x=b/w,I.speed.y=h/w,I.startTime=G),C(b,h)&&d.cancelable&&d.preventDefault()}}function a(){e.settings.swipeEasing&&(clearInterval(I.easingLoop),I.easingLoop=setInterval(function(){if(e.isInitialized){clearInterval(I.easingLoop);return}if(!I.speed.x&&!I.speed.y){clearInterval(I.easingLoop);return}if(Math.abs(I.speed.x)<.01&&Math.abs(I.speed.y)<.01){clearInterval(I.easingLoop);return}t(I.speed.x*30,I.speed.y*30),I.speed.x*=.8,I.speed.y*=.8},10))}YZ.supportsTouch?(e.event.bind(g,"touchstart",A),e.event.bind(g,"touchmove",o),e.event.bind(g,"touchend",a)):YZ.supportsIePointer&&(window.PointerEvent?(e.event.bind(g,"pointerdown",A),e.event.bind(g,"pointermove",o),e.event.bind(g,"pointerup",a)):window.MSPointerEvent&&(e.event.bind(g,"MSPointerDown",A),e.event.bind(g,"MSPointerMove",o),e.event.bind(g,"MSPointerUp",a)))}var TEg=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},LEg={"click-rail":FEg,"drag-thumb":KEg,keyboard:zEg,wheel:JEg,touch:xEg},Ah=function(g,I){var C=this;if(I===void 0&&(I={}),typeof g=="string"&&(g=document.querySelector(g)),!g||!g.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=g,g.classList.add(fC.main),this.settings=TEg();for(var t in I)this.settings[t]=I[t];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var i=function(){return g.classList.add(fC.state.focus)},n=function(){return g.classList.remove(fC.state.focus)};this.isRtl=_l(g).direction==="rtl",this.isRtl===!0&&g.classList.add(fC.rtl),this.isNegativeScroll=function(){var o=g.scrollLeft,a=null;return g.scrollLeft=-1,a=g.scrollLeft<0,g.scrollLeft=o,a}(),this.negativeScrollAdjustment=this.isNegativeScroll?g.scrollWidth-g.clientWidth:0,this.event=new BZ,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=$1(fC.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=$1(fC.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",n),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var A=_l(this.scrollbarXRail);this.scrollbarXBottom=parseInt(A.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Pe(A.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Pe(A.borderLeftWidth)+Pe(A.borderRightWidth),Ei(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Pe(A.marginLeft)+Pe(A.marginRight),Ei(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=$1(fC.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=$1(fC.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",n),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var s=_l(this.scrollbarYRail);this.scrollbarYRight=parseInt(s.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Pe(s.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?DEg(this.scrollbarY):null,this.railBorderYWidth=Pe(s.borderTopWidth)+Pe(s.borderBottomWidth),Ei(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Pe(s.marginTop)+Pe(s.marginBottom),Ei(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:g.scrollLeft<=0?"start":g.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:g.scrollTop<=0?"start":g.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(o){return LEg[o](C)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(o){return C.onScroll(o)}),Ps(this)};Ah.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Ei(this.scrollbarXRail,{display:"block"}),Ei(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Pe(_l(this.scrollbarXRail).marginLeft)+Pe(_l(this.scrollbarXRail).marginRight),this.railYMarginHeight=Pe(_l(this.scrollbarYRail).marginTop)+Pe(_l(this.scrollbarYRail).marginBottom),Ei(this.scrollbarXRail,{display:"none"}),Ei(this.scrollbarYRail,{display:"none"}),Ps(this),Ip(this,"top",0,!1,!0),Ip(this,"left",0,!1,!0),Ei(this.scrollbarXRail,{display:""}),Ei(this.scrollbarYRail,{display:""}))},Ah.prototype.onScroll=function(g){this.isAlive&&(Ps(this),Ip(this,"top",this.element.scrollTop-this.lastScrollTop),Ip(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Ah.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),pZ(this.scrollbarX),pZ(this.scrollbarY),pZ(this.scrollbarXRail),pZ(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Ah.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const vEg=l.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:g,emit:I}){const C=e,t=I,i=l.ref(null),n=l.ref(null);l.watch(()=>C.options,()=>{s(),A()},{deep:!0}),l.onMounted(()=>{i.value&&A()}),l.onBeforeUnmount(()=>{s()});function A(){i.value&&(n.value=new Ah(i.value,C.options),d())}function s(){n.value&&(d(!1),n.value.destroy(),n.value=null)}const o={scroll:a("scroll"),"ps-scroll-y":a("ps-scroll-y"),"ps-scroll-x":a("ps-scroll-x"),"ps-scroll-up":a("ps-scroll-up"),"ps-scroll-down":a("ps-scroll-down"),"ps-scroll-left":a("ps-scroll-left"),"ps-scroll-right":a("ps-scroll-right"),"ps-y-reach-start":a("ps-y-reach-start"),"ps-y-reach-end":a("ps-y-reach-end"),"ps-x-reach-start":a("ps-x-reach-start"),"ps-x-reach-end":a("ps-x-reach-end")};function a(m){return function(Z){t(m,Z)}}function d(m=!0){var Z;(Z=n.value)!=null&&Z.element&&Object.entries(o).forEach(([b,h])=>{var G,w;m?(G=n.value)==null||G.element.addEventListener(b,h):(w=n.value)==null||w.element.removeEventListener(b,h)})}return g({ps:n}),(m,Z)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"default")]),_:3},512))}}),jEg=["data-testid"],m9=l.defineComponent({__name:"Scrollbar",props:{options:{},tag:{},class:{},style:{},thrumbStyle:{},railStyle:{},dataTestid:{default:"ScrollBar"}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:g,emit:I}){const C=e,t=l.ref(null),i=I,n=d=>{i("scroll",d)},A={attributes:!0,attributeFilter:["style"]},s=(d,m)=>Z=>{for(const b of Z)b.type==="attributes"&&b.attributeName==="style"&&d.style.right!==m&&(d.style.right=m)},o=()=>{var w,W,B,Y,y,X,V,S,f,K,x,L,O,Ig,q,J,_,ug,ag,bg,Vg,yg,Bg,Fg;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),m=t.value.querySelector(".ps__thumb-x"),Z=t.value.querySelector(".ps__rail-y"),b=t.value.querySelector(".ps__rail-x");d.style.background=((W=(w=C.thrumbStyle)==null?void 0:w.y)==null?void 0:W.background)||"var(--text-brand)",d.style.width=((Y=(B=C.thrumbStyle)==null?void 0:B.y)==null?void 0:Y.width)||"6px",d.style.right="0px",m.style.background=((X=(y=C.thrumbStyle)==null?void 0:y.x)==null?void 0:X.background)||"var(--text-brand)",m.style.width=((S=(V=C.thrumbStyle)==null?void 0:V.x)==null?void 0:S.width)||"6px",m.style.right="0px",Z.style.background=((K=(f=C.railStyle)==null?void 0:f.y)==null?void 0:K.background)||"var(--button-neutral-color)",Z.style.width=((L=(x=C.thrumbStyle)==null?void 0:x.y)==null?void 0:L.width)||"6px",Z.style.right=((Ig=(O=C.railStyle)==null?void 0:O.y)==null?void 0:Ig.right)||"0px",b.style.background=((J=(q=C.railStyle)==null?void 0:q.x)==null?void 0:J.background)||"var(--button-neutral-color)",b.style.width=((ug=(_=C.thrumbStyle)==null?void 0:_.x)==null?void 0:ug.width)||"6px",b.style.right=((bg=(ag=C.railStyle)==null?void 0:ag.x)==null?void 0:bg.right)||"0px";const h=new MutationObserver(s(Z,((yg=(Vg=C.railStyle)==null?void 0:Vg.y)==null?void 0:yg.right)||"0px")),G=new MutationObserver(s(b,((Fg=(Bg=C.railStyle)==null?void 0:Bg.x)==null?void 0:Fg.right)||"0px"));h.observe(Z,A),G.observe(b,A)};return l.watch(()=>C,()=>{o()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),l.onMounted(()=>{o()}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":C.dataTestid},[l.createVNode(l.unref(vEg),{onScroll:n,options:C.options,tag:C.tag,class:l.normalizeClass(C.class),style:l.normalizeStyle(C.style),"data-testid":`${C.dataTestid}-Scroll`,ref_key:"scrollbar",ref:t},{default:l.withCtx(()=>[l.renderSlot(d.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,jEg))}});var Cp=(e=>(e.small="small",e.medium="medium",e.big="big",e))(Cp||{}),tp=(e=>(e.circled="circled",e.rounded="rounded",e))(tp||{}),jK=(e=>(e.blue="blue",e.red="red",e))(jK||{});const QEg=["data-testid","checked","disabled"],OEg=l.defineComponent({__name:"Checkbox",props:{size:{default:Cp.medium},circular:{default:tp.rounded},color:{default:jK.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({isChecked:I.modelValue});l.watchEffect(()=>{t.isChecked=I.modelValue});const i=()=>{t.isChecked=!t.isChecked,C("change",t.isChecked),C("update:modelValue",t.isChecked)};return(n,A)=>(l.openBlock(),l.createElementBlock("label",{class:l.normalizeClass(`label-checkbox checkbox-yui-kit_${I.size} checkbox-yui-kit_${I.circular} checkbox-yui-kit_${I.color}`)},[l.createElementVNode("input",{type:"checkbox",class:l.normalizeClass("checkbox-yui-kit "),"data-testid":`${I.dataTestid}`,tabindex:"0",onChange:i,checked:t.isChecked,disabled:I.disabled,onKeyup:l.withKeys(i,["enter"])},null,40,QEg),l.createVNode(Xg,{class:"checkbox__icon",name:l.unref(cg).checked},null,8,["name"])],2))}}),r9=Tg(OEg,[["__scopeId","data-v-ab59c827"]]);var he=(e=>(e.profile="profile",e.theme="theme",e.options="options",e.exit="exit",e.qrAuth="qr-auth",e.downloadChat="download-chat",e.help="help",e))(he||{});const UEg=["data-testid"],EEg=["src","alt"],PEg={key:1,class:"avatar-yui-kit__fallback"},_Eg=["src"],qEg={key:1,class:"avatar-yui-kit__text"},Z9=new Set,u9=new Set,lh=Tg(l.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},isOnline:{type:Boolean},dataTestid:{}},setup(e){const g=e,I=l.ref(null),C=l.ref(!1),t=l.ref(!1),i=l.computed(()=>g.initials?g.initials.charAt(0).toUpperCase():""),n=["var(--error-color)","var(--orange4)","var(--green2)","var(--blue24)","var(--blue22)","var(--blue4)","var(--violet2)","var(--pink-color)"],A=l.computed(()=>{if(g.defaultImage||g.url)return"transparent";if(!i.value)return n[0];const d=i.value.charCodeAt(0);return n[d%n.length]}),s=l.computed(()=>!g.url||!C.value||t.value),o=()=>{g.url&&(Z9.add(g.url),u9.delete(g.url)),C.value=!0,t.value=!1},a=()=>{g.url&&(u9.add(g.url),Z9.delete(g.url)),t.value=!0,C.value=!1};return l.watch(()=>g.url,async d=>{var m;if(C.value=!1,t.value=!1,!!d){if(Z9.has(d)){C.value=!0;return}if(u9.has(d)){t.value=!0;return}await l.nextTick(),(m=I.value)!=null&&m.complete&&I.value.naturalWidth>0&&(C.value=!0)}},{immediate:!0}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":g.dataTestid,class:l.normalizeClass(["avatar-yui-kit",{"is-online":g.isOnline}]),style:l.normalizeStyle({backgroundColor:A.value})},[g.url?(l.openBlock(),l.createElementBlock("img",{key:0,ref_key:"imageRef",ref:I,src:g.url,alt:g.alt,class:l.normalizeClass(["avatar-yui-kit__image",{"is-visible":C.value}]),onLoad:o,onError:a},null,42,EEg)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock("div",PEg,[g.defaultImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:g.defaultImage,class:"avatar-yui-kit__image avatar-yui-kit__image--default is-visible"},null,8,_Eg)):(l.openBlock(),l.createElementBlock("div",qEg,l.toDisplayString(i.value),1))])):l.createCommentVNode("",!0)],14,UEg))}}),[["__scopeId","data-v-2d7459af"]]),$Eg=["data-testid"],gPg={class:"list-yui-kit__item-text"},IPg=Tg(l.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(e,{emit:g}){const I=g,C=()=>{e.disabled||I("click",e.menuType)};return(t,i)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":e.disabled,"list-yui-kit__item--active":e.active}]),onClick:C,"data-testid":e.dataTestid},[l.createVNode(Xg,{name:e.iconName},null,8,["name"]),l.createElementVNode("span",gPg,l.toDisplayString(e.text),1),l.renderSlot(t.$slots,"default",{},void 0,!0)],10,$Eg))}}),[["__scopeId","data-v-41917df3"]]),ePg={class:"menu-yui-kit__list"},CPg={class:"list-yui-kit"},tPg=Tg(l.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean,default:!1},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(e,{emit:g}){const I=e,C=g,t=l.ref(null),i=l.ref(I.isBlackTheme);l.watch(()=>I.menuOpen,m=>{m||(t.value=null)});const n=m=>{if(m===he.qrAuth){C("unmount-qr-auth");return}C("click",m),m===he.theme&&(i.value=!i.value,C("theme-change"))},A=m=>{C("languageSwitch",m)},s=()=>{C("theme-change")},o=m=>({[he.profile]:"Profile",[he.qrAuth]:"Auth with QR",[he.downloadChat]:"Auth with QR",[he.theme]:"Theme",[he.options]:"Settings",[he.exit]:"Log Out",[he.help]:"Help"})[m]??"",a=m=>({[he.profile]:cg.profile,[he.qrAuth]:cg.qrCode,[he.downloadChat]:cg.download,[he.theme]:cg.darkThemeSwitcher,[he.options]:cg.settings,[he.exit]:cg.logout,[he.help]:cg.help})[m]??cg.profile,d=m=>({[he.profile]:"Profile",[he.qrAuth]:"QR",[he.downloadChat]:"Chat",[he.theme]:"Theme",[he.options]:"Settings",[he.exit]:"Exit",[he.help]:"Help"})[m]??m;return(m,Z)=>{var b,h,G;return l.openBlock(),l.createElementBlock("div",ePg,[l.createElementVNode("ul",CPg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.categories,w=>{var W;return l.openBlock(),l.createBlock(IPg,{key:w,"data-testid":`${I.dataTestid}-${d(w)}-Item`,iconName:a(w),text:((W=I.texts)==null?void 0:W[w])??o(w),menuType:w,active:t.value===w,onClick:()=>n(w)},{default:l.withCtx(()=>[w===l.unref(he).theme?(l.openBlock(),l.createBlock(q1,{key:0,modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=B=>i.value=B),disabled:"",theme:"minor",onChange:s},null,8,["modelValue"])):l.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","active","onClick"])}),128))]),(b=I.languages)!=null&&b.items?(l.openBlock(),l.createBlock(pW,{key:0,items:(h=I.languages)==null?void 0:h.items,theme:"contrast","default-value":(G=I.languages)==null?void 0:G.defaultValue,onChange:A,"data-testid":`${I.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-fc5df63a"]]),iPg=["data-testid"],nPg={class:"menu-yui-kit__wrapper"},APg={class:"menu-yui-kit__names"},lPg={class:"menu-yui-kit__name"},sPg={class:"menu-yui-kit__role"},oPg={key:0,class:"menu-yui-kit__dropdown"},b9=Tg(l.defineComponent({__name:"UserMenu",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenu"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(e,{emit:g}){const I=e,C=l.reactive({isShow:!1,isBlackTheme:I.isBlackTheme??!1}),t=g,i=l.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":C.isShow}));function n(Z){t("click",Z),Z!==he.theme&&I.closeAfterClick&&(C.isShow=!1)}const A=l.computed(()=>C.isShow?cg.chevronUp:cg.chevronDown),s=()=>{C.isShow=!C.isShow},o=()=>{C.isShow=!1};function a(){C.isBlackTheme=!C.isBlackTheme,t("theme-change",C.isBlackTheme)}const d=Z=>{I.closeAfterClick&&(C.isShow=!1),t("languageSwitch",Z)},m=()=>{I.closeAfterClick&&(C.isShow=!1),t("unmount-qr-auth")};return(Z,b)=>{var h,G,w;return l.openBlock(),l.createElementBlock("div",{class:"menu-yui-kit","data-testid":I.dataTestid},[l.withDirectives((l.openBlock(),l.createElementBlock("div",nPg,[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:s},[l.createVNode(lh,{class:"menu-yui-kit__avatar",url:(h=I.user)==null?void 0:h.avatar,alt:"user-avatar","data-testid":`${I.dataTestid}-Avatar`},null,8,["url","data-testid"]),l.createElementVNode("div",APg,[l.createElementVNode("p",lPg,l.toDisplayString((G=I.user)==null?void 0:G.name),1),l.createElementVNode("p",sPg,l.toDisplayString((w=I.user)==null?void 0:w.role),1)]),l.createVNode(oI,{type:l.unref(tI).ghost,class:"menu-yui-kit__button","data-testid":`${I.dataTestid}-Toggle`},{default:l.withCtx(()=>[l.createVNode(Xg,{class:"menu-yui-kit__button-icon",name:A.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2),C.isShow?(l.openBlock(),l.createElementBlock("div",oPg,[l.createVNode(tPg,{"data-testid":`${I.dataTestid}-List`,"is-black-theme":C.isBlackTheme,"menu-open":C.isShow,languages:I.languages,categories:I.categories,texts:I.texts,onClick:n,onThemeChange:a,onLanguageSwitch:d,onUnmountQrAuth:m},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])])):l.createCommentVNode("",!0)])),[[l.unref(zs),o,void 0,{bubble:!0}]])],8,iPg)}}}),[["__scopeId","data-v-03bcfc9d"]]);var ip=(e=>(e.default="default",e.minor="minor",e))(ip||{});const aPg=["data-testid"],dPg=["data-testid"],cPg=["data-testid"],mPg=["data-testid","placeholder","required","maxlength","readonly"],rPg=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:ip.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({isPressed:!1,inputElement:I.modelValue}),i=l.computed(()=>[{pressed:t.isPressed,readonly:I.readonly,[I.type]:!0}]),n=()=>{C("update:modelValue",t.inputElement)},A=()=>{I.readonly||(t.isPressed=!0)},s=()=>{t.isPressed=!1};return l.watch(()=>I.modelValue,o=>{t.inputElement=o}),(o,a)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",i.value]),onFocusout:s,"data-testid":I.dataTestid},[I.inputMessage?(l.openBlock(),l.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${I.dataTestid}-Legend`},[l.createTextVNode(l.toDisplayString(I.inputMessage)+" ",1),I.required?(l.openBlock(),l.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${I.dataTestid}-Legend-Star`},"*",8,cPg)):l.createCommentVNode("",!0)],8,dPg)):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=d=>t.inputElement=d),onFocus:A,onInput:n,"data-testid":`${I.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:I.placeholder,required:I.required,maxlength:I.maxlength,readonly:I.readonly},null,40,mPg),[[l.vModelText,t.inputElement]])],42,aPg))}}),h9=Tg(rPg,[["__scopeId","data-v-0fe11b1b"]]);var G9=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(G9||{});const ZPg=["data-testid"],uPg=["data-testid"],bPg=["src","alt","data-testid"],hPg=["src","data-testid"],GPg=["data-testid"],wPg=["data-testid"],WPg=["data-testid"],w9=Tg(l.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(e){const g=e,I=l.reactive({isLoad:!1,isError:!1}),C=l.computed(()=>I.isError?!1:!g.url||!g.type||g.type==G9.img?!0:uZ(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},n=()=>{I.isLoad=!1,I.isError=!1};return l.watch(()=>g.url,()=>{n()}),(A,s)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==l.unref(G9).img?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${g.dataTestid}-Picture`},[!I.isError&&g.url?(l.openBlock(),l.createElementBlock("img",{key:0,class:"picture-yui-kit__picture_image",src:g.url,alt:g.alt,"data-testid":`${g.dataTestid}-Picture-Img`,onLoad:t,onError:i},null,40,bPg)):(l.openBlock(),l.createElementBlock("img",{key:1,src:l.unref(vs),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,hPg))],8,uPg),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},l.toDisplayString(g.caption),9,GPg)],64)):l.unref(uZ)(g.url)?(l.openBlock(),l.createBlock(Es,{key:1,class:"picture-yui-kit__picture_image",src:g.url,page:1,dataTestid:`${g.dataTestid}-PdfPreview`,onLoad:t},null,8,["src","dataTestid"])):(l.openBlock(),l.createElementBlock("div",{key:2,class:"picture-yui-kit__caption","data-testid":`${g.dataTestid}-Caption-Box`},[l.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${g.dataTestid}-Caption-Title`},l.toDisplayString(g.caption),9,WPg)],8,wPg)),!I.isLoad&&C.value?(l.openBlock(),l.createBlock(th,{key:3,class:"picture-yui-kit__loader"})):l.createCommentVNode("",!0)],8,ZPg))}}),[["__scopeId","data-v-bfca9915"]]);var np=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(np||{}),QK=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(QK||{}),OK=(e=>(e[e.success=cg.checkbox]="success",e[e.warning=cg.alertTriangle]="warning",e[e.error=cg.exitCircle]="error",e[e.info=cg.info]="info",e))(OK||{});const pPg=["id","data-testid"],BPg=["data-testid"],YPg=["data-testid"],yPg=["data-testid"],NPg=["data-testid"],VPg=l.defineComponent({__name:"Notification",props:{type:{default:np.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(e,{expose:g,emit:I}){const C=e,t=I,i=l.ref(null);Gg(i,"toggle",()=>{C.timeout>0&&setTimeout(()=>{var o;return(o=i.value)==null?void 0:o.hidePopover()},C.timeout*1e3)});const n=()=>(t("close"),"hide"),A=()=>{var o;(o=i.value)==null||o.showPopover()},s=l.reactive({message:{icon:OK[C.type],title:C.title||QK[C.type],description:C.description}});return l.onMounted(()=>{var o;C.showPopover&&((o=i.value)==null||o.showPopover())}),g({showPopover:A}),(o,a)=>(l.openBlock(),l.createElementBlock("div",{popover:"manual",id:C.pushKey.toString(),class:l.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${C.type}`),"data-testid":C.dataTestid,ref_key:"popover",ref:i},[l.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${C.dataTestid}-Notification`},[l.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${C.dataTestid}-Notification-Block`},[l.createVNode(Xg,{name:s.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),l.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${C.dataTestid}-Notification-Title`},l.toDisplayString(s.message.title),9,yPg),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${C.dataTestid}-Notification-Description`},l.toDisplayString(s.message.description),9,NPg)],8,YPg),l.createVNode(oI,{class:"notification-yui-kit__exit",type:l.unref(tI).ghost,popovertarget:C.pushKey.toString(),popovertargetaction:n,"data-testid":`${C.dataTestid}-Notification-Button`},{default:l.withCtx(()=>[l.createVNode(Xg,{name:l.unref(cg).crossSmall,"data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,BPg)],10,pPg))}}),W9=Tg(VPg,[["__scopeId","data-v-053cfa20"]]),p9=l.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(e){const g=e,I=()=>{const C=g.content,t=document.createElement("textarea");t.value=C;const i=document.querySelectorAll("dialog[open]"),n=i.length?i[i.length-1]:null;n?n.append(t):document.body.append(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()};return(C,t)=>(l.openBlock(),l.createBlock(Xg,{class:"copy-icon-yui-kit",name:l.unref(cg).copy,"data-testid":g.dataTestid,onClick:I},null,8,["name","data-testid"]))}}),XPg=["data-testid"],RPg=["data-testid"],MPg=["data-testid"],HPg=["data-testid"],fPg=["data-testid"],SPg=["data-testid"],DPg=["data-testid"],kPg=["data-testid"],FPg=["data-testid"],KPg=["data-testid"],zPg=["data-testid"],JPg=["data-testid"],xPg=["data-testid"],TPg=["data-testid"],LPg=l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:cg.filter},options:{default:()=>[]},defaultValue:{default:"Все"},selectedValues:{default:()=>[]},multiply:{type:Boolean,default:!0},maxShowCount:{default:5},showClearButton:{type:Boolean,default:!1},disallowNull:{type:Boolean,default:!1},dataTestid:{default:"FilterTag"}},emits:["change"],setup(e,{emit:g}){const I=e,C=l.reactive({isShow:!1,options:[]}),t=g,i=l.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":C.isShow})),n=()=>C.isShow=!C.isShow,A=()=>{C.isShow=!1},s=l.computed(()=>C.options.filter(Z=>Z.chose)),o=l.computed(()=>C.options.filter(Z=>!Z.chose)),a=Z=>{I.disallowNull&&Z.chose||(Z.chose=!Z.chose,I.multiply||(C.options=C.options.map(b=>({...b,chose:Z.value===b.value&&Z.chose}))),C.options.every(b=>b.chose)&&(C.options=C.options.map(b=>({...b,chose:!1}))),t("change",s.value.map(b=>b.value)),C.isShow=!1)},d=()=>{C.options=C.options.map(Z=>({...Z,chose:!1})),C.isShow=!1,t("change",[])},m=()=>{C.options=I.options.map(Z=>({...Z,chose:I.selectedValues.includes(Z.value)})),C.options.every(Z=>Z.chose)&&(C.options=C.options.map(Z=>({...Z,chose:!1})))};return l.watch(()=>[I.options,I.selectedValues],m),l.watch(()=>I.selectedValues,m),l.onMounted(m),(Z,b)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"filter-yui-kit","data-testid":I.dataTestid},[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:n,"data-testid":`${I.dataTestid}-Wrapper`},[I.iconName?(l.openBlock(),l.createBlock(Xg,{key:0,name:I.iconName,"data-testid":`${I.dataTestid}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),I.title?(l.openBlock(),l.createElementBlock("span",{key:1,"data-testid":`${I.dataTestid}-Title`},l.toDisplayString(I.title),9,MPg)):l.createCommentVNode("",!0),!s.value.length&&!I.disallowNull?(l.openBlock(),l.createBlock(dt,{key:2,disabled:"",text:I.defaultValue,"data-testid":`${I.dataTestid}-Badges-All`},null,8,["text","data-testid"])):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:3},l.renderList(s.value.filter((h,G)=>G<I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(dt,{key:h.value,type:h.type,disabled:"","data-testid":`${I.dataTestid}-Badges${G}`,text:h.label},null,8,["type","data-testid","text"]))),128)),I.maxShowCount<s.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(s.value.length-I.maxShowCount)+" ",1),l.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${I.dataTestid}-MaxShowCount-Content`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.filter((h,G)=>G>=I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(dt,{key:h.value,type:h.type,disabled:"",text:h.label,"data-testid":`${I.dataTestid}-MaxShow-Badges${G}`},null,8,["type","text","data-testid"]))),128))],8,fPg)],8,HPg)):l.createCommentVNode("",!0),I.showClearButton&&s.value.length>0?(l.openBlock(),l.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:l.withModifiers(d,["stop"]),"data-testid":`${I.dataTestid}-Filter-CloseButton`},[l.createVNode(Xg,{name:l.unref(cg).crossSmall,"data-testid":`${I.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,SPg)):l.createCommentVNode("",!0)],10,RPg),C.isShow?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${I.dataTestid}-Select-Wrapper`},[l.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${I.dataTestid}-Select-List`},[s.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[l.createVNode(dt,{disabled:"",text:I.defaultValue,"data-testid":`${I.dataTestid}-Select-Badges`},null,8,["text","data-testid"])],8,FPg)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-Item${G}`},[l.createVNode(dt,{disabled:!0,choosed:!I.disallowNull&&h.chose,type:h.type,onClick:w=>a(h),text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`},null,8,["choosed","type","onClick","text","data-testid"])],8,KPg))),128))],8,kPg),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,zPg),C.isShow?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${I.dataTestid}-Select-List`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-List${G}`},[l.createVNode(dt,{disabled:!0,choosed:!1,type:h.type,text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`,onClick:w=>a(h)},null,8,["type","text","data-testid","onClick"])],8,xPg))),128)),e.disallowNull?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[s.value.length?(l.openBlock(),l.createBlock(dt,{key:0,disabled:"","data-testid":`${I.dataTestid}-Select-Badges`,text:I.defaultValue,onClick:d},null,8,["data-testid","text"])):l.createCommentVNode("",!0)],8,TPg))],8,JPg)):l.createCommentVNode("",!0)],8,DPg)):l.createCommentVNode("",!0)],8,XPg)),[[l.unref(zs),A,void 0,{bubble:!0}]])}}),B9=Tg(LPg,[["__scopeId","data-v-364736f4"]]),vPg=["data-testid"],jPg=["data-testid"],QPg=["data-testid"],OPg=["data-testid"],Y9=Tg(l.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(e){const g=e,I=()=>{const C=Math.min(Math.max(g.percent,0),100),t=C/100*360;if(C<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${t-90}deg)) 0,calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(C<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${t-90}deg)), calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(C<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
|
|
1685
1685
|
calc(50% + 50% * cos(${t-90}deg)) 100%, calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(C<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`};return(C,t)=>g.percent<100?(l.openBlock(),l.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[l.createElementVNode("div",{class:"pie-chart-border",style:l.normalizeStyle({"border-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[l.createElementVNode("div",{class:"sector",style:l.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,QPg)],12,jPg)],8,vPg)):(l.openBlock(),l.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${g.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[l.createElementVNode("path",{d:"M8 1C4.136 1 1 4.136 1 8C1 11.864 4.136 15 8 15C11.864 15 15 11.864 15 8C15 4.136 11.864 1 8 1ZM8 13.6C4.906 13.6 2.4 11.094 2.4 8C2.4 4.906 4.906 2.4 8 2.4C11.094 2.4 13.6 4.906 13.6 8C13.6 11.094 11.094 13.6 8 13.6Z",fill:"#3BC648"},null,-1),l.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),l.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,OPg))}}),[["__scopeId","data-v-43f9503c"]]),UPg=["data-testid"],EPg=["data-testid"],PPg=["data-testid"],_Pg=["onClick","data-testid"],qPg=l.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:cg.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({isShow:!1}),i=l.computed(()=>{var S;const V=(S=o.value)==null?void 0:S.closest("dialog");return V||"body"}),n=CSS.supports("top","anchor(bottom)"),A=l.useId(),s=l.computed(()=>`--anchor-popover-${A}`),o=l.ref(null),a=l.ref(null),d=l.ref(null),m=l.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":t.isShow,"empty-yui-kit":I.options.length===0})),Z=()=>t.isShow=!t.isShow,b=()=>{t.isShow=!1,C("close")},h=V=>{V.function(),b()},G=()=>{requestAnimationFrame(()=>{if(!o.value||!a.value||!t.isShow)return;const V={},S=o.value.getBoundingClientRect(),f=window.pageYOffset||document.documentElement.scrollTop,K=window.pageXOffset||document.documentElement.scrollLeft;let x=S.bottom+f,L=S.left+K;const O=o.value.closest("dialog");if(O){const q=O.getBoundingClientRect();x=S.top-q.top,L=S.left-q.left;const J=O.scrollTop,_=O.scrollLeft;x+=J,L+=_,x+=10}x+=10,V["--popover-top"]=`${x}px`,n||(V["--popover-left"]=`${L}px`),TI(V,a.value),(()=>{if(!a.value)return;const q=a.value.getBoundingClientRect();q.right>window.innerWidth&&(n?V["--popover-right"]="anchor(right) ":V["--popover-right"]=`${S.right-q.width}px`)})(),V["--popover-right"]&&(V.left="auto",TI(V,a.value))})},w=V=>{const S=V.getBoundingClientRect(),f=document.elementFromPoint(S.left,S.top),K=document.elementFromPoint(S.right,S.bottom);!(f&&V.contains(f))&&!(K&&V.contains(K))&&b()},W=new IntersectionObserver(V=>{V.forEach(S=>{S.isIntersecting||b()})}),B=()=>{o.value&&a.value&&(window.addEventListener("scroll",G,!0),window.addEventListener("resize",G))},Y=()=>{o.value&&a.value&&(window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G))},y=()=>{o.value&&window.addEventListener("scroll",w.bind(null,o.value),!0)},X=()=>{o.value&&window.removeEventListener("scroll",w.bind(null,o.value),!0)};return l.watch(()=>I.isShow,()=>t.isShow=I.isShow),l.watch(()=>t.isShow,()=>{t.isShow?(G(),y()):X(),!n&&(t.isShow?B():Y())}),l.onMounted(()=>{o.value&&TI({"anchor-name":`${s.value}`},o.value),a.value&&TI({"position-anchor":`${s.value}`},a.value),d.value&&W.observe(d.value),n||G()}),l.onUnmounted(()=>{W.disconnect(),X(),n||Y()}),(V,S)=>(l.openBlock(),l.createBlock(qC,{hint:I.tooltip,size:"small",type:"black",position:I.tooltipPosition,"data-testid":I.dataTestid,"is-can-show":!!I.tooltip&&!t.isShow&&I.options.length>0},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:d,"data-testid":`${I.dataTestid}-Popover`},[l.createElementVNode("div",{ref_key:"reference",ref:o,class:l.normalizeClass(m.value),"data-testid":`${I.dataTestid}-PopoverShow`,onClick:Z},[l.renderSlot(V.$slots,"trigger",{},()=>[l.createVNode(Xg,{class:"popover-yui-kit__icon",name:I.iconName,"data-testid":`${I.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,EPg),(l.openBlock(),l.createBlock(l.Teleport,{to:i.value,disabled:I.isWCUse},[l.createVNode(l.Transition,{name:"popover-animate"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{class:"popover-yui-kit__content",style:l.normalizeStyle({transform:`translateY(${I.translateY})`}),ref_key:"floating",ref:a},[l.renderSlot(V.$slots,"default",{},()=>{var f;return[(f=I.options)!=null&&f.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${I.dataTestid}-PopoverShow-Options`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.options,(K,x)=>(l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit__options__item",key:x,style:l.normalizeStyle(K.style),onClick:l.withModifiers(L=>h(K),["stop"]),"data-testid":`${I.dataTestid}-Item${x}`},[K.iconName?(l.openBlock(),l.createBlock(Xg,{key:0,name:K.iconName,"data-testid":`${I.dataTestid}-Item${x}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(K.value),1)],12,_Pg))),128))],8,PPg)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,UPg)),[[l.unref(zs),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),yZ=Tg(qPg,[["__scopeId","data-v-0eb84815"]]),$Pg=["colspan","rowspan","data-testid"],NZ=Tg(l.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createElementBlock("th",{colspan:e.colspan,rowspan:e.rowspan,"data-testid":g.dataTestid,class:"table-th"},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,$Pg))}}),[["__scopeId","data-v-88f7c45d"]]),g6g=["data-testid"],sh=Tg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,g6g))}}),[["__scopeId","data-v-93b6bd0e"]]),UK=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientWidth,W=e.value.scrollWidth;return w>=W?100:w/W*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollLeft:w,scrollWidth:W,clientWidth:B}=e.value,Y=W-B;if(Y<=0)return;const y=w/Y,X=C.value.clientWidth,V=I.value.clientWidth,S=X-V,f=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-left-position":`${f}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,n=w.clientX,A=e.value.scrollLeft,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b,!0))},Z=w=>{if(t.value&&e.value&&I.value){const W=w.clientX-n,B=(e.value.scrollWidth-e.value.clientWidth)/(e.value.clientWidth-I.value.clientWidth);e.value.scrollLeft=A+W*B,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b,!0)};return{onDrag:Z,onTrackClick:w=>{if(e.value&&I.value){const W=w.currentTarget.getBoundingClientRect(),B=w.clientX-W.left,Y=I.value.clientWidth,y=W.width;let X=(B-Y/2)*((e.value.scrollWidth-e.value.clientWidth)/(y-Y));X=Math.max(0,Math.min(X,e.value.scrollWidth-e.value.clientWidth)),e.value.scrollLeft=X,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,TI({"--scroll-horizontal-bar-width":`${w}%`},g.value)},horizontalTrackClass:s,isExistHorizontalTrack:o}},EK=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientHeight,W=e.value.scrollHeight;if(w>=W)return 100;if(w<W)return w/W*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollTop:w,scrollHeight:W,clientHeight:B}=e.value,Y=W-B;if(Y<=0)return;const y=w/Y,X=C.value.clientHeight,V=I.value.clientHeight,S=X-V,f=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-top-postion":`${f}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,n=w.clientY,A=e.value.scrollTop,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b))},Z=w=>{if(t.value&&e.value&&I.value){const W=w.clientY-n,B=(e.value.scrollHeight-e.value.clientHeight)/(e.value.clientHeight-I.value.clientHeight);e.value.scrollTop=A+W*B,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b)};return{onDrag:Z,onTrackClick:w=>{if(e.value&&I.value){const W=w.currentTarget.getBoundingClientRect(),B=w.clientY-W.top,Y=I.value.clientHeight,y=W.height;let X=(B-Y/2)*((e.value.scrollHeight-e.value.clientHeight)/(y-Y));X=Math.max(0,Math.min(X,e.value.scrollHeight-e.value.clientHeight)),e.value.scrollTop=X,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,TI({"--scroll-vertical-bar-height":`${w}%`},g.value)},verticalTrackClass:s,isExistVerticalTrack:o}},I6g={class:"scroll-wrapper__vertical-wrapper"},e6g={class:"scroll-wrapper__horizont-wrapper"},oh=Tg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapper",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(e,{expose:g,emit:I}){const C=I,t=l.ref(null),i=l.ref(null),n=l.ref(null),A=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=EK(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=UK(t,i,o,s),X=J=>{m(),G(),C("unmount-scroll",J)},V=()=>{requestAnimationFrame(()=>{S(),f()})},S=()=>{if(!t.value||!i.value)return;const J=getComputedStyle(i.value),_=i.value.style.minHeight||J.minHeight,ug=i.value.style.maxHeight||J.maxHeight,ag=i.value.style.height;TI({"--scroll-wrapper-height":`${ag}`,"--scroll-wrapper-max-height":`${ug}`,"--scroll-wrapper-min-height":`${_}`},i.value)},f=()=>{Z(),B(),m(),G()},K=()=>{t.value&&t.value.addEventListener("scroll",X)},x=()=>{t.value&&(t.value.scrollTop=0)},L=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?C("unmount-paginate",!0):C("unmount-paginate",!1))},O=new MutationObserver(()=>{V(),L()}),Ig=new ResizeObserver(()=>{V(),L()}),q=J=>{O.observe(J,{childList:!0,subtree:!0,attributes:!0}),Ig.observe(J)};return g({scrollToTop:x,setHeightSlot:S,slotRef:t}),l.onMounted(()=>{V(),K(),i.value&&q(i.value),n.value&&q(n.value),window.addEventListener("resize",V),C("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",V)}),(J,_)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",I6g,[l.createElementVNode("div",e6g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(J.$slots,"default",{},void 0,!0)],512),l.unref(y)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:_[1]||(_[1]=l.withModifiers((...ug)=>l.unref(W)&&l.unref(W)(...ug),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onPointerdown:_[0]||(_[0]=l.withModifiers((...ug)=>l.unref(w)&&l.unref(w)(...ug),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:n,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:_[3]||(_[3]=l.withModifiers((...ug)=>l.unref(a)&&l.unref(a)(...ug),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:A,class:"scroll-wrapper__bar",onPointerdown:_[2]||(_[2]=l.withModifiers((...ug)=>l.unref(d)&&l.unref(d)(...ug),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-d58d935f"]]),C6g=["id","data-testid"],t6g=["id","data-testid"],i6g=["id","data-testid"],n6g={key:0,class:"table__error-wrapper"},A6g={class:"table__error-content"},l6g={class:"table__wrapper"},y9=Tg(l.defineComponent({name:"YTable",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean,default:!1},onErrorHandler:{},errorLabel:{default:"Обновить таблицу"},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:g,emit:I}){var B;const C=e,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),n=l.ref(null),A=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=Y=>{C.isError||t("unmount-scroll",Y)},m=Y=>{C.isError||t("unmount-paginate",Y)},Z=()=>{if(!n.value||!a.value)return;const Y=n.value.querySelector("thead");if(!Y)return;const y=Y.getBoundingClientRect().height;i.headHeight=y,TI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},b=()=>{a.value&&a.value.scrollToTop()},h=()=>{if(a.value&&o.value){const Y=getComputedStyle(a.value.$el),y=Number(Y.minHeight.replace(/\D/g,""));if(y&&y>0)return;TI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},G=()=>{let Y=1;if(A.value){for(let y=0;y<A.value.children.length;y++)Y=Math.max(A.value.children[y].children.length,Y);i.maxColumnCount=Y}},w=new MutationObserver(()=>{G()}),W=new ResizeObserver(()=>{Z()});return g({scrollToTop:b,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,scrollWrapperRef:a,tbodyRef:s,tableRef:n,theadRef:A}),l.onMounted(()=>{Z(),G(),window.addEventListener("resize",Z),n.value&&W.observe(n.value),A.value&&w.observe(A.value,{childList:!0,subtree:!0}),h()}),(Y,y)=>(l.openBlock(),l.createBlock(oh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":C.isShowVerticalScroll,"is-show-horizontal-scroll":C.isShowHorizontalScroll,"data-testid":`${C.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:n,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[l.renderSlot(Y.$slots,"default",{},()=>{var X;return[l.createElementVNode("colgroup",null,[l.renderSlot(Y.$slots,"colspan",{},void 0,!0)]),Y.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:A,id:C.theadId,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[l.renderSlot(Y.$slots,"head",{},void 0,!0),Y.$slots.search?(l.openBlock(),l.createBlock(sh,{key:0,class:"table__search-tr",id:(X=C.search)==null?void 0:X.rowId,ref_key:"searchRowRef",ref:o,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var V;return[l.createVNode(NZ,{colspan:C.columnCount||i.maxColumnCount,class:"table__search-th",id:(V=C.search)==null?void 0:V.headId,"data-testid":`${C.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(Y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):l.createCommentVNode("",!0)],8,t6g)):l.createCommentVNode("",!0),e.isError?l.createCommentVNode("",!0):l.renderSlot(Y.$slots,"body-group",{key:1},()=>[Y.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,id:C.tbodyId,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(Y.$slots,"body",{},void 0,!0)],8,i6g)):l.createCommentVNode("",!0)],!0)]},!0)],8,C6g),C.isError?(l.openBlock(),l.createElementBlock("div",n6g,[l.createElementVNode("div",A6g,[l.createVNode(Xg,{class:"table__error-icon",width:112,height:100,name:l.unref(cg).tableError},null,8,["name"]),y[0]||(y[0]=l.createElementVNode("div",{class:"table__error-header"},"Таблица не загрузилась",-1)),y[1]||(y[1]=l.createElementVNode("div",{class:"table__error-text"}," Не удалось получить данные. Проверьте соединение с интернетом или попробуйте обновить таблицу ",-1))]),l.renderSlot(Y.$slots,"error-button",{},()=>[e.onErrorHandler?(l.openBlock(),l.createBlock(oI,{key:0,class:"table__error-button",size:l.unref(VI).small,onClick:e.onErrorHandler},{"left-icon":l.withCtx(()=>[l.createElementVNode("div",l6g,[l.createVNode(Xg,{name:l.unref(cg).rearrange,width:16,height:16},null,8,["name"])])]),default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.errorLabel),1)]),_:1},8,["size","onClick"])):l.createCommentVNode("",!0)],!0)])):l.createCommentVNode("",!0)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-0bba5a87"]]),s6g=["rowspan","colspan","data-testid"],ah=l.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createElementBlock("td",{rowspan:e.rowspan,colspan:e.colspan,class:"table-td","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default")],8,s6g))}}),o6g={class:"skeleton"},Ap=Tg(l.defineComponent({name:"Skeleton",__name:"Skeleton",setup(e){return(g,I)=>(l.openBlock(),l.createElementBlock("div",o6g))}}),[["__scopeId","data-v-e4032176"]]),a6g=["data-testid"],lp=Tg(l.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},isObserved:{type:Boolean,default:!1},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{default:1}},setup(e){const g=e,I=l.reactive({isShow:!g.isObserved,observer:null}),C=l.ref(null),t=l.computed(()=>[{"table-row_active":g.type==="selected","table-row_is-stub":g.isObserved}]),i=()=>{const A=new IntersectionObserver(s=>{s.forEach(o=>{o.isIntersecting&&(I.isShow=!0,A.unobserve(o.target))})},{root:g.scrolledElement,rootMargin:"600px"});return A},n=()=>{g.isObserved&&C.value&&(I.observer=i(),I.observer.observe(C.value))};return l.watch(()=>g.scrolledElement,()=>{var A;(A=I.observer)==null||A.disconnect(),n()}),l.onMounted(()=>{n()}),l.onUnmounted(()=>{var A;(A=I.observer)==null||A.disconnect()}),(A,s)=>(l.openBlock(),l.createElementBlock("tr",{ref_key:"row",ref:C,class:l.normalizeClass(["table-row",t.value]),"data-testid":g.dataTestid},[I.isShow?l.renderSlot(A.$slots,"default",{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[A.$slots.skeleton?l.renderSlot(A.$slots,"skeleton",{key:0},void 0,!0):(l.openBlock(),l.createBlock(ah,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:l.withCtx(()=>[l.createVNode(Ap,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,a6g))}}),[["__scopeId","data-v-6b48ff96"]]),N9=Tg(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createBlock(lp,{class:"section-table-row","data-testid":g.dataTestid},{default:l.withCtx(()=>[l.createVNode(ah,{colspan:e.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:l.withCtx(()=>[l.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-74cf9e8d"]]),d6g=["disabled","name","value","data-testid"],V9=Tg(l.defineComponent({name:"Radio",__name:"Radio",props:l.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const g=e,I=l.useModel(e,"modelValue");return(C,t)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>I.value=i),type:"radio",disabled:e.disabled,name:e.name,value:e.value,class:"radio","data-testid":g.dataTestid},null,8,d6g)),[[l.vModelRadio,I.value]])}}),[["__scopeId","data-v-ca114382"]]),c6g=["data-testid"],sp=Tg(l.defineComponent({name:"Range",__name:"Range",props:l.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:l.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(e,{emit:g}){const I=e,C=g,t=l.useModel(e,"modelValue"),i=l.ref(null);l.watch(t,()=>{A()});const n=()=>(t.value-I.min)/(I.max-I.min)*100,A=()=>{requestAnimationFrame(()=>{i.value&&TI({"--progress":n()+"%"},i.value)})},s=a=>{const d=a.target;d&&C("unmount-change",Number(d.value))},o=a=>{const d=a.target;d&&C("unmount-change",Number(d.value))};return l.onMounted(()=>{A()}),(a,d)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",l.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:s,onInput:o,"data-testid":I.dataTestid}),null,16,c6g)),[[l.vModelText,t.value]])}}),[["__scopeId","data-v-07f59a41"]]),m6g=["id","data-testid"],r6g=["data-testid"],Z6g=["data-testid"],X9=Tg(l.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean},onErrorHandler:{},errorLabel:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:g,emit:I}){var W;const C=e,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),n=l.ref(null),A=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=B=>{t("unmount-scroll",B)},m=()=>{if(!n.value||!a.value)return;const B=n.value.querySelector("thead");if(!B)return;const Y=B.getBoundingClientRect().height;i.headHeight=Y,TI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},Z=()=>{a.value&&a.value.scrollToTop()},b=()=>{if(a.value&&o.value){const B=getComputedStyle(a.value.$el),Y=Number(B.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;TI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},h=()=>{let B=1;if(A.value){for(let Y=0;Y<A.value.children.length;Y++)B=Math.max(A.value.children[Y].children.length,B);i.maxColumnCount=B}},G=new MutationObserver(()=>{h()}),w=new ResizeObserver(()=>{m()});return g({scrollToTop:Z,setHeightSlot:(W=a.value)==null?void 0:W.setHeightSlot,tbodyRef:s,tableRef:n,theadRef:A}),l.onMounted(()=>{m(),h(),window.addEventListener("resize",m),n.value&&w.observe(n.value),A.value&&G.observe(A.value,{childList:!0,subtree:!0}),b()}),(B,Y)=>(l.openBlock(),l.createBlock(oh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,"is-show-vertical-scroll":C.isShowVerticalScroll,"is-show-horizontal-scroll":C.isShowHorizontalScroll,"data-testid":`${C.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:n,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[l.renderSlot(B.$slots,"default",{},()=>[l.createElementVNode("colgroup",null,[l.renderSlot(B.$slots,"colspan",{},void 0,!0)]),B.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:A,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[l.renderSlot(B.$slots,"head",{},void 0,!0),B.$slots.search?(l.openBlock(),l.createBlock(sh,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:o,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(NZ,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${C.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(B.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,r6g)):l.createCommentVNode("",!0),l.renderSlot(B.$slots,"body-group",{},()=>[B.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(B.$slots,"body",{},void 0,!0)],8,Z6g)):l.createCommentVNode("",!0)],!0)],!0)],8,m6g)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-828d32df"]]),u6g=["data-testid"],R9=Tg(l.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},isObserved:{type:Boolean},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{}},setup(e){const g=e,I=l.computed(()=>[{"table-row_active":g.type==="selected"}]);return(C,t)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[l.renderSlot(C.$slots,"default",{},void 0,!0)],10,u6g))}}),[["__scopeId","data-v-7dc4f5d0"]]),b6g=["data-testid"],op=Tg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,b6g))}}),[["__scopeId","data-v-f74d38aa"]]),h6g={class:"scroll-wrapper__vertical-wrapper"},G6g={class:"scroll-wrapper__horizont-wrapper"},w6g=Tg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapperNew",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(e,{expose:g,emit:I}){const C=I,t=l.ref(null),i=l.ref(null),n=l.ref(null),A=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=EK(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=UK(t,i,o,s),X=q=>{m(),G(),C("unmount-scroll",q)},V=()=>{requestAnimationFrame(()=>{S(),f()})},S=()=>{if(!t.value||!i.value)return;const q=getComputedStyle(i.value),J=i.value.style.minHeight||q.minHeight,_=i.value.style.maxHeight||q.maxHeight,ug=i.value.style.height;TI({"--scroll-wrapper-height":`${ug}`,"--scroll-wrapper-max-height":`${_}`,"--scroll-wrapper-min-height":`${J}`},i.value)},f=()=>{Z(),B(),m(),G()},K=()=>{t.value&&t.value.addEventListener("scroll",X)},x=()=>{t.value&&(t.value.scrollTop=0)},L=new MutationObserver(()=>{V()}),O=new ResizeObserver(()=>{V()}),Ig=q=>{L.observe(q,{childList:!0,subtree:!0,attributes:!0}),O.observe(q)};return g({scrollToTop:x,setHeightSlot:S}),l.onMounted(()=>{V(),K(),i.value&&Ig(i.value),n.value&&Ig(n.value),window.addEventListener("resize",V),C("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",V)}),(q,J)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",h6g,[l.createElementVNode("div",G6g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(q.$slots,"default",{},void 0,!0)],512),l.unref(y)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:J[1]||(J[1]=l.withModifiers((..._)=>l.unref(W)&&l.unref(W)(..._),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onMousedown:J[0]||(J[0]=l.withModifiers((..._)=>l.unref(w)&&l.unref(w)(..._),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:n,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:J[3]||(J[3]=l.withModifiers((..._)=>l.unref(a)&&l.unref(a)(..._),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:A,class:"scroll-wrapper__bar",onMousedown:J[2]||(J[2]=l.withModifiers((..._)=>l.unref(d)&&l.unref(d)(..._),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-af83a114"]]),W6g=["data-testid"],p6g=["data-testid"],B6g=["data-testid"],M9=Tg(l.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(e,{expose:g}){const I=e,C=l.ref(null),t=l.ref(null),i=l.ref(null),n=l.ref(null),A=l.computed(()=>{let s=1;if(t.value)for(let o=0;o<t.value.children.length;o++)s=Math.max(t.value.children[o].children.length,s);return s});return g({tbodyRef:i,tableRef:C,theadRef:t}),(s,o)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:C,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[l.renderSlot(s.$slots,"default",{},()=>[l.renderSlot(s.$slots,"colspan",{},void 0,!0),s.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[l.renderSlot(s.$slots,"head",{},void 0,!0),s.$slots.search?(l.openBlock(),l.createBlock(op,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:n,"data-testid":`${I.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(NZ,{colspan:A.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,p6g)):l.createCommentVNode("",!0),l.renderSlot(s.$slots,"body-group",{},()=>[s.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[l.renderSlot(s.$slots,"body",{},void 0,!0)],8,B6g)):l.createCommentVNode("",!0)],!0)],!0)],8,W6g))}}),[["__scopeId","data-v-57a1c54d"]]),Y6g=["data-testid"],y6g=["data-testid"],N6g=["onClick","data-testid"],V6g=["data-testid"],H9=Tg(l.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(e,{emit:g}){const I=e,C=g,t=l.reactive({activeTab:1}),i=A=>Array.from({length:A},(s,o)=>o+1);l.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const n=A=>{t.activeTab=A,C("unmount-tab",A)};return(A,s)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[l.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock("button",{key:o,onClick:a=>n(o),class:l.normalizeClass(["tabs__navigation-button",{active:t.activeTab===o}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[l.renderSlot(A.$slots,`header${o}`,{active:t.activeTab===o},void 0,!0)],10,N6g))),128))],8,y6g),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:o},[t.activeTab===o?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(A.$slots,`tab${o}`,{},void 0,!0)],8,V6g)):l.createCommentVNode("",!0)],64))),128))],8,Y6g))}}),[["__scopeId","data-v-e5802f92"]]);function rt(e){this.content=e}rt.prototype={constructor:rt,find:function(e){for(var g=0;g<this.content.length;g+=2)if(this.content[g]===e)return g;return-1},get:function(e){var g=this.find(e);return g==-1?void 0:this.content[g+1]},update:function(e,g,I){var C=I&&I!=e?this.remove(I):this,t=C.find(e),i=C.content.slice();return t==-1?i.push(I||e,g):(i[t+1]=g,I&&(i[t]=I)),new rt(i)},remove:function(e){var g=this.find(e);if(g==-1)return this;var I=this.content.slice();return I.splice(g,2),new rt(I)},addToStart:function(e,g){return new rt([e,g].concat(this.remove(e).content))},addToEnd:function(e,g){var I=this.remove(e).content.slice();return I.push(e,g),new rt(I)},addBefore:function(e,g,I){var C=this.remove(g),t=C.content.slice(),i=C.find(e);return t.splice(i==-1?t.length:i,0,g,I),new rt(t)},forEach:function(e){for(var g=0;g<this.content.length;g+=2)e(this.content[g],this.content[g+1])},prepend:function(e){return e=rt.from(e),e.size?new rt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=rt.from(e),e.size?new rt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var g=this;e=rt.from(e);for(var I=0;I<e.content.length;I+=2)g=g.remove(e.content[I]);return g},toObject:function(){var e={};return this.forEach(function(g,I){e[g]=I}),e},get size(){return this.content.length>>1}},rt.from=function(e){if(e instanceof rt)return e;var g=[];if(e)for(var I in e)g.push(I,e[I]);return new rt(g)};function PK(e,g,I){for(let C=0;;C++){if(C==e.childCount||C==g.childCount)return e.childCount==g.childCount?null:I;let t=e.child(C),i=g.child(C);if(t==i){I+=t.nodeSize;continue}if(!t.sameMarkup(i))return I;if(t.isText&&t.text!=i.text){let n=t.text,A=i.text,s=0;for(;n[s]==A[s];s++)I++;return s&&s<n.length&&s<A.length&&$K(n.charCodeAt(s-1))&&qK(n.charCodeAt(s))&&I--,I}if(t.content.size||i.content.size){let n=PK(t.content,i.content,I+1);if(n!=null)return n}I+=t.nodeSize}}function _K(e,g,I,C){for(let t=e.childCount,i=g.childCount;;){if(t==0||i==0)return t==i?null:{a:I,b:C};let n=e.child(--t),A=g.child(--i),s=n.nodeSize;if(n==A){I-=s,C-=s;continue}if(!n.sameMarkup(A))return{a:I,b:C};if(n.isText&&n.text!=A.text){let o=n.text,a=A.text,d=o.length,m=a.length;for(;d>0&&m>0&&o[d-1]==a[m-1];)d--,m--,I--,C--;return d&&m&&d<o.length&&$K(o.charCodeAt(d-1))&&qK(o.charCodeAt(d))&&(I++,C++),{a:I,b:C}}if(n.content.size||A.content.size){let o=_K(n.content,A.content,I-1,C-1);if(o)return o}I-=s,C-=s}}function qK(e){return e>=56320&&e<57344}function $K(e){return e>=55296&&e<56320}let Dg=class Ti{constructor(g,I){if(this.content=g,this.size=I||0,I==null)for(let C=0;C<g.length;C++)this.size+=g[C].nodeSize}nodesBetween(g,I,C,t=0,i){for(let n=0,A=0;A<I;n++){let s=this.content[n],o=A+s.nodeSize;if(o>g&&C(s,t+A,i||null,n)!==!1&&s.content.size){let a=A+1;s.nodesBetween(Math.max(0,g-a),Math.min(s.content.size,I-a),C,t+a)}A=o}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,C,t){let i="",n=!0;return this.nodesBetween(g,I,(A,s)=>{let o=A.isText?A.text.slice(Math.max(g,s)-s,I-s):A.isLeaf?t?typeof t=="function"?t(A):t:A.type.spec.leafText?A.type.spec.leafText(A):"":"";A.isBlock&&(A.isLeaf&&o||A.isTextblock)&&C&&(n?n=!1:i+=C),i+=o},0),i}append(g){if(!g.size)return this;if(!this.size)return g;let I=this.lastChild,C=g.firstChild,t=this.content.slice(),i=0;for(I.isText&&I.sameMarkup(C)&&(t[t.length-1]=I.withText(I.text+C.text),i=1);i<g.content.length;i++)t.push(g.content[i]);return new Ti(t,this.size+g.size)}cut(g,I=this.size){if(g==0&&I==this.size)return this;let C=[],t=0;if(I>g)for(let i=0,n=0;n<I;i++){let A=this.content[i],s=n+A.nodeSize;s>g&&((n<g||s>I)&&(A.isText?A=A.cut(Math.max(0,g-n),Math.min(A.text.length,I-n)):A=A.cut(Math.max(0,g-n-1),Math.min(A.content.size,I-n-1))),C.push(A),t+=A.nodeSize),n=s}return new Ti(C,t)}cutByIndex(g,I){return g==I?Ti.empty:g==0&&I==this.content.length?this:new Ti(this.content.slice(g,I))}replaceChild(g,I){let C=this.content[g];if(C==I)return this;let t=this.content.slice(),i=this.size+I.nodeSize-C.nodeSize;return t[g]=I,new Ti(t,i)}addToStart(g){return new Ti([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new Ti(this.content.concat(g),this.size+g.nodeSize)}eq(g){if(this.content.length!=g.content.length)return!1;for(let I=0;I<this.content.length;I++)if(!this.content[I].eq(g.content[I]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(g){let I=this.content[g];if(!I)throw new RangeError("Index "+g+" out of range for "+this);return I}maybeChild(g){return this.content[g]||null}forEach(g){for(let I=0,C=0;I<this.content.length;I++){let t=this.content[I];g(t,C,I),C+=t.nodeSize}}findDiffStart(g,I=0){return PK(this,g,I)}findDiffEnd(g,I=this.size,C=g.size){return _K(this,g,I,C)}findIndex(g){if(g==0)return ap(0,g);if(g==this.size)return ap(this.content.length,g);if(g>this.size||g<0)throw new RangeError(`Position ${g} outside of fragment (${this})`);for(let I=0,C=0;;I++){let t=this.child(I),i=C+t.nodeSize;if(i>=g)return i==g?ap(I+1,i):ap(I,C);C=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(g=>g.toJSON()):null}static fromJSON(g,I){if(!I)return Ti.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return Ti.fromArray(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return Ti.empty;let I,C=0;for(let t=0;t<g.length;t++){let i=g[t];C+=i.nodeSize,t&&i.isText&&g[t-1].sameMarkup(i)?(I||(I=g.slice(0,t)),I[I.length-1]=i.withText(I[I.length-1].text+i.text)):I&&I.push(i)}return new Ti(I||g,C)}static from(g){if(!g)return Ti.empty;if(g instanceof Ti)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new Ti([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Dg.empty=new Dg([],0);const f9={index:0,offset:0};function ap(e,g){return f9.index=e,f9.offset=g,f9}function dp(e,g){if(e===g)return!0;if(!(e&&typeof e=="object")||!(g&&typeof g=="object"))return!1;let I=Array.isArray(e);if(Array.isArray(g)!=I)return!1;if(I){if(e.length!=g.length)return!1;for(let C=0;C<e.length;C++)if(!dp(e[C],g[C]))return!1}else{for(let C in e)if(!(C in g)||!dp(e[C],g[C]))return!1;for(let C in g)if(!(C in e))return!1}return!0}let Ne=class W3{constructor(g,I){this.type=g,this.attrs=I}addToSet(g){let I,C=!1;for(let t=0;t<g.length;t++){let i=g[t];if(this.eq(i))return g;if(this.type.excludes(i.type))I||(I=g.slice(0,t));else{if(i.type.excludes(this.type))return g;!C&&i.type.rank>this.type.rank&&(I||(I=g.slice(0,t)),I.push(this),C=!0),I&&I.push(i)}}return I||(I=g.slice()),C||I.push(this),I}removeFromSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return g.slice(0,I).concat(g.slice(I+1));return g}isInSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return!0;return!1}eq(g){return this==g||this.type==g.type&&dp(this.attrs,g.attrs)}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let C=g.marks[I.type];if(!C)throw new RangeError(`There is no mark type ${I.type} in this schema`);let t=C.create(I.attrs);return C.checkAttrs(t.attrs),t}static sameSet(g,I){if(g==I)return!0;if(g.length!=I.length)return!1;for(let C=0;C<g.length;C++)if(!g[C].eq(I[C]))return!1;return!0}static setFrom(g){if(!g||Array.isArray(g)&&g.length==0)return W3.none;if(g instanceof W3)return[g];let I=g.slice();return I.sort((C,t)=>C.type.rank-t.type.rank),I}};Ne.none=[];let dh=class extends Error{},Eg=class eb{constructor(g,I,C){this.content=g,this.openStart=I,this.openEnd=C}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(g,I){let C=Iz(this.content,g+this.openStart,I,this.openStart+1,this.openEnd+1);return C&&new eb(C,this.openStart,this.openEnd)}removeBetween(g,I){return new eb(gz(this.content,g+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}static fromJSON(g,I){if(!I)return eb.empty;let C=I.openStart||0,t=I.openEnd||0;if(typeof C!="number"||typeof t!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new eb(Dg.fromJSON(g,I.content),C,t)}static maxOpen(g,I=!0){let C=0,t=0;for(let i=g.firstChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.firstChild)C++;for(let i=g.lastChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.lastChild)t++;return new eb(g,C,t)}};Eg.empty=new Eg(Dg.empty,0,0);function gz(e,g,I){let{index:C,offset:t}=e.findIndex(g),i=e.maybeChild(C),{index:n,offset:A}=e.findIndex(I);if(t==g||i.isText){if(A!=I&&!e.child(n).isText)throw new RangeError("Removing non-flat range");return e.cut(0,g).append(e.cut(I))}if(C!=n)throw new RangeError("Removing non-flat range");return e.replaceChild(C,i.copy(gz(i.content,g-t-1,I-t-1)))}function Iz(e,g,I,C,t,i){let{index:n,offset:A}=e.findIndex(g),s=e.maybeChild(n);if(A==g||s.isText)return i&&C<=0&&t<=0&&!i.canReplace(n,n,I)?null:e.cut(0,g).append(I).append(e.cut(g));let o=Iz(s.content,g-A-1,I,n==0?C-1:0,n==e.childCount-1?t-1:0,s);return o&&e.replaceChild(n,s.copy(o))}function X6g(e,g,I){if(I.openStart>e.depth)throw new dh("Inserted content deeper than insertion position");if(e.depth-I.openStart!=g.depth-I.openEnd)throw new dh("Inconsistent open depths");return ez(e,g,I,0)}function ez(e,g,I,C){let t=e.index(C),i=e.node(C);if(t==g.index(C)&&C<e.depth-I.openStart){let n=ez(e,g,I,C+1);return i.copy(i.content.replaceChild(t,n))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&e.depth==C&&g.depth==C){let n=e.parent,A=n.content;return xc(n,A.cut(0,e.parentOffset).append(I.content).append(A.cut(g.parentOffset)))}else{let{start:n,end:A}=R6g(I,e);return xc(i,tz(e,n,A,g,C))}else return xc(i,cp(e,g,C))}function Cz(e,g){if(!g.type.compatibleContent(e.type))throw new dh("Cannot join "+g.type.name+" onto "+e.type.name)}function S9(e,g,I){let C=e.node(I);return Cz(C,g.node(I)),C}function Jc(e,g){let I=g.length-1;I>=0&&e.isText&&e.sameMarkup(g[I])?g[I]=e.withText(g[I].text+e.text):g.push(e)}function ch(e,g,I,C){let t=(g||e).node(I),i=0,n=g?g.index(I):t.childCount;e&&(i=e.index(I),e.depth>I?i++:e.textOffset&&(Jc(e.nodeAfter,C),i++));for(let A=i;A<n;A++)Jc(t.child(A),C);g&&g.depth==I&&g.textOffset&&Jc(g.nodeBefore,C)}function xc(e,g){if(!e.type.validContent(g))throw new dh("Invalid content for node "+e.type.name);return e.copy(g)}function tz(e,g,I,C,t){let i=e.depth>t&&S9(e,g,t+1),n=C.depth>t&&S9(I,C,t+1),A=[];return ch(null,e,t,A),i&&n&&g.index(t)==I.index(t)?(Cz(i,n),Jc(xc(i,tz(e,g,I,C,t+1)),A)):(i&&Jc(xc(i,cp(e,g,t+1)),A),ch(g,I,t,A),n&&Jc(xc(n,cp(I,C,t+1)),A)),ch(C,null,t,A),new Dg(A)}function cp(e,g,I){let C=[];if(ch(null,e,I,C),e.depth>I){let t=S9(e,g,I+1);Jc(xc(t,cp(e,g,I+1)),C)}return ch(g,null,I,C),new Dg(C)}function R6g(e,g){let I=g.depth-e.openStart,t=g.node(I).copy(e.content);for(let i=I-1;i>=0;i--)t=g.node(i).copy(Dg.from(t));return{start:t.resolveNoCache(e.openStart+I),end:t.resolveNoCache(t.content.size-e.openEnd-I)}}class mh{constructor(g,I,C){this.pos=g,this.path=I,this.parentOffset=C,this.depth=I.length/3-1}resolveDepth(g){return g==null?this.depth:g<0?this.depth+g:g}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(g){return this.path[this.resolveDepth(g)*3]}index(g){return this.path[this.resolveDepth(g)*3+1]}indexAfter(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}start(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}end(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}before(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}after(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let g=this.parent,I=this.index(this.depth);if(I==g.childCount)return null;let C=this.pos-this.path[this.path.length-1],t=g.child(I);return C?g.child(I).cut(C):t}get nodeBefore(){let g=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child(g).cut(0,I):g==0?null:this.parent.child(g-1)}posAtIndex(g,I){I=this.resolveDepth(I);let C=this.path[I*3],t=I==0?0:this.path[I*3-1]+1;for(let i=0;i<g;i++)t+=C.child(i).nodeSize;return t}marks(){let g=this.parent,I=this.index();if(g.content.size==0)return Ne.none;if(this.textOffset)return g.child(I).marks;let C=g.maybeChild(I-1),t=g.maybeChild(I);if(!C){let A=C;C=t,t=A}let i=C.marks;for(var n=0;n<i.length;n++)i[n].type.spec.inclusive===!1&&(!t||!i[n].isInSet(t.marks))&&(i=i[n--].removeFromSet(i));return i}marksAcross(g){let I=this.parent.maybeChild(this.index());if(!I||!I.isInline)return null;let C=I.marks,t=g.parent.maybeChild(g.index());for(var i=0;i<C.length;i++)C[i].type.spec.inclusive===!1&&(!t||!C[i].isInSet(t.marks))&&(C=C[i--].removeFromSet(C));return C}sharedDepth(g){for(let I=this.depth;I>0;I--)if(this.start(I)<=g&&this.end(I)>=g)return I;return 0}blockRange(g=this,I){if(g.pos<this.pos)return g.blockRange(this);for(let C=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);C>=0;C--)if(g.pos<=this.end(C)&&(!I||I(this.node(C))))return new mp(this,g,C);return null}sameParent(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}max(g){return g.pos>this.pos?g:this}min(g){return g.pos<this.pos?g:this}toString(){let g="";for(let I=1;I<=this.depth;I++)g+=(g?"/":"")+this.node(I).type.name+"_"+this.index(I-1);return g+":"+this.parentOffset}static resolve(g,I){if(!(I>=0&&I<=g.content.size))throw new RangeError("Position "+I+" out of range");let C=[],t=0,i=I;for(let n=g;;){let{index:A,offset:s}=n.content.findIndex(i),o=i-s;if(C.push(n,A,t+s),!o||(n=n.child(A),n.isText))break;i=o-1,t+=s+1}return new mh(I,C,i)}static resolveCached(g,I){let C=iz.get(g);if(C)for(let i=0;i<C.elts.length;i++){let n=C.elts[i];if(n.pos==I)return n}else iz.set(g,C=new M6g);let t=C.elts[C.i]=mh.resolve(g,I);return C.i=(C.i+1)%H6g,t}}class M6g{constructor(){this.elts=[],this.i=0}}const H6g=12,iz=new WeakMap;class mp{constructor(g,I,C){this.$from=g,this.$to=I,this.depth=C}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const f6g=Object.create(null);let Da=class p3{constructor(g,I,C,t=Ne.none){this.type=g,this.attrs=I,this.marks=t,this.content=C||Dg.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(g){return this.content.child(g)}maybeChild(g){return this.content.maybeChild(g)}forEach(g){this.content.forEach(g)}nodesBetween(g,I,C,t=0){this.content.nodesBetween(g,I,C,t,this)}descendants(g){this.nodesBetween(0,this.content.size,g)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(g,I,C,t){return this.content.textBetween(g,I,C,t)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}sameMarkup(g){return this.hasMarkup(g.type,g.attrs,g.marks)}hasMarkup(g,I,C){return this.type==g&&dp(this.attrs,I||g.defaultAttrs||f6g)&&Ne.sameSet(this.marks,C||Ne.none)}copy(g=null){return g==this.content?this:new p3(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new p3(this.type,this.attrs,this.content,g)}cut(g,I=this.content.size){return g==0&&I==this.content.size?this:this.copy(this.content.cut(g,I))}slice(g,I=this.content.size,C=!1){if(g==I)return Eg.empty;let t=this.resolve(g),i=this.resolve(I),n=C?0:t.sharedDepth(I),A=t.start(n),o=t.node(n).content.cut(t.pos-A,i.pos-A);return new Eg(o,t.depth-n,i.depth-n)}replace(g,I,C){return X6g(this.resolve(g),this.resolve(I),C)}nodeAt(g){for(let I=this;;){let{index:C,offset:t}=I.content.findIndex(g);if(I=I.maybeChild(C),!I)return null;if(t==g||I.isText)return I;g-=t+1}}childAfter(g){let{index:I,offset:C}=this.content.findIndex(g);return{node:this.content.maybeChild(I),index:I,offset:C}}childBefore(g){if(g==0)return{node:null,index:0,offset:0};let{index:I,offset:C}=this.content.findIndex(g);if(C<g)return{node:this.content.child(I),index:I,offset:C};let t=this.content.child(I-1);return{node:t,index:I-1,offset:C-t.nodeSize}}resolve(g){return mh.resolveCached(this,g)}resolveNoCache(g){return mh.resolve(this,g)}rangeHasMark(g,I,C){let t=!1;return I>g&&this.nodesBetween(g,I,i=>(C.isInSet(i.marks)&&(t=!0),!t)),t}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),nz(this.marks,g)}contentMatchAt(g){let I=this.type.contentMatch.matchFragment(this.content,0,g);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace(g,I,C=Dg.empty,t=0,i=C.childCount){let n=this.contentMatchAt(g).matchFragment(C,t,i),A=n&&n.matchFragment(this.content,I);if(!A||!A.validEnd)return!1;for(let s=t;s<i;s++)if(!this.type.allowsMarks(C.child(s).marks))return!1;return!0}canReplaceWith(g,I,C,t){if(t&&!this.type.allowsMarks(t))return!1;let i=this.contentMatchAt(g).matchType(C),n=i&&i.matchFragment(this.content,I);return n?n.validEnd:!1}canAppend(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let g=Ne.none;for(let I=0;I<this.marks.length;I++){let C=this.marks[I];C.type.checkAttrs(C.attrs),g=C.addToSet(g)}if(!Ne.sameSet(g,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(I=>I.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(I=>I.toJSON())),g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let C;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");C=I.marks.map(g.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(I.text,C)}let t=Dg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,C);return i.type.checkAttrs(i.attrs),i}};Da.prototype.text=void 0;class rp extends Da{constructor(g,I,C,t){if(super(g,I,null,t),!C)throw new RangeError("Empty text nodes are not allowed");this.text=C}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nz(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new rp(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new rp(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function nz(e,g){for(let I=e.length-1;I>=0;I--)g=e[I].type.name+"("+g+")";return g}class Tc{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let C=new S6g(g,I);if(C.next==null)return Tc.empty;let t=Az(C);C.next&&C.err("Unexpected trailing text");let i=x6g(J6g(t));return T6g(i,C),i}matchType(g){for(let I=0;I<this.next.length;I++)if(this.next[I].type==g)return this.next[I].next;return null}matchFragment(g,I=0,C=g.childCount){let t=this;for(let i=I;t&&i<C;i++)t=t.matchType(g.child(i).type);return t}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let g=0;g<this.next.length;g++){let{type:I}=this.next[g];if(!(I.isText||I.hasRequiredAttrs()))return I}return null}compatible(g){for(let I=0;I<this.next.length;I++)for(let C=0;C<g.next.length;C++)if(this.next[I].type==g.next[C].type)return!0;return!1}fillBefore(g,I=!1,C=0){let t=[this];function i(n,A){let s=n.matchFragment(g,C);if(s&&(!I||s.validEnd))return Dg.from(A.map(o=>o.createAndFill()));for(let o=0;o<n.next.length;o++){let{type:a,next:d}=n.next[o];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,A.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let C=0;C<this.wrapCache.length;C+=2)if(this.wrapCache[C]==g)return this.wrapCache[C+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),C=[{match:this,type:null,via:null}];for(;C.length;){let t=C.shift(),i=t.match;if(i.matchType(g)){let n=[];for(let A=t;A.type;A=A.via)n.push(A.type);return n.reverse()}for(let n=0;n<i.next.length;n++){let{type:A,next:s}=i.next[n];!A.isLeaf&&!A.hasRequiredAttrs()&&!(A.name in I)&&(!t.type||s.validEnd)&&(C.push({match:A.contentMatch,type:A,via:t}),I[A.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(g){if(g>=this.next.length)throw new RangeError(`There's no ${g}th edge in this content match`);return this.next[g]}toString(){let g=[];function I(C){g.push(C);for(let t=0;t<C.next.length;t++)g.indexOf(C.next[t].next)==-1&&I(C.next[t].next)}return I(this),g.map((C,t)=>{let i=t+(C.validEnd?"*":" ")+" ";for(let n=0;n<C.next.length;n++)i+=(n?", ":"")+C.next[n].type.name+"->"+g.indexOf(C.next[n].next);return i}).join(`
|
|
1686
1686
|
`)}}Tc.empty=new Tc(!0);class S6g{constructor(g,I){this.string=g,this.nodeTypes=I,this.inline=null,this.pos=0,this.tokens=g.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(g){return this.next==g&&(this.pos++||!0)}err(g){throw new SyntaxError(g+" (in content expression '"+this.string+"')")}}function Az(e){let g=[];do g.push(D6g(e));while(e.eat("|"));return g.length==1?g[0]:{type:"choice",exprs:g}}function D6g(e){let g=[];do g.push(k6g(e));while(e.next&&e.next!=")"&&e.next!="|");return g.length==1?g[0]:{type:"seq",exprs:g}}function k6g(e){let g=z6g(e);for(;;)if(e.eat("+"))g={type:"plus",expr:g};else if(e.eat("*"))g={type:"star",expr:g};else if(e.eat("?"))g={type:"opt",expr:g};else if(e.eat("{"))g=F6g(e,g);else break;return g}function lz(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let g=Number(e.next);return e.pos++,g}function F6g(e,g){let I=lz(e),C=I;return e.eat(",")&&(e.next!="}"?C=lz(e):C=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:I,max:C,expr:g}}function K6g(e,g){let I=e.nodeTypes,C=I[g];if(C)return[C];let t=[];for(let i in I){let n=I[i];n.isInGroup(g)&&t.push(n)}return t.length==0&&e.err("No node type or group '"+g+"' found"),t}function z6g(e){if(e.eat("(")){let g=Az(e);return e.eat(")")||e.err("Missing closing paren"),g}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let g=K6g(e,e.next).map(I=>(e.inline==null?e.inline=I.isInline:e.inline!=I.isInline&&e.err("Mixing inline and block content"),{type:"name",value:I}));return e.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function J6g(e){let g=[[]];return t(i(e,0),I()),g;function I(){return g.push([])-1}function C(n,A,s){let o={term:s,to:A};return g[n].push(o),o}function t(n,A){n.forEach(s=>s.to=A)}function i(n,A){if(n.type=="choice")return n.exprs.reduce((s,o)=>s.concat(i(o,A)),[]);if(n.type=="seq")for(let s=0;;s++){let o=i(n.exprs[s],A);if(s==n.exprs.length-1)return o;t(o,A=I())}else if(n.type=="star"){let s=I();return C(A,s),t(i(n.expr,s),s),[C(s)]}else if(n.type=="plus"){let s=I();return t(i(n.expr,A),s),t(i(n.expr,s),s),[C(s)]}else{if(n.type=="opt")return[C(A)].concat(i(n.expr,A));if(n.type=="range"){let s=A;for(let o=0;o<n.min;o++){let a=I();t(i(n.expr,s),a),s=a}if(n.max==-1)t(i(n.expr,s),s);else for(let o=n.min;o<n.max;o++){let a=I();C(s,a),t(i(n.expr,s),a),s=a}return[C(s)]}else{if(n.type=="name")return[C(A,void 0,n.value)];throw new Error("Unknown expr type")}}}}function sz(e,g){return g-e}function oz(e,g){let I=[];return C(g),I.sort(sz);function C(t){let i=e[t];if(i.length==1&&!i[0].term)return C(i[0].to);I.push(t);for(let n=0;n<i.length;n++){let{term:A,to:s}=i[n];!A&&I.indexOf(s)==-1&&C(s)}}}function x6g(e){let g=Object.create(null);return I(oz(e,0));function I(C){let t=[];C.forEach(n=>{e[n].forEach(({term:A,to:s})=>{if(!A)return;let o;for(let a=0;a<t.length;a++)t[a][0]==A&&(o=t[a][1]);oz(e,s).forEach(a=>{o||t.push([A,o=[]]),o.indexOf(a)==-1&&o.push(a)})})});let i=g[C.join(",")]=new Tc(C.indexOf(e.length-1)>-1);for(let n=0;n<t.length;n++){let A=t[n][1].sort(sz);i.next.push({type:t[n][0],next:g[A.join(",")]||I(A)})}return i}}function T6g(e,g){for(let I=0,C=[e];I<C.length;I++){let t=C[I],i=!t.validEnd,n=[];for(let A=0;A<t.next.length;A++){let{type:s,next:o}=t.next[A];n.push(s.name),i&&!(s.isText||s.hasRequiredAttrs())&&(i=!1),C.indexOf(o)==-1&&C.push(o)}i&&g.err("Only non-generatable nodes ("+n.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function az(e){let g=Object.create(null);for(let I in e){let C=e[I];if(!C.hasDefault)return null;g[I]=C.default}return g}function dz(e,g){let I=Object.create(null);for(let C in e){let t=g&&g[C];if(t===void 0){let i=e[C];if(i.hasDefault)t=i.default;else throw new RangeError("No value supplied for attribute "+C)}I[C]=t}return I}function cz(e,g,I,C){for(let t in g)if(!(t in e))throw new RangeError(`Unsupported attribute ${t} for ${I} of type ${C}`);for(let t in e)e[t].validate&&e[t].validate(g[t])}function mz(e,g){let I=Object.create(null);if(g)for(let C in g)I[C]=new v6g(e,C,g[C]);return I}let rz=class yQ{constructor(g,I,C){this.name=g,this.schema=I,this.spec=C,this.markSet=null,this.groups=C.group?C.group.split(" "):[],this.attrs=mz(g,C.attrs),this.defaultAttrs=az(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(C.inline||g=="text"),this.isText=g=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Tc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(g){return this.groups.indexOf(g)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let g in this.attrs)if(this.attrs[g].isRequired)return!0;return!1}compatibleContent(g){return this==g||this.contentMatch.compatible(g.contentMatch)}computeAttrs(g){return!g&&this.defaultAttrs?this.defaultAttrs:dz(this.attrs,g)}create(g=null,I,C){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Da(this,this.computeAttrs(g),Dg.from(I),Ne.setFrom(C))}createChecked(g=null,I,C){return I=Dg.from(I),this.checkContent(I),new Da(this,this.computeAttrs(g),I,Ne.setFrom(C))}createAndFill(g=null,I,C){if(g=this.computeAttrs(g),I=Dg.from(I),I.size){let n=this.contentMatch.fillBefore(I);if(!n)return null;I=n.append(I)}let t=this.contentMatch.matchFragment(I),i=t&&t.fillBefore(Dg.empty,!0);return i?new Da(this,g,I.append(i),Ne.setFrom(C)):null}validContent(g){let I=this.contentMatch.matchFragment(g);if(!I||!I.validEnd)return!1;for(let C=0;C<g.childCount;C++)if(!this.allowsMarks(g.child(C).marks))return!1;return!0}checkContent(g){if(!this.validContent(g))throw new RangeError(`Invalid content for node ${this.name}: ${g.toString().slice(0,50)}`)}checkAttrs(g){cz(this.attrs,g,"node",this.name)}allowsMarkType(g){return this.markSet==null||this.markSet.indexOf(g)>-1}allowsMarks(g){if(this.markSet==null)return!0;for(let I=0;I<g.length;I++)if(!this.allowsMarkType(g[I].type))return!1;return!0}allowedMarks(g){if(this.markSet==null)return g;let I;for(let C=0;C<g.length;C++)this.allowsMarkType(g[C].type)?I&&I.push(g[C]):I||(I=g.slice(0,C));return I?I.length?I:Ne.none:g}static compile(g,I){let C=Object.create(null);g.forEach((i,n)=>C[i]=new yQ(i,I,n));let t=I.spec.topNode||"doc";if(!C[t])throw new RangeError("Schema is missing its top node type ('"+t+"')");if(!C.text)throw new RangeError("Every schema needs a 'text' type");for(let i in C.text.attrs)throw new RangeError("The text node type should not have attributes");return C}};function L6g(e,g,I){let C=I.split("|");return t=>{let i=t===null?"null":typeof t;if(C.indexOf(i)<0)throw new RangeError(`Expected value of type ${C} for attribute ${g} on type ${e}, got ${i}`)}}class v6g{constructor(g,I,C){this.hasDefault=Object.prototype.hasOwnProperty.call(C,"default"),this.default=C.default,this.validate=typeof C.validate=="string"?L6g(g,I,C.validate):C.validate}get isRequired(){return!this.hasDefault}}class Zp{constructor(g,I,C,t){this.name=g,this.rank=I,this.schema=C,this.spec=t,this.attrs=mz(g,t.attrs),this.excluded=null;let i=az(this.attrs);this.instance=i?new Ne(this,i):null}create(g=null){return!g&&this.instance?this.instance:new Ne(this,dz(this.attrs,g))}static compile(g,I){let C=Object.create(null),t=0;return g.forEach((i,n)=>C[i]=new Zp(i,t++,I,n)),C}removeFromSet(g){for(var I=0;I<g.length;I++)g[I].type==this&&(g=g.slice(0,I).concat(g.slice(I+1)),I--);return g}isInSet(g){for(let I=0;I<g.length;I++)if(g[I].type==this)return g[I]}checkAttrs(g){cz(this.attrs,g,"mark",this.name)}excludes(g){return this.excluded.indexOf(g)>-1}}class Zz{constructor(g){this.linebreakReplacement=null,this.cached=Object.create(null);let I=this.spec={};for(let t in g)I[t]=g[t];I.nodes=rt.from(g.nodes),I.marks=rt.from(g.marks||{}),this.nodes=rz.compile(this.spec.nodes,this),this.marks=Zp.compile(this.spec.marks,this);let C=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let i=this.nodes[t],n=i.spec.content||"",A=i.spec.marks;if(i.contentMatch=C[n]||(C[n]=Tc.parse(n,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=A=="_"?null:A?uz(this,A.split(" ")):A==""||!i.inlineContent?[]:null}for(let t in this.marks){let i=this.marks[t],n=i.spec.excludes;i.excluded=n==null?[i]:n==""?[]:uz(this,n.split(" "))}this.nodeFromJSON=t=>Da.fromJSON(this,t),this.markFromJSON=t=>Ne.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(g,I=null,C,t){if(typeof g=="string")g=this.nodeType(g);else if(g instanceof rz){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(I,C,t)}text(g,I){let C=this.nodes.text;return new rp(C,C.defaultAttrs,g,Ne.setFrom(I))}mark(g,I){return typeof g=="string"&&(g=this.marks[g]),g.create(I)}nodeType(g){let I=this.nodes[g];if(!I)throw new RangeError("Unknown node type: "+g);return I}}function uz(e,g){let I=[];for(let C=0;C<g.length;C++){let t=g[C],i=e.marks[t],n=i;if(i)I.push(i);else for(let A in e.marks){let s=e.marks[A];(t=="_"||s.spec.group&&s.spec.group.split(" ").indexOf(t)>-1)&&I.push(n=s)}if(!n)throw new SyntaxError("Unknown mark type: '"+g[C]+"'")}return I}function j6g(e){return e.tag!=null}function Q6g(e){return e.style!=null}class ka{constructor(g,I){this.schema=g,this.rules=I,this.tags=[],this.styles=[];let C=this.matchedStyles=[];I.forEach(t=>{if(j6g(t))this.tags.push(t);else if(Q6g(t)){let i=/[^=]*/.exec(t.style)[0];C.indexOf(i)<0&&C.push(i),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let i=g.nodes[t.node];return i.contentMatch.matchType(i)})}parse(g,I={}){let C=new wz(this,I,!1);return C.addAll(g,Ne.none,I.from,I.to),C.finish()}parseSlice(g,I={}){let C=new wz(this,I,!0);return C.addAll(g,Ne.none,I.from,I.to),Eg.maxOpen(C.finish())}matchTag(g,I,C){for(let t=C?this.tags.indexOf(C)+1:0;t<this.tags.length;t++){let i=this.tags[t];if(E6g(g,i.tag)&&(i.namespace===void 0||g.namespaceURI==i.namespace)&&(!i.context||I.matchesContext(i.context))){if(i.getAttrs){let n=i.getAttrs(g);if(n===!1)continue;i.attrs=n||void 0}return i}}}matchStyle(g,I,C,t){for(let i=t?this.styles.indexOf(t)+1:0;i<this.styles.length;i++){let n=this.styles[i],A=n.style;if(!(A.indexOf(g)!=0||n.context&&!C.matchesContext(n.context)||A.length>g.length&&(A.charCodeAt(g.length)!=61||A.slice(g.length+1)!=I))){if(n.getAttrs){let s=n.getAttrs(I);if(s===!1)continue;n.attrs=s||void 0}return n}}}static schemaRules(g){let I=[];function C(t){let i=t.priority==null?50:t.priority,n=0;for(;n<I.length;n++){let A=I[n];if((A.priority==null?50:A.priority)<i)break}I.splice(n,0,t)}for(let t in g.marks){let i=g.marks[t].spec.parseDOM;i&&i.forEach(n=>{C(n=Wz(n)),n.mark||n.ignore||n.clearMark||(n.mark=t)})}for(let t in g.nodes){let i=g.nodes[t].spec.parseDOM;i&&i.forEach(n=>{C(n=Wz(n)),n.node||n.ignore||n.mark||(n.node=t)})}return I}static fromSchema(g){return g.cached.domParser||(g.cached.domParser=new ka(g,ka.schemaRules(g)))}}const bz={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},O6g={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hz={ol:!0,ul:!0},rh=1,D9=2,Zh=4;function Gz(e,g,I){return g!=null?(g?rh:0)|(g==="full"?D9:0):e&&e.whitespace=="pre"?rh|D9:I&~Zh}class up{constructor(g,I,C,t,i,n){this.type=g,this.attrs=I,this.marks=C,this.solid=t,this.options=n,this.content=[],this.activeMarks=Ne.none,this.match=i||(n&Zh?null:g.contentMatch)}findWrapping(g){if(!this.match){if(!this.type)return[];let I=this.type.contentMatch.fillBefore(Dg.from(g));if(I)this.match=this.type.contentMatch.matchFragment(I);else{let C=this.type.contentMatch,t;return(t=C.findWrapping(g.type))?(this.match=C,t):null}}return this.match.findWrapping(g.type)}finish(g){if(!(this.options&rh)){let C=this.content[this.content.length-1],t;if(C&&C.isText&&(t=/[ \t\r\n\u000c]+$/.exec(C.text))){let i=C;C.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-t[0].length))}}let I=Dg.from(this.content);return!g&&this.match&&(I=I.append(this.match.fillBefore(Dg.empty,!0))),this.type?this.type.create(this.attrs,I,this.marks):I}inlineContext(g){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:g.parentNode&&!bz.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}class wz{constructor(g,I,C){this.parser=g,this.options=I,this.isOpen=C,this.open=0,this.localPreserveWS=!1;let t=I.topNode,i,n=Gz(null,I.preserveWhitespace,0)|(C?Zh:0);t?i=new up(t.type,t.attrs,Ne.none,!0,I.topMatch||t.type.contentMatch,n):C?i=new up(null,null,Ne.none,!0,null,n):i=new up(g.schema.topNodeType,null,Ne.none,!0,null,n),this.nodes=[i],this.find=I.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(g,I){g.nodeType==3?this.addTextNode(g,I):g.nodeType==1&&this.addElement(g,I)}addTextNode(g,I){let C=g.nodeValue,t=this.top,i=t.options&D9?"full":this.localPreserveWS||(t.options&rh)>0,{schema:n}=this.parser;if(i==="full"||t.inlineContext(g)||/[^ \t\r\n\u000c]/.test(C)){if(i)if(i==="full")C=C.replace(/\r\n?/g,`
|
|
1687
1687
|
`);else if(n.linebreakReplacement&&/[\r\n]/.test(C)&&this.top.findWrapping(n.linebreakReplacement.create())){let A=C.split(/\r?\n|\r/);for(let s=0;s<A.length;s++)s&&this.insertNode(n.linebreakReplacement.create(),I,!0),A[s]&&this.insertNode(n.text(A[s]),I,!/\S/.test(A[s]));C=""}else C=C.replace(/\r?\n|\r/g," ");else if(C=C.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(C)&&this.open==this.nodes.length-1){let A=t.content[t.content.length-1],s=g.previousSibling;(!A||s&&s.nodeName=="BR"||A.isText&&/[ \t\r\n\u000c]$/.test(A.text))&&(C=C.slice(1))}C&&this.insertNode(n.text(C),I,!/\S/.test(C)),this.findInText(g)}else this.findInside(g)}addElement(g,I,C){let t=this.localPreserveWS,i=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);let n=g.nodeName.toLowerCase(),A;hz.hasOwnProperty(n)&&this.parser.normalizeLists&&U6g(g);let s=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(A=this.parser.matchTag(g,this,C));g:if(s?s.ignore:O6g.hasOwnProperty(n))this.findInside(g),this.ignoreFallback(g,I);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(g=s.skip);let o,a=this.needsBlock;if(bz.hasOwnProperty(n))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),o=!0,i.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,I);break g}let d=s&&s.skip?I:this.readStyles(g,I);d&&this.addAll(g,d),o&&this.sync(i),this.needsBlock=a}else{let o=this.readStyles(g,I);o&&this.addElementByRule(g,s,o,s.consuming===!1?A:void 0)}this.localPreserveWS=t}leafFallback(g,I){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
|