@pksep/yui 0.1.337 → 0.1.338

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 CHANGED
@@ -81372,7 +81372,7 @@ const geI = ["id", "data-testid"], IeI = ["data-testid"], eeI = ["data-testid"],
81372
81372
  ], 64))
81373
81373
  ], 10, UeI));
81374
81374
  }
81375
- }), JH = /* @__PURE__ */ CI(EeI, [["__scopeId", "data-v-6b48ff96"]]), PeI = /* @__PURE__ */ Wg({
81375
+ }), JH = /* @__PURE__ */ CI(EeI, [["__scopeId", "data-v-c88eb961"]]), PeI = /* @__PURE__ */ Wg({
81376
81376
  name: "SectionTableRow",
81377
81377
  __name: "SectionTableRow",
81378
81378
  props: {
@@ -1686,7 +1686,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
1686
1686
  * Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
1687
1687
  * Licensed under MIT
1688
1688
  */function go(e){return getComputedStyle(e)}function Li(e,g){for(var I in g){var C=g[I];typeof C=="number"&&(C=C+"px"),e.style[I]=C}return e}function lp(e){var g=document.createElement("div");return g.className=e,g}var _K=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function ka(e,g){if(!_K)throw new Error("No element matching method supported");return _K.call(e,g)}function YZ(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function qK(e,g){return Array.prototype.filter.call(e.children,function(I){return ka(I,g)})}var HC={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}}},$K={x:null,y:null};function gz(e,g){var I=e.element.classList,C=HC.state.scrolling(g);I.contains(C)?clearTimeout($K[g]):I.add(C)}function Iz(e,g){$K[g]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(HC.state.scrolling(g))},e.settings.scrollingThreshold)}function IPg(e,g){gz(e,g),Iz(e,g)}var lh=function(g){this.element=g,this.handlers={}},ez={isEmpty:{configurable:!0}};lh.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},lh.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)})},lh.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},ez.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(g){return e.handlers[g].length===0})},Object.defineProperties(lh.prototype,ez);var yZ=function(){this.eventElements=[]};yZ.prototype.eventElement=function(g){var I=this.eventElements.filter(function(C){return C.element===g})[0];return I||(I=new lh(g),this.eventElements.push(I)),I},yZ.prototype.bind=function(g,I,C){this.eventElement(g).bind(I,C)},yZ.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)},yZ.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},yZ.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 op(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 sp(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");ePg(e,I,i,C,t)}function ePg(e,g,I,C,t){var i=I[0],n=I[1],A=I[2],o=I[3],s=I[4],a=I[5];C===void 0&&(C=!0),t===void 0&&(t=!1);var d=e.element;e.reach[o]=null,d[A]<1&&(e.reach[o]="start"),d[A]>e[i]-e[n]-1&&(e.reach[o]="end"),g&&(d.dispatchEvent(op("ps-scroll-"+o)),g<0?d.dispatchEvent(op("ps-scroll-"+s)):g>0&&d.dispatchEvent(op("ps-scroll-"+a)),C&&IPg(e,o)),e.reach[o]&&(g||t)&&d.dispatchEvent(op("ps-"+o+"-reach-"+e.reach[o]))}function $e(e){return parseInt(e,10)||0}function CPg(e){return ka(e,"input,[contenteditable]")||ka(e,"select,[contenteditable]")||ka(e,"textarea,[contenteditable]")||ka(e,"button,[contenteditable]")}function tPg(e){var g=go(e);return $e(g.width)+$e(g.paddingLeft)+$e(g.paddingRight)+$e(g.borderLeftWidth)+$e(g.borderRightWidth)}var NZ={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 $o(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)||(qK(g,HC.element.rail("x")).forEach(function(t){return YZ(t)}),g.appendChild(e.scrollbarXRail)),g.contains(e.scrollbarYRail)||(qK(g,HC.element.rail("y")).forEach(function(t){return YZ(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=Cz(e,$e(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=$e((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=Cz(e,$e(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=$e(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),iPg(g,e),e.scrollbarXActive?g.classList.add(HC.state.active("x")):(g.classList.remove(HC.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,g.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?g.classList.add(HC.state.active("y")):(g.classList.remove(HC.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,g.scrollTop=0)}function Cz(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 iPg(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,Li(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,Li(g.scrollbarYRail,t),Li(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),Li(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function nPg(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,$o(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,$o(e),g.stopPropagation()})}var ap=null;function APg(e){tz(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),tz(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function tz(e,g){var I=g[0],C=g[1],t=g[2],i=g[3],n=g[4],A=g[5],o=g[6],s=g[7],a=g[8],d=e.element,r=null,Z=null,b=null;function h(W){W.touches&&W.touches[0]&&(W[t]=W.touches[0]["page"+s.toUpperCase()]),ap===n&&(d[o]=r+b*(W[t]-Z),gz(e,s),$o(e),W.stopPropagation(),W.preventDefault())}function G(){Iz(e,s),e[a].classList.remove(HC.state.clicking),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",h),document.removeEventListener("touchend",G),ap=null}function w(W){ap===null&&(ap=n,r=d[o],W.touches&&(W[t]=W.touches[0]["page"+s.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(HC.state.clicking)),W.stopPropagation(),W.cancelable&&W.preventDefault()}e[n].addEventListener("mousedown",w),e[n].addEventListener("touchstart",w)}function lPg(e){var g=e.element,I=function(){return ka(g,":hover")},C=function(){return ka(e.scrollbarX,":focus")||ka(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 o=g.scrollLeft;if(n===0){if(!e.scrollbarXActive)return!1;if(o===0&&i<0||o>=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(CPg(n))return}var A=0,o=0;switch(i.which){case 37:i.metaKey?A=-e.contentWidth:i.altKey?A=-e.containerWidth:A=-30;break;case 38:i.metaKey?o=e.contentHeight:i.altKey?o=e.containerHeight:o=30;break;case 39:i.metaKey?A=e.contentWidth:i.altKey?A=e.containerWidth:A=30;break;case 40:i.metaKey?o=-e.contentHeight:i.altKey?o=-e.containerHeight:o=-30;break;case 32:i.shiftKey?o=e.containerHeight:o=-e.containerHeight;break;case 33:o=e.containerHeight;break;case 34:o=-e.containerHeight;break;case 36:o=e.contentHeight;break;case 35:o=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&A!==0||e.settings.suppressScrollY&&o!==0||(g.scrollTop-=o,g.scrollLeft+=A,$o(e),t(A,o)&&i.preventDefault())}})}function oPg(e){var g=e.element;function I(n,A){var o=Math.floor(g.scrollTop),s=g.scrollTop===0,a=o+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,r=g.scrollLeft+g.offsetWidth===g.scrollWidth,Z;return Math.abs(A)>Math.abs(n)?Z=s||a:Z=d||r,Z?!e.settings.wheelPropagation:!0}function C(n){var A=n.deltaX,o=-1*n.deltaY;return(typeof A>"u"||typeof o>"u")&&(A=-1*n.wheelDeltaX/6,o=n.wheelDeltaY/6),n.deltaMode&&n.deltaMode===1&&(A*=10,o*=10),A!==A&&o!==o&&(A=0,o=n.wheelDelta),n.shiftKey?[-o,-A]:[A,o]}function t(n,A,o){if(!NZ.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(n))return!1;for(var s=n;s&&s!==g;){if(s.classList.contains(HC.element.consuming))return!0;var a=go(s);if(o&&a.overflowY.match(/(scroll|auto)/)){var d=s.scrollHeight-s.clientHeight;if(d>0&&(s.scrollTop>0&&o<0||s.scrollTop<d&&o>0))return!0}if(A&&a.overflowX.match(/(scroll|auto)/)){var r=s.scrollWidth-s.clientWidth;if(r>0&&(s.scrollLeft>0&&A<0||s.scrollLeft<r&&A>0))return!0}s=s.parentNode}return!1}function i(n){var A=C(n),o=A[0],s=A[1];if(!t(n.target,o,s)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(s?g.scrollTop-=s*e.settings.wheelSpeed:g.scrollTop+=o*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?g.scrollLeft+=o*e.settings.wheelSpeed:g.scrollLeft-=s*e.settings.wheelSpeed,a=!0):(g.scrollTop-=s*e.settings.wheelSpeed,g.scrollLeft+=o*e.settings.wheelSpeed),$o(e),a=a||I(o,s),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 sPg(e){if(!NZ.supportsTouch&&!NZ.supportsIePointer)return;var g=e.element,I={startOffset:{},startTime:0,speed:{},easingLoop:null};function C(d,r){var Z=Math.floor(g.scrollTop),b=g.scrollLeft,h=Math.abs(d),G=Math.abs(r);if(G>h){if(r<0&&Z===e.contentHeight-e.containerHeight||r>0&&Z===0)return window.scrollY===0&&r>0&&NZ.isChrome}else if(h>G&&(d<0&&b===e.contentWidth-e.containerWidth||d>0&&b===0))return!0;return!0}function t(d,r){g.scrollTop-=r,g.scrollLeft-=d,$o(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 r=i(d);I.startOffset.pageX=r.pageX,I.startOffset.pageY=r.pageY,I.startTime=new Date().getTime(),I.easingLoop!==null&&clearInterval(I.easingLoop)}}function o(d,r,Z){if(!g.contains(d))return!1;for(var b=d;b&&b!==g;){if(b.classList.contains(HC.element.consuming))return!0;var h=go(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(r&&h.overflowX.match(/(scroll|auto)/)){var w=b.scrollWidth-b.clientWidth;if(w>0&&(b.scrollLeft>0&&r<0||b.scrollLeft<w&&r>0))return!0}b=b.parentNode}return!1}function s(d){if(n(d)){var r=i(d),Z={pageX:r.pageX,pageY:r.pageY},b=Z.pageX-I.startOffset.pageX,h=Z.pageY-I.startOffset.pageY;if(o(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))}NZ.supportsTouch?(e.event.bind(g,"touchstart",A),e.event.bind(g,"touchmove",s),e.event.bind(g,"touchend",a)):NZ.supportsIePointer&&(window.PointerEvent?(e.event.bind(g,"pointerdown",A),e.event.bind(g,"pointermove",s),e.event.bind(g,"pointerup",a)):window.MSPointerEvent&&(e.event.bind(g,"MSPointerDown",A),e.event.bind(g,"MSPointerMove",s),e.event.bind(g,"MSPointerUp",a)))}var aPg=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}},dPg={"click-rail":nPg,"drag-thumb":APg,keyboard:lPg,wheel:oPg,touch:sPg},oh=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(HC.main),this.settings=aPg();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(HC.state.focus)},n=function(){return g.classList.remove(HC.state.focus)};this.isRtl=go(g).direction==="rtl",this.isRtl===!0&&g.classList.add(HC.rtl),this.isNegativeScroll=function(){var s=g.scrollLeft,a=null;return g.scrollLeft=-1,a=g.scrollLeft<0,g.scrollLeft=s,a}(),this.negativeScrollAdjustment=this.isNegativeScroll?g.scrollWidth-g.clientWidth:0,this.event=new yZ,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=lp(HC.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=lp(HC.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=go(this.scrollbarXRail);this.scrollbarXBottom=parseInt(A.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=$e(A.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=$e(A.borderLeftWidth)+$e(A.borderRightWidth),Li(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=$e(A.marginLeft)+$e(A.marginRight),Li(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=lp(HC.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=lp(HC.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 o=go(this.scrollbarYRail);this.scrollbarYRight=parseInt(o.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=$e(o.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?tPg(this.scrollbarY):null,this.railBorderYWidth=$e(o.borderTopWidth)+$e(o.borderBottomWidth),Li(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=$e(o.marginTop)+$e(o.marginBottom),Li(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(s){return dPg[s](C)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(s){return C.onScroll(s)}),$o(this)};oh.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Li(this.scrollbarXRail,{display:"block"}),Li(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=$e(go(this.scrollbarXRail).marginLeft)+$e(go(this.scrollbarXRail).marginRight),this.railYMarginHeight=$e(go(this.scrollbarYRail).marginTop)+$e(go(this.scrollbarYRail).marginBottom),Li(this.scrollbarXRail,{display:"none"}),Li(this.scrollbarYRail,{display:"none"}),$o(this),sp(this,"top",0,!1,!0),sp(this,"left",0,!1,!0),Li(this.scrollbarXRail,{display:""}),Li(this.scrollbarYRail,{display:""}))},oh.prototype.onScroll=function(g){this.isAlive&&($o(this),sp(this,"top",this.element.scrollTop-this.lastScrollTop),sp(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},oh.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),YZ(this.scrollbarX),YZ(this.scrollbarY),YZ(this.scrollbarXRail),YZ(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},oh.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const cPg=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,()=>{o(),A()},{deep:!0}),l.onMounted(()=>{i.value&&A()}),l.onBeforeUnmount(()=>{o()});function A(){i.value&&(n.value=new oh(i.value,C.options),d())}function o(){n.value&&(d(!1),n.value.destroy(),n.value=null)}const s={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(r){return function(Z){t(r,Z)}}function d(r=!0){var Z;(Z=n.value)!=null&&Z.element&&Object.entries(s).forEach(([b,h])=>{var G,w;r?(G=n.value)==null||G.element.addEventListener(b,h):(w=n.value)==null||w.element.removeEventListener(b,h)})}return g({ps:n}),(r,Z)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(r.$slots,"default")]),_:3},512))}}),rPg=["data-testid"],B9=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"]},o=(d,r)=>Z=>{for(const b of Z)b.type==="attributes"&&b.attributeName==="style"&&d.style.right!==r&&(d.style.right=r)},s=()=>{var w,W,B,Y,y,X,V,S,H,K,x,L,O,Ig,q,J,_,ug,ag,bg,Ng,Vg,Bg,Fg;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),r=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",r.style.background=((X=(y=C.thrumbStyle)==null?void 0:y.x)==null?void 0:X.background)||"var(--text-brand)",r.style.width=((S=(V=C.thrumbStyle)==null?void 0:V.x)==null?void 0:S.width)||"6px",r.style.right="0px",Z.style.background=((K=(H=C.railStyle)==null?void 0:H.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(o(Z,((Vg=(Ng=C.railStyle)==null?void 0:Ng.y)==null?void 0:Vg.right)||"0px")),G=new MutationObserver(o(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,()=>{s()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),l.onMounted(()=>{s()}),(d,r)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":C.dataTestid},[l.createVNode(l.unref(cPg),{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,rPg))}});var dp=(e=>(e.small="small",e.medium="medium",e.big="big",e))(dp||{}),cp=(e=>(e.circled="circled",e.rounded="rounded",e))(cp||{}),iz=(e=>(e.blue="blue",e.red="red",e))(iz||{});const mPg=["data-testid","checked","disabled"],ZPg=l.defineComponent({__name:"Checkbox",props:{size:{default:dp.medium},circular:{default:cp.rounded},color:{default:iz.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,mPg),l.createVNode(Xg,{class:"checkbox__icon",name:l.unref(cg).checked},null,8,["name"])],2))}}),Y9=Lg(ZPg,[["__scopeId","data-v-ab59c827"]]);var Ge=(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))(Ge||{});const uPg=["data-testid"],bPg=["src","alt"],hPg={key:1,class:"avatar-yui-kit__fallback"},GPg={key:1,class:"avatar-yui-kit__text"},y9=new Set,N9=new Set,sh=Lg(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]}),o=l.computed(()=>!g.url||!C.value||t.value),s=()=>{g.url&&(y9.add(g.url),N9.delete(g.url)),C.value=!0,t.value=!1},a=()=>{g.url&&(N9.add(g.url),y9.delete(g.url)),t.value=!0,C.value=!1};return l.watch(()=>g.url,async d=>{var r;if(C.value=!1,t.value=!1,!!d){if(y9.has(d)){C.value=!0;return}if(N9.has(d)){t.value=!0;return}await l.nextTick(),(r=I.value)!=null&&r.complete&&I.value.naturalWidth>0&&(C.value=!0)}},{immediate:!0}),(d,r)=>(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:s,onError:a},null,42,bPg)):l.createCommentVNode("",!0),o.value?(l.openBlock(),l.createElementBlock("div",hPg,[g.defaultImage?(l.openBlock(),l.createBlock(Xg,{key:0,name:l.unref(cg).avatar,class:"avatar-yui-kit__icon",width:110,height:110},null,8,["name"])):(l.openBlock(),l.createElementBlock("div",GPg,l.toDisplayString(i.value),1))])):l.createCommentVNode("",!0)],14,uPg))}}),[["__scopeId","data-v-ec5e4ff6"]]),wPg=["data-testid"],WPg={class:"list-yui-kit__item-text"},pPg=Lg(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",WPg,l.toDisplayString(e.text),1),l.renderSlot(t.$slots,"default",{},void 0,!0)],10,wPg))}}),[["__scopeId","data-v-41917df3"]]),BPg={class:"menu-yui-kit__list"},YPg={class:"list-yui-kit"},yPg=Lg(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,r=>{r||(t.value=null)});const n=r=>{if(r===Ge.qrAuth){C("unmount-qr-auth");return}C("click",r),r===Ge.theme&&(i.value=!i.value,C("theme-change"))},A=r=>{C("languageSwitch",r)},o=()=>{C("theme-change")},s=r=>({[Ge.profile]:"Profile",[Ge.qrAuth]:"Auth with QR",[Ge.downloadChat]:"Auth with QR",[Ge.theme]:"Theme",[Ge.options]:"Settings",[Ge.exit]:"Log Out",[Ge.help]:"Help"})[r]??"",a=r=>({[Ge.profile]:cg.profile,[Ge.qrAuth]:cg.qrCode,[Ge.downloadChat]:cg.download,[Ge.theme]:cg.darkThemeSwitcher,[Ge.options]:cg.settings,[Ge.exit]:cg.logout,[Ge.help]:cg.help})[r]??cg.profile,d=r=>({[Ge.profile]:"Profile",[Ge.qrAuth]:"QR",[Ge.downloadChat]:"Chat",[Ge.theme]:"Theme",[Ge.options]:"Settings",[Ge.exit]:"Exit",[Ge.help]:"Help"})[r]??r;return(r,Z)=>{var b,h,G;return l.openBlock(),l.createElementBlock("div",BPg,[l.createElementVNode("ul",YPg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.categories,w=>{var W;return l.openBlock(),l.createBlock(pPg,{key:w,"data-testid":`${I.dataTestid}-${d(w)}-Item`,iconName:a(w),text:((W=I.texts)==null?void 0:W[w])??s(w),menuType:w,active:t.value===w,onClick:()=>n(w)},{default:l.withCtx(()=>[w===l.unref(Ge).theme?(l.openBlock(),l.createBlock(Ap,{key:0,modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=B=>i.value=B),disabled:"",theme:"minor",onChange:o},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(fW,{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"]]),NPg=["data-testid"],VPg={class:"menu-yui-kit__wrapper"},XPg={class:"menu-yui-kit__names"},RPg={class:"menu-yui-kit__name"},MPg={class:"menu-yui-kit__role"},HPg={key:0,class:"menu-yui-kit__dropdown"},V9=Lg(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!==Ge.theme&&I.closeAfterClick&&(C.isShow=!1)}const A=l.computed(()=>C.isShow?cg.chevronUp:cg.chevronDown),o=()=>{C.isShow=!C.isShow},s=()=>{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)},r=()=>{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",VPg,[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:o},[l.createVNode(sh,{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",XPg,[l.createElementVNode("p",RPg,l.toDisplayString((G=I.user)==null?void 0:G.name),1),l.createElementVNode("p",MPg,l.toDisplayString((w=I.user)==null?void 0:w.role),1)]),l.createVNode(sI,{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",HPg,[l.createVNode(yPg,{"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:r},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])])):l.createCommentVNode("",!0)])),[[l.unref(To),s,void 0,{bubble:!0}]])],8,NPg)}}}),[["__scopeId","data-v-03bcfc9d"]]);var rp=(e=>(e.default="default",e.minor="minor",e))(rp||{});const fPg=["data-testid"],SPg=["data-testid"],DPg=["data-testid"],kPg=["data-testid","placeholder","required","maxlength","readonly","lang"],FPg=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:rp.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"},spellcheck:{type:Boolean,default:!0},lang:{}},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)},o=()=>{t.isPressed=!1};return l.watch(()=>I.modelValue,s=>{t.inputElement=s}),(s,a)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",i.value]),onFocusout:o,"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,DPg)):l.createCommentVNode("",!0)],8,SPg)):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,spellcheck:"false",lang:I.lang||l.unref(tb)(t.inputElement)},null,40,kPg),[[l.vModelText,t.inputElement],[l.unref(nb),I.spellcheck&&!I.readonly]])],42,fPg))}}),X9=Lg(FPg,[["__scopeId","data-v-5c55654d"]]);var R9=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(R9||{});const KPg=["data-testid"],zPg=["data-testid"],JPg=["src","alt","data-testid"],xPg=["src","data-testid"],TPg=["data-testid"],LPg=["data-testid"],vPg=["data-testid"],M9=Lg(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==R9.img?!0:hZ(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},n=()=>{I.isLoad=!1,I.isError=!1};return l.watch(()=>g.url,()=>{n()}),(A,o)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==l.unref(R9).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,JPg)):(l.openBlock(),l.createElementBlock("img",{key:1,src:l.unref(Oo),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,xPg))],8,zPg),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},l.toDisplayString(g.caption),9,TPg)],64)):l.unref(hZ)(g.url)?(l.openBlock(),l.createBlock(qo,{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,vPg)],8,LPg)),!I.isLoad&&C.value?(l.openBlock(),l.createBlock(nh,{key:3,class:"picture-yui-kit__loader"})):l.createCommentVNode("",!0)],8,KPg))}}),[["__scopeId","data-v-bfca9915"]]);var mp=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(mp||{}),nz=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(nz||{}),Az=(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))(Az||{});const jPg=["id","data-testid"],QPg=["data-testid"],OPg=["data-testid"],UPg=["data-testid"],EPg=["data-testid"],PPg=l.defineComponent({__name:"Notification",props:{type:{default:mp.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 s;return(s=i.value)==null?void 0:s.hidePopover()},C.timeout*1e3)});const n=()=>(t("close"),"hide"),A=()=>{var s;(s=i.value)==null||s.showPopover()},o=l.reactive({message:{icon:Az[C.type],title:C.title||nz[C.type],description:C.description}});return l.onMounted(()=>{var s;C.showPopover&&((s=i.value)==null||s.showPopover())}),g({showPopover:A}),(s,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:o.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(o.message.title),9,UPg),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${C.dataTestid}-Notification-Description`},l.toDisplayString(o.message.description),9,EPg)],8,OPg),l.createVNode(sI,{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,QPg)],10,jPg))}}),H9=Lg(PPg,[["__scopeId","data-v-053cfa20"]]),f9=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"]))}}),_Pg=["data-testid"],qPg=["data-testid"],$Pg=["data-testid"],g6g=["data-testid"],I6g=["data-testid"],e6g=["data-testid"],C6g=["data-testid"],t6g=["data-testid"],i6g=["data-testid"],n6g=["data-testid"],A6g=["data-testid"],l6g=["data-testid"],o6g=["data-testid"],s6g=["data-testid"],S9=Lg(l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{},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},o=l.computed(()=>C.options.filter(Z=>Z.chose)),s=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",o.value.map(b=>b.value)),C.isShow=!1)},d=()=>{C.options=C.options.map(Z=>({...Z,chose:!1})),C.isShow=!1,t("change",[])},r=()=>{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],r),l.watch(()=>I.selectedValues,r),l.onMounted(r),(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,$Pg)):l.createCommentVNode("",!0),!o.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(o.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<o.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(o.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(o.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,I6g)],8,g6g)):l.createCommentVNode("",!0),I.showClearButton&&o.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,e6g)):l.createCommentVNode("",!0)],10,qPg),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`},[o.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,i6g)),(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-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,n6g))),128))],8,t6g),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,A6g),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(s.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,o6g))),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`},[o.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,s6g))],8,l6g)):l.createCommentVNode("",!0)],8,C6g)):l.createCommentVNode("",!0)],8,_Pg)),[[l.unref(To),A,void 0,{bubble:!0}]])}}),[["__scopeId","data-v-8cfa3fe5"]]),a6g=["data-testid"],d6g=["data-testid"],c6g=["data-testid"],r6g=["data-testid"],D9=Lg(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%,
1689
- 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,c6g)],12,d6g)],8,a6g)):(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,r6g))}}),[["__scopeId","data-v-43f9503c"]]),m6g=["data-testid"],Z6g=["data-testid"],u6g=["data-testid"],b6g=["onClick","data-testid"],h6g=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=s.value)==null?void 0:S.closest("dialog");return V||"body"}),n=CSS.supports("top","anchor(bottom)"),A=l.useId(),o=l.computed(()=>`--anchor-popover-${A}`),s=l.ref(null),a=l.ref(null),d=l.ref(null),r=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(!s.value||!a.value||!t.isShow)return;const V={},S=s.value.getBoundingClientRect(),H=window.pageYOffset||document.documentElement.scrollTop,K=window.pageXOffset||document.documentElement.scrollLeft;let x=S.bottom+H,L=S.left+K;const O=s.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(),H=document.elementFromPoint(S.left,S.top),K=document.elementFromPoint(S.right,S.bottom);!(H&&V.contains(H))&&!(K&&V.contains(K))&&b()},W=new IntersectionObserver(V=>{V.forEach(S=>{S.isIntersecting||b()})}),B=()=>{s.value&&a.value&&(window.addEventListener("scroll",G,!0),window.addEventListener("resize",G))},Y=()=>{s.value&&a.value&&(window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G))},y=()=>{s.value&&window.addEventListener("scroll",w.bind(null,s.value),!0)},X=()=>{s.value&&window.removeEventListener("scroll",w.bind(null,s.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(()=>{s.value&&TI({"anchor-name":`${o.value}`},s.value),a.value&&TI({"position-anchor":`${o.value}`},a.value),d.value&&W.observe(d.value),n||G()}),l.onUnmounted(()=>{W.disconnect(),X(),n||Y()}),(V,S)=>(l.openBlock(),l.createBlock(_C,{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:s,class:l.normalizeClass(r.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,Z6g),(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 H;return[(H=I.options)!=null&&H.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,b6g))),128))],8,u6g)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,m6g)),[[l.unref(To),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),VZ=Lg(h6g,[["__scopeId","data-v-0eb84815"]]),G6g=["colspan","rowspan","data-testid"],XZ=Lg(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,G6g))}}),[["__scopeId","data-v-88f7c45d"]]),w6g=["data-testid"],ah=Lg(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,w6g))}}),[["__scopeId","data-v-93b6bd0e"]]),lz=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const o=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=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,H=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-left-position":`${H}px`},g.value)})},r=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:r,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:o,isExistHorizontalTrack:s}},oz=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const o=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=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,H=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-top-postion":`${H}px`},g.value)})},r=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:r,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:o,isExistVerticalTrack:s}},W6g={class:"scroll-wrapper__vertical-wrapper"},p6g={class:"scroll-wrapper__horizont-wrapper"},dh=Lg(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),o=l.ref(null),s=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:r,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=oz(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=lz(t,i,s,o),X=J=>{r(),G(),C("unmount-scroll",J)},V=()=>{requestAnimationFrame(()=>{S(),H()})},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)},H=()=>{Z(),B(),r(),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",W6g,[l.createElementVNode("div",p6g,[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:o,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:s,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"]]),B6g=["id","data-testid"],Y6g=["id","data-testid"],y6g=["id","data-testid"],N6g={key:0,class:"table__error-wrapper"},V6g={class:"table__error-content"},X6g={class:"table__wrapper"},k9=Lg(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),o=l.ref(null),s=l.ref(null),a=l.ref(null),d=Y=>{C.isError||t("unmount-scroll",Y)},r=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&&s.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:o,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(dh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:r,"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(ah,{key:0,class:"table__search-tr",id:(X=C.search)==null?void 0:X.rowId,ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var V;return[l.createVNode(XZ,{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,Y6g)):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:o,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(Y.$slots,"body",{},void 0,!0)],8,y6g)):l.createCommentVNode("",!0)],!0)]},!0)],8,B6g),C.isError?(l.openBlock(),l.createElementBlock("div",N6g,[l.createElementVNode("div",V6g,[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(sI,{key:0,class:"table__error-button",size:l.unref(XI).small,onClick:e.onErrorHandler},{"left-icon":l.withCtx(()=>[l.createElementVNode("div",X6g,[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-d7809e28"]]),R6g=["rowspan","colspan","data-testid"],ch=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,R6g))}}),M6g={class:"skeleton"},Zp=Lg(l.defineComponent({name:"Skeleton",__name:"Skeleton",setup(e){return(g,I)=>(l.openBlock(),l.createElementBlock("div",M6g))}}),[["__scopeId","data-v-e4032176"]]),H6g=["data-testid"],up=Lg(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(o=>{o.forEach(s=>{s.isIntersecting&&(I.isShow=!0,A.unobserve(s.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,o)=>(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(ch,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:l.withCtx(()=>[l.createVNode(Zp,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,H6g))}}),[["__scopeId","data-v-6b48ff96"]]),F9=Lg(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createBlock(up,{class:"section-table-row","data-testid":g.dataTestid},{default:l.withCtx(()=>[l.createVNode(ch,{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"]]),f6g=["disabled","name","value","data-testid"],K9=Lg(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,f6g)),[[l.vModelRadio,I.value]])}}),[["__scopeId","data-v-ca114382"]]),S6g=["data-testid"],bp=Lg(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)})},o=a=>{const d=a.target;d&&C("unmount-change",Number(d.value))},s=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]=r=>t.value=r),onChange:o,onInput:s,"data-testid":I.dataTestid}),null,16,S6g)),[[l.vModelText,t.value]])}}),[["__scopeId","data-v-07f59a41"]]),D6g=["id","data-testid"],k6g=["data-testid"],F6g=["data-testid"],z9=Lg(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),o=l.ref(null),s=l.ref(null),a=l.ref(null),d=B=>{t("unmount-scroll",B)},r=()=>{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&&s.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(()=>{r()});return g({scrollToTop:Z,setHeightSlot:(W=a.value)==null?void 0:W.setHeightSlot,tbodyRef:o,tableRef:n,theadRef:A}),l.onMounted(()=>{r(),h(),window.addEventListener("resize",r),n.value&&w.observe(n.value),A.value&&G.observe(A.value,{childList:!0,subtree:!0}),b()}),(B,Y)=>(l.openBlock(),l.createBlock(dh,{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(ah,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(XZ,{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,k6g)):l.createCommentVNode("",!0),l.renderSlot(B.$slots,"body-group",{},()=>[B.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:o,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(B.$slots,"body",{},void 0,!0)],8,F6g)):l.createCommentVNode("",!0)],!0)],!0)],8,D6g)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-828d32df"]]),K6g=["data-testid"],J9=Lg(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,K6g))}}),[["__scopeId","data-v-7dc4f5d0"]]),z6g=["data-testid"],hp=Lg(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,z6g))}}),[["__scopeId","data-v-f74d38aa"]]),J6g={class:"scroll-wrapper__vertical-wrapper"},x6g={class:"scroll-wrapper__horizont-wrapper"},T6g=Lg(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),o=l.ref(null),s=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:r,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=oz(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=lz(t,i,s,o),X=q=>{r(),G(),C("unmount-scroll",q)},V=()=>{requestAnimationFrame(()=>{S(),H()})},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)},H=()=>{Z(),B(),r(),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",J6g,[l.createElementVNode("div",x6g,[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:o,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:s,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"]]),L6g=["data-testid"],v6g=["data-testid"],j6g=["data-testid"],x9=Lg(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 o=1;if(t.value)for(let s=0;s<t.value.children.length;s++)o=Math.max(t.value.children[s].children.length,o);return o});return g({tbodyRef:i,tableRef:C,theadRef:t}),(o,s)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:C,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[l.renderSlot(o.$slots,"default",{},()=>[l.renderSlot(o.$slots,"colspan",{},void 0,!0),o.$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(o.$slots,"head",{},void 0,!0),o.$slots.search?(l.openBlock(),l.createBlock(hp,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:n,"data-testid":`${I.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(XZ,{colspan:A.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(o.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,v6g)):l.createCommentVNode("",!0),l.renderSlot(o.$slots,"body-group",{},()=>[o.$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(o.$slots,"body",{},void 0,!0)],8,j6g)):l.createCommentVNode("",!0)],!0)],!0)],8,L6g))}}),[["__scopeId","data-v-57a1c54d"]]),Q6g=["data-testid"],O6g=["data-testid"],U6g=["onClick","data-testid"],E6g=["data-testid"],T9=Lg(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},(o,s)=>s+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,o)=>(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),s=>(l.openBlock(),l.createElementBlock("button",{key:s,onClick:a=>n(s),class:l.normalizeClass(["tabs__navigation-button",{active:t.activeTab===s}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[l.renderSlot(A.$slots,`header${s}`,{active:t.activeTab===s},void 0,!0)],10,U6g))),128))],8,O6g),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[t.activeTab===s?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(A.$slots,`tab${s}`,{},void 0,!0)],8,E6g)):l.createCommentVNode("",!0)],64))),128))],8,Q6g))}}),[["__scopeId","data-v-e5802f92"]]);function mt(e){this.content=e}mt.prototype={constructor:mt,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 mt(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 mt(I)},addToStart:function(e,g){return new mt([e,g].concat(this.remove(e).content))},addToEnd:function(e,g){var I=this.remove(e).content.slice();return I.push(e,g),new mt(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 mt(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=mt.from(e),e.size?new mt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=mt.from(e),e.size?new mt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var g=this;e=mt.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}},mt.from=function(e){if(e instanceof mt)return e;var g=[];if(e)for(var I in e)g.push(I,e[I]);return new mt(g)};function sz(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,o=0;for(;n[o]==A[o];o++)I++;return o&&o<n.length&&o<A.length&&cz(n.charCodeAt(o-1))&&dz(n.charCodeAt(o))&&I--,I}if(t.content.size||i.content.size){let n=sz(t.content,i.content,I+1);if(n!=null)return n}I+=t.nodeSize}}function az(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),o=n.nodeSize;if(n==A){I-=o,C-=o;continue}if(!n.sameMarkup(A))return{a:I,b:C};if(n.isText&&n.text!=A.text){let s=n.text,a=A.text,d=s.length,r=a.length;for(;d>0&&r>0&&s[d-1]==a[r-1];)d--,r--,I--,C--;return d&&r&&d<s.length&&cz(s.charCodeAt(d-1))&&dz(s.charCodeAt(d))&&(I++,C++),{a:I,b:C}}if(n.content.size||A.content.size){let s=az(n.content,A.content,I-1,C-1);if(s)return s}I-=o,C-=o}}function dz(e){return e>=56320&&e<57344}function cz(e){return e>=55296&&e<56320}let Dg=class ki{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 o=this.content[n],s=A+o.nodeSize;if(s>g&&C(o,t+A,i||null,n)!==!1&&o.content.size){let a=A+1;o.nodesBetween(Math.max(0,g-a),Math.min(o.content.size,I-a),C,t+a)}A=s}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,C,t){let i="",n=!0;return this.nodesBetween(g,I,(A,o)=>{let s=A.isText?A.text.slice(Math.max(g,o)-o,I-o):A.isLeaf?t?typeof t=="function"?t(A):t:A.type.spec.leafText?A.type.spec.leafText(A):"":"";A.isBlock&&(A.isLeaf&&s||A.isTextblock)&&C&&(n?n=!1:i+=C),i+=s},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 ki(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],o=n+A.nodeSize;o>g&&((n<g||o>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=o}return new ki(C,t)}cutByIndex(g,I){return g==I?ki.empty:g==0&&I==this.content.length?this:new ki(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 ki(t,i)}addToStart(g){return new ki([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new ki(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 sz(this,g,I)}findDiffEnd(g,I=this.size,C=g.size){return az(this,g,I,C)}findIndex(g){if(g==0)return Gp(0,g);if(g==this.size)return Gp(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?Gp(I+1,i):Gp(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 ki.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return ki.fromArray(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return ki.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 ki(I||g,C)}static from(g){if(!g)return ki.empty;if(g instanceof ki)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new ki([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 L9={index:0,offset:0};function Gp(e,g){return L9.index=e,L9.offset=g,L9}function wp(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(!wp(e[C],g[C]))return!1}else{for(let C in e)if(!(C in g)||!wp(e[C],g[C]))return!1;for(let C in g)if(!(C in e))return!1}return!0}let Ve=class S3{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&&wp(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 S3.none;if(g instanceof S3)return[g];let I=g.slice();return I.sort((C,t)=>C.type.rank-t.type.rank),I}};Ve.none=[];let rh=class extends Error{},Pg=class gb{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=mz(this.content,g+this.openStart,I,this.openStart+1,this.openEnd+1);return C&&new gb(C,this.openStart,this.openEnd)}removeBetween(g,I){return new gb(rz(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 gb.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 gb(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 gb(g,C,t)}};Pg.empty=new Pg(Dg.empty,0,0);function rz(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(rz(i.content,g-t-1,I-t-1)))}function mz(e,g,I,C,t,i){let{index:n,offset:A}=e.findIndex(g),o=e.maybeChild(n);if(A==g||o.isText)return i&&C<=0&&t<=0&&!i.canReplace(n,n,I)?null:e.cut(0,g).append(I).append(e.cut(g));let s=mz(o.content,g-A-1,I,n==0?C-1:0,n==e.childCount-1?t-1:0,o);return s&&e.replaceChild(n,o.copy(s))}function P6g(e,g,I){if(I.openStart>e.depth)throw new rh("Inserted content deeper than insertion position");if(e.depth-I.openStart!=g.depth-I.openEnd)throw new rh("Inconsistent open depths");return Zz(e,g,I,0)}function Zz(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=Zz(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 Lc(n,A.cut(0,e.parentOffset).append(I.content).append(A.cut(g.parentOffset)))}else{let{start:n,end:A}=_6g(I,e);return Lc(i,bz(e,n,A,g,C))}else return Lc(i,Wp(e,g,C))}function uz(e,g){if(!g.type.compatibleContent(e.type))throw new rh("Cannot join "+g.type.name+" onto "+e.type.name)}function v9(e,g,I){let C=e.node(I);return uz(C,g.node(I)),C}function Tc(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 mh(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&&(Tc(e.nodeAfter,C),i++));for(let A=i;A<n;A++)Tc(t.child(A),C);g&&g.depth==I&&g.textOffset&&Tc(g.nodeBefore,C)}function Lc(e,g){if(!e.type.validContent(g))throw new rh("Invalid content for node "+e.type.name);return e.copy(g)}function bz(e,g,I,C,t){let i=e.depth>t&&v9(e,g,t+1),n=C.depth>t&&v9(I,C,t+1),A=[];return mh(null,e,t,A),i&&n&&g.index(t)==I.index(t)?(uz(i,n),Tc(Lc(i,bz(e,g,I,C,t+1)),A)):(i&&Tc(Lc(i,Wp(e,g,t+1)),A),mh(g,I,t,A),n&&Tc(Lc(n,Wp(I,C,t+1)),A)),mh(C,null,t,A),new Dg(A)}function Wp(e,g,I){let C=[];if(mh(null,e,I,C),e.depth>I){let t=v9(e,g,I+1);Tc(Lc(t,Wp(e,g,I+1)),C)}return mh(g,null,I,C),new Dg(C)}function _6g(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 Zh{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 Ve.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 pp(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:o}=n.content.findIndex(i),s=i-o;if(C.push(n,A,t+o),!s||(n=n.child(A),n.isText))break;i=s-1,t+=o+1}return new Zh(I,C,i)}static resolveCached(g,I){let C=hz.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 hz.set(g,C=new q6g);let t=C.elts[C.i]=Zh.resolve(g,I);return C.i=(C.i+1)%$6g,t}}class q6g{constructor(){this.elts=[],this.i=0}}const $6g=12,hz=new WeakMap;class pp{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 g8g=Object.create(null);let Fa=class D3{constructor(g,I,C,t=Ve.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&&wp(this.attrs,I||g.defaultAttrs||g8g)&&Ve.sameSet(this.marks,C||Ve.none)}copy(g=null){return g==this.content?this:new D3(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new D3(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 Pg.empty;let t=this.resolve(g),i=this.resolve(I),n=C?0:t.sharedDepth(I),A=t.start(n),s=t.node(n).content.cut(t.pos-A,i.pos-A);return new Pg(s,t.depth-n,i.depth-n)}replace(g,I,C){return P6g(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 Zh.resolveCached(this,g)}resolveNoCache(g){return Zh.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()+")"),Gz(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 o=t;o<i;o++)if(!this.type.allowsMarks(C.child(o).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=Ve.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(!Ve.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}};Fa.prototype.text=void 0;class Bp extends Fa{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):Gz(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 Bp(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new Bp(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 Gz(e,g){for(let I=e.length-1;I>=0;I--)g=e[I].type.name+"("+g+")";return g}class vc{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let C=new I8g(g,I);if(C.next==null)return vc.empty;let t=wz(C);C.next&&C.err("Unexpected trailing text");let i=l8g(A8g(t));return o8g(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 o=n.matchFragment(g,C);if(o&&(!I||o.validEnd))return Dg.from(A.map(s=>s.createAndFill()));for(let s=0;s<n.next.length;s++){let{type:a,next:d}=n.next[s];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let r=i(d,A.concat(a));if(r)return r}}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:o}=i.next[n];!A.isLeaf&&!A.hasRequiredAttrs()&&!(A.name in I)&&(!t.type||o.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(`
1689
+ 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,c6g)],12,d6g)],8,a6g)):(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,r6g))}}),[["__scopeId","data-v-43f9503c"]]),m6g=["data-testid"],Z6g=["data-testid"],u6g=["data-testid"],b6g=["onClick","data-testid"],h6g=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=s.value)==null?void 0:S.closest("dialog");return V||"body"}),n=CSS.supports("top","anchor(bottom)"),A=l.useId(),o=l.computed(()=>`--anchor-popover-${A}`),s=l.ref(null),a=l.ref(null),d=l.ref(null),r=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(!s.value||!a.value||!t.isShow)return;const V={},S=s.value.getBoundingClientRect(),H=window.pageYOffset||document.documentElement.scrollTop,K=window.pageXOffset||document.documentElement.scrollLeft;let x=S.bottom+H,L=S.left+K;const O=s.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(),H=document.elementFromPoint(S.left,S.top),K=document.elementFromPoint(S.right,S.bottom);!(H&&V.contains(H))&&!(K&&V.contains(K))&&b()},W=new IntersectionObserver(V=>{V.forEach(S=>{S.isIntersecting||b()})}),B=()=>{s.value&&a.value&&(window.addEventListener("scroll",G,!0),window.addEventListener("resize",G))},Y=()=>{s.value&&a.value&&(window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G))},y=()=>{s.value&&window.addEventListener("scroll",w.bind(null,s.value),!0)},X=()=>{s.value&&window.removeEventListener("scroll",w.bind(null,s.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(()=>{s.value&&TI({"anchor-name":`${o.value}`},s.value),a.value&&TI({"position-anchor":`${o.value}`},a.value),d.value&&W.observe(d.value),n||G()}),l.onUnmounted(()=>{W.disconnect(),X(),n||Y()}),(V,S)=>(l.openBlock(),l.createBlock(_C,{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:s,class:l.normalizeClass(r.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,Z6g),(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 H;return[(H=I.options)!=null&&H.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,b6g))),128))],8,u6g)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,m6g)),[[l.unref(To),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),VZ=Lg(h6g,[["__scopeId","data-v-0eb84815"]]),G6g=["colspan","rowspan","data-testid"],XZ=Lg(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,G6g))}}),[["__scopeId","data-v-88f7c45d"]]),w6g=["data-testid"],ah=Lg(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,w6g))}}),[["__scopeId","data-v-93b6bd0e"]]),lz=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const o=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=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,H=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-left-position":`${H}px`},g.value)})},r=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:r,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:o,isExistHorizontalTrack:s}},oz=(e,g,I,C)=>{const t=l.ref(!1),i=l.ref(100);let n=0,A=0;const o=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=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,H=y*S;requestAnimationFrame(()=>{g.value&&TI({"--scroll-bar-top-postion":`${H}px`},g.value)})},r=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:r,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:o,isExistVerticalTrack:s}},W6g={class:"scroll-wrapper__vertical-wrapper"},p6g={class:"scroll-wrapper__horizont-wrapper"},dh=Lg(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),o=l.ref(null),s=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:r,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=oz(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=lz(t,i,s,o),X=J=>{r(),G(),C("unmount-scroll",J)},V=()=>{requestAnimationFrame(()=>{S(),H()})},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)},H=()=>{Z(),B(),r(),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",W6g,[l.createElementVNode("div",p6g,[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:o,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:s,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"]]),B6g=["id","data-testid"],Y6g=["id","data-testid"],y6g=["id","data-testid"],N6g={key:0,class:"table__error-wrapper"},V6g={class:"table__error-content"},X6g={class:"table__wrapper"},k9=Lg(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),o=l.ref(null),s=l.ref(null),a=l.ref(null),d=Y=>{C.isError||t("unmount-scroll",Y)},r=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&&s.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:o,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(dh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:r,"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(ah,{key:0,class:"table__search-tr",id:(X=C.search)==null?void 0:X.rowId,ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var V;return[l.createVNode(XZ,{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,Y6g)):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:o,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(Y.$slots,"body",{},void 0,!0)],8,y6g)):l.createCommentVNode("",!0)],!0)]},!0)],8,B6g),C.isError?(l.openBlock(),l.createElementBlock("div",N6g,[l.createElementVNode("div",V6g,[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(sI,{key:0,class:"table__error-button",size:l.unref(XI).small,onClick:e.onErrorHandler},{"left-icon":l.withCtx(()=>[l.createElementVNode("div",X6g,[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-d7809e28"]]),R6g=["rowspan","colspan","data-testid"],ch=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,R6g))}}),M6g={class:"skeleton"},Zp=Lg(l.defineComponent({name:"Skeleton",__name:"Skeleton",setup(e){return(g,I)=>(l.openBlock(),l.createElementBlock("div",M6g))}}),[["__scopeId","data-v-e4032176"]]),H6g=["data-testid"],up=Lg(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(o=>{o.forEach(s=>{s.isIntersecting&&(I.isShow=!0,A.unobserve(s.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,o)=>(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(ch,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:l.withCtx(()=>[l.createVNode(Zp,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,H6g))}}),[["__scopeId","data-v-c88eb961"]]),F9=Lg(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const g=e;return(I,C)=>(l.openBlock(),l.createBlock(up,{class:"section-table-row","data-testid":g.dataTestid},{default:l.withCtx(()=>[l.createVNode(ch,{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"]]),f6g=["disabled","name","value","data-testid"],K9=Lg(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,f6g)),[[l.vModelRadio,I.value]])}}),[["__scopeId","data-v-ca114382"]]),S6g=["data-testid"],bp=Lg(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)})},o=a=>{const d=a.target;d&&C("unmount-change",Number(d.value))},s=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]=r=>t.value=r),onChange:o,onInput:s,"data-testid":I.dataTestid}),null,16,S6g)),[[l.vModelText,t.value]])}}),[["__scopeId","data-v-07f59a41"]]),D6g=["id","data-testid"],k6g=["data-testid"],F6g=["data-testid"],z9=Lg(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),o=l.ref(null),s=l.ref(null),a=l.ref(null),d=B=>{t("unmount-scroll",B)},r=()=>{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&&s.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(()=>{r()});return g({scrollToTop:Z,setHeightSlot:(W=a.value)==null?void 0:W.setHeightSlot,tbodyRef:o,tableRef:n,theadRef:A}),l.onMounted(()=>{r(),h(),window.addEventListener("resize",r),n.value&&w.observe(n.value),A.value&&G.observe(A.value,{childList:!0,subtree:!0}),b()}),(B,Y)=>(l.openBlock(),l.createBlock(dh,{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(ah,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(XZ,{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,k6g)):l.createCommentVNode("",!0),l.renderSlot(B.$slots,"body-group",{},()=>[B.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:o,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[l.renderSlot(B.$slots,"body",{},void 0,!0)],8,F6g)):l.createCommentVNode("",!0)],!0)],!0)],8,D6g)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-828d32df"]]),K6g=["data-testid"],J9=Lg(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,K6g))}}),[["__scopeId","data-v-7dc4f5d0"]]),z6g=["data-testid"],hp=Lg(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,z6g))}}),[["__scopeId","data-v-f74d38aa"]]),J6g={class:"scroll-wrapper__vertical-wrapper"},x6g={class:"scroll-wrapper__horizont-wrapper"},T6g=Lg(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),o=l.ref(null),s=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:r,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=oz(t,i,A,n),{changeBarPosition:G,startDrag:w,onTrackClick:W,setHorizontalBarWidth:B,horizontalTrackClass:Y,isExistHorizontalTrack:y}=lz(t,i,s,o),X=q=>{r(),G(),C("unmount-scroll",q)},V=()=>{requestAnimationFrame(()=>{S(),H()})},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)},H=()=>{Z(),B(),r(),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",J6g,[l.createElementVNode("div",x6g,[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:o,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:s,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"]]),L6g=["data-testid"],v6g=["data-testid"],j6g=["data-testid"],x9=Lg(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 o=1;if(t.value)for(let s=0;s<t.value.children.length;s++)o=Math.max(t.value.children[s].children.length,o);return o});return g({tbodyRef:i,tableRef:C,theadRef:t}),(o,s)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:C,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[l.renderSlot(o.$slots,"default",{},()=>[l.renderSlot(o.$slots,"colspan",{},void 0,!0),o.$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(o.$slots,"head",{},void 0,!0),o.$slots.search?(l.openBlock(),l.createBlock(hp,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:n,"data-testid":`${I.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(XZ,{colspan:A.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(o.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,v6g)):l.createCommentVNode("",!0),l.renderSlot(o.$slots,"body-group",{},()=>[o.$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(o.$slots,"body",{},void 0,!0)],8,j6g)):l.createCommentVNode("",!0)],!0)],!0)],8,L6g))}}),[["__scopeId","data-v-57a1c54d"]]),Q6g=["data-testid"],O6g=["data-testid"],U6g=["onClick","data-testid"],E6g=["data-testid"],T9=Lg(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},(o,s)=>s+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,o)=>(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),s=>(l.openBlock(),l.createElementBlock("button",{key:s,onClick:a=>n(s),class:l.normalizeClass(["tabs__navigation-button",{active:t.activeTab===s}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[l.renderSlot(A.$slots,`header${s}`,{active:t.activeTab===s},void 0,!0)],10,U6g))),128))],8,O6g),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[t.activeTab===s?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(A.$slots,`tab${s}`,{},void 0,!0)],8,E6g)):l.createCommentVNode("",!0)],64))),128))],8,Q6g))}}),[["__scopeId","data-v-e5802f92"]]);function mt(e){this.content=e}mt.prototype={constructor:mt,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 mt(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 mt(I)},addToStart:function(e,g){return new mt([e,g].concat(this.remove(e).content))},addToEnd:function(e,g){var I=this.remove(e).content.slice();return I.push(e,g),new mt(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 mt(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=mt.from(e),e.size?new mt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=mt.from(e),e.size?new mt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var g=this;e=mt.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}},mt.from=function(e){if(e instanceof mt)return e;var g=[];if(e)for(var I in e)g.push(I,e[I]);return new mt(g)};function sz(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,o=0;for(;n[o]==A[o];o++)I++;return o&&o<n.length&&o<A.length&&cz(n.charCodeAt(o-1))&&dz(n.charCodeAt(o))&&I--,I}if(t.content.size||i.content.size){let n=sz(t.content,i.content,I+1);if(n!=null)return n}I+=t.nodeSize}}function az(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),o=n.nodeSize;if(n==A){I-=o,C-=o;continue}if(!n.sameMarkup(A))return{a:I,b:C};if(n.isText&&n.text!=A.text){let s=n.text,a=A.text,d=s.length,r=a.length;for(;d>0&&r>0&&s[d-1]==a[r-1];)d--,r--,I--,C--;return d&&r&&d<s.length&&cz(s.charCodeAt(d-1))&&dz(s.charCodeAt(d))&&(I++,C++),{a:I,b:C}}if(n.content.size||A.content.size){let s=az(n.content,A.content,I-1,C-1);if(s)return s}I-=o,C-=o}}function dz(e){return e>=56320&&e<57344}function cz(e){return e>=55296&&e<56320}let Dg=class ki{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 o=this.content[n],s=A+o.nodeSize;if(s>g&&C(o,t+A,i||null,n)!==!1&&o.content.size){let a=A+1;o.nodesBetween(Math.max(0,g-a),Math.min(o.content.size,I-a),C,t+a)}A=s}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,C,t){let i="",n=!0;return this.nodesBetween(g,I,(A,o)=>{let s=A.isText?A.text.slice(Math.max(g,o)-o,I-o):A.isLeaf?t?typeof t=="function"?t(A):t:A.type.spec.leafText?A.type.spec.leafText(A):"":"";A.isBlock&&(A.isLeaf&&s||A.isTextblock)&&C&&(n?n=!1:i+=C),i+=s},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 ki(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],o=n+A.nodeSize;o>g&&((n<g||o>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=o}return new ki(C,t)}cutByIndex(g,I){return g==I?ki.empty:g==0&&I==this.content.length?this:new ki(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 ki(t,i)}addToStart(g){return new ki([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new ki(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 sz(this,g,I)}findDiffEnd(g,I=this.size,C=g.size){return az(this,g,I,C)}findIndex(g){if(g==0)return Gp(0,g);if(g==this.size)return Gp(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?Gp(I+1,i):Gp(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 ki.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return ki.fromArray(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return ki.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 ki(I||g,C)}static from(g){if(!g)return ki.empty;if(g instanceof ki)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new ki([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 L9={index:0,offset:0};function Gp(e,g){return L9.index=e,L9.offset=g,L9}function wp(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(!wp(e[C],g[C]))return!1}else{for(let C in e)if(!(C in g)||!wp(e[C],g[C]))return!1;for(let C in g)if(!(C in e))return!1}return!0}let Ve=class S3{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&&wp(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 S3.none;if(g instanceof S3)return[g];let I=g.slice();return I.sort((C,t)=>C.type.rank-t.type.rank),I}};Ve.none=[];let rh=class extends Error{},Pg=class gb{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=mz(this.content,g+this.openStart,I,this.openStart+1,this.openEnd+1);return C&&new gb(C,this.openStart,this.openEnd)}removeBetween(g,I){return new gb(rz(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 gb.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 gb(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 gb(g,C,t)}};Pg.empty=new Pg(Dg.empty,0,0);function rz(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(rz(i.content,g-t-1,I-t-1)))}function mz(e,g,I,C,t,i){let{index:n,offset:A}=e.findIndex(g),o=e.maybeChild(n);if(A==g||o.isText)return i&&C<=0&&t<=0&&!i.canReplace(n,n,I)?null:e.cut(0,g).append(I).append(e.cut(g));let s=mz(o.content,g-A-1,I,n==0?C-1:0,n==e.childCount-1?t-1:0,o);return s&&e.replaceChild(n,o.copy(s))}function P6g(e,g,I){if(I.openStart>e.depth)throw new rh("Inserted content deeper than insertion position");if(e.depth-I.openStart!=g.depth-I.openEnd)throw new rh("Inconsistent open depths");return Zz(e,g,I,0)}function Zz(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=Zz(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 Lc(n,A.cut(0,e.parentOffset).append(I.content).append(A.cut(g.parentOffset)))}else{let{start:n,end:A}=_6g(I,e);return Lc(i,bz(e,n,A,g,C))}else return Lc(i,Wp(e,g,C))}function uz(e,g){if(!g.type.compatibleContent(e.type))throw new rh("Cannot join "+g.type.name+" onto "+e.type.name)}function v9(e,g,I){let C=e.node(I);return uz(C,g.node(I)),C}function Tc(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 mh(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&&(Tc(e.nodeAfter,C),i++));for(let A=i;A<n;A++)Tc(t.child(A),C);g&&g.depth==I&&g.textOffset&&Tc(g.nodeBefore,C)}function Lc(e,g){if(!e.type.validContent(g))throw new rh("Invalid content for node "+e.type.name);return e.copy(g)}function bz(e,g,I,C,t){let i=e.depth>t&&v9(e,g,t+1),n=C.depth>t&&v9(I,C,t+1),A=[];return mh(null,e,t,A),i&&n&&g.index(t)==I.index(t)?(uz(i,n),Tc(Lc(i,bz(e,g,I,C,t+1)),A)):(i&&Tc(Lc(i,Wp(e,g,t+1)),A),mh(g,I,t,A),n&&Tc(Lc(n,Wp(I,C,t+1)),A)),mh(C,null,t,A),new Dg(A)}function Wp(e,g,I){let C=[];if(mh(null,e,I,C),e.depth>I){let t=v9(e,g,I+1);Tc(Lc(t,Wp(e,g,I+1)),C)}return mh(g,null,I,C),new Dg(C)}function _6g(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 Zh{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 Ve.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 pp(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:o}=n.content.findIndex(i),s=i-o;if(C.push(n,A,t+o),!s||(n=n.child(A),n.isText))break;i=s-1,t+=o+1}return new Zh(I,C,i)}static resolveCached(g,I){let C=hz.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 hz.set(g,C=new q6g);let t=C.elts[C.i]=Zh.resolve(g,I);return C.i=(C.i+1)%$6g,t}}class q6g{constructor(){this.elts=[],this.i=0}}const $6g=12,hz=new WeakMap;class pp{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 g8g=Object.create(null);let Fa=class D3{constructor(g,I,C,t=Ve.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&&wp(this.attrs,I||g.defaultAttrs||g8g)&&Ve.sameSet(this.marks,C||Ve.none)}copy(g=null){return g==this.content?this:new D3(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new D3(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 Pg.empty;let t=this.resolve(g),i=this.resolve(I),n=C?0:t.sharedDepth(I),A=t.start(n),s=t.node(n).content.cut(t.pos-A,i.pos-A);return new Pg(s,t.depth-n,i.depth-n)}replace(g,I,C){return P6g(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 Zh.resolveCached(this,g)}resolveNoCache(g){return Zh.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()+")"),Gz(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 o=t;o<i;o++)if(!this.type.allowsMarks(C.child(o).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=Ve.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(!Ve.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}};Fa.prototype.text=void 0;class Bp extends Fa{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):Gz(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 Bp(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new Bp(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 Gz(e,g){for(let I=e.length-1;I>=0;I--)g=e[I].type.name+"("+g+")";return g}class vc{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let C=new I8g(g,I);if(C.next==null)return vc.empty;let t=wz(C);C.next&&C.err("Unexpected trailing text");let i=l8g(A8g(t));return o8g(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 o=n.matchFragment(g,C);if(o&&(!I||o.validEnd))return Dg.from(A.map(s=>s.createAndFill()));for(let s=0;s<n.next.length;s++){let{type:a,next:d}=n.next[s];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let r=i(d,A.concat(a));if(r)return r}}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:o}=i.next[n];!A.isLeaf&&!A.hasRequiredAttrs()&&!(A.name in I)&&(!t.type||o.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(`
1690
1690
  `)}}vc.empty=new vc(!0);class I8g{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 wz(e){let g=[];do g.push(e8g(e));while(e.eat("|"));return g.length==1?g[0]:{type:"choice",exprs:g}}function e8g(e){let g=[];do g.push(C8g(e));while(e.next&&e.next!=")"&&e.next!="|");return g.length==1?g[0]:{type:"seq",exprs:g}}function C8g(e){let g=n8g(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=t8g(e,g);else break;return g}function Wz(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let g=Number(e.next);return e.pos++,g}function t8g(e,g){let I=Wz(e),C=I;return e.eat(",")&&(e.next!="}"?C=Wz(e):C=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:I,max:C,expr:g}}function i8g(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 n8g(e){if(e.eat("(")){let g=wz(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=i8g(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 A8g(e){let g=[[]];return t(i(e,0),I()),g;function I(){return g.push([])-1}function C(n,A,o){let s={term:o,to:A};return g[n].push(s),s}function t(n,A){n.forEach(o=>o.to=A)}function i(n,A){if(n.type=="choice")return n.exprs.reduce((o,s)=>o.concat(i(s,A)),[]);if(n.type=="seq")for(let o=0;;o++){let s=i(n.exprs[o],A);if(o==n.exprs.length-1)return s;t(s,A=I())}else if(n.type=="star"){let o=I();return C(A,o),t(i(n.expr,o),o),[C(o)]}else if(n.type=="plus"){let o=I();return t(i(n.expr,A),o),t(i(n.expr,o),o),[C(o)]}else{if(n.type=="opt")return[C(A)].concat(i(n.expr,A));if(n.type=="range"){let o=A;for(let s=0;s<n.min;s++){let a=I();t(i(n.expr,o),a),o=a}if(n.max==-1)t(i(n.expr,o),o);else for(let s=n.min;s<n.max;s++){let a=I();C(o,a),t(i(n.expr,o),a),o=a}return[C(o)]}else{if(n.type=="name")return[C(A,void 0,n.value)];throw new Error("Unknown expr type")}}}}function pz(e,g){return g-e}function Bz(e,g){let I=[];return C(g),I.sort(pz);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:o}=i[n];!A&&I.indexOf(o)==-1&&C(o)}}}function l8g(e){let g=Object.create(null);return I(Bz(e,0));function I(C){let t=[];C.forEach(n=>{e[n].forEach(({term:A,to:o})=>{if(!A)return;let s;for(let a=0;a<t.length;a++)t[a][0]==A&&(s=t[a][1]);Bz(e,o).forEach(a=>{s||t.push([A,s=[]]),s.indexOf(a)==-1&&s.push(a)})})});let i=g[C.join(",")]=new vc(C.indexOf(e.length-1)>-1);for(let n=0;n<t.length;n++){let A=t[n][1].sort(pz);i.next.push({type:t[n][0],next:g[A.join(",")]||I(A)})}return i}}function o8g(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:o,next:s}=t.next[A];n.push(o.name),i&&!(o.isText||o.hasRequiredAttrs())&&(i=!1),C.indexOf(s)==-1&&C.push(s)}i&&g.err("Only non-generatable nodes ("+n.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Yz(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 yz(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 Nz(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 Vz(e,g){let I=Object.create(null);if(g)for(let C in g)I[C]=new a8g(e,C,g[C]);return I}let Xz=class vQ{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=Vz(g,C.attrs),this.defaultAttrs=Yz(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==vc.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:yz(this.attrs,g)}create(g=null,I,C){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Fa(this,this.computeAttrs(g),Dg.from(I),Ve.setFrom(C))}createChecked(g=null,I,C){return I=Dg.from(I),this.checkContent(I),new Fa(this,this.computeAttrs(g),I,Ve.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 Fa(this,g,I.append(i),Ve.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){Nz(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:Ve.none:g}static compile(g,I){let C=Object.create(null);g.forEach((i,n)=>C[i]=new vQ(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 s8g(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 a8g{constructor(g,I,C){this.hasDefault=Object.prototype.hasOwnProperty.call(C,"default"),this.default=C.default,this.validate=typeof C.validate=="string"?s8g(g,I,C.validate):C.validate}get isRequired(){return!this.hasDefault}}class Yp{constructor(g,I,C,t){this.name=g,this.rank=I,this.schema=C,this.spec=t,this.attrs=Vz(g,t.attrs),this.excluded=null;let i=Yz(this.attrs);this.instance=i?new Ve(this,i):null}create(g=null){return!g&&this.instance?this.instance:new Ve(this,yz(this.attrs,g))}static compile(g,I){let C=Object.create(null),t=0;return g.forEach((i,n)=>C[i]=new Yp(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){Nz(this.attrs,g,"mark",this.name)}excludes(g){return this.excluded.indexOf(g)>-1}}class Rz{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=mt.from(g.nodes),I.marks=mt.from(g.marks||{}),this.nodes=Xz.compile(this.spec.nodes,this),this.marks=Yp.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]=vc.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?Mz(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==""?[]:Mz(this,n.split(" "))}this.nodeFromJSON=t=>Fa.fromJSON(this,t),this.markFromJSON=t=>Ve.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 Xz){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 Bp(C,C.defaultAttrs,g,Ve.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 Mz(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 o=e.marks[A];(t=="_"||o.spec.group&&o.spec.group.split(" ").indexOf(t)>-1)&&I.push(n=o)}if(!n)throw new SyntaxError("Unknown mark type: '"+g[C]+"'")}return I}function d8g(e){return e.tag!=null}function c8g(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(d8g(t))this.tags.push(t);else if(c8g(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 Dz(this,I,!1);return C.addAll(g,Ve.none,I.from,I.to),C.finish()}parseSlice(g,I={}){let C=new Dz(this,I,!0);return C.addAll(g,Ve.none,I.from,I.to),Pg.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(Z8g(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 o=n.getAttrs(I);if(o===!1)continue;n.attrs=o||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=kz(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=kz(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 Hz={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},r8g={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fz={ol:!0,ul:!0},uh=1,j9=2,bh=4;function Sz(e,g,I){return g!=null?(g?uh:0)|(g==="full"?j9:0):e&&e.whitespace=="pre"?uh|j9:I&~bh}class yp{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=Ve.none,this.match=i||(n&bh?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&uh)){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&&!Hz.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}class Dz{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=Sz(null,I.preserveWhitespace,0)|(C?bh:0);t?i=new yp(t.type,t.attrs,Ve.none,!0,I.topMatch||t.type.contentMatch,n):C?i=new yp(null,null,Ve.none,!0,null,n):i=new yp(g.schema.topNodeType,null,Ve.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&j9?"full":this.localPreserveWS||(t.options&uh)>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,`
1691
1691
  `);else if(n.linebreakReplacement&&/[\r\n]/.test(C)&&this.top.findWrapping(n.linebreakReplacement.create())){let A=C.split(/\r?\n|\r/);for(let o=0;o<A.length;o++)o&&this.insertNode(n.linebreakReplacement.create(),I,!0),A[o]&&this.insertNode(n.text(A[o]),I,!/\S/.test(A[o]));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],o=g.previousSibling;(!A||o&&o.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;fz.hasOwnProperty(n)&&this.parser.normalizeLists&&m8g(g);let o=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(A=this.parser.matchTag(g,this,C));g:if(o?o.ignore:r8g.hasOwnProperty(n))this.findInside(g),this.ignoreFallback(g,I);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(g=o.skip);let s,a=this.needsBlock;if(Hz.hasOwnProperty(n))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),s=!0,i.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,I);break g}let d=o&&o.skip?I:this.readStyles(g,I);d&&this.addAll(g,d),s&&this.sync(i),this.needsBlock=a}else{let s=this.readStyles(g,I);s&&this.addElementByRule(g,o,s,o.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(`
1692
1692
  `),I)}ignoreFallback(g,I){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),I,!0)}readStyles(g,I){let C=g.style;if(C&&C.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let i=this.parser.matchedStyles[t],n=C.getPropertyValue(i);if(n)for(let A=void 0;;){let o=this.parser.matchStyle(i,n,this,A);if(!o)break;if(o.ignore)return null;if(o.clearMark?I=I.filter(s=>!o.clearMark(s)):I=I.concat(this.parser.schema.marks[o.mark].create(o.attrs)),o.consuming===!1)A=o;else break}}return I}addElementByRule(g,I,C,t){let i,n;if(I.node)if(n=this.parser.schema.nodes[I.node],n.isLeaf)this.insertNode(n.create(I.attrs),C,g.nodeName=="BR")||this.leafFallback(g,C);else{let o=this.enter(n,I.attrs||null,C,I.preserveWhitespace);o&&(i=!0,C=o)}else{let o=this.parser.schema.marks[I.mark];C=C.concat(o.create(I.attrs))}let A=this.top;if(n&&n.isLeaf)this.findInside(g);else if(t)this.addElement(g,C,t);else if(I.getContent)this.findInside(g),I.getContent(g,this.parser.schema).forEach(o=>this.insertNode(o,C,!1));else{let o=g;typeof I.contentElement=="string"?o=g.querySelector(I.contentElement):typeof I.contentElement=="function"?o=I.contentElement(g):I.contentElement&&(o=I.contentElement),this.findAround(g,o,!0),this.addAll(o,C),this.findAround(g,o,!1)}i&&this.sync(A)&&this.open--}addAll(g,I,C,t){let i=C||0;for(let n=C?g.childNodes[C]:g.firstChild,A=t==null?null:g.childNodes[t];n!=A;n=n.nextSibling,++i)this.findAtPoint(g,i),this.addDOM(n,I);this.findAtPoint(g,i)}findPlace(g,I,C){let t,i;for(let n=this.open,A=0;n>=0;n--){let o=this.nodes[n],s=o.findWrapping(g);if(s&&(!t||t.length>s.length+A)&&(t=s,i=o,!s.length))break;if(o.solid){if(C)break;A+=2}}if(!t)return null;this.sync(i);for(let n=0;n<t.length;n++)I=this.enterInner(t[n],null,I,!1);return I}insertNode(g,I,C){if(g.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(I=this.enterInner(i,null,I))}let t=this.findPlace(g,I,C);if(t){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(g.type));let n=Ve.none;for(let A of t.concat(g.marks))(i.type?i.type.allowsMarkType(A.type):Fz(A.type,g.type))&&(n=A.addToSet(n));return i.content.push(g.mark(n)),!0}return!1}enter(g,I,C,t){let i=this.findPlace(g.create(I),C,!1);return i&&(i=this.enterInner(g,I,C,!0,t)),i}enterInner(g,I,C,t=!1,i){this.closeExtra();let n=this.top;n.match=n.match&&n.match.matchType(g);let A=Sz(g,i,n.options);n.options&bh&&n.content.length==0&&(A|=bh);let o=Ve.none;return C=C.filter(s=>(n.type?n.type.allowsMarkType(s.type):Fz(s.type,g))?(o=s.addToSet(o),!1):!0),this.nodes.push(new yp(g,I,o,t,null,A)),this.open++,C}closeExtra(g=!1){let I=this.nodes.length-1;if(I>this.open){for(;I>this.open;I--)this.nodes[I-1].content.push(this.nodes[I].finish(g));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(g){for(let I=this.open;I>=0;I--){if(this.nodes[I]==g)return this.open=I,!0;this.localPreserveWS&&(this.nodes[I].options|=uh)}return!1}get currentPos(){this.closeExtra();let g=0;for(let I=this.open;I>=0;I--){let C=this.nodes[I].content;for(let t=C.length-1;t>=0;t--)g+=C[t].nodeSize;I&&g++}return g}findAtPoint(g,I){if(this.find)for(let C=0;C<this.find.length;C++)this.find[C].node==g&&this.find[C].offset==I&&(this.find[C].pos=this.currentPos)}findInside(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].pos==null&&g.nodeType==1&&g.contains(this.find[I].node)&&(this.find[I].pos=this.currentPos)}findAround(g,I,C){if(g!=I&&this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&g.nodeType==1&&g.contains(this.find[t].node)&&I.compareDocumentPosition(this.find[t].node)&(C?2:4)&&(this.find[t].pos=this.currentPos)}findInText(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].node==g&&(this.find[I].pos=this.currentPos-(g.nodeValue.length-this.find[I].offset))}matchesContext(g){if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);let I=g.split("/"),C=this.options.context,t=!this.isOpen&&(!C||C.parent.type==this.nodes[0].type),i=-(C?C.depth+1:0)+(t?0:1),n=(A,o)=>{for(;A>=0;A--){let s=I[A];if(s==""){if(A==I.length-1||A==0)continue;for(;o>=i;o--)if(n(A-1,o))return!0;return!1}else{let a=o>0||o==0&&t?this.nodes[o].type:C&&o>=i?C.node(o-i).type:null;if(!a||a.name!=s&&!a.isInGroup(s))return!1;o--}}return!0};return n(I.length-1,this.open)}textblockFromContext(){let g=this.options.context;if(g)for(let I=g.depth;I>=0;I--){let C=g.node(I).contentMatchAt(g.indexAfter(I)).defaultType;if(C&&C.isTextblock&&C.defaultAttrs)return C}for(let I in this.parser.schema.nodes){let C=this.parser.schema.nodes[I];if(C.isTextblock&&C.defaultAttrs)return C}}}function m8g(e){for(let g=e.firstChild,I=null;g;g=g.nextSibling){let C=g.nodeType==1?g.nodeName.toLowerCase():null;C&&fz.hasOwnProperty(C)&&I?(I.appendChild(g),g=I):C=="li"?I=g:C&&(I=null)}}function Z8g(e,g){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,g)}function kz(e){let g={};for(let I in e)g[I]=e[I];return g}function Fz(e,g){let I=g.schema.nodes;for(let C in I){let t=I[C];if(!t.allowsMarkType(e))continue;let i=[],n=A=>{i.push(A);for(let o=0;o<A.edgeCount;o++){let{type:s,next:a}=A.edge(o);if(s==g||i.indexOf(a)<0&&n(a))return!0}};if(n(t.contentMatch))return!0}}class jc{constructor(g,I){this.nodes=g,this.marks=I}serializeFragment(g,I={},C){C||(C=Np(I).createDocumentFragment());let t=C,i=[];return g.forEach(n=>{if(i.length||n.marks.length){let A=0,o=0;for(;A<i.length&&o<n.marks.length;){let s=n.marks[o];if(!this.marks[s.type.name]){o++;continue}if(!s.eq(i[A][0])||s.type.spec.spanning===!1)break;A++,o++}for(;A<i.length;)t=i.pop()[1];for(;o<n.marks.length;){let s=n.marks[o++],a=this.serializeMark(s,n.isInline,I);a&&(i.push([s,t]),t.appendChild(a.dom),t=a.contentDOM||a.dom)}}t.appendChild(this.serializeNodeInner(n,I))}),C}serializeNodeInner(g,I){if(g.isText)return Np(I).createTextNode(g.text);let{dom:C,contentDOM:t}=Vp(Np(I),this.nodes[g.type.name](g),null,g.attrs);if(t){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,I,t)}return C}serializeNode(g,I={}){let C=this.serializeNodeInner(g,I);for(let t=g.marks.length-1;t>=0;t--){let i=this.serializeMark(g.marks[t],g.isInline,I);i&&((i.contentDOM||i.dom).appendChild(C),C=i.dom)}return C}serializeMark(g,I,C={}){let t=this.marks[g.type.name];return t&&Vp(Np(C),t(g,I),null,g.attrs)}static renderSpec(g,I,C=null,t){return typeof I=="string"?{dom:g.createTextNode(I)}:Vp(g,I,C,t)}static fromSchema(g){return g.cached.domSerializer||(g.cached.domSerializer=new jc(this.nodesFromSchema(g),this.marksFromSchema(g)))}static nodesFromSchema(g){let I=Kz(g.nodes);return I.text||(I.text=C=>C.text),I}static marksFromSchema(g){return Kz(g.marks)}}function Kz(e){let g={};for(let I in e){let C=e[I].spec.toDOM;C&&(g[I]=C)}return g}function Np(e){return e.document||window.document}const zz=new WeakMap;function u8g(e){let g=zz.get(e);return g===void 0&&zz.set(e,g=b8g(e)),g}function b8g(e){let g=null;function I(C){if(C&&typeof C=="object")if(Array.isArray(C))if(typeof C[0]=="string")g||(g=[]),g.push(C);else for(let t=0;t<C.length;t++)I(C[t]);else for(let t in C)I(C[t])}return I(e),g}function Vp(e,g,I,C){if(g.nodeType==1)return{dom:g};if(g.dom&&g.dom.nodeType==1)return g;let t=g[0],i;if(typeof t!="string")throw new RangeError("Invalid array passed to renderSpec");if(C&&(i=u8g(C))&&i.indexOf(g)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let n=t.indexOf(" ");n>0&&(I=t.slice(0,n),t=t.slice(n+1));let A,o=I?e.createElementNS(I,t):e.createElement(t),s=g[1],a=1;if(s&&typeof s=="object"&&s.nodeType==null&&!Array.isArray(s)){a=2;for(let d in s)if(s[d]!=null){let r=d.indexOf(" ");r>0?o.setAttributeNS(d.slice(0,r),d.slice(r+1),s[d]):d=="style"&&o.style?o.style.cssText=s[d]:o.setAttribute(d,s[d])}}for(let d=a;d<g.length;d++){let r=g[d];if(r===0){if(d<g.length-1||d>a)throw new RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o}}else if(typeof r=="string")o.appendChild(e.createTextNode(r));else{let{dom:Z,contentDOM:b}=Vp(e,r,I,C);if(o.appendChild(Z),b){if(A)throw new RangeError("Multiple content holes");A=b}}}return{dom:o,contentDOM:A}}const Jz=65535,xz=Math.pow(2,16);function h8g(e,g){return e+g*xz}function Tz(e){return e&Jz}function G8g(e){return(e-(e&Jz))/xz}const Lz=1,vz=2,Xp=4,jz=8;let Q9=class{constructor(g,I,C){this.pos=g,this.delInfo=I,this.recover=C}get deleted(){return(this.delInfo&jz)>0}get deletedBefore(){return(this.delInfo&(Lz|Xp))>0}get deletedAfter(){return(this.delInfo&(vz|Xp))>0}get deletedAcross(){return(this.delInfo&Xp)>0}},Qc=class Ib{constructor(g,I=!1){if(this.ranges=g,this.inverted=I,!g.length&&Ib.empty)return Ib.empty}recover(g){let I=0,C=Tz(g);if(!this.inverted)for(let t=0;t<C;t++)I+=this.ranges[t*3+2]-this.ranges[t*3+1];return this.ranges[C*3]+I+G8g(g)}mapResult(g,I=1){return this._map(g,I,!1)}map(g,I=1){return this._map(g,I,!0)}_map(g,I,C){let t=0,i=this.inverted?2:1,n=this.inverted?1:2;for(let A=0;A<this.ranges.length;A+=3){let o=this.ranges[A]-(this.inverted?t:0);if(o>g)break;let s=this.ranges[A+i],a=this.ranges[A+n],d=o+s;if(g<=d){let r=s?g==o?-1:g==d?1:I:I,Z=o+t+(r<0?0:a);if(C)return Z;let b=g==(I<0?o:d)?null:h8g(A/3,g-o),h=g==o?vz:g==d?Lz:Xp;return(I<0?g!=o:g!=d)&&(h|=jz),new Q9(Z,h,b)}t+=a-s}return C?g+t:new Q9(g+t,0,null)}touches(g,I){let C=0,t=Tz(I),i=this.inverted?2:1,n=this.inverted?1:2;for(let A=0;A<this.ranges.length;A+=3){let o=this.ranges[A]-(this.inverted?C:0);if(o>g)break;let s=this.ranges[A+i],a=o+s;if(g<=a&&A==t*3)return!0;C+=this.ranges[A+n]-s}return!1}forEach(g){let I=this.inverted?2:1,C=this.inverted?1:2;for(let t=0,i=0;t<this.ranges.length;t+=3){let n=this.ranges[t],A=n-(this.inverted?i:0),o=n+(this.inverted?0:i),s=this.ranges[t+I],a=this.ranges[t+C];g(A,A+s,o,o+a),i+=a-s}}invert(){return new Ib(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(g){return g==0?Ib.empty:new Ib(g<0?[0,-g,0]:[0,0,g])}};Qc.empty=new Qc([]);class hh{constructor(g,I,C=0,t=g?g.length:0){this.mirror=I,this.from=C,this.to=t,this._maps=g||[],this.ownData=!(g||I)}get maps(){return this._maps}slice(g=0,I=this.maps.length){return new hh(this._maps,this.mirror,g,I)}appendMap(g,I){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(g),I!=null&&this.setMirror(this._maps.length-1,I)}appendMapping(g){for(let I=0,C=this._maps.length;I<g._maps.length;I++){let t=g.getMirror(I);this.appendMap(g._maps[I],t!=null&&t<I?C+t:void 0)}}getMirror(g){if(this.mirror){for(let I=0;I<this.mirror.length;I++)if(this.mirror[I]==g)return this.mirror[I+(I%2?-1:1)]}}setMirror(g,I){this.mirror||(this.mirror=[]),this.mirror.push(g,I)}appendMappingInverted(g){for(let I=g.maps.length-1,C=this._maps.length+g._maps.length;I>=0;I--){let t=g.getMirror(I);this.appendMap(g._maps[I].invert(),t!=null&&t>I?C-t-1:void 0)}}invert(){let g=new hh;return g.appendMappingInverted(this),g}map(g,I=1){if(this.mirror)return this._map(g,I,!0);for(let C=this.from;C<this.to;C++)g=this._maps[C].map(g,I);return g}mapResult(g,I=1){return this._map(g,I,!1)}_map(g,I,C){let t=0;for(let i=this.from;i<this.to;i++){let n=this._maps[i],A=n.mapResult(g,I);if(A.recover!=null){let o=this.getMirror(i);if(o!=null&&o>i&&o<this.to){i=o,g=this._maps[o].recover(A.recover);continue}}t|=A.delInfo,g=A.pos}return C?g:new Q9(g,t,null)}}const O9=Object.create(null);let Ft=class{getMap(){return Qc.empty}merge(g){return null}static fromJSON(g,I){if(!I||!I.stepType)throw new RangeError("Invalid input for Step.fromJSON");let C=O9[I.stepType];if(!C)throw new RangeError(`No step type ${I.stepType} defined`);return C.fromJSON(g,I)}static jsonID(g,I){if(g in O9)throw new RangeError("Duplicate use of step JSON ID "+g);return O9[g]=I,I.prototype.jsonID=g,I}},mi=class Pw{constructor(g,I){this.doc=g,this.failed=I}static ok(g){return new Pw(g,null)}static fail(g){return new Pw(null,g)}static fromReplace(g,I,C,t){try{return Pw.ok(g.replace(I,C,t))}catch(i){if(i instanceof rh)return Pw.fail(i.message);throw i}}};function U9(e,g,I){let C=[];for(let t=0;t<e.childCount;t++){let i=e.child(t);i.content.size&&(i=i.copy(U9(i.content,g,i))),i.isInline&&(i=g(i,I,t)),C.push(i)}return Dg.fromArray(C)}let E9=class _w extends Ft{constructor(g,I,C){super(),this.from=g,this.to=I,this.mark=C}apply(g){let I=g.slice(this.from,this.to),C=g.resolve(this.from),t=C.node(C.sharedDepth(this.to)),i=new Pg(U9(I.content,(n,A)=>!n.isAtom||!A.type.allowsMarkType(this.mark.type)?n:n.mark(this.mark.addToSet(n.marks)),t),I.openStart,I.openEnd);return mi.fromReplace(g,this.from,this.to,i)}invert(){return new RZ(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),C=g.mapResult(this.to,-1);return I.deleted&&C.deleted||I.pos>=C.pos?null:new _w(I.pos,C.pos,this.mark)}merge(g){return g instanceof _w&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new _w(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new _w(I.from,I.to,g.markFromJSON(I.mark))}};Ft.jsonID("addMark",E9);let RZ=class qw extends Ft{constructor(g,I,C){super(),this.from=g,this.to=I,this.mark=C}apply(g){let I=g.slice(this.from,this.to),C=new Pg(U9(I.content,t=>t.mark(this.mark.removeFromSet(t.marks)),g),I.openStart,I.openEnd);return mi.fromReplace(g,this.from,this.to,C)}invert(){return new E9(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),C=g.mapResult(this.to,-1);return I.deleted&&C.deleted||I.pos>=C.pos?null:new qw(I.pos,C.pos,this.mark)}merge(g){return g instanceof qw&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new qw(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new qw(I.from,I.to,g.markFromJSON(I.mark))}};Ft.jsonID("removeMark",RZ);let P9=class $w extends Ft{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return mi.fail("No node at mark step's position");let C=I.type.create(I.attrs,null,this.mark.addToSet(I.marks));return mi.fromReplace(g,this.pos,this.pos+1,new Pg(Dg.from(C),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);if(I){let C=this.mark.addToSet(I.marks);if(C.length==I.marks.length){for(let t=0;t<I.marks.length;t++)if(!I.marks[t].isInSet(C))return new $w(this.pos,I.marks[t]);return new $w(this.pos,this.mark)}}return new Rp(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new $w(I.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new $w(I.pos,g.markFromJSON(I.mark))}};Ft.jsonID("addNodeMark",P9);let Rp=class k3 extends Ft{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return mi.fail("No node at mark step's position");let C=I.type.create(I.attrs,null,this.mark.removeFromSet(I.marks));return mi.fromReplace(g,this.pos,this.pos+1,new Pg(Dg.from(C),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);return!I||!this.mark.isInSet(I.marks)?this:new P9(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new k3(I.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new k3(I.pos,g.markFromJSON(I.mark))}};Ft.jsonID("removeNodeMark",Rp);let lA=class sc extends Ft{constructor(g,I,C,t=!1){super(),this.from=g,this.to=I,this.slice=C,this.structure=t}apply(g){return this.structure&&_9(g,this.from,this.to)?mi.fail("Structure replace would overwrite content"):mi.fromReplace(g,this.from,this.to,this.slice)}getMap(){return new Qc([this.from,this.to-this.from,this.slice.size])}invert(g){return new sc(this.from,this.from+this.slice.size,g.slice(this.from,this.to))}map(g){let I=g.mapResult(this.to,-1),C=this.from==this.to&&sc.MAP_BIAS<0?I:g.mapResult(this.from,1);return C.deletedAcross&&I.deletedAcross?null:new sc(C.pos,Math.max(C.pos,I.pos),this.slice,this.structure)}merge(g){if(!(g instanceof sc)||g.structure||this.structure)return null;if(this.from+this.slice.size==g.from&&!this.slice.openEnd&&!g.slice.openStart){let I=this.slice.size+g.slice.size==0?Pg.empty:new Pg(this.slice.content.append(g.slice.content),this.slice.openStart,g.slice.openEnd);return new sc(this.from,this.to+(g.to-g.from),I,this.structure)}else if(g.to==this.from&&!this.slice.openStart&&!g.slice.openEnd){let I=this.slice.size+g.slice.size==0?Pg.empty:new Pg(g.slice.content.append(this.slice.content),g.slice.openStart,this.slice.openEnd);return new sc(g.from,this.to,I,this.structure)}else return null}toJSON(){let g={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new sc(I.from,I.to,Pg.fromJSON(g,I.slice),!!I.structure)}};lA.MAP_BIAS=1,Ft.jsonID("replace",lA);let vi=class tN extends Ft{constructor(g,I,C,t,i,n,A=!1){super(),this.from=g,this.to=I,this.gapFrom=C,this.gapTo=t,this.slice=i,this.insert=n,this.structure=A}apply(g){if(this.structure&&(_9(g,this.from,this.gapFrom)||_9(g,this.gapTo,this.to)))return mi.fail("Structure gap-replace would overwrite content");let I=g.slice(this.gapFrom,this.gapTo);if(I.openStart||I.openEnd)return mi.fail("Gap is not a flat range");let C=this.slice.insertAt(this.insert,I.content);return C?mi.fromReplace(g,this.from,this.to,C):mi.fail("Content does not fit in gap")}getMap(){return new Qc([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(g){let I=this.gapTo-this.gapFrom;return new tN(this.from,this.from+this.slice.size+I,this.from+this.insert,this.from+this.insert+I,g.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(g){let I=g.mapResult(this.from,1),C=g.mapResult(this.to,-1),t=this.from==this.gapFrom?I.pos:g.map(this.gapFrom,-1),i=this.to==this.gapTo?C.pos:g.map(this.gapTo,1);return I.deletedAcross&&C.deletedAcross||t<I.pos||i>C.pos?null:new tN(I.pos,C.pos,t,i,this.slice,this.insert,this.structure)}toJSON(){let g={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number"||typeof I.gapFrom!="number"||typeof I.gapTo!="number"||typeof I.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tN(I.from,I.to,I.gapFrom,I.gapTo,Pg.fromJSON(g,I.slice),I.insert,!!I.structure)}};Ft.jsonID("replaceAround",vi);function _9(e,g,I){let C=e.resolve(g),t=I-g,i=C.depth;for(;t>0&&i>0&&C.indexAfter(i)==C.node(i).childCount;)i--,t--;if(t>0){let n=C.node(i).maybeChild(C.indexAfter(i));for(;t>0;){if(!n||n.isLeaf)return!0;n=n.firstChild,t--}}return!1}function w8g(e,g,I,C){let t=[],i=[],n,A;e.doc.nodesBetween(g,I,(o,s,a)=>{if(!o.isInline)return;let d=o.marks;if(!C.isInSet(d)&&a.type.allowsMarkType(C.type)){let r=Math.max(s,g),Z=Math.min(s+o.nodeSize,I),b=C.addToSet(d);for(let h=0;h<d.length;h++)d[h].isInSet(b)||(n&&n.to==r&&n.mark.eq(d[h])?n.to=Z:t.push(n=new RZ(r,Z,d[h])));A&&A.to==r?A.to=Z:i.push(A=new E9(r,Z,C))}}),t.forEach(o=>e.step(o)),i.forEach(o=>e.step(o))}function W8g(e,g,I,C){let t=[],i=0;e.doc.nodesBetween(g,I,(n,A)=>{if(!n.isInline)return;i++;let o=null;if(C instanceof Yp){let s=n.marks,a;for(;a=C.isInSet(s);)(o||(o=[])).push(a),s=a.removeFromSet(s)}else C?C.isInSet(n.marks)&&(o=[C]):o=n.marks;if(o&&o.length){let s=Math.min(A+n.nodeSize,I);for(let a=0;a<o.length;a++){let d=o[a],r;for(let Z=0;Z<t.length;Z++){let b=t[Z];b.step==i-1&&d.eq(t[Z].style)&&(r=b)}r?(r.to=s,r.step=i):t.push({style:d,from:Math.max(A,g),to:s,step:i})}}}),t.forEach(n=>e.step(new RZ(n.from,n.to,n.style)))}function q9(e,g,I,C=I.contentMatch,t=!0){let i=e.doc.nodeAt(g),n=[],A=g+1;for(let o=0;o<i.childCount;o++){let s=i.child(o),a=A+s.nodeSize,d=C.matchType(s.type);if(!d)n.push(new lA(A,a,Pg.empty));else{C=d;for(let r=0;r<s.marks.length;r++)I.allowsMarkType(s.marks[r].type)||e.step(new RZ(A,a,s.marks[r]));if(t&&s.isText&&I.whitespace!="pre"){let r,Z=/\r?\n|\r/g,b;for(;r=Z.exec(s.text);)b||(b=new Pg(Dg.from(I.schema.text(" ",I.allowedMarks(s.marks))),0,0)),n.push(new lA(A+r.index,A+r.index+r[0].length,b))}}A=a}if(!C.validEnd){let o=C.fillBefore(Dg.empty,!0);e.replace(A,A,new Pg(o,0,0))}for(let o=n.length-1;o>=0;o--)e.step(n[o])}function p8g(e,g,I){return(g==0||e.canReplace(g,e.childCount))&&(I==e.childCount||e.canReplace(0,I))}function MZ(e){let I=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let C=e.depth,t=0,i=0;;--C){let n=e.$from.node(C),A=e.$from.index(C)+t,o=e.$to.indexAfter(C)-i;if(C<e.depth&&n.canReplace(A,o,I))return C;if(C==0||n.type.spec.isolating||!p8g(n,A,o))break;A&&(t=1),o<n.childCount&&(i=1)}return null}function B8g(e,g,I){let{$from:C,$to:t,depth:i}=g,n=C.before(i+1),A=t.after(i+1),o=n,s=A,a=Dg.empty,d=0;for(let b=i,h=!1;b>I;b--)h||C.index(b)>0?(h=!0,a=Dg.from(C.node(b).copy(a)),d++):o--;let r=Dg.empty,Z=0;for(let b=i,h=!1;b>I;b--)h||t.after(b+1)<t.end(b)?(h=!0,r=Dg.from(t.node(b).copy(r)),Z++):s++;e.step(new vi(o,s,n,A,new Pg(a.append(r),d,Z),a.size-d,!0))}function Mp(e,g,I=null,C=e){let t=Y8g(e,g),i=t&&y8g(C,g);return i?t.map(Qz).concat({type:g,attrs:I}).concat(i.map(Qz)):null}function Qz(e){return{type:e,attrs:null}}function Y8g(e,g){let{parent:I,startIndex:C,endIndex:t}=e,i=I.contentMatchAt(C).findWrapping(g);if(!i)return null;let n=i.length?i[0]:g;return I.canReplaceWith(C,t,n)?i:null}function y8g(e,g){let{parent:I,startIndex:C,endIndex:t}=e,i=I.child(C),n=g.contentMatch.findWrapping(i.type);if(!n)return null;let o=(n.length?n[n.length-1]:g).contentMatch;for(let s=C;o&&s<t;s++)o=o.matchType(I.child(s).type);return!o||!o.validEnd?null:n}function N8g(e,g,I){let C=Dg.empty;for(let n=I.length-1;n>=0;n--){if(C.size){let A=I[n].type.contentMatch.matchFragment(C);if(!A||!A.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}C=Dg.from(I[n].type.create(I[n].attrs,C))}let t=g.start,i=g.end;e.step(new vi(t,i,t,i,new Pg(C,0,0),I.length,!0))}function V8g(e,g,I,C,t){if(!C.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(g,I,(n,A)=>{let o=typeof t=="function"?t(n):t;if(n.isTextblock&&!n.hasMarkup(C,o)&&X8g(e.doc,e.mapping.slice(i).map(A),C)){let s=null;if(C.schema.linebreakReplacement){let Z=C.whitespace=="pre",b=!!C.contentMatch.matchType(C.schema.linebreakReplacement);Z&&!b?s=!1:!Z&&b&&(s=!0)}s===!1&&Uz(e,n,A,i),q9(e,e.mapping.slice(i).map(A,1),C,void 0,s===null);let a=e.mapping.slice(i),d=a.map(A,1),r=a.map(A+n.nodeSize,1);return e.step(new vi(d,r,d+1,r-1,new Pg(Dg.from(C.create(o,null,n.marks)),0,0),1,!0)),s===!0&&Oz(e,n,A,i),!1}})}function Oz(e,g,I,C){g.forEach((t,i)=>{if(t.isText){let n,A=/\r?\n|\r/g;for(;n=A.exec(t.text);){let o=e.mapping.slice(C).map(I+1+i+n.index);e.replaceWith(o,o+1,g.type.schema.linebreakReplacement.create())}}})}function Uz(e,g,I,C){g.forEach((t,i)=>{if(t.type==t.type.schema.linebreakReplacement){let n=e.mapping.slice(C).map(I+1+i);e.replaceWith(n,n+1,g.type.schema.text(`